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

node: disable directions by default, enable them if config section in/out is available

This commit is contained in:
Steffen Vogel 2018-06-15 14:33:22 +02:00
parent 95188a57ea
commit c8ba97d94e

View file

@ -35,7 +35,7 @@
static int node_direction_init(struct node_direction *nd, struct node *n)
{
nd->enabled = 1;
nd->enabled = 0;
nd->vectorize = 1;
nd->builtin = 1;
@ -98,12 +98,14 @@ static int node_direction_parse(struct node_direction *nd, struct node *n, json_
json_t *json_signals = NULL;
nd->cfg = cfg;
nd->enabled = 1;
ret = json_unpack_ex(cfg, &err, 0, "{ s?: o, s?: o, s?: i, s?: b }",
ret = json_unpack_ex(cfg, &err, 0, "{ s?: o, s?: o, s?: i, s?: b, s?: b }",
"hooks", &json_hooks,
"signals", &json_signals,
"vectorize", &nd->vectorize,
"builtin", &nd->builtin
"builtin", &nd->builtin,
"enabled", &nd->enabled
);
if (ret)
jerror(&err, "Failed to parse node '%s'", node_name(n));