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

sample: remove sent timestamp

This commit is contained in:
Steffen Vogel 2018-05-08 11:42:43 +02:00
parent 935ee584e4
commit f99e5debb5
2 changed files with 1 additions and 6 deletions

View file

@ -93,7 +93,6 @@ struct sample {
struct {
struct timespec origin; /**< The point in time when this data was sampled. */
struct timespec received; /**< The point in time when this data was received. */
struct timespec sent; /**< The point in time when this data was send for the last time. */
} ts;
/** The values. */

View file

@ -35,8 +35,7 @@ struct shift_ts {
struct timespec offset;
enum {
SHIFT_ORIGIN,
SHIFT_RECEIVED,
SHIFT_SENT,
SHIFT_RECEIVED
} mode;
};
@ -69,8 +68,6 @@ static int shift_ts_parse(struct hook *h, json_t *cfg)
p->mode = SHIFT_ORIGIN;
else if (!strcmp(mode, "received"))
p->mode = SHIFT_RECEIVED;
else if (!strcmp(mode, "sent"))
p->mode = SHIFT_SENT;
else
jerror(&err, "Invalid mode parameter '%s' for hook '%s'", mode, plugin_name(h->_vt));
}
@ -91,7 +88,6 @@ static int shift_ts_read(struct hook *h, struct sample *smps[], unsigned *cnt)
switch (p->mode) {
case SHIFT_ORIGIN: ts = &s->ts.origin; break;
case SHIFT_RECEIVED: ts = &s->ts.received; break;
case SHIFT_SENT: ts = &s->ts.sent; break;
default: return -1;
}