mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
hooks: update sample signal descriptors in hook_list_process()
This commit is contained in:
parent
b911e9e7ab
commit
66e3f6f45d
4 changed files with 4 additions and 6 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <villas/hook.hpp>
|
||||
#include <villas/hook_list.hpp>
|
||||
#include <villas/list.h>
|
||||
#include <villas/sample.h>
|
||||
#include <villas/log.h>
|
||||
|
||||
using namespace villas;
|
||||
|
@ -129,6 +130,8 @@ skip_add:
|
|||
h->prepare(sigs);
|
||||
|
||||
sigs = h->getSignals();
|
||||
|
||||
signal_list_dump(sigs);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,6 +149,7 @@ int hook_list_process(vlist *hs, sample *smps[], unsigned cnt)
|
|||
Hook *h = (Hook *) vlist_at(hs, i);
|
||||
|
||||
auto ret = h->process(smp);
|
||||
smp->signals = h->getSignals();
|
||||
switch (ret) {
|
||||
case Hook::Reason::ERROR:
|
||||
return -1;
|
||||
|
|
|
@ -172,7 +172,6 @@ public:
|
|||
return Reason::ERROR;
|
||||
|
||||
sample_data_insert(smp, (union signal_data *) &avg, offset, 1);
|
||||
smp->signals = &signals;
|
||||
|
||||
return Reason::OK;
|
||||
}
|
||||
|
|
|
@ -161,9 +161,6 @@ public:
|
|||
|
||||
signal_data_cast(&smp->data[signal_index], orig_sig, new_sig);
|
||||
|
||||
/* Replace signal descriptors of sample */
|
||||
smp->signals = &signals;
|
||||
|
||||
return Reason::OK;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -318,8 +318,6 @@ public:
|
|||
sample_data_insert(smp, (union signal_data *) coeffs, offset, fharmonics_len);
|
||||
}
|
||||
|
||||
smp->signals = &signals;
|
||||
|
||||
time += timestep;
|
||||
steps++;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue