mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix sequence numbers for gtnet-skt
This commit is contained in:
parent
af22c7d0c4
commit
ff48249389
3 changed files with 4 additions and 2 deletions
|
@ -47,6 +47,8 @@ struct node
|
|||
|
||||
int vectorize; /**< Number of messages to send / recv at once (scatter / gather) */
|
||||
int affinity; /**< CPU Affinity of this node */
|
||||
|
||||
unsigned long sequence; /**< This is a counter of received samples, in case the node-type does not generate sequence numbers itself. */
|
||||
|
||||
enum node_state {
|
||||
NODE_INVALID, /**< This node object is not in a valid state. */
|
||||
|
|
|
@ -113,7 +113,7 @@ int node_start(struct node *n)
|
|||
if (ret == 0)
|
||||
n->state = NODE_RUNNING;
|
||||
|
||||
n->seq_num = 0; /** @todo is it the appropriate place to initialize seq_num? */
|
||||
n->sequence = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -276,7 +276,7 @@ int socket_read(struct node *n, struct sample *smps[], unsigned cnt)
|
|||
smp->ts.origin.tv_sec = header[1];
|
||||
smp->ts.origin.tv_nsec = header[2];
|
||||
#else
|
||||
smp->sequence = n->seq_num++;
|
||||
smp->sequence = n->sequence++;
|
||||
smp->ts.origin.tv_sec = -1;
|
||||
smp->ts.origin.tv_nsec = -1;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue