mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
villas-signal: fix initialization order
This commit is contained in:
parent
2e6ca2de94
commit
51259b9701
1 changed files with 8 additions and 8 deletions
|
@ -258,18 +258,10 @@ check: if (optarg == endptr)
|
|||
if (ret)
|
||||
throw RuntimeError("Failed to verify node configuration");
|
||||
|
||||
ret = pool_init(&q, 16, SAMPLE_LENGTH(vlist_length(&n.in.signals)), &memory_heap);
|
||||
if (ret)
|
||||
throw RuntimeError("Failed to initialize pool");
|
||||
|
||||
ret = node_prepare(&n);
|
||||
if (ret)
|
||||
throw RuntimeError("Failed to start node {}: reason={}", node_name(&n), ret);
|
||||
|
||||
ret = node_start(&n);
|
||||
if (ret)
|
||||
throw RuntimeError("Failed to start node {}: reason={}", node_name(&n), ret);
|
||||
|
||||
ret = io_init(&io, ft, &n.in.signals, IO_FLUSH | (SAMPLE_HAS_ALL & ~SAMPLE_HAS_OFFSET));
|
||||
if (ret)
|
||||
throw RuntimeError("Failed to initialize output");
|
||||
|
@ -278,10 +270,18 @@ check: if (optarg == endptr)
|
|||
if (ret)
|
||||
throw RuntimeError("Failed to validate IO configuration");
|
||||
|
||||
ret = pool_init(&q, 16, SAMPLE_LENGTH(vlist_length(&n.in.signals)), &memory_heap);
|
||||
if (ret)
|
||||
throw RuntimeError("Failed to initialize pool");
|
||||
|
||||
ret = io_open(&io, nullptr);
|
||||
if (ret)
|
||||
throw RuntimeError("Failed to open output");
|
||||
|
||||
ret = node_start(&n);
|
||||
if (ret)
|
||||
throw RuntimeError("Failed to start node {}: reason={}", node_name(&n), ret);
|
||||
|
||||
while (!stop && n.state == STATE_STARTED) {
|
||||
t = sample_alloc(&q);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue