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

Merge branch 'dft_pps_update' of https://git.rwth-aachen.de/acs/public/villas/node into dft_pps_update

This commit is contained in:
Manuel Pitz 2021-07-19 12:18:38 +02:00
commit 30441a96ad
3 changed files with 10 additions and 7 deletions

2
common

@ -1 +1 @@
Subproject commit d818bcab55d47dbd30ccd59f63d467b2786323be
Subproject commit dd9304ca059efffe053b74159ca32b16a5eb4597

View file

@ -39,6 +39,7 @@ using namespace villas;
using namespace villas::node;
Hook::Hook(struct vpath *p, struct vnode *n, int fl, int prio, bool en) :
logger(logging.get("hook")),
state(State::INITIALIZED),
flags(fl),
priority(prio),

View file

@ -48,16 +48,17 @@ public:
Hook(p, n, fl, prio, en),
parent(pa)
{
state = State::CHECKED;
/* This hook has no config. We never call parse() for it */
state = State::PARSED;
}
virtual Hook::Reason process(sample *smp);
virtual Hook::Reason process(struct sample *smp);
};
class StatsReadHook : public Hook {
protected:
sample *last;
struct sample *last;
StatsHook *parent;
@ -67,7 +68,8 @@ public:
last(nullptr),
parent(pa)
{
state = State::CHECKED;
/* This hook has no config. We never call parse() for it */
state = State::PARSED;
}
virtual void start()
@ -238,7 +240,7 @@ public:
}
};
Hook::Reason StatsWriteHook::process(sample *smp)
Hook::Reason StatsWriteHook::process(struct sample *smp)
{
timespec now = time_now();
@ -247,7 +249,7 @@ Hook::Reason StatsWriteHook::process(sample *smp)
return Reason::OK;
}
Hook::Reason StatsReadHook::process(sample *smp)
Hook::Reason StatsReadHook::process(struct sample *smp)
{
if (last) {
if (smp->flags & last->flags & (int) SampleFlags::HAS_TS_RECEIVED)