1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

smaller cleanups

This commit is contained in:
Steffen Vogel 2015-10-09 13:04:52 +02:00
parent 2afbd98bf5
commit d6cc209a79
5 changed files with 6 additions and 4 deletions

View file

@ -42,7 +42,7 @@ struct file {
struct timespec offset; /**< An offset between the timestamp in the input file and the current time */
double rate; /**< The sending rate. */
int tfd; /**< Timer file descriptor. Blocks until 1/rate seconds are elapsed. */
int tfd; /**< Timer file descriptor. Blocks until 1 / rate seconds are elapsed. */
};
/** @see node_vtable::init */

View file

@ -44,9 +44,10 @@
#error "Unknown byte order!"
#endif
/** The total length of a message */
/** The total size in bytes of a message */
#define MSG_LEN(msg) (4 * ((msg)->length + 4))
/** The timestamp of a message in struct timespec format */
#define MSG_TS(msg) (struct timespec) { \
.tv_sec = (msg)->ts.sec, \
.tv_nsec = (msg)->ts.nsec \

View file

@ -118,7 +118,7 @@ void hist_print(struct hist *h)
hist_plot(h);
char *buf = hist_dump(h);
info(buf);
info("Matlab: %s", buf);
free(buf);
}
}

View file

@ -54,6 +54,7 @@ int node_deinit()
vt->deinit();
}
}
return 0;
}

View file

@ -94,7 +94,7 @@ static void * path_run(void *arg)
/* For each received message... */
for (int i = 0; i < recv; i++) {
p->previous = p->current;
p->current = &p->pool[ p->received % p->poolsize];
p->current = &p->pool[p->received % p->poolsize];
p->received++;