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

uldaq: check that signal definitions are correct.

This commit is contained in:
Steffen Vogel 2018-09-25 12:09:04 +02:00
parent 43a869d4f1
commit 556f4384a3
2 changed files with 11 additions and 2 deletions

View file

@ -4,11 +4,11 @@ nodes = {
in = {
signals = (
{ name = "ch0", channel = 0, range = "bipolar-10" }
{ name = "ch0", type = "float", channel = 0, range = "bipolar-10" }
)
sample_rate = 1000,
vectorize = 100
}
}
}
}

View file

@ -191,6 +191,15 @@ int uldaq_check(struct node *n)
return -1;
}
for (size_t i = 0; i < list_length(&n->signals); i++) {
struct signal *s = (struct signal *) list_at(&n->signals, i);
if (s->type != SIGNAL_TYPE_FLOAT) {
warn("Node '%s' only supports signals of type = float!", node_name(n));
return -1;
}
}
return 0;
}