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:
parent
935ee584e4
commit
f99e5debb5
2 changed files with 1 additions and 6 deletions
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue