From 8fd68da2db57b2628b6463e4528d34a399de525e Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 4 Sep 2026 14:11:44 +0200 Subject: [PATCH 01/84] fix(sample): Change ts compare to absolute compare Signed-off-by: Manuel --- lib/sample.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sample.cpp b/lib/sample.cpp index e9ad06f30..2974e9536 100644 --- a/lib/sample.cpp +++ b/lib/sample.cpp @@ -206,7 +206,7 @@ int villas::node::sample_cmp(struct Sample *a, struct Sample *b, double epsilon, // Compare timestamp if (flags & (int)SampleFlags::HAS_TS_ORIGIN) { - if (time_delta(&a->ts.origin, &b->ts.origin) > epsilon) { + if (abs(time_delta(&a->ts.origin, &b->ts.origin)) > epsilon) { printf("ts.origin: %f != %f\n", time_to_double(&a->ts.origin), time_to_double(&b->ts.origin)); return 3; From 1f577b85802722e810f0f48e6d3f5a0ced29e197 Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 4 Sep 2026 14:38:33 +0200 Subject: [PATCH 02/84] test(pps_ts): Added test for hook pps_ts and fix time source for hook Signed-off-by: Manuel --- lib/hooks/pps_ts.cpp | 51 +++++++++++++++++-------- tests/integration/hook-pps_ts.sh | 64 ++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 15 deletions(-) create mode 100755 tests/integration/hook-pps_ts.sh diff --git a/lib/hooks/pps_ts.cpp b/lib/hooks/pps_ts.cpp index 26abfb6dd..64fec5c3c 100644 --- a/lib/hooks/pps_ts.cpp +++ b/lib/hooks/pps_ts.cpp @@ -22,6 +22,8 @@ class PpsTsHook : public SingleSignalHook { HORIZON, } mode; + enum TimeSource { CLOCK_RELATIME, SAMPLE } timeSource; + uint64_t lastSequence; double lastValue; @@ -60,19 +62,16 @@ class PpsTsHook : public SingleSignalHook { SingleSignalHook::parse(json); const char *mode_str = nullptr; + const char *timeSourceC = nullptr; - double fSmps = 1.0; - ret = json_unpack_ex(json, &err, 0, "{ s?: s, s?: f, s?: F, s?: i, s?: i }", - "mode", &mode_str, "threshold", &threshold, - "expected_smp_rate", &fSmps, "horizon_estimation", + ret = json_unpack_ex(json, &err, 0, "{ s?: s, s?: s, s?: f, s?: i, s?: i }", + "mode", &mode_str, "time_source", &timeSourceC, + "threshold", &threshold, "horizon_estimation", &horizonEstimation, "horizon_compensation", &horizonCompensation); if (ret) throw ConfigError(json, err, "node-config-hook-pps_ts"); - period = 1.0 / fSmps; - currentSecond = time(nullptr); - if (mode_str) { if (!strcmp(mode_str, "simple")) mode = Mode::SIMPLE; @@ -83,6 +82,13 @@ class PpsTsHook : public SingleSignalHook { "Unsupported mode: {}", mode_str); } + if (timeSourceC) { + if (!strcmp(timeSourceC, "CLOCK_REALTIME")) + timeSource = TimeSource::CLOCK_RELATIME; + else + timeSource = TimeSource::SAMPLE; + } + state = State::PARSED; } @@ -107,12 +113,15 @@ class PpsTsHook : public SingleSignalHook { // Detect Edge bool isEdge = lastValue < threshold && value > threshold; - if (isEdge) { + + if (isEdge) + cntEdges++; + + if (isEdge && cntEdges > 0) { tsVirt.tv_sec = currentSecond + 1; tsVirt.tv_nsec = 0; period = 1.0 / cntSmps; cntSmps = 0; - cntEdges++; currentSecond = 0; } else { struct timespec tsPeriod = time_from_double(period); @@ -122,12 +131,18 @@ class PpsTsHook : public SingleSignalHook { lastValue = value; cntSmps++; - if (!currentSecond && - tsVirt.tv_nsec > - 0.5e9) //take the second somewere in the center of the last second to reduce impact of system clock error - currentSecond = time(nullptr); + if (!currentSecond && tsVirt.tv_nsec > 0.5e9) { + //take the second somewere in the center of the last second to reduce impact of system clock error + if (timeSource == TimeSource::CLOCK_RELATIME) { + timespec t; + clock_gettime(CLOCK_RELATIME, &t); + currentSecond = t.tv_sec; + } else if (timeSource == TimeSource::SAMPLE) { + currentSecond = smp->ts.origin.tv_sec; + } + } - if (cntEdges < 5) + if (cntEdges < 2) return Hook::Reason::SKIP_SAMPLE; smp->ts.origin = tsVirt; @@ -172,7 +187,13 @@ class PpsTsHook : public SingleSignalHook { timeError / (cntSmpsAvg * horizonCompensation); period = periodEstimate + periodErrorCompensation; } else { - tsVirt.tv_sec = time(nullptr); + if (timeSource == TimeSource::CLOCK_RELATIME) { + timespec t; + clock_gettime(CLOCK_RELATIME, &t); + tsVirt.tv_sec = t.tv_sec; + } else if (timeSource == TimeSource::SAMPLE) { + tsVirt.tv_sec = smp->ts.origin.tv_sec; + } tsVirt.tv_nsec = 0; isSynced = true; cntEdges = 0; diff --git a/tests/integration/hook-pps_ts.sh b/tests/integration/hook-pps_ts.sh new file mode 100755 index 000000000..897497c29 --- /dev/null +++ b/tests/integration/hook-pps_ts.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# +# Integration test for pps_ts hook. +# +# Author: Manuel Pitz +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 + +set -e + +DIR=$(mktemp -d) +pushd ${DIR} + +function finish { + popd +} +trap finish EXIT + +cat > input.dat < expect.dat < output.dat +villas compare output.dat expect.dat From d17ea8539a5542ad47a373b9b35dbc4d61f6e0ad Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 4 Sep 2026 16:23:43 +0200 Subject: [PATCH 03/84] test(nodes): Change integration test to ignore timestamps in compare Signed-off-by: Manuel --- tests/integration/node-hook.sh | 2 +- tests/integration/node-mapping.sh | 2 +- tests/integration/node-multiplexing.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/node-hook.sh b/tests/integration/node-hook.sh index af1498add..07221b350 100755 --- a/tests/integration/node-hook.sh +++ b/tests/integration/node-hook.sh @@ -74,4 +74,4 @@ EOF villas node config.json -villas compare output.dat expect.dat +villas compare -T output.dat expect.dat diff --git a/tests/integration/node-mapping.sh b/tests/integration/node-mapping.sh index cc97d1bd4..d09703f50 100755 --- a/tests/integration/node-mapping.sh +++ b/tests/integration/node-mapping.sh @@ -80,4 +80,4 @@ EOF villas node -d debug config.json -villas compare output.dat expect.dat +villas compare -T output.dat expect.dat diff --git a/tests/integration/node-multiplexing.sh b/tests/integration/node-multiplexing.sh index 698bea278..8717eacff 100755 --- a/tests/integration/node-multiplexing.sh +++ b/tests/integration/node-multiplexing.sh @@ -117,7 +117,7 @@ EOF villas node config.json -villas compare output.dat expect_${MODE}.dat +villas compare -T output.dat expect_${MODE}.dat rm output.dat From 469f54c9c2462eea96df7a73f16d847785cff053 Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 4 Sep 2026 19:45:32 +0200 Subject: [PATCH 04/84] fix(pps_ts): Cleanup code and make sure variables are initialized Signed-off-by: Manuel --- lib/hooks/pps_ts.cpp | 187 ++++++++----------------------- tests/integration/hook-pps_ts.sh | 73 ++++++------ 2 files changed, 80 insertions(+), 180 deletions(-) diff --git a/lib/hooks/pps_ts.cpp b/lib/hooks/pps_ts.cpp index 64fec5c3c..523a5a530 100644 --- a/lib/hooks/pps_ts.cpp +++ b/lib/hooks/pps_ts.cpp @@ -17,41 +17,28 @@ namespace node { class PpsTsHook : public SingleSignalHook { protected: - enum Mode { - SIMPLE, - HORIZON, - } mode; - - enum TimeSource { CLOCK_RELATIME, SAMPLE } timeSource; + enum class TimeSource { OS, SAMPLE } timeSource; uint64_t lastSequence; - + bool firstSample; double lastValue; double threshold; + bool armSecDetect; - bool isSynced; - bool isLocked; struct timespec tsVirt; - double timeError; // In seconds - double periodEstimate; // In seconds - double periodErrorCompensation; // In seconds - double period; // In seconds + double period; // In seconds uintmax_t cntEdges; uintmax_t cntSmps; - uintmax_t cntSmpsTotal; - unsigned horizonCompensation; - unsigned horizonEstimation; + unsigned currentSecond; std::vector filterWindow; public: PpsTsHook(Path *p, Node *n, int fl, int prio, bool en = true) - : SingleSignalHook(p, n, fl, prio, en), mode(Mode::SIMPLE), - lastSequence(0), lastValue(0), threshold(1.5), isSynced(false), - isLocked(false), timeError(0.0), periodEstimate(0.0), - periodErrorCompensation(0.0), period(0.0), cntEdges(0), cntSmps(0), - cntSmpsTotal(0), horizonCompensation(10), horizonEstimation(10), - currentSecond(0), filterWindow(horizonEstimation + 1, 0) {} + : SingleSignalHook(p, n, fl, prio, en), timeSource(TimeSource::OS), + lastSequence(0), firstSample(false), lastValue(0), threshold(1.5), + armSecDetect(false), tsVirt({0, 0}), period(0.0), cntEdges(0), + cntSmps(0), currentSecond(0) {} void parse(json_t *json) override { int ret; @@ -61,170 +48,84 @@ class PpsTsHook : public SingleSignalHook { SingleSignalHook::parse(json); - const char *mode_str = nullptr; const char *timeSourceC = nullptr; - ret = json_unpack_ex(json, &err, 0, "{ s?: s, s?: s, s?: f, s?: i, s?: i }", - "mode", &mode_str, "time_source", &timeSourceC, - "threshold", &threshold, "horizon_estimation", - &horizonEstimation, "horizon_compensation", - &horizonCompensation); + ret = json_unpack_ex(json, &err, 0, "{ s?: s, s?: f }", "time_source", + &timeSourceC, "threshold", &threshold); if (ret) throw ConfigError(json, err, "node-config-hook-pps_ts"); - if (mode_str) { - if (!strcmp(mode_str, "simple")) - mode = Mode::SIMPLE; - else if (!strcmp(mode_str, "horizon")) - mode = Mode::HORIZON; - else - throw ConfigError(json, "node-config-hook-pps_ts-mode", - "Unsupported mode: {}", mode_str); - } - if (timeSourceC) { - if (!strcmp(timeSourceC, "CLOCK_REALTIME")) - timeSource = TimeSource::CLOCK_RELATIME; - else + if (!strcmp(timeSourceC, "sample")) timeSource = TimeSource::SAMPLE; + else + timeSource = TimeSource::OS; } state = State::PARSED; } villas::node::Hook::Reason process(struct Sample *smp) override { - switch (mode) { - case Mode::SIMPLE: - return processSimple(smp); - - case Mode::HORIZON: - return processHorizon(smp); - - default: - return Reason::ERROR; - } - } - - villas::node::Hook::Reason processSimple(struct Sample *smp) { assert(state == State::STARTED); // Get value of PPS signal float value = smp->data[signalIndex].f; // TODO check if it is really float + if (!firstSample) { + firstSample = true; + lastValue = value; + return Hook::Reason::SKIP_SAMPLE; + } + // Detect Edge bool isEdge = lastValue < threshold && value > threshold; - if (isEdge) - cntEdges++; + if (isEdge) { - if (isEdge && cntEdges > 0) { - tsVirt.tv_sec = currentSecond + 1; - tsVirt.tv_nsec = 0; - period = 1.0 / cntSmps; + if (cntEdges > 0) { + tsVirt.tv_sec = currentSecond + 1; + tsVirt.tv_nsec = 0; + period = 1.0 / cntSmps; + currentSecond = 0; + } cntSmps = 0; - currentSecond = 0; + cntEdges++; + armSecDetect = true; } else { struct timespec tsPeriod = time_from_double(period); tsVirt = time_add(&tsVirt, &tsPeriod); } - lastValue = value; - cntSmps++; - - if (!currentSecond && tsVirt.tv_nsec > 0.5e9) { - //take the second somewere in the center of the last second to reduce impact of system clock error - if (timeSource == TimeSource::CLOCK_RELATIME) { - timespec t; - clock_gettime(CLOCK_RELATIME, &t); - currentSecond = t.tv_sec; - } else if (timeSource == TimeSource::SAMPLE) { - currentSecond = smp->ts.origin.tv_sec; + if (armSecDetect) { + long current_nsec = 0; + if (timeSource == TimeSource::OS) + current_nsec = time_now().tv_nsec; + else if (timeSource == TimeSource::SAMPLE) + current_nsec = smp->ts.origin.tv_nsec; + + if (current_nsec > 0.5e9) { + //take the second somewere in the center of the last second to reduce impact of system clock error + if (timeSource == TimeSource::OS) + currentSecond = time_now().tv_sec; + else if (timeSource == TimeSource::SAMPLE) + currentSecond = smp->ts.origin.tv_sec; + armSecDetect = false; } } - if (cntEdges < 2) - return Hook::Reason::SKIP_SAMPLE; - - smp->ts.origin = tsVirt; - smp->flags |= (int)SampleFlags::HAS_TS_ORIGIN; - - if ((smp->sequence - lastSequence) > 1) - logger->warn("Samples missed: {} sampled missed", - smp->sequence - lastSequence); - - lastSequence = smp->sequence; - return Hook::Reason::OK; - } - - villas::node::Hook::Reason processHorizon(struct Sample *smp) { - assert(state == State::STARTED); - - // Get value of PPS signal - float value = smp->data[signalIndex].f; // TODO check if it is really float - - // Detect Edge - bool isEdge = lastValue < threshold && value > threshold; - lastValue = value; - - if (isEdge) { - if (isSynced) { - if (tsVirt.tv_nsec > 0.5e9) - timeError += 1.0 - (tsVirt.tv_nsec / 1.0e9); - else - timeError -= (tsVirt.tv_nsec / 1.0e9); - - filterWindow[cntEdges % filterWindow.size()] = cntSmpsTotal; - // Estimated sample period over last 'horizonEstimation' seconds - unsigned int tmp = - cntEdges < filterWindow.size() ? cntEdges : horizonEstimation; - double cntSmpsAvg = - (cntSmpsTotal - - filterWindow[(cntEdges - tmp) % filterWindow.size()]) / - tmp; - periodEstimate = 1.0 / cntSmpsAvg; - periodErrorCompensation = - timeError / (cntSmpsAvg * horizonCompensation); - period = periodEstimate + periodErrorCompensation; - } else { - if (timeSource == TimeSource::CLOCK_RELATIME) { - timespec t; - clock_gettime(CLOCK_RELATIME, &t); - tsVirt.tv_sec = t.tv_sec; - } else if (timeSource == TimeSource::SAMPLE) { - tsVirt.tv_sec = smp->ts.origin.tv_sec; - } - tsVirt.tv_nsec = 0; - isSynced = true; - cntEdges = 0; - cntSmpsTotal = 0; - } - cntSmps = 0; - cntEdges++; - - logger->debug( - "Time Error is: {} periodEstimate {} periodErrorCompensation {}", - timeError, periodEstimate, periodErrorCompensation); - } - cntSmps++; - cntSmpsTotal++; - if (cntEdges < 5) + if (cntEdges < 2) return Hook::Reason::SKIP_SAMPLE; - smp->ts.origin = tsVirt; smp->flags |= (int)SampleFlags::HAS_TS_ORIGIN; - struct timespec tsPeriod = time_from_double(period); - tsVirt = time_add(&tsVirt, &tsPeriod); - if ((smp->sequence - lastSequence) > 1) logger->warn("Samples missed: {} sampled missed", smp->sequence - lastSequence); lastSequence = smp->sequence; - return Hook::Reason::OK; } }; diff --git a/tests/integration/hook-pps_ts.sh b/tests/integration/hook-pps_ts.sh index 897497c29..5d178c3e5 100755 --- a/tests/integration/hook-pps_ts.sh +++ b/tests/integration/hook-pps_ts.sh @@ -18,47 +18,46 @@ trap finish EXIT cat > input.dat < expect.dat < output.dat +villas hook pps_ts -o signal=signal0 -o threshold=2. -o time_source=sample < input.dat > output.dat villas compare output.dat expect.dat From 9427173d3d9453e81e7426cdd1b4cfb1d8a23873 Mon Sep 17 00:00:00 2001 From: Manuel Date: Sun, 13 Sep 2026 12:20:47 +0200 Subject: [PATCH 05/84] fix(api): Restart temp cofnigfile needs .json at the end for corret config selection Signed-off-by: Manuel --- lib/api/requests/restart.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/api/requests/restart.cpp b/lib/api/requests/restart.cpp index 08b11966d..fb9fa4f8f 100644 --- a/lib/api/requests/restart.cpp +++ b/lib/api/requests/restart.cpp @@ -5,6 +5,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include + #include #include #include @@ -62,8 +64,8 @@ class RestartRequest : public Request { if (json_is_string(json_config)) configUri = json_string_value(json_config); else if (json_is_object(json_config)) { - char configUriBuf[] = "villas-node.json.XXXXXX"; - int configFd = mkstemp(configUriBuf); + char configUriBuf[] = "villas-node.XXXXXX.json"; + int configFd = mkstemps(configUriBuf, strlen(".json")); FILE *configFile = fdopen(configFd, "w+"); From 1414e1b4d9d590bd2e52bd667fb349ec6d36487b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:22:50 +0200 Subject: [PATCH 06/84] fix(websocket): Use previous connection state in CLOSED callback The LWS_CALLBACK_CLOSED handler set the connection state to CLOSED and then compared the (now always CLOSED) state against CLOSING, making the check dead code. Save the state before overwriting it so the intended reconnect logic can actually trigger. Signed-off-by: Steffen Vogel --- lib/nodes/websocket.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/nodes/websocket.cpp b/lib/nodes/websocket.cpp index 0a8aa6b53..0ca1f5908 100644 --- a/lib/nodes/websocket.cpp +++ b/lib/nodes/websocket.cpp @@ -230,11 +230,12 @@ int villas::node::websocket_protocol_cb(struct lws *wsi, return -1; - case LWS_CALLBACK_CLOSED: + case LWS_CALLBACK_CLOSED: { + auto old_state = c->state; c->state = websocket_connection::State::CLOSED; c->node->logger->debug("Closed WebSocket connection: {}", c->toString()); - if (c->state != websocket_connection::State::CLOSING) { + if (old_state != websocket_connection::State::CLOSING) { // TODO: Attempt reconnect here } @@ -251,6 +252,7 @@ int villas::node::websocket_protocol_cb(struct lws *wsi, delete c; break; + } case LWS_CALLBACK_CLIENT_WRITEABLE: case LWS_CALLBACK_SERVER_WRITEABLE: { From 0f0949f2d830f69936bd1a921aef36fa08d385ea Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:23:06 +0200 Subject: [PATCH 07/84] fix(file): Disambiguate duplicated in.epoch key in node details string The details string contained 'in.epoch=' twice: once for the epoch mode name and once for the numeric epoch value. Rename the second occurrence to 'in.epoch_value'. Signed-off-by: Steffen Vogel --- lib/nodes/file.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nodes/file.cpp b/lib/nodes/file.cpp index 3b6166869..a5cd365b7 100644 --- a/lib/nodes/file.cpp +++ b/lib/nodes/file.cpp @@ -183,7 +183,8 @@ char *villas::node::file_print(NodeCompat *n) { strcatf( &buf, - "uri=%s, out.flush=%s, in.skip=%d, in.eof=%s, in.epoch=%s, in.epoch=%.2f", + "uri=%s, out.flush=%s, in.skip=%d, in.eof=%s, in.epoch=%s, " + "in.epoch_value=%.2f", f->uri ? f->uri : f->uri_tmpl, f->flush ? "yes" : "no", f->skip_lines, eof_str, epoch_str, time_to_double(&f->epoch)); From b8f686d8f6b49d4d0672330efeb0ca2936df2ade Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:23:17 +0200 Subject: [PATCH 08/84] fix(dumper): Bound copy of socket path into sun_path strcpy() into the fixed-size sun_path buffer could overflow for long socket paths. Use strncpy() and force NUL termination. Signed-off-by: Steffen Vogel --- lib/dumper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dumper.cpp b/lib/dumper.cpp index 4bc56664b..d2a005c8a 100644 --- a/lib/dumper.cpp +++ b/lib/dumper.cpp @@ -40,7 +40,9 @@ int Dumper::openSocket() { sockaddr_un socketaddrUn; socketaddrUn.sun_family = AF_UNIX; - strcpy(socketaddrUn.sun_path, socketPath.c_str()); + strncpy(socketaddrUn.sun_path, socketPath.c_str(), + sizeof(socketaddrUn.sun_path) - 1); + socketaddrUn.sun_path[sizeof(socketaddrUn.sun_path) - 1] = '\0'; int ret = connect(socketFd, (struct sockaddr *)&socketaddrUn, sizeof(socketaddrUn)); From 89f5d4821a372ec16cb71ffe5023e27beb72b755 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:23:38 +0200 Subject: [PATCH 09/84] fix(can): Bound copy of interface name into ifr_name strcpy() into the fixed-size ifr_name (IFNAMSIZ) buffer could overflow for long interface names. Use strncpy() and force NUL termination. Signed-off-by: Steffen Vogel --- lib/nodes/can.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nodes/can.cpp b/lib/nodes/can.cpp index 7191f36f5..2f44857f7 100644 --- a/lib/nodes/can.cpp +++ b/lib/nodes/can.cpp @@ -189,7 +189,8 @@ int villas::node::can_start(NodeCompat *n) { if (c->socket < 0) throw SystemError("Error while opening CAN socket"); - strcpy(ifr.ifr_name, c->interface_name); + strncpy(ifr.ifr_name, c->interface_name, IFNAMSIZ - 1); + ifr.ifr_name[IFNAMSIZ - 1] = '\0'; ret = ioctl(c->socket, SIOCGIFINDEX, &ifr); if (ret != 0) From db33e89457c8e02aafd5f1f35bd879ebcc8ee28e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:23:54 +0200 Subject: [PATCH 10/84] fix(path): Add missing commas in json_pack format string Two 's: b s: b' pairs lacked the separating comma, causing jansson to mis-parse the format and silently drop some path status fields from the API/websocket status output. Signed-off-by: Steffen Vogel --- lib/path.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/path.cpp b/lib/path.cpp index a23e63ede..353449005 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -673,7 +673,8 @@ json_t *Path::toJson() const { json_string(pd->node->getNameShort().c_str())); json_t *json_path = json_pack( - "{ s: s, s: s, s: s, s: b, s: b s: b, s: b, s: b, s: b s: i, s: o, s: o, " + "{ s: s, s: s, s: s, s: b, s: b, s: b, s: b, s: b, s: b, s: i, s: o, s: " + "o, " "s: o, s: o }", "uuid", uuid::toString(uuid).c_str(), "state", stateToString(state).c_str(), "mode", mode == Mode::ANY ? "any" : "all", From 22e2d10e3e0c1502d9fac1ab1da0ca7c54c1043e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:24:07 +0200 Subject: [PATCH 11/84] style(utils): Fix typo in tokenize() variable name Rename 'curentPos' to 'currentPos'. Signed-off-by: Steffen Vogel --- common/lib/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lib/utils.cpp b/common/lib/utils.cpp index 848c607da..5d78a2df5 100644 --- a/common/lib/utils.cpp +++ b/common/lib/utils.cpp @@ -43,14 +43,14 @@ std::vector tokenize(const std::string &s, std::vector tokens; size_t lastPos = 0; - size_t curentPos; + size_t currentPos; - while ((curentPos = s.find(delimiter, lastPos)) != std::string::npos) { - const size_t tokenLength = curentPos - lastPos; + while ((currentPos = s.find(delimiter, lastPos)) != std::string::npos) { + const size_t tokenLength = currentPos - lastPos; tokens.push_back(s.substr(lastPos, tokenLength)); // Advance in string - lastPos = curentPos + delimiter.length(); + lastPos = currentPos + delimiter.length(); } // Check if there's a last token behind the last delimiter. From f4db27477fd3944ee7f0375186f79bb86353f532 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:24:22 +0200 Subject: [PATCH 12/84] fix(utils): Handle vasprintf/realloc failure in vstrcatf The original code overwrote *dest with the result of realloc() without checking for NULL, leaking the old buffer and then copying into a NULL pointer. Also handle vasprintf() failure. On allocation failure the old buffer is preserved and returned unchanged. Signed-off-by: Steffen Vogel --- common/lib/utils.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/common/lib/utils.cpp b/common/lib/utils.cpp index 5d78a2df5..18120d227 100644 --- a/common/lib/utils.cpp +++ b/common/lib/utils.cpp @@ -198,9 +198,17 @@ char *vstrcatf(char **dest, const char *fmt, va_list ap) { int n = *dest ? strlen(*dest) : 0; int i = vasprintf(&tmp, fmt, ap); - *dest = (char *)(realloc(*dest, n + i + 1)); - if (*dest != nullptr) - strncpy(*dest + n, tmp, i + 1); + if (i < 0) + return *dest; + + char *p = (char *)realloc(*dest, n + i + 1); + if (p == nullptr) { + free(tmp); + return *dest; + } + + *dest = p; + strncpy(*dest + n, tmp, i + 1); free(tmp); From 2198f9876d56a42bc88435217256ccd871205f09 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:27:43 +0200 Subject: [PATCH 13/84] fix(api): Correct capabilities request file and description spelling Rename requests/capabiltities.cpp to requests/capabilities.cpp and fix the 'capabiltities'/'ressource' misspellings in its comment and API description string (visible in the API index). Signed-off-by: Steffen Vogel --- lib/api/CMakeLists.txt | 2 +- lib/api/requests/{capabiltities.cpp => capabilities.cpp} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename lib/api/requests/{capabiltities.cpp => capabilities.cpp} (90%) diff --git a/lib/api/CMakeLists.txt b/lib/api/CMakeLists.txt index 1a0cdd2d8..908230663 100644 --- a/lib/api/CMakeLists.txt +++ b/lib/api/CMakeLists.txt @@ -14,7 +14,7 @@ set(API_SRC requests/path.cpp requests/status.cpp - requests/capabiltities.cpp + requests/capabilities.cpp requests/config.cpp requests/shutdown.cpp requests/restart.cpp diff --git a/lib/api/requests/capabiltities.cpp b/lib/api/requests/capabilities.cpp similarity index 90% rename from lib/api/requests/capabiltities.cpp rename to lib/api/requests/capabilities.cpp index 6a7861862..211e1c9be 100644 --- a/lib/api/requests/capabiltities.cpp +++ b/lib/api/requests/capabilities.cpp @@ -1,4 +1,4 @@ -/* The "capabiltities" API ressource. +/* The "capabilities" API resource. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University @@ -36,7 +36,7 @@ class CapabilitiesRequest : public Request { static char n[] = "capabilities"; static char r[] = "/capabilities"; static char d[] = - "get capabiltities and details about this VILLASnode instance"; + "get capabilities and details about this VILLASnode instance"; static RequestPlugin p; } // namespace api From acff0918c5e3bdeda2b8ef33316be8b98f18e5bb Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:27:59 +0200 Subject: [PATCH 14/84] fix(python): Avoid mutable default, init child, use self.config in Node Three issues in the Python Node client: - config={} was a mutable default argument; use None and create a dict. - The api_url deduction read the 'config' parameter instead of self.config, ignoring a config loaded from config_filename. - self.child was only created in start(), so is_running() before start() raised AttributeError; initialize it to None. Signed-off-by: Steffen Vogel --- python/villas/node/node.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/villas/node/node.py b/python/villas/node/node.py index e17740dd1..c8eb9510a 100644 --- a/python/villas/node/node.py +++ b/python/villas/node/node.py @@ -25,13 +25,14 @@ def __init__( api_url=None, log_filename=None, config_filename=None, - config={}, + config=None, executable="villas-node", **kwargs, ): self.api_url = api_url self.log_filename = log_filename self.executable = executable + self.child = None if config_filename and config: raise RuntimeError( @@ -42,11 +43,11 @@ def __init__( with open(config_filename) as f: self.config = json.load(f) else: - self.config = config + self.config = config if config is not None else {} # Try to deduct api_url from config if self.api_url is None: - port = config.get("http", {}).get("port") + port = self.config.get("http", {}).get("port") if port is None: port = 80 if os.getuid() == 0 else 8080 From 4d6b0d4f77c305e91d49dfaa229cacf40727bbb9 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:28:11 +0200 Subject: [PATCH 15/84] fix(python): Only join started threads in communicate() rt/st were only bound when the corresponding callback was provided, so calling communicate() with a single callback raised UnboundLocalError when wait=True. Initialize to None and join conditionally. Signed-off-by: Steffen Vogel --- python/villas/node/communicate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/villas/node/communicate.py b/python/villas/node/communicate.py index f01a05146..df6b92053 100644 --- a/python/villas/node/communicate.py +++ b/python/villas/node/communicate.py @@ -67,17 +67,21 @@ def communicate( send_cb: SendCallback | None = None, wait: bool = True, ): + rt = None if recv_cb is not None: rt = RecvThread(recv_cb) rt.start() + st = None if send_cb is not None: st = SendThread(send_cb, rate) st.start() if wait: try: - rt.join() - st.join() + if rt is not None: + rt.join() + if st is not None: + st.join() except KeyboardInterrupt: logger.info("Received Ctrl+C. Stopping send/recv threads") From 6e0f416f560e1c37042d28c4bb7c93ec7b3afcc4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:28:20 +0200 Subject: [PATCH 16/84] fix(python): Assign stripped string in VillasHuman.loads() str.strip() returns a new string; the previous code discarded the result making the strip a no-op. Assign it back to s. Signed-off-by: Steffen Vogel --- python/villas/node/formats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/villas/node/formats.py b/python/villas/node/formats.py index c5e7b355a..5596f6a47 100644 --- a/python/villas/node/formats.py +++ b/python/villas/node/formats.py @@ -120,7 +120,7 @@ def loads(self, s: str) -> list[Sample]: Load samples from a string. """ - s.strip(self.separator + self.delimiter) + s = s.strip(self.separator + self.delimiter) sample_strs = s.split(sep=self.delimiter) samples = (self.load_sample(sample) for sample in sample_strs) return [s for s in samples if s is not None] From de4f72f74bb0dbc941649c7c87bc746e024de60d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:29:04 +0200 Subject: [PATCH 17/84] fix(tools): Correct several issues in tc-netem.sh - Use mark 124 (not 123) for the reverse-path POSTROUTING SNAT rule so reverse traffic actually matches the mark set in PREROUTING. - Use the correct loop variable $inf (was $if) in the debug output. - Quote $DEBUG in the non-empty test to avoid 'unary operator expected'. - Replace 'exit -1' (yields 255) with 'exit 1' in die(). Signed-off-by: Steffen Vogel --- tools/tc-netem.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tc-netem.sh b/tools/tc-netem.sh index b8241feda..2a734b3c1 100755 --- a/tools/tc-netem.sh +++ b/tools/tc-netem.sh @@ -9,7 +9,7 @@ # SPDX-License-Identifier: Apache-2.0 set -e # Abort on error -die() { echo "$1"; exit -1; } +die() { echo "$1"; exit 1; } # Apply netem qdisc also for reverse path REVERSE=0 @@ -75,7 +75,7 @@ if (( $REVERSE )); then $NF -t nat -I PREROUTING $FILTER_REV -j mark --mark-set 124 --mark-target CONTINUE $NF -t nat -I PREROUTING $FILTER_REV -j dnat --to-dst $SRC --dnat-target CONTINUE - $NF -t nat -I POSTROUTING --mark 123 -j snat --to-src $MY + $NF -t nat -I POSTROUTING --mark 124 -j snat --to-src $MY # Add classful qdisc to egress (outgoing) network device $TC qdisc replace dev $SRC_IF root handle 4000 prio bands 4 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 @@ -92,7 +92,7 @@ if (( $REVERSE )); then fi # Some debug and status output -if [ -n $DEBUG ]; then +if [ -n "$DEBUG" ]; then if [ "$SRC_IF" == "$DST_IF" ]; then IFNS="$SRC_IF" else @@ -101,7 +101,7 @@ if [ -n $DEBUG ]; then for inf in $IFNS; do for cmd in qdisc filter class; do - echo -e "\nTC ==> $if: $cmd" + echo -e "\nTC ==> $inf: $cmd" tc -d -p $cmd show dev $inf done done From 0e56af8e22bb34ae08575933dad99ead93c26c59 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:29:25 +0200 Subject: [PATCH 18/84] fix(tools): Remove stray exits and fix debug output in tc-netem2.sh - Remove two leftover 'exit' statements that aborted the script before the qdisc/filter setup ran. - Use the correct loop variable $inf (was $if) and quote $DEBUG in the debug output. Signed-off-by: Steffen Vogel --- tools/tc-netem2.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/tc-netem2.sh b/tools/tc-netem2.sh index e4f59592c..cb08a23d6 100755 --- a/tools/tc-netem2.sh +++ b/tools/tc-netem2.sh @@ -56,8 +56,6 @@ modprobe sch_netem || die "The netem qdisc is not compiled in this kernel!" $NF -t nat -F $NF -t nat -X -exit - # Add new chain, mark packets from $SRC and redirect them to $DEST # Insert new chain into flow @@ -67,8 +65,6 @@ $NF -t nat -A PREROUTING -i $SRC_IF -s $SRC -j dnat --to-dst $DST --dnat-target $NF -t nat -A PREROUTING -i $DST_IF -s $DST -j mark --mark-set $MARK --mark-target CONTINUE $NF -t nat -A PREROUTING -i $DST_IF -s $DST -j dnat --to-dst $SRC --dnat-target ACCEPT -exit - # Clean traffic control $TC qdisc delete dev $DST_IF root || true @@ -86,7 +82,7 @@ if (( $REVERSE )); then echo -e " $NETEM_REV" fi -if [ -n $DEBUG ]; then +if [ -n "$DEBUG" ]; then if [ "$SRC_IF" == "$DST_IF" ]; then IFNS="$SRC_IF" else @@ -95,7 +91,7 @@ if [ -n $DEBUG ]; then for inf in $IFNS; do for cmd in qdisc filter class; do - echo -e "\nTC ==> $if: $cmd" + echo -e "\nTC ==> $inf: $cmd" tc -d -p $cmd show dev $inf done done From d6ef2b7cbfa9b2e5507b126e80e25bfa639c3d8f Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:29:35 +0200 Subject: [PATCH 19/84] fix(tools): Include .h headers in format-all.sh glob The pattern '.h' lacked the leading wildcard, so plain C headers were never selected for clang-format. Use '*.h'. Signed-off-by: Steffen Vogel --- tools/format-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/format-all.sh b/tools/format-all.sh index 0d90f377f..9c16d7ad0 100755 --- a/tools/format-all.sh +++ b/tools/format-all.sh @@ -6,5 +6,5 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 -git ls-files -c -z -- "*.c" ".h" "*.hpp" "*.cpp" ":!:fpga/thirdparty" |\ +git ls-files -c -z -- "*.c" "*.h" "*.hpp" "*.cpp" ":!:fpga/thirdparty" |\ xargs -0 clang-format --verbose -i From 0a6fde8316fa827896f50c8e0d7fa03861055b77 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:29:58 +0200 Subject: [PATCH 20/84] fix(tools): Return explicit success and fix exit code in pre-commit hook - format_file() now returns 0 explicitly so a well-formatted (or non-existent) file is not miscounted as 'reformatted'. - Quote file paths. - Use exit 1 instead of exit -1 (255). Signed-off-by: Steffen Vogel --- tools/git-pre-commit-hook.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/git-pre-commit-hook.sh b/tools/git-pre-commit-hook.sh index f6237b56a..fbfe8934c 100755 --- a/tools/git-pre-commit-hook.sh +++ b/tools/git-pre-commit-hook.sh @@ -8,12 +8,13 @@ format_file() { FILE="${1}" - if [ -f ${FILE} ]; then - if ! clang-format --Werror --dry-run ${FILE}; then - clang-format -i ${FILE} + if [ -f "${FILE}" ]; then + if ! clang-format --Werror --dry-run "${FILE}"; then + clang-format -i "${FILE}" return 1 fi fi + return 0 } case "${1}" in @@ -37,7 +38,7 @@ case "${1}" in if (( ${CHANGES} > 0 )); then echo "Formatting of ${CHANGES} files has been fixed. Please stage and commit again." - exit -1 + exit 1 fi ;; esac From ca26bc99f9186495edb7e9b00566f626747cb00c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:30:10 +0200 Subject: [PATCH 21/84] fix(tools): Quote $@ in villas-helper.sh wrapper Unquoted $@ word-splits arguments containing spaces. Use "$@". Signed-off-by: Steffen Vogel --- tools/villas-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/villas-helper.sh b/tools/villas-helper.sh index bd1867e5d..a9b781659 100755 --- a/tools/villas-helper.sh +++ b/tools/villas-helper.sh @@ -35,5 +35,5 @@ function colorize() { function villas() { VILLAS_LOG_PREFIX=${VILLAS_LOG_PREFIX:-$(colorize "[$1-$((${RANDOM} % 100))} ")} \ - command villas $@ + command villas "$@" } From e05fccb644f7552bb39fc8b8a4fa12b0ac954188 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:30:36 +0200 Subject: [PATCH 22/84] fix(tools): Port villas-api.sh to the VILLASnode API v2 The script targeted the legacy v1 relay API (http://localhost:80/api/v1) and used the old action/id/request POST envelope. The node mounts its API at /api/v2 and uses plain REST endpoints. Update the default endpoint to http://localhost:8080/api/v2 and issue proper GET/POST requests against /{action}. Signed-off-by: Steffen Vogel --- tools/villas-api.sh | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/tools/villas-api.sh b/tools/villas-api.sh index 82c9543ac..20a5f1623 100755 --- a/tools/villas-api.sh +++ b/tools/villas-api.sh @@ -21,13 +21,25 @@ fi ACTION=$1 REQUEST=${2:-\{\}} -ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1) -ENDPOINT=${ENDPOINT:-http://localhost:80/api/v1} +ENDPOINT=${ENDPOINT:-http://localhost:8080/api/v2} -echo "Issuing API request: action=${ACTION}, id=${ID}, request=${REQUEST}, endpoint=${ENDPOINT}" +# GET actions have no body; actions carrying a request body use POST +case "${ACTION}" in + status|capabilities|config|nodes|paths) + METHOD=GET + ;; + *) + METHOD=POST + ;; +esac -curl -s -X POST --data "{ - \"action\" : \"${ACTION}\", - \"id\": \"${ID}\", - \"request\": ${REQUEST} -}" ${ENDPOINT} | jq . +echo "Issuing API request: ${METHOD} ${ENDPOINT}/${ACTION}, request=${REQUEST}" + +if [ "${METHOD}" = "GET" ]; then + curl -s "${ENDPOINT}/${ACTION}" | jq . +else + curl -s -X POST \ + -H "Content-Type: application/json" \ + --data "${REQUEST}" \ + "${ENDPOINT}/${ACTION}" | jq . +fi From baccd34a821d387f5458cc7fbd10dcc7b8d68358 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:30:52 +0200 Subject: [PATCH 23/84] fix(shmem-client): Show required RNAME argument in usage line The usage string omitted the mandatory RNAME argument even though the program requires exactly 3 arguments (argc != 4 check) and documents RNAME in the argument list. Signed-off-by: Steffen Vogel --- clients/shmem/villas-shmem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/shmem/villas-shmem.cpp b/clients/shmem/villas-shmem.cpp index a39d975fa..f76ca4c3d 100644 --- a/clients/shmem/villas-shmem.cpp +++ b/clients/shmem/villas-shmem.cpp @@ -36,7 +36,7 @@ class Shmem : public Tool { void usage() override { std::cout - << "Usage: villas-test-shmem WNAME VECTORIZE" << std::endl + << "Usage: villas-test-shmem WNAME RNAME VECTORIZE" << std::endl << " WNAME name of the shared memory object for the output queue" << std::endl << " RNAME name of the shared memory object for the input queue" From 2aea17242e237e48be389422323f4f524609002f Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:31:12 +0200 Subject: [PATCH 24/84] fix(packaging): Report correct parameter and fix typos in deps.sh - should_build() printed '$2' (use) instead of the offending '$3' (requirement) in its error message. - Fix 'dependendency' and "wan't" typos. Signed-off-by: Steffen Vogel --- packaging/deps.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/deps.sh b/packaging/deps.sh index d3270a27a..c11ab556a 100644 --- a/packaging/deps.sh +++ b/packaging/deps.sh @@ -23,7 +23,7 @@ should_build() { optional) ;; required) ;; *) - echo >&2 "Error: invalid parameter '$2' for should_build. should be one of 'optional' and 'required', default is 'optional'" + echo >&2 "Error: invalid parameter '$3' for should_build. should be one of 'optional' and 'required', default is 'optional'" exit 1 ;; esac @@ -31,7 +31,7 @@ should_build() { local deps="${@:4}" if [[ -n "${DEPS_SCAN+x}" ]]; then - echo "${requirement} dependendency ${id} should be installed ${use}." + echo "${requirement} dependency ${id} should be installed ${use}." [[ -n "${deps[*]}" ]] && echo " transitive dependencies: ${deps}" echo return 1 @@ -45,7 +45,7 @@ should_build() { if [[ -z "${DEPS_NONINTERACTIVE+x}" ]] && [[ -t 1 ]]; then echo - read -p "Do you wan't to install '${id}' into '${PREFIX}'? This is used ${use}. (y/N) " + read -p "Do you want to install '${id}' into '${PREFIX}'? This is used ${use}. (y/N) " case "${REPLY}" in y | Y) echo "Installing '${id}'" From 9d30eb41de8d468d635d1c4334f2c779141a2c82 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:31:32 +0200 Subject: [PATCH 25/84] fix(lua): Correct SampleFlags bit-shift comments in test hook The flag comments were off by one (e.g. value 1 labelled '(1 << 1)') and NEW_SIMULATION (131072) was labelled '(1 << 16)' (it's 1 << 17) and duplicated NEW_FRAME's description. Signed-off-by: Steffen Vogel --- lua/hooks/test.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/hooks/test.lua b/lua/hooks/test.lua index 9a1fcd765..766c8dc0a 100644 --- a/lua/hooks/test.lua +++ b/lua/hooks/test.lua @@ -15,14 +15,14 @@ Reason = { } SampleFlags = { - HAS_TS_ORIGIN = 1, -- "(1 << 1)" Include origin timestamp in output. - HAS_TS_RECEIVED = 2, -- "(1 << 2)" Include receive timestamp in output. - HAS_OFFSET = 4, -- "(1 << 3)" Include offset (received - origin timestamp) in output. - HAS_SEQUENCE = 8, -- "(1 << 4)" Include sequence number in output. - HAS_DATA = 16, -- "(1 << 5)" Include values in output. - - NEW_FRAME = 65536, -- "(1 << 16)" This sample is the first of a new simulation case - NEW_SIMULATION = 131072, -- "(1 << 16)" This sample is the first of a new simulation case + HAS_TS_ORIGIN = 1, -- "(1 << 0)" Include origin timestamp in output. + HAS_TS_RECEIVED = 2, -- "(1 << 1)" Include receive timestamp in output. + HAS_OFFSET = 4, -- "(1 << 2)" Include offset (received - origin timestamp) in output. + HAS_SEQUENCE = 8, -- "(1 << 3)" Include sequence number in output. + HAS_DATA = 16, -- "(1 << 4)" Include values in output. + + NEW_FRAME = 65536, -- "(1 << 16)" This sample is the first of a new frame + NEW_SIMULATION = 131072, -- "(1 << 17)" This sample is the first of a new simulation case ALL = 2147483647, -- "INT_MAX" Enable all output options. } From bd87717716a1526ba76c23ffdb077b8ef58b820e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:32:12 +0200 Subject: [PATCH 26/84] fix(tools): Correct comment typos, author email and whitelist in hwdef-parse.py - Fix 'Ignroing unkown' comment, 'VLNI' -> 'VLNV' and close the unterminated author email angle bracket. - Remove duplicated axis_register_slice whitelist entry. Signed-off-by: Steffen Vogel --- tools/hwdef-parse.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/hwdef-parse.py b/tools/hwdef-parse.py index b3ca7c7ec..bb5f8e9ce 100755 --- a/tools/hwdef-parse.py +++ b/tools/hwdef-parse.py @@ -6,7 +6,7 @@ Author: Daniel Krebs Author: Hatim Kanchwala Author: Pascal Bauer -Author: Niklas Eiling SPDX-FileCopyrightText: 2017-2022 Steffen Vogel SPDX-FileCopyrightText: 2017-2022 Daniel Krebs SPDX-FileCopyrightText: 2017-2022 Hatim Kanchwala @@ -63,7 +63,7 @@ ["acs.eonerc.rwth-aachen.de", "sysgen"], ] -# List of VLNI ids of AXI4-Stream infrastructure IP cores +# List of VLNV ids of AXI4-Stream infrastructure IP cores # which do not alter data see # PG085 (AXI4-Stream Infrastructure IP Suite v2.2) axi_converter_whitelist = [ @@ -71,7 +71,6 @@ ["xilinx.com", "ip", "axis_clock_converter"], ["xilinx.com", "ip", "axis_register_slice"], ["xilinx.com", "ip", "axis_dwidth_converter"], - ["xilinx.com", "ip", "axis_register_slice"], ["xilinx.com", "ip", "axis_data_fifo"], ["xilinx.com", "ip", "floating_point"], ["xilinx.com", "module_ref", "prepend_seqnum"], @@ -160,7 +159,7 @@ def sanitize_name(name): instance = module.get("INSTANCE") vlnv = module.get("VLNV") - # Ignroing unkown + # Ignoring IPs not present in the whitelist if not vlnv_match(vlnv, whitelist): continue From 25646a4cb7595f25eaf1795d2fb9cb0c1370c5c8 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:33:38 +0200 Subject: [PATCH 27/84] fix: Correct various spelling mistakes in comments and messages Fix typos across headers and sources: - desciplines/seperately -> disciplines/separately (tc, tc_netem) - seperated/inferface -> separated/interface (socket_addr) - occured/occurences -> occurred/occurrences (shmem, list, line, utils) - precission/destionations -> precision/destinations (utils) - Compatability -> Compatibility (compat, vfio_container, node_compat, web) - intialize/initilize/de-intialize -> initialize/.../de-initialize (villas-signal, villas-pipe, villas-hook, websocket) - 'The the' / 'for for' duplicate words (utils.hpp, kernel/if) Signed-off-by: Steffen Vogel --- common/include/villas/compat.hpp | 2 +- common/include/villas/kernel/vfio_container.hpp | 2 +- common/include/villas/list.hpp | 4 ++-- common/include/villas/utils.hpp | 6 +++--- common/lib/compat.cpp | 2 +- common/lib/kernel/vfio_container.cpp | 2 +- common/lib/utils.cpp | 2 +- include/villas/kernel/tc.hpp | 4 ++-- include/villas/kernel/tc_netem.hpp | 2 +- include/villas/node_compat.hpp | 2 +- include/villas/shmem.hpp | 2 +- include/villas/socket_addr.hpp | 2 +- include/villas/web.hpp | 2 +- lib/formats/line.cpp | 4 ++-- lib/kernel/if.cpp | 4 ++-- lib/nodes/websocket.cpp | 2 +- src/villas-hook.cpp | 2 +- src/villas-pipe.cpp | 2 +- src/villas-signal.cpp | 4 ++-- 19 files changed, 26 insertions(+), 26 deletions(-) diff --git a/common/include/villas/compat.hpp b/common/include/villas/compat.hpp index 757e46ae8..7b8e84a9a 100644 --- a/common/include/villas/compat.hpp +++ b/common/include/villas/compat.hpp @@ -1,4 +1,4 @@ -/* Compatability for different library versions. +/* Compatibility for different library versions. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/common/include/villas/kernel/vfio_container.hpp b/common/include/villas/kernel/vfio_container.hpp index d1a27c652..e9ef36b7d 100644 --- a/common/include/villas/kernel/vfio_container.hpp +++ b/common/include/villas/kernel/vfio_container.hpp @@ -24,7 +24,7 @@ namespace villas { namespace kernel { namespace vfio { -// Backwards compatability with older kernels +// Backwards compatibility with older kernels #ifdef VFIO_UPDATE_VADDR static constexpr size_t EXTENSION_SIZE = VFIO_UPDATE_VADDR + 1; #elif defined(VFIO_UNMAP_ALL) diff --git a/common/include/villas/list.hpp b/common/include/villas/list.hpp index d09447b00..48b972b49 100644 --- a/common/include/villas/list.hpp +++ b/common/include/villas/list.hpp @@ -64,7 +64,7 @@ void list_push(struct List *l, void *p); // Clear list. void list_clear(struct List *l); -// Remove all occurences of a list item. +// Remove all occurrences of a list item. void list_remove_all(struct List *l, void *p); int list_remove(struct List *l, size_t idx); @@ -74,7 +74,7 @@ int list_insert(struct List *l, size_t idx, void *p); // Return the first element of the list for which cmp returns zero. void *list_search(struct List *l, cmp_cb_t cmp, const void *ctx); -// Returns the number of occurences for which cmp returns zero when called on all list elements. +// Returns the number of occurrences for which cmp returns zero when called on all list elements. int list_count(struct List *l, cmp_cb_t cmp, void *ctx); // Return 0 if list contains pointer p. diff --git a/common/include/villas/utils.hpp b/common/include/villas/utils.hpp index 0919013bf..7807f29ff 100644 --- a/common/include/villas/utils.hpp +++ b/common/include/villas/utils.hpp @@ -66,18 +66,18 @@ char *decolor(char *str); // @return Normal variate random variable (Gaussian) double boxMuller(float m, float s); -// Double precission uniform random variable +// Double precision uniform random variable double randf(); // Concat formatted string to an existing string. // // This function uses realloc() to resize the destination. -// Please make sure to only on dynamic allocated destionations!!! +// Please make sure to only use it on dynamically allocated destinations!!! // // @param dest A pointer to a malloc() allocated memory region // @param fmt A format string like for printf() // @param ... Optional parameters like for printf() -// @retval The the new value of the dest buffer. +// @retval The new value of the dest buffer. char *strcatf(char **dest, const char *fmt, ...) __attribute__((format(printf, 2, 3))); diff --git a/common/lib/compat.cpp b/common/lib/compat.cpp index 1197643b0..8a0b391d0 100644 --- a/common/lib/compat.cpp +++ b/common/lib/compat.cpp @@ -1,4 +1,4 @@ -/* Compatability for different library versions. +/* Compatibility for different library versions. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/common/lib/kernel/vfio_container.cpp b/common/lib/kernel/vfio_container.cpp index e329443e4..989759dd9 100644 --- a/common/lib/kernel/vfio_container.cpp +++ b/common/lib/kernel/vfio_container.cpp @@ -57,7 +57,7 @@ static std::array construct_vfio_extension_str() { ret[VFIO_SPAPR_TCE_v2_IOMMU] = "SPAPR TCE v2"; // cppcheck-suppress containerOutOfBounds ret[VFIO_NOIOMMU_IOMMU] = "No IOMMU"; -// Backwards compatability with older kernels +// Backwards compatibility with older kernels #ifdef VFIO_UNMAP_ALL ret[VFIO_UNMAP_ALL] = "Unmap all"; #endif diff --git a/common/lib/utils.cpp b/common/lib/utils.cpp index 18120d227..e45f816e4 100644 --- a/common/lib/utils.cpp +++ b/common/lib/utils.cpp @@ -159,7 +159,7 @@ char *decolor(char *str) { } void killme(int sig) { - // Send only to main thread in case the ID was initilized by signalsInit() + // Send only to main thread in case the ID was initialized by signalsInit() if (main_thread) pthread_kill(main_thread, sig); else diff --git a/include/villas/kernel/tc.hpp b/include/villas/kernel/tc.hpp index 51de653d3..5dd8266bf 100644 --- a/include/villas/kernel/tc.hpp +++ b/include/villas/kernel/tc.hpp @@ -1,9 +1,9 @@ -/* Setup interface queuing desciplines for network emulation. +/* Setup interface queuing disciplines for network emulation. * * We use the firewall mark to apply individual netem qdiscs * per node. Every node uses an own BSD socket. * By using so SO_MARK socket option (see socket(7)) - * we can classify traffic originating from a node seperately. + * we can classify traffic originating from a node separately. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/include/villas/kernel/tc_netem.hpp b/include/villas/kernel/tc_netem.hpp index f2368bb5a..2e7006765 100644 --- a/include/villas/kernel/tc_netem.hpp +++ b/include/villas/kernel/tc_netem.hpp @@ -3,7 +3,7 @@ * We use the firewall mark to apply individual netem qdiscs * per node. Every node uses an own BSD socket. * By using so SO_MARK socket option (see socket(7)) - * we can classify traffic originating from a node seperately. + * we can classify traffic originating from a node separately. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/include/villas/node_compat.hpp b/include/villas/node_compat.hpp index caa5039e8..0b9f5de57 100644 --- a/include/villas/node_compat.hpp +++ b/include/villas/node_compat.hpp @@ -1,4 +1,4 @@ -/* Node compatability layer for C++. +/* Node compatibility layer for C++. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/include/villas/shmem.hpp b/include/villas/shmem.hpp index 17119deeb..3be6fe15f 100644 --- a/include/villas/shmem.hpp +++ b/include/villas/shmem.hpp @@ -56,7 +56,7 @@ struct ShmemInterface { * calls will be written to this pointer. * @param[in] conf Configuration parameters for the output queue. * @retval 0 The objects were opened and initialized successfully. - * @retval <0 An error occured; errno is set accordingly. + * @retval <0 An error occurred; errno is set accordingly. */ int shmem_int_open(const char *wname, const char *rname, struct ShmemInterface *shm, struct ShmemConfig *conf); diff --git a/include/villas/socket_addr.hpp b/include/villas/socket_addr.hpp index d648cf64b..8dd83bc90 100644 --- a/include/villas/socket_addr.hpp +++ b/include/villas/socket_addr.hpp @@ -40,7 +40,7 @@ enum class SocketLayer { ETH, IP, UDP, UNIX, TCP_CLIENT, TCP_SERVER }; /* Generate printable socket address depending on the address family * * A IPv4 address is formatted as dotted decimals followed by the port/protocol number - * A link layer address is formatted in hexadecimals digits seperated by colons and the inferface name + * A link layer address is formatted in hexadecimals digits separated by colons and the interface name * * @param sa A pointer to the socket address. * @return The buffer containing the textual representation of the address. The caller is responsible to free() this buffer! diff --git a/include/villas/web.hpp b/include/villas/web.hpp index 6fd649d72..894feb1e7 100644 --- a/include/villas/web.hpp +++ b/include/villas/web.hpp @@ -67,7 +67,7 @@ class Web final { Api *getApi() { return api; } - // for C-compatability + // for C-compatibility lws_context *getContext() { return context; } lws_vhost *getVHost() { return vhost; } diff --git a/lib/formats/line.cpp b/lib/formats/line.cpp index 1e15715a8..b4af854d2 100644 --- a/lib/formats/line.cpp +++ b/lib/formats/line.cpp @@ -92,7 +92,7 @@ int LineFormat::scan(FILE *f, struct Sample *const smps[], unsigned cnt) { if (!first_line_skipped) { bytes = getdelim(&in.buffer, &in.buflen, delimiter, f); if (bytes < 0) - return -1; // An error or eof occured + return -1; // An error or EOF occurred first_line_skipped = true; } @@ -107,7 +107,7 @@ int LineFormat::scan(FILE *f, struct Sample *const smps[], unsigned cnt) { if (feof(f)) break; else if (bytes < 0) - return -1; // An error or eof occured + return -1; // An error or EOF occurred // Skip whitespaces, empty and comment lines for (ptr = in.buffer; isspace(*ptr); ptr++) diff --git a/lib/kernel/if.cpp b/lib/kernel/if.cpp index 71ae1a9d5..8f7e6ceb9 100644 --- a/lib/kernel/if.cpp +++ b/lib/kernel/if.cpp @@ -183,7 +183,7 @@ int Interface::setAffinity(int affinity) { if (file) { if (fprintf(file, "%8lx", (unsigned long)cset_pin) < 0) throw SystemError( - "Failed to set affinity for for IRQ {} on interface '{}'", irq, + "Failed to set affinity for IRQ {} on interface '{}'", irq, getName()); fclose(file); @@ -192,7 +192,7 @@ int Interface::setAffinity(int affinity) { (std::string)cset_pin); } else throw SystemError( - "Failed to set affinity for for IRQ {} on interface '{}'", irq, + "Failed to set affinity for IRQ {} on interface '{}'", irq, getName()); } diff --git a/lib/nodes/websocket.cpp b/lib/nodes/websocket.cpp index 0ca1f5908..bf6b78bb5 100644 --- a/lib/nodes/websocket.cpp +++ b/lib/nodes/websocket.cpp @@ -206,7 +206,7 @@ int villas::node::websocket_protocol_cb(struct lws *wsi, websocket_connection_close(c, wsi, LWS_CLOSE_STATUS_POLICY_VIOLATION, "Internal error"); c->node->logger->warn( - "Failed to intialize WebSocket connection: reason={}", ret); + "Failed to initialize WebSocket connection: reason={}", ret); return -1; } diff --git a/src/villas-hook.cpp b/src/villas-hook.cpp index 24e33d33f..807e8577e 100644 --- a/src/villas-hook.cpp +++ b/src/villas-hook.cpp @@ -199,7 +199,7 @@ class Hook : public Tool { ret = pool_init(&p, 10 * cnt, SAMPLE_LENGTH(DEFAULT_SAMPLE_LENGTH)); if (ret) - throw RuntimeError("Failed to initilize memory pool"); + throw RuntimeError("Failed to initialize memory pool"); // Initialize IO struct desc { diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index ca800d7a5..53a6477d9 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -447,7 +447,7 @@ class Pipe : public Tool { ret = node->getFactory()->start(&sn); if (ret) - throw RuntimeError("Failed to intialize node type {}: reason={}", + throw RuntimeError("Failed to initialize node type {}: reason={}, node->getFactory()->getName(), ret); sn.startInterfaces(); diff --git a/src/villas-signal.cpp b/src/villas-signal.cpp index f5161cf73..c5096bab5 100644 --- a/src/villas-signal.cpp +++ b/src/villas-signal.cpp @@ -241,7 +241,7 @@ class Signal : public Tool { ret = node->getFactory()->start(nullptr); if (ret) - throw RuntimeError("Failed to intialize node type {}: reason={}", + throw RuntimeError("Failed to initialize node type {}: reason={}", node->getFactory()->getName(), ret); ret = node->check(); @@ -295,7 +295,7 @@ class Signal : public Tool { ret = node->getFactory()->stop(); if (ret) - throw RuntimeError("Failed to de-intialize node type {}: reason={}", + throw RuntimeError("Failed to de-initialize node type {}: reason={}", node->getFactory()->getName(), ret); delete node; From 4da29ffe8e5f8f43524b266c37bafab6503b72ef Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:33:52 +0200 Subject: [PATCH 28/84] fix: Correct spelling mistakes in infiniband node and ip_device - substract(ion)/substracted -> subtract(ion)/subtracted - succesfully -> successfully - Unrealiable -> Unreliable - 'adress in hex' -> 'address in hex' Signed-off-by: Steffen Vogel --- common/lib/kernel/devices/ip_device.cpp | 2 +- include/villas/nodes/infiniband.hpp | 4 ++-- lib/nodes/infiniband.cpp | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/lib/kernel/devices/ip_device.cpp b/common/lib/kernel/devices/ip_device.cpp index af6612625..6a8c00009 100644 --- a/common/lib/kernel/devices/ip_device.cpp +++ b/common/lib/kernel/devices/ip_device.cpp @@ -19,7 +19,7 @@ using villas::kernel::devices::IpDevice; IpDevice IpDevice::from(const fs::path unsafe_path) { if (!is_path_valid(unsafe_path)) throw RuntimeError( - "Path {} failed validation as IpDevicePath [adress in hex].[name] ", + "Path {} failed validation as IpDevicePath [address in hex].[name] ", unsafe_path.string()); return IpDevice(unsafe_path); } diff --git a/include/villas/nodes/infiniband.hpp b/include/villas/nodes/infiniband.hpp index b21c76b44..4935c39fb 100644 --- a/include/villas/nodes/infiniband.hpp +++ b/include/villas/nodes/infiniband.hpp @@ -76,11 +76,11 @@ struct infiniband { // Counter to keep track of available recv. WRs unsigned available_recv_wrs; - /* Fixed number to substract from min. number available + /* Fixed number to subtract from min. number available * WRs in receive queue */ unsigned buffer_subtraction; - // Unrealiable connectionless data + // Unreliable connectionless data struct ud_s { ::rdma_ud_param ud; ::ibv_ah *ah; diff --git a/lib/nodes/infiniband.cpp b/lib/nodes/infiniband.cpp index 65f973a4f..c1ce59fef 100644 --- a/lib/nodes/infiniband.cpp +++ b/lib/nodes/infiniband.cpp @@ -320,14 +320,14 @@ int villas::node::ib_parse(NodeCompat *n, json_t *json) { int villas::node::ib_check(NodeCompat *n) { auto *ib = n->getData(); - // Check if read substraction makes sense + // Check if read subtraction makes sense if (ib->conn.buffer_subtraction < 2 * n->in.vectorize) throw RuntimeError( - "The buffer substraction value must be bigger than 2 * in.vectorize"); + "The buffer subtraction value must be bigger than 2 * in.vectorize"); if (ib->conn.buffer_subtraction >= ib->qp_init.cap.max_recv_wr - n->in.vectorize) - throw RuntimeError("The buffer substraction value cannot be bigger than " + throw RuntimeError("The buffer subtraction value cannot be bigger than " "in.max_wrs - in.vectorize"); // Check if the set value is a power of 2, and warn the user if this is not the case @@ -644,7 +644,7 @@ int villas::node::ib_start(NodeCompat *n) { } /* Several events should occur on the event channel, to make - * sure the nodes are succesfully connected. + * sure the nodes are successfully connected. */ n->logger->debug("Starting to monitor events on rdma_cm_id"); @@ -829,7 +829,7 @@ int villas::node::ib_read(NodeCompat *n, struct Sample *const smps[], throw RuntimeError("Was unable to post receive WR: {}, bad WR ID: {:#x}", ret, bad_wr->wr_id); - n->logger->debug("Succesfully posted receive Work Requests"); + n->logger->debug("Successfully posted receive Work Requests"); // Doesn't start if wcs == 0 for (int j = 0; j < wcs; j++) { @@ -844,9 +844,9 @@ int villas::node::ib_read(NodeCompat *n, struct Sample *const smps[], n->logger->warn("Work Completion status was not IBV_WC_SUCCESS: {}", (int)wc[j].status); - /* 32 byte of meta data is always transferred. We should substract it. + /* 32 byte of meta data is always transferred. We should subtract it. * Furthermore, in case of an unreliable connection, a 40 byte - * global routing header is transferred. This should be substracted as well. + * global routing header is transferred. This should be subtracted as well. */ int correction = (ib->conn.port_space == RDMA_PS_UDP) ? META_GRH_SIZE : META_SIZE; From 2402e3815ac3a6cd83fca2061e6f78dfdde44c24 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:34:04 +0200 Subject: [PATCH 29/84] fix: Correct 'snd' -> 'and' in file header comments Signed-off-by: Steffen Vogel --- src/villas-hook.cpp | 2 +- src/villas-pipe.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/villas-hook.cpp b/src/villas-hook.cpp index 807e8577e..79e743036 100644 --- a/src/villas-hook.cpp +++ b/src/villas-hook.cpp @@ -1,4 +1,4 @@ -/* Receive messages from server snd print them on stdout. +/* Receive messages from server and print them on stdout. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index 53a6477d9..ab4cb1f76 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -1,4 +1,4 @@ -/* Receive messages from server snd print them on stdout. +/* Receive messages from server and print them on stdout. * * Author: Steffen Vogel * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University From 28003dcdfe59cff9640d7218b029cdde2d449e9a Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:35:30 +0200 Subject: [PATCH 30/84] fix(tools): Correct spelling in integration-tests.sh output Signed-off-by: Steffen Vogel --- tools/integration-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/integration-tests.sh b/tools/integration-tests.sh index d1d531f1f..b267a9459 100755 --- a/tools/integration-tests.sh +++ b/tools/integration-tests.sh @@ -59,7 +59,7 @@ export NUM_SAMPLES TESTS=${SRCDIR}/tests/integration/${FILTER}.sh -# Preperations +# Preparations mkdir -p ${LOGDIR} PASSED=0 @@ -105,7 +105,7 @@ for TEST in ${TESTS}; do SKIPPED=$((${SKIPPED} + 1)) ;; 124) - echo -e "\e[33m[TIME] \e[39m ${TESTNAME} (ran for more then ${TIMEOUT})" + echo -e "\e[33m[TIME] \e[39m ${TESTNAME} (ran for more than ${TIMEOUT})" TIMEDOUT=$((${TIMEDOUT} + 1)) FAILED=$((${FAILED} + 1)) ;; From e32b0a3d6001bcdce1a42659bebd82bfd3d7a6ac Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:35:57 +0200 Subject: [PATCH 31/84] fix: Remove duplicated 'the' in config example and OpenAPI descriptions Signed-off-by: Steffen Vogel --- doc/openapi/components/schemas/config/hooks/pmu_dft.yaml | 2 +- doc/openapi/components/schemas/config/path.yaml | 4 ++-- etc/examples/nodes/file.conf | 2 +- include/villas/node/config.hpp.in | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/openapi/components/schemas/config/hooks/pmu_dft.yaml b/doc/openapi/components/schemas/config/hooks/pmu_dft.yaml index 5ffb574f2..d79bcc8fd 100644 --- a/doc/openapi/components/schemas/config/hooks/pmu_dft.yaml +++ b/doc/openapi/components/schemas/config/hooks/pmu_dft.yaml @@ -84,7 +84,7 @@ allOf: - center - right default: center - description: The timestamp alignment in respect to the the window. + description: The timestamp alignment in respect to the window. phase_offset: type: number default: 0.0 diff --git a/doc/openapi/components/schemas/config/path.yaml b/doc/openapi/components/schemas/config/path.yaml index 783e17897..c57f9bb25 100644 --- a/doc/openapi/components/schemas/config/path.yaml +++ b/doc/openapi/components/schemas/config/path.yaml @@ -64,7 +64,7 @@ properties: mask: description: | - This setting allows masking the the input nodes which can trigger the path. + This setting allows masking the input nodes which can trigger the path. See also `mode` setting. @@ -107,7 +107,7 @@ properties: A boolean flag which enables the poll-based mode for reading samples from multiple path sources. **Note:** This is an advanced setting. - Most users should use the the default value which will always do the right thing based on the number and type of input nodes for this path. + Most users should use the default value which will always do the right thing based on the number and type of input nodes for this path. type: boolean diff --git a/etc/examples/nodes/file.conf b/etc/examples/nodes/file.conf index 6a5c2ab42..a68522371 100644 --- a/etc/examples/nodes/file.conf +++ b/etc/examples/nodes/file.conf @@ -5,7 +5,7 @@ nodes = { file_node = { type = "file" - # These options specify the URI where the the files are stored + # These options specify the URI where the files are stored # The URI accepts all format tokens of (see strftime(3)) uri = "logs/input.log" # uri = "logs/output_%F_%T.log" diff --git a/include/villas/node/config.hpp.in b/include/villas/node/config.hpp.in index 2ea3cb756..0fd3b4f5d 100644 --- a/include/villas/node/config.hpp.in +++ b/include/villas/node/config.hpp.in @@ -18,7 +18,7 @@ #define MAX_SAMPLE_LENGTH 512u #define DEFAULT_FORMAT_BUFFER_LENGTH 4096u -/* Number of hugepages which are requested from the the kernel. +/* Number of hugepages which are requested from the kernel. * @see https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt */ #define DEFAULT_NR_HUGEPAGES 100 From b34f3b5199f99d41c91adcaa56fb2af7f9260e0d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 7 Aug 2026 23:50:45 +0200 Subject: [PATCH 32/84] fix(villas-pipe): Add missing closing quote in RuntimeError format string The string literal in the node-type start error path was missing its terminating quote and the closing parenthesis of the RuntimeError call, breaking compilation. Close the string and the call. Signed-off-by: Steffen Vogel --- src/villas-pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index ab4cb1f76..ef293b32a 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -447,7 +447,7 @@ class Pipe : public Tool { ret = node->getFactory()->start(&sn); if (ret) - throw RuntimeError("Failed to initialize node type {}: reason={}, + throw RuntimeError("Failed to initialize node type {}: reason={}", node->getFactory()->getName(), ret); sn.startInterfaces(); From 7668df349459921aa593b9c4bf809d7cc572ab9e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 00:11:24 +0200 Subject: [PATCH 33/84] fix: Correct spelling in plugin descriptions and CLI help These strings surface in 'villas node -h' and the generated usage docs: - amqp: 'Protoocl' -> 'Protocol' - example: 'for staring' -> 'for starting' - temper: 'An temper for staring' -> 'A template for starting' - villas-test-config: 'plausability' -> 'plausibility' Signed-off-by: Steffen Vogel --- lib/nodes/amqp.cpp | 2 +- lib/nodes/example.cpp | 2 +- lib/nodes/temper.cpp | 2 +- src/villas-test-config.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nodes/amqp.cpp b/lib/nodes/amqp.cpp index 07da7a5a6..4eb7df2d1 100644 --- a/lib/nodes/amqp.cpp +++ b/lib/nodes/amqp.cpp @@ -398,7 +398,7 @@ static NodeCompatType p; __attribute__((constructor(110))) static void register_plugin() { p.name = "amqp"; - p.description = "Advanced Message Queueing Protoocl (rabbitmq-c)"; + p.description = "Advanced Message Queueing Protocol (rabbitmq-c)"; p.vectorize = 0; p.size = sizeof(struct amqp); p.init = amqp_init; diff --git a/lib/nodes/example.cpp b/lib/nodes/example.cpp index 579d659e4..670c3b10d 100644 --- a/lib/nodes/example.cpp +++ b/lib/nodes/example.cpp @@ -165,7 +165,7 @@ class ExampleNode : public Node { // Register node static char n[] = "example"; -static char d[] = "An example for staring new node-type implementations"; +static char d[] = "An example for starting new node-type implementations"; static NodePlugin Date: Sat, 8 Aug 2026 00:48:04 +0200 Subject: [PATCH 34/84] fix(test_rtt): Correct inverted strcmp logic and max-mode in parseMode Two bugs in parseMode(): - strcmp() returns 0 on match, but the branches tested 'if (strcmp(...))' (truthy on mismatch), so the intended mode was never selected. - The 'max' branch returned Mode::MIN instead of Mode::MAX. Use '== 0' comparisons and return Mode::MAX for 'max'. Signed-off-by: Steffen Vogel --- lib/nodes/test_rtt.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/nodes/test_rtt.cpp b/lib/nodes/test_rtt.cpp index efa884330..2959ca6c1 100644 --- a/lib/nodes/test_rtt.cpp +++ b/lib/nodes/test_rtt.cpp @@ -116,17 +116,17 @@ int TestRTT::prepare() { } static enum TestRTT::Mode parseMode(const char *mode_str) { - if (strcmp(mode_str, "min")) + if (strcmp(mode_str, "min") == 0) return TestRTT::Mode::MIN; - else if (strcmp(mode_str, "max")) - return TestRTT::Mode::MIN; - else if (strcmp(mode_str, "stop_after_count")) + else if (strcmp(mode_str, "max") == 0) + return TestRTT::Mode::MAX; + else if (strcmp(mode_str, "stop_after_count") == 0) return TestRTT::Mode::STOP_COUNT; - else if (strcmp(mode_str, "stop_after_duration")) + else if (strcmp(mode_str, "stop_after_duration") == 0) return TestRTT::Mode::STOP_DURATION; - else if (strcmp(mode_str, "at_least_count")) + else if (strcmp(mode_str, "at_least_count") == 0) return TestRTT::Mode::AT_LEAST_COUNT; - else if (strcmp(mode_str, "at_least_duration")) + else if (strcmp(mode_str, "at_least_duration") == 0) return TestRTT::Mode::AT_LEAST_DURATION; else return TestRTT::Mode::UNKNOWN; From 8d2d8cba5bf58a7ae774764a837745afcf89b91d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 00:48:31 +0200 Subject: [PATCH 35/84] fix(hooks): Read correctly-spelled start/end_frequency in pmu_dft The hook unpacked 'start_freqency'/'end_freqency' (missing the second 'u') while the OpenAPI schema and documentation use 'start_frequency'/ 'end_frequency', so documented configs were silently ignored. Read the correct keys and keep the misspelled ones as a backward-compatible alias. Signed-off-by: Steffen Vogel --- lib/hooks/pmu_dft.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/hooks/pmu_dft.cpp b/lib/hooks/pmu_dft.cpp index 37402e2cc..b307e49d2 100644 --- a/lib/hooks/pmu_dft.cpp +++ b/lib/hooks/pmu_dft.cpp @@ -253,8 +253,8 @@ class PmuDftHook : public MultiSignalHook { json, &err, 0, "{ s?: i, s?: F, s?: F, s?: F, s?: i, s?: i, s?: s, s?: s, s?: s, s?: " "i, s?: s, s?: b, s?: s, s?: F, s?: F, s?: F, s?: F}", - "sample_rate", &sampleRate, "start_freqency", &startFrequency, - "end_freqency", &endFreqency, "frequency_resolution", + "sample_rate", &sampleRate, "start_frequency", &startFrequency, + "end_frequency", &endFreqency, "frequency_resolution", &frequencyResolution, "dft_rate", &rate, "window_size_factor", &windowSizeFactor, "window_type", &windowTypeC, "padding_type", &paddingTypeC, "estimate_type", &estimateTypeC, "pps_index", &ppsIndex, @@ -265,6 +265,14 @@ class PmuDftHook : public MultiSignalHook { if (ret) throw ConfigError(json, err, "node-config-hook-dft"); + // Backward-compatibility: accept the previously misspelled keys. + json_t *json_start = json_object_get(json, "start_freqency"); + if (json_start) + startFrequency = json_number_value(json_start); + json_t *json_end = json_object_get(json, "end_freqency"); + if (json_end) + endFreqency = json_number_value(json_end); + windowSize = sampleRate * windowSizeFactor / (double)rate; logger->info( "Set windows size to {} samples which fits {} times the rate {}s", From 4630c7b33520921b7f2f5aa016155706b1d754b4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 00:49:05 +0200 Subject: [PATCH 36/84] fix(villas-signal): Enable and document -p, -w, -L, -H options The option handlers for -w (pulse width), -L (pulse low) and -H (pulse high) existed but were unreachable because the getopt string lacked those letters. Add them, document -p (phase, already accepted) and the pulse options in usage(). Signed-off-by: Steffen Vogel --- src/villas-signal.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/villas-signal.cpp b/src/villas-signal.cpp index c5096bab5..1eeeb4b3d 100644 --- a/src/villas-signal.cpp +++ b/src/villas-signal.cpp @@ -80,6 +80,13 @@ class Signal : public Tool { << std::endl << " -o OFF the DC bias" << std::endl << " -l NUM only send LIMIT messages and stop" << std::endl + << " -p FLT the phase of the signal" << std::endl + << " -w FLT the pulse width (for 'square'/'pulse' signals)" + << std::endl + << " -L FLT the low level (for 'square'/'pulse' signals)" + << std::endl + << " -H FLT the high level (for 'square'/'pulse' signals)" + << std::endl << std::endl; printCopyright(); @@ -105,7 +112,7 @@ class Signal : public Tool { // Parse optional command line arguments int c; char *endptr; - while ((c = getopt(argc, argv, "v:r:F:f:l:a:D:no:d:hVp:")) != -1) { + while ((c = getopt(argc, argv, "v:r:F:f:l:a:D:no:d:hVp:w:L:H:")) != -1) { switch (c) { case 'n': rt = 0; From 6a6bd66a3ac2c8f9b938df7f72cbcf68ced79922 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 00:49:31 +0200 Subject: [PATCH 37/84] fix(villas-test-config): Parse advertised -d debug-level option usage() documented '-d LVL' but the getopt string 'hcVD' had no 'd:', so the flag was rejected. Add 'd:' and set the log level. Signed-off-by: Steffen Vogel --- src/villas-test-config.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/villas-test-config.cpp b/src/villas-test-config.cpp index 6330a9b19..c1933fb07 100644 --- a/src/villas-test-config.cpp +++ b/src/villas-test-config.cpp @@ -61,12 +61,16 @@ class TestConfig : public Tool { void parse() override { int c; - while ((c = getopt(argc, argv, "hcVD")) != -1) { + while ((c = getopt(argc, argv, "hcVDd:")) != -1) { switch (c) { case 'c': check = true; break; + case 'd': + Log::getInstance().setLevel(optarg); + break; + case 'D': dump = true; break; From 564cd3ef749fcc877ed2f2ee173fb3e2e19899f9 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 09:51:26 +0200 Subject: [PATCH 38/84] fix(openapi): Add enabled and correct port default in http schema The http schema omitted the 'enabled' boolean that lib/web.cpp parses under JSON_STRICT (so setting it raised a ConfigError), and declared a default port of 80 when the actual default is 8080 for unprivileged users (80 only as root). Signed-off-by: Steffen Vogel --- doc/openapi/components/schemas/config/http.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/openapi/components/schemas/config/http.yaml b/doc/openapi/components/schemas/config/http.yaml index f8ecfd215..44c896f2f 100644 --- a/doc/openapi/components/schemas/config/http.yaml +++ b/doc/openapi/components/schemas/config/http.yaml @@ -4,12 +4,20 @@ --- type: object properties: + enabled: + type: boolean + default: true + title: Enable HTTP/WebSocket server + description: | + Whether the HTTP & WebSocket server listens on a port. + port: type: integer - default: 80 + default: 8080 title: Listening port description: | - The TCP port number on which HTTP & WebSocket server. + The TCP port number on which the HTTP & WebSocket server listens. + Defaults to 80 when running as root, otherwise 8080. ssl_cert: type: string From 6186e23b8b4da25d1bd2fc894a9b321a49d471ef Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 09:54:34 +0200 Subject: [PATCH 39/84] fix(openapi): Align zeromq and websocket schemas with parsed options - zeromq: add the 'pattern' option parsed by the code, and rename the curve key 'private_key' to the 'secret_key' the code actually reads. - websocket: add the 'wait_connected' boolean parsed by the code. Signed-off-by: Steffen Vogel --- .../components/schemas/config/nodes/websocket.yaml | 7 +++++++ .../components/schemas/config/nodes/zeromq.yaml | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/openapi/components/schemas/config/nodes/websocket.yaml b/doc/openapi/components/schemas/config/nodes/websocket.yaml index 236b1559e..1c74f92ad 100644 --- a/doc/openapi/components/schemas/config/nodes/websocket.yaml +++ b/doc/openapi/components/schemas/config/nodes/websocket.yaml @@ -29,5 +29,12 @@ allOf: format: uri description: A WebSocket URI + wait_connected: + type: boolean + default: true + description: | + Wait until all configured client connections in `destinations` are + established before finishing node startup. + - $ref: ../node_signals.yaml - $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/zeromq.yaml b/doc/openapi/components/schemas/config/nodes/zeromq.yaml index f263689be..a0cf9add5 100644 --- a/doc/openapi/components/schemas/config/nodes/zeromq.yaml +++ b/doc/openapi/components/schemas/config/nodes/zeromq.yaml @@ -14,6 +14,15 @@ allOf: - pubsub - radiodish + pattern: + type: string + enum: + - pubsub + - radiodish + default: pubsub + description: | + The ZeroMQ socket pattern to use. + publish: type: string format: uri @@ -49,10 +58,10 @@ allOf: description: | The public key of the server. - private_key: + secret_key: type: string description: | - The private key of the server. + The secret (private) key of the server. out: type: object From ed0330e4570be30930ff258363db320e0329e7eb Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 09:54:50 +0200 Subject: [PATCH 40/84] fix(examples): Correct spelling in redis and ngsi example comments - redis.conf: 'channel tp be used' -> 'channel to be used' - ngsi.conf: 'FIRWARE' -> 'FIWARE' Signed-off-by: Steffen Vogel --- etc/examples/nodes/ngsi.conf | 2 +- etc/examples/nodes/redis.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/examples/nodes/ngsi.conf b/etc/examples/nodes/ngsi.conf index ad367571c..edb85b52b 100644 --- a/etc/examples/nodes/ngsi.conf +++ b/etc/examples/nodes/ngsi.conf @@ -5,7 +5,7 @@ nodes = { ngsi_node = { type = "ngsi" - # The HTTP REST API endpoint of the FIRWARE context broker + # The HTTP REST API endpoint of the FIWARE context broker endpoint = "http://46.101.131.212:1026" # Add an 'Auth-Token' token header to each request diff --git a/etc/examples/nodes/redis.conf b/etc/examples/nodes/redis.conf index 2816de3cd..648a44737 100644 --- a/etc/examples/nodes/redis.conf +++ b/etc/examples/nodes/redis.conf @@ -12,7 +12,7 @@ nodes = { # The Redis key to be used for mode = 'key' or 'hash' (default is the node name) key = "my_key" - # The Redis channel tp be used for mode = 'channel' (default is the node name) + # The Redis channel to be used for mode = 'channel' (default is the node name) channel = "my_channel" # One of: From 63f6c156679e5f0bde7b5df30ead2ecd35126aa0 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 09:57:14 +0200 Subject: [PATCH 41/84] fix(examples): Use correct 'samples' option in skip_first example comment The commented-out alternative referenced 'sequence', but the hook parses the 'samples' key. Signed-off-by: Steffen Vogel --- etc/examples/hooks/skip_first.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/examples/hooks/skip_first.conf b/etc/examples/hooks/skip_first.conf index 8df3549fe..55e6c33f1 100644 --- a/etc/examples/hooks/skip_first.conf +++ b/etc/examples/hooks/skip_first.conf @@ -13,7 +13,7 @@ paths = ( type = "skip_first" seconds = 10 - # sequence = 10 + # samples = 10 } ) } From a9278cad9418c39e53639cde3d730b3956a7d277 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 22:34:12 +0200 Subject: [PATCH 42/84] fix: Correct spelling typos in comments and log messages Fix 'managment' -> 'management', 'transfering' -> 'transferring', and 'occured' -> 'occurred'. Signed-off-by: Steffen Vogel --- common/lib/memory.cpp | 2 +- common/lib/memory_manager.cpp | 2 +- include/villas/nodes/comedi.hpp | 2 +- lib/nodes/infiniband.cpp | 4 ++-- python/villas/node/test_formats.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/lib/memory.cpp b/common/lib/memory.cpp index 9750194b3..a9f60d96b 100644 --- a/common/lib/memory.cpp +++ b/common/lib/memory.cpp @@ -1,4 +1,4 @@ -/* Memory managment. +/* Memory management. * * Author: Daniel Krebs * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/common/lib/memory_manager.cpp b/common/lib/memory_manager.cpp index 904b228b3..1ea8d6d25 100644 --- a/common/lib/memory_manager.cpp +++ b/common/lib/memory_manager.cpp @@ -1,4 +1,4 @@ -/* Memory managment. +/* Memory management. * * Author: Daniel Krebs * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University diff --git a/include/villas/nodes/comedi.hpp b/include/villas/nodes/comedi.hpp index 81881c5d8..c1e263d51 100644 --- a/include/villas/nodes/comedi.hpp +++ b/include/villas/nodes/comedi.hpp @@ -34,7 +34,7 @@ struct comedi_direction { int sample_rate_hz; // Sample rate in Hz bool present; // Config present bool enabled; // Card is started successfully - bool running; // Card is actively transfering samples + bool running; // Card is actively transferring samples struct timespec started; // Timestamp when sampling started struct timespec last_debug; // Timestamp of last debug output size_t counter; // Number of villas samples transfered diff --git a/lib/nodes/infiniband.cpp b/lib/nodes/infiniband.cpp index c1ce59fef..ab56d3af9 100644 --- a/lib/nodes/infiniband.cpp +++ b/lib/nodes/infiniband.cpp @@ -834,7 +834,7 @@ int villas::node::ib_read(NodeCompat *n, struct Sample *const smps[], // Doesn't start if wcs == 0 for (int j = 0; j < wcs; j++) { if (!((wc[j].opcode & IBV_WC_RECV) && wc[j].status == IBV_WC_SUCCESS)) { - // Drop all values, we don't know where the error occured + // Drop all values, we don't know where the error occurred read_values = 0; } @@ -967,7 +967,7 @@ int villas::node::ib_write(NodeCompat *n, struct Sample *const smps[], * and prepare them to be released */ n->logger->debug( - "Bad WR occured with ID: {:#x} and S/G address: {:p}: {}", + "Bad WR occurred with ID: {:#x} and S/G address: {:p}: {}", bad_wr->wr_id, (void *)bad_wr->sg_list, ret); while (1) { diff --git a/python/villas/node/test_formats.py b/python/villas/node/test_formats.py index 366281a24..b422f40fe 100644 --- a/python/villas/node/test_formats.py +++ b/python/villas/node/test_formats.py @@ -6,7 +6,7 @@ from cmath import sqrt -from villas.node.formats import SignalList, VillasHuman, Protobuf +from villas.node.formats import Protobuf, SignalList, VillasHuman from villas.node.sample import Sample, Timestamp From eb0e75485114f8649a24016217e88dee3d79d638 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 22:34:47 +0200 Subject: [PATCH 43/84] fix(api): Remove duplicated 'with' in UUID error messages Signed-off-by: Steffen Vogel --- lib/api/requests/node.cpp | 2 +- lib/api/requests/path.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/requests/node.cpp b/lib/api/requests/node.cpp index 89fab17f9..be1fd7e43 100644 --- a/lib/api/requests/node.cpp +++ b/lib/api/requests/node.cpp @@ -25,6 +25,6 @@ void NodeRequest::prepare() { node = nodes.lookup(uuid); if (!node) throw Error::badRequest(json_pack("{ s: s }", "uuid", matches[1].c_str()), - "No node found with with matching UUID"); + "No node found with matching UUID"); } } diff --git a/lib/api/requests/path.cpp b/lib/api/requests/path.cpp index b3ed3c5d1..91322f37c 100644 --- a/lib/api/requests/path.cpp +++ b/lib/api/requests/path.cpp @@ -23,5 +23,5 @@ void PathRequest::prepare() { path = paths.lookup(uuid); if (!path) throw Error::badRequest(json_pack("{ s: s }", "uuid", matches[1].c_str()), - "No path found with with matching UUID"); + "No path found with matching UUID"); } From 5bc3a6479e6e520807a875e8a28fe7a3737ad74f Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 23:06:03 +0200 Subject: [PATCH 44/84] fix(hooks): Use correct ConfigError ID in moving-average hook The MovingAverageHook used the 'node-config-hook-rms' error ID (copy-paste from RMSHook). Use 'node-config-hook-ma' instead so configuration errors reference the correct documentation anchor. Signed-off-by: Steffen Vogel --- lib/hooks/ma.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hooks/ma.cpp b/lib/hooks/ma.cpp index fee09b7fc..1609d8929 100644 --- a/lib/hooks/ma.cpp +++ b/lib/hooks/ma.cpp @@ -57,7 +57,7 @@ class MovingAverageHook : public MultiSignalHook { ret = json_unpack_ex(json, &err, 0, "{ s?: i }", "window_size", &windowSize); if (ret) - throw ConfigError(json, err, "node-config-hook-rms"); + throw ConfigError(json, err, "node-config-hook-ma"); state = State::PARSED; } From 2d3f1a6a79cdd78f113497227ba65678d5756775 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 23:06:33 +0200 Subject: [PATCH 45/84] fix(hooks): Initialize optional json_unpack outputs in digest hook The optional 'mode' and 'algorithm' keys were unpacked into uninitialized pointers. When absent, jansson leaves these pointers untouched, so the subsequent 'if (algorithm_str)' read an indeterminate pointer (undefined behavior). Initialize them to nullptr. Signed-off-by: Steffen Vogel --- lib/hooks/digest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hooks/digest.cpp b/lib/hooks/digest.cpp index 4b81ae0c8..59295a7c8 100644 --- a/lib/hooks/digest.cpp +++ b/lib/hooks/digest.cpp @@ -193,8 +193,8 @@ class DigestHook : public Hook { Hook::parse(json); char const *uri_str; - char const *mode_str; - char const *algorithm_str; + char const *mode_str = nullptr; + char const *algorithm_str = nullptr; json_error_t err; int ret = From e65ecd9c41c4e3a20bf53f4fb6230134077aa96b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 8 Aug 2026 23:06:33 +0200 Subject: [PATCH 46/84] fix(hooks): Initialize optional 'mode' output in gate hook The optional 'mode' key was unpacked into an uninitialized pointer. When absent, jansson leaves the pointer untouched, so the subsequent 'if (mode_str)' read an indeterminate pointer (undefined behavior). Initialize it to nullptr. Signed-off-by: Steffen Vogel --- lib/hooks/gate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hooks/gate.cpp b/lib/hooks/gate.cpp index 265eac9ab..194b603a5 100644 --- a/lib/hooks/gate.cpp +++ b/lib/hooks/gate.cpp @@ -43,7 +43,7 @@ class GateHook : public SingleSignalHook { json_error_t err; - const char *mode_str; + const char *mode_str = nullptr; assert(state != State::STARTED); From a05849773efcada2beb20932930f181a79637a94 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 9 Aug 2026 14:23:46 +0200 Subject: [PATCH 47/84] fix(pre-commit): Update black-pre-commit-mirror to version 24.10.0 Signed-off-by: Steffen Vogel --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e5327e624..4b5e9272d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,18 +47,18 @@ repos: - id: editorconfig-checker alias: ec args: - - -disable-indent-size - - -exclude - - ^LICENSE$|^LICENSES/|\.ecf$ + - -disable-indent-size + - -exclude + - ^LICENSE$|^LICENSES/|\.ecf$ # Using this mirror lets us use mypyc-compiled black, which is about 2x faster - repo: https://github.com/psf/black-pre-commit-mirror - rev: "23.3.0" + rev: "24.10.0" hooks: - id: black-jupyter exclude: .*_pb2.pyi?$ args: - - --line-length=90 + - --line-length=90 - repo: https://github.com/pycqa/flake8 rev: "7.3.0" @@ -66,7 +66,7 @@ repos: - id: flake8 exclude: .*_pb2.pyi?$ args: - - --max-line-length=90 + - --max-line-length=90 - repo: https://github.com/markdownlint/markdownlint rev: "v0.13.0" From 48aa7fa24177e77e258a52e687d2a7cab1cf2ac1 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 9 Aug 2026 14:24:24 +0200 Subject: [PATCH 48/84] fix(style): Fix code formatting with clang-format Signed-off-by: Steffen Vogel --- lib/api/requests/capabilities.cpp | 3 +-- lib/kernel/if.cpp | 10 ++++------ lib/nodes/file.cpp | 11 +++++------ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/api/requests/capabilities.cpp b/lib/api/requests/capabilities.cpp index 211e1c9be..2d47f7780 100644 --- a/lib/api/requests/capabilities.cpp +++ b/lib/api/requests/capabilities.cpp @@ -35,8 +35,7 @@ class CapabilitiesRequest : public Request { // Register API request static char n[] = "capabilities"; static char r[] = "/capabilities"; -static char d[] = - "get capabilities and details about this VILLASnode instance"; +static char d[] = "get capabilities and details about this VILLASnode instance"; static RequestPlugin p; } // namespace api diff --git a/lib/kernel/if.cpp b/lib/kernel/if.cpp index 8f7e6ceb9..bf83dd472 100644 --- a/lib/kernel/if.cpp +++ b/lib/kernel/if.cpp @@ -182,18 +182,16 @@ int Interface::setAffinity(int affinity) { file = fopen(filename.c_str(), "w"); if (file) { if (fprintf(file, "%8lx", (unsigned long)cset_pin) < 0) - throw SystemError( - "Failed to set affinity for IRQ {} on interface '{}'", irq, - getName()); + throw SystemError("Failed to set affinity for IRQ {} on interface '{}'", + irq, getName()); fclose(file); logger->debug("Set affinity of IRQ {} to {} {}", irq, cset_pin.count() == 1 ? "core" : "cores", (std::string)cset_pin); } else - throw SystemError( - "Failed to set affinity for IRQ {} on interface '{}'", irq, - getName()); + throw SystemError("Failed to set affinity for IRQ {} on interface '{}'", + irq, getName()); } return 0; diff --git a/lib/nodes/file.cpp b/lib/nodes/file.cpp index a5cd365b7..391cea1d1 100644 --- a/lib/nodes/file.cpp +++ b/lib/nodes/file.cpp @@ -181,12 +181,11 @@ char *villas::node::file_print(NodeCompat *n) { break; } - strcatf( - &buf, - "uri=%s, out.flush=%s, in.skip=%d, in.eof=%s, in.epoch=%s, " - "in.epoch_value=%.2f", - f->uri ? f->uri : f->uri_tmpl, f->flush ? "yes" : "no", f->skip_lines, - eof_str, epoch_str, time_to_double(&f->epoch)); + strcatf(&buf, + "uri=%s, out.flush=%s, in.skip=%d, in.eof=%s, in.epoch=%s, " + "in.epoch_value=%.2f", + f->uri ? f->uri : f->uri_tmpl, f->flush ? "yes" : "no", f->skip_lines, + eof_str, epoch_str, time_to_double(&f->epoch)); if (f->rate) strcatf(&buf, ", in.rate=%.1f", f->rate); From 2ab1d8bbc0b256e9ad90ca524b9a703e9bcb6a13 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 7 Sep 2026 21:14:00 +0200 Subject: [PATCH 49/84] fix(style): Merge strings into same line Signed-off-by: Steffen Vogel --- lib/path.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/path.cpp b/lib/path.cpp index 353449005..e2f00242a 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -674,8 +674,7 @@ json_t *Path::toJson() const { json_t *json_path = json_pack( "{ s: s, s: s, s: s, s: b, s: b, s: b, s: b, s: b, s: b, s: i, s: o, s: " - "o, " - "s: o, s: o }", + "o, s: o, s: o }", "uuid", uuid::toString(uuid).c_str(), "state", stateToString(state).c_str(), "mode", mode == Mode::ANY ? "any" : "all", "enabled", enabled, "builtin", builtin, "reversed", reversed, From e4f2da2c81d9437b4fc70195cb5007359cbcc45b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 19:15:30 +0000 Subject: [PATCH 50/84] chore(master): Release 1.2.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 49 +++++++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- doc/package.json | 2 +- python/pyproject.toml | 2 +- 5 files changed, 53 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3f146397..41ea87d76 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.2.0" + ".": "1.2.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c7697a79..0e5b6778f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,54 @@ # Changelog +## [1.2.1](https://github.com/VILLASframework/node/compare/v1.2.0...v1.2.1) (2026-09-07) + + +### Bug Fixes + +* **api:** Correct capabilities request file and description spelling ([459822b](https://github.com/VILLASframework/node/commit/459822b6b079eb0ea364b25d19e0a7a18c09434f)) +* **api:** Remove duplicated 'with' in UUID error messages ([6e8f92d](https://github.com/VILLASframework/node/commit/6e8f92d413f438c95526a3af8dec089635926725)) +* **can:** Bound copy of interface name into ifr_name ([0378d0f](https://github.com/VILLASframework/node/commit/0378d0f8b3d057c93b1b80fd462d6467b8b0074e)) +* Correct 'snd' -> 'and' in file header comments ([57bd605](https://github.com/VILLASframework/node/commit/57bd6057b21eab92c18059e2daab8a1066e40e82)) +* Correct spelling in plugin descriptions and CLI help ([57c7b2c](https://github.com/VILLASframework/node/commit/57c7b2cf8d227924b3754396e19b43dc69c81fc6)) +* Correct spelling mistakes in infiniband node and ip_device ([469451e](https://github.com/VILLASframework/node/commit/469451e87f58c2eefbf8363e7d53ec35581b0b6f)) +* Correct spelling typos in comments and log messages ([6694153](https://github.com/VILLASframework/node/commit/6694153b59a602494a5e990d85f3d139f366d69b)) +* Correct various spelling mistakes in comments and messages ([37747aa](https://github.com/VILLASframework/node/commit/37747aa0f9832d895b3da4837e7bf4df0ada4e60)) +* **dumper:** Bound copy of socket path into sun_path ([d3d8b02](https://github.com/VILLASframework/node/commit/d3d8b02add6f6fcfea35131854bbddeed29ba7a6)) +* **examples:** Correct spelling in redis and ngsi example comments ([9ae85e0](https://github.com/VILLASframework/node/commit/9ae85e0c67d47273a78bfab80965b4a07072859f)) +* **examples:** Use correct 'samples' option in skip_first example comment ([787df6d](https://github.com/VILLASframework/node/commit/787df6d299000871820bf2dc854aedc0aa06c9f6)) +* **file:** Disambiguate duplicated in.epoch key in node details string ([f69fb22](https://github.com/VILLASframework/node/commit/f69fb2236e2ce75c95d6091a7c60b69dcfc9e659)) +* **hooks:** Initialize optional 'mode' output in gate hook ([f028397](https://github.com/VILLASframework/node/commit/f028397b6f6b97edc964d80f240a2c3e3f92e4c1)) +* **hooks:** Initialize optional json_unpack outputs in digest hook ([93b7e98](https://github.com/VILLASframework/node/commit/93b7e984445e1b962da0cf44c4ffe57748d8525f)) +* **hooks:** Read correctly-spelled start/end_frequency in pmu_dft ([1edf6fd](https://github.com/VILLASframework/node/commit/1edf6fd1b5340831d4c206b8b2efcd56e21d5930)) +* **hooks:** Use correct ConfigError ID in moving-average hook ([f2f41f9](https://github.com/VILLASframework/node/commit/f2f41f94e78f39f8e7c0bb2112f059cec1162dff)) +* **lua:** Correct SampleFlags bit-shift comments in test hook ([23619b0](https://github.com/VILLASframework/node/commit/23619b0acad19067de0123841c4ad61c46edc11c)) +* **openapi:** Add enabled and correct port default in http schema ([d48e590](https://github.com/VILLASframework/node/commit/d48e5907f5cf00cbe3adc9195c6b5d2d0f48ebd4)) +* **openapi:** Align zeromq and websocket schemas with parsed options ([8144e9f](https://github.com/VILLASframework/node/commit/8144e9f5fd0390ab8a600db2bb269881a38a6033)) +* **packaging:** Report correct parameter and fix typos in deps.sh ([ad17535](https://github.com/VILLASframework/node/commit/ad17535d15e733bb4d084f5d26130c98093733d6)) +* **path:** Add missing commas in json_pack format string ([52eaf23](https://github.com/VILLASframework/node/commit/52eaf2382ed6cfc1e793c5bb87446195a4d9910b)) +* **pre-commit:** Update black-pre-commit-mirror to version 24.10.0 ([2dc73ce](https://github.com/VILLASframework/node/commit/2dc73cec909759bf95adb8f03f321078c03b2938)) +* **python:** Assign stripped string in VillasHuman.loads() ([677b36c](https://github.com/VILLASframework/node/commit/677b36c313b350a68a5735a26687febb8500bd2d)) +* **python:** Avoid mutable default, init child, use self.config in Node ([d694fcc](https://github.com/VILLASframework/node/commit/d694fccc09ea41de76259e93e9999f51fcc6a5e7)) +* **python:** Only join started threads in communicate() ([0a52116](https://github.com/VILLASframework/node/commit/0a5211688e25d9597d8a77b710d0f685e439fe07)) +* Remove duplicated 'the' in config example and OpenAPI descriptions ([e0112b7](https://github.com/VILLASframework/node/commit/e0112b7c476f873c4ae5c82998e207f1f767d9a2)) +* **shmem-client:** Show required RNAME argument in usage line ([38a66d7](https://github.com/VILLASframework/node/commit/38a66d70797db7618389f205f89ec5fbe765bc61)) +* **style:** Fix code formatting with clang-format ([125786e](https://github.com/VILLASframework/node/commit/125786e6e63b96da0fd00631c1d0145680297be0)) +* **style:** Merge strings into same line ([c1c9fc5](https://github.com/VILLASframework/node/commit/c1c9fc58f96edb38b4d02c8410f334ffc83ee6e3)) +* **test_rtt:** Correct inverted strcmp logic and max-mode in parseMode ([1761f67](https://github.com/VILLASframework/node/commit/1761f673dc328008afca10e49b19f2e683fef069)) +* **tools:** Correct comment typos, author email and whitelist in hwdef-parse.py ([7f74351](https://github.com/VILLASframework/node/commit/7f743518d7c06f1d6f04f1074b2a3490bd79832e)) +* **tools:** Correct several issues in tc-netem.sh ([76e2ea7](https://github.com/VILLASframework/node/commit/76e2ea72da9c8c32f3431e5825d19ef268b889b6)) +* **tools:** Correct spelling in integration-tests.sh output ([d4f1a4a](https://github.com/VILLASframework/node/commit/d4f1a4aabc198b8e76660df771836bb78953323c)) +* **tools:** Include .h headers in format-all.sh glob ([263ea10](https://github.com/VILLASframework/node/commit/263ea10331df228b6c40c2ced1f75477a04af24f)) +* **tools:** Port villas-api.sh to the VILLASnode API v2 ([b43f7d8](https://github.com/VILLASframework/node/commit/b43f7d85479b6e850fde9268bc6920f90a1ce016)) +* **tools:** Quote $@ in villas-helper.sh wrapper ([cbe86ce](https://github.com/VILLASframework/node/commit/cbe86ce80030df3fcd9f2d1c4f3f4f954bef3abe)) +* **tools:** Remove stray exits and fix debug output in tc-netem2.sh ([3b938ec](https://github.com/VILLASframework/node/commit/3b938ec6bac9f72dee3b8ba1324919f9d1cc3958)) +* **tools:** Return explicit success and fix exit code in pre-commit hook ([6be05ae](https://github.com/VILLASframework/node/commit/6be05ae43365f85f452bff8fd247ae806166d689)) +* **utils:** Handle vasprintf/realloc failure in vstrcatf ([002ca90](https://github.com/VILLASframework/node/commit/002ca90b7ce0ae2307d2d3692fabf8f393f05efb)) +* **villas-pipe:** Add missing closing quote in RuntimeError format string ([2de2323](https://github.com/VILLASframework/node/commit/2de2323b2921611fcbe4a2cbb0c551cdbcd48a46)) +* **villas-signal:** Enable and document -p, -w, -L, -H options ([28a36cb](https://github.com/VILLASframework/node/commit/28a36cbd69844fbc8f5cce997e367c4a19b4f572)) +* **villas-test-config:** Parse advertised -d debug-level option ([7f87534](https://github.com/VILLASframework/node/commit/7f87534f9390a33842b2061a6acd15d22f3c7ab7)) +* **websocket:** Use previous connection state in CLOSED callback ([de4cf21](https://github.com/VILLASframework/node/commit/de4cf21cc806ba1410fa48f188e100bad605776e)) + ## [1.2.0](https://github.com/VILLASframework/node/compare/v1.1.0...v1.2.0) (2026-08-03) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0bc467b8..bcb6c7ff6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.14) project(villas-node - VERSION 1.2.0 # x-release-please-version + VERSION 1.2.1 # x-release-please-version DESCRIPTION "Open-Source Real-time Multi-protocol Gateway" HOMEPAGE_URL "https://www.fein-aachen.org/projects/villas-node/" LANGUAGES C CXX diff --git a/doc/package.json b/doc/package.json index 24f11477b..b83d047e2 100644 --- a/doc/package.json +++ b/doc/package.json @@ -1,6 +1,6 @@ { "name": "villasnode-api", - "version": "1.2.0", + "version": "1.2.1", "type": "module", "dependencies": { "@redocly/cli": "^2.25.0" diff --git a/python/pyproject.toml b/python/pyproject.toml index bd2c529b2..d5dca99a3 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'villas-node' -version = "1.2.0" +version = "1.2.1" description = 'Python support for the VILLASnode simulation-data gateway' readme = 'README.md' requires-python = '>=3.10' From 1f4ddbe6b3d54ef1fed3d7e29429e207d9bef093 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 19:31:08 +0000 Subject: [PATCH 51/84] chore(master): Release 1.2.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ CMakeLists.txt | 2 +- doc/package.json | 2 +- python/pyproject.toml | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 41ea87d76..f6a9e1507 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.2.1" + ".": "1.2.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e5b6778f..ca3149966 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.2](https://github.com/VILLASframework/node/compare/v1.2.1...v1.2.2) (2026-09-07) + + +### Bug Fixes + +* **sample:** Change ts compare to absolute compare ([c483bf6](https://github.com/VILLASframework/node/commit/c483bf6a4e3ed26b72ab921257e779bc52674313)) + ## [1.2.1](https://github.com/VILLASframework/node/compare/v1.2.0...v1.2.1) (2026-09-07) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcb6c7ff6..490bc14ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.14) project(villas-node - VERSION 1.2.1 # x-release-please-version + VERSION 1.2.2 # x-release-please-version DESCRIPTION "Open-Source Real-time Multi-protocol Gateway" HOMEPAGE_URL "https://www.fein-aachen.org/projects/villas-node/" LANGUAGES C CXX diff --git a/doc/package.json b/doc/package.json index b83d047e2..1ad90f3b1 100644 --- a/doc/package.json +++ b/doc/package.json @@ -1,6 +1,6 @@ { "name": "villasnode-api", - "version": "1.2.1", + "version": "1.2.2", "type": "module", "dependencies": { "@redocly/cli": "^2.25.0" diff --git a/python/pyproject.toml b/python/pyproject.toml index d5dca99a3..88d9e92d7 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'villas-node' -version = "1.2.1" +version = "1.2.2" description = 'Python support for the VILLASnode simulation-data gateway' readme = 'README.md' requires-python = '>=3.10' From d29d2524af8604847c0bee9daf9dce8d7f4b51ef Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 18 May 2026 15:54:40 +0200 Subject: [PATCH 52/84] fix(openapi): Use OpenAPI 3.1.1 with JSON Schema Draft 07 dialect Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- doc/openapi/openapi.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/openapi/openapi.yaml b/doc/openapi/openapi.yaml index 0e7391285..66bf96106 100644 --- a/doc/openapi/openapi.yaml +++ b/doc/openapi/openapi.yaml @@ -1,8 +1,9 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# yaml-language-server: $schema=http://spec.openapis.org/oas/3.1/schema/2025-11-23 # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -openapi: 3.1.0 +openapi: 3.1.1 +jsonSchemaDialect: "http://json-schema.org/draft-07/schema" info: title: VILLASnode API From 427014d291ff482ca7bf1d1f140f7610c6adc1ca Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 18 May 2026 15:55:00 +0200 Subject: [PATCH 53/84] fix(redocly): Fix linter configuration Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- doc/redocly.yaml | 6 +++++- flake.nix | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/redocly.yaml b/doc/redocly.yaml index e947b538c..444d425a3 100644 --- a/doc/redocly.yaml +++ b/doc/redocly.yaml @@ -1,8 +1,12 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema # SPDX-FileCopyrightText: 2014-2025 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 extends: - recommended + rules: security-defined: off no-server-example.com: off + +apis: + villas-node: + root: ./openapi/openapi.yaml diff --git a/flake.nix b/flake.nix index 84abd169a..9e9054a0b 100644 --- a/flake.nix +++ b/flake.nix @@ -163,6 +163,7 @@ libgit2 nodejs pcre + redocly reuse cppcheck pre-commit From 2e7a312d63b522d315a4e431306be16953c6e1d8 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 18 May 2026 16:03:51 +0200 Subject: [PATCH 54/84] feat(editorconfig): Add yaml configuration Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 1a24ac2f8..cefb2bdb0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -26,7 +26,7 @@ indent_size = 4 indent_style = space indent_size = 4 -[*.{nix,json}] +[*.{nix,json,yaml}] indent_style = space indent_size = 2 From 6692d260a7220e208ee447201cb2aec532ab9aa8 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 18 May 2026 16:13:55 +0200 Subject: [PATCH 55/84] feat(openapi): Make redocly configuration more strict Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- .../components/schemas/config/nodes/signals/modbus_signal.yaml | 2 +- doc/redocly.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml index 439d21da8..38bbebf4e 100644 --- a/doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml +++ b/doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml @@ -4,7 +4,7 @@ --- allOf: - type: object - required: [type, address] + required: [address] properties: address: diff --git a/doc/redocly.yaml b/doc/redocly.yaml index 444d425a3..6b782b710 100644 --- a/doc/redocly.yaml +++ b/doc/redocly.yaml @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2014-2025 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 extends: -- recommended +- recommended-strict rules: security-defined: off From cd35a005cee785f069d5e4222f1769f2d0e7830f Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 14:14:05 +0200 Subject: [PATCH 56/84] fix(hook-pmu_dft): Fix configuration typos Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- lib/hooks/pmu_dft.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/hooks/pmu_dft.cpp b/lib/hooks/pmu_dft.cpp index b307e49d2..45b222f34 100644 --- a/lib/hooks/pmu_dft.cpp +++ b/lib/hooks/pmu_dft.cpp @@ -72,7 +72,7 @@ class PmuDftHook : public MultiSignalHook { uint64_t calcCount; unsigned sampleRate; double startFrequency; - double endFreqency; + double endFrequency; double frequencyResolution; unsigned rate; unsigned ppsIndex; @@ -122,7 +122,7 @@ class PmuDftHook : public MultiSignalHook { #endif matrix(), results(), filterWindowCoefficents(), absResults(), absFrequencies(), calcCount(0), sampleRate(0), startFrequency(0), - endFreqency(0), frequencyResolution(0), rate(0), ppsIndex(0), + endFrequency(0), frequencyResolution(0), rate(0), ppsIndex(0), windowSize(0), windowMultiplier(0), freqCount(0), channelNameEnable(1), smpMemPos(0), lastSequence(0), windowCorrectionFactor(0), lastCalc({0, 0}), nextCalc(0.0), lastResult(), @@ -207,7 +207,7 @@ class PmuDftHook : public MultiSignalHook { "Current window multiplyer factor is {}", windowMultiplier); - freqCount = ceil((endFreqency - startFrequency) / frequencyResolution) + 1; + freqCount = ceil((endFrequency - startFrequency) / frequencyResolution) + 1; // Initialize matrix of dft coeffients matrix.clear(); @@ -254,7 +254,7 @@ class PmuDftHook : public MultiSignalHook { "{ s?: i, s?: F, s?: F, s?: F, s?: i, s?: i, s?: s, s?: s, s?: s, s?: " "i, s?: s, s?: b, s?: s, s?: F, s?: F, s?: F, s?: F}", "sample_rate", &sampleRate, "start_frequency", &startFrequency, - "end_frequency", &endFreqency, "frequency_resolution", + "end_frequency", &endFrequency, "frequency_resolution", &frequencyResolution, "dft_rate", &rate, "window_size_factor", &windowSizeFactor, "window_type", &windowTypeC, "padding_type", &paddingTypeC, "estimate_type", &estimateTypeC, "pps_index", &ppsIndex, @@ -335,7 +335,7 @@ class PmuDftHook : public MultiSignalHook { void check() override { assert(state == State::PARSED); - if (endFreqency < 0 || endFreqency > sampleRate) + if (endFrequency < 0 || endFrequency > sampleRate) throw RuntimeError("End frequency must be smaller than sampleRate {}", sampleRate); From 14415d5299d9cbb16825b2cdd25424b4a859c370 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Tue, 2 Jun 2026 17:53:06 +0200 Subject: [PATCH 57/84] refactor(openapi): Rewrite all schema files All format and hook schemas have been rewritten from scratch to match their actual `parse` implementation and specify an exhaustive list of properties and include an `additionalProperties: false` directive. The single-use subschemas (e.g. `config/nodes/signals`) have been moved into subschema "definitions". Schemas are categorized by prefix instead of by directory. Bundling the schema using `redocly bundle` flattens `#/schemas/components` into a single object. This makes debugging harder when some schemas are renamed to avoid name collisions. |prefix |meaning | |----------|-------------------------------------| |`config-` |Global configuration file section | |`node-` |Node plugin instance configuration | |`hook-` |Hook plugin instance configuration | |`shared-` |Schemas referenced in multiple places| Signed-off-by: Philipp Jungkamp --- doc/.redocly.yaml | 18 - .../{config/http.yaml => config-http.yaml} | 4 +- .../logging.yaml => config-logging.yaml} | 4 +- doc/openapi/components/schemas/config.yaml | 139 +++++-- .../components/schemas/config/format.yaml | 44 -- .../components/schemas/config/format_obj.yaml | 31 -- .../schemas/config/format_spec.yaml | 28 -- .../config/formats/_json_edgeflex.yaml | 7 - .../schemas/config/formats/_json_kafka.yaml | 7 - .../schemas/config/formats/_json_reserve.yaml | 7 - .../schemas/config/formats/_opal_asyncip.yaml | 7 - .../schemas/config/formats/_protobuf.yaml | 7 - .../schemas/config/formats/_raw.yaml | 7 - .../schemas/config/formats/_tsv.yaml | 7 - .../schemas/config/formats/_value.yaml | 7 - .../config/formats/_villas_binary.yaml | 7 - .../schemas/config/formats/_villas_human.yaml | 7 - .../schemas/config/formats/_villas_web.yaml | 7 - .../schemas/config/formats/column.yaml | 11 - .../schemas/config/formats/csv.yaml | 11 - .../schemas/config/formats/iotagent_ul.yaml | 11 - .../schemas/config/formats/json.yaml | 43 -- .../schemas/config/formats/json_edgeflex.yaml | 11 - .../schemas/config/formats/json_kafka.yaml | 11 - .../schemas/config/formats/json_reserve.yaml | 11 - .../schemas/config/formats/line.yaml | 28 -- .../schemas/config/formats/opal_asyncip.yaml | 11 - .../schemas/config/formats/protobuf.yaml | 11 - .../schemas/config/formats/raw.yaml | 31 -- .../schemas/config/formats/tsv.yaml | 11 - .../schemas/config/formats/value.yaml | 11 - .../schemas/config/formats/villas_binary.yaml | 11 - .../schemas/config/formats/villas_human.yaml | 11 - .../schemas/config/formats/villas_web.yaml | 11 - .../components/schemas/config/global.yaml | 79 ---- .../components/schemas/config/hook.yaml | 19 - .../components/schemas/config/hook_multi.yaml | 19 - .../components/schemas/config/hook_obj.yaml | 44 -- .../schemas/config/hook_single.yaml | 13 - .../components/schemas/config/hook_spec.yaml | 39 -- .../schemas/config/hooks/_average.yaml | 7 - .../schemas/config/hooks/_cast.yaml | 7 - .../schemas/config/hooks/_decimate.yaml | 7 - .../schemas/config/hooks/_digest.yaml | 7 - .../components/schemas/config/hooks/_dp.yaml | 6 - .../schemas/config/hooks/_drop.yaml | 7 - .../schemas/config/hooks/_dump.yaml | 7 - .../components/schemas/config/hooks/_ebm.yaml | 7 - .../components/schemas/config/hooks/_fix.yaml | 7 - .../schemas/config/hooks/_frame.yaml | 7 - .../schemas/config/hooks/_gate.yaml | 7 - .../schemas/config/hooks/_jitter_calc.yaml | 7 - .../schemas/config/hooks/_limit_rate.yaml | 7 - .../schemas/config/hooks/_limit_value.yaml | 7 - .../components/schemas/config/hooks/_lua.yaml | 7 - .../components/schemas/config/hooks/_ma.yaml | 7 - .../schemas/config/hooks/_pmu_dft.yaml | 7 - .../schemas/config/hooks/_pps_ts.yaml | 7 - .../schemas/config/hooks/_print.yaml | 7 - .../schemas/config/hooks/_reorder_ts.yaml | 7 - .../schemas/config/hooks/_restart.yaml | 7 - .../components/schemas/config/hooks/_rms.yaml | 16 - .../schemas/config/hooks/_round.yaml | 7 - .../schemas/config/hooks/_scale.yaml | 7 - .../schemas/config/hooks/_shift_seq.yaml | 7 - .../schemas/config/hooks/_shift_ts.yaml | 7 - .../schemas/config/hooks/_skip_first.yaml | 7 - .../schemas/config/hooks/_stats.yaml | 7 - .../components/schemas/config/hooks/_ts.yaml | 7 - .../schemas/config/hooks/average.yaml | 19 - .../components/schemas/config/hooks/cast.yaml | 26 -- .../schemas/config/hooks/decimate.yaml | 15 - .../schemas/config/hooks/digest.yaml | 22 - .../components/schemas/config/hooks/dp.yaml | 33 -- .../components/schemas/config/hooks/drop.yaml | 6 - .../components/schemas/config/hooks/dump.yaml | 6 - .../components/schemas/config/hooks/ebm.yaml | 24 -- .../components/schemas/config/hooks/fix.yaml | 6 - .../schemas/config/hooks/frame.yaml | 21 - .../components/schemas/config/hooks/gate.yaml | 28 -- .../schemas/config/hooks/jitter_calc.yaml | 6 - .../schemas/config/hooks/limit_rate.yaml | 22 - .../schemas/config/hooks/limit_value.yaml | 18 - .../components/schemas/config/hooks/lua.yaml | 83 ---- .../components/schemas/config/hooks/ma.yaml | 15 - .../schemas/config/hooks/pmu_dft.yaml | 109 ----- .../schemas/config/hooks/pps_ts.yaml | 31 -- .../schemas/config/hooks/print.yaml | 19 - .../schemas/config/hooks/reorder_ts.yaml | 15 - .../schemas/config/hooks/restart.yaml | 6 - .../components/schemas/config/hooks/rms.yaml | 15 - .../schemas/config/hooks/round.yaml | 14 - .../schemas/config/hooks/scale.yaml | 19 - .../schemas/config/hooks/shift_seq.yaml | 14 - .../schemas/config/hooks/shift_ts.yaml | 20 - .../schemas/config/hooks/skip_first.yaml | 15 - .../schemas/config/hooks/stats.yaml | 27 -- .../components/schemas/config/hooks/ts.yaml | 6 - .../components/schemas/config/node.yaml | 47 --- .../components/schemas/config/node_obj.yaml | 57 --- .../schemas/config/nodes/_amqp.yaml | 7 - .../components/schemas/config/nodes/_can.yaml | 7 - .../schemas/config/nodes/_comedi.yaml | 7 - .../schemas/config/nodes/_ethercat.yaml | 7 - .../schemas/config/nodes/_example.yaml | 7 - .../schemas/config/nodes/_exec.yaml | 7 - .../schemas/config/nodes/_file.yaml | 7 - .../schemas/config/nodes/_fpga.yaml | 7 - .../schemas/config/nodes/_iec60870-5-104.yaml | 7 - .../schemas/config/nodes/_iec61850-8-1.yaml | 7 - .../schemas/config/nodes/_iec61850-9-2.yaml | 7 - .../schemas/config/nodes/_infiniband.yaml | 7 - .../schemas/config/nodes/_influxdb.yaml | 7 - .../schemas/config/nodes/_kafka.yaml | 7 - .../schemas/config/nodes/_loopback.yaml | 7 - .../schemas/config/nodes/_modbus.yaml | 7 - .../schemas/config/nodes/_mqtt.yaml | 7 - .../schemas/config/nodes/_nanomsg.yaml | 7 - .../schemas/config/nodes/_ngsi.yaml | 7 - .../schemas/config/nodes/_opal_async.yaml | 7 - .../schemas/config/nodes/_opal_orchestra.yaml | 7 - .../schemas/config/nodes/_opendss.yaml | 7 - .../schemas/config/nodes/_redis.yaml | 7 - .../components/schemas/config/nodes/_rtp.yaml | 7 - .../schemas/config/nodes/_shmem.yaml | 7 - .../schemas/config/nodes/_signal_node.yaml | 7 - .../schemas/config/nodes/_signal_v2_node.yaml | 7 - .../schemas/config/nodes/_socket.yaml | 7 - .../schemas/config/nodes/_stats_node.yaml | 7 - .../schemas/config/nodes/_temper.yaml | 7 - .../schemas/config/nodes/_test_rtt.yaml | 7 - .../schemas/config/nodes/_uldaq.yaml | 7 - .../schemas/config/nodes/_webrtc.yaml | 7 - .../schemas/config/nodes/_websocket.yaml | 7 - .../schemas/config/nodes/_zeromq.yaml | 7 - .../components/schemas/config/nodes/amqp.yaml | 50 --- .../components/schemas/config/nodes/can.yaml | 28 -- .../schemas/config/nodes/comedi.yaml | 28 -- .../schemas/config/nodes/ethercat.yaml | 42 -- .../schemas/config/nodes/example.yaml | 23 -- .../components/schemas/config/nodes/exec.yaml | 50 --- .../components/schemas/config/nodes/file.yaml | 121 ------ .../components/schemas/config/nodes/fpga.yaml | 12 - .../schemas/config/nodes/iec60870-5-104.yaml | 77 ---- .../schemas/config/nodes/iec61850-8-1.yaml | 86 ---- .../schemas/config/nodes/iec61850-9-2.yaml | 83 ---- .../schemas/config/nodes/infiniband.yaml | 197 --------- .../schemas/config/nodes/influxdb.yaml | 20 - .../schemas/config/nodes/kafka.yaml | 80 ---- .../schemas/config/nodes/loopback.yaml | 31 -- .../schemas/config/nodes/modbus.yaml | 48 --- .../schemas/config/nodes/modbus_common.yaml | 31 -- .../schemas/config/nodes/modbus_rtu.yaml | 48 --- .../schemas/config/nodes/modbus_tcp.yaml | 25 -- .../components/schemas/config/nodes/mqtt.yaml | 114 ------ .../schemas/config/nodes/nanomsg.yaml | 38 -- .../components/schemas/config/nodes/ngsi.yaml | 46 --- .../schemas/config/nodes/opal_async.yaml | 42 -- .../schemas/config/nodes/opal_orchestra.yaml | 77 ---- .../nodes/opal_orchestra_connection.yaml | 19 - .../opal_orchestra_connection_dolphin.yaml | 27 -- .../opal_orchestra_connection_local.yaml | 54 --- .../opal_orchestra_connection_remote.yaml | 24 -- .../schemas/config/nodes/opendss.yaml | 48 --- .../schemas/config/nodes/redis.yaml | 130 ------ .../components/schemas/config/nodes/rtp.yaml | 58 --- .../schemas/config/nodes/shmem.yaml | 57 --- .../schemas/config/nodes/signal_node.yaml | 106 ----- .../schemas/config/nodes/signal_v2_node.yaml | 37 -- .../config/nodes/signals/can_signal.yaml | 20 - .../config/nodes/signals/comedi_signal.yaml | 22 - .../config/nodes/signals/iec60870_signal.yaml | 43 -- .../nodes/signals/iec61850_goose_data.yaml | 31 -- .../iec61850_goose_publisher_data.yaml | 26 -- .../config/nodes/signals/iec61850_signal.yaml | 32 -- .../config/nodes/signals/modbus_signal.yaml | 46 --- .../nodes/signals/signal_v2_signal.yaml | 75 ---- .../config/nodes/signals/stats_signal.yaml | 13 - .../config/nodes/signals/uldaq_signal.yaml | 21 - .../schemas/config/nodes/socket.yaml | 76 ---- .../schemas/config/nodes/stats_node.yaml | 22 - .../schemas/config/nodes/temper.yaml | 30 -- .../schemas/config/nodes/test_rtt.yaml | 85 ---- .../schemas/config/nodes/uldaq.yaml | 147 ------- .../schemas/config/nodes/webrtc.yaml | 62 --- .../schemas/config/nodes/websocket.yaml | 40 -- .../schemas/config/nodes/zeromq.yaml | 73 ---- .../components/schemas/config/signal.yaml | 56 --- .../schemas/config/signal_list.yaml | 54 --- .../components/schemas/format-csv.yaml | 56 +++ .../components/schemas/format-gtnet.yaml | 47 +++ .../schemas/format-iotagent_ul.yaml | 35 ++ .../components/schemas/format-json.yaml | 55 +++ .../schemas/format-json_edgeflex.yaml | 55 +++ .../components/schemas/format-json_kafka.yaml | 59 +++ .../schemas/format-json_reserve.yaml | 55 +++ .../schemas/format-opal_asyncip.yaml | 39 ++ .../components/schemas/format-protobuf.yaml | 35 ++ .../components/schemas/format-raw.yaml | 47 +++ .../components/schemas/format-tsv.yaml | 56 +++ .../components/schemas/format-value.yaml | 35 ++ .../schemas/format-villas_binary.yaml | 43 ++ .../schemas/format-villas_human.yaml | 51 +++ .../components/schemas/format-villas_web.yaml | 43 ++ doc/openapi/components/schemas/format.yaml | 30 ++ .../components/schemas/formats/edgeflex.yaml | 1 + .../components/schemas/formats/igor.yaml | 3 +- .../components/schemas/formats/sogno-old.yaml | 2 + .../components/schemas/formats/sogno.yaml | 3 + .../components/schemas/hook-average.yaml | 34 ++ doc/openapi/components/schemas/hook-cast.yaml | 45 +++ .../components/schemas/hook-decimate.yaml | 25 ++ .../components/schemas/hook-digest.yaml | 30 ++ doc/openapi/components/schemas/hook-dp.yaml | 52 +++ doc/openapi/components/schemas/hook-drop.yaml | 15 + doc/openapi/components/schemas/hook-dump.yaml | 15 + doc/openapi/components/schemas/hook-ebm.yaml | 34 ++ doc/openapi/components/schemas/hook-fix.yaml | 15 + .../components/schemas/hook-frame.yaml | 45 +++ doc/openapi/components/schemas/hook-gate.yaml | 41 ++ .../components/schemas/hook-ip_dft_pmu.yaml | 120 ++++++ .../components/schemas/hook-jitter_calc.yaml | 15 + .../components/schemas/hook-limit_rate.yaml | 29 ++ .../components/schemas/hook-limit_value.yaml | 33 ++ doc/openapi/components/schemas/hook-lua.yaml | 108 +++++ doc/openapi/components/schemas/hook-ma.yaml | 32 ++ doc/openapi/components/schemas/hook-pmu.yaml | 111 ++++++ .../components/schemas/hook-pmu_dft.yaml | 136 +++++++ .../components/schemas/hook-power.yaml | 96 +++++ .../components/schemas/hook-pps_ts.yaml | 44 ++ .../components/schemas/hook-print.yaml | 29 ++ .../components/schemas/hook-reorder_ts.yaml | 21 + .../components/schemas/hook-restart.yaml | 15 + doc/openapi/components/schemas/hook-rms.yaml | 31 ++ .../components/schemas/hook-round.yaml | 31 ++ .../components/schemas/hook-scale.yaml | 37 ++ .../components/schemas/hook-shift_seq.yaml | 19 + .../components/schemas/hook-shift_ts.yaml | 26 ++ .../components/schemas/hook-skip_first.yaml | 27 ++ .../components/schemas/hook-stats.yaml | 39 ++ doc/openapi/components/schemas/hook-ts.yaml | 15 + doc/openapi/components/schemas/hook.yaml | 42 ++ doc/openapi/components/schemas/node-amqp.yaml | 106 +++++ doc/openapi/components/schemas/node-api.yaml | 127 ++++++ .../nodes/c37_118.yaml => node-c37_118.yaml} | 242 ++++++----- doc/openapi/components/schemas/node-can.yaml | 106 +++++ .../components/schemas/node-comedi.yaml | 140 +++++++ .../components/schemas/node-ethercat.yaml | 110 +++++ .../components/schemas/node-example.yaml | 33 ++ doc/openapi/components/schemas/node-exec.yaml | 64 +++ doc/openapi/components/schemas/node-file.yaml | 182 +++++++++ doc/openapi/components/schemas/node-fpga.yaml | 45 +++ .../schemas/node-iec60870-5-104.yaml | 161 ++++++++ .../components/schemas/node-iec61850-8-1.yaml | 377 ++++++++++++++++++ .../components/schemas/node-iec61850-9-2.yaml | 177 ++++++++ .../components/schemas/node-infiniband.yaml | 249 ++++++++++++ .../components/schemas/node-influxdb.yaml | 30 ++ .../components/schemas/node-kafka.yaml | 140 +++++++ .../components/schemas/node-loopback.yaml | 34 ++ .../components/schemas/node-modbus.yaml | 220 ++++++++++ doc/openapi/components/schemas/node-mqtt.yaml | 165 ++++++++ .../components/schemas/node-nanomsg.yaml | 90 +++++ doc/openapi/components/schemas/node-ngsi.yaml | 161 ++++++++ .../components/schemas/node-opal_async.yaml | 79 ++++ .../schemas/node-opal_orchestra.yaml | 314 +++++++++++++++ .../components/schemas/node-opendss.yaml | 130 ++++++ .../components/schemas/node-redis.yaml | 154 +++++++ doc/openapi/components/schemas/node-rtp.yaml | 135 +++++++ .../components/schemas/node-shmem.yaml | 108 +++++ .../components/schemas/node-signal.yaml | 146 +++++++ .../components/schemas/node-signal_v2.yaml | 151 +++++++ .../components/schemas/node-socket.yaml | 142 +++++++ .../components/schemas/node-stats.yaml | 76 ++++ .../components/schemas/node-temper.yaml | 42 ++ .../components/schemas/node-test_rtt.yaml | 154 +++++++ .../components/schemas/node-uldaq.yaml | 212 ++++++++++ .../components/schemas/node-webrtc.yaml | 84 ++++ .../components/schemas/node-websocket.yaml | 42 ++ .../components/schemas/node-zeromq.yaml | 145 +++++++ doc/openapi/components/schemas/node.yaml | 47 +++ .../components/schemas/{config => }/path.yaml | 28 +- .../components/schemas/plugin-ethercat.yaml | 23 ++ .../node_signals.yaml => plugin-fpgas.yaml} | 13 +- .../duration.yaml => shared-duration.yaml} | 2 +- .../shared-format-column-separator.yaml | 9 + .../_csv.yaml => shared-format-data.yaml} | 9 +- .../schemas/shared-format-json-compact.yaml | 8 + .../shared-format-json-ensure_ascii.yaml | 8 + .../shared-format-json-escape_slash.yaml | 8 + .../schemas/shared-format-json-indent.yaml | 10 + .../schemas/shared-format-json-sort_keys.yaml | 8 + .../shared-format-line-comment_prefix.yaml | 9 + .../schemas/shared-format-line-delimiter.yaml | 9 + .../schemas/shared-format-line-header.yaml | 8 + .../shared-format-line-skip_first_line.yaml | 8 + .../schemas/shared-format-offset.yaml | 8 + .../schemas/shared-format-raw-bits.yaml | 7 + .../schemas/shared-format-raw-endianess.yaml | 7 + .../schemas/shared-format-raw-fake.yaml | 10 + .../schemas/shared-format-real_precision.yaml | 11 + .../schemas/shared-format-sequence.yaml | 8 + .../schemas/shared-format-ts_origin.yaml | 8 + .../schemas/shared-format-ts_received.yaml | 8 + .../shared-format-villas-source_index.yaml | 10 + ...d-format-villas-validate_source_index.yaml | 8 + .../components/schemas/shared-fpga-card.yaml | 43 ++ .../hook_list.yaml => shared-hook-list.yaml} | 2 +- .../gtnet.yaml => shared-hook-priority.yaml} | 4 +- .../schemas/shared-hook-signal.yaml | 7 + .../schemas/shared-hook-signals.yaml | 14 + .../schemas/shared-node-builtin.yaml | 9 + .../schemas/shared-node-enabled.yaml | 7 + .../schemas/shared-node-fwmark.yaml | 11 + .../components/schemas/shared-node-in.yaml | 26 ++ .../netem.yaml => shared-node-netem.yaml} | 59 ++- .../components/schemas/shared-node-out.yaml | 32 ++ .../schemas/shared-node-vectorize.yaml | 11 + .../schemas/shared-signal-description.yaml | 22 + ..._gtnet.yaml => shared-signal-enabled.yaml} | 7 +- ...er_signal.yaml => shared-signal-init.yaml} | 25 +- .../schemas/shared-signal-list.yaml | 16 + .../_c37_118.yaml => shared-signal-name.yaml} | 8 +- .../_json.yaml => shared-signal-type.yaml} | 13 +- ...tagent_ul.yaml => shared-signal-unit.yaml} | 8 +- doc/openapi/openapi.yaml | 32 +- doc/openapi/paths/config.yaml | 2 +- .../paths/node/node@{uuid-or-name}.yaml | 2 +- .../node/node@{uuid-or-name}@file@seek.yaml | 1 + doc/openapi/paths/nodes.yaml | 2 +- doc/openapi/paths/path/path@{uuid}.yaml | 2 +- doc/openapi/paths/paths.yaml | 6 +- doc/openapi/paths/restart.yaml | 1 + doc/package.json | 2 +- doc/redocly.yaml | 41 +- doc/villas.js | 249 ++++++++++++ 335 files changed, 8110 insertions(+), 5030 deletions(-) delete mode 100644 doc/.redocly.yaml rename doc/openapi/components/schemas/{config/http.yaml => config-http.yaml} (87%) rename doc/openapi/components/schemas/{config/logging.yaml => config-logging.yaml} (97%) delete mode 100644 doc/openapi/components/schemas/config/format.yaml delete mode 100644 doc/openapi/components/schemas/config/format_obj.yaml delete mode 100644 doc/openapi/components/schemas/config/format_spec.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_json_kafka.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_json_reserve.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_opal_asyncip.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_protobuf.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_raw.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_tsv.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_value.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_villas_binary.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_villas_human.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/_villas_web.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/column.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/csv.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/iotagent_ul.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/json.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/json_edgeflex.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/json_kafka.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/json_reserve.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/line.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/opal_asyncip.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/protobuf.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/raw.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/tsv.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/value.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/villas_binary.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/villas_human.yaml delete mode 100644 doc/openapi/components/schemas/config/formats/villas_web.yaml delete mode 100644 doc/openapi/components/schemas/config/global.yaml delete mode 100644 doc/openapi/components/schemas/config/hook.yaml delete mode 100644 doc/openapi/components/schemas/config/hook_multi.yaml delete mode 100644 doc/openapi/components/schemas/config/hook_obj.yaml delete mode 100644 doc/openapi/components/schemas/config/hook_single.yaml delete mode 100644 doc/openapi/components/schemas/config/hook_spec.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_average.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_cast.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_decimate.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_digest.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_dp.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_drop.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_dump.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_ebm.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_fix.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_frame.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_gate.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_jitter_calc.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_limit_rate.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_limit_value.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_lua.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_ma.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_pmu_dft.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_pps_ts.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_print.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_reorder_ts.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_restart.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_rms.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_round.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_scale.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_shift_seq.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_shift_ts.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_skip_first.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_stats.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/_ts.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/average.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/cast.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/decimate.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/digest.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/dp.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/drop.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/dump.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/ebm.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/fix.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/frame.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/gate.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/jitter_calc.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/limit_rate.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/limit_value.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/lua.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/ma.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/pmu_dft.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/pps_ts.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/print.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/reorder_ts.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/restart.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/rms.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/round.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/scale.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/shift_seq.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/shift_ts.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/skip_first.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/stats.yaml delete mode 100644 doc/openapi/components/schemas/config/hooks/ts.yaml delete mode 100644 doc/openapi/components/schemas/config/node.yaml delete mode 100644 doc/openapi/components/schemas/config/node_obj.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_amqp.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_can.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_comedi.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_ethercat.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_example.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_exec.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_file.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_fpga.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_iec60870-5-104.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_infiniband.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_influxdb.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_kafka.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_loopback.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_modbus.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_mqtt.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_nanomsg.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_ngsi.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_opal_async.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_opal_orchestra.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_opendss.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_redis.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_rtp.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_shmem.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_signal_node.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_signal_v2_node.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_socket.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_stats_node.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_temper.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_test_rtt.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_uldaq.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_webrtc.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_websocket.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/_zeromq.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/amqp.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/can.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/comedi.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/ethercat.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/example.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/exec.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/file.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/fpga.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/iec60870-5-104.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/infiniband.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/influxdb.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/kafka.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/loopback.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/modbus.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/modbus_common.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/modbus_rtu.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/modbus_tcp.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/mqtt.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/nanomsg.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/ngsi.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/opal_async.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/opal_orchestra.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/opal_orchestra_connection.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_dolphin.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_local.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_remote.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/opendss.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/redis.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/rtp.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/shmem.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signal_node.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signal_v2_node.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/can_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/comedi_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/iec60870_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_data.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_publisher_data.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/iec61850_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/signal_v2_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/stats_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/signals/uldaq_signal.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/socket.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/stats_node.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/temper.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/test_rtt.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/uldaq.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/webrtc.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/websocket.yaml delete mode 100644 doc/openapi/components/schemas/config/nodes/zeromq.yaml delete mode 100644 doc/openapi/components/schemas/config/signal.yaml delete mode 100644 doc/openapi/components/schemas/config/signal_list.yaml create mode 100644 doc/openapi/components/schemas/format-csv.yaml create mode 100644 doc/openapi/components/schemas/format-gtnet.yaml create mode 100644 doc/openapi/components/schemas/format-iotagent_ul.yaml create mode 100644 doc/openapi/components/schemas/format-json.yaml create mode 100644 doc/openapi/components/schemas/format-json_edgeflex.yaml create mode 100644 doc/openapi/components/schemas/format-json_kafka.yaml create mode 100644 doc/openapi/components/schemas/format-json_reserve.yaml create mode 100644 doc/openapi/components/schemas/format-opal_asyncip.yaml create mode 100644 doc/openapi/components/schemas/format-protobuf.yaml create mode 100644 doc/openapi/components/schemas/format-raw.yaml create mode 100644 doc/openapi/components/schemas/format-tsv.yaml create mode 100644 doc/openapi/components/schemas/format-value.yaml create mode 100644 doc/openapi/components/schemas/format-villas_binary.yaml create mode 100644 doc/openapi/components/schemas/format-villas_human.yaml create mode 100644 doc/openapi/components/schemas/format-villas_web.yaml create mode 100644 doc/openapi/components/schemas/format.yaml create mode 100644 doc/openapi/components/schemas/hook-average.yaml create mode 100644 doc/openapi/components/schemas/hook-cast.yaml create mode 100644 doc/openapi/components/schemas/hook-decimate.yaml create mode 100644 doc/openapi/components/schemas/hook-digest.yaml create mode 100644 doc/openapi/components/schemas/hook-dp.yaml create mode 100644 doc/openapi/components/schemas/hook-drop.yaml create mode 100644 doc/openapi/components/schemas/hook-dump.yaml create mode 100644 doc/openapi/components/schemas/hook-ebm.yaml create mode 100644 doc/openapi/components/schemas/hook-fix.yaml create mode 100644 doc/openapi/components/schemas/hook-frame.yaml create mode 100644 doc/openapi/components/schemas/hook-gate.yaml create mode 100644 doc/openapi/components/schemas/hook-ip_dft_pmu.yaml create mode 100644 doc/openapi/components/schemas/hook-jitter_calc.yaml create mode 100644 doc/openapi/components/schemas/hook-limit_rate.yaml create mode 100644 doc/openapi/components/schemas/hook-limit_value.yaml create mode 100644 doc/openapi/components/schemas/hook-lua.yaml create mode 100644 doc/openapi/components/schemas/hook-ma.yaml create mode 100644 doc/openapi/components/schemas/hook-pmu.yaml create mode 100644 doc/openapi/components/schemas/hook-pmu_dft.yaml create mode 100644 doc/openapi/components/schemas/hook-power.yaml create mode 100644 doc/openapi/components/schemas/hook-pps_ts.yaml create mode 100644 doc/openapi/components/schemas/hook-print.yaml create mode 100644 doc/openapi/components/schemas/hook-reorder_ts.yaml create mode 100644 doc/openapi/components/schemas/hook-restart.yaml create mode 100644 doc/openapi/components/schemas/hook-rms.yaml create mode 100644 doc/openapi/components/schemas/hook-round.yaml create mode 100644 doc/openapi/components/schemas/hook-scale.yaml create mode 100644 doc/openapi/components/schemas/hook-shift_seq.yaml create mode 100644 doc/openapi/components/schemas/hook-shift_ts.yaml create mode 100644 doc/openapi/components/schemas/hook-skip_first.yaml create mode 100644 doc/openapi/components/schemas/hook-stats.yaml create mode 100644 doc/openapi/components/schemas/hook-ts.yaml create mode 100644 doc/openapi/components/schemas/hook.yaml create mode 100644 doc/openapi/components/schemas/node-amqp.yaml create mode 100644 doc/openapi/components/schemas/node-api.yaml rename doc/openapi/components/schemas/{config/nodes/c37_118.yaml => node-c37_118.yaml} (61%) create mode 100644 doc/openapi/components/schemas/node-can.yaml create mode 100644 doc/openapi/components/schemas/node-comedi.yaml create mode 100644 doc/openapi/components/schemas/node-ethercat.yaml create mode 100644 doc/openapi/components/schemas/node-example.yaml create mode 100644 doc/openapi/components/schemas/node-exec.yaml create mode 100644 doc/openapi/components/schemas/node-file.yaml create mode 100644 doc/openapi/components/schemas/node-fpga.yaml create mode 100644 doc/openapi/components/schemas/node-iec60870-5-104.yaml create mode 100644 doc/openapi/components/schemas/node-iec61850-8-1.yaml create mode 100644 doc/openapi/components/schemas/node-iec61850-9-2.yaml create mode 100644 doc/openapi/components/schemas/node-infiniband.yaml create mode 100644 doc/openapi/components/schemas/node-influxdb.yaml create mode 100644 doc/openapi/components/schemas/node-kafka.yaml create mode 100644 doc/openapi/components/schemas/node-loopback.yaml create mode 100644 doc/openapi/components/schemas/node-modbus.yaml create mode 100644 doc/openapi/components/schemas/node-mqtt.yaml create mode 100644 doc/openapi/components/schemas/node-nanomsg.yaml create mode 100644 doc/openapi/components/schemas/node-ngsi.yaml create mode 100644 doc/openapi/components/schemas/node-opal_async.yaml create mode 100644 doc/openapi/components/schemas/node-opal_orchestra.yaml create mode 100644 doc/openapi/components/schemas/node-opendss.yaml create mode 100644 doc/openapi/components/schemas/node-redis.yaml create mode 100644 doc/openapi/components/schemas/node-rtp.yaml create mode 100644 doc/openapi/components/schemas/node-shmem.yaml create mode 100644 doc/openapi/components/schemas/node-signal.yaml create mode 100644 doc/openapi/components/schemas/node-signal_v2.yaml create mode 100644 doc/openapi/components/schemas/node-socket.yaml create mode 100644 doc/openapi/components/schemas/node-stats.yaml create mode 100644 doc/openapi/components/schemas/node-temper.yaml create mode 100644 doc/openapi/components/schemas/node-test_rtt.yaml create mode 100644 doc/openapi/components/schemas/node-uldaq.yaml create mode 100644 doc/openapi/components/schemas/node-webrtc.yaml create mode 100644 doc/openapi/components/schemas/node-websocket.yaml create mode 100644 doc/openapi/components/schemas/node-zeromq.yaml create mode 100644 doc/openapi/components/schemas/node.yaml rename doc/openapi/components/schemas/{config => }/path.yaml (82%) create mode 100644 doc/openapi/components/schemas/plugin-ethercat.yaml rename doc/openapi/components/schemas/{config/node_signals.yaml => plugin-fpgas.yaml} (56%) rename doc/openapi/components/schemas/{config/duration.yaml => shared-duration.yaml} (88%) create mode 100644 doc/openapi/components/schemas/shared-format-column-separator.yaml rename doc/openapi/components/schemas/{config/formats/_csv.yaml => shared-format-data.yaml} (53%) create mode 100644 doc/openapi/components/schemas/shared-format-json-compact.yaml create mode 100644 doc/openapi/components/schemas/shared-format-json-ensure_ascii.yaml create mode 100644 doc/openapi/components/schemas/shared-format-json-escape_slash.yaml create mode 100644 doc/openapi/components/schemas/shared-format-json-indent.yaml create mode 100644 doc/openapi/components/schemas/shared-format-json-sort_keys.yaml create mode 100644 doc/openapi/components/schemas/shared-format-line-comment_prefix.yaml create mode 100644 doc/openapi/components/schemas/shared-format-line-delimiter.yaml create mode 100644 doc/openapi/components/schemas/shared-format-line-header.yaml create mode 100644 doc/openapi/components/schemas/shared-format-line-skip_first_line.yaml create mode 100644 doc/openapi/components/schemas/shared-format-offset.yaml create mode 100644 doc/openapi/components/schemas/shared-format-raw-bits.yaml create mode 100644 doc/openapi/components/schemas/shared-format-raw-endianess.yaml create mode 100644 doc/openapi/components/schemas/shared-format-raw-fake.yaml create mode 100644 doc/openapi/components/schemas/shared-format-real_precision.yaml create mode 100644 doc/openapi/components/schemas/shared-format-sequence.yaml create mode 100644 doc/openapi/components/schemas/shared-format-ts_origin.yaml create mode 100644 doc/openapi/components/schemas/shared-format-ts_received.yaml create mode 100644 doc/openapi/components/schemas/shared-format-villas-source_index.yaml create mode 100644 doc/openapi/components/schemas/shared-format-villas-validate_source_index.yaml create mode 100644 doc/openapi/components/schemas/shared-fpga-card.yaml rename doc/openapi/components/schemas/{config/hook_list.yaml => shared-hook-list.yaml} (93%) rename doc/openapi/components/schemas/{config/formats/gtnet.yaml => shared-hook-priority.yaml} (89%) create mode 100644 doc/openapi/components/schemas/shared-hook-signal.yaml create mode 100644 doc/openapi/components/schemas/shared-hook-signals.yaml create mode 100644 doc/openapi/components/schemas/shared-node-builtin.yaml create mode 100644 doc/openapi/components/schemas/shared-node-enabled.yaml create mode 100644 doc/openapi/components/schemas/shared-node-fwmark.yaml create mode 100644 doc/openapi/components/schemas/shared-node-in.yaml rename doc/openapi/components/schemas/{config/netem.yaml => shared-node-netem.yaml} (73%) create mode 100644 doc/openapi/components/schemas/shared-node-out.yaml create mode 100644 doc/openapi/components/schemas/shared-node-vectorize.yaml create mode 100644 doc/openapi/components/schemas/shared-signal-description.yaml rename doc/openapi/components/schemas/{config/formats/_gtnet.yaml => shared-signal-enabled.yaml} (68%) rename doc/openapi/components/schemas/{config/nodes/signals/iec61850_goose_subscriber_signal.yaml => shared-signal-init.yaml} (57%) create mode 100644 doc/openapi/components/schemas/shared-signal-list.yaml rename doc/openapi/components/schemas/{config/nodes/_c37_118.yaml => shared-signal-name.yaml} (68%) rename doc/openapi/components/schemas/{config/formats/_json.yaml => shared-signal-type.yaml} (61%) rename doc/openapi/components/schemas/{config/formats/_iotagent_ul.yaml => shared-signal-unit.yaml} (73%) create mode 100644 doc/villas.js diff --git a/doc/.redocly.yaml b/doc/.redocly.yaml deleted file mode 100644 index acbf12858..000000000 --- a/doc/.redocly.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# See https://redoc.ly/docs/cli/configuration/ for more information. -# -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -apiDefinitions: - main: openapi/openapi.yaml -lint: - extends: - - recommended - rules: - no-unused-components: warning -referenceDocs: - htmlTemplate: ./index.html - theme: - colors: - primary: - main: "#32329f" diff --git a/doc/openapi/components/schemas/config/http.yaml b/doc/openapi/components/schemas/config-http.yaml similarity index 87% rename from doc/openapi/components/schemas/config/http.yaml rename to doc/openapi/components/schemas/config-http.yaml index 44c896f2f..d5ad4291b 100644 --- a/doc/openapi/components/schemas/config/http.yaml +++ b/doc/openapi/components/schemas/config-http.yaml @@ -9,7 +9,7 @@ properties: default: true title: Enable HTTP/WebSocket server description: | - Whether the HTTP & WebSocket server listens on a port. + When set to `false`, the built-in HTTP & WebSocket server is disabled and will not listen on any port. port: type: integer @@ -34,3 +34,5 @@ properties: The private x509 key used for server-side SSL encryption. example: /etc/ssl/private/mykey.pem + +additionalProperties: false diff --git a/doc/openapi/components/schemas/config/logging.yaml b/doc/openapi/components/schemas/config-logging.yaml similarity index 97% rename from doc/openapi/components/schemas/config/logging.yaml rename to doc/openapi/components/schemas/config-logging.yaml index 2d948b5bc..800474af8 100644 --- a/doc/openapi/components/schemas/config/logging.yaml +++ b/doc/openapi/components/schemas/config-logging.yaml @@ -5,7 +5,6 @@ type: object title: Logging configuration properties: - level: title: The log level description: | @@ -69,3 +68,6 @@ properties: - error - critical - 'off' + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/config.yaml b/doc/openapi/components/schemas/config.yaml index 6c0299399..cb99fad7e 100644 --- a/doc/openapi/components/schemas/config.yaml +++ b/doc/openapi/components/schemas/config.yaml @@ -2,39 +2,112 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- +$schema: http://json-schema.org/draft-07/schema + title: VILLASnode configuration file description: Schema of the VILLASnode configuration file. -allOf: -- type: object - required: - - nodes - - additionalProperties: false - - properties: - nodes: - type: object - title: Node list - description: | - A list of nodes to/from which this instance sends/receives sample data. - additionalProperties: - x-additionalPropertiesName: node-name - $ref: ./config/node_obj.yaml - - paths: - title: Path list - description: | - A list of uni-directional paths which connect the nodes defined in the `nodes` list. - type: array - default: [] - items: - $ref: config/path.yaml - - http: - $ref: config/http.yaml - - logging: - $ref: config/logging.yaml - -- $ref: config/global.yaml +type: object +additionalProperties: false +properties: + ethercat: + $ref: ./plugin-ethercat.yaml + + fpgas: + $ref: ./plugin-fpgas.yaml + + nodes: + title: Node Objects + description: | + A mapping from unique identifiers to node configurations. + + type: object + additionalProperties: + x-additionalPropertiesName: Node Name + $ref: ./node.yaml + + paths: + title: Path list + description: | + A list of uni-directional paths which connect the nodes defined in the `nodes` list. + + type: array + default: [] + items: + $ref: ./path.yaml + + http: + $ref: ./config-http.yaml + + logging: + $ref: ./config-logging.yaml + + hugepages: + type: integer + default: 100 + title: Number of reserved hugepages + description: | + The number of hugepages which will be reservered by the system. + + See: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt + + A value of zero will disable the use of huge pages. + + stats: + type: number + default: 1.0 + title: Statistics interval + description: | + Specifies the rate at which statistics about the active paths will be periodically printed to the screen. + + Setting this value to 5, will print 5 lines per second. + + A line includes information such as: + + - Source and Destination of path + - Messages received + - Messages sent + - Messages dropped + + affinity: + type: integer + default: 0 + title: Task/Process affinity mask + description: | + Restricts the exeuction of the daemon to certain CPU cores. + This technique, also called 'pinning', improves the determinism of the server by isolating the daemon processes on exclusive cores. + + A value of `0` will not change the affinity of the process. + + priority: + type: integer + default: 0 + description: | + Adjusts the scheduling priority of the deamon processes. + By default, the daemon uses a real-time optimized FIFO scheduling algorithm. + + A value of `0` will not change the priority of the process. + + idle_stop: + type: boolean + default: false + + uuid: + type: ["string", "null"] + format: uuid + title: Super-node UUID + default: null + description: | + Each VILLASnode instance is identified by a globally unique indentifier / UUID. + + This UUID can be queried by the API. + + If the setting is not provided, a UUID will be generated by hashing the active VILLASnode configuration. + This ensures that restarting the VILLASnode instance with the identical configuration will yield always the same UUID. + + seed: + type: integer + default: 0 + title: Random number generator seed + description: | + The seed for the random number generator used by the VILLASnode instance. diff --git a/doc/openapi/components/schemas/config/format.yaml b/doc/openapi/components/schemas/config/format.yaml deleted file mode 100644 index 38464cc81..000000000 --- a/doc/openapi/components/schemas/config/format.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -properties: - - real_precision: - type: integer - default: 17 - description: | - Output all real numbers with at most n digits of precision. The valid range for this setting is between 0 and 31 (inclusive), and other values result in an undefined behavior. - - By default, the precision is 17, to correctly and losslessly encode all IEEE 754 double precision floating point numbers. - - ts_origin: - type: boolean - default: true - description: | - If set, include the origin timestamp in the output. - - ts_received: - type: boolean - default: true - description: | - If set, include the received timestamp in the output. - - sequence: - type: boolean - default: true - description: | - If set, include the sequence number in the output. - - data: - type: boolean - default: true - description: | - If set, include the data in the output. - - offset: - type: boolean - default: true - description: | - If set, include the offset between origin and received timestamp in the output. diff --git a/doc/openapi/components/schemas/config/format_obj.yaml b/doc/openapi/components/schemas/config/format_obj.yaml deleted file mode 100644 index 29a847af6..000000000 --- a/doc/openapi/components/schemas/config/format_obj.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -title: Format Object -required: -- type - -properties: - type: - type: string - -discriminator: - propertyName: type - mapping: - csv: formats/_csv.yaml - gtnet: formats/_gtnet.yaml - iotagent_ul: formats/_iotagent_ul.yaml - json: formats/_json.yaml - json.edgeflex: formats/_json_edgeflex.yaml - json.kafka: formats/_json_kafka.yaml - json.reserve: formats/_json_reserve.yaml - opal.asyncip: formats/_opal_asyncip.yaml - protobuf: formats/_protobuf.yaml - raw: formats/_raw.yaml - tsv: formats/_tsv.yaml - value: formats/_value.yaml - villas.binary: formats/_villas_binary.yaml - villas.human: formats/_villas_human.yaml - villas.web: formats/_villas_web.yaml diff --git a/doc/openapi/components/schemas/config/format_spec.yaml b/doc/openapi/components/schemas/config/format_spec.yaml deleted file mode 100644 index 981161fef..000000000 --- a/doc/openapi/components/schemas/config/format_spec.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -description: | - The payload format which is used to encode and decode exchanged messages. -example: villas.human - -oneOf: -- $ref: format_obj.yaml -- title: Format Name - type: string - enum: - - csv - - gtnet - - iotagent_ul - - json - - json.edgeflex - - json.kafka - - json.reserve - - opal.asyncip - - protobuf - - raw - - tsv - - value - - villas.binary - - villas.human - - villas.web diff --git a/doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml b/doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml deleted file mode 100644 index f39b60ca6..000000000 --- a/doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: json_edgeflex.yaml diff --git a/doc/openapi/components/schemas/config/formats/_json_kafka.yaml b/doc/openapi/components/schemas/config/formats/_json_kafka.yaml deleted file mode 100644 index 0d7f2986c..000000000 --- a/doc/openapi/components/schemas/config/formats/_json_kafka.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: json_kafka.yaml diff --git a/doc/openapi/components/schemas/config/formats/_json_reserve.yaml b/doc/openapi/components/schemas/config/formats/_json_reserve.yaml deleted file mode 100644 index afcd37e24..000000000 --- a/doc/openapi/components/schemas/config/formats/_json_reserve.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: json_reserve.yaml diff --git a/doc/openapi/components/schemas/config/formats/_opal_asyncip.yaml b/doc/openapi/components/schemas/config/formats/_opal_asyncip.yaml deleted file mode 100644 index 5c6402be4..000000000 --- a/doc/openapi/components/schemas/config/formats/_opal_asyncip.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: opal_asyncip.yaml diff --git a/doc/openapi/components/schemas/config/formats/_protobuf.yaml b/doc/openapi/components/schemas/config/formats/_protobuf.yaml deleted file mode 100644 index b4d2f9f8a..000000000 --- a/doc/openapi/components/schemas/config/formats/_protobuf.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: protobuf.yaml diff --git a/doc/openapi/components/schemas/config/formats/_raw.yaml b/doc/openapi/components/schemas/config/formats/_raw.yaml deleted file mode 100644 index 51b0fb3fa..000000000 --- a/doc/openapi/components/schemas/config/formats/_raw.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: raw.yaml diff --git a/doc/openapi/components/schemas/config/formats/_tsv.yaml b/doc/openapi/components/schemas/config/formats/_tsv.yaml deleted file mode 100644 index a7c5c42b8..000000000 --- a/doc/openapi/components/schemas/config/formats/_tsv.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: tsv.yaml diff --git a/doc/openapi/components/schemas/config/formats/_value.yaml b/doc/openapi/components/schemas/config/formats/_value.yaml deleted file mode 100644 index ffe058b93..000000000 --- a/doc/openapi/components/schemas/config/formats/_value.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: value.yaml diff --git a/doc/openapi/components/schemas/config/formats/_villas_binary.yaml b/doc/openapi/components/schemas/config/formats/_villas_binary.yaml deleted file mode 100644 index 688161550..000000000 --- a/doc/openapi/components/schemas/config/formats/_villas_binary.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: villas_binary.yaml diff --git a/doc/openapi/components/schemas/config/formats/_villas_human.yaml b/doc/openapi/components/schemas/config/formats/_villas_human.yaml deleted file mode 100644 index 36a060b5a..000000000 --- a/doc/openapi/components/schemas/config/formats/_villas_human.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: villas_human.yaml diff --git a/doc/openapi/components/schemas/config/formats/_villas_web.yaml b/doc/openapi/components/schemas/config/formats/_villas_web.yaml deleted file mode 100644 index 64eb89eb6..000000000 --- a/doc/openapi/components/schemas/config/formats/_villas_web.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../format_obj.yaml -- $ref: villas_web.yaml diff --git a/doc/openapi/components/schemas/config/formats/column.yaml b/doc/openapi/components/schemas/config/formats/column.yaml deleted file mode 100644 index 17e26dc14..000000000 --- a/doc/openapi/components/schemas/config/formats/column.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: line.yaml diff --git a/doc/openapi/components/schemas/config/formats/csv.yaml b/doc/openapi/components/schemas/config/formats/csv.yaml deleted file mode 100644 index 47ce32c21..000000000 --- a/doc/openapi/components/schemas/config/formats/csv.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: column.yaml diff --git a/doc/openapi/components/schemas/config/formats/iotagent_ul.yaml b/doc/openapi/components/schemas/config/formats/iotagent_ul.yaml deleted file mode 100644 index e884bc98e..000000000 --- a/doc/openapi/components/schemas/config/formats/iotagent_ul.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/json.yaml b/doc/openapi/components/schemas/config/formats/json.yaml deleted file mode 100644 index 613cad40b..000000000 --- a/doc/openapi/components/schemas/config/formats/json.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - indent: - type: number - default: 0 - description: | - Pretty-print the result, using newlines between array and object items, and indenting with n spaces. - The valid range for n is between 0 and 31 (inclusive), other values result in an undefined output. - If the settings is not used or is 0, no newlines are inserted between array and object items. - - compact: - type: boolean - default: false - description: | - This flag enables a compact representation, i.e. sets the separator between array and object items to "," and between object keys and values to ":". - Without this flag, the corresponding separators are ", " and ": " for more readable output. - - ensure_ascii: - type: boolean - default: false - description: | - If this flag is used, the output is guaranteed to consist only of ASCII characters. - This is achieved by escaping all Unicode characters outside the ASCII range. - - sort_keys: - type: boolean - default: false - description: | - If this flag is used, all the objects in output are sorted by key. - This is useful e.g. if two JSON texts are diffed or visually compared. - - escape_slash: - type: boolean - default: false - description: - Escape the `/` characters in strings with `\/`. - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/json_edgeflex.yaml b/doc/openapi/components/schemas/config/formats/json_edgeflex.yaml deleted file mode 100644 index 842c450fe..000000000 --- a/doc/openapi/components/schemas/config/formats/json_edgeflex.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: json.yaml diff --git a/doc/openapi/components/schemas/config/formats/json_kafka.yaml b/doc/openapi/components/schemas/config/formats/json_kafka.yaml deleted file mode 100644 index 842c450fe..000000000 --- a/doc/openapi/components/schemas/config/formats/json_kafka.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: json.yaml diff --git a/doc/openapi/components/schemas/config/formats/json_reserve.yaml b/doc/openapi/components/schemas/config/formats/json_reserve.yaml deleted file mode 100644 index 842c450fe..000000000 --- a/doc/openapi/components/schemas/config/formats/json_reserve.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: json.yaml diff --git a/doc/openapi/components/schemas/config/formats/line.yaml b/doc/openapi/components/schemas/config/formats/line.yaml deleted file mode 100644 index ce0f1fa61..000000000 --- a/doc/openapi/components/schemas/config/formats/line.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2025 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - description: The character that separates lines. - default: "\\n" - - header: - description: Whether or not to emit a header. - type: boolean - default: true - - skip_first_line: - description: Whether or not to skip the first line of the input. - type: boolean - default: false - - comment_prefix: - description: Lines starting with this prefix are ignored. - type: string - default: "#" - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/opal_asyncip.yaml b/doc/openapi/components/schemas/config/formats/opal_asyncip.yaml deleted file mode 100644 index 7eb36fae2..000000000 --- a/doc/openapi/components/schemas/config/formats/opal_asyncip.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - dev_id: - type: integer - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/protobuf.yaml b/doc/openapi/components/schemas/config/formats/protobuf.yaml deleted file mode 100644 index e884bc98e..000000000 --- a/doc/openapi/components/schemas/config/formats/protobuf.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/raw.yaml b/doc/openapi/components/schemas/config/formats/raw.yaml deleted file mode 100644 index 28692de9e..000000000 --- a/doc/openapi/components/schemas/config/formats/raw.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - bits: - type: integer - default: 32 - description: Number of bits per signal. Must be one of 8, 16, 32, 64 or 128. - - endianess: - type: string - description: The endianess of the data. - default: little - enum: - - big - - little - - fake: - type: boolean - description: | - Send and interpret the first three signals of each sample as the following header fields: - - sequence number - - timestamp seconds - - timestamp nano-seconds - - default: false - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/tsv.yaml b/doc/openapi/components/schemas/config/formats/tsv.yaml deleted file mode 100644 index 47ce32c21..000000000 --- a/doc/openapi/components/schemas/config/formats/tsv.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: column.yaml diff --git a/doc/openapi/components/schemas/config/formats/value.yaml b/doc/openapi/components/schemas/config/formats/value.yaml deleted file mode 100644 index e884bc98e..000000000 --- a/doc/openapi/components/schemas/config/formats/value.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/villas_binary.yaml b/doc/openapi/components/schemas/config/formats/villas_binary.yaml deleted file mode 100644 index e884bc98e..000000000 --- a/doc/openapi/components/schemas/config/formats/villas_binary.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: ../format.yaml diff --git a/doc/openapi/components/schemas/config/formats/villas_human.yaml b/doc/openapi/components/schemas/config/formats/villas_human.yaml deleted file mode 100644 index 17e26dc14..000000000 --- a/doc/openapi/components/schemas/config/formats/villas_human.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: line.yaml diff --git a/doc/openapi/components/schemas/config/formats/villas_web.yaml b/doc/openapi/components/schemas/config/formats/villas_web.yaml deleted file mode 100644 index 69c91ead8..000000000 --- a/doc/openapi/components/schemas/config/formats/villas_web.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - delimiter: - type: string - -- $ref: villas_binary.yaml diff --git a/doc/openapi/components/schemas/config/global.yaml b/doc/openapi/components/schemas/config/global.yaml deleted file mode 100644 index 3f37130f7..000000000 --- a/doc/openapi/components/schemas/config/global.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object - -properties: - - hugepages: - type: integer - default: 100 - title: Number of reserved hugepages - description: | - The number of hugepages which will be reservered by the system. - - See: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt - - A value of zero will disable the use of huge pages. - - stats: - type: number - default: 1.0 - title: Statistics interval - description: | - Specifies the rate at which statistics about the active paths will be periodically printed to the screen. - - Setting this value to 5, will print 5 lines per second. - - A line includes information such as: - - - Source and Destination of path - - Messages received - - Messages sent - - Messages dropped - - affinity: - type: integer - default: 0 - title: Task/Process affinity mask - description: | - Restricts the exeuction of the daemon to certain CPU cores. - This technique, also called 'pinning', improves the determinism of the server by isolating the daemon processes on exclusive cores. - - A value of `0` will not change the affinity of the process. - - priority: - type: integer - default: 0 - description: | - Adjusts the scheduling priority of the deamon processes. - By default, the daemon uses a real-time optimized FIFO scheduling algorithm. - - A value of `0` will not change the priority of the process. - - idle_stop: - type: boolean - default: true - - uuid: - type: string - format: uuid - title: Super-node UUID - default: 'randomly generated' - description: | - Each VILLASnode instance is identified by a globally unique indentifier / UUID. - - This UUID can be queried by the API. - - If the setting is not provided, a UUID will be generated by hashing the active VILLASnode configuration. - This ensures that restarting the VILLASnode instance with the identical configuration will yield always the same UUID. - - seed: - type: integer - default: 0 - title: Random number generator seed - description: | - The seed for the random number generator used by the VILLASnode instance. - - If the setting is not provided, a random seed of 0 will be used. diff --git a/doc/openapi/components/schemas/config/hook.yaml b/doc/openapi/components/schemas/config/hook.yaml deleted file mode 100644 index 2579fa158..000000000 --- a/doc/openapi/components/schemas/config/hook.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -properties: - enabled: - type: boolean - default: true - description: An optional field which can be used to disable a hook. - - priority: - type: integer - default: 99 - description: | - The priority of this hook which determines the order in which hooks are executed. - Hooks with a lwoer priority are executed before ones with a higher priority. - - If no priority is configured, hooks are executed in the order they are configured in the configuration file. diff --git a/doc/openapi/components/schemas/config/hook_multi.yaml b/doc/openapi/components/schemas/config/hook_multi.yaml deleted file mode 100644 index 4fdd258b4..000000000 --- a/doc/openapi/components/schemas/config/hook_multi.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - signals: - type: array - description: A list of signal names to which this hook should be applied - example: - - busA.V - - busB.V - - busC.V - items: - type: string - description: The name of a signal to which this hook should be applied - -- $ref: ./hook.yaml diff --git a/doc/openapi/components/schemas/config/hook_obj.yaml b/doc/openapi/components/schemas/config/hook_obj.yaml deleted file mode 100644 index 38dc07929..000000000 --- a/doc/openapi/components/schemas/config/hook_obj.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -title: Hook Object -required: -- type - -properties: - type: - type: string - -discriminator: - propertyName: type - mapping: - average: hooks/_average.yaml - cast: hooks/_cast.yaml - decimate: hooks/_decimate.yaml - digest: hooks/_digest.yaml - dp: hooks/_dp.yaml - drop: hooks/_drop.yaml - dump: hooks/_dump.yaml - ebm: hooks/_ebm.yaml - fix: hooks/_fix.yaml - gate: hooks/_gate.yaml - jitter_calc: hooks/_jitter_calc.yaml - limit_rate: hooks/_limit_rate.yaml - limit_value: hooks/_limit_value.yaml - lua: hooks/_lua.yaml - ma: hooks/_ma.yaml - pmu_dft: hooks/_pmu_dft.yaml - pps_ts: hooks/_pps_ts.yaml - print: hooks/_print.yaml - reorder_ts: hooks/_reorder_ts.yaml - restart: hooks/_restart.yaml - rms: hooks/_rms.yaml - round: hooks/_round.yaml - scale: hooks/_scale.yaml - shift_seq: hooks/_shift_seq.yaml - shift_ts: hooks/_shift_ts.yaml - skip_first: hooks/_skip_first.yaml - stats: hooks/_stats.yaml - ts: hooks/_ts.yaml diff --git a/doc/openapi/components/schemas/config/hook_single.yaml b/doc/openapi/components/schemas/config/hook_single.yaml deleted file mode 100644 index 3e6b4cb67..000000000 --- a/doc/openapi/components/schemas/config/hook_single.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - signal: - type: string - description: The name of a signal to which this hook should be applied - example: busA.V - -- $ref: ./hook.yaml diff --git a/doc/openapi/components/schemas/config/hook_spec.yaml b/doc/openapi/components/schemas/config/hook_spec.yaml deleted file mode 100644 index f0776559c..000000000 --- a/doc/openapi/components/schemas/config/hook_spec.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -description: | - Hooks form a pipeline of steps which process, filter or alter sample data. -example: print - -oneOf: -- $ref: hook_obj.yaml -- title: Hook Name - type: string - enum: - - average - - cast - - decimate - - dp - - drop - - dump - - ebm - - fix - - gate - - jitter_calc - - limit_rate - - limit_value - - lua - - ma - - pmu_dft - - pps_ts - - print - - restart - - rms - - round - - scale - - shift_seq - - shift_ts - - skip_first - - stats - - ts diff --git a/doc/openapi/components/schemas/config/hooks/_average.yaml b/doc/openapi/components/schemas/config/hooks/_average.yaml deleted file mode 100644 index 460c5864c..000000000 --- a/doc/openapi/components/schemas/config/hooks/_average.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: average.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_cast.yaml b/doc/openapi/components/schemas/config/hooks/_cast.yaml deleted file mode 100644 index 56c9cf67f..000000000 --- a/doc/openapi/components/schemas/config/hooks/_cast.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: cast.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_decimate.yaml b/doc/openapi/components/schemas/config/hooks/_decimate.yaml deleted file mode 100644 index 12890d4a7..000000000 --- a/doc/openapi/components/schemas/config/hooks/_decimate.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: decimate.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_digest.yaml b/doc/openapi/components/schemas/config/hooks/_digest.yaml deleted file mode 100644 index d97530b19..000000000 --- a/doc/openapi/components/schemas/config/hooks/_digest.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: digest.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_dp.yaml b/doc/openapi/components/schemas/config/hooks/_dp.yaml deleted file mode 100644 index db8baf17d..000000000 --- a/doc/openapi/components/schemas/config/hooks/_dp.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: dp.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_drop.yaml b/doc/openapi/components/schemas/config/hooks/_drop.yaml deleted file mode 100644 index fb708c3e2..000000000 --- a/doc/openapi/components/schemas/config/hooks/_drop.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: drop.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_dump.yaml b/doc/openapi/components/schemas/config/hooks/_dump.yaml deleted file mode 100644 index 1bd301bb7..000000000 --- a/doc/openapi/components/schemas/config/hooks/_dump.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: dump.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_ebm.yaml b/doc/openapi/components/schemas/config/hooks/_ebm.yaml deleted file mode 100644 index 8d7e9b0b5..000000000 --- a/doc/openapi/components/schemas/config/hooks/_ebm.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: ebm.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_fix.yaml b/doc/openapi/components/schemas/config/hooks/_fix.yaml deleted file mode 100644 index 6221c3e7b..000000000 --- a/doc/openapi/components/schemas/config/hooks/_fix.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: fix.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_frame.yaml b/doc/openapi/components/schemas/config/hooks/_frame.yaml deleted file mode 100644 index 75bfcaa32..000000000 --- a/doc/openapi/components/schemas/config/hooks/_frame.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: frame.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_gate.yaml b/doc/openapi/components/schemas/config/hooks/_gate.yaml deleted file mode 100644 index b9d13bafa..000000000 --- a/doc/openapi/components/schemas/config/hooks/_gate.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: gate.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_jitter_calc.yaml b/doc/openapi/components/schemas/config/hooks/_jitter_calc.yaml deleted file mode 100644 index 4f251752e..000000000 --- a/doc/openapi/components/schemas/config/hooks/_jitter_calc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: jitter_calc.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_limit_rate.yaml b/doc/openapi/components/schemas/config/hooks/_limit_rate.yaml deleted file mode 100644 index 36f465543..000000000 --- a/doc/openapi/components/schemas/config/hooks/_limit_rate.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: limit_rate.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_limit_value.yaml b/doc/openapi/components/schemas/config/hooks/_limit_value.yaml deleted file mode 100644 index aa4ada76b..000000000 --- a/doc/openapi/components/schemas/config/hooks/_limit_value.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: limit_value.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_lua.yaml b/doc/openapi/components/schemas/config/hooks/_lua.yaml deleted file mode 100644 index 36a51c205..000000000 --- a/doc/openapi/components/schemas/config/hooks/_lua.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: lua.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_ma.yaml b/doc/openapi/components/schemas/config/hooks/_ma.yaml deleted file mode 100644 index 0754a5b2b..000000000 --- a/doc/openapi/components/schemas/config/hooks/_ma.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: ma.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_pmu_dft.yaml b/doc/openapi/components/schemas/config/hooks/_pmu_dft.yaml deleted file mode 100644 index 30d0d69ae..000000000 --- a/doc/openapi/components/schemas/config/hooks/_pmu_dft.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: pmu_dft.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_pps_ts.yaml b/doc/openapi/components/schemas/config/hooks/_pps_ts.yaml deleted file mode 100644 index fd6526fc0..000000000 --- a/doc/openapi/components/schemas/config/hooks/_pps_ts.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: pps_ts.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_print.yaml b/doc/openapi/components/schemas/config/hooks/_print.yaml deleted file mode 100644 index f5f908140..000000000 --- a/doc/openapi/components/schemas/config/hooks/_print.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: print.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_reorder_ts.yaml b/doc/openapi/components/schemas/config/hooks/_reorder_ts.yaml deleted file mode 100644 index 29cd52d64..000000000 --- a/doc/openapi/components/schemas/config/hooks/_reorder_ts.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: reorder_ts.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_restart.yaml b/doc/openapi/components/schemas/config/hooks/_restart.yaml deleted file mode 100644 index f01584c12..000000000 --- a/doc/openapi/components/schemas/config/hooks/_restart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: restart.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_rms.yaml b/doc/openapi/components/schemas/config/hooks/_rms.yaml deleted file mode 100644 index efa0b8af9..000000000 --- a/doc/openapi/components/schemas/config/hooks/_rms.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: rms.yaml -- type: object - required: - - window_size - properties: - window_size: - type: integer - minimum: 1 - example: 1000 - description: The number of samples in the window. diff --git a/doc/openapi/components/schemas/config/hooks/_round.yaml b/doc/openapi/components/schemas/config/hooks/_round.yaml deleted file mode 100644 index 7334d85c9..000000000 --- a/doc/openapi/components/schemas/config/hooks/_round.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: round.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_scale.yaml b/doc/openapi/components/schemas/config/hooks/_scale.yaml deleted file mode 100644 index f8ee9f8c9..000000000 --- a/doc/openapi/components/schemas/config/hooks/_scale.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: scale.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_shift_seq.yaml b/doc/openapi/components/schemas/config/hooks/_shift_seq.yaml deleted file mode 100644 index ee86e61b9..000000000 --- a/doc/openapi/components/schemas/config/hooks/_shift_seq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: shift_seq.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_shift_ts.yaml b/doc/openapi/components/schemas/config/hooks/_shift_ts.yaml deleted file mode 100644 index 2d2dceee0..000000000 --- a/doc/openapi/components/schemas/config/hooks/_shift_ts.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: shift_ts.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_skip_first.yaml b/doc/openapi/components/schemas/config/hooks/_skip_first.yaml deleted file mode 100644 index 00170ba1a..000000000 --- a/doc/openapi/components/schemas/config/hooks/_skip_first.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: skip_first.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_stats.yaml b/doc/openapi/components/schemas/config/hooks/_stats.yaml deleted file mode 100644 index a12bef088..000000000 --- a/doc/openapi/components/schemas/config/hooks/_stats.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: stats.yaml diff --git a/doc/openapi/components/schemas/config/hooks/_ts.yaml b/doc/openapi/components/schemas/config/hooks/_ts.yaml deleted file mode 100644 index 803400f5c..000000000 --- a/doc/openapi/components/schemas/config/hooks/_ts.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook_obj.yaml -- $ref: ts.yaml diff --git a/doc/openapi/components/schemas/config/hooks/average.yaml b/doc/openapi/components/schemas/config/hooks/average.yaml deleted file mode 100644 index 046d2a599..000000000 --- a/doc/openapi/components/schemas/config/hooks/average.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - offset - properties: - offset: - type: integer - description: | - The signal offset at which the average signal should be inserted. - - **Examples:** - - `0` inserts the averaged signal before all other signals in the sample - - `1` inserts the averaged signal after the first signal. - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/cast.yaml b/doc/openapi/components/schemas/config/hooks/cast.yaml deleted file mode 100644 index 176092ac4..000000000 --- a/doc/openapi/components/schemas/config/hooks/cast.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - new_type: - type: string - enum: - - integer - - float - - boolean - - complex - description: The type of the casted signal. - example: integer - new_name: - type: string - description: The new name of the casted signal. - example: BusA.V - new_unit: - type: string - description: The new unit of the casted signal. - example: V - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/decimate.yaml b/doc/openapi/components/schemas/config/hooks/decimate.yaml deleted file mode 100644 index 5fe375a39..000000000 --- a/doc/openapi/components/schemas/config/hooks/decimate.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - ratio - properties: - ratio: - type: integer - description: The decimation ratio. A value of 4 will skip every, but the 4th sample in a row. - example: 4 - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/digest.yaml b/doc/openapi/components/schemas/config/hooks/digest.yaml deleted file mode 100644 index 9887abe3a..000000000 --- a/doc/openapi/components/schemas/config/hooks/digest.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - uri - - algorithm - - properties: - uri: - description: The output file for digests. - example: digest.txt - type: string - - algorithm: - description: The algorithm used for calculating digests. - example: sha256 - type: string - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/dp.yaml b/doc/openapi/components/schemas/config/hooks/dp.yaml deleted file mode 100644 index 522e92de3..000000000 --- a/doc/openapi/components/schemas/config/hooks/dp.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - f0 - - harmonics - properties: - f0: - description: The fundamental frequency. - example: 50 - type: number - dt: - description: The timestep of the input samples. Exclusive with `rate` setting. - default: 50e-6 - type: number - rate: - type: number - description: The rate of the input samples. Exclusive with `dt` setting. - harmonics: - type: array - description: A list of selected harmonics which should be calculated. - example: [0, 1, 3, 5 ] - items: - type: integer - inverse: - description: Enable the calucation of the inverse transform. - type: boolean - default: false - -- $ref: ../hook_single.yaml diff --git a/doc/openapi/components/schemas/config/hooks/drop.yaml b/doc/openapi/components/schemas/config/hooks/drop.yaml deleted file mode 100644 index 38b20dcd1..000000000 --- a/doc/openapi/components/schemas/config/hooks/drop.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/dump.yaml b/doc/openapi/components/schemas/config/hooks/dump.yaml deleted file mode 100644 index 38b20dcd1..000000000 --- a/doc/openapi/components/schemas/config/hooks/dump.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/ebm.yaml b/doc/openapi/components/schemas/config/hooks/ebm.yaml deleted file mode 100644 index e39cfa1df..000000000 --- a/doc/openapi/components/schemas/config/hooks/ebm.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - phases - properties: - phases: - description: Signal indices for voltage & current values for each phase. - example: - - [0, 1] - - [2, 3] - - [4, 5] - type: array - items: - type: array - minItems: 2 - maxItems: 2 - items: - type: integer - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/fix.yaml b/doc/openapi/components/schemas/config/hooks/fix.yaml deleted file mode 100644 index 38b20dcd1..000000000 --- a/doc/openapi/components/schemas/config/hooks/fix.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/frame.yaml b/doc/openapi/components/schemas/config/hooks/frame.yaml deleted file mode 100644 index 6d5c6b4f9..000000000 --- a/doc/openapi/components/schemas/config/hooks/frame.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - trigger: - description: The trigger for new frames. - type: string - default: timestamp - enum: - - sequence - - timestamp - - interval: - description: The interval in which frames are annotated. - default: "1s" - $ref: ../../duration.yaml - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/gate.yaml b/doc/openapi/components/schemas/config/hooks/gate.yaml deleted file mode 100644 index bb5c54315..000000000 --- a/doc/openapi/components/schemas/config/hooks/gate.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - mode: - description: The triggering condition at which the gate opens. - type: string - default: rising_edge - enum: - - above - - below - - rising_edge - - falling_edge - threshold: - default: 0.5 - description: The threshold the signal needs to overcome before the gate opens. - type: number - duration: - description: The number of seconds for which the gate opens when the triggering condition is met. Exclusive with the `samples` setting. - type: number - samples: - description: The number if samples for which the gate opens when the triggering condition is met. Exclusive with the `duration` setting. - type: number - -- $ref: ../hook_single.yaml diff --git a/doc/openapi/components/schemas/config/hooks/jitter_calc.yaml b/doc/openapi/components/schemas/config/hooks/jitter_calc.yaml deleted file mode 100644 index 38b20dcd1..000000000 --- a/doc/openapi/components/schemas/config/hooks/jitter_calc.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/limit_rate.yaml b/doc/openapi/components/schemas/config/hooks/limit_rate.yaml deleted file mode 100644 index 87c3fcf84..000000000 --- a/doc/openapi/components/schemas/config/hooks/limit_rate.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - rate - properties: - rate: - type: number - description: The maximum sample rate in `1/s` before this hook will drop samples. - mode: - type: string - default: local - description: Timestamp which should be used for rate estimation. - enum: - - local - - received - - origin - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/limit_value.yaml b/doc/openapi/components/schemas/config/hooks/limit_value.yaml deleted file mode 100644 index 53a447175..000000000 --- a/doc/openapi/components/schemas/config/hooks/limit_value.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - min - - max - properties: - min: - description: The smallest value which will pass through the hook before getting clipped. - type: number - max: - description: The largest value which will pass through the hook before getting clipped. - type: number - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/lua.yaml b/doc/openapi/components/schemas/config/hooks/lua.yaml deleted file mode 100644 index 168fb6c2b..000000000 --- a/doc/openapi/components/schemas/config/hooks/lua.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - additionalProperties: - description: | - The Lua hook will pass the complete hook configuration to the `prepare()` Lua function. - So you can add arbitrary settings here which are then consumed by the Lua script. - - properties: - use_names: - type: boolean - default: true - description: Enables or disables the use of signal names in the `process()` Lua function. If disabled, numeric indices will be used. - - script: - type: string - description: | - Provide the path to a Lua script containing functions for the individual hook points. - Define some or all of the following functions in your Lua script: - - #### `prepare(cfg)` - - Called during initialization with a Lua table which contains the full hook configuration. - - #### `start()` - - Called when the associated node or path is started - - #### `stop()` - - Called when the associated node or path is stopped - - #### `restart()` - - Called when the associated node or path is restarted. - Falls back to `stop()` + `start()` if absent. - - #### `process(smp)` - - Called for each sample which is being processed. - The sample is passed as a Lua table with the following fields: - - - `sequence` The sequence number of the sample. - - `flags` The flags field of the sample. - - `ts_origin` The origin timestamp as a Lua table containing the following keys: - | Index | Description | - |:-- |:-- | - | 0 | seconds | - | 1 | nanoseconds | - - - `ts_received` The receive timestamp a Lua table containing the following keys: - | Index | Description | - |:-- |:-- | - | 0 | seconds | - | 1 | nanoseconds | - - - `data` The sample data as a Lua table container either numeric indices or the signal names depending on the 'use_names' option of the hook. - - #### `periodic()` - - Called periodically with the rate of @ref node-config-stats. - - signals: - description: | - A definition of signals which this hook will emit. - Here a list of signal definitions like @ref node-config-node-signals is expected. - type: array - items: - allOf: - - type: object - properties: - expression: - type: string - example: "math.sqrt(smp.data[0] ^ 2 + smp.data[1] ^ 2)" - description: | - An arbitrary Lua expression which will be evaluated and used for the value of the signal. - Note you can access the current sample using the global Lua variable `smp`. - # - $ref: ../signal_spec.yaml - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/ma.yaml b/doc/openapi/components/schemas/config/hooks/ma.yaml deleted file mode 100644 index 8f388e7b7..000000000 --- a/doc/openapi/components/schemas/config/hooks/ma.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - window_size: - type: integer - description: The size of the window (number of samples) which should be used for the moving average filter. - example: 100 - default: 0 - minimum: 0 - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/pmu_dft.yaml b/doc/openapi/components/schemas/config/hooks/pmu_dft.yaml deleted file mode 100644 index d79bcc8fd..000000000 --- a/doc/openapi/components/schemas/config/hooks/pmu_dft.yaml +++ /dev/null @@ -1,109 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - sample_rate - - start_frequency - - end_frequency - - frequency_resolution - - dft_rate - properties: - sample_rate: - type: integer - default: 0 - minimum: 0 - example: 10000 - description: The sampling rate of the input signal. - start_frequency: - type: number - minimum: 0 - example: 49.7 - description: The lowest frequency bin. - end_frequency: - type: number - example: 50.3 - minimum: 0 - description: The highest frequency bin. - frequency_resolution: - type: number - example: 0.1 - minimum: 0 - description: The frequency resolution of the DFT. - dft_rate: - type: integer - example: 1 - minimum: 1 - description: The number of phasor calculations performed per second. - window_size_factor: - type: integer - default: 1 - description: A factor that increases the automatically determined window size by a multiplicative factor. - window_type: - type: string - enum: - - flattop - - hamming - - hann - - none - default: none - description: The window type. - padding_type: - type: string - enum: - - zero - - signal_repeat - default: none - description: The padding type. - frequency_estimate_type: - type: string - enum: - - quadratic - default: none - description: The frequency estimation type. - pps_index: - type: integer - description: The signal index of the PPS signal. This is only needed if data dumper is active. - default: 0 - angle_unit: - type: string - enum: - - rad - - degree - default: rad - description: The unit of the phase angle. - add_channel_name: - type: boolean - default: false - description: Adds the name of the channel as a suffix to the signal name e.g `amplitude_ch1`. - timestamp_align: - enum: - - left - - center - - right - default: center - description: The timestamp alignment in respect to the window. - phase_offset: - type: number - default: 0.0 - example: 10.0 - description: An offset added to a calculated phase. - amplitude_offset: - type: number - default: 0.0 - example: 10.0 - description: An offset added to the calculated amplitude. - frequency_offset: - type: number - default: 0.0 - example: 0.2 - description: An offset added to the calculated frequency. - rocof_offset: - type: number - default: 0.0 - example: 1.0 - description: An offset added to the calculated RoCoF. This setting does not really make sense but is available for completeness reasons" - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/pps_ts.yaml b/doc/openapi/components/schemas/config/hooks/pps_ts.yaml deleted file mode 100644 index 5fb82e231..000000000 --- a/doc/openapi/components/schemas/config/hooks/pps_ts.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - expected_smp_rate - properties: - mode: - type: string - enum: - - simple - - horizon - default: simple - description: "The synchronization mode. The `horizon` mode is currently no recommended to use as it is not fully tested." - threshold: - type: number - default: 1.5 - description: "The signal level threshold of the PPS signal which is used to detect an edge." - expected_smp_rate: - type: integer - description: "The expected sampling rate of the input signal. Only important for a faster initialization." - horizon_estimation: - type: integer - default: 10 - horizon_compensation: - type: integer - default: 10 - -- $ref: ../hook_single.yaml diff --git a/doc/openapi/components/schemas/config/hooks/print.yaml b/doc/openapi/components/schemas/config/hooks/print.yaml deleted file mode 100644 index 53f2af846..000000000 --- a/doc/openapi/components/schemas/config/hooks/print.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - output: - type: string - default: '/dev/stdout' - description: An optional path to a file to which the samples processed by this hook will be written to. - format: - $ref: ../format_spec.yaml - prefix: - type: string - default: '' - description: An optional prefix which will be prepended to each line written by this hook to the output - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/reorder_ts.yaml b/doc/openapi/components/schemas/config/hooks/reorder_ts.yaml deleted file mode 100644 index 244782cf9..000000000 --- a/doc/openapi/components/schemas/config/hooks/reorder_ts.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - window_size: - description: | - The size of the window in which samples will be reordered. - This also represents the latency in number of samples introduced by this hook. - type: integer - default: 16 - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/restart.yaml b/doc/openapi/components/schemas/config/hooks/restart.yaml deleted file mode 100644 index 38b20dcd1..000000000 --- a/doc/openapi/components/schemas/config/hooks/restart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/rms.yaml b/doc/openapi/components/schemas/config/hooks/rms.yaml deleted file mode 100644 index 8f388e7b7..000000000 --- a/doc/openapi/components/schemas/config/hooks/rms.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - window_size: - type: integer - description: The size of the window (number of samples) which should be used for the moving average filter. - example: 100 - default: 0 - minimum: 0 - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/round.yaml b/doc/openapi/components/schemas/config/hooks/round.yaml deleted file mode 100644 index 70f0fb40f..000000000 --- a/doc/openapi/components/schemas/config/hooks/round.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - precision: - type: integer - default: 0 - example: 4 - description: The number of decimal digits to which the signal is rounded. - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/scale.yaml b/doc/openapi/components/schemas/config/hooks/scale.yaml deleted file mode 100644 index bb9e9ffbe..000000000 --- a/doc/openapi/components/schemas/config/hooks/scale.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - offset: - type: number - default: 0.0 - example: 100.5 - description: The offset which is added to the signal after gain. - gain: - type: number - default: 1.0 - example: 1e3 - description: The gain which is multiplied to the signal before the offset is added. - -- $ref: ../hook_multi.yaml diff --git a/doc/openapi/components/schemas/config/hooks/shift_seq.yaml b/doc/openapi/components/schemas/config/hooks/shift_seq.yaml deleted file mode 100644 index 88e63c8fe..000000000 --- a/doc/openapi/components/schemas/config/hooks/shift_seq.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - offset - properties: - offset: - type: integer - description: The offset which is added to the sequence number of each processed sample. - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/shift_ts.yaml b/doc/openapi/components/schemas/config/hooks/shift_ts.yaml deleted file mode 100644 index d2c3661aa..000000000 --- a/doc/openapi/components/schemas/config/hooks/shift_ts.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - offset - properties: - mode: - type: string - enum: - - origin - - ts_received - description: The timestamp field which should be adjusted by the `offset` setting. - offset: - type: number - description: The offset in seconds which is added to the timestamp field of each processed sample. - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/skip_first.yaml b/doc/openapi/components/schemas/config/hooks/skip_first.yaml deleted file mode 100644 index db26d1a9a..000000000 --- a/doc/openapi/components/schemas/config/hooks/skip_first.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - samples: - type: integer - description: The number of samples which should be dropped by this hook after a start or restart of the node/path. - seconds: - type: number - description: The number of seconds for which this hook should initially drop samples after a start or restart of the node/path. - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/stats.yaml b/doc/openapi/components/schemas/config/hooks/stats.yaml deleted file mode 100644 index 9cf3765be..000000000 --- a/doc/openapi/components/schemas/config/hooks/stats.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - buckets: - type: integer - default: 20 - description: The number of buckets which should be used for the underlying histograms. - warmup: - type: integer - default: 500 - description: Use the first `warmup` samples to estimate the bucket range of the underlying histograms. - verbose: - type: boolean - default: false - description: Include full dumps of the histogram buckets into the output. - output: - type: string - description: The file where you want to write the report to. If omitted, stdout (the terminal) will be used. - default: '/dev/stdout' - -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/hooks/ts.yaml b/doc/openapi/components/schemas/config/hooks/ts.yaml deleted file mode 100644 index 38b20dcd1..000000000 --- a/doc/openapi/components/schemas/config/hooks/ts.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../hook.yaml diff --git a/doc/openapi/components/schemas/config/node.yaml b/doc/openapi/components/schemas/config/node.yaml deleted file mode 100644 index d62e75182..000000000 --- a/doc/openapi/components/schemas/config/node.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -title: Node -properties: - - vectorize: - type: integer - default: 1 - description: | - This setting allows to send multiple samples in a single message to the destination nodes. - - The value of this setting determines how many samples will be combined into one packet. - - hooks: - $ref: hook_list.yaml - - builtin: - type: boolean - default: true - title: Builtin hook functions - description: | - By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled. - - in: - type: object - title: Input configuration (received by VILLASnode) - properties: - vectorize: - type: integer - minimum: 1 - - hooks: - $ref: hook_list.yaml - - out: - type: object - title: Output configuration (sent out by VILLASnode) - properties: - - vectorize: - type: integer - - hooks: - $ref: hook_list.yaml diff --git a/doc/openapi/components/schemas/config/node_obj.yaml b/doc/openapi/components/schemas/config/node_obj.yaml deleted file mode 100644 index e9cbf23c0..000000000 --- a/doc/openapi/components/schemas/config/node_obj.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -title: Node Object -required: -- type -properties: - type: - type: string - description: | - Specifies which protocol should be used by this node. - - For a complete list of supported node-types run `villas node --help`. - - In addition to the node settings described in this section, every node type has its own specific settings - -discriminator: - propertyName: type - mapping: - amqp: nodes/_amqp.yaml - c37.118: nodes/_c37_118.yaml - can: nodes/_can.yaml - comedi: nodes/_comedi.yaml - ethercat: nodes/_ethercat.yaml - example: nodes/_example.yaml - exec: nodes/_exec.yaml - file: nodes/_file.yaml - fpga: nodes/_fpga.yaml - iec60870-5-104: nodes/_iec60870-5-104.yaml - iec61850-8-1: nodes/_iec61850-8-1.yaml - iec61850-9-2: nodes/_iec61850-9-2.yaml - infiniband: nodes/_infiniband.yaml - influxdb: nodes/_influxdb.yaml - kafka: nodes/_kafka.yaml - loopback: nodes/_loopback.yaml - modbus: nodes/_modbus.yaml - mqtt: nodes/_mqtt.yaml - nanomsg: nodes/_nanomsg.yaml - ngsi: nodes/_ngsi.yaml - opal_async: nodes/_opal_async.yaml - opendss: nodes/_opendss.yaml - opal.orchestra: nodes/_opal_orchestra.yaml - redis: nodes/_redis.yaml - rtp: nodes/_rtp.yaml - shmem: nodes/_shmem.yaml - signal: nodes/_signal_node.yaml - signal.v2: nodes/_signal_v2_node.yaml - socket: nodes/_socket.yaml - stats_node: nodes/_stats_node.yaml - temper: nodes/_temper.yaml - test_rtt: nodes/_test_rtt.yaml - uldaq: nodes/_uldaq.yaml - webrtc: nodes/_webrtc.yaml - websocket: nodes/_websocket.yaml - zeromq: nodes/_zeromq.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_amqp.yaml b/doc/openapi/components/schemas/config/nodes/_amqp.yaml deleted file mode 100644 index b6cf3b342..000000000 --- a/doc/openapi/components/schemas/config/nodes/_amqp.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: amqp.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_can.yaml b/doc/openapi/components/schemas/config/nodes/_can.yaml deleted file mode 100644 index 35379af9e..000000000 --- a/doc/openapi/components/schemas/config/nodes/_can.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: can.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_comedi.yaml b/doc/openapi/components/schemas/config/nodes/_comedi.yaml deleted file mode 100644 index f604da3a6..000000000 --- a/doc/openapi/components/schemas/config/nodes/_comedi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: comedi.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_ethercat.yaml b/doc/openapi/components/schemas/config/nodes/_ethercat.yaml deleted file mode 100644 index 5bf4c87ef..000000000 --- a/doc/openapi/components/schemas/config/nodes/_ethercat.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: ethercat.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_example.yaml b/doc/openapi/components/schemas/config/nodes/_example.yaml deleted file mode 100644 index 9b768110b..000000000 --- a/doc/openapi/components/schemas/config/nodes/_example.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: example.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_exec.yaml b/doc/openapi/components/schemas/config/nodes/_exec.yaml deleted file mode 100644 index 99bb87eb1..000000000 --- a/doc/openapi/components/schemas/config/nodes/_exec.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: exec.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_file.yaml b/doc/openapi/components/schemas/config/nodes/_file.yaml deleted file mode 100644 index 3366cdf65..000000000 --- a/doc/openapi/components/schemas/config/nodes/_file.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: file.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_fpga.yaml b/doc/openapi/components/schemas/config/nodes/_fpga.yaml deleted file mode 100644 index 537105d09..000000000 --- a/doc/openapi/components/schemas/config/nodes/_fpga.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: fpga.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_iec60870-5-104.yaml b/doc/openapi/components/schemas/config/nodes/_iec60870-5-104.yaml deleted file mode 100644 index c3fc3fe20..000000000 --- a/doc/openapi/components/schemas/config/nodes/_iec60870-5-104.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: iec60870-5-104.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml b/doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml deleted file mode 100644 index 9d1354a31..000000000 --- a/doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: iec61850-8-1.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml b/doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml deleted file mode 100644 index cdcc44075..000000000 --- a/doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: iec61850-9-2.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_infiniband.yaml b/doc/openapi/components/schemas/config/nodes/_infiniband.yaml deleted file mode 100644 index 5a4eb4975..000000000 --- a/doc/openapi/components/schemas/config/nodes/_infiniband.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: infiniband.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_influxdb.yaml b/doc/openapi/components/schemas/config/nodes/_influxdb.yaml deleted file mode 100644 index 8da5a3d8b..000000000 --- a/doc/openapi/components/schemas/config/nodes/_influxdb.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: influxdb.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_kafka.yaml b/doc/openapi/components/schemas/config/nodes/_kafka.yaml deleted file mode 100644 index e976bbc48..000000000 --- a/doc/openapi/components/schemas/config/nodes/_kafka.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: kafka.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_loopback.yaml b/doc/openapi/components/schemas/config/nodes/_loopback.yaml deleted file mode 100644 index f9ed90504..000000000 --- a/doc/openapi/components/schemas/config/nodes/_loopback.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: loopback.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_modbus.yaml b/doc/openapi/components/schemas/config/nodes/_modbus.yaml deleted file mode 100644 index 2212b8bf5..000000000 --- a/doc/openapi/components/schemas/config/nodes/_modbus.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: modbus.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_mqtt.yaml b/doc/openapi/components/schemas/config/nodes/_mqtt.yaml deleted file mode 100644 index 4c1acf563..000000000 --- a/doc/openapi/components/schemas/config/nodes/_mqtt.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: mqtt.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_nanomsg.yaml b/doc/openapi/components/schemas/config/nodes/_nanomsg.yaml deleted file mode 100644 index 6e6dab14a..000000000 --- a/doc/openapi/components/schemas/config/nodes/_nanomsg.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: nanomsg.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_ngsi.yaml b/doc/openapi/components/schemas/config/nodes/_ngsi.yaml deleted file mode 100644 index ff89d23d3..000000000 --- a/doc/openapi/components/schemas/config/nodes/_ngsi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: ngsi.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_opal_async.yaml b/doc/openapi/components/schemas/config/nodes/_opal_async.yaml deleted file mode 100644 index e9fabe6ac..000000000 --- a/doc/openapi/components/schemas/config/nodes/_opal_async.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: opal_async.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_opal_orchestra.yaml b/doc/openapi/components/schemas/config/nodes/_opal_orchestra.yaml deleted file mode 100644 index b56efd75d..000000000 --- a/doc/openapi/components/schemas/config/nodes/_opal_orchestra.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: opal_orchestra.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_opendss.yaml b/doc/openapi/components/schemas/config/nodes/_opendss.yaml deleted file mode 100644 index 5706315b3..000000000 --- a/doc/openapi/components/schemas/config/nodes/_opendss.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: opendss.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_redis.yaml b/doc/openapi/components/schemas/config/nodes/_redis.yaml deleted file mode 100644 index 780474bc1..000000000 --- a/doc/openapi/components/schemas/config/nodes/_redis.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: redis.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_rtp.yaml b/doc/openapi/components/schemas/config/nodes/_rtp.yaml deleted file mode 100644 index 8fdc442f1..000000000 --- a/doc/openapi/components/schemas/config/nodes/_rtp.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: rtp.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_shmem.yaml b/doc/openapi/components/schemas/config/nodes/_shmem.yaml deleted file mode 100644 index 5abb56d35..000000000 --- a/doc/openapi/components/schemas/config/nodes/_shmem.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: shmem.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_signal_node.yaml b/doc/openapi/components/schemas/config/nodes/_signal_node.yaml deleted file mode 100644 index 71c7b902a..000000000 --- a/doc/openapi/components/schemas/config/nodes/_signal_node.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: signal_node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_signal_v2_node.yaml b/doc/openapi/components/schemas/config/nodes/_signal_v2_node.yaml deleted file mode 100644 index 1ec4a962e..000000000 --- a/doc/openapi/components/schemas/config/nodes/_signal_v2_node.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: signal_v2_node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_socket.yaml b/doc/openapi/components/schemas/config/nodes/_socket.yaml deleted file mode 100644 index 94da3b0f6..000000000 --- a/doc/openapi/components/schemas/config/nodes/_socket.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: socket.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_stats_node.yaml b/doc/openapi/components/schemas/config/nodes/_stats_node.yaml deleted file mode 100644 index 18fd2c320..000000000 --- a/doc/openapi/components/schemas/config/nodes/_stats_node.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: stats_node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_temper.yaml b/doc/openapi/components/schemas/config/nodes/_temper.yaml deleted file mode 100644 index 770d10a53..000000000 --- a/doc/openapi/components/schemas/config/nodes/_temper.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: temper.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_test_rtt.yaml b/doc/openapi/components/schemas/config/nodes/_test_rtt.yaml deleted file mode 100644 index ca76d63ff..000000000 --- a/doc/openapi/components/schemas/config/nodes/_test_rtt.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: test_rtt.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_uldaq.yaml b/doc/openapi/components/schemas/config/nodes/_uldaq.yaml deleted file mode 100644 index 3b082c334..000000000 --- a/doc/openapi/components/schemas/config/nodes/_uldaq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: uldaq.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_webrtc.yaml b/doc/openapi/components/schemas/config/nodes/_webrtc.yaml deleted file mode 100644 index 54838ac00..000000000 --- a/doc/openapi/components/schemas/config/nodes/_webrtc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: webrtc.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_websocket.yaml b/doc/openapi/components/schemas/config/nodes/_websocket.yaml deleted file mode 100644 index 7d0812792..000000000 --- a/doc/openapi/components/schemas/config/nodes/_websocket.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: websocket.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_zeromq.yaml b/doc/openapi/components/schemas/config/nodes/_zeromq.yaml deleted file mode 100644 index 4604ee28b..000000000 --- a/doc/openapi/components/schemas/config/nodes/_zeromq.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node_obj.yaml -- $ref: zeromq.yaml diff --git a/doc/openapi/components/schemas/config/nodes/amqp.yaml b/doc/openapi/components/schemas/config/nodes/amqp.yaml deleted file mode 100644 index b05d9a365..000000000 --- a/doc/openapi/components/schemas/config/nodes/amqp.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -title: Advanced Messaging & Queuing Protocol (AMQP) -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - uri: - type: string - format: uri - description: | - See also: https://www.rabbitmq.com/uri-spec.html - - exchange: - type: string - description: | - The name of the AMQP exchange the node will publish the messages to. - - routing_key: - type: string - description: | - The routing key of published messages as well as the routing key which is used to bind the subcriber queue. - - ssl: - description: | - Note: These settings are only used if the `uri` setting is using the `amqps://` schema. - - type: object - properties: - verify_hostname: - default: true, - - verify_peer: - default: true, - - ca_cert: - default: "/path/to/ca.crt" - - client_cert: - default: "/path/to/client.crt" - - client_key: - default: "/path/to/client.key" - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/can.yaml b/doc/openapi/components/schemas/config/nodes/can.yaml deleted file mode 100644 index 937c6e4ff..000000000 --- a/doc/openapi/components/schemas/config/nodes/can.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - interface_name: - type: string - description: Name of the Socket CAN interface - - in: - type: object - properties: - signals: - type: array - items: - $ref: ./signals/can_signal.yaml - - out: - type: object - properties: - signals: - type: array - items: - $ref: ./signals/can_signal.yaml - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/comedi.yaml b/doc/openapi/components/schemas/config/nodes/comedi.yaml deleted file mode 100644 index 13ea62adf..000000000 --- a/doc/openapi/components/schemas/config/nodes/comedi.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - rate - - signals - - properties: - subdevice: - type: integer - - bufsize: - type: integer - default: 16 - - signals: - type: array - items: - $ref: ./signals/comedi_signal.yaml - - rate: - type: integer - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/ethercat.yaml b/doc/openapi/components/schemas/config/nodes/ethercat.yaml deleted file mode 100644 index 5e379cab8..000000000 --- a/doc/openapi/components/schemas/config/nodes/ethercat.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - rate: - type: number - - in: - type: object - properties: - num_channels: - type: integer - - range: - type: number - - product_code: - type: integer - - vendor_id: - type: integer - - out: - type: object - properties: - num_channels: - type: integer - - range: - type: number - - product_code: - type: integer - - vendor_id: - type: integer - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/example.yaml b/doc/openapi/components/schemas/config/nodes/example.yaml deleted file mode 100644 index 9bb9b5f31..000000000 --- a/doc/openapi/components/schemas/config/nodes/example.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - setting1: - type: integer - minimum: 0 # Make sure any constraints of the values are checked by ExampleNode::check(). - maximum: 100 - default: 72 # Make sure the default values match ExampleNode::ExampleNode(). - description: A first setting - - setting2: - type: string - minimum: 0 - maximum: 10 - default: something - description: Another setting - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/exec.yaml b/doc/openapi/components/schemas/config/nodes/exec.yaml deleted file mode 100644 index b0f6085d7..000000000 --- a/doc/openapi/components/schemas/config/nodes/exec.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - shell: - type: boolean - default: false - description: | - If set, the `exec` setting gets passed the shell (`/usr/bin`). - In this case the `exec` setting must be given as a string. - - If not set, we will directly execute the sub-process via `execvpe(2)`. - In this case the exec setting must be given as an array (`argv[]`). - - exec: - description: | - The program which should be executed in the sub-process. - - The option is passed to the system shell for execution. - - oneOf: - - type: array - items: - type: string - - type: string - - flush: - type: boolean - default: true - description: | - Flush stream every time VILLASnode passes data the sub-process. - - working_directory: - type: string - description: | - If set, the working directory for the sub-process will be changed. - - environment: - type: object - description: | - A object of key/value pairs of environment variables which should be passed to the sub-process in addition to the parent environment. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/file.yaml b/doc/openapi/components/schemas/config/nodes/file.yaml deleted file mode 100644 index b407f551b..000000000 --- a/doc/openapi/components/schemas/config/nodes/file.yaml +++ /dev/null @@ -1,121 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - uri: - type: string - format: uri - description: | - Specifies the URI to a file from which is written to or read from depending in which group (`in`or `out`) is used. - - This setting allows to add special placeholders for time and date values. - See [strftime(3)](http://man7.org/linux/man-pages/man3/strftime.3.html) for a list of supported placeholder. - - **Example**: - - ``` - uri = "logs/measurements_%Y-%m-%d_%H-%M-%S.log" - ``` - - will create a file called: - - ``` - ./logs/measurements_2015-08-09_22-20-50.log - ``` - - in: - type: object - properties: - epoch: - type: number - - epoch_mode: - type: string - enum: - - direct - - wait - - relative - - absolute - description: | - The *epoch* describes the point in time when the first message will be read from the file. - This setting allows to select the behavior of the following `epoch` setting. - It can be used to adjust the point in time when the first value should be read. - - The behavior of `epoch` is depending on the value of `epoch_mode`. - - To facilitate the following description of supported `epoch_mode`'s, we will introduce some intermediate variables (timestamps). - Those variables will also been displayed during the startup phase of the server to simplify debugging. - - - `epoch` is the value of the `epoch` setting. - - `first` is the timestamp of the first message / line in the input file. - - `offset` will be added to the timestamps in the file to obtain the real time when the message will be sent. - - `start` is the point in time when the first message will be sent (`first + offset`). - - `eta` the time to wait until the first message will be send (`start - now`) - - The supported values for `epoch_mode`: - - | `epoch_mode` | `offset` | `start = first + offset` | - | :-- | :-- | :-- | - | `direct` | `now - first + epoch` | `now + epoch` | - | `wait` | `now + epoch` | `now + first` | - | `relative` | `epoch` | `first + epoch` | - | `absolute` | `epoch - first` | `epoch` | - | `original` | `0` | immediately | - - rate: - type: number - default: 0 - description: | - By default `send_rate` has the value `0` which means that the time between consecutive samples is the same as in the `in` file based on the timestamps in the first column. - - If this setting has a non-zero value, the default behavior is overwritten with a fixed rate. - - eof: - type: string - default: exit - enum: - - rewind - - wait - - exit - - description: | - Defines the behavior if the end of file of the input file is reached. - - - `rewind` will rewind the file pointer and restart reading samples from the beginning of the file. - - `exit` will terminated the program. - - `wait` will periodically test if there are new samples which have been appended to the file. - - buffer_size: - type: integer - minimum: 0 - default: 0 - description: | - Similar to the [`out.buffer_size` setting](#out-buffer_size). This means that the data is loaded into the buffer before it is passed on to the node. - - If `in.buffer_size = 0`, no buffer will be generated. - - out: - type: object - properties: - flush: - type: boolean - description: | - With this setting enabled, the outgoing file is flushed whenever new samples have been written to it. - - buffer_size: - type: integer - default: 0 - minimum: 0 - description: | - If this is set to a positive value ``, the node will generate a full [stream buffer](https://linux.die.net/man/3/setvbuf) with a size of `` bytes. This means that the data is buffered and not written until the buffer is full or until the node is stopped. - - If `out.buffer_size = 0`, no buffer will be generated. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/fpga.yaml b/doc/openapi/components/schemas/config/nodes/fpga.yaml deleted file mode 100644 index 86c508cc1..000000000 --- a/doc/openapi/components/schemas/config/nodes/fpga.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/iec60870-5-104.yaml b/doc/openapi/components/schemas/config/nodes/iec60870-5-104.yaml deleted file mode 100644 index cf26d0063..000000000 --- a/doc/openapi/components/schemas/config/nodes/iec60870-5-104.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - - in: - type: object - properties: - signals: - $ref: ../signal_list.yaml - - out: - type: object - properties: - duplicate_ioa_is_sequence: - type: boolean - default: false - description: | - Treat consecutive signals with the same IOA as a sequence by assigning subsequent IOAs. - - signals: - type: array - items: - $ref: ./signals/iec60870_signal.yaml - - address: - type: string - default: localhost - description: | - Hostname or IP address for the IEC60870 slave to listen on. - - port: - type: number - default: 2404 - description: | - Port number of the IEC60870 slave. - - ca: - type: number - default: 1 - description: | - Common Address of the IEC60870 slave. - - low_priority_queue: - type: number - default: 100 - description: | - Message queue size for the periodic messages (increase on dropped simulation data messages). - - high_priority_queue: - type: number - default: 100 - description: | - Message queue size for interrogation responses (increase on missing signals in interrogation response). - - apci_t0: - type: number - - apci_t1: - type: number - - apci_t2: - type: number - - apci_t3: - type: number - - apci_k: - type: number - - apci_w: - type: number - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml b/doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml deleted file mode 100644 index e60f96851..000000000 --- a/doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- $ref: ../node.yaml -- type: object - properties: - in: - type: object - properties: - signals: - $ref: ./signals/iec61850_goose_subscriber_signal.yaml - - interface: - type: string - - with_timestamp: - type: boolean - - subscribers: - type: object - additionalProperties: - type: object - required: - - go_cb_ref - properties: - go_cb_ref: - type: string - - dst_address: - type: string - - app_id: - type: integer - - trigger: - type: string - enum: - - always - - change - default: always - - out: - type: object - properties: - signals: - $ref: ../signal_list.yaml - - resend_interval: - type: number - default: 1 - description: | - Time interval for periodic resend of last sample in floating point seconds. - - interface: - type: string - default: localhost - description: | - Name of the ethernet interface to send on. - - publishers: - type: array - items: - type: object - properties: - go_id: - type: string - go_cb_ref: - type: string - data_set_ref: - type: string - dst_address: - type: string - app_id: - type: integer - conf_rev: - type: integer - time_allowed_to_live: - type: integer - burst: - type: integer - data: - type: array - items: - $ref: ./signals/iec61850_goose_publisher_data.yaml diff --git a/doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml b/doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml deleted file mode 100644 index 2e1b6bbc1..000000000 --- a/doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - interface - properties: - in: - type: object - properties: - check_dst_address: - type: boolean - default: false - - signals: - type: array - items: - $ref: ./signals/iec61850_signal.yaml - - out: - type: object - required: - - signals - - sv_id - properties: - signals: - type: array - items: - $ref: ./signals/iec61850_signal.yaml - - sv_id: - type: string - - conf_rev: - type: integer - - smp_mod: - type: string - enum: - - per_nominal_period - - samples_per_second - - seconds_per_sample - - smp_synch: - type: string - enum: - - not_synchronized - - local_clock - - global_clock - - smp_rate: - type: integer - - vlan: - type: object - properties: - enabled: - type: boolean - default: true - - id: - type: integer - default: 0 - - priority: - type: integer - default: 4 - - interface: - type: string - description: Name of network interface to/from which this node will publish/subscribe for SV frames. - - app_id: - type: integer - default: 0x4000 - - dst_address: - type: string - default: 01:0c:cd:01:00:01 - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/infiniband.yaml b/doc/openapi/components/schemas/config/nodes/infiniband.yaml deleted file mode 100644 index fc8ad85b6..000000000 --- a/doc/openapi/components/schemas/config/nodes/infiniband.yaml +++ /dev/null @@ -1,197 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - - rdma_port_space: - type: string - enum: - - RC - - UC - - UD - default: RC - description: | - This specifies the type of connection the node will set up. - - * `RC` provides reliable, connection-oriented, message based communication between the nodes. Packets are delivered in order. In this mode, one Queue Pair is connected to one other Queue Pair. - * `UC` provides unreliable, connection-oriented, message based communication between the nodes. This service type is not officially supported by the RDMA communication manager and is implemented for scientific purposes in VILLASnode. The InfiniBand node-type source code provides information on how to enable this service type. - * `UD` provides unreliable, connection-less, datagram communication between nodes. Both ordering and delivery are not guaranteed in this mode. - - `RC`, `UC`, and `UD` are mapped to the Queue Pair types as `RDMA_PS_TCP`/`IBV_QPT_RC`, `RDMA_PS_IPOIB`/`IBV_QPT_UC`, and `RDMA_PS_UDP`/`IBV_QPT_UD`, respectively. - If two nodes should be connected, both should be set to the same `rdma_port_space`. - - More information on these two modes can be found on the manual page for [`rdma_create_id()`](https://linux.die.net/man/3/rdma_create_id). - - in: - type: object - properties: - address: - type: string - description: | - Connections between `infiniband` nodes are established over IP over IB (IPoIP). - To use this node, you have to make sure that the linux driver `ib_ipoib` is loaded. - If it is not loaded, load it with `modprobe ib_ipoib`. - - If it is loaded, you have to make sure that the Host Channel Adapters (HCAs) have an IP address. - You can configure the IP address of the Infiniband HCA with the `ifconfig` utility, exactly like you would configure normal Ethernet adapters. - - As soon as an IP is set for the local HCA, this entry can be used to point to the adapter and to define the port which will be used for connection related communication. - - **Example**: - - ``` - in = { - address="10.0.0.1:1337" - } - ``` - - binds the node to the local device which is bound to `10.0.0.1`. It will use port `1337` for communication related to the connection. - - max_wrs: - type: integer - default: 128 - description: | - Before a packet can be received with Infiniband, the application has to describe how this will be handled (e.g., to what address the data will be written). - This happens in a so called Work Request (WR). - - `in.max_wrs` sets the maximum number of receive Work Requests which can be posted to the receive queue of the Queue Pair. - - For higher throughput, it is recommended to increase this value since it will serve as a buffer. - - cq_size: - type: integer - default: 128 - description: | - This value defines the number of Work Completions the Completion Queue can hold. - - If a packet is received, the Queue Pair will write a Work Completion to the Completion Queue. - The node polls this queue to process received packets. If the Completion Queue gets full, which is often caused by `cq_size` being to small, and thus the receive queue is not able to post Work Completions, the node will abort. - - If a connection is disconnected, all outstanding Work Requests—even is they are not used—are flushed to the Completion Queue. - Here applies the same as mentioned above: if the Completion Queue has fewer space left than outstanding Work Requests are available, this will result in an error. - - It is therefor recommended to set the value of `cq_size` to at least - - ``` - in.cq_size >= in.max_wrs - in.buffer_subtraction - ``` - - buffer_subtraction: - type: integer - default: 16 - description: | - As mentioned in the `in.max_wrs` settings, Work Requests have to be present in the receive queue, for it to be able to process received data. - To take full advantage of the zero-copy capabilities of Infiniband this node-type directly posts addresses from the VILLASnode to the receive queue instead of copying all data over after receiving it. - - This technique relies on the exchange of addresses. This means that if an array of `in.vectorize` addresses is handed over to the node-type, max `release` <= `in.vectorize` addresses that point to received data can be returned. - - Furthermore, if `release` addresses should be returned, `release` addresses from the original array must be posted to the receive queue. - To ensure that we can always post at least `in.vectorize` new samples to the receive queue, `in.buffer_subtraction` must always be bigger than `in.vectorize`. - - A second factor is performance: if `in.buffer_subtraction` is too small it might take long before the node starts to process data since it has to fill almost the complete queue first. - If `in.buffer_subtraction` is too big, the receive buffer might be too small. - - Thus, the maximum number of Work Requests to be present in the receive queue is defined as follows: - - ```c - max_wrs_posted = in.max_wrs - in.buffer_subtraction - ``` - out: - type: object - properties: - address: - type: string - description: | - This value defines the IPoIB address of the remote node and is used to establish a connection to the remote host—in case of `RDMA_PS_TCP`—or to get the address handle of the remote host—in case of `RDMA_PS_UDP`. - - This is similar to `in.address`. - - `out.address` has no default value and if it is not defined the node will be set to listening mode and all `out` configuration will be ignored. - - **Example**: - - ``` - out = { - address = "10.0.0.1:1337" - } - ``` - - timeout: - type: integer - default: 1000 - description: | - This defines the time in milliseconds [`rdma_resolve_addr()`](https://linux.die.net/man/3/rdma_resolve_addr) waits for the resolution of the destination address to complete. - - max_wrs: - type: integer - default: 128 - description: | - This is similar to `in.max_wrs` but for the send side of the Queue Pair. - In contrast to the receive queue, there is no minimum amount of Work Requests in this queue and it can be filled up completely to `out.max_wrs`. - - cq_size: - type: integer - default: 128 - description: | - This is similar to `in.cq_size`. - - An important side note for the receive completion queue was that it should be able to hold all Work Requests if the receive queue is flushed. - Since no "preparatory" Work Requests are posted to the send queue and and thus all work requests are send out as soon as possible, there is no need for `out.cq_size` to be as big as `out.max_wrs`. - - send_inline: - type: boolean - default: true - description: | - It is possible that the CPU copies the data to be sent directly to the HCA. - Then, the HCA can take the data from it's internal memory as soon as it is ready to send it. - This has the advantage that the buffer can be returned immediately to the VILLASnode and that it increases performance. - - If this flag is set, the [`infiniband`](../nodes/infiniband.md) node-type checks if a sample is small enough to be sent inline, and if this is the case sends it inline. - - max_inline_data: - type: integer - default: 0 - description: | - This value represents the maximum number of bytes to be send inline. - The maximum number of this value depends on the HCA. - The settings defaults to zero. However, many HCAs will automatically adjust it to 60. - - *Important note*: The greater this value gets, the smaller `out.max_wrs` can be. If `out.max_inline_data` is too big for the number specified in `out.max_wrs`, the node will return an error that the Queue Pair could not be created. - Since this is different for various HCAs, it is not possible for us to give more specified errors. - - **Example**: - - ``` - out = { - send_inline = 1, - max_inline_data = 60 - } - ``` - - Every sample which is smaller than 60 bytes will be send inline. All other samples will be sent normally. - - use_fallback: - type: boolean - default: true - description: | - If an out section with a valid remote entry is present in the configuration file, the node will first bind to the local host channel adapter and subsequentially try to connect to the remote host. - If the latter fails (e.g., because the remote host was not reachable or rejected the connection), there are two possible outcomes: the node can throw an error and abort or it can show a warning and continue in listening mode. - - If `use_fallback = true`, the node will fallback to listening mode if it is not able to connect to the remote host. - - periodic_signaling: - type: integer - default: - description: | - If a sample is sent inline, no Completion Queue Entry (CQE) is generated. - However, once a while, a CQE must be generated to prevent the Send Queue from overflowing. - Therefore, every `out.periodic_signaling`th sample will be sent normally with signaling. - - It turns out that the ideal value in most cases is `out.max_wrs / 2`. - Hence, usually, it is not necessary to explicitly set this value. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/influxdb.yaml b/doc/openapi/components/schemas/config/nodes/influxdb.yaml deleted file mode 100644 index c6718946f..000000000 --- a/doc/openapi/components/schemas/config/nodes/influxdb.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - server: - type: string - description: A hostname/port combination of the InfluxDB database server. - - key: - type: string - description: | - The key is the measurement name and any optional tags separated by commas. - - See also: [InfluxDB documentation](https://docs.influxdata.com/influxdb/v0.9/write_protocols/line/#key). - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/kafka.yaml b/doc/openapi/components/schemas/config/nodes/kafka.yaml deleted file mode 100644 index a86024f8f..000000000 --- a/doc/openapi/components/schemas/config/nodes/kafka.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - server - - client_id - properties: - format: - $ref: ../format_spec.yaml - - server: - type: string - description: | - The bootstrap server `{ip}:{port}` of the Kafka message brokers cluster. - - protocol: - type: string - enum: - - PLAINTEXT - - SASL_PLAINTEXT - - SASL_SSL - - SSL - description: | - The [security protocol](https://kafka.apache.org/24/javadoc/org/apache/kafka/common/security/auth/SecurityProtocol.html) which is used for authentication with the Kafka cluster. - - client_id: - type: string - description: The Kafka client identifier. - - ssl: - type: object - properties: - ca: - type: string - description: Path to a Certificate Authority (CA) bundle which is used to validate broker server certificate. - - sasl: - type: object - description: | - An object for configuring the SASL authentication against the broker. - This setting is used if the `protocol` setting is on of `SASL_PLAINTEXT` or `SASL_SSL`. - - properties: - mechanisms: - type: string - - username: - type: string - - password: - type: string - - in: - type: object - properties: - consume: - type: string - description: The Kafka topic to which this node-type will subscribe for receiving messages. - - group_id: - type: string - description: The group id of the Kafka client used for receiving messages. - - out: - type: object - properties: - produce: - type: string - description: The Kafka topic to which this node-type will publish messages. - - timeout: - type: number - description: A timeout in seconds for the broker connection. - default: 1.0 - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/loopback.yaml b/doc/openapi/components/schemas/config/nodes/loopback.yaml deleted file mode 100644 index 79ddb8800..000000000 --- a/doc/openapi/components/schemas/config/nodes/loopback.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - - queuelen: - type: integer - minimum: 0 - description: The queue length of the internal queue which buffers the samples. - - samplelen: - type: integer - minimum: 0 - description: The number of values each buffered sample can store. - - mode: - type: string - enum: - - pthread - - polling - - pipe - - eventfd - - auto - default: auto - description: Specify the synchronization mode of the internal queue. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/modbus.yaml b/doc/openapi/components/schemas/config/nodes/modbus.yaml deleted file mode 100644 index a989ea7e1..000000000 --- a/doc/openapi/components/schemas/config/nodes/modbus.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: [transport] - properties: - response_timeout: - type: number - description: The timeout in seconds when waiting for responses from a Modbus server. - example: 1.0 - - rate: - type: number - description: The rate at which Modbus device registers are queried for changes. - example: 1.0 - - in: - type: object - properties: - signals: - type: array - items: - $ref: ./signals/modbus_signal.yaml - - out: - type: object - properties: - signals: - type: array - items: - $ref: ./signals/modbus_signal.yaml - - transport: - type: string - description: The transport protocol used for Modbus communication. - enum: - - tcp - - rtu - - discriminator: - propertyName: transport - mapping: - tcp: ./modbus_tcp.yaml - rtu: ./modbus_rtu.yaml - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/modbus_common.yaml b/doc/openapi/components/schemas/config/nodes/modbus_common.yaml deleted file mode 100644 index fd27ffcc8..000000000 --- a/doc/openapi/components/schemas/config/nodes/modbus_common.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -properties: - response_timeout: - type: number - description: The timeout in seconds when waiting for responses from a Modbus server. - example: 1.0 - - rate: - type: number - description: The rate at which Modbus device registers are queried for changes. - example: 1.0 - - in: - type: object - properties: - signals: - type: array - items: - $ref: ./signals/modbus_signal.yaml - - out: - type: object - properties: - signals: - type: array - items: - $ref: ./signals/modbus_signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/modbus_rtu.yaml b/doc/openapi/components/schemas/config/nodes/modbus_rtu.yaml deleted file mode 100644 index 78e62e1a6..000000000 --- a/doc/openapi/components/schemas/config/nodes/modbus_rtu.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -required: [device, baudrate, parity, data_bits, stop_bits, unit] - -properties: - - device: - type: string - description: Path to the serial device file. - example: /dev/ttyS0 - - baudrate: - type: integer - description: The baudrate used for serial communication. - example: 9600 - - parity: - type: string - enum: - - none - - even - - odd - description: The parity used for serial communication. - example: none - - data_bits: - type: integer - description: The data bits used for serial communication. - minimum: 5 - maximum: 8 - example: 5 - - stop_bits: - type: integer - description: The stop bits used for serial communication. - minimum: 1 - maximum: 2 - example: 1 - - unit: - type: integer - description: The addressed unit used for serial communication. This is optional for TCP. - minimum: 0 - maximum: 65535 - example: 1 diff --git a/doc/openapi/components/schemas/config/nodes/modbus_tcp.yaml b/doc/openapi/components/schemas/config/nodes/modbus_tcp.yaml deleted file mode 100644 index 05573d1fe..000000000 --- a/doc/openapi/components/schemas/config/nodes/modbus_tcp.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -required: [remote] - -properties: - - remote: - type: string - description: The hostname or IP of the Modbus TCP device. - example: example.com - - port: - type: integer - description: The port number of the Modbus TCP device. - default: 1883 - - unit: - type: integer - description: The addressed unit used for serial communication. This is optional for TCP. - minimum: 0 - maximum: 65535 - example: 1 diff --git a/doc/openapi/components/schemas/config/nodes/mqtt.yaml b/doc/openapi/components/schemas/config/nodes/mqtt.yaml deleted file mode 100644 index b96b0387c..000000000 --- a/doc/openapi/components/schemas/config/nodes/mqtt.yaml +++ /dev/null @@ -1,114 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - host - properties: - format: - $ref: ../format_spec.yaml - - in: - type: object - properties: - subscribe: - type: string - description: Topic to which this node subscribes. - - out: - type: object - properties: - publish: - type: string - description: Topic to which this node publishes. - - username: - type: string - description: The username which is used for authentication with the MQTT broker. - - password: - type: string - description: The username which is used for authentication with the MQTT broker. - - host: - type: string - description: The hostname of the MQTT broker. - example: example.com - - port: - type: integer - description: The port number of the MQTT broker. - default: 1883 - - retain: - type: boolean - description: Set to true to make the will a retained message. - default: false - - keepalive: - type: integer - default: 5 - description: The MQTT keepalive value. - - qos: - type: integer - default: 0 - description: The quality of service (QoS) to use for the subscription. - - ssl: - type: object - properties: - - enabled: - type: boolean - default: true - - insecure: - type: boolean - - cafile: - type: string - description: Path to a file containing the PEM encoded trusted CA certificate file. - - capath: - type: string - description: Path to a directory containing the PEM encoded trusted CA certificate files. - - certfile: - type: string - description: Path to a file containing the PEM encoded certificate file for this client. - - keyfile: - type: string - description: Path to a file containing the PEM encoded private key for this client. - - cipher: - type: string - description: A string describing the ciphers available for use. See the `openssl ciphers` tool for more information. - - verify: - type: boolean - default: true - description: | - Configure verification of the server hostname in the server certificate. - If value is set to true, it is impossible to guarantee that the host you are connecting to is not impersonating your server. - This can be useful in initial server testing, but makes it possible for a malicious third party to impersonate your server through DNS spoofing, for example. - Do not use this function in a real system. - Setting value to true makes the connection encryption pointless. - - tls_version: - type: string - enum: - - tlsv1 - - tlsv1.1 - - tlsv1.2 - description: | - The version of the SSL/TLS protocol to use as a string. - If not set, the default value is used. The default value and the available values depend on the version of openssl that the library was compiled against. - For openssl >= 1.0.1, the available options are tlsv1.2, tlsv1.1 and tlsv1, with tlv1.2 as the default. - For openssl < 1.0.1, only tlsv1 is available. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/nanomsg.yaml b/doc/openapi/components/schemas/config/nodes/nanomsg.yaml deleted file mode 100644 index f83a50a32..000000000 --- a/doc/openapi/components/schemas/config/nodes/nanomsg.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - publish: - description: A single endpoint URI or list of URIs on which this node should listen for subscribers. - oneOf: - - type: string - format: uri - - type: array - items: - type: string - format: uri - - subscribe: - description: A single endpoint URI or list of URIs pointing to which this node should connect to as a subscriber. - oneOf: - - type: string - format: uri - - type: array - items: - type: string - format: uri - - out: - type: object - properties: - netem: - $ref: ../netem.yaml - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/ngsi.yaml b/doc/openapi/components/schemas/config/nodes/ngsi.yaml deleted file mode 100644 index 76a986df7..000000000 --- a/doc/openapi/components/schemas/config/nodes/ngsi.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - endpoint - properties: - endpoint: - type: string - format: uri - - entity_id: - type: string - description: ID of NGSI entity. - - entity_type: - type: string - description: Type of NGSI entity. - - ssl_verify: - type: boolean - description: Verify SSL certificate against local trust store. - - timeout: - description: Timeout in seconds for HTTP requests. - type: number - default: 1.0 - - rate: - description: Polling rate in Hz for requesting entity updates from broker. - type: number - default: 1.0 - - access_token: - type: string - description: Send 'Auth-Token' header with every HTTP request. - - create: - type: boolean - default: true - description: Create NGSI entities during startup of node. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/opal_async.yaml b/doc/openapi/components/schemas/config/nodes/opal_async.yaml deleted file mode 100644 index 165bbb6c1..000000000 --- a/doc/openapi/components/schemas/config/nodes/opal_async.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# Author: Steffen Vogel -# SPDX-FileCopyrightText: 2023-2025 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: - - type: object - properties: - id: - description: The Send/Recv ID of the RT-Lab OpAsyncSend/Recv blocks. - minimum: 1 - default: 1 - type: integer - - in: - type: object - properties: - reply: - description: Send a confirmation to the Simulink model that signals have been received and processed. - default: false - type: boolean - - shmem: - description: Shared-memory parameters for communication with OpAsyncGenCtrl block of Simulink model. - type: object - required: - - async_name - - async_size - - system_ctrl_name - properties: - async_name: - description: Name of the shared memory region used for data exchange with the Simulink model. - type: string - async_size: - description: Size of the shared memory region used for data exchange with the Simulink model. - type: integer - system_ctrl_name: - description: Name of the shared memory region used for logging. - type: string - - - $ref: ../node_signals.yaml - - $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/opal_orchestra.yaml b/doc/openapi/components/schemas/config/nodes/opal_orchestra.yaml deleted file mode 100644 index 816bbee25..000000000 --- a/doc/openapi/components/schemas/config/nodes/opal_orchestra.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - domain: - type: string - description: >- - The name of the domain to which the connection is requested. This domain must exist in the DDF read by an RT-LAB subsystem. - - synchronous: - type: boolean - description: >- - Determines whether domain participants exchange simulation data synchronously or asynchronously. - - states: - type: boolean - - connection: - $ref: ./opal_orchestra_connection.yaml - - ddf: - type: string - description: >- - The path to the DDF file that describes the data exchanged in the specified domain. - - connect_timeout: - $ref: ../duration.yaml - default: 5s - description: >- - The duration after which a failed connection attempt times out. - - flag_delay: - $ref: ../duration.yaml - default: 0s - description: >- - Forces the local Orchestra communication to be made with flags instead of semaphores when using an external communication process. - Flags are recommended for better performance: they are faster but also more CPU-consuming. - - flag_delay_tool: - $ref: ../duration.yaml - description: >- - Forces the local Orchestra communication to be made with flags instead of semaphores when using an external communication process. - Flags are recommended for better performance: they are faster but also more CPU-consuming. - - skip_wait_to_go: - type: boolean - default: false - description: >- - Sets the WaitToGo setting of the model. - When true, VILLASnode ignores the WaitToGo during the connection step. - When false, VILLASnode performs the WaitToGo during the connection step. - - ddf_overwrite: - type: boolean - default: false - description: >- - If true, the DDF file provided in the 'dff' setting will be overwriting with settings and signals from the VILLASnode configuration. - - ddf_overwrite_only: - type: boolean - default: false - description: >- - If true, VILLASnode will overwrite the file provided in the 'ddf' setting, and terminate immediately afterwards. - - rate: - type: number - default: 1 - description: >- - In asynchronous mode (see 'synchronous' setting), this rate defines how often per second the data exchange with the Orchestra domain takes place. - - required: - - domain -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection.yaml b/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection.yaml deleted file mode 100644 index ac85a49a4..000000000 --- a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -description: | - Configuration of the connection to the OPAL-RT Orchestra framework. -required: - - type -properties: - type: - description: The type of connection to the OPAL-RT Orchestra framework. - type: string -discriminator: - propertyName: type - mapping: - local: ./opal_orchestra_connection_local.yaml - remote: ./opal_orchestra_connection_remote.yaml - dolphin: ./opal_orchestra_connection_dolphin.yaml diff --git a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_dolphin.yaml b/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_dolphin.yaml deleted file mode 100644 index 32609de69..000000000 --- a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_dolphin.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -required: - - node_id_framework - - segment_id -properties: - type: - description: The type of connection to the OPAL-RT Orchestra framework. - type: string - - node_id_framework: - type: integer - minimum: 4 - maximum: 4096 - description: >- - Node ID for Dolphin node which hosts the Orchestra framework. - - segment_id: - type: integer - minimum: 1 - maximum: 65535 - description: >- - Segment ID used to uniquely identify the framework domain. - Note that another segment ID is automatically calculated outside of this range to identify the client segment. diff --git a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_local.yaml b/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_local.yaml deleted file mode 100644 index 3ee179e41..000000000 --- a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_local.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -properties: - type: - description: The type of connection to the OPAL-RT Orchestra framework. - type: string - - extcomm: - type: string - default: none - enum: - - udp - - tcp - - none - description: Type of external communication protocol helper which should be started. - - addr_framework: - type: string - minimum: 0 - maximum: 65535 - description: >- - The IP address of the target on which the framework is running. - - port_framework: - type: integer - minimum: 0 - maximum: 65535 - description: >- - The port on which the framework will be reachable. - - nic_framework: - type: string - description: >- - The network interface that the framework will use to communicate with the client. - - nic_client: - type: string - description: >- - The network interface that the client will use to communicate with the framework. - - core_framework: - type: integer - minimum: 0 - description: >- - The core on which the tool of the framework is running. The index starts at 0. - - core_client: - type: integer - minimum: 0 - description: >- - The core on which the tool of the client is running. The index starts at 0. diff --git a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_remote.yaml b/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_remote.yaml deleted file mode 100644 index 84ee520c8..000000000 --- a/doc/openapi/components/schemas/config/nodes/opal_orchestra_connection_remote.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -required: - - card - - pci_index -properties: - type: - description: The type of connection to the OPAL-RT Orchestra framework. - type: string - - card: - type: string - example: VMIPCI5565-64M - description: >- - Type of reflective memory card used for a remote connection. - - pci_index: - type: integer - minimum: 1 - description: >- - PCI index that corresponds to the communication card used for remote connection. diff --git a/doc/openapi/components/schemas/config/nodes/opendss.yaml b/doc/openapi/components/schemas/config/nodes/opendss.yaml deleted file mode 100644 index d2675ceae..000000000 --- a/doc/openapi/components/schemas/config/nodes/opendss.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2025 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - - file_path: - type: string - description: | - Specifies the URI to a OpenDSS file. - - in: - type: array - items: - type: object - properties: - name: - type: string - description: | - Name of the element. - type: - type: string - enum: - - load - - generator - - isource - description: | - Type of the element. - data: - type: string - description: | - Data to be input. Possible option are depent on element type. - - - load: kV, kW, kVA, Pf - - generator: kV, kW, kVA, Pf - - isource: Amps, AngleDeg, f - - out: - description: | - Name of the monitor to be read. - type: array - items: - type: string - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/redis.yaml b/doc/openapi/components/schemas/config/nodes/redis.yaml deleted file mode 100644 index e75b13493..000000000 --- a/doc/openapi/components/schemas/config/nodes/redis.yaml +++ /dev/null @@ -1,130 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - mode: - type: string - enum: - - key - - hash - - channel - default: key - description: | - - `key`: [Get](https://redis.io/commands/get)/[Set](https://redis.io/commands/set) of [Redis strings](https://redis.io/topics/data-types#strings) - - The implementation uses the Redis `MSET` and `MGET` commands. - - `hash`: Hashtables using [hash data-type](https://redis.io/topics/data-types#hashes) - - The implementation uses the Redis `HMSET` and `HGETALL` commands. - - `channel`: [Publish/subscribe](https://redis.io/topics/pubsub) - - The implementation uses the Redis `PUBLISH` and `SUBSCRIBE` commands. - - uri: - type: string - format: uri - description: | - A Redis connection URI in the form of: `redis://:@:/`. - - host: - type: string - default: localhost - description: | - The hostname or IP address of the Redis server. - - You can also connect to Redis server with a URI: - - - `tcp://[[username:]password@]host[:port][/db]` - - `unix://[[username:]password@]path-to-unix-domain-socket[/db]` - - port: - type: integer - description: The port number of the Redis server to connect to. - default: 6379 - - path: - type: string - description: A path of a Unix socket which should be used for the connection. - - user: - type: string - default: default - description: | - The username which should be used for authentication. - - See: https://redis.io/commands/auth - - password: - type: string - description: | - The password which should be used for authentication. - - See: https://redis.io/commands/auth - - db: - type: integer - default: 0 - description: | - The logical database which should be used by the Redis client. - - See: https://redis.io/commands/select - - timeout: - type: object - properties: - connect: - type: number - description: The timeout in seconds for the initial connection establishment. - - socket: - type: number - description: The timeout in seconds for executing commands against the Redis server. - - keepalive: - type: boolean - default: false - description: Enable periodic keepalive packets. - - key: - type: string - default: - description: The key which this node will use in the Redis keyspace. - - channel: - type: string - default: - description: The channel which this node will use when `mode` setting is `channel`. - - notify: - type: boolean - default: true - description: | - Use [Redis keyspace notifications](https://redis.io/topics/notifications) to listen for new updates. - This setting is only used if setting `mode` is set to `key` or `hash`. - - ssl: - type: object - properties: - enabled: - type: boolean - default: true - description: If enabled the connection to the Redis server will be encrypted via SSL/TLS. - - cacert: - type: string - description: A path to a CA certificate file. - - cacertdir: - type: string - description: A path to a directory containing CA certificates. - - cert: - type: string - description: A path to a client certificate file. - - key: - type: string - description: A path to the private key file. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/rtp.yaml b/doc/openapi/components/schemas/config/nodes/rtp.yaml deleted file mode 100644 index 4c39e69d4..000000000 --- a/doc/openapi/components/schemas/config/nodes/rtp.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - rtcp: - type: boolean - description: Enable Real-time Control Protocol (RTCP) - - aimd: - type: object - properties: - a: - type: number - default: 10 - b: - type: number - default: 0.5 - Kp: - type: number - default: 1.0 - Ki: - type: number - default: 0.0 - Kd: - type: number - default: 0.0 - rate_min: - type: number - default: 1 - rate_source: - type: number - default: 2000 - rate_init: - type: number - log: - type: string - hook_type: - type: string - default: disabled - enum: - - decimate - - limit_rate - - disabled - - out: - type: object - properties: - netem: - $ref: ../netem.yaml - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/shmem.yaml b/doc/openapi/components/schemas/config/nodes/shmem.yaml deleted file mode 100644 index 60e561942..000000000 --- a/doc/openapi/components/schemas/config/nodes/shmem.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - queuelen: - type: integer - default: - description: Length of the input and output queues in elements. - - samplelen: - type: integer - description: Maximum number of data elements in a single `struct Sample`` for the samples handled by this node. - default: - - mode: - type: string - default: pthread - enum: - - pthread - - polling - description: | - If set to `pthread`, POSIX condition variables (CV) are used to signal writes between processes. - If set to `polling`, no CV's are used, meaning that blocking writes have to be implemented using polling, leading to performance improvements at a cost of unnecessary CPU usage. - - exec: - description: | - Optional name and command-line arguments (as passed to `execve`) of a command to be executed during node startup. - This can be used to start the external program directly from VILLASNode. If unset, no command is executed. - type: array - items: - type: string - - in: - type: object - properties: - name: - type: string - description: | - Name of the POSIX shared memory object. - Must start with a forward slash (/). - The same name should be passed to the external program somehow in its configuration or command-line arguments. - - out: - type: object - properties: - name: - type: string - description: | - Name of the POSIX shared memory object. - Must start with a forward slash (/). - The same name should be passed to the external program somehow in its configuration or command-line arguments. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signal_node.yaml b/doc/openapi/components/schemas/config/nodes/signal_node.yaml deleted file mode 100644 index 61a08341d..000000000 --- a/doc/openapi/components/schemas/config/nodes/signal_node.yaml +++ /dev/null @@ -1,106 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - signal - properties: - signal: - type: string - enum: - - random - - sine - - square - - triangle - - ramp - - counter - - constant - - mixed - - pulse - description: | - The type of signal which should be generated: - - - `random`: a random walk with normal distributed step sizes will be generated. - - `sine`: a sine signal will be generated. - - `square`: a square / rectangle wave will be generated. - - `triangle`: a triangle wave will be generated. - - `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`. - - `counter`: increasing integer counter is generated. - - `constant`: a constant value generated. - - `mixed`: the signals of of each sample are generated by cycling over all remaining signal types. - - `pulse`: generates pulses with a set frequency, phase and width - - values: - type: integer - default: 1 - description: The number of signals which each of the generated samples should contain. - - rate: - type: integer - description: The rate at which sample should be generated by the node. - default: 10 - - amplitude: - type: number - description: The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`. - default: 1.0 - - frequency: - type: number - description: The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`. - default: 1.0 - - phase: - type: number - default: 0.0 - description: Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`. - - pulse_width: - type: number - default: 1.0 - description: The width of the pulse, with respect to the rate - - pulse_low: - type: number - default: 0.0 - description: The low value of the pulse signal. - - pulse_high: - type: number - default: 1.0 - description: The high value of the pulse signal. - - stddev: - type: number - default: 0.2 - description: The standard deviation of the normal distributed steps if the `signal` setting is set to `random`. - - offset: - type: number - default: 0.0 - description: Adds a constant offset to each of the generated signals. - - limit: - type: integer - default: -1 - description: | - Limit the number of generated output samples by this node-type. - A negative number disables the limitation. - - realtime: - type: boolean - default: true - description: Wait `1 / rate` seconds between emitting each sample. - - monitor_missed: - type: boolean - default: true - description: | - If `true`, the `signal` node-type will count missed steps and warn the user during every iteration about missed steps. - Especially at high rates, it can be beneficial for performance to set this flag to `false`. - Warnings would namely cause system calls which will slow the node down even more, and thus cause even more missed steps. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signal_v2_node.yaml b/doc/openapi/components/schemas/config/nodes/signal_v2_node.yaml deleted file mode 100644 index 13e7804e0..000000000 --- a/doc/openapi/components/schemas/config/nodes/signal_v2_node.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - realtime: - type: boolean - default: true - description: Pace the generation of samples by the `rate` setting. - - limit: - type: integer - default: 0 - description: Stop the node after the provided number of samples. - - rate: - type: number - description: The rate at which the samples are generated if operating in real-time mode (See `realtime` option). - - monitor_missed: - type: boolean - default: false - description: Raise warnings if the signal generator fails to operate in real-time due to missed deadlines. - - in: - type: object - required: - - signals - properties: - signals: - type: array - items: - $ref: ./signals/signal_v2_signal.yaml - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/can_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/can_signal.yaml deleted file mode 100644 index f2c564981..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/can_signal.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - can_id: - type: integer - default: 0 - - can_size: - type: integer - default: 8 - - can_offset: - type: integer - default: 0 - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/comedi_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/comedi_signal.yaml deleted file mode 100644 index 2ec1f8775..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/comedi_signal.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - channel - - range - - aref - - properties: - channel: - type: integer - - range: - type: integer - - aref: - type: integer - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/iec60870_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/iec60870_signal.yaml deleted file mode 100644 index aa2b140ae..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/iec60870_signal.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - asdu_type: - description: Human readable names for the supported IEC60870 message types. - type: string - enum: - - single-point - - double-point - - scaled-int - - normalized-float - - short-float - - asdu_type_id: - description: The IEC60870 standard type id. - type: string - enum: - - M_SP_NA_1 - - M_SP_TB_1 - - M_DP_NA_1 - - M_DP_TB_1 - - M_ME_NB_1 - - M_ME_TB_1 - - M_ME_NA_1 - - M_ME_TA_1 - - M_ME_NC_1 - - M_ME_TC_1 - - with_timestamp: - description: (only for use with the human readable asdu_type) - type: boolean - default: false - - ioa: - description: The IEC60870 information object address associated with this signal. - type: number - minimum: 1 - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_data.yaml b/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_data.yaml deleted file mode 100644 index 816382ff3..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_data.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - mms_type - properties: - mms_type: - type: string - enum: - - boolean - - int8 - - int16 - - int32 - - int64 - - int8u - - int16u - - int32u - - float32 - - float64 - - bitstring - description: | - Expected basic data type in received array. - - mms_bitstring_size: - type: integer - default: 32 - description: | - Size metadata for mms_type bitstring. diff --git a/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_publisher_data.yaml b/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_publisher_data.yaml deleted file mode 100644 index 57098098a..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_publisher_data.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- oneOf: - - type: object - properties: - value: - oneOf: - - type: integer - - type: number - - type: boolean - description: | - Constant signal value. - - - type: object - required: - - signal - properties: - signal: - type: string - description: | - Name of the input signal for the value. - -- $ref: ./iec61850_goose_data.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/iec61850_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/iec61850_signal.yaml deleted file mode 100644 index 8e65658de..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/iec61850_signal.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - iec_type: - type: string - enum: - - boolean - - int8 - - int16 - - int32 - - int64 - - int8u - - int16u - - int32u - - int64u - - float32 - - float64 - - enumerated - - coded_enum - - octet_string - - visible_string - - objectname - - objectreference - - timestamp - - entrytime - - bitstring - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml deleted file mode 100644 index 38bbebf4e..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/modbus_signal.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: [address] - properties: - - address: - type: integer - description: The modbus register address. - - word_endianess: - type: string - enum: - - big - - little - description: The ordering of two modbus registers joined together to form a larger number. - default: "big" - - byte_endianess: - type: string - enum: - - big - - little - description: The ordering of the bytes within a modbus register. - default: "big" - - scale: - type: number - description: The scale of the register's value. - default: 1.0 - - offset: - type: number - description: The offset of the register's value. - default: 0.0 - - bit: - type: integer - description: The bit index within a register. - minimum: 0 - maximum: 15 - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/signal_v2_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/signal_v2_signal.yaml deleted file mode 100644 index 6491c1ec8..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/signal_v2_signal.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - signal - properties: - signal: - type: string - enum: - - random - - sine - - square - - triangle - - ramp - - counter - - constant - - mixed - - pulse - description: | - The type of signal which should be generated: - - - `random`: a random walk with normal distributed step sizes will be generated. - - `sine`: a sine signal will be generated. - - `square`: a square / rectangle wave will be generated. - - `triangle`: a triangle wave will be generated. - - `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`. - - `counter`: increasing integer counter is generated. - - `constant`: a constant value generated. - - `mixed`: the signals of of each sample are generated by cycling over all remaining signal types. - - `pulse`: generates pulses with a set frequency, phase and width - - amplitude: - type: number - description: The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`. - default: 1.0 - - frequency: - type: number - description: The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`. - default: 1.0 - - phase: - type: number - default: 0.0 - description: Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`. - - pulse_width: - type: number - default: 1.0 - description: The width of the pulse, with respect to the rate - - pulse_low: - type: number - default: 0.0 - description: The low value of the pulse signal. - - pulse_high: - type: number - default: 1.0 - description: The high value of the pulse signal. - - stddev: - type: number - default: 0.2 - description: The standard deviation of the normal distributed steps if the `signal` setting is set to `random`. - - offset: - type: number - default: 0.0 - description: Adds a constant offset to each of the generated signals. - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/stats_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/stats_signal.yaml deleted file mode 100644 index 200434896..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/stats_signal.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - stats - properties: - stats: - type: string - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signals/uldaq_signal.yaml b/doc/openapi/components/schemas/config/nodes/signals/uldaq_signal.yaml deleted file mode 100644 index ce48c4404..000000000 --- a/doc/openapi/components/schemas/config/nodes/signals/uldaq_signal.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - range: - type: string - description: The range for a specific channel. See `range` for allowed values - - input_mode: - type: string - description: The input mode for a specific channel. See `input_mode` for allowed values - - channel: - type: integer - example: 5 - description: The channel input number of the device. - -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/socket.yaml b/doc/openapi/components/schemas/config/nodes/socket.yaml deleted file mode 100644 index 13151de99..000000000 --- a/doc/openapi/components/schemas/config/nodes/socket.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - layer: - type: string - enum: - - udp - - ip - - eth - - tcp-client - - tcp-server - default: udp - description: | - Select the network layer which should be used for the socket. Please note that `eth` can only be used locally in a LAN as it contains no routing information for the internet. - - verify_source: - type: boolean - default: false - description: | - Check if source address of incoming packets matches the remote address. - - in: - type: object - required: - - address - properties: - address: - type: string - description: | - The local address and port number this node should listen for incoming packets. - - Use `*` to listen on all interfaces: `local = "*:12000"`. - - out: - type: object - properties: - address: - type: string - description: | - The remote address and port number to which this node will send data. - - netem: - $ref: ../netem.yaml - - multicast: - type: object - properties: - enabled: - type: boolean - default: true - description: | - Weather or not multicast group subscription is active. - - group: - type: string - description: | - The multicast group. Must be within 224.0.0.0/4 - - ttl: - type: integer - minimum: 0 - description: | - The time to live for outgoing multicast packets. - - loop: - type: boolean - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/stats_node.yaml b/doc/openapi/components/schemas/config/nodes/stats_node.yaml deleted file mode 100644 index 373e774dc..000000000 --- a/doc/openapi/components/schemas/config/nodes/stats_node.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - rate: - type: number - description: A rate in Hz at which the statistics are generated by this node. - - in: - type: object - required: - - signals - properties: - signals: - type: array - items: - $ref: ./signals/stats_signal.yaml - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/temper.yaml b/doc/openapi/components/schemas/config/nodes/temper.yaml deleted file mode 100644 index 221483be1..000000000 --- a/doc/openapi/components/schemas/config/nodes/temper.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - calibration: - type: object - properties: - scale: - type: number - default: 1.0 - description: A scaling factor for calibrating the sensor. - - offset: - type: number - default: 0.0 - description: An offset for calibrating the sensor. - - bus: - type: integer - description: A filter applied to the USB bus number for selecting a specific sensor if multiple are available. - - port: - type: integer - description: A filter applied to the USB port number for selecting a specific sensor if multiple are available. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/test_rtt.yaml b/doc/openapi/components/schemas/config/nodes/test_rtt.yaml deleted file mode 100644 index 2aa753daa..000000000 --- a/doc/openapi/components/schemas/config/nodes/test_rtt.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - required: - - cases - properties: - format: - $ref: ../format_spec.yaml - - prefix: - type: string - description: A prefix which is prepended to the output file name of the RTT test result file. - example: "test_1" - - output: - type: string - default: "." - description: A directory path at which the RTT test result files be placed. - - cooldown: - type: number - default: 0.0 - description: | - A cool-down time between consecutive test cases. - The node will insert a pause between the tests to avoid any network effects of the previous test-case to influence the upcoming test-case. - - cases: - type: object - description: | - A list of test-case specifications. - - The values from the `rates` and `values` settings of each-test case specification will be used to form a cross-product. - properties: - rates: - description: | - A list of sending rates in Hz. - The resulting test-case will generate samples at the given rate. - example: - - 10 - - 100 - - 1000 - - 10000 - type: array - items: - type: number - - values: - description: | - A list of sample length. - The resulting test-case will generate samples with the given number of signals. - type: array - items: - type: integer - example: - - 10 - - 100 - - count: - description: | - The resulting test-case will send the number of samples specified by this setting. - This setting is exclusive with the `duration` setting. - type: integer - example: 10000 - - duration: - description: | - The resulting test-case will be stopped after the configured duration in seconds. - This setting is exclusive with the `limit` setting. - type: number - example: 60.0 - - mode: - type: string - enum: - - min - - max - - at_least_count - - at_least_duration - - stop_after_count - - stop_after_duration - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/uldaq.yaml b/doc/openapi/components/schemas/config/nodes/uldaq.yaml deleted file mode 100644 index aeffe03f1..000000000 --- a/doc/openapi/components/schemas/config/nodes/uldaq.yaml +++ /dev/null @@ -1,147 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - - interface_type: - type: string - enum: - - usb - - bluetooth - - ethernet - - any - description: The interface to which the ADC is connected. Check manual for your device. - - device_id: - type: string - example: "10000" - description: The used device type. If empty it is auto detected. - - in: - type: object - description: Configuration for the ul201 - required: - - sample_rate - - properties: - - signals: - type: array - items: - $ref: ./signals/uldaq_signal.yaml - - sample_rate: - type: integer - minimum: 0 - example: 10000 - description: The default sampling rate of the input signals. - - range: - type: string - enum: - - bipolar-60 - - bipolar-30 - - bipolar-15 - - bipolar-20 - - bipolar-10 - - bipolar-5 - - bipolar-4 - - bipolar-2.5 - - bipolar-2 - - bipolar-1.25 - - bipolar-1 - - bipolar-0.625 - - bipolar-0.5 - - bipolar-0.25 - - bipolar-0.125 - - bipolar-0.2 - - bipolar-0.1 - - bipolar-0.078 - - bipolar-0.05 - - bipolar-0.01 - - bipolar-0.005 - - unipolar-60 - - unipolar-30 - - unipolar-15 - - unipolar-20 - - unipolar-10 - - unipolar-5 - - unipolar-4 - - unipolar-2.5 - - unipolar-2 - - unipolar-1.25 - - unipolar-1 - - unipolar-0.625 - - unipolar-0.5 - - unipolar-0.25 - - unipolar-0.125 - - unipolar-0.2 - - unipolar-0.1 - - unipolar-0.078 - - unipolar-0.05 - - unipolar-0.01 - - unipolar-0.005 - - description: | - The default input range for signals. Check manual for your device. - - ## Supported ranges - - | Value | Min | Max | - | :--------------- | :------ | :----- | - | `bipolar-60` | -60.0 | +60.0 | - | `bipolar-60` | -60.0 | +60.0 | - | `bipolar-30` | -30.0 | +30.0 | - | `bipolar-15` | -15.0 | +15.0 | - | `bipolar-20` | -20.0 | +20.0 | - | `bipolar-10` | -10.0 | +10.0 | - | `bipolar-5` | -5.0 | +5.0 | - | `bipolar-4` | -4.0 | +4.0 | - | `bipolar-2.5` | -2.5 | +2.5 | - | `bipolar-2` | -2.0 | +2.0 | - | `bipolar-1.25` | -1.25 | +1.25 | - | `bipolar-1` | -1.0 | +1.0 | - | `bipolar-0.625` | -0.625 | +0.625 | - | `bipolar-0.5` | -0.5 | +0.5 | - | `bipolar-0.25` | -0.25 | +0.25 | - | `bipolar-0.125` | -0.125 | +0.125 | - | `bipolar-0.2` | -0.2 | +0.2 | - | `bipolar-0.1` | -0.1 | +0.1 | - | `bipolar-0.078` | -0.078 | +0.078 | - | `bipolar-0.05` | -0.05 | +0.05 | - | `bipolar-0.01` | -0.01 | +0.01 | - | `bipolar-0.005` | -0.005 | +0.005 | - | `unipolar-60` | 0.0 | +60.0 | - | `unipolar-30` | 0.0 | +30.0 | - | `unipolar-15` | 0.0 | +15.0 | - | `unipolar-20` | 0.0 | +20.0 | - | `unipolar-10` | 0.0 | +10.0 | - | `unipolar-5` | 0.0 | +5.0 | - | `unipolar-4` | 0.0 | +4.0 | - | `unipolar-2.5` | 0.0 | +2.5 | - | `unipolar-2` | 0.0 | +2.0 | - | `unipolar-1.25` | 0.0 | +1.25 | - | `unipolar-1` | 0.0 | +1.0 | - | `unipolar-0.625` | 0.0 | +0.625 | - | `unipolar-0.5` | 0.0 | +0.5 | - | `unipolar-0.25` | 0.0 | +0.25 | - | `unipolar-0.125` | 0.0 | +0.125 | - | `unipolar-0.2` | 0.0 | +0.2 | - | `unipolar-0.1` | 0.0 | +0.1 | - | `unipolar-0.078` | 0.0 | +0.078 | - | `unipolar-0.05` | 0.0 | +0.05 | - | `unipolar-0.01` | 0.0 | +0.01 | - | `unipolar-0.005` | 0.0 | +0.00 | - - input_mode: - type: string - enum: - - differential - - single-ended - - pseudo-differential - description: The default sampling type. Check manual for you device. - -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/webrtc.yaml b/doc/openapi/components/schemas/config/nodes/webrtc.yaml deleted file mode 100644 index 9255b645d..000000000 --- a/doc/openapi/components/schemas/config/nodes/webrtc.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - wait_seconds: - type: integer - default: 0 - description: | - Suspend start-up of VILLASnode for some seconds until the connection with the remote peer has been established. - - ordered: - type: boolean - default: false - description: | - Indicates if data is allowed to be delivered out of order. - The default value of false, does not make guarantees that data will be delivered in order. - - max_retransmits: - type: integer - default: 0 - description: | - Limit the number of times a channel will retransmit data if not successfully delivered. - This value may be clamped if it exceeds the maximum value supported. - - session: - type: string - title: Session identifier - description: A unique session identifier which must be shared between two nodes - - server: - type: string - title: Signaling Server Address - description: Address to the websocket signaling server - default: wss://villas.k8s.eonerc.rwth-aachen.de/ws/signaling - - ice: - type: object - title: ICE configuration settings - properties: - servers: - title: ICE Servers - description: A list of ICE servers used for connection establishment - type: array - items: - type: string - format: uri - title: STUN & TURN server URI - description: | - A valid Uniform Resource Identifier (URI) identifying a STUN or TURN server. - - See [RFC7064](https://datatracker.ietf.org/doc/html/rfc7064) and [RFC7065](https://datatracker.ietf.org/doc/html/rfc7065) for details. - - As an extension to the URI format specified additional username & password can be specified as shown in the examples - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/websocket.yaml b/doc/openapi/components/schemas/config/nodes/websocket.yaml deleted file mode 100644 index 1c74f92ad..000000000 --- a/doc/openapi/components/schemas/config/nodes/websocket.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - destinations: - description: | - During startup connect to those WebSocket servers as a client. - - Each URI must use the following scheme: - - ``` - protocol://host:port/nodename - ``` - - It starts with a protocol which must be one of `ws` (unencrypted) or `wss` (SSL). - The host name or IP address is separated by `://`. - The optional port number is separated by a colon `:`. - The node name is separated by a slash `/`. - - type: array - items: - type: string - format: uri - description: A WebSocket URI - - wait_connected: - type: boolean - default: true - description: | - Wait until all configured client connections in `destinations` are - established before finishing node startup. - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/zeromq.yaml b/doc/openapi/components/schemas/config/nodes/zeromq.yaml deleted file mode 100644 index a0cf9add5..000000000 --- a/doc/openapi/components/schemas/config/nodes/zeromq.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -allOf: -- type: object - properties: - format: - $ref: ../format_spec.yaml - - filter: - type: string - enum: - - pubsub - - radiodish - - pattern: - type: string - enum: - - pubsub - - radiodish - default: pubsub - description: | - The ZeroMQ socket pattern to use. - - publish: - type: string - format: uri - - subscribe: - oneOf: - - type: string - format: uri - - type: array - items: - type: string - format: uri - - ipv6: - type: boolean - default: false - - curve: - title: CurveZMQ cryptography - description: | - **Note:** This feature is currently broken. - - You can use the [`villas zmq-keygen`](../usage/villas-zmq-keygen.md) command to create a new keypair for the following configuration options: - - type: object - properties: - enabled: - type: boolean - description: Whether or not the encryption is enabled. - - public_key: - type: string - description: | - The public key of the server. - - secret_key: - type: string - description: | - The secret (private) key of the server. - - out: - type: object - properties: - netem: - $ref: ../netem.yaml - -- $ref: ../node_signals.yaml -- $ref: ../node.yaml diff --git a/doc/openapi/components/schemas/config/signal.yaml b/doc/openapi/components/schemas/config/signal.yaml deleted file mode 100644 index 24b24121f..000000000 --- a/doc/openapi/components/schemas/config/signal.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -type: object -properties: - name: - type: string - title: Signal name - description: | - A name which describes the signal. - example: Bus123_U - - unit: - type: string - title: Signal unit - description: - The unit of the signal. - example: V - - type: - type: string - title: Signal data-type - description: | - The data-type of the signal. - default: float - enum: - - integer - - float - - boolean - - complex - - init: - title: Initial signal value. - description: | - The initial value of the signal. - - oneOf: - - type: number - - type: boolean - - type: object - required: - - real - - imag - additionalProperties: false - properties: - real: - type: number - imag: - type: number - - enabled: - type: boolean - default: true - description: | - Signals can be disabled which causes them to be ignored. diff --git a/doc/openapi/components/schemas/config/signal_list.yaml b/doc/openapi/components/schemas/config/signal_list.yaml deleted file mode 100644 index 3f0c9d81e..000000000 --- a/doc/openapi/components/schemas/config/signal_list.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -title: Signal list -description: | - Each node should define a list of signals which it receives. - - There are three ways to specify the input signals of a node: - -oneOf: -- type: array - title: List of signal definition objects - example: - - name: tap_position - type: integer - init: 0 - - name: voltage - type: float - unit: V - init: 230.0 - items: - $ref: ./signal.yaml - -- type: object - title: Signal definition with `count` - allOf: - - $ref: ./signal.yaml - - type: object - required: - - count - properties: - count: - type: integer - minimum: 1 - default: 64 - -- type: string - title: Signal format string - example: '64f' - description: | - The easiest way to specify the signals, is by using a format string. - The format string consists of one ore more characters which define the type for the signal corresponding to the position of the character in the string. - - | Character | Type | Setting for full and list mode | - |:--- |:--- |:--- | - | `f` | Floating point | "float" | - | `b` | Boolean | "boolean" | - | `i` | Integer | "integer" | - | `c` | Complex Floating point | "complex" | - - Optionally, the characters can be prefixed by an integer for easier repetition. - - **Example:** `12f3i` defines 15 signals, of which the first 12 are floating point and the last 3 are integer values. diff --git a/doc/openapi/components/schemas/format-csv.yaml b/doc/openapi/components/schemas/format-csv.yaml new file mode 100644 index 000000000..8c3c6b120 --- /dev/null +++ b/doc/openapi/components/schemas/format-csv.yaml @@ -0,0 +1,56 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: csv +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: csv + + separator: + default: "," + $ref: ./shared-format-column-separator.yaml + + delimiter: + default: "\n" + $ref: ./shared-format-line-delimiter.yaml + + comment_prefix: + default: "#" + $ref: ./shared-format-line-comment_prefix.yaml + + header: + default: true + $ref: ./shared-format-line-header.yaml + + skip_first_line: + default: false + $ref: ./shared-format-line-skip_first_line.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: true + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-gtnet.yaml b/doc/openapi/components/schemas/format-gtnet.yaml new file mode 100644 index 000000000..dd5eee4f3 --- /dev/null +++ b/doc/openapi/components/schemas/format-gtnet.yaml @@ -0,0 +1,47 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: gtnet + + bits: + default: 32 + $ref: ./shared-format-raw-bits.yaml + + endianess: + default: "big" + $ref: ./shared-format-raw-endianess.yaml + + fake: + default: false + $ref: ./shared-format-raw-fake.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: false + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: false + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-iotagent_ul.yaml b/doc/openapi/components/schemas/format-iotagent_ul.yaml new file mode 100644 index 000000000..267104668 --- /dev/null +++ b/doc/openapi/components/schemas/format-iotagent_ul.yaml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: iotagent_ul + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-json.yaml b/doc/openapi/components/schemas/format-json.yaml new file mode 100644 index 000000000..5a58b3f64 --- /dev/null +++ b/doc/openapi/components/schemas/format-json.yaml @@ -0,0 +1,55 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: json + + indent: + default: 0 + $ref: ./shared-format-json-indent.yaml + + compact: + default: false + $ref: ./shared-format-json-compact.yaml + + ensure_ascii: + default: false + $ref: ./shared-format-json-ensure_ascii.yaml + + sort_keys: + default: false + $ref: ./shared-format-json-sort_keys.yaml + + escape_slash: + default: false + $ref: ./shared-format-json-escape_slash.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-json_edgeflex.yaml b/doc/openapi/components/schemas/format-json_edgeflex.yaml new file mode 100644 index 000000000..ad5a3882c --- /dev/null +++ b/doc/openapi/components/schemas/format-json_edgeflex.yaml @@ -0,0 +1,55 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: json.edgeflex + + indent: + default: 0 + $ref: ./shared-format-json-indent.yaml + + compact: + default: false + $ref: ./shared-format-json-compact.yaml + + ensure_ascii: + default: false + $ref: ./shared-format-json-ensure_ascii.yaml + + sort_keys: + default: false + $ref: ./shared-format-json-sort_keys.yaml + + escape_slash: + default: false + $ref: ./shared-format-json-escape_slash.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-json_kafka.yaml b/doc/openapi/components/schemas/format-json_kafka.yaml new file mode 100644 index 000000000..1d83d0207 --- /dev/null +++ b/doc/openapi/components/schemas/format-json_kafka.yaml @@ -0,0 +1,59 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: json.kafka + + schema: + type: object + additionalProperties: true + + indent: + default: 0 + $ref: ./shared-format-json-indent.yaml + + compact: + default: false + $ref: ./shared-format-json-compact.yaml + + ensure_ascii: + default: false + $ref: ./shared-format-json-ensure_ascii.yaml + + sort_keys: + default: false + $ref: ./shared-format-json-sort_keys.yaml + + escape_slash: + default: false + $ref: ./shared-format-json-escape_slash.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-json_reserve.yaml b/doc/openapi/components/schemas/format-json_reserve.yaml new file mode 100644 index 000000000..27213880e --- /dev/null +++ b/doc/openapi/components/schemas/format-json_reserve.yaml @@ -0,0 +1,55 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: json.reserve + + indent: + default: 0 + $ref: ./shared-format-json-indent.yaml + + compact: + default: false + $ref: ./shared-format-json-compact.yaml + + ensure_ascii: + default: false + $ref: ./shared-format-json-ensure_ascii.yaml + + sort_keys: + default: false + $ref: ./shared-format-json-sort_keys.yaml + + escape_slash: + default: false + $ref: ./shared-format-json-escape_slash.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-opal_asyncip.yaml b/doc/openapi/components/schemas/format-opal_asyncip.yaml new file mode 100644 index 000000000..e6face4cc --- /dev/null +++ b/doc/openapi/components/schemas/format-opal_asyncip.yaml @@ -0,0 +1,39 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: opal.asyncip + + dev_id: + default: 0 + type: integer + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: false + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-protobuf.yaml b/doc/openapi/components/schemas/format-protobuf.yaml new file mode 100644 index 000000000..1fc0280f6 --- /dev/null +++ b/doc/openapi/components/schemas/format-protobuf.yaml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: protobuf + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-raw.yaml b/doc/openapi/components/schemas/format-raw.yaml new file mode 100644 index 000000000..e3c234e9f --- /dev/null +++ b/doc/openapi/components/schemas/format-raw.yaml @@ -0,0 +1,47 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: raw + + bits: + default: 32 + $ref: ./shared-format-raw-bits.yaml + + endianess: + default: "little" + $ref: ./shared-format-raw-endianess.yaml + + fake: + default: false + $ref: ./shared-format-raw-fake.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: false + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: false + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-tsv.yaml b/doc/openapi/components/schemas/format-tsv.yaml new file mode 100644 index 000000000..c37163d79 --- /dev/null +++ b/doc/openapi/components/schemas/format-tsv.yaml @@ -0,0 +1,56 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: tsv +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: tsv + + separator: + default: "\t" + $ref: ./shared-format-column-separator.yaml + + delimiter: + default: "\n" + $ref: ./shared-format-line-delimiter.yaml + + comment_prefix: + default: "#" + $ref: ./shared-format-line-comment_prefix.yaml + + header: + default: true + $ref: ./shared-format-line-header.yaml + + skip_first_line: + default: false + $ref: ./shared-format-line-skip_first_line.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: true + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-value.yaml b/doc/openapi/components/schemas/format-value.yaml new file mode 100644 index 000000000..9f56e3da1 --- /dev/null +++ b/doc/openapi/components/schemas/format-value.yaml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: value + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: false + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: false + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-villas_binary.yaml b/doc/openapi/components/schemas/format-villas_binary.yaml new file mode 100644 index 000000000..57579be9d --- /dev/null +++ b/doc/openapi/components/schemas/format-villas_binary.yaml @@ -0,0 +1,43 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: villas.binary + + source_index: + default: 0 + $ref: ./shared-format-villas-source_index.yaml + + validate_source_index: + default: false + $ref: ./shared-format-villas-validate_source_index.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-villas_human.yaml b/doc/openapi/components/schemas/format-villas_human.yaml new file mode 100644 index 000000000..69383fadf --- /dev/null +++ b/doc/openapi/components/schemas/format-villas_human.yaml @@ -0,0 +1,51 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: villas.human + + delimiter: + default: "\n" + $ref: ./shared-format-line-delimiter.yaml + + comment_prefix: + default: "#" + $ref: ./shared-format-line-comment_prefix.yaml + + header: + default: true + $ref: ./shared-format-line-header.yaml + + skip_first_line: + default: false + $ref: ./shared-format-line-skip_first_line.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format-villas_web.yaml b/doc/openapi/components/schemas/format-villas_web.yaml new file mode 100644 index 000000000..33a008e5d --- /dev/null +++ b/doc/openapi/components/schemas/format-villas_web.yaml @@ -0,0 +1,43 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: villas.web + + source_index: + default: 0 + $ref: ./shared-format-villas-source_index.yaml + + validate_source_index: + default: false + $ref: ./shared-format-villas-validate_source_index.yaml + + real_precision: + default: 17 + $ref: ./shared-format-real_precision.yaml + + ts_origin: + default: true + $ref: ./shared-format-ts_origin.yaml + + ts_received: + default: false + $ref: ./shared-format-ts_received.yaml + + sequence: + default: true + $ref: ./shared-format-sequence.yaml + + data: + default: true + $ref: ./shared-format-data.yaml + + offset: + default: false + $ref: ./shared-format-offset.yaml diff --git a/doc/openapi/components/schemas/format.yaml b/doc/openapi/components/schemas/format.yaml new file mode 100644 index 000000000..20d618a70 --- /dev/null +++ b/doc/openapi/components/schemas/format.yaml @@ -0,0 +1,30 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +$schema: http://json-schema.org/draft-07/schema + +description: | + The payload format which is used to encode and decode exchanged messages. +example: villas.human + +type: [object, string] +discriminator: + x-villas-plugin: format + propertyName: type + mapping: + csv: ./format-csv.yaml + gtnet: ./format-gtnet.yaml + iotagent_ul: ./format-iotagent_ul.yaml + json: ./format-json.yaml + json.edgeflex: ./format-json_edgeflex.yaml + json.kafka: ./format-json_kafka.yaml + json.reserve: ./format-json_reserve.yaml + opal.asyncip: ./format-opal_asyncip.yaml + protobuf: ./format-protobuf.yaml + raw: ./format-raw.yaml + tsv: ./format-tsv.yaml + value: ./format-value.yaml + villas.binary: ./format-villas_binary.yaml + villas.human: ./format-villas_human.yaml + villas.web: ./format-villas_web.yaml diff --git a/doc/openapi/components/schemas/formats/edgeflex.yaml b/doc/openapi/components/schemas/formats/edgeflex.yaml index 98bc58635..abc2e45e9 100644 --- a/doc/openapi/components/schemas/formats/edgeflex.yaml +++ b/doc/openapi/components/schemas/formats/edgeflex.yaml @@ -31,6 +31,7 @@ additionalProperties: type: number imag: type: number + additionalProperties: false example: created: 1633791645123 diff --git a/doc/openapi/components/schemas/formats/igor.yaml b/doc/openapi/components/schemas/formats/igor.yaml index a83e390b4..558e15ee8 100644 --- a/doc/openapi/components/schemas/formats/igor.yaml +++ b/doc/openapi/components/schemas/formats/igor.yaml @@ -70,7 +70,6 @@ properties: items: type: object properties: - channel: type: string description: Name of the monitored bus @@ -90,3 +89,5 @@ properties: rocof: type: number description: Rate of change of frequency [Hz/s] + additionalProperties: false +additionalProperties: false diff --git a/doc/openapi/components/schemas/formats/sogno-old.yaml b/doc/openapi/components/schemas/formats/sogno-old.yaml index fd13ae030..9c9b84832 100644 --- a/doc/openapi/components/schemas/formats/sogno-old.yaml +++ b/doc/openapi/components/schemas/formats/sogno-old.yaml @@ -60,6 +60,8 @@ properties: - apparentpower: single phase power, unit voltampere - frequency: unit hertz +additionalProperties: false + example: device: pmu-abc0 timestamp: '2021-10-07T10:11:12.1231241+02:00' diff --git a/doc/openapi/components/schemas/formats/sogno.yaml b/doc/openapi/components/schemas/formats/sogno.yaml index 2c3d6ea40..73aad8b88 100644 --- a/doc/openapi/components/schemas/formats/sogno.yaml +++ b/doc/openapi/components/schemas/formats/sogno.yaml @@ -70,3 +70,6 @@ properties: - reactivepower: single phase power, unit voltampere reactive - apparentpower: single phase power, unit voltampere - frequency: unit hertz + + additionalProperties: false +additionalProperties: false diff --git a/doc/openapi/components/schemas/hook-average.yaml b/doc/openapi/components/schemas/hook-average.yaml new file mode 100644 index 000000000..ac627cd78 --- /dev/null +++ b/doc/openapi/components/schemas/hook-average.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, offset] +additionalProperties: false +properties: + type: + type: string + const: average + + offset: + type: integer + description: | + The signal offset at which the average signal should be inserted. + + **Examples:** + - `0` inserts the averaged signal before all other signals in the sample + - `1` inserts the averaged signal after the first signal. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-cast.yaml b/doc/openapi/components/schemas/hook-cast.yaml new file mode 100644 index 000000000..16bb8852e --- /dev/null +++ b/doc/openapi/components/schemas/hook-cast.yaml @@ -0,0 +1,45 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: cast + + new_type: + type: string + enum: + - integer + - float + - boolean + - complex + description: The type of the casted signal. + example: integer + + new_name: + type: string + description: The new name of the casted signal. + example: BusA.V + + new_unit: + type: string + description: The new unit of the casted signal. + example: V + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-decimate.yaml b/doc/openapi/components/schemas/hook-decimate.yaml new file mode 100644 index 000000000..40aaa94a7 --- /dev/null +++ b/doc/openapi/components/schemas/hook-decimate.yaml @@ -0,0 +1,25 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, ratio] +additionalProperties: false +properties: + type: + type: string + const: decimate + + ratio: + type: integer + description: The decimation ratio. A value of 4 will skip every, but the 4th sample in a row. + example: 4 + + renumber: + type: boolean + default: false + description: Renumber the sequence numbers of the output samples starting from zero. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-digest.yaml b/doc/openapi/components/schemas/hook-digest.yaml new file mode 100644 index 000000000..ed8183738 --- /dev/null +++ b/doc/openapi/components/schemas/hook-digest.yaml @@ -0,0 +1,30 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, uri, algorithm] +additionalProperties: false +properties: + type: + type: string + const: digest + + uri: + description: The output file for digests. + example: digest.txt + type: string + + algorithm: + description: The algorithm used for calculating digests. + example: sha256 + type: string + + mode: + description: The file open mode passed to fopen (e.g. "w" to truncate, "a" to append). + example: w + type: string + + priority: + default: 999 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-dp.yaml b/doc/openapi/components/schemas/hook-dp.yaml new file mode 100644 index 000000000..7c6fab566 --- /dev/null +++ b/doc/openapi/components/schemas/hook-dp.yaml @@ -0,0 +1,52 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, f0, harmonics, signal] +additionalProperties: false +properties: + type: + type: string + const: dp + + f0: + description: The fundamental frequency. + example: 50 + type: number + + dt: + description: The timestep of the input samples. Exclusive with `rate` setting. + examples: [50e-6] + type: number + + rate: + description: The rate of the input samples. Exclusive with `dt` setting. + type: number + + harmonics: + type: array + minItems: 1 + description: A list of selected harmonics which should be calculated. + example: [0, 1, 3, 5 ] + items: + type: integer + + inverse: + description: Enable the calucation of the inverse transform. + type: boolean + default: false + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + description: The name or index of a signal to which this hook should be applied + oneOf: + - $ref: ./shared-hook-signal.yaml + - type: integer + +oneOf: +- required: [dt] +- required: [rate] diff --git a/doc/openapi/components/schemas/hook-drop.yaml b/doc/openapi/components/schemas/hook-drop.yaml new file mode 100644 index 000000000..8f212843c --- /dev/null +++ b/doc/openapi/components/schemas/hook-drop.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: drop + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-dump.yaml b/doc/openapi/components/schemas/hook-dump.yaml new file mode 100644 index 000000000..b81f17dcd --- /dev/null +++ b/doc/openapi/components/schemas/hook-dump.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: dump + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-ebm.yaml b/doc/openapi/components/schemas/hook-ebm.yaml new file mode 100644 index 000000000..e1ffbdbd8 --- /dev/null +++ b/doc/openapi/components/schemas/hook-ebm.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +$schema: http://json-schema.org/draft-07/schema + +type: object +required: [type, phases] +additionalProperties: false +properties: + type: + type: string + const: ebm + + phases: + description: Signal indices for voltage & current values for each phase. + type: array + items: + type: array + minItems: 2 + examples: + - [0, 1] + - [2, 3] + - [4, 5] + additionalItems: false + items: + - title: Voltage Signal Index + type: integer + - title: Current Signal Index + type: integer + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-fix.yaml b/doc/openapi/components/schemas/hook-fix.yaml new file mode 100644 index 000000000..1a3a3a555 --- /dev/null +++ b/doc/openapi/components/schemas/hook-fix.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: fix + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-frame.yaml b/doc/openapi/components/schemas/hook-frame.yaml new file mode 100644 index 000000000..1a052ba79 --- /dev/null +++ b/doc/openapi/components/schemas/hook-frame.yaml @@ -0,0 +1,45 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, interval] +properties: + type: + type: string + const: frame + + trigger: + description: The trigger for new frames. + type: string + default: timestamp + enum: + - sequence + - timestamp + + interval: + description: The interval in which frames are annotated. + default: "1s" + not: + const: null + + priority: + default: 10 + $ref: ./shared-hook-priority.yaml + +additionalProperties: false + +oneOf: +- required: [trigger] + properties: + trigger: + const: sequence + interval: + type: integer + additionalProperties: {} +- properties: + trigger: + const: timestamp + interval: + $ref: ./shared-duration.yaml + additionalProperties: {} diff --git a/doc/openapi/components/schemas/hook-gate.yaml b/doc/openapi/components/schemas/hook-gate.yaml new file mode 100644 index 000000000..83693fae9 --- /dev/null +++ b/doc/openapi/components/schemas/hook-gate.yaml @@ -0,0 +1,41 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, signal] +additionalProperties: false +properties: + type: + type: string + const: gate + + mode: + description: The triggering condition at which the gate opens. + type: string + default: rising_edge + enum: + - above + - below + - rising_edge + - falling_edge + + threshold: + default: 0.5 + description: The threshold the signal needs to overcome before the gate opens. + type: number + + duration: + description: The number of seconds for which the gate opens when the triggering condition is met. Exclusive with the `samples` setting. + type: number + + samples: + description: The number if samples for which the gate opens when the triggering condition is met. Exclusive with the `duration` setting. + type: integer + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml diff --git a/doc/openapi/components/schemas/hook-ip_dft_pmu.yaml b/doc/openapi/components/schemas/hook-ip_dft_pmu.yaml new file mode 100644 index 000000000..d4f84e75f --- /dev/null +++ b/doc/openapi/components/schemas/hook-ip_dft_pmu.yaml @@ -0,0 +1,120 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, estimation_range] +additionalProperties: false +properties: + type: + type: string + const: ip-dft-pmu + + estimation_range: + type: number + exclusiveMinimum: 0 + example: 1.0 + description: | + The frequency range in Hz around the nominal frequency searched for the fundamental. + + The DFT is computed over the interval `[nominal_freq - estimation_range, nominal_freq + estimation_range]`. + + sample_rate: + type: integer + default: 1 + minimum: 1 + example: 10000 + description: The sampling rate of the input signal in Hz. + + dft_rate: + type: number + default: 1.0 + exclusiveMinimum: 0 + example: 10.0 + description: The number of phasor calculations performed per second. + + nominal_freq: + type: number + default: 1.0 + exclusiveMinimum: 0 + example: 50.0 + description: The nominal frequency of the power system in Hz. + + number_plc: + type: number + default: 1.0 + exclusiveMinimum: 0 + example: 5.0 + description: The number of power line cycles used to determine the analysis window size. + + window_type: + type: string + enum: + - flattop + - hamming + - hann + - nuttal + - blackman + - none + default: none + description: The window function applied to each analysis window. + + angle_unit: + type: string + enum: + - rad + - degree + default: rad + description: The unit of the output phase angle. + + add_channel_name: + type: boolean + default: true + description: Append the input channel name as a suffix to each output signal name. + + timestamp_align: + type: string + enum: + - left + - center + - right + default: center + description: The position within the analysis window used as the output sample timestamp. + + phase_offset: + type: number + default: 0.0 + example: 10.0 + description: An offset added to each calculated phase angle. + + amplitude_offset: + type: number + default: 0.0 + example: 10.0 + description: An offset added to each calculated amplitude. + + frequency_offset: + type: number + default: 0.0 + example: 0.2 + description: An offset added to each calculated frequency. + + rocof_offset: + type: number + default: 0.0 + example: 1.0 + description: An offset added to each calculated RoCoF. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-jitter_calc.yaml b/doc/openapi/components/schemas/hook-jitter_calc.yaml new file mode 100644 index 000000000..4d31f12c3 --- /dev/null +++ b/doc/openapi/components/schemas/hook-jitter_calc.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: jitter_calc + + priority: + default: 0 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-limit_rate.yaml b/doc/openapi/components/schemas/hook-limit_rate.yaml new file mode 100644 index 000000000..203993a9d --- /dev/null +++ b/doc/openapi/components/schemas/hook-limit_rate.yaml @@ -0,0 +1,29 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, rate] +additionalProperties: false +properties: + type: + type: string + const: limit_rate + + rate: + type: number + exclusiveMinimum: 0 + description: The maximum sample rate in `1/s` before this hook will drop samples. + + mode: + type: string + default: local + description: Timestamp which should be used for rate estimation. + enum: + - local + - received + - origin + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-limit_value.yaml b/doc/openapi/components/schemas/hook-limit_value.yaml new file mode 100644 index 000000000..0c638864a --- /dev/null +++ b/doc/openapi/components/schemas/hook-limit_value.yaml @@ -0,0 +1,33 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, min, max] +additionalProperties: false +properties: + type: + type: string + const: limit_value + + min: + description: The smallest value which will pass through the hook before getting clipped. + type: number + + max: + description: The largest value which will pass through the hook before getting clipped. + type: number + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-lua.yaml b/doc/openapi/components/schemas/hook-lua.yaml new file mode 100644 index 000000000..d7b9fa3c8 --- /dev/null +++ b/doc/openapi/components/schemas/hook-lua.yaml @@ -0,0 +1,108 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: + description: | + The Lua hook will pass the complete hook configuration to the `prepare()` Lua function. + So you can add arbitrary settings here which are then consumed by the Lua script. +properties: + type: + type: string + const: lua + + use_names: + type: boolean + default: true + description: Enables or disables the use of signal names in the `process()` Lua function. If disabled, numeric indices will be used. + + script: + type: string + description: | + Provide the path to a Lua script containing functions for the individual hook points. + Define some or all of the following functions in your Lua script: + + #### `prepare(cfg)` + + Called during initialization with a Lua table which contains the full hook configuration. + + #### `start()` + + Called when the associated node or path is started + + #### `stop()` + + Called when the associated node or path is stopped + + #### `restart()` + + Called when the associated node or path is restarted. + Falls back to `stop()` + `start()` if absent. + + #### `process(smp)` + + Called for each sample which is being processed. + The sample is passed as a Lua table with the following fields: + + - `sequence` The sequence number of the sample. + - `flags` The flags field of the sample. + - `ts_origin` The origin timestamp as a Lua table containing the following keys: + | Index | Description | + |:-- |:-- | + | 0 | seconds | + | 1 | nanoseconds | + + - `ts_received` The receive timestamp a Lua table containing the following keys: + | Index | Description | + |:-- |:-- | + | 0 | seconds | + | 1 | nanoseconds | + + - `data` The sample data as a Lua table container either numeric indices or the signal names depending on the 'use_names' option of the hook. + + #### `periodic()` + + Called periodically with the rate of @ref node-config-stats. + + signals: + description: | + A definition of signals which this hook will emit. + Here a list of signal definitions like @ref node-config-node-signals is expected. + type: array + items: + type: object + required: [expression] + additionalProperties: + description: | + The Lua hook passes each signal definition to the Lua script. + You may add arbitrary custom properties to a signal here which are + then available as context to your Lua code (e.g. within `prepare()` + or `process()`). You are responsible for consuming them in your script. + properties: + expression: + type: string + example: "math.sqrt(smp.data[0] ^ 2 + smp.data[1] ^ 2)" + description: | + An arbitrary Lua expression which will be evaluated and used for the value of the signal. + Note you can access the current sample using the global Lua variable `smp`. + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + + priority: + default: 1 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-ma.yaml b/doc/openapi/components/schemas/hook-ma.yaml new file mode 100644 index 000000000..511edfaa2 --- /dev/null +++ b/doc/openapi/components/schemas/hook-ma.yaml @@ -0,0 +1,32 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: ma + + window_size: + type: integer + description: The size of the window (number of samples) which should be used for the moving average filter. + example: 100 + default: 0 + minimum: 0 + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-pmu.yaml b/doc/openapi/components/schemas/hook-pmu.yaml new file mode 100644 index 000000000..2b28f7e63 --- /dev/null +++ b/doc/openapi/components/schemas/hook-pmu.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: pmu + + sample_rate: + type: integer + default: 1 + minimum: 1 + example: 10000 + description: The sampling rate of the input signal in Hz. + + dft_rate: + type: number + default: 1.0 + exclusiveMinimum: 0 + example: 10.0 + description: The number of phasor calculations performed per second. + + nominal_freq: + type: number + default: 1.0 + exclusiveMinimum: 0 + example: 50.0 + description: The nominal frequency of the power system in Hz. + + number_plc: + type: number + default: 1.0 + exclusiveMinimum: 0 + example: 5.0 + description: The number of power line cycles used to determine the analysis window size. + + window_type: + type: string + enum: + - flattop + - hamming + - hann + - nuttal + - blackman + - none + default: none + description: The window function applied to each analysis window. + + angle_unit: + type: string + enum: + - rad + - degree + default: rad + description: The unit of the output phase angle. + + add_channel_name: + type: boolean + default: true + description: Append the input channel name as a suffix to each output signal name. + + timestamp_align: + type: string + enum: + - left + - center + - right + default: center + description: The position within the analysis window used as the output sample timestamp. + + phase_offset: + type: number + default: 0.0 + example: 10.0 + description: An offset added to each calculated phase angle. + + amplitude_offset: + type: number + default: 0.0 + example: 10.0 + description: An offset added to each calculated amplitude. + + frequency_offset: + type: number + default: 0.0 + example: 0.2 + description: An offset added to each calculated frequency. + + rocof_offset: + type: number + default: 0.0 + example: 1.0 + description: An offset added to each calculated RoCoF. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-pmu_dft.yaml b/doc/openapi/components/schemas/hook-pmu_dft.yaml new file mode 100644 index 000000000..6c944ddd0 --- /dev/null +++ b/doc/openapi/components/schemas/hook-pmu_dft.yaml @@ -0,0 +1,136 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: pmu_dft + + sample_rate: + type: integer + default: 0 + minimum: 0 + example: 10000 + description: The sampling rate of the input signal. + + start_frequency: + type: number + minimum: 0 + example: 49.7 + description: The lowest frequency bin. + + end_frequency: + type: number + example: 50.3 + minimum: 0 + description: The highest frequency bin. + + frequency_resolution: + type: number + example: 0.1 + minimum: 0 + description: The frequency resolution of the DFT. + + dft_rate: + type: integer + example: 1 + minimum: 1 + description: The number of phasor calculations performed per second. + + window_size_factor: + type: integer + default: 1 + description: A factor that increases the automatically determined window size by a multiplicative factor. + + window_type: + type: string + enum: + - flattop + - hamming + - hann + - none + default: none + description: The window type. + + padding_type: + type: string + enum: + - zero + - signal_repeat + default: none + description: The padding type. + + estimate_type: + type: string + enum: + - quadratic + default: none + description: The frequency estimation type. + + pps_index: + type: integer + description: The signal index of the PPS signal. This is only needed if data dumper is active. + default: 0 + + angle_unit: + type: string + enum: + - rad + - degree + default: rad + description: The unit of the phase angle. + + add_channel_name: + type: boolean + default: false + description: Adds the name of the channel as a suffix to the signal name e.g `amplitude_ch1`. + + timestamp_align: + enum: + - left + - center + - right + default: center + description: The timestamp alignment in respect to the the window. + + phase_offset: + type: number + default: 0.0 + example: 10.0 + description: An offset added to a calculated phase. + + amplitude_offset: + type: number + default: 0.0 + example: 10.0 + description: An offset added to the calculated amplitude. + + frequency_offset: + type: number + default: 0.0 + example: 0.2 + description: An offset added to the calculated frequency. + + rocof_offset: + type: number + default: 0.0 + example: 1.0 + description: An offset added to the calculated RoCoF. This setting does not really make sense but is available for completeness reasons + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-power.yaml b/doc/openapi/components/schemas/hook-power.yaml new file mode 100644 index 000000000..5a87aaff7 --- /dev/null +++ b/doc/openapi/components/schemas/hook-power.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, window_size, pairings] +additionalProperties: false +properties: + type: + type: string + const: power + + window_size: + type: integer + minimum: 1 + example: 100 + description: The number of samples in the sliding integration window. + + pairings: + type: array + minItems: 1 + description: | + The voltage/current signal pairs for which power quantities are calculated. + + Each pairing produces up to four output signals: active power (W), + reactive power (VAr), apparent power (VA), and power factor (cos φ). + items: + type: object + required: [voltage, current] + additionalProperties: false + properties: + voltage: + type: string + description: The name of the voltage signal. + example: voltage_a + + current: + type: string + description: The name of the current signal. + example: current_a + + active_power: + type: boolean + default: true + description: Include the active power (P) in the output signals. + + reactive_power: + type: boolean + default: true + description: Include the reactive power (Q) in the output signals. + + apparent_power: + type: boolean + default: true + description: Include the apparent power (S) in the output signals. + + cos_phi: + type: boolean + default: true + description: Include the power factor (cos φ) in the output signals. + + add_channel_name: + type: boolean + default: false + description: Append the input channel name as a suffix to each output signal name. + + angle_unit: + type: string + enum: + - rad + - degree + default: rad + description: The unit used for the power factor angle output. + + timestamp_align: + type: string + enum: + - left + - center + - right + default: center + description: The position within the integration window used as the output sample timestamp. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-pps_ts.yaml b/doc/openapi/components/schemas/hook-pps_ts.yaml new file mode 100644 index 000000000..78ef0df35 --- /dev/null +++ b/doc/openapi/components/schemas/hook-pps_ts.yaml @@ -0,0 +1,44 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, signal] +additionalProperties: false +properties: + type: + type: string + const: pps_ts + + mode: + type: string + enum: + - simple + - horizon + default: simple + description: "The synchronization mode. The `horizon` mode is currently no recommended to use as it is not fully tested." + + threshold: + type: number + default: 1.5 + description: "The signal level threshold of the PPS signal which is used to detect an edge." + + expected_smp_rate: + type: number + default: 1.0 + description: "The expected sampling rate of the input signal. Only important for a faster initialization." + + horizon_estimation: + type: integer + default: 10 + + horizon_compensation: + type: integer + default: 10 + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml diff --git a/doc/openapi/components/schemas/hook-print.yaml b/doc/openapi/components/schemas/hook-print.yaml new file mode 100644 index 000000000..1c970e376 --- /dev/null +++ b/doc/openapi/components/schemas/hook-print.yaml @@ -0,0 +1,29 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: print + + output: + type: string + default: "/dev/stdout" + description: An optional path to a file to which the samples processed by this hook will be written to. + + format: + default: "villas.human" + $ref: ./format.yaml + + prefix: + type: string + default: "" + description: An optional prefix which will be prepended to each line written by this hook to the output + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-reorder_ts.yaml b/doc/openapi/components/schemas/hook-reorder_ts.yaml new file mode 100644 index 000000000..b6992e96d --- /dev/null +++ b/doc/openapi/components/schemas/hook-reorder_ts.yaml @@ -0,0 +1,21 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: reorder_ts + + window_size: + type: integer + default: 16 + minimum: 1 + description: The number of samples buffered for reordering. + + priority: + default: 2 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-restart.yaml b/doc/openapi/components/schemas/hook-restart.yaml new file mode 100644 index 000000000..2fadb756a --- /dev/null +++ b/doc/openapi/components/schemas/hook-restart.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: restart + + priority: + default: 1 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-rms.yaml b/doc/openapi/components/schemas/hook-rms.yaml new file mode 100644 index 000000000..0e3ce239c --- /dev/null +++ b/doc/openapi/components/schemas/hook-rms.yaml @@ -0,0 +1,31 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, window_size] +additionalProperties: false +properties: + type: + type: string + const: rms + + window_size: + type: integer + description: The size of the window (number of samples) which should be used for the moving average filter. + example: 100 + minimum: 1 + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-round.yaml b/doc/openapi/components/schemas/hook-round.yaml new file mode 100644 index 000000000..3f888dd48 --- /dev/null +++ b/doc/openapi/components/schemas/hook-round.yaml @@ -0,0 +1,31 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: round + + precision: + type: integer + default: 1 + example: 4 + description: The number of decimal digits to which the signal is rounded. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-scale.yaml b/doc/openapi/components/schemas/hook-scale.yaml new file mode 100644 index 000000000..aa1276fba --- /dev/null +++ b/doc/openapi/components/schemas/hook-scale.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: scale + + offset: + type: number + default: 0.0 + example: 100.5 + description: The offset which is added to the signal after gain. + + scale: + type: number + default: 1.0 + example: 1e3 + description: The factor by which the signal is multiplied before the offset is added. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + + signal: + $ref: ./shared-hook-signal.yaml + + signals: + $ref: ./shared-hook-signals.yaml + +oneOf: +- required: [signals] +- required: [signal] diff --git a/doc/openapi/components/schemas/hook-shift_seq.yaml b/doc/openapi/components/schemas/hook-shift_seq.yaml new file mode 100644 index 000000000..8deb20a23 --- /dev/null +++ b/doc/openapi/components/schemas/hook-shift_seq.yaml @@ -0,0 +1,19 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, offset] +additionalProperties: false +properties: + type: + type: string + const: shift_seq + + offset: + type: integer + description: The offset which is added to the sequence number of each processed sample. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-shift_ts.yaml b/doc/openapi/components/schemas/hook-shift_ts.yaml new file mode 100644 index 000000000..b1b399eda --- /dev/null +++ b/doc/openapi/components/schemas/hook-shift_ts.yaml @@ -0,0 +1,26 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, offset] +additionalProperties: false +properties: + type: + type: string + const: shift_ts + + mode: + type: string + enum: + - origin + - received + description: The timestamp field which should be adjusted by the `offset` setting. + + offset: + type: number + description: The offset in seconds which is added to the timestamp field of each processed sample. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-skip_first.yaml b/doc/openapi/components/schemas/hook-skip_first.yaml new file mode 100644 index 000000000..ce03b1116 --- /dev/null +++ b/doc/openapi/components/schemas/hook-skip_first.yaml @@ -0,0 +1,27 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: skip_first + + samples: + type: integer + description: The number of samples which should be dropped by this hook after a start or restart of the node/path. + + seconds: + type: number + description: The number of seconds for which this hook should initially drop samples after a start or restart of the node/path. + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml + +oneOf: +- required: [samples] +- required: [seconds] diff --git a/doc/openapi/components/schemas/hook-stats.yaml b/doc/openapi/components/schemas/hook-stats.yaml new file mode 100644 index 000000000..29dadc872 --- /dev/null +++ b/doc/openapi/components/schemas/hook-stats.yaml @@ -0,0 +1,39 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: stats + + format: + type: string + enum: [human, json, matlab] + + buckets: + type: integer + default: 20 + description: The number of buckets which should be used for the underlying histograms. + + warmup: + type: integer + default: 500 + description: Use the first `warmup` samples to estimate the bucket range of the underlying histograms. + + verbose: + type: boolean + default: false + description: Include full dumps of the histogram buckets into the output. + + output: + type: string + description: The file where you want to write the report to. If omitted, stdout (the terminal) will be used. + default: '/dev/stdout' + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook-ts.yaml b/doc/openapi/components/schemas/hook-ts.yaml new file mode 100644 index 000000000..5ed779e01 --- /dev/null +++ b/doc/openapi/components/schemas/hook-ts.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +additionalProperties: false +properties: + type: + type: string + const: ts + + priority: + default: 99 + $ref: ./shared-hook-priority.yaml diff --git a/doc/openapi/components/schemas/hook.yaml b/doc/openapi/components/schemas/hook.yaml new file mode 100644 index 000000000..618f9271e --- /dev/null +++ b/doc/openapi/components/schemas/hook.yaml @@ -0,0 +1,42 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +description: | + Hooks form a pipeline of steps which process, filter or alter sample data. +example: print + +type: [object, string] +discriminator: + x-villas-expand: hook + propertyName: type + mapping: + average: ./hook-average.yaml + cast: ./hook-cast.yaml + decimate: ./hook-decimate.yaml + digest: ./hook-digest.yaml + dp: ./hook-dp.yaml + drop: ./hook-drop.yaml + dump: ./hook-dump.yaml + ebm: ./hook-ebm.yaml + fix: ./hook-fix.yaml + frame: ./hook-frame.yaml + gate: ./hook-gate.yaml + jitter_calc: ./hook-jitter_calc.yaml + limit_rate: ./hook-limit_rate.yaml + limit_value: ./hook-limit_value.yaml + lua: ./hook-lua.yaml + ma: ./hook-ma.yaml + pmu_dft: ./hook-pmu_dft.yaml + pps_ts: ./hook-pps_ts.yaml + print: ./hook-print.yaml + reorder_ts: ./hook-reorder_ts.yaml + restart: ./hook-restart.yaml + rms: ./hook-rms.yaml + round: ./hook-round.yaml + scale: ./hook-scale.yaml + shift_seq: ./hook-shift_seq.yaml + shift_ts: ./hook-shift_ts.yaml + skip_first: ./hook-skip_first.yaml + stats: ./hook-stats.yaml + ts: ./hook-ts.yaml diff --git a/doc/openapi/components/schemas/node-amqp.yaml b/doc/openapi/components/schemas/node-amqp.yaml new file mode 100644 index 000000000..6601ce9f8 --- /dev/null +++ b/doc/openapi/components/schemas/node-amqp.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Advanced Messaging & Queuing Protocol (AMQP) +type: object +required: [type, exchange, routing_key] +properties: + type: + type: string + const: amqp + + format: + $ref: ./format.yaml + + uri: + type: string + format: uri + example: "amqp://guest:guest@localhost:5672/" + description: | + A complete AMQP connection URI. + + If set, it takes precedence over the individual `host`, `port`, `username`, `password` and `vhost` settings, which are otherwise used to construct the URI. + + See also: https://www.rabbitmq.com/uri-spec.html + + host: + type: string + default: localhost + description: | + The hostname of the AMQP broker. + Used to construct the connection URI when `uri` is not set. + + port: + type: integer + default: 5672 + description: | + The port number of the AMQP broker. + Used to construct the connection URI when `uri` is not set. + + username: + type: string + default: guest + description: | + The username used for authentication with the AMQP broker. + Used to construct the connection URI when `uri` is not set. + + password: + type: string + default: guest + description: | + The password used for authentication with the AMQP broker. + Used to construct the connection URI when `uri` is not set. + + vhost: + type: string + default: "/" + description: | + The AMQP virtual host. + Used to construct the connection URI when `uri` is not set. + + exchange: + type: string + description: | + The name of the AMQP exchange the node will publish the messages to. + + routing_key: + type: string + description: | + The routing key of published messages as well as the routing key which is used to bind the subcriber queue. + + ssl: + description: | + Note: These settings are only used if the `uri` setting is using the `amqps://` schema. + + type: object + properties: + verify_hostname: + type: boolean + default: true + + verify_peer: + type: boolean + default: true + + ca_cert: + type: string + description: Path to a CA certificate file used to verify the broker. + + client_cert: + type: string + description: Path to the client certificate file. + + client_key: + type: string + description: Path to the client private key file. + + additionalProperties: false + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-api.yaml b/doc/openapi/components/schemas/node-api.yaml new file mode 100644 index 000000000..0dceae8d8 --- /dev/null +++ b/doc/openapi/components/schemas/node-api.yaml @@ -0,0 +1,127 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +properties: + type: + type: string + const: api + + in: + default: {} + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-api-signal" + + additionalProperties: false + + out: + default: {} + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-api-signal" + + additionalProperties: false +additionalProperties: false + +definitions: + node-api-signal: + type: object + properties: + description: + type: string + description: A human readable description of the channel. + + payload: + description: | + Describes the type of information which is exchanged over the channel. + type: string + enum: + - events + - samples + + range: + oneOf: + - type: object + description: Limits for numeric datatypes + properties: + min: + type: number + max: + type: number + + additionalProperties: false + + - type: array + description: A list of allowed string values for string datatype + items: + type: string + + rate: + type: number + description: | + Expected refresh-rate in Hertz of this channel + Does not apply channels which have event payloads. + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + + additionalProperties: false diff --git a/doc/openapi/components/schemas/config/nodes/c37_118.yaml b/doc/openapi/components/schemas/node-c37_118.yaml similarity index 61% rename from doc/openapi/components/schemas/config/nodes/c37_118.yaml rename to doc/openapi/components/schemas/node-c37_118.yaml index 7faaf28dd..45a5c76a3 100644 --- a/doc/openapi/components/schemas/config/nodes/c37_118.yaml +++ b/doc/openapi/components/schemas/node-c37_118.yaml @@ -2,99 +2,146 @@ # SPDX-FileCopyrightText: 2024-2025 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: -- type: object - properties: - - in: - type: object - description: | - Client (PDC) side. When an address is given, the node connects to a - remote PMU / PDC, requests its configuration and reads data frames. - properties: - - address: - type: string - description: | - Hostname or IP address of the remote PMU / PDC in the format - `host[:port]`. The port defaults to the C37.118 port 4712 when - omitted. - - idcode: - type: integer - default: 1 - minimum: 0 - maximum: 65535 - description: | - IDCODE placed in the command frames sent to the remote device. - - out: - type: object - description: | - Server (PMU / PDC) side. When an address is given, the node listens for - a connecting PDC, answers configuration and command frames and streams - data frames built from the samples written to the node. - required: - - address - - data_rate - - pmus - properties: - - address: - type: string - description: | - Local address to bind to in the format `host[:port]`. An empty host - binds to all interfaces. The port defaults to the C37.118 port 4712 - when omitted. - - idcode: - type: integer - default: 1 - minimum: 0 - maximum: 65535 - description: | - IDCODE reported in the frames served to the connecting PDC. - - testing: - type: boolean - default: false - description: | - Enable "testing" mode. This is only intended to be used by our - integration tests. - - This causes the server to not discard samples when no client is - connected. This option effectively makes the server busy-wait - for a client to connect and can easily exhaust the internal - queue of sent samples. - - time_base: - type: integer - default: 1000000 - minimum: 1 - maximum: 16777215 - description: | - Resolution of the fractional second (FRACSEC) timestamp, i.e. the - number of sub-second units per second. The C37.118 TIME_BASE field - is 24 bits wide, so the value must not exceed 16777215. - - data_rate: - type: number - minimum: 3.05175e-5 - maximum: 32767 - description: | - Reporting rate in frames per second. Rates below one frame per - second are supported (e.g. 0.5 for one frame every two seconds) and - are encoded using the C37.118 seconds-per-frame representation. - - pmus: - type: array - minItems: 1 - items: - $ref: '#/definitions/node-c37.118-pmu' - description: | - The list of PMU configurations served by this node. - -- $ref: ../node.yaml +type: object +required: [type] +properties: + type: + type: string + const: c37.118 + + in: + type: object + required: [address] + description: | + Client (PDC) side. When an address is given, the node connects to a + remote PMU / PDC, requests its configuration and reads data frames. + + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + address: + type: string + description: | + Hostname or IP address of the remote PMU / PDC in the format + `host[:port]`. The port defaults to the C37.118 port 4712 when + omitted. + + idcode: + type: integer + default: 1 + minimum: 0 + maximum: 65535 + description: | + IDCODE placed in the command frames sent to the remote device. + + additionalProperties: false + + out: + type: object + required: [address, data_rate, pmus] + description: | + Server (PMU / PDC) side. When an address is given, the node listens for + a connecting PDC, answers configuration and command frames and streams + data frames built from the samples written to the node. + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + address: + type: string + description: | + Local address to bind to in the format `host[:port]`. An empty host + binds to all interfaces. The port defaults to the C37.118 port 4712 + when omitted. + + idcode: + type: integer + default: 1 + minimum: 0 + maximum: 65535 + description: | + IDCODE reported in the frames served to the connecting PDC. + + testing: + type: boolean + default: false + description: | + Enable "testing" mode. This is only intended to be used by our + integration tests. + + This causes the server to not discard samples when no client is + connected. This option effectively makes the server busy-wait + for a client to connect and can easily exhaust the internal + queue of sent samples. + + time_base: + type: integer + default: 1000000 + minimum: 1 + maximum: 16777215 + description: | + Resolution of the fractional second (FRACSEC) timestamp, i.e. the + number of sub-second units per second. The C37.118 TIME_BASE field + is 24 bits wide, so the value must not exceed 16777215. + + data_rate: + type: number + minimum: 3.05175e-5 + maximum: 32767 + description: | + Reporting rate in frames per second. Rates below one frame per + second are supported (e.g. 0.5 for one frame every two seconds) and + are encoded using the C37.118 seconds-per-frame representation. + + pmus: + type: array + minItems: 1 + items: + $ref: '#/definitions/node-c37.118-pmu' + description: | + The list of PMU configurations served by this node. + + additionalProperties: false +additionalProperties: false definitions: node-c37.118-pmu: @@ -106,7 +153,6 @@ definitions: - frequency - rocof properties: - name: type: string maxLength: 255 @@ -209,6 +255,7 @@ definitions: description: | The digital status bits of the PMU. Every 16 bits form one digital status word. + additionalProperties: false node-c37.118-phasor: type: object @@ -273,6 +320,8 @@ definitions: - pseudo_phasor_value - other + additionalProperties: false + node-c37.118-analog: type: object description: | @@ -305,6 +354,8 @@ definitions: description: | Type of the analog value. + additionalProperties: false + node-c37.118-digital: type: object description: | @@ -313,7 +364,6 @@ definitions: required: - signal properties: - signal: type: string description: | @@ -331,3 +381,5 @@ definitions: default: false description: | Normal state of the digital status bit. + + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-can.yaml b/doc/openapi/components/schemas/node-can.yaml new file mode 100644 index 000000000..199c9c38d --- /dev/null +++ b/doc/openapi/components/schemas/node-can.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, interface_name] +properties: + type: + type: string + const: can + + interface_name: + type: string + description: Name of the Socket CAN interface + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-can-signal" + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-can-signal" + + additionalProperties: false + +additionalProperties: false + +definitions: + node-can-signal: + type: object + properties: + can_id: + type: integer + default: 0 + + can_size: + type: integer + default: 8 + + can_offset: + type: integer + default: 0 + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-comedi.yaml b/doc/openapi/components/schemas/node-comedi.yaml new file mode 100644 index 000000000..d6d680fc6 --- /dev/null +++ b/doc/openapi/components/schemas/node-comedi.yaml @@ -0,0 +1,140 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Comedi-compatible DAQ/ADC cards +type: object +required: [type, device] +properties: + type: + type: string + const: comedi + + device: + type: string + description: The path to the Comedi device file. + example: /dev/comedi0 + + in: + type: object + required: [rate, signals] + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + subdevice: + type: integer + description: The Comedi subdevice number. Auto-detected if not specified. + + bufsize: + type: integer + default: 16 + description: The size of the Comedi buffer in kilobytes. + + rate: + type: integer + description: The sampling rate in Hertz. + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + minItems: 1 + items: + $ref: "#/definitions/node-comedi-signal" + + additionalProperties: false + + out: + type: object + required: [rate, signals] + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + subdevice: + type: integer + description: The Comedi subdevice number. Auto-detected if not specified. + + bufsize: + type: integer + default: 16 + description: The size of the Comedi buffer in kilobytes. + + rate: + type: integer + description: The sampling rate in Hertz. + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + minItems: 1 + items: + $ref: "#/definitions/node-comedi-signal" + + additionalProperties: false + +additionalProperties: false + +definitions: + node-comedi-signal: + type: object + required: + - channel + - range + - aref + + properties: + channel: + type: integer + + range: + type: integer + + aref: + type: integer + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-ethercat.yaml b/doc/openapi/components/schemas/node-ethercat.yaml new file mode 100644 index 000000000..7353bb5d8 --- /dev/null +++ b/doc/openapi/components/schemas/node-ethercat.yaml @@ -0,0 +1,110 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2018-2020 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Send and receive samples over an EtherCAT connection +type: object +required: [type] +properties: + type: + type: string + const: ethercat + + rate: + type: number + default: 1000 + description: The cyclic rate in Hertz at which process data is exchanged. + + in: + type: object + required: [num_channels] + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + num_channels: + type: integer + default: 8 + + range: + type: number + default: 10.0 + + position: + type: integer + default: 2 + + product_code: + type: integer + + vendor_id: + type: integer + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + required: [num_channels] + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + num_channels: + type: integer + default: 8 + + range: + type: number + default: 10.0 + + position: + type: integer + default: 1 + + product_code: + type: integer + + vendor_id: + type: integer + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-example.yaml b/doc/openapi/components/schemas/node-example.yaml new file mode 100644 index 000000000..549ba80a0 --- /dev/null +++ b/doc/openapi/components/schemas/node-example.yaml @@ -0,0 +1,33 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Example Node +type: object +required: [type] +properties: + type: + type: string + const: example + + setting1: + type: integer + minimum: 0 # Make sure any constraints of the values are checked by ExampleNode::check(). + maximum: 100 + default: 72 # Make sure the default values match ExampleNode::ExampleNode(). + description: A first setting + + setting2: + type: string + minimum: 0 + maximum: 10 + default: something + description: Another setting + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-exec.yaml b/doc/openapi/components/schemas/node-exec.yaml new file mode 100644 index 000000000..9a8bfb6fe --- /dev/null +++ b/doc/openapi/components/schemas/node-exec.yaml @@ -0,0 +1,64 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Exec +type: object +required: [type, exec] +properties: + type: + type: string + const: exec + + format: + default: villas.human + $ref: ./format.yaml + + shell: + type: boolean + default: false + description: | + If set, the `exec` setting gets passed the shell (`/usr/bin`). + In this case the `exec` setting must be given as a string. + + If not set, we will directly execute the sub-process via `execvpe(2)`. + In this case the exec setting must be given as an array (`argv[]`). + + exec: + description: | + The program which should be executed in the sub-process. + + The option is passed to the system shell for execution. + + oneOf: + - type: array + minItems: 1 + items: + type: string + - type: string + + flush: + type: boolean + default: true + description: | + Flush stream every time VILLASnode passes data the sub-process. + + working_directory: + type: string + description: | + If set, the working directory for the sub-process will be changed. + + environment: + type: object + description: | + A object of key/value pairs of environment variables which should be passed to the sub-process in addition to the parent environment. + additionalProperties: + type: string + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-file.yaml b/doc/openapi/components/schemas/node-file.yaml new file mode 100644 index 000000000..6c9a9eb30 --- /dev/null +++ b/doc/openapi/components/schemas/node-file.yaml @@ -0,0 +1,182 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: File +type: object +required: [type, uri] +properties: + type: + type: string + const: file + + format: + default: villas.human + $ref: ./format.yaml + + uri: + type: string + description: | + Specifies the path to a local file which is written to or read from depending on which group (`in` or `out`) is used. + + This setting allows to add special placeholders for time and date values. + See [strftime(3)](http://man7.org/linux/man-pages/man3/strftime.3.html) for a list of supported placeholder. + + **Example**: + + ``` + uri = "logs/measurements_%Y-%m-%d_%H-%M-%S.log" + ``` + + will create a file called: + + ``` + ./logs/measurements_2015-08-09_22-20-50.log + ``` + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + epoch: + type: number + + epoch_mode: + type: string + enum: + - direct + - wait + - relative + - absolute + - original + description: | + The *epoch* describes the point in time when the first message will be read from the file. + This setting allows to select the behavior of the following `epoch` setting. + It can be used to adjust the point in time when the first value should be read. + + The behavior of `epoch` is depending on the value of `epoch_mode`. + + To facilitate the following description of supported `epoch_mode`'s, we will introduce some intermediate variables (timestamps). + Those variables will also been displayed during the startup phase of the server to simplify debugging. + + - `epoch` is the value of the `epoch` setting. + - `first` is the timestamp of the first message / line in the input file. + - `offset` will be added to the timestamps in the file to obtain the real time when the message will be sent. + - `start` is the point in time when the first message will be sent (`first + offset`). + - `eta` the time to wait until the first message will be send (`start - now`) + + The supported values for `epoch_mode`: + + | `epoch_mode` | `offset` | `start = first + offset` | + | :-- | :-- | :-- | + | `direct` | `now - first + epoch` | `now + epoch` | + | `wait` | `now + epoch` | `now + first` | + | `relative` | `epoch` | `first + epoch` | + | `absolute` | `epoch - first` | `epoch` | + | `original` | `0` | immediately | + + rate: + type: number + default: 0 + description: | + By default `send_rate` has the value `0` which means that the time between consecutive samples is the same as in the `in` file based on the timestamps in the first column. + + If this setting has a non-zero value, the default behavior is overwritten with a fixed rate. + + eof: + type: string + default: exit + enum: + - rewind + - wait + - exit + - stop + + description: | + Defines the behavior if the end of file of the input file is reached. + + - `rewind` will rewind the file pointer and restart reading samples from the beginning of the file. + - `exit` will terminated the program. + - `wait` will periodically test if there are new samples which have been appended to the file. + + buffer_size: + type: integer + minimum: 0 + default: 0 + description: | + Similar to the [`out.buffer_size` setting](#out-buffer_size). This means that the data is loaded into the buffer before it is passed on to the node. + + If `in.buffer_size = 0`, no buffer will be generated. + + skip: + type: integer + minimum: 0 + default: 0 + description: | + The number of lines which should be skipped at the beginning of the input file. + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + flush: + type: boolean + description: | + With this setting enabled, the outgoing file is flushed whenever new samples have been written to it. + + buffer_size: + type: integer + default: 0 + minimum: 0 + description: | + If this is set to a positive value ``, the node will generate a full [stream buffer](https://linux.die.net/man/3/setvbuf) with a size of `` bytes. This means that the data is buffered and not written until the buffer is full or until the node is stopped. + + If `out.buffer_size = 0`, no buffer will be generated. + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-fpga.yaml b/doc/openapi/components/schemas/node-fpga.yaml new file mode 100644 index 000000000..2f989ca85 --- /dev/null +++ b/doc/openapi/components/schemas/node-fpga.yaml @@ -0,0 +1,45 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: VILLASfpga node-type +type: object +required: [type, card] +properties: + type: + type: string + const: fpga + + card: + description: | + The FPGA card to use for this node. + Either the name of a card defined elsewhere, or an inline card definition object. + oneOf: + - type: string + description: The name of the FPGA card. + - allOf: + - $ref: ./shared-fpga-card.yaml + - required: [name] + + connect: + type: array + description: A list of connect strings describing the internal FPGA IP interconnections. + items: + type: string + + low_latency_mode: + type: boolean + description: Enables low-latency mode using scatter-gather DMA. + + timestep: + type: number + default: 0.01 + description: The simulation timestep in seconds. + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-iec60870-5-104.yaml b/doc/openapi/components/schemas/node-iec60870-5-104.yaml new file mode 100644 index 000000000..b1d6bb882 --- /dev/null +++ b/doc/openapi/components/schemas/node-iec60870-5-104.yaml @@ -0,0 +1,161 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: IEC 60870-5-104 +type: object +required: [type] +properties: + type: + type: string + const: iec60870-5-104 + + in: + $ref: ./shared-node-in.yaml + + address: + type: string + default: localhost + description: | + Hostname or IP address for the IEC60870 slave to listen on. + + port: + type: integer + default: 2404 + description: | + Port number of the IEC60870 slave. + + ca: + type: integer + default: 1 + description: | + Common Address of the IEC60870 slave. + + low_priority_queue: + type: integer + default: 100 + description: | + Message queue size for the periodic messages (increase on dropped simulation data messages). + + high_priority_queue: + type: integer + default: 100 + description: | + Message queue size for interrogation responses (increase on missing signals in interrogation response). + + apci_t0: + type: integer + + apci_t1: + type: integer + + apci_t2: + type: integer + + apci_t3: + type: integer + + apci_k: + type: integer + + apci_w: + type: integer + + out: + type: object + required: + - signals + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + duplicate_ioa_is_sequence: + type: boolean + default: false + description: | + Treat consecutive signals with the same IOA as a sequence by assigning subsequent IOAs. + + signals: + type: array + items: + $ref: "#/definitions/node-iec60870-5-104-signal" + + additionalProperties: false + +additionalProperties: false + +definitions: + node-iec60870-5-104-signal: + type: object + required: + - ioa + properties: + asdu_type: + description: Human readable names for the supported IEC60870 message types. + type: string + enum: + - single-point + - double-point + - scaled-int + - normalized-float + - short-float + + with_timestamp: + description: Only for use with the human readable asdu_type. + type: boolean + default: false + + asdu_type_id: + description: The IEC60870 standard type id. + type: string + enum: + - M_SP_NA_1 + - M_SP_TB_1 + - M_DP_NA_1 + - M_DP_TB_1 + - M_ME_NB_1 + - M_ME_TB_1 + - M_ME_NA_1 + - M_ME_TA_1 + - M_ME_NC_1 + - M_ME_TC_1 + + ioa: + description: The IEC60870 information object address associated with this signal. + type: integer + minimum: 1 + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-iec61850-8-1.yaml b/doc/openapi/components/schemas/node-iec61850-8-1.yaml new file mode 100644 index 000000000..56b33875b --- /dev/null +++ b/doc/openapi/components/schemas/node-iec61850-8-1.yaml @@ -0,0 +1,377 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: IEC 61850-8-1 (GOOSE) +type: object +required: [type] +properties: + type: + type: string + const: iec61850-8-1 + + keys: + type: array + description: | + Session keys used for R-GOOSE (routed GOOSE). + items: + $ref: "#/definitions/node-iec61850-8-1-key" + + in: + type: object + required: + - subscribers + - signals + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-iec61850-8-1-subscriber-signal" + + subscribers: + type: object + additionalProperties: + $ref: "#/definitions/node-iec61850-8-1-subscriber" + + routed: + type: boolean + default: false + description: | + Use R-GOOSE (routed GOOSE) instead of layer 2 GOOSE. + + local_address: + type: string + default: localhost + description: | + Local address to bind to for R-GOOSE. + + local_port: + type: integer + default: 102 + description: | + Local port to bind to for R-GOOSE. + + multicast_groups: + type: array + items: + type: string + description: | + Multicast groups to join for R-GOOSE. + + interface: + type: string + default: lo + description: | + Name of the ethernet interface to receive on (layer 2 GOOSE). + + with_timestamp: + type: boolean + default: true + + additionalProperties: false + + out: + type: object + required: + - publishers + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + publishers: + type: array + items: + $ref: "#/definitions/node-iec61850-8-1-publisher" + + routed: + type: boolean + default: false + description: | + Use R-GOOSE (routed GOOSE) instead of layer 2 GOOSE. + + local_address: + type: string + default: localhost + description: | + Local address to bind to for R-GOOSE. + + local_port: + type: integer + default: 0 + description: | + Local port to bind to for R-GOOSE. + + remote_address: + type: string + default: localhost + description: | + Remote address to send to for R-GOOSE. + + remote_port: + type: integer + default: 102 + description: | + Remote port to send to for R-GOOSE. + + key_id: + type: integer + description: | + The id of the session key (see 'keys') to use for R-GOOSE. + + interface: + type: string + default: lo + description: | + Name of the ethernet interface to send on (layer 2 GOOSE). + + resend_interval: + type: number + description: | + Time interval for periodic resend of last sample in floating point seconds. + + additionalProperties: false + +additionalProperties: false + +definitions: + node-iec61850-8-1-key: + type: object + required: + - id + - security + - signature + properties: + id: + type: integer + description: | + Numeric identifier of the session key. + + security: + type: string + enum: + - aes_128_gcm + - aes_256_gcm + - none + description: | + Security (encryption) algorithm for the session key. + + signature: + type: string + enum: + - aes_gmac_64 + - aes_gmac_128 + - hmac_sha256_80 + - hmac_sha256_128 + - hmac_sha256_256 + - hmac_sha3_80 + - hmac_sha3_128 + - hmac_sha3_256 + - none + description: | + Signature algorithm for the session key. + + string: + type: string + description: | + The key material as a raw string. Mutually exclusive with 'base64'. + + base64: + type: string + description: | + The key material as a base64 encoded string. Mutually exclusive with 'string'. + + additionalProperties: false + + node-iec61850-8-1-subscriber: + type: object + required: + - go_cb_ref + properties: + go_cb_ref: + type: string + + dst_address: + type: string + + app_id: + type: integer + + trigger: + type: string + enum: + - always + - change + default: always + + additionalProperties: false + + node-iec61850-8-1-subscriber-signal: + type: object + required: + - subscriber + - index + - mms_type + properties: + subscriber: + type: string + description: | + Name of the subscriber (see 'subscribers') this signal is mapped to. + + index: + type: integer + description: | + Index within the received GOOSE event array. + + mms_type: + type: string + enum: + - boolean + - int8 + - int16 + - int32 + - int64 + - int8u + - int16u + - int32u + - bitstring + - float32 + - float64 + description: | + Expected basic data type in received array. + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + + additionalProperties: false + + node-iec61850-8-1-publisher: + type: object + required: + - go_cb_ref + - data_set_ref + - app_id + - conf_rev + - time_allowed_to_live + - data + properties: + go_id: + type: string + + go_cb_ref: + type: string + + data_set_ref: + type: string + + dst_address: + type: string + + app_id: + type: integer + + conf_rev: + type: integer + + time_allowed_to_live: + type: integer + + burst: + type: integer + default: 1 + + data: + type: array + items: + $ref: "#/definitions/node-iec61850-8-1-publisher-data" + + additionalProperties: false + + node-iec61850-8-1-publisher-data: + type: object + required: + - mms_type + properties: + mms_type: + type: string + enum: + - boolean + - int8 + - int16 + - int32 + - int64 + - int8u + - int16u + - int32u + - bitstring + - float32 + - float64 + description: | + Basic data type of the value in the transmitted array. + + signal: + type: string + description: | + Name of the input signal for the value. + + value: + type: [integer, number, boolean] + description: | + Constant signal value. + + mms_bitstring_size: + type: integer + default: 32 + description: | + Size metadata for mms_type bitstring. + + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-iec61850-9-2.yaml b/doc/openapi/components/schemas/node-iec61850-9-2.yaml new file mode 100644 index 000000000..b517da18a --- /dev/null +++ b/doc/openapi/components/schemas/node-iec61850-9-2.yaml @@ -0,0 +1,177 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: IEC 61850-9-2 (Sampled Values) +type: object +required: [type, interface] +properties: + type: + type: string + const: iec61850-9-2 + + interface: + type: string + description: Name of network interface to/from which this node will publish/subscribe for SV frames. + + app_id: + type: integer + default: 0x4000 + + dst_address: + type: string + default: 01:0c:cd:01:00:01 + + in: + type: object + required: [signals] + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + check_dst_address: + type: boolean + default: false + + signals: + type: array + minItems: 1 + items: + $ref: "#/definitions/node-iec61850-9-2-signal" + + additionalProperties: false + + out: + type: object + required: + - signals + - sv_id + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + minItems: 1 + items: + $ref: "#/definitions/node-iec61850-9-2-signal" + + sv_id: + type: string + + conf_rev: + type: integer + + smp_mod: + type: string + enum: + - per_nominal_period + - samples_per_second + - seconds_per_sample + + smp_synch: + type: string + enum: + - not_synchronized + - local_clock + - global_clock + + smp_rate: + type: integer + + vlan: + type: object + properties: + enabled: + type: boolean + default: true + + id: + type: integer + default: 0 + + priority: + type: integer + default: 4 + + additionalProperties: false + + additionalProperties: false + +additionalProperties: false + +definitions: + node-iec61850-9-2-signal: + type: object + properties: + iec_type: + type: string + enum: + - boolean + - int8 + - int16 + - int32 + - int64 + - int8u + - int16u + - int32u + - int64u + - float32 + - float64 + - enumerated + - coded_enum + - octet_string + - visible_string + - objectname + - objectreference + - timestamp + - entrytime + - bitstring + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-infiniband.yaml b/doc/openapi/components/schemas/node-infiniband.yaml new file mode 100644 index 000000000..cba2ee08b --- /dev/null +++ b/doc/openapi/components/schemas/node-infiniband.yaml @@ -0,0 +1,249 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: InfiniBand (RDMA) node-type +type: object +required: [type] +properties: + type: + type: string + const: infiniband + + rdma_transport_mode: + type: string + enum: + - RC + - UC + - UD + default: RC + description: | + This specifies the type of connection the node will set up. + + * `RC` provides reliable, connection-oriented, message based communication between the nodes. Packets are delivered in order. In this mode, one Queue Pair is connected to one other Queue Pair. + * `UC` provides unreliable, connection-oriented, message based communication between the nodes. This service type is not officially supported by the RDMA communication manager and is implemented for scientific purposes in VILLASnode. [The InfiniBand node-type source code provides information on how to enable this service type.](https://git.rwth-aachen.de/acs/public/villas/node/blob/master/lib/nodes/infiniband.c#L429) + * `UD` provides unreliable, connection-less, datagram communication between nodes. Both ordering and delivery are not guaranteed in this mode. + + `RC`, `UC`, and `UD` are mapped to the Queue Pair types as `RDMA_PS_TCP`/`IBV_QPT_RC`, `RDMA_PS_IPOIB`/`IBV_QPT_UC`, and `RDMA_PS_UDP`/`IBV_QPT_UD`, respectively. + If two nodes should be connected, both should be set to the same `rdma_transport_mode`. + + More information on these two modes can be found on the manual page for [`rdma_create_id()`](https://linux.die.net/man/3/rdma_create_id). + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + address: + type: string + description: | + Connections between `infiniband` nodes are established over IP over IB (IPoIP). + To use this node, you have to make sure that the linux driver `ib_ipoib` is loaded. + If it is not loaded, load it with `modprobe ib_ipoib`. + + If it is loaded, you have to make sure that the Host Channel Adapters (HCAs) have an IP address. + You can configure the IP address of the Infiniband HCA with the `ifconfig` utility, exactly like you would configure normal Ethernet adapters. + + As soon as an IP is set for the local HCA, this entry can be used to point to the adapter and to define the port which will be used for connection related communication. + + **Example**: + + ``` + in = { + address="10.0.0.1:1337" + } + ``` + + binds the node to the local device which is bound to `10.0.0.1`. It will use port `1337` for communication related to the connection. + + max_wrs: + type: integer + default: 128 + description: | + Before a packet can be received with Infiniband, the application has to describe how this will be handled (e.g., to what address the data will be written). + This happens in a so called Work Request (WR). + + `in.max_wrs` sets the maximum number of receive Work Requests which can be posted to the receive queue of the Queue Pair. + + For higher throughput, it is recommended to increase this value since it will serve as a buffer. + + cq_size: + type: integer + default: 128 + description: | + This value defines the number of Work Completions the Completion Queue can hold. + + If a packet is received, the Queue Pair will write a Work Completion to the Completion Queue. + The node polls this queue to process received packets. If the Completion Queue gets full, which is often caused by `cq_size` being to small, and thus the receive queue is not able to post Work Completions, the node will abort. + + If a connection is disconnected, all outstanding Work Requests—even is they are not used—are flushed to the Completion Queue. + Here applies the same as mentioned above: if the Completion Queue has fewer space left than outstanding Work Requests are available, this will result in an error. + + It is therefor recommended to set the value of `cq_size` to at least + + ``` + in.cq_size >= in.max_wrs - in.buffer_subtraction + ``` + + buffer_subtraction: + type: integer + default: 16 + description: | + As mentioned in the `in.max_wrs` settings, Work Requests have to be present in the receive queue, for it to be able to process received data. + To take full advantage of the zero-copy capabilities of Infiniband this node-type directly posts addresses from the VILLASnode to the receive queue instead of copying all data over after receiving it. + + This technique relies on the exchange of addresses. This means that if an array of `in.vectorize` addresses is handed over to the node-type, max `release` <= `in.vectorize` addresses that point to received data can be returned. + + Furthermore, if `release` addresses should be returned, `release` addresses from the original array must be posted to the receive queue. + To ensure that we can always post at least `in.vectorize` new samples to the receive queue, `in.buffer_subtraction` must always be bigger than `in.vectorize`. + + A second factor is performance: if `in.buffer_subtraction` is too small it might take long before the node starts to process data since it has to fill almost the complete queue first. + If `in.buffer_subtraction` is too big, the receive buffer might be too small. + + Thus, the maximum number of Work Requests to be present in the receive queue is defined as follows: + + ```c + max_wrs_posted = in.max_wrs - in.buffer_subtraction + ``` + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + address: + type: string + description: | + This value defines the IPoIB address of the remote node and is used to establish a connection to the remote host—in case of `RDMA_PS_TCP`—or to get the address handle of the remote host—in case of `RDMA_PS_UDP`. + + This is similar to `in.address`. + + `out.address` has no default value and if it is not defined the node will be set to listening mode and all `out` configuration will be ignored. + + **Example**: + + ``` + out = { + address = "10.0.0.1:1337" + } + ``` + + resolution_timeout: + type: integer + default: 1000 + description: | + This defines the time in milliseconds [`rdma_resolve_addr()`](https://linux.die.net/man/3/rdma_resolve_addr) waits for the resolution of the destination address to complete. + + max_wrs: + type: integer + default: 128 + description: | + This is similar to `in.max_wrs` but for the send side of the Queue Pair. + In contrast to the receive queue, there is no minimum amount of Work Requests in this queue and it can be filled up completely to `out.max_wrs`. + + cq_size: + type: integer + default: 128 + description: | + This is similar to `in.cq_size`. + + An important side note for the receive completion queue was that it should be able to hold all Work Requests if the receive queue is flushed. + Since no "preparatory" Work Requests are posted to the send queue and and thus all work requests are send out as soon as possible, there is no need for `out.cq_size` to be as big as `out.max_wrs`. + + send_inline: + type: boolean + default: true + description: | + It is possible that the CPU copies the data to be sent directly to the HCA. + Then, the HCA can take the data from it's internal memory as soon as it is ready to send it. + This has the advantage that the buffer can be returned immediately to the VILLASnode and that it increases performance. + + If this flag is set, the [`infiniband`](../nodes/infiniband.md) node-type checks if a sample is small enough to be sent inline, and if this is the case sends it inline. + + max_inline_data: + type: integer + default: 0 + description: | + This value represents the maximum number of bytes to be send inline. + The maximum number of this value depends on the HCA. + The settings defaults to zero. However, many HCAs will automatically adjust it to 60. + + *Important note*: The greater this value gets, the smaller `out.max_wrs` can be. If `out.max_inline_data` is too big for the number specified in `out.max_wrs`, the node will return an error that the Queue Pair could not be created. + Since this is different for various HCAs, it is not possible for us to give more specified errors. + + **Example**: + + ``` + out = { + send_inline = 1, + max_inline_data = 60 + } + ``` + + Every sample which is smaller than 60 bytes will be send inline. All other samples will be sent normally. + + use_fallback: + type: boolean + default: true + description: | + If an out section with a valid remote entry is present in the configuration file, the node will first bind to the local host channel adapter and subsequentially try to connect to the remote host. + If the latter fails (e.g., because the remote host was not reachable or rejected the connection), there are two possible outcomes: the node can throw an error and abort or it can show a warning and continue in listening mode. + + If `use_fallback = true`, the node will fallback to listening mode if it is not able to connect to the remote host. + + periodic_signaling: + type: integer + default: + description: | + If a sample is sent inline, no Completion Queue Entry (CQE) is generated. + However, once a while, a CQE must be generated to prevent the Send Queue from overflowing. + Therefore, every `out.periodic_signaling`th sample will be sent normally with signaling. + + It turns out that the ideal value in most cases is `out.max_wrs / 2`. + Hence, usually, it is not necessary to explicitly set this value. + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-influxdb.yaml b/doc/openapi/components/schemas/node-influxdb.yaml new file mode 100644 index 000000000..827a8c750 --- /dev/null +++ b/doc/openapi/components/schemas/node-influxdb.yaml @@ -0,0 +1,30 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: InfluxDB +type: object +required: [type, server, key] +properties: + type: + type: string + const: influxdb + + in: + $ref: ./shared-node-in.yaml + + server: + type: string + description: A hostname/port combination of the InfluxDB database server. + + key: + type: string + description: | + The key is the measurement name and any optional tags separated by commas. + + See also: [InfluxDB documentation](https://docs.influxdata.com/influxdb/v0.9/write_protocols/line/#key). + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-kafka.yaml b/doc/openapi/components/schemas/node-kafka.yaml new file mode 100644 index 000000000..7058ee70e --- /dev/null +++ b/doc/openapi/components/schemas/node-kafka.yaml @@ -0,0 +1,140 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, server, protocol] +properties: + type: + type: string + const: kafka + + format: + default: villas.binary + $ref: ./format.yaml + + server: + type: string + description: | + The bootstrap server `{ip}:{port}` of the Kafka message brokers cluster. + + protocol: + type: string + enum: + - PLAINTEXT + - SASL_PLAINTEXT + - SASL_SSL + - SSL + description: | + The [security protocol](https://kafka.apache.org/24/javadoc/org/apache/kafka/common/security/auth/SecurityProtocol.html) which is used for authentication with the Kafka cluster. + + client_id: + type: string + default: villas-node + description: The Kafka client identifier. + + timeout: + type: number + description: A timeout in seconds for the broker connection. + default: 1.0 + + ssl: + type: object + required: + - ca + properties: + ca: + type: string + description: Path to a Certificate Authority (CA) bundle which is used to validate broker server certificate. + + additionalProperties: false + + sasl: + type: object + description: | + An object for configuring the SASL authentication against the broker. + This setting is used if the `protocol` setting is on of `SASL_PLAINTEXT` or `SASL_SSL`. + + required: + - mechanisms + - username + - password + properties: + mechanisms: + type: string + + username: + type: string + + password: + type: string + + additionalProperties: false + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + consume: + type: string + description: The Kafka topic to which this node-type will subscribe for receiving messages. + + group_id: + type: string + description: The group id of the Kafka client used for receiving messages. + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + produce: + type: string + description: The Kafka topic to which this node-type will publish messages. + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-loopback.yaml b/doc/openapi/components/schemas/node-loopback.yaml new file mode 100644 index 000000000..c53a0e7be --- /dev/null +++ b/doc/openapi/components/schemas/node-loopback.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Loopback +type: object +required: [type] +properties: + type: + type: string + const: loopback + + queuelen: + type: integer + minimum: 0 + description: The queue length of the internal queue which buffers the samples. + + mode: + type: string + enum: + - pthread + - polling + - eventfd + - auto + default: auto + description: Specify the synchronization mode of the internal queue. + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-modbus.yaml b/doc/openapi/components/schemas/node-modbus.yaml new file mode 100644 index 000000000..fdecc5006 --- /dev/null +++ b/doc/openapi/components/schemas/node-modbus.yaml @@ -0,0 +1,220 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH +# SPDX-License-Identifier: Apache-2.0 +--- +title: Read and write Modbus registers +type: object +required: [type, transport] +properties: + type: + type: string + const: modbus + + transport: + type: string + description: The transport protocol used for Modbus communication. + enum: + - tcp + - rtu + + response_timeout: + type: number + description: The timeout in seconds when waiting for responses from a Modbus server. + default: 1.0 + example: 1.0 + + reconnect_interval: + type: number + description: The interval in seconds for trying to reconnect on connection loss. + default: 10.0 + + min_block_usage: + type: number + description: | + The minimum ratio of used registers to queried registers for a merged block of registers. + This caps the amount of unnecessary data transmitted. + default: 0.25 + + max_block_size: + type: integer + description: The maximum size (in registers) of a merged block of register mappings. + default: 32 + + rate: + type: number + description: The rate at which Modbus device registers are queried for changes. + example: 1.0 + + remote: + type: string + description: The hostname or IP of the Modbus TCP device. Only used with `transport = tcp`. + example: example.com + + port: + type: integer + description: The port number of the Modbus TCP device. Only used with `transport = tcp`. + default: 502 + + device: + type: string + description: Path to the serial device file. Only used with `transport = rtu`. + example: /dev/ttyS0 + + baudrate: + type: integer + description: The baudrate used for serial communication. Only used with `transport = rtu`. + example: 9600 + + parity: + type: string + enum: + - none + - even + - odd + description: The parity used for serial communication. Only used with `transport = rtu`. + example: none + + data_bits: + type: integer + description: The data bits used for serial communication. Only used with `transport = rtu`. + minimum: 5 + maximum: 8 + example: 5 + + stop_bits: + type: integer + description: The stop bits used for serial communication. Only used with `transport = rtu`. + minimum: 1 + maximum: 2 + example: 1 + + unit: + type: integer + description: The addressed unit used for communication. Optional for TCP. + minimum: 0 + maximum: 65535 + example: 1 + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-modbus-signal" + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-modbus-signal" + + additionalProperties: false + +additionalProperties: false + +definitions: + node-modbus-signal: + type: object + required: [address] + properties: + address: + type: integer + description: The modbus register address. + + integer_registers: + type: integer + description: | + The number of consecutive registers combined into a single integer value. + minimum: 1 + maximum: 4 + + word_endianess: + type: string + enum: + - big + - little + description: The ordering of two modbus registers joined together to form a larger number. + default: "big" + + byte_endianess: + type: string + enum: + - big + - little + description: The ordering of the bytes within a modbus register. + default: "big" + + scale: + type: number + description: The scale of the register's value. + default: 1.0 + + offset: + type: number + description: The offset of the register's value. + default: 0.0 + + bit: + type: integer + description: The bit index within a register. + minimum: 0 + maximum: 15 + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-mqtt.yaml b/doc/openapi/components/schemas/node-mqtt.yaml new file mode 100644 index 000000000..8ff6b0875 --- /dev/null +++ b/doc/openapi/components/schemas/node-mqtt.yaml @@ -0,0 +1,165 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, host] +properties: + type: + type: string + const: mqtt + + format: + default: json + $ref: ./format.yaml + + username: + type: string + description: The username which is used for authentication with the MQTT broker. + + password: + type: string + description: The password which is used for authentication with the MQTT broker. + + host: + type: string + description: The hostname of the MQTT broker. + example: example.com + + port: + type: integer + description: The port number of the MQTT broker. + default: 1883 + + retain: + type: boolean + description: Set to true to make the will a retained message. + default: false + + keepalive: + type: integer + default: 5 + description: The MQTT keepalive value. + + qos: + type: integer + default: 0 + description: The quality of service (QoS) to use for the subscription. + + ssl: + type: object + properties: + enabled: + type: boolean + default: true + + insecure: + type: boolean + + cafile: + type: string + description: Path to a file containing the PEM encoded trusted CA certificate file. + + capath: + type: string + description: Path to a directory containing the PEM encoded trusted CA certificate files. + + certfile: + type: string + description: Path to a file containing the PEM encoded certificate file for this client. + + keyfile: + type: string + description: Path to a file containing the PEM encoded private key for this client. + + cipher: + type: string + description: A string describing the ciphers available for use. See the `openssl ciphers` tool for more information. + + verify: + type: boolean + default: true + description: | + Configure verification of the server hostname in the server certificate. + If value is set to true, it is impossible to guarantee that the host you are connecting to is not impersonating your server. + This can be useful in initial server testing, but makes it possible for a malicious third party to impersonate your server through DNS spoofing, for example. + Do not use this function in a real system. + Setting value to true makes the connection encryption pointless. + + tls_version: + type: string + enum: + - tlsv1 + - tlsv1.1 + - tlsv1.2 + description: | + The version of the SSL/TLS protocol to use as a string. + If not set, the default value is used. The default value and the available values depend on the version of openssl that the library was compiled against. + For openssl >= 1.0.1, the available options are tlsv1.2, tlsv1.1 and tlsv1, with tlv1.2 as the default. + For openssl < 1.0.1, only tlsv1 is available. + + additionalProperties: false + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + subscribe: + type: string + description: Topic to which this node subscribes. + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + publish: + type: string + description: Topic to which this node publishes. + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-nanomsg.yaml b/doc/openapi/components/schemas/node-nanomsg.yaml new file mode 100644 index 000000000..0e0187ff0 --- /dev/null +++ b/doc/openapi/components/schemas/node-nanomsg.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +properties: + type: + type: string + const: nanomsg + + format: + default: json + $ref: ./format.yaml + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + endpoints: + description: A single endpoint URI or list of URIs to which this node should connect as a subscriber. + oneOf: + - type: string + format: uri + - type: array + items: + type: string + format: uri + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + endpoints: + description: A single endpoint URI or list of URIs on which this node should listen for subscribers. + oneOf: + - type: string + format: uri + - type: array + items: + type: string + format: uri + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-ngsi.yaml b/doc/openapi/components/schemas/node-ngsi.yaml new file mode 100644 index 000000000..c0ff16a20 --- /dev/null +++ b/doc/openapi/components/schemas/node-ngsi.yaml @@ -0,0 +1,161 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: FIWARE NGSI 9/10 +type: object +required: [type, endpoint, entity_id, entity_type] +properties: + type: + type: string + const: ngsi + + endpoint: + type: string + format: uri + + entity_id: + type: string + description: ID of NGSI entity. + + entity_type: + type: string + description: Type of NGSI entity. + + ssl_verify: + type: boolean + default: true + description: Verify SSL certificate against local trust store. + + timeout: + description: Timeout in seconds for HTTP requests. + type: number + default: 1.0 + + rate: + description: Polling rate in Hz for requesting entity updates from broker. + type: number + default: 1.0 + + access_token: + type: string + description: Send 'Auth-Token' header with every HTTP request. + + create: + type: boolean + default: true + description: Create NGSI entities during startup of node. + + delete: + type: boolean + default: true + description: Remove NGSI entities during shutdown of node. + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-ngsi-signal" + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-ngsi-signal" + + additionalProperties: false + +additionalProperties: false + +definitions: + node-ngsi-signal: + type: object + properties: + ngsi_attribute_name: + type: string + description: | + Name of the NGSI attribute this signal is mapped to. + Defaults to the signal name. + + ngsi_attribute_type: + type: string + description: | + Type of the NGSI attribute this signal is mapped to. + Defaults to the signal unit. + + ngsi_metadatas: + type: array + items: + type: object + required: [name, type, value] + properties: + name: + type: string + + type: + type: string + + value: + type: string + + additionalProperties: false + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-opal_async.yaml b/doc/openapi/components/schemas/node-opal_async.yaml new file mode 100644 index 000000000..4dfc331f7 --- /dev/null +++ b/doc/openapi/components/schemas/node-opal_async.yaml @@ -0,0 +1,79 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# Author: Steffen Vogel +# SPDX-FileCopyrightText: 2023-2025 OPAL-RT Germany GmbH +# SPDX-License-Identifier: Apache-2.0 +--- +title: OPAL-RT Asynchronous Process +type: object +required: [type, id] +properties: + type: + type: string + const: opal.async + + id: + description: The Send/Recv ID of the RT-Lab OpAsyncSend/Recv blocks. + minimum: 1 + default: 1 + type: integer + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + reply: + description: Send a confirmation to the Simulink model that signals have been received and processed. + default: false + type: boolean + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-opal_orchestra.yaml b/doc/openapi/components/schemas/node-opal_orchestra.yaml new file mode 100644 index 000000000..2f21a0944 --- /dev/null +++ b/doc/openapi/components/schemas/node-opal_orchestra.yaml @@ -0,0 +1,314 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH +# SPDX-License-Identifier: Apache-2.0 +--- +title: OPAL-RT Orchestra +type: object +required: [type, domain] +properties: + type: + type: string + const: opal.orchestra + + domain: + type: string + description: >- + The name of the domain to which the connection is requested. This domain must exist in the DDF read by an RT-LAB subsystem. + + synchronous: + type: boolean + description: >- + Determines whether domain participants exchange simulation data synchronously or asynchronously. + + states: + type: boolean + + connection: + $ref: "#/definitions/opal-orchestra-connection" + + ddf: + type: string + description: >- + The path to the DDF file that describes the data exchanged in the specified domain. + + connect_timeout: + $ref: ./shared-duration.yaml + default: 5s + description: >- + The duration after which a failed connection attempt times out. + + flag_delay: + $ref: ./shared-duration.yaml + default: 0s + description: >- + Forces the local Orchestra communication to be made with flags instead of semaphores when using an external communication process. + Flags are recommended for better performance: they are faster but also more CPU-consuming. + + flag_delay_tool: + $ref: ./shared-duration.yaml + description: >- + Forces the local Orchestra communication to be made with flags instead of semaphores when using an external communication process. + Flags are recommended for better performance: they are faster but also more CPU-consuming. + + skip_wait_to_go: + type: boolean + default: false + description: >- + Sets the WaitToGo setting of the model. + When true, VILLASnode ignores the WaitToGo during the connection step. + When false, VILLASnode performs the WaitToGo during the connection step. + + ddf_overwrite: + type: boolean + default: false + description: >- + If true, the DDF file provided in the 'dff' setting will be overwriting with settings and signals from the VILLASnode configuration. + + ddf_overwrite_only: + type: boolean + default: false + description: >- + If true, VILLASnode will overwrite the file provided in the 'ddf' setting, and terminate immediately afterwards. + + rate: + type: number + default: 1 + description: >- + In asynchronous mode (see 'synchronous' setting), this rate defines how often per second the data exchange with the Orchestra domain takes place. + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-opal_orchestra-signal" + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-opal_orchestra-signal" + + additionalProperties: false + +additionalProperties: false + +definitions: + opal-orchestra-connection: + type: object + description: | + Configuration of the connection to the OPAL-RT Orchestra framework. + required: + - type + properties: + type: + description: The type of connection to the OPAL-RT Orchestra framework. + type: string + discriminator: + propertyName: type + mapping: + local: "#/definitions/opal-orchestra-connection-local" + remote: "#/definitions/opal-orchestra-connection-remote" + dolphin: "#/definitions/opal-orchestra-connection-dolphin" + oneOf: + - $ref: "#/definitions/opal-orchestra-connection-local" + - $ref: "#/definitions/opal-orchestra-connection-remote" + - $ref: "#/definitions/opal-orchestra-connection-dolphin" + additionalProperties: true + + opal-orchestra-connection-local: + type: object + properties: + type: + description: The type of connection to the OPAL-RT Orchestra framework. + type: string + + extcomm: + type: string + default: none + enum: + - udp + - tcp + - none + description: Type of external communication protocol helper which should be started. + + addr_framework: + type: string + description: >- + The IP address of the target on which the framework is running. + + port_framework: + type: integer + minimum: 0 + maximum: 65535 + description: >- + The port on which the framework will be reachable. + + nic_framework: + type: string + description: >- + The network interface that the framework will use to communicate with the client. + + nic_client: + type: string + description: >- + The network interface that the client will use to communicate with the framework. + + core_framework: + type: integer + minimum: 0 + description: >- + The core on which the tool of the framework is running. The index starts at 0. + + core_client: + type: integer + minimum: 0 + description: >- + The core on which the tool of the client is running. The index starts at 0. + + additionalProperties: false + + opal-orchestra-connection-remote: + type: object + required: + - card + - pci_index + properties: + type: + description: The type of connection to the OPAL-RT Orchestra framework. + type: string + + card: + type: string + example: VMIPCI5565-64M + description: >- + Type of reflective memory card used for a remote connection. + + pci_index: + type: integer + minimum: 1 + description: >- + PCI index that corresponds to the communication card used for remote connection. + + additionalProperties: false + + opal-orchestra-connection-dolphin: + type: object + required: + - node_id_framework + - segment_id + properties: + type: + description: The type of connection to the OPAL-RT Orchestra framework. + type: string + + node_id_framework: + type: integer + minimum: 4 + maximum: 4096 + description: >- + Node ID for Dolphin node which hosts the Orchestra framework. + + segment_id: + type: integer + minimum: 1 + maximum: 65535 + description: >- + Segment ID used to uniquely identify the framework domain. + Note that another segment ID is automatically calculated outside of this range to identify the client segment. + + additionalProperties: false + + node-opal_orchestra-signal: + type: object + properties: + orchestra_name: + type: string + description: >- + Name of the corresponding Orchestra data item. + Defaults to the VILLAS signal name. + + orchestra_type: + type: string + enum: + - boolean + - unsigned int8 + - unsigned int16 + - unsigned int32 + - unsigned int64 + - int8 + - int16 + - int32 + - int64 + - float32 + - float64 + - bus + description: >- + Type of the corresponding Orchestra data item. + Defaults to a type derived from the VILLAS signal type. + + orchestra_index: + type: integer + minimum: 0 + description: >- + Index of this signal within the Orchestra data item (for bus/array items). + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-opendss.yaml b/doc/openapi/components/schemas/node-opendss.yaml new file mode 100644 index 000000000..6cf1600d2 --- /dev/null +++ b/doc/openapi/components/schemas/node-opendss.yaml @@ -0,0 +1,130 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2025 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Interface to OpenDSS, EPRI's Distribution System Simulator +type: object +required: [type, in, out] +properties: + type: + type: string + const: opendss + + file_path: + type: string + description: | + Specifies the URI to a OpenDSS file. + + in: + type: object + required: [list] + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + list: + type: array + items: + type: object + required: [name, type, data] + properties: + name: + type: string + description: | + Name of the element. + + type: + type: string + description: | + Type of the element. + + data: + type: array + description: | + Data to be input. Possible options depend on the element type. + items: + type: string + + oneOf: + - title: Load or generator + properties: + type: + type: string + enum: [load, generator] + data: + type: array + items: + enum: [kV, kW, kVar, Pf] + + additionalProperties: true + + - title: Current source + properties: + type: + type: string + const: isource + data: + type: array + items: + enum: [Amps, AngleDeg, Frequency] + + additionalProperties: true + additionalProperties: false + + additionalProperties: false + + out: + type: object + required: [list] + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + list: + description: | + Names of the monitors to be read. + type: array + items: + type: string + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-redis.yaml b/doc/openapi/components/schemas/node-redis.yaml new file mode 100644 index 000000000..15e9d5de1 --- /dev/null +++ b/doc/openapi/components/schemas/node-redis.yaml @@ -0,0 +1,154 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +properties: + type: + type: string + const: redis + + format: + default: json + $ref: ./format.yaml + + mode: + type: string + enum: + - key + - set-get + - hash + - hset-hget + - channel + - pub-sub + default: key + description: | + - `key`: [Get](https://redis.io/commands/get)/[Set](https://redis.io/commands/set) of [Redis strings](https://redis.io/topics/data-types#strings) + - The implementation uses the Redis `MSET` and `MGET` commands. + - `hash`: Hashtables using [hash data-type](https://redis.io/topics/data-types#hashes) + - The implementation uses the Redis `HMSET` and `HGETALL` commands. + - `channel`: [Publish/subscribe](https://redis.io/topics/pubsub) + - The implementation uses the Redis `PUBLISH` and `SUBSCRIBE` commands. + + uri: + type: string + format: uri + description: | + A Redis connection URI in the form of: `redis://:@:/`. + + host: + type: string + default: localhost + description: | + The hostname or IP address of the Redis server. + + You can also connect to Redis server with a URI: + + - `tcp://[[username:]password@]host[:port][/db]` + - `unix://[[username:]password@]path-to-unix-domain-socket[/db]` + + port: + type: integer + description: The port number of the Redis server to connect to. + default: 6379 + + path: + type: string + description: A path of a Unix socket which should be used for the connection. + + user: + type: string + default: default + description: | + The username which should be used for authentication. + + See: https://redis.io/commands/auth + + password: + type: string + description: | + The password which should be used for authentication. + + See: https://redis.io/commands/auth + + db: + type: integer + default: 0 + description: | + The logical database which should be used by the Redis client. + + See: https://redis.io/commands/select + + timeout: + type: object + properties: + connect: + type: number + description: The timeout in seconds for the initial connection establishment. + + socket: + type: number + description: The timeout in seconds for executing commands against the Redis server. + + additionalProperties: false + + keepalive: + type: boolean + default: false + description: Enable periodic keepalive packets. + + rate: + type: number + description: The rate in Hertz at which this node polls the Redis server for new values. + + key: + type: string + default: + description: The key which this node will use in the Redis keyspace. + + channel: + type: string + default: + description: The channel which this node will use when `mode` setting is `channel`. + + notify: + type: boolean + default: true + description: | + Use [Redis keyspace notifications](https://redis.io/topics/notifications) to listen for new updates. + This setting is only used if setting `mode` is set to `key` or `hash`. + + ssl: + type: object + properties: + enabled: + type: boolean + default: true + description: If enabled the connection to the Redis server will be encrypted via SSL/TLS. + + cacert: + type: string + description: A path to a CA certificate file. + + cacertdir: + type: string + description: A path to a directory containing CA certificates. + + cert: + type: string + description: A path to a client certificate file. + + key: + type: string + description: A path to the private key file. + + additionalProperties: false + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-rtp.yaml b/doc/openapi/components/schemas/node-rtp.yaml new file mode 100644 index 000000000..2d45bb95f --- /dev/null +++ b/doc/openapi/components/schemas/node-rtp.yaml @@ -0,0 +1,135 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, in, out] +properties: + type: + type: string + const: rtp + + format: + default: villas.binary + $ref: ./format.yaml + + rtcp: + type: boolean + description: Enable Real-time Control Protocol (RTCP) + + aimd: + type: object + properties: + a: + type: number + default: 10 + + b: + type: number + default: 0.5 + + Kp: + type: number + default: 1.0 + + Ki: + type: number + default: 0.0 + + Kd: + type: number + default: 0.0 + + rate_min: + type: number + default: 1 + + rate_source: + type: number + default: 2000 + + rate_init: + type: number + + log: + type: string + + hook_type: + type: string + default: disabled + enum: + - decimate + - limit_rate + - disabled + + additionalProperties: false + + in: + type: object + required: + - address + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + address: + type: string + description: | + The local address and port number this node should listen for incoming packets. + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + required: + - address + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + address: + type: string + description: | + The remote address and port number to which this node will send data. + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-shmem.yaml b/doc/openapi/components/schemas/node-shmem.yaml new file mode 100644 index 000000000..9ce821455 --- /dev/null +++ b/doc/openapi/components/schemas/node-shmem.yaml @@ -0,0 +1,108 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Shared Memory +type: object +required: [type, in, out] +properties: + type: + type: string + const: shmem + + queuelen: + type: integer + default: + description: Length of the input and output queues in elements. + + mode: + type: string + default: pthread + enum: + - pthread + - polling + description: | + If set to `pthread`, POSIX condition variables (CV) are used to signal writes between processes. + If set to `polling`, no CV's are used, meaning that blocking writes have to be implemented using polling, leading to performance improvements at a cost of unnecessary CPU usage. + + exec: + description: | + Optional name and command-line arguments (as passed to `execve`) of a command to be executed during node startup. + This can be used to start the external program directly from VILLASNode. If unset, no command is executed. + type: array + items: + type: string + + in: + type: object + required: + - name + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + name: + type: string + description: | + Name of the POSIX shared memory object. + Must start with a forward slash (/). + The same name should be passed to the external program somehow in its configuration or command-line arguments. + + additionalProperties: false + + out: + type: object + required: + - name + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + name: + type: string + description: | + Name of the POSIX shared memory object. + Must start with a forward slash (/). + The same name should be passed to the external program somehow in its configuration or command-line arguments. + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-signal.yaml b/doc/openapi/components/schemas/node-signal.yaml new file mode 100644 index 000000000..7deb5e4b2 --- /dev/null +++ b/doc/openapi/components/schemas/node-signal.yaml @@ -0,0 +1,146 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Signal Generator +type: object +required: +- type +- signal +properties: + type: + type: string + const: signal + + signal: + description: | + The type of signal which should be generated. + + A single value is applied to all generated signals, or an array with one + entry per signal may be given (its length must then match `values`). + + - `random`: a random walk with normal distributed step sizes will be generated. + - `sine`: a sine signal will be generated. + - `square`: a square / rectangle wave will be generated. + - `triangle`: a triangle wave will be generated. + - `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`. + - `counter`: increasing integer counter is generated. + - `constant`: a constant value generated. + - `mixed`: the signals of of each sample are generated by cycling over all remaining signal types. + - `pulse`: generates pulses with a set frequency, phase and width + + oneOf: + - $ref: "#/definitions/node-signal-type" + - type: array + items: + $ref: "#/definitions/node-signal-type" + + values: + type: integer + default: 1 + description: The number of signals which each of the generated samples should contain. + + rate: + type: number + description: The rate at which sample should be generated by the node. + default: 10 + + amplitude: + default: 1.0 + description: The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`. + allOf: + - $ref: "#/definitions/node-signal-value" + + frequency: + default: 1.0 + description: The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`. + allOf: + - $ref: "#/definitions/node-signal-value" + + phase: + default: 0.0 + description: Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`. + allOf: + - $ref: "#/definitions/node-signal-value" + + pulse_width: + default: 1.0 + description: The width of the pulse, with respect to the rate + allOf: + - $ref: "#/definitions/node-signal-value" + + pulse_low: + default: 0.0 + description: The low value of the pulse signal. + allOf: + - $ref: "#/definitions/node-signal-value" + + pulse_high: + default: 1.0 + description: The high value of the pulse signal. + allOf: + - $ref: "#/definitions/node-signal-value" + + stddev: + default: 0.2 + description: The standard deviation of the normal distributed steps if the `signal` setting is set to `random`. + allOf: + - $ref: "#/definitions/node-signal-value" + + offset: + default: 0.0 + description: Adds a constant offset to each of the generated signals. + allOf: + - $ref: "#/definitions/node-signal-value" + + limit: + type: integer + default: -1 + description: | + Limit the number of generated output samples by this node-type. + A negative number disables the limitation. + + realtime: + type: boolean + default: true + description: Wait `1 / rate` seconds between emitting each sample. + + monitor_missed: + type: boolean + default: true + description: | + If `true`, the `signal` node-type will count missed steps and warn the user during every iteration about missed steps. + Especially at high rates, it can be beneficial for performance to set this flag to `false`. + Warnings would namely cause system calls which will slow the node down even more, and thus cause even more missed steps. + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false + +definitions: + node-signal-type: + type: string + enum: + - random + - sine + - square + - triangle + - ramp + - counter + - constant + - mixed + - pulse + + node-signal-value: + description: | + A single value which is applied to all generated signals, or an array + with one value per signal (its length must then match `values`). + oneOf: + - type: number + - type: array + items: + type: number diff --git a/doc/openapi/components/schemas/node-signal_v2.yaml b/doc/openapi/components/schemas/node-signal_v2.yaml new file mode 100644 index 000000000..194c90ad0 --- /dev/null +++ b/doc/openapi/components/schemas/node-signal_v2.yaml @@ -0,0 +1,151 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Signal Generator (v2) +type: object +required: [type, in] +properties: + type: + type: string + const: signal.v2 + + realtime: + type: boolean + default: true + description: Pace the generation of samples by the `rate` setting. + + limit: + type: integer + default: -1 + description: Stop the node after the provided number of samples. + + rate: + type: number + default: 10 + description: The rate at which the samples are generated if operating in real-time mode (See `realtime` option). + + monitor_missed: + type: boolean + default: true + description: Raise warnings if the signal generator fails to operate in real-time due to missed deadlines. + + in: + type: object + required: + - signals + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-signal_v2-signal" + + additionalProperties: false + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false + +definitions: + node-signal_v2-signal: + type: object + required: + - signal + properties: + signal: + type: string + enum: + - random + - sine + - square + - triangle + - ramp + - counter + - constant + - mixed + - pulse + description: | + The type of signal which should be generated: + + - `random`: a random walk with normal distributed step sizes will be generated. + - `sine`: a sine signal will be generated. + - `square`: a square / rectangle wave will be generated. + - `triangle`: a triangle wave will be generated. + - `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`. + - `counter`: increasing integer counter is generated. + - `constant`: a constant value generated. + - `mixed`: the signals of of each sample are generated by cycling over all remaining signal types. + - `pulse`: generates pulses with a set frequency, phase and width + + amplitude: + type: number + description: The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`. + default: 1.0 + + frequency: + type: number + description: The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`. + default: 1.0 + + phase: + type: number + default: 0.0 + description: Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`. + + pulse_width: + type: number + default: 1.0 + description: The width of the pulse, with respect to the rate + + pulse_low: + type: number + default: 0.0 + description: The low value of the pulse signal. + + pulse_high: + type: number + default: 1.0 + description: The high value of the pulse signal. + + stddev: + type: number + default: 0.2 + description: The standard deviation of the normal distributed steps if the `signal` setting is set to `random`. + + offset: + type: number + default: 0.0 + description: Adds a constant offset to each of the generated signals. + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-socket.yaml b/doc/openapi/components/schemas/node-socket.yaml new file mode 100644 index 000000000..40be77448 --- /dev/null +++ b/doc/openapi/components/schemas/node-socket.yaml @@ -0,0 +1,142 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, in, out] +properties: + type: + type: string + const: socket + + format: + default: villas.binary + $ref: ./format.yaml + + layer: + type: string + enum: + - udp + - ip + - eth + - unix + - local + - tcp-client + - tcp-server + default: udp + description: | + Select the network layer which should be used for the socket. Please note that `eth` can only be used locally in a LAN as it contains no routing information for the internet. + + in: + type: object + required: + - address + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + address: + type: string + description: | + The local address and port number this node should listen for incoming packets. + + Use `*` to listen on all interfaces: `local = "*:12000"`. + + verify_source: + type: boolean + default: false + description: | + Check if source address of incoming packets matches the remote address. + + multicast: + type: object + required: + - group + properties: + enabled: + type: boolean + default: true + description: | + Weather or not multicast group subscription is active. + + group: + type: string + description: | + The multicast group. Must be within 224.0.0.0/4 + + interface: + type: string + description: | + The address of the interface which should join the multicast group. + + ttl: + type: integer + minimum: 0 + default: 255 + description: | + The time to live for outgoing multicast packets. + + loop: + type: boolean + default: false + description: | + Whether or not sent multicast packets should be looped back to the local socket. + + additionalProperties: false + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + required: + - address + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + address: + type: string + description: | + The remote address and port number to which this node will send data. + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-stats.yaml b/doc/openapi/components/schemas/node-stats.yaml new file mode 100644 index 000000000..16246ac52 --- /dev/null +++ b/doc/openapi/components/schemas/node-stats.yaml @@ -0,0 +1,76 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Statistics +type: object +required: [type, rate, in] +properties: + type: + type: string + const: stats + + rate: + type: number + description: A rate in Hz at which the statistics are generated by this node. + + in: + type: object + required: + - signals + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-stats-signal" + + additionalProperties: false + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false + +definitions: + node-stats-signal: + type: object + required: + - stats + properties: + stats: + type: string + description: | + The statistic to expose as a signal, given as `..` + (for example `node1.owd.mean`). + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-temper.yaml b/doc/openapi/components/schemas/node-temper.yaml new file mode 100644 index 000000000..12ba55322 --- /dev/null +++ b/doc/openapi/components/schemas/node-temper.yaml @@ -0,0 +1,42 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: PCSensor / TEMPer USB temperature sensors +type: object +required: [type] +properties: + type: + type: string + const: temper + + calibration: + type: object + properties: + scale: + type: number + default: 1.0 + description: A scaling factor for calibrating the sensor. + + offset: + type: number + default: 0.0 + description: An offset for calibrating the sensor. + + additionalProperties: false + + bus: + type: integer + description: A filter applied to the USB bus number for selecting a specific sensor if multiple are available. + + port: + type: integer + description: A filter applied to the USB port number for selecting a specific sensor if multiple are available. + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-test_rtt.yaml b/doc/openapi/components/schemas/node-test_rtt.yaml new file mode 100644 index 000000000..f3dcd015e --- /dev/null +++ b/doc/openapi/components/schemas/node-test_rtt.yaml @@ -0,0 +1,154 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Round-trip Time Test +type: object +required: [type, cases] +properties: + type: + type: string + const: test_rtt + + format: + default: villas.human + $ref: ./format.yaml + + prefix: + type: string + description: A prefix which is prepended to the output file name of the RTT test result file. + example: "test_1" + + output: + type: string + default: "." + description: A directory path at which the RTT test result files be placed. + + shutdown: + type: boolean + description: If set, the node will shut down VILLASnode after all test cases have finished. + + cooldown: + type: number + default: 0.0 + description: | + A default cool-down time between consecutive test cases. + The node will insert a pause between the tests to avoid any network effects of the previous test-case to influence the upcoming test-case. + + warmup: + type: number + default: 0.0 + description: | + A default warm-up time in seconds before the measurement of each test-case is started. + + rates: + description: | + The default list of sending rates in Hz used by test-cases which do not specify their own `rates`. + oneOf: + - type: number + - type: array + items: + type: number + + values: + description: | + The default list of sample lengths used by test-cases which do not specify their own `values`. + oneOf: + - type: integer + - type: array + items: + type: integer + + count: + type: integer + default: 1000 + description: | + The default number of samples used by test-cases which do not specify their own `count`. + + duration: + type: number + default: 300.0 + description: | + The default duration in seconds used by test-cases which do not specify their own `duration`. + + mode: + type: string + enum: + - min + - max + - at_least_count + - at_least_duration + - stop_after_count + - stop_after_duration + description: The default mode used by test-cases which do not specify their own `mode`. + + cases: + type: array + description: | + A list of test-case specifications. + + The values from the `rates` and `values` settings of each test-case specification will be used to form a cross-product. + items: + type: object + properties: + rates: + description: | + A list of sending rates in Hz. + The resulting test-case will generate samples at the given rate. + example: + - 10 + - 100 + - 1000 + - 10000 + oneOf: + - type: number + - type: array + items: + type: number + + values: + description: | + A list of sample length. + The resulting test-case will generate samples with the given number of signals. + example: + - 10 + - 100 + oneOf: + - type: integer + - type: array + items: + type: integer + + count: + description: | + The resulting test-case will send the number of samples specified by this setting. + This setting is exclusive with the `duration` setting. + type: integer + example: 10000 + + duration: + description: | + The resulting test-case will be stopped after the configured duration in seconds. + This setting is exclusive with the `count` setting. + type: number + example: 60.0 + + mode: + type: string + enum: + - min + - max + - at_least_count + - at_least_duration + - stop_after_count + - stop_after_duration + + additionalProperties: false + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-uldaq.yaml b/doc/openapi/components/schemas/node-uldaq.yaml new file mode 100644 index 000000000..7d5725df0 --- /dev/null +++ b/doc/openapi/components/schemas/node-uldaq.yaml @@ -0,0 +1,212 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Measurement Computing DAQ devices (uldaq) +type: object +required: [type, in] +properties: + type: + type: string + const: uldaq + + out: + $ref: ./shared-node-out.yaml + + interface_type: + type: string + enum: + - usb + - bluetooth + - ethernet + - any + description: The interface to which the ADC is connected. Check manual for your device. + + device_id: + type: string + example: "10000" + description: The used device type. If empty it is auto detected. + + in: + type: object + description: Configuration for the ul201 + required: + - sample_rate + - signals + + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + sample_rate: + type: number + minimum: 0 + default: 1000 + example: 10000 + description: The default sampling rate of the input signals. + + range: + type: string + enum: + - bipolar-60 + - bipolar-30 + - bipolar-15 + - bipolar-20 + - bipolar-10 + - bipolar-5 + - bipolar-4 + - bipolar-2.5 + - bipolar-2 + - bipolar-1.25 + - bipolar-1 + - bipolar-0.625 + - bipolar-0.5 + - bipolar-0.25 + - bipolar-0.125 + - bipolar-0.2 + - bipolar-0.1 + - bipolar-0.078 + - bipolar-0.05 + - bipolar-0.01 + - bipolar-0.005 + - unipolar-60 + - unipolar-30 + - unipolar-15 + - unipolar-20 + - unipolar-10 + - unipolar-5 + - unipolar-4 + - unipolar-2.5 + - unipolar-2 + - unipolar-1.25 + - unipolar-1 + - unipolar-0.625 + - unipolar-0.5 + - unipolar-0.25 + - unipolar-0.125 + - unipolar-0.2 + - unipolar-0.1 + - unipolar-0.078 + - unipolar-0.05 + - unipolar-0.01 + - unipolar-0.005 + + description: | + The default input range for signals. Check manual for your device. + + ## Supported ranges + + | Value | Min | Max | + | :--------------- | :------ | :----- | + | `bipolar-60` | -60.0 | +60.0 | + | `bipolar-60` | -60.0 | +60.0 | + | `bipolar-30` | -30.0 | +30.0 | + | `bipolar-15` | -15.0 | +15.0 | + | `bipolar-20` | -20.0 | +20.0 | + | `bipolar-10` | -10.0 | +10.0 | + | `bipolar-5` | -5.0 | +5.0 | + | `bipolar-4` | -4.0 | +4.0 | + | `bipolar-2.5` | -2.5 | +2.5 | + | `bipolar-2` | -2.0 | +2.0 | + | `bipolar-1.25` | -1.25 | +1.25 | + | `bipolar-1` | -1.0 | +1.0 | + | `bipolar-0.625` | -0.625 | +0.625 | + | `bipolar-0.5` | -0.5 | +0.5 | + | `bipolar-0.25` | -0.25 | +0.25 | + | `bipolar-0.125` | -0.125 | +0.125 | + | `bipolar-0.2` | -0.2 | +0.2 | + | `bipolar-0.1` | -0.1 | +0.1 | + | `bipolar-0.078` | -0.078 | +0.078 | + | `bipolar-0.05` | -0.05 | +0.05 | + | `bipolar-0.01` | -0.01 | +0.01 | + | `bipolar-0.005` | -0.005 | +0.005 | + | `unipolar-60` | 0.0 | +60.0 | + | `unipolar-30` | 0.0 | +30.0 | + | `unipolar-15` | 0.0 | +15.0 | + | `unipolar-20` | 0.0 | +20.0 | + | `unipolar-10` | 0.0 | +10.0 | + | `unipolar-5` | 0.0 | +5.0 | + | `unipolar-4` | 0.0 | +4.0 | + | `unipolar-2.5` | 0.0 | +2.5 | + | `unipolar-2` | 0.0 | +2.0 | + | `unipolar-1.25` | 0.0 | +1.25 | + | `unipolar-1` | 0.0 | +1.0 | + | `unipolar-0.625` | 0.0 | +0.625 | + | `unipolar-0.5` | 0.0 | +0.5 | + | `unipolar-0.25` | 0.0 | +0.25 | + | `unipolar-0.125` | 0.0 | +0.125 | + | `unipolar-0.2` | 0.0 | +0.2 | + | `unipolar-0.1` | 0.0 | +0.1 | + | `unipolar-0.078` | 0.0 | +0.078 | + | `unipolar-0.05` | 0.0 | +0.05 | + | `unipolar-0.005` | 0.0 | +0.00 | + + input_mode: + type: string + enum: + - differential + - single-ended + - pseudo-differential + description: The default sampling type. Check manual for you device. + + sample_clock_source: + type: string + enum: + - internal + - external + description: The clock source used for sampling. + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + type: array + items: + $ref: "#/definitions/node-uldaq-signal" + + additionalProperties: false + +additionalProperties: false + +definitions: + node-uldaq-signal: + type: object + properties: + range: + type: string + description: The range for a specific channel. See `range` for allowed values + + input_mode: + type: string + description: The input mode for a specific channel. See `input_mode` for allowed values + + channel: + type: integer + example: 5 + description: The channel input number of the device. + + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + additionalProperties: false diff --git a/doc/openapi/components/schemas/node-webrtc.yaml b/doc/openapi/components/schemas/node-webrtc.yaml new file mode 100644 index 000000000..7ad7242fe --- /dev/null +++ b/doc/openapi/components/schemas/node-webrtc.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type, session] +properties: + type: + type: string + const: webrtc + + format: + default: villas.binary + $ref: ./format.yaml + + wait_seconds: + type: integer + default: 0 + description: | + Suspend start-up of VILLASnode for some seconds until the connection with the remote peer has been established. + + ordered: + type: boolean + default: false + description: | + Indicates if data is allowed to be delivered out of order. + The default value of false, does not make guarantees that data will be delivered in order. + + max_retransmits: + type: integer + default: 0 + description: | + Limit the number of times a channel will retransmit data if not successfully delivered. + This value may be clamped if it exceeds the maximum value supported. + + session: + type: string + title: Session identifier + description: A unique session identifier which must be shared between two nodes + + peer: + type: string + title: Peer identifier + description: A unique peer identifier within the session. Defaults to the node UUID. + + server: + type: string + title: Signaling Server Address + description: Address to the websocket signaling server + default: wss://villas.k8s.eonerc.rwth-aachen.de/ws/signaling + + ice: + type: object + title: ICE configuration settings + properties: + servers: + title: ICE Servers + description: A list of ICE servers used for connection establishment + type: array + items: + type: string + format: uri + title: STUN & TURN server URI + description: | + A valid Uniform Resource Identifier (URI) identifying a STUN or TURN server. + + See [RFC7064](https://datatracker.ietf.org/doc/html/rfc7064) and [RFC7065](https://datatracker.ietf.org/doc/html/rfc7065) for details. + + As an extension to the URI format specified additional username & password can be specified as shown in the examples + + tcp: + type: boolean + title: Enable ICE over TCP + description: Whether or not ICE candidates using the TCP transport should be gathered. + + additionalProperties: false + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-websocket.yaml b/doc/openapi/components/schemas/node-websocket.yaml new file mode 100644 index 000000000..6d6788c02 --- /dev/null +++ b/doc/openapi/components/schemas/node-websocket.yaml @@ -0,0 +1,42 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +properties: + type: + type: string + const: websocket + + wait_connected: + default: false + type: boolean + + destinations: + description: | + During startup connect to those WebSocket servers as a client. + + Each URI must use the following scheme: + + ``` + protocol://host:port/nodename + ``` + + It starts with a protocol which must be one of `ws` (unencrypted) or `wss` (SSL). + The host name or IP address is separated by `://`. + The optional port number is separated by a colon `:`. + The node name is separated by a slash `/`. + type: array + items: + type: string + format: uri + description: A WebSocket URI + + in: + $ref: ./shared-node-in.yaml + + out: + $ref: ./shared-node-out.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node-zeromq.yaml b/doc/openapi/components/schemas/node-zeromq.yaml new file mode 100644 index 000000000..0995c409e --- /dev/null +++ b/doc/openapi/components/schemas/node-zeromq.yaml @@ -0,0 +1,145 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +required: [type] +properties: + type: + type: string + const: zeromq + + format: + default: villas.binary + $ref: ./format.yaml + + pattern: + type: string + enum: + - pubsub + - radiodish + description: The ZeroMQ messaging pattern which is used by this node. + + ipv6: + type: boolean + default: false + + curve: + title: CurveZMQ cryptography + description: | + **Note:** This feature is currently broken. + + You can use the [`villas zmq-keygen`](../usage/villas-zmq-keygen.md) command to create a new keypair for the following configuration options: + + type: object + required: + - public_key + - secret_key + properties: + enabled: + type: boolean + description: Whether or not the encryption is enabled. + + public_key: + type: string + description: | + The public key of the server. + + secret_key: + type: string + description: | + The secret key of the server. + + additionalProperties: false + + in: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + subscribe: + description: A single endpoint URI or list of URIs to which this node should connect as a subscriber. + oneOf: + - type: string + format: uri + - type: array + items: + type: string + format: uri + + filter: + type: string + description: A filter which is used to select messages to receive. + + bind: + type: boolean + description: Whether this node binds to the endpoint instead of connecting to it. + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + + out: + type: object + properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + publish: + description: A single endpoint URI or list of URIs on which this node should publish messages. + oneOf: + - type: string + format: uri + - type: array + items: + type: string + format: uri + + filter: + type: string + description: A filter which is prepended to published messages. + + bind: + type: boolean + description: Whether this node binds to the endpoint instead of connecting to it. + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + + additionalProperties: false + +additionalProperties: false diff --git a/doc/openapi/components/schemas/node.yaml b/doc/openapi/components/schemas/node.yaml new file mode 100644 index 000000000..7417ab546 --- /dev/null +++ b/doc/openapi/components/schemas/node.yaml @@ -0,0 +1,47 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +$schema: http://json-schema.org/draft-07/schema + +type: object +discriminator: + x-villas-plugin: node + propertyName: type + mapping: + amqp: ./node-amqp.yaml + c37.118: ./node-c37_118.yaml + can: ./node-can.yaml + comedi: ./node-comedi.yaml + ethercat: ./node-ethercat.yaml + example: ./node-example.yaml + exec: ./node-exec.yaml + file: ./node-file.yaml + fpga: ./node-fpga.yaml + iec60870-5-104: ./node-iec60870-5-104.yaml + iec61850-8-1: ./node-iec61850-8-1.yaml + iec61850-9-2: ./node-iec61850-9-2.yaml + infiniband: ./node-infiniband.yaml + influxdb: ./node-influxdb.yaml + kafka: ./node-kafka.yaml + loopback: ./node-loopback.yaml + modbus: ./node-modbus.yaml + mqtt: ./node-mqtt.yaml + nanomsg: ./node-nanomsg.yaml + ngsi: ./node-ngsi.yaml + opal.async: ./node-opal_async.yaml + opal.orchestra: ./node-opal_orchestra.yaml + opendss: ./node-opendss.yaml + redis: ./node-redis.yaml + rtp: ./node-rtp.yaml + shmem: ./node-shmem.yaml + signal: ./node-signal.yaml + signal.v2: ./node-signal_v2.yaml + socket: ./node-socket.yaml + stats: ./node-stats.yaml + temper: ./node-temper.yaml + test_rtt: ./node-test_rtt.yaml + uldaq: ./node-uldaq.yaml + webrtc: ./node-webrtc.yaml + websocket: ./node-websocket.yaml + zeromq: ./node-zeromq.yaml diff --git a/doc/openapi/components/schemas/config/path.yaml b/doc/openapi/components/schemas/path.yaml similarity index 82% rename from doc/openapi/components/schemas/config/path.yaml rename to doc/openapi/components/schemas/path.yaml index c57f9bb25..92901614f 100644 --- a/doc/openapi/components/schemas/config/path.yaml +++ b/doc/openapi/components/schemas/path.yaml @@ -3,19 +3,12 @@ # SPDX-License-Identifier: Apache-2.0 --- type: object -title: The first anyOf schema -description: An explanation about the purpose of this instance. - -required: -- in - +required: [in] +additionalProperties: false properties: in: description: | The in settings expects the name of one or more source nodes or mapping expressions. - - Checkout the [input mapping section](/docs/node/config/paths#input-mapping) for more details. - oneOf: - type: string - type: array @@ -25,7 +18,6 @@ properties: out: description: | The out setting expects the name of one or more destination nodes. Each sample which is processed by the path will be sent to each of the destination nodes. - oneOf: - type: string - type: array @@ -36,15 +28,8 @@ properties: type: boolean default: true description: | - The optional enabled setting can be used to temporarily disable a path. - - reverse: - type: boolean - default: false - description: | - By default, the path is unidirectional. - Meaning, that it only forwards samples from the source to the destination. - Sometimes a bidirectional path is needed. This can be accomplished by setting reverse to true. + Whether this path is enabled. + A disabled path is loaded from the configuration but not started. mode: type: string @@ -89,7 +74,7 @@ properties: When this flag is set, the original sequence number from the source node will be used when multiplexing the nodes. hooks: - $ref: hook_list.yaml + $ref: shared-hook-list.yaml uuid: description: | @@ -99,6 +84,7 @@ properties: format: uuid affinity: + type: integer description: | A mask which pins the execution of this path to a set of CPU cores. @@ -123,4 +109,4 @@ properties: The length of the path queue. It limits how many samples can be _in flight_ at any point in time. If you see queue or pool underrun warnings, try to increase this value. - type: number + type: integer diff --git a/doc/openapi/components/schemas/plugin-ethercat.yaml b/doc/openapi/components/schemas/plugin-ethercat.yaml new file mode 100644 index 000000000..e6f0e0e52 --- /dev/null +++ b/doc/openapi/components/schemas/plugin-ethercat.yaml @@ -0,0 +1,23 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +$schema: http://json-schema.org/draft-07/schema +description: Global EtherCAT master configuration +type: object +properties: + master: + type: integer + alias: + type: integer + coupler: + type: object + properties: + position: + type: integer + product_code: + type: integer + vendor_id: + type: integer + additionalProperties: false +additionalProperties: false diff --git a/doc/openapi/components/schemas/config/node_signals.yaml b/doc/openapi/components/schemas/plugin-fpgas.yaml similarity index 56% rename from doc/openapi/components/schemas/config/node_signals.yaml rename to doc/openapi/components/schemas/plugin-fpgas.yaml index 7730aa872..6b5ee7edc 100644 --- a/doc/openapi/components/schemas/config/node_signals.yaml +++ b/doc/openapi/components/schemas/plugin-fpgas.yaml @@ -2,10 +2,11 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- +$schema: http://json-schema.org/draft-07/schema +description: Global FPGA configuration type: object -properties: - in: - type: object - properties: - signals: - $ref: ./signal_list.yaml +additionalProperties: + allOf: + - $ref: ./shared-fpga-card.yaml + - not: + required: [name] diff --git a/doc/openapi/components/schemas/config/duration.yaml b/doc/openapi/components/schemas/shared-duration.yaml similarity index 88% rename from doc/openapi/components/schemas/config/duration.yaml rename to doc/openapi/components/schemas/shared-duration.yaml index 70ce17ec8..af1f293a7 100644 --- a/doc/openapi/components/schemas/config/duration.yaml +++ b/doc/openapi/components/schemas/shared-duration.yaml @@ -6,7 +6,7 @@ oneOf: - type: string description: | Duration as a string, e.g., "1h30m", "45s", "200ms". - pattern: (\d+d)?(\d+h)?(\d+m)?(\d+s)?(\d+ms)?(\d+us)?(\d+ns)? + pattern: ^(\d+(d|h|ms|us|ns|m|s))+$ examples: - "6d23h30m50s40ms" - "45s" diff --git a/doc/openapi/components/schemas/shared-format-column-separator.yaml b/doc/openapi/components/schemas/shared-format-column-separator.yaml new file mode 100644 index 000000000..c027dbb53 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-column-separator.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Column Separator +type: string +pattern: "^[\\x00-\\x7F]$" +description: | + Separator between entries in column-based formats. diff --git a/doc/openapi/components/schemas/config/formats/_csv.yaml b/doc/openapi/components/schemas/shared-format-data.yaml similarity index 53% rename from doc/openapi/components/schemas/config/formats/_csv.yaml rename to doc/openapi/components/schemas/shared-format-data.yaml index 217dbe72e..0300a304f 100644 --- a/doc/openapi/components/schemas/config/formats/_csv.yaml +++ b/doc/openapi/components/schemas/shared-format-data.yaml @@ -1,7 +1,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: -- $ref: ../format_obj.yaml -- $ref: csv.yaml +title: Include Data +type: boolean +description: | + Include sample data. diff --git a/doc/openapi/components/schemas/shared-format-json-compact.yaml b/doc/openapi/components/schemas/shared-format-json-compact.yaml new file mode 100644 index 000000000..4dc0e5239 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-json-compact.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: boolean +description: | + This flag enables a compact representation, i.e. sets the separator between array and object items to "," and between object keys and values to ":". + Without this flag, the corresponding separators are ", " and ": " for more readable output. diff --git a/doc/openapi/components/schemas/shared-format-json-ensure_ascii.yaml b/doc/openapi/components/schemas/shared-format-json-ensure_ascii.yaml new file mode 100644 index 000000000..1b807e2f1 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-json-ensure_ascii.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: boolean +description: | + If this flag is used, the output is guaranteed to consist only of ASCII characters. + This is achieved by escaping all Unicode characters outside the ASCII range. diff --git a/doc/openapi/components/schemas/shared-format-json-escape_slash.yaml b/doc/openapi/components/schemas/shared-format-json-escape_slash.yaml new file mode 100644 index 000000000..ff63eff53 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-json-escape_slash.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: boolean +default: false +description: + Escape the `/` characters in strings with `\/`. diff --git a/doc/openapi/components/schemas/shared-format-json-indent.yaml b/doc/openapi/components/schemas/shared-format-json-indent.yaml new file mode 100644 index 000000000..2f9be6f09 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-json-indent.yaml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: integer +minimum: 0 +maximum: 31 +description: | + Pretty-print the result, using newlines between array and object items, and indenting with n spaces. + If the settings is not used or is 0, no newlines are inserted between array and object items. diff --git a/doc/openapi/components/schemas/shared-format-json-sort_keys.yaml b/doc/openapi/components/schemas/shared-format-json-sort_keys.yaml new file mode 100644 index 000000000..597ed5d71 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-json-sort_keys.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: boolean +description: | + If this flag is used, all the objects in output are sorted by key. + This is useful e.g. if two JSON texts are diffed or visually compared. diff --git a/doc/openapi/components/schemas/shared-format-line-comment_prefix.yaml b/doc/openapi/components/schemas/shared-format-line-comment_prefix.yaml new file mode 100644 index 000000000..e0bb57518 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-line-comment_prefix.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Line Comment Prefix +type: string +pattern: "^[\\x00-\\x7F]$" +description: | + Prefix indicating that a row in line-based format should be treated as a comment. diff --git a/doc/openapi/components/schemas/shared-format-line-delimiter.yaml b/doc/openapi/components/schemas/shared-format-line-delimiter.yaml new file mode 100644 index 000000000..4b5e7baa2 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-line-delimiter.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Line Delimiter +type: string +pattern: "^[\\x00-\\x7F]$" +description: | + Delimiter following rows in line-based formats. diff --git a/doc/openapi/components/schemas/shared-format-line-header.yaml b/doc/openapi/components/schemas/shared-format-line-header.yaml new file mode 100644 index 000000000..b7df24795 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-line-header.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: First Line Header +type: boolean +description: | + Print a single header-row at the beginning of a line-based format. diff --git a/doc/openapi/components/schemas/shared-format-line-skip_first_line.yaml b/doc/openapi/components/schemas/shared-format-line-skip_first_line.yaml new file mode 100644 index 000000000..0be2849db --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-line-skip_first_line.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Skip First Line +type: boolean +description: | + Skip the first row in a line-based format. diff --git a/doc/openapi/components/schemas/shared-format-offset.yaml b/doc/openapi/components/schemas/shared-format-offset.yaml new file mode 100644 index 000000000..ee260c673 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-offset.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Include Timestamp Offset +type: boolean +description: | + Include difference between received and origin timestamp. diff --git a/doc/openapi/components/schemas/shared-format-raw-bits.yaml b/doc/openapi/components/schemas/shared-format-raw-bits.yaml new file mode 100644 index 000000000..0700d1a10 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-raw-bits.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +description: Number of bits per signal. +type: integer +enum: [8, 16, 32, 64, 128] diff --git a/doc/openapi/components/schemas/shared-format-raw-endianess.yaml b/doc/openapi/components/schemas/shared-format-raw-endianess.yaml new file mode 100644 index 000000000..a9d2ed71d --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-raw-endianess.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +description: The endianess of the data. +type: string +enum: ["big", "little"] diff --git a/doc/openapi/components/schemas/shared-format-raw-fake.yaml b/doc/openapi/components/schemas/shared-format-raw-fake.yaml new file mode 100644 index 000000000..02ed24448 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-raw-fake.yaml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +description: | + Send and interpret the first three signals of each sample as the following header fields: + - sequence number + - timestamp seconds + - timestamp nano-seconds +type: boolean diff --git a/doc/openapi/components/schemas/shared-format-real_precision.yaml b/doc/openapi/components/schemas/shared-format-real_precision.yaml new file mode 100644 index 000000000..1d63332ed --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-real_precision.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Floating Point Decimal Precision +type: integer +minimum: 0 +maximum: 31 +description: | + Output all real numbers with at most n digits of precision. + A precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers. diff --git a/doc/openapi/components/schemas/shared-format-sequence.yaml b/doc/openapi/components/schemas/shared-format-sequence.yaml new file mode 100644 index 000000000..387edbfd5 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-sequence.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Include Sequence Number +type: boolean +description: | + Include the sequence number of a sample. diff --git a/doc/openapi/components/schemas/shared-format-ts_origin.yaml b/doc/openapi/components/schemas/shared-format-ts_origin.yaml new file mode 100644 index 000000000..8bc9fbc6f --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-ts_origin.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Include Origin Timestamp +type: boolean +description: | + Include a timestamp recorded at a sample's origin. diff --git a/doc/openapi/components/schemas/shared-format-ts_received.yaml b/doc/openapi/components/schemas/shared-format-ts_received.yaml new file mode 100644 index 000000000..28205c54e --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-ts_received.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Include Received Timestamp +type: boolean +description: | + Include a timestamp recorded when a sample was received by a VILLASnode instance. diff --git a/doc/openapi/components/schemas/shared-format-villas-source_index.yaml b/doc/openapi/components/schemas/shared-format-villas-source_index.yaml new file mode 100644 index 000000000..24c67b92e --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-villas-source_index.yaml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Source Index +description: | + VILLASnode source index for outgoing messages. + The source index of incoming messages will be verified against this value if `validate_source_index` is enabled. +type: integer +minimum: 0 diff --git a/doc/openapi/components/schemas/shared-format-villas-validate_source_index.yaml b/doc/openapi/components/schemas/shared-format-villas-validate_source_index.yaml new file mode 100644 index 000000000..4a8918905 --- /dev/null +++ b/doc/openapi/components/schemas/shared-format-villas-validate_source_index.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +title: Validate Source Index +description: | + Validate the source index of incoming messages. +type: boolean diff --git a/doc/openapi/components/schemas/shared-fpga-card.yaml b/doc/openapi/components/schemas/shared-fpga-card.yaml new file mode 100644 index 000000000..941f8d302 --- /dev/null +++ b/doc/openapi/components/schemas/shared-fpga-card.yaml @@ -0,0 +1,43 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +description: FPGA Card configuration +type: object +required: [interface] +properties: + interface: + type: string + enum: [pcie, platform] + name: + type: string + ips: + type: string + affinity: + type: integer + do_reset: + type: boolean + slot: + type: string + id: + type: string + polling: + type: boolean + paths: + type: array + items: + type: object + required: [from, to] + properties: + from: + type: string + to: + type: string + reverse: + type: boolean + additionalProperties: false + ignore_ips: + type: array + items: + type: string +additionalProperties: false diff --git a/doc/openapi/components/schemas/config/hook_list.yaml b/doc/openapi/components/schemas/shared-hook-list.yaml similarity index 93% rename from doc/openapi/components/schemas/config/hook_list.yaml rename to doc/openapi/components/schemas/shared-hook-list.yaml index 48fa6fe10..6f0accf0d 100644 --- a/doc/openapi/components/schemas/config/hook_list.yaml +++ b/doc/openapi/components/schemas/shared-hook-list.yaml @@ -9,4 +9,4 @@ example: - type: limit_rate rate: 1000 items: - $ref: hook_spec.yaml + $ref: hook.yaml diff --git a/doc/openapi/components/schemas/config/formats/gtnet.yaml b/doc/openapi/components/schemas/shared-hook-priority.yaml similarity index 89% rename from doc/openapi/components/schemas/config/formats/gtnet.yaml rename to doc/openapi/components/schemas/shared-hook-priority.yaml index 82a8940b7..ab5feae39 100644 --- a/doc/openapi/components/schemas/config/formats/gtnet.yaml +++ b/doc/openapi/components/schemas/shared-hook-priority.yaml @@ -2,5 +2,5 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: -- $ref: raw.yaml +type: integer +minimum: 0 diff --git a/doc/openapi/components/schemas/shared-hook-signal.yaml b/doc/openapi/components/schemas/shared-hook-signal.yaml new file mode 100644 index 000000000..b76b37fc8 --- /dev/null +++ b/doc/openapi/components/schemas/shared-hook-signal.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: string +description: The name of a signal to which this hook should be applied +example: busA.V diff --git a/doc/openapi/components/schemas/shared-hook-signals.yaml b/doc/openapi/components/schemas/shared-hook-signals.yaml new file mode 100644 index 000000000..27ed08095 --- /dev/null +++ b/doc/openapi/components/schemas/shared-hook-signals.yaml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: array +minItems: 1 +description: A list of signal names to which a hook should be applied. +example: +- busA.V +- busB.V +- busC.V +items: + type: string + description: The name of a signal to which a hook should be applied. diff --git a/doc/openapi/components/schemas/shared-node-builtin.yaml b/doc/openapi/components/schemas/shared-node-builtin.yaml new file mode 100644 index 000000000..e8c1a41ce --- /dev/null +++ b/doc/openapi/components/schemas/shared-node-builtin.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: boolean +default: true +title: Builtin hook functions +description: | + By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled. diff --git a/doc/openapi/components/schemas/shared-node-enabled.yaml b/doc/openapi/components/schemas/shared-node-enabled.yaml new file mode 100644 index 000000000..34fe56a75 --- /dev/null +++ b/doc/openapi/components/schemas/shared-node-enabled.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: boolean +description: | + Whether or not this direction of the node is used. diff --git a/doc/openapi/components/schemas/shared-node-fwmark.yaml b/doc/openapi/components/schemas/shared-node-fwmark.yaml new file mode 100644 index 000000000..ecd88f4c8 --- /dev/null +++ b/doc/openapi/components/schemas/shared-node-fwmark.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: integer +minimum: 1 +description: | + Firewall mark (fwmark) which is applied to all outgoing packets of this node. + + This can be used together with the `tc` traffic control subsystem (see also `netem`) + to classify and shape the traffic emitted by this node. diff --git a/doc/openapi/components/schemas/shared-node-in.yaml b/doc/openapi/components/schemas/shared-node-in.yaml new file mode 100644 index 000000000..e5b14a152 --- /dev/null +++ b/doc/openapi/components/schemas/shared-node-in.yaml @@ -0,0 +1,26 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/config/netem.yaml b/doc/openapi/components/schemas/shared-node-netem.yaml similarity index 73% rename from doc/openapi/components/schemas/config/netem.yaml rename to doc/openapi/components/schemas/shared-node-netem.yaml index fe33abedc..58c813ffc 100644 --- a/doc/openapi/components/schemas/config/netem.yaml +++ b/doc/openapi/components/schemas/shared-node-netem.yaml @@ -16,48 +16,63 @@ properties: enabled: type: boolean default: true + description: | + Enable or disable the network emulation for this node. - delay: + distribution: + description: | + One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)). + oneOf: + - type: string + enum: [uniform, normal, pareto, paretonormal] + - type: array + items: + type: integer + + correlation: type: number - default: 0 + minimum: 0 + maximum: 100 + + limit: + type: integer + minimum: 1 + + delay: description: | Delay packets in microseconds. + type: integer + minimum: 1 jitter: - type: number - default: 0 title: Jitter description: | Apply a jitter to the packet delay (in microseconds). - - distribution: - type: string - title: Delay distribution - description: | - One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)). - enum: - - uniform - - normal - - pareto - - paretonormal + type: integer + minimum: 1 loss: - type: number - default: 0 title: Packet Loss Percentage description: | Percentage of packets which will be dropped. + type: number + minimum: 0 + maximum: 100 duplicate: - type: number - default: 0 title: Packet Duplication Percentage description: | Percentage of packets which will be duplicated. - - corrupt: type: number - default: 0 + minimum: 0 + maximum: 100 + + corruption: title: Packet Corruption Percentage description: | Percentage of packets which will be corrupted. + type: number + minimum: 0 + maximum: 100 + +additionalProperties: false diff --git a/doc/openapi/components/schemas/shared-node-out.yaml b/doc/openapi/components/schemas/shared-node-out.yaml new file mode 100644 index 000000000..5155e4e27 --- /dev/null +++ b/doc/openapi/components/schemas/shared-node-out.yaml @@ -0,0 +1,32 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +properties: + enabled: + default: true + $ref: ./shared-node-enabled.yaml + + netem: + $ref: ./shared-node-netem.yaml + + fwmark: + $ref: ./shared-node-fwmark.yaml + + builtin: + default: true + $ref: ./shared-node-builtin.yaml + + vectorize: + default: 1 + $ref: ./shared-node-vectorize.yaml + + hooks: + default: [] + $ref: ./shared-hook-list.yaml + + signals: + $ref: ./shared-signal-list.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/shared-node-vectorize.yaml b/doc/openapi/components/schemas/shared-node-vectorize.yaml new file mode 100644 index 000000000..80e33ed67 --- /dev/null +++ b/doc/openapi/components/schemas/shared-node-vectorize.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: integer +minimum: 1 +default: 1 +description: | + This setting allows to send multiple samples in a single message to the destination nodes. + + The value of this setting determines how many samples will be combined into one packet. diff --git a/doc/openapi/components/schemas/shared-signal-description.yaml b/doc/openapi/components/schemas/shared-signal-description.yaml new file mode 100644 index 000000000..6777b3d7d --- /dev/null +++ b/doc/openapi/components/schemas/shared-signal-description.yaml @@ -0,0 +1,22 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +type: object +properties: + name: + $ref: ./shared-signal-name.yaml + + unit: + $ref: ./shared-signal-unit.yaml + + type: + $ref: ./shared-signal-type.yaml + + init: + $ref: ./shared-signal-init.yaml + + enabled: + $ref: ./shared-signal-enabled.yaml + +additionalProperties: false diff --git a/doc/openapi/components/schemas/config/formats/_gtnet.yaml b/doc/openapi/components/schemas/shared-signal-enabled.yaml similarity index 68% rename from doc/openapi/components/schemas/config/formats/_gtnet.yaml rename to doc/openapi/components/schemas/shared-signal-enabled.yaml index cadb2e015..62e9fee87 100644 --- a/doc/openapi/components/schemas/config/formats/_gtnet.yaml +++ b/doc/openapi/components/schemas/shared-signal-enabled.yaml @@ -2,6 +2,7 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: -- $ref: ../format_obj.yaml -- $ref: gtnet.yaml +type: boolean +default: true +description: | + Signals can be disabled which causes them to be ignored. diff --git a/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_subscriber_signal.yaml b/doc/openapi/components/schemas/shared-signal-init.yaml similarity index 57% rename from doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_subscriber_signal.yaml rename to doc/openapi/components/schemas/shared-signal-init.yaml index 69c0f8042..0b3a2e5cf 100644 --- a/doc/openapi/components/schemas/config/nodes/signals/iec61850_goose_subscriber_signal.yaml +++ b/doc/openapi/components/schemas/shared-signal-init.yaml @@ -2,19 +2,20 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: +title: Initial signal value. +description: | + The initial value of the signal. + +oneOf: +- type: number +- type: boolean - type: object required: - - index - - subscriber + - real + - imag + additionalProperties: false properties: - index: + real: + type: number + imag: type: number - description: | - Index within the received GOOSE event array. - - subscriber: - type: string - -- $ref: ./iec61850_goose_data.yaml -- $ref: ../../signal.yaml diff --git a/doc/openapi/components/schemas/shared-signal-list.yaml b/doc/openapi/components/schemas/shared-signal-list.yaml new file mode 100644 index 000000000..9e28f1053 --- /dev/null +++ b/doc/openapi/components/schemas/shared-signal-list.yaml @@ -0,0 +1,16 @@ +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +--- +description: List of signal definition objects +type: array +example: +- name: tap_position + type: integer + init: 0 +- name: voltage + type: float + unit: V + init: 230.0 +items: + $ref: ./shared-signal-description.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_c37_118.yaml b/doc/openapi/components/schemas/shared-signal-name.yaml similarity index 68% rename from doc/openapi/components/schemas/config/nodes/_c37_118.yaml rename to doc/openapi/components/schemas/shared-signal-name.yaml index 588a9630d..97d8c3256 100644 --- a/doc/openapi/components/schemas/config/nodes/_c37_118.yaml +++ b/doc/openapi/components/schemas/shared-signal-name.yaml @@ -2,6 +2,8 @@ # SPDX-FileCopyrightText: 2024-2025 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: -- $ref: ../node_obj.yaml -- $ref: c37_118.yaml +type: string +title: Signal name +description: | + A name which describes the signal. +example: Bus123_U diff --git a/doc/openapi/components/schemas/config/formats/_json.yaml b/doc/openapi/components/schemas/shared-signal-type.yaml similarity index 61% rename from doc/openapi/components/schemas/config/formats/_json.yaml rename to doc/openapi/components/schemas/shared-signal-type.yaml index ded744931..1ddae8b9b 100644 --- a/doc/openapi/components/schemas/config/formats/_json.yaml +++ b/doc/openapi/components/schemas/shared-signal-type.yaml @@ -2,6 +2,13 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: -- $ref: ../format_obj.yaml -- $ref: json.yaml +type: string +title: Signal data-type +description: | + The data-type of the signal. +default: float +enum: +- integer +- float +- boolean +- complex diff --git a/doc/openapi/components/schemas/config/formats/_iotagent_ul.yaml b/doc/openapi/components/schemas/shared-signal-unit.yaml similarity index 73% rename from doc/openapi/components/schemas/config/formats/_iotagent_ul.yaml rename to doc/openapi/components/schemas/shared-signal-unit.yaml index ee1c4e1fb..fd8a5be00 100644 --- a/doc/openapi/components/schemas/config/formats/_iotagent_ul.yaml +++ b/doc/openapi/components/schemas/shared-signal-unit.yaml @@ -2,6 +2,8 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 --- -allOf: -- $ref: ../format_obj.yaml -- $ref: iotagent_ul.yaml +type: string +title: Signal unit +description: + The unit of the signal. +example: V diff --git a/doc/openapi/openapi.yaml b/doc/openapi/openapi.yaml index 66bf96106..347c58076 100644 --- a/doc/openapi/openapi.yaml +++ b/doc/openapi/openapi.yaml @@ -52,7 +52,31 @@ tags: This section decribes the schema of the VILLASnode configuration file. Please use the `>` to expand the individual sub-sections. - + + +- name: node + x-displayName: VILLASnode node configuration + description: | + This section decribes the schema of a VILLASnode node. + Please use the `>` to expand the individual sub-sections. + + + +- name: hook + x-displayName: VILLASnode hook configuration + description: | + This section decribes the schema of the VILLASnode hook. + Please use the `>` to expand the individual sub-sections. + + + +- name: format + x-displayName: VILLASnode format configuration + description: | + This section decribes the schema of the VILLASnode hook. + Please use the `>` to expand the individual sub-sections. + + - name: format-edgeflex x-displayName: Edgeflex Format @@ -140,6 +164,12 @@ components: schemas: Config: $ref: components/schemas/config.yaml + Node: + $ref: components/schemas/node.yaml + Hook: + $ref: components/schemas/hook.yaml + Format: + $ref: components/schemas/format.yaml FormatEdgeflex: $ref: components/schemas/formats/edgeflex.yaml FormatIgor: diff --git a/doc/openapi/paths/config.yaml b/doc/openapi/paths/config.yaml index 2dc10836d..9d154f663 100644 --- a/doc/openapi/paths/config.yaml +++ b/doc/openapi/paths/config.yaml @@ -14,7 +14,7 @@ get: content: application/json: schema: - $ref: ../components/schemas/config.yaml + type: object examples: example1: value: diff --git a/doc/openapi/paths/node/node@{uuid-or-name}.yaml b/doc/openapi/paths/node/node@{uuid-or-name}.yaml index 5ee458410..d43a622d8 100644 --- a/doc/openapi/paths/node/node@{uuid-or-name}.yaml +++ b/doc/openapi/paths/node/node@{uuid-or-name}.yaml @@ -16,7 +16,7 @@ get: content: application/json: schema: - $ref: ../../components/schemas/config/node_obj.yaml + type: object examples: example1: value: diff --git a/doc/openapi/paths/node/node@{uuid-or-name}@file@seek.yaml b/doc/openapi/paths/node/node@{uuid-or-name}@file@seek.yaml index 6d4a59157..7b0ed446d 100644 --- a/doc/openapi/paths/node/node@{uuid-or-name}@file@seek.yaml +++ b/doc/openapi/paths/node/node@{uuid-or-name}@file@seek.yaml @@ -19,6 +19,7 @@ post: type: object required: - position + additionalProperties: false properties: position: type: integer diff --git a/doc/openapi/paths/nodes.yaml b/doc/openapi/paths/nodes.yaml index 65e43ba05..e08635f97 100644 --- a/doc/openapi/paths/nodes.yaml +++ b/doc/openapi/paths/nodes.yaml @@ -16,7 +16,7 @@ get: schema: type: array items: - $ref: ../components/schemas/config/node_obj.yaml + $ref: ../components/schemas/node.yaml example1: value: - name: udp_node1 diff --git a/doc/openapi/paths/path/path@{uuid}.yaml b/doc/openapi/paths/path/path@{uuid}.yaml index 11a3e488a..83574fc99 100644 --- a/doc/openapi/paths/path/path@{uuid}.yaml +++ b/doc/openapi/paths/path/path@{uuid}.yaml @@ -15,7 +15,7 @@ post: content: application/json: schema: - $ref: ../../components/schemas/config/path.yaml + type: object examples: example1: value: diff --git a/doc/openapi/paths/paths.yaml b/doc/openapi/paths/paths.yaml index 7329d7220..ca6aa0405 100644 --- a/doc/openapi/paths/paths.yaml +++ b/doc/openapi/paths/paths.yaml @@ -13,9 +13,9 @@ get: content: application/json: schema: - type: array - items: - $ref: ../components/schemas/config/path.yaml + type: array + items: + type: object examples: example1: value: diff --git a/doc/openapi/paths/restart.yaml b/doc/openapi/paths/restart.yaml index 8862e3a4f..03bc3becc 100644 --- a/doc/openapi/paths/restart.yaml +++ b/doc/openapi/paths/restart.yaml @@ -13,6 +13,7 @@ post: application/json: schema: type: object + additionalProperties: false properties: config: oneOf: diff --git a/doc/package.json b/doc/package.json index 1ad90f3b1..77af7beca 100644 --- a/doc/package.json +++ b/doc/package.json @@ -3,7 +3,7 @@ "version": "1.2.2", "type": "module", "dependencies": { - "@redocly/cli": "^2.25.0" + "@redocly/cli": "1.16.0" }, "private": true, "scripts": { diff --git a/doc/redocly.yaml b/doc/redocly.yaml index 6b782b710..255a0bd4c 100644 --- a/doc/redocly.yaml +++ b/doc/redocly.yaml @@ -1,12 +1,49 @@ -# SPDX-FileCopyrightText: 2014-2025 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 +# Author: Philipp Jungkamp extends: -- recommended-strict +- recommended + +plugins: +- ./villas.js + +preprocessors: + # expand schema discriminators that a `x-villas-plugin` property. + villas/expand-discriminator: on rules: + # TODO: resolve schema issues instead of disabling recommended lints security-defined: off no-server-example.com: off + # A `required` key without a corresponding property definition is useful + # for expression mutually exclusive properties + no-required-schema-properties-undefined: off + + # Redocly doesn't properly check the `jsonSchemaDialect` of an OpenAPI 3.1 + # schema. This means that the structure and example validation will + # not work properly for Draft-07 schemas. + struct: off + no-invalid-schema-examples: off + + # Because our configuration is parsed as a merge patch, + # a null property and a missing property are indistinguishable. + # This has two implications for our schema: + # + # - nullable properties must not be required. + # - nullable values must specify an explicit `null` default value. + villas/nullable-default: error + villas/nullable-optional: error + + # We want to optimize our schema for readable validation error + # messages. This means that `additionalProperties` and + # `additionalItems` should be `false` to catch typos in property keys. + # + # We encourage this in schema development by asking for these + # keys to always be explicitly specified. + villas/additional-properties: error + villas/additional-items: error + apis: villas-node: root: ./openapi/openapi.yaml diff --git a/doc/villas.js b/doc/villas.js new file mode 100644 index 000000000..4dfab978e --- /dev/null +++ b/doc/villas.js @@ -0,0 +1,249 @@ +// SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +// SPDX-License-Identifier: Apache-2.0 +// Author: Philipp Jungkamp + +function expandDiscriminatorPreprocessor() { + return { + Schema: { + leave(schema, ctx) { + const key = "x-villas-plugin" + const discriminator = schema.discriminator + if (discriminator !== undefined && discriminator[key] !== undefined) { + const refs = Object.values(discriminator.mapping).map(ref => ({ "$ref": ref })) + if (Array.isArray(schema.type) && schema.type.includes("string")) { + delete schema.discriminator + + schema.anyOf = [ + { + "title": "object", + "type": "object", + "discriminator": discriminator, + "anyOf": refs, + }, + { + "title": "string", + "type": "string", + "enum": Object.keys(discriminator.mapping), + }, + ] + } else { + schema.anyOf = refs; + } + + delete discriminator[key] + } + } + } + } +} + +function isNullableType(type) { + if (type === "null") { + return true + } + + if (Array.isArray(type)) { + return type.includes("null") + } + + return false +} + +function checkNullable(schema, needsDefault, ctx) { + if (typeof schema === "boolean") { + if (schema && needsDefault) { + ctx.report({ + message: `Nullable property \`${ctx.key}\` should specify an explict \`null\` default value.`, + location: ctx.location, + from: ctx.origin, + suggest: [ + "to add a `null` default value.", + ] + }) + } + + return schema + } + + if (schema.$ref !== undefined) { + const resolved = ctx.resolve(schema) + + if (!["boolean", "object"].includes(typeof resolved.node)) { + ctx.report({ + message: `Could not resolve reference \`${schema.$ref}\` for property \`${ctx.key}\``, + location: ctx.location, + from: ctx.origin, + suggest: [ + "Restrict the type to be non-nullable.", + "Make the default value `null`.", + ] + }) + } + + const isNullable = checkNullable(resolved.node, needsDefault && schema.default !== null, { + ...ctx, + resolve: (schemaOrRef, resolveFrom = resolved.location.source.absoluteRef) => ctx.resolve(schemaOrRef, resolveFrom), + location: resolved.location, + origin: ctx.origin ?? ctx.location, + }) + + if (needsDefault && isNullable && schema.default !== undefined && schema.default !== null) { + ctx.report({ + message: `Nullable property \`${ctx.key}\` has a non-null default value: ${JSON.stringify(schema.default)}`, + location: ctx.location, + from: ctx.origin, + suggest: [ + "Restrict the type to be non-nullable.", + "Make the default value `null`.", + ] + }) + } + + return isNullable + } + + if (schema.const !== undefined && schema.const !== null) { + return false + } + + if (schema.enum !== undefined && !schema.enum.includes(null)) { + return false + } + + if (schema.type !== undefined && !isNullableType(schema.type)) { + return false + } + + if (schema.not !== undefined && checkNullable(schema.not, false, ctx)) { + return false + } + + if (schema.if !== undefined && checkNullable(schema.if, false, ctx)) { + if (schema.then !== undefined && !checkNullable(schema.then, needsDefault, ctx)) { + return false + } + } else { + if (schema.else !== undefined && !checkNullable(schema.else, needsDefault, ctx)) { + return false + } + } + + if (schema.anyOf !== undefined && !schema.anyOf.some((subschema) => checkNullable(subschema, false, ctx))) { + return false + } + + if (schema.allOf !== undefined && !schema.allOf.every((subschema) => checkNullable(subschema, false, ctx))) { + return false + } + + if (schema.oneOf !== undefined && schema.oneOf.filter((subschema) => checkNullable(subschema, false, ctx)).length !== 1) { + return false + } + + if (needsDefault && schema.default !== null) { + ctx.report({ + message: `Nullable property \`${ctx.key}\` has a non-null default value: ${JSON.stringify(schema.default)}`, + location: ctx.location, + from: ctx.origin, + suggest: [ + "to restrict the type to be non-nullable.", + "to make the default value `null`.", + ] + }) + } + + return true +} + +function nullableDefaultRule() { + return { + SchemaProperties: { + enter(properties, ctx) { + const required = new Set(ctx.parent.required || []) + for (const [name, property] of Object.entries(properties)) { + checkNullable(property, !required.has(name), { + ...ctx, + key: name, + location: ctx.location.child(name), + }) + } + } + } + } +} + +function nullableOptionalRule() { + return { + SchemaProperties: { + enter(properties, ctx) { + const required = new Set(ctx.parent.required || []) + for (const [name, property] of Object.entries(properties)) { + if (required.has(name) && checkNullable(property, false, { + ...ctx, + key: name, + location: ctx.location.child(name), + })) { + ctx.report({ + message: `Nullable property \`${name}\` should not be required.`, + location: ctx.location.child(name), + from: ctx.location, + }) + } + } + } + } + } +} + +function additionalPropertiesRule() { + return { + Schema: { + enter(schema, ctx) { + if (typeof schema !== "object") return + + if (schema.properties !== undefined && schema.additionalProperties === undefined) { + ctx.report({ + message: "Missing `additionalProperties` for object-like schema.", + location: ctx.location, + }) + } + } + } + } +} + +function additionalItemsRule() { + return { + Schema: { + enter(schema, ctx) { + if (typeof schema !== "object") return + + if (Array.isArray(schema.items) && schema.additionalItems === undefined) { + ctx.report({ + message: "Missing `additionalItems` for tuple-like schema.", + location: ctx.location, + }) + } + } + } + } +} + +module.exports = { + id: 'villas', + + preprocessors: { + oas3: { + 'expand-discriminator': expandDiscriminatorPreprocessor, + }, + }, + + rules: { + oas3: { + 'nullable-default': nullableDefaultRule, + 'nullable-optional': nullableOptionalRule, + 'additional-properties': additionalPropertiesRule, + 'additional-items': additionalItemsRule, + }, + }, +} From 0a17dc0225b8fc635f355a3555f63a4298203b41 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Wed, 15 Jul 2026 02:47:52 +0200 Subject: [PATCH 58/84] feat(node): Introduce json-schema-validator for bundled schemas Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- .pre-commit-config.yaml | 2 +- CMakeLists.txt | 1 + common/include/villas/exceptions.hpp | 16 --- include/villas/node/json_schema.hpp | 109 +++++++++++++++++++++ lib/CMakeLists.txt | 2 + lib/json_schema.cpp | 18 ++++ packaging/deps.sh | 16 +++ packaging/docker/Dockerfile.fedora-minimal | 3 +- packaging/nix/villas.nix | 2 + tools/bundle_schema.sh | 41 ++++++++ 10 files changed, 192 insertions(+), 18 deletions(-) create mode 100644 include/villas/node/json_schema.hpp create mode 100644 lib/json_schema.cpp create mode 100755 tools/bundle_schema.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b5e9272d..84f322f16 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: exclude: .devcontainer/devcontainer\.json - id: check-toml - id: check-added-large-files - exclude: ^paper\.md$ + exclude: ^(?:paper\.md|lib/json_schema\.cpp)$ - id: pretty-format-json # black has its own mind of formatting Jupyter notebooks exclude: \.ipynb$|^.devcontainer/devcontainer\.json$|package-lock\.json$ diff --git a/CMakeLists.txt b/CMakeLists.txt index 490bc14ed..183c1603c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ find_package(PkgConfig REQUIRED) find_package(spdlog REQUIRED) find_package(Threads REQUIRED) find_package(nlohmann_json REQUIRED) +find_package(nlohmann_json_schema_validator REQUIRED) find_package(OpenMP) find_package(IBVerbs) find_package(RDMACM) diff --git a/common/include/villas/exceptions.hpp b/common/include/villas/exceptions.hpp index 282ef9ee8..d73b2d872 100644 --- a/common/include/villas/exceptions.hpp +++ b/common/include/villas/exceptions.hpp @@ -43,22 +43,6 @@ class MemoryAllocationError : public RuntimeError { MemoryAllocationError() : RuntimeError("Failed to allocate memory") {} }; -class JsonError : public std::runtime_error { - -protected: - json_error_t error; - -public: - template - JsonError(const json_t *s, const json_error_t &e, - const std::string &what = std::string(), Args &&...args) - : std::runtime_error( - fmt::format("{}: {} in {}:{}:{}", - fmt::format(what, std::forward(args)...), - error.text, error.source, error.line, error.column)), - error(e) {} -}; - class ConfigError : public std::runtime_error { protected: diff --git a/include/villas/node/json_schema.hpp b/include/villas/node/json_schema.hpp new file mode 100644 index 000000000..42c736d21 --- /dev/null +++ b/include/villas/node/json_schema.hpp @@ -0,0 +1,109 @@ +// SPDX-FileCopyrightText: 2014-2025 The VILLASframework Authors +// SPDX-License-Identifier: Apache-2.0 +// Generated file — do not edit +#pragma once + +#include +#include +#include +#include +#include + +#include + +#include + +namespace villas::node { + +using JsonUri = nlohmann::json_uri; + +struct JsonDiagnostic { + JsonPointer pointer; + std::string message; +}; + +class JsonError final : public std::exception { + std::vector diagnostics_; + +public: + using value_type = decltype(diagnostics_)::value_type; + + explicit JsonError(std::vector diagnostics) + : diagnostics_(std::move(diagnostics)) { + assert(not diagnostics_.empty()); + } + + explicit JsonError(JsonDiagnostic diagnostic) + : JsonError(std::vector{std::move(diagnostic)}) {} + + void push_back(JsonDiagnostic diagnostic) { + diagnostics_.push_back(std::move(diagnostic)); + } + + auto what() const noexcept -> char const * override { + return diagnostics_.front().message.c_str(); + } + + auto begin() const noexcept -> decltype(diagnostics_)::const_iterator { + return diagnostics_.begin(); + } + + auto end() const noexcept -> decltype(diagnostics_)::const_iterator { + return diagnostics_.end(); + } + + static auto with_parent(JsonPointer parent, JsonError error) -> JsonError { + auto &diagnostics = error.diagnostics_; + + for (auto &diagnostic : diagnostics) { + diagnostic.pointer = parent / std::move(diagnostic.pointer); + } + + return JsonError(std::move(diagnostics)); + } + + template + requires std::invocable + static auto context(JsonPointer pointer, Fn &&fn, Args &&...args) + -> std::invoke_result_t { + try { + return std::invoke(std::forward(fn), std::forward(args)...); + } catch (JsonError &error) { + throw JsonError::with_parent(std::move(pointer), std::move(error)); + } + } +}; + +Json const &bundled_schemas(); + +class JsonSchema { + Json json_; + nlohmann::json_schema::json_validator validator_; + +public: + explicit JsonSchema(Json const &schema) + : json_(schema), + validator_(schema, nullptr, + nlohmann::json_schema::default_string_format_check) {} + + Json const &json() const { return json_; } + + Json validate(Json const &json) const { + struct final : nlohmann::json_schema::error_handler { + std::vector diagnostics{}; + + void error(JsonPointer const &pointer, Json const &instance, + std::string const &message) override { + diagnostics.emplace_back(pointer, message); + } + } error_handler; + + if (auto default_values = validator_.validate(json, error_handler); + error_handler.diagnostics.empty()) + return default_values; + else + throw JsonError(std::move(error_handler.diagnostics)); + } +}; + +} // namespace villas::node diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e0e904018..197be4bc4 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -18,6 +18,7 @@ set(LIBRARIES m stdc++ rt + nlohmann_json_schema_validator ) set(LIB_SRC @@ -36,6 +37,7 @@ set(LIB_SRC node_capi.cpp node_compat.cpp node_list.cpp + json_schema.cpp path_destination.cpp path_source.cpp path.cpp diff --git a/lib/json_schema.cpp b/lib/json_schema.cpp new file mode 100644 index 000000000..3be4cfa0e --- /dev/null +++ b/lib/json_schema.cpp @@ -0,0 +1,18 @@ + +// SPDX-FileCopyrightText: 2014-2025 The VILLASframework Authors +// SPDX-License-Identifier: Apache-2.0 +// Generated file — do not edit + +#include + +namespace villas::node { + +Json const &bundled_schemas() { + // clang-format off + static auto const schema = Json::parse(R"BUNDLED_SCHEMA({"openapi":"3.1.1","info":{"title":"VILLASnode API","version":"0.10.0","description":"A HTTP/REST API for controlling VILLASnode remotely without the need to restart the daemon.","termsOfService":"https://www.fein-aachen.org/projects/villas-node/","contact":{"name":"Steffen Vogel","email":"post@steffenvogel.de","url":"https://fein-aachen.org/contact/"},"license":{"name":"Apache-2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"}},"jsonSchemaDialect":"http://json-schema.org/draft-07/schema","servers":[{"url":"https://villas.k8s.eonerc.rwth-aachen.de/api/v2","description":"The production API server in our EONERC OpenStack Kubernetes"},{"url":"http://localhost:8080","description":"Your local host"}],"tags":[{"name":"super-node","x-displayName":"Super Node","description":"Global super-node related operations."},{"name":"nodes","x-displayName":"Nodes","description":"Node related operations."},{"name":"paths","x-displayName":"Paths","description":"Path related operations."},{"name":"config","x-displayName":"VILLASnode configuration file","description":"This section decribes the schema of the VILLASnode configuration file.\nPlease use the `>` to expand the individual sub-sections.\n\n\n"},{"name":"node","x-displayName":"VILLASnode node configuration","description":"This section decribes the schema of a VILLASnode node.\nPlease use the `>` to expand the individual sub-sections.\n\n\n"},{"name":"hook","x-displayName":"VILLASnode hook configuration","description":"This section decribes the schema of the VILLASnode hook.\nPlease use the `>` to expand the individual sub-sections.\n\n\n"},{"name":"format","x-displayName":"VILLASnode format configuration","description":"This section decribes the schema of the VILLASnode hook.\nPlease use the `>` to expand the individual sub-sections.\n\n\n"},{"name":"format-edgeflex","x-displayName":"Edgeflex Format","description":"\n"},{"name":"format-igor","x-displayName":"Igor's Format","description":"\n"},{"name":"format-sogno","x-displayName":"SOGNO Format","description":"\n"},{"name":"format-sogno-old","x-displayName":"Old SOGNO Format","description":"\n"}],"externalDocs":{"url":"https://villas.fein-aachen.org/doc/node.html"},"paths":{"/status":{"get":{"operationId":"get-status","summary":"Get the current status of the VILLASnode instance.","tags":["super-node"],"responses":{"200":{"description":"Success","content":{"application/json":{"examples":{"example1":{"value":{"state":"running","version":"v0.10.0","release":"1.node_uuid_unique_debug.20201015git335440d","build_id":"v0.10.0-335440d-debug","build_date":"20201015","hostname":"ernie","uuid":"c9d64cc7-c6e1-4dd4-8873-126318e9d42c","time_now":1602765814.9240997,"time_started":1602765814.3103526,"timezone":{"name":"CEST","offset":-3600,"dst":true},"kernel":{"sysname":"Linux","nodename":"ernie","release":"5.6.17-rt10","version":"#5 SMP Fri Jul 10 14:02:33 CEST 2020","machine":"x86_64","domainname":"(none)"},"system":{"cores_configured":28,"cores":28,"processes":780,"uptime":1379600,"load":[1.66259765625,1.271484375,1.18701171875],"ram":{"total":269994606592,"free":262204465152,"shared":44191744,"buffer":130211840},"swap":{"total":4294963200,"free":4294963200},"highmem":{"total":0,"free":0}}}}}}}},"400":{"description":"Failure"}}}},"/capabilities":{"get":{"operationId":"get-capabilities","summary":"Get the capabilities of the VILLASnode instance.","tags":["super-node"],"responses":{"200":{"description":"Success","content":{"application/json":{"examples":{"example1":{"value":{"hooks":["average","cast","decimate","dp","drop","dump","ebm","fix","gate","jitter_calc","limit_rate","pps_ts","print","restart","scale","shift_seq","shift_ts","skip_first","stats","ts"],"node-types":["amqp","can","ethercat","example","exec","file","influxdb","kafka","loopback","loopback_internal","mqtt","ngsi","redis","shmem","signal","socket","stats","temper","test_rtt","websocket","zeromq"],"apis":["capabilities","config","node","node/file","node/pause","node/restart","node/resume","node/start","node/stats","node/stats/reset","node/stop","nodes","path","path/start","path/stop","paths","restart","shutdown","status"],"formats":["csv","gtnet","iotagent_ul","json","json.kafka","json.reserve","raw","tsv","value","villas.binary","villas.human","villas.web"]}}}}}},"400":{"description":"Failure"}}}},"/config":{"get":{"operationId":"get-config","summary":"Get the currently loaded configuration.","tags":["super-node"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"examples":{"example1":{"value":{"nodes":{"udp_node1":{"type":"socket","layer":"udp","in":{"address":"*:12000","signals":{"count":8,"type":"float"}},"out":{"address":"127.0.0.1:12001"}},"web_node1":{"type":"websocket","vectorize":2,"series":[{"label":"Random walk","unit":"V"},{"label":"Sine","unit":"A"},{"label":"Rect","unit":"Var"},{"label":"Ramp","unit":"°C"}]}},"paths":[{"in":["udp_node1"],"out":["web_node1"],"hooks":[{"type":"decimate","ratio":2}]},{"in":["web_node1"],"out":["udp_node1"]}]}}}}}},"400":{"description":"Failure"}}}},"/restart":{"post":{"operationId":"restart","summary":"Restart the VILLASnode instance.","tags":["super-node"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"config":{"oneOf":[{"type":"string","example":"http://example.com/path/to/config.json","title":"URL","description":"An optional path or URI to a new configuration file which\nshould be loaded after restarting the node.\n\nThe file referenced by the URL must be a [VILLASnode configuration file](#tag/config)\n"},{"$schema":"http://json-schema.org/draft-07/schema","title":"VILLASnode configuration file","description":"Schema of the VILLASnode configuration file.","type":"object","additionalProperties":false,"properties":{"ethercat":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global EtherCAT master configuration","type":"object","properties":{"master":{"type":"integer"},"alias":{"type":"integer"},"coupler":{"type":"object","properties":{"position":{"type":"integer"},"product_code":{"type":"integer"},"vendor_id":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"fpgas":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global FPGA configuration","type":"object","additionalProperties":{"allOf":[{"description":"FPGA Card configuration","type":"object","required":["interface"],"properties":{"interface":{"type":"string","enum":["pcie","platform"]},"name":{"type":"string"},"ips":{"type":"string"},"affinity":{"type":"integer"},"do_reset":{"type":"boolean"},"slot":{"type":"string"},"id":{"type":"string"},"polling":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"reverse":{"type":"boolean"}},"additionalProperties":false}},"ignore_ips":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},{"not":{"required":["name"]}}]}},"nodes":{"title":"Node Objects","description":"A mapping from unique identifiers to node configurations.\n","type":"object","additionalProperties":{"x-additionalPropertiesName":"Node Name","$schema":"http://json-schema.org/draft-07/schema","type":"object","discriminator":{"x-villas-plugin":"node","propertyName":"type","mapping":{"amqp":"#/components/schemas/node-amqp","c37.118":"#/components/schemas/node-c37_118","can":"#/components/schemas/node-can","comedi":"#/components/schemas/node-comedi","ethercat":"#/components/schemas/node-ethercat","example":"#/components/schemas/node-example","exec":"#/components/schemas/node-exec","file":"#/components/schemas/node-file","fpga":"#/components/schemas/node-fpga","iec60870-5-104":"#/components/schemas/node-iec60870-5-104","iec61850-8-1":"#/components/schemas/node-iec61850-8-1","iec61850-9-2":"#/components/schemas/node-iec61850-9-2","infiniband":"#/components/schemas/node-infiniband","influxdb":"#/components/schemas/node-influxdb","kafka":"#/components/schemas/node-kafka","loopback":"#/components/schemas/node-loopback","modbus":"#/components/schemas/node-modbus","mqtt":"#/components/schemas/node-mqtt","nanomsg":"#/components/schemas/node-nanomsg","ngsi":"#/components/schemas/node-ngsi","opal.async":"#/components/schemas/node-opal_async","opal.orchestra":"#/components/schemas/node-opal_orchestra","opendss":"#/components/schemas/node-opendss","redis":"#/components/schemas/node-redis","rtp":"#/components/schemas/node-rtp","shmem":"#/components/schemas/node-shmem","signal":"#/components/schemas/node-signal","signal.v2":"#/components/schemas/node-signal_v2","socket":"#/components/schemas/node-socket","stats":"#/components/schemas/node-stats","temper":"#/components/schemas/node-temper","test_rtt":"#/components/schemas/node-test_rtt","uldaq":"#/components/schemas/node-uldaq","webrtc":"#/components/schemas/node-webrtc","websocket":"#/components/schemas/node-websocket","zeromq":"#/components/schemas/node-zeromq"}}}},"paths":{"title":"Path list","description":"A list of uni-directional paths which connect the nodes defined in the `nodes` list.\n","type":"array","default":[],"items":{"type":"object","required":["in"],"additionalProperties":false,"properties":{"in":{"description":"The in settings expects the name of one or more source nodes or mapping expressions.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"out":{"description":"The out setting expects the name of one or more destination nodes. Each sample which is processed by the path will be sent to each of the destination nodes.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"enabled":{"type":"boolean","default":true,"description":"Whether this path is enabled.\nA disabled path is loaded from the configuration but not started.\n"},"mode":{"type":"string","default":"any","enum":["any","all"],"description":"The mode setting specifies under which condition a path is triggered.\nA triggered path will multiplex / merge samples from its input nodes and run the configured hook functions on them.\nAfterwards the processed and merged samples will be send to all output nodes.\n\nTwo modes are currently supported:\n\n- `any`: The path will trigger the path as soon as any of the masked (see `mask`) input nodes received new samples.\n- `all`: The path will trigger the path as soon as all input nodes received at least one new sample.\n"},"mask":{"description":"This setting allows masking the the input nodes which can trigger the path.\n\nSee also `mode` setting.\n","type":"array","items":{"type":"string","description":"A node-name"}},"rate":{"type":"number","minimum":0,"default":0,"description":"A non-zero value will periodically trigger the path and resend the last sample again.\n\nA value of zero will disable this feature.\n"},"original_sequence_no":{"type":"boolean","default":false,"description":"When this flag is set, the original sequence number from the source node will be used when multiplexing the nodes.\n"},"hooks":{"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"uuid":{"description":"A globally unique ID which identifies the path for the use via the API.\n","type":"string","format":"uuid"},"affinity":{"type":"integer","description":"A mask which pins the execution of this path to a set of CPU cores.\n"},"poll":{"description":"A boolean flag which enables the poll-based mode for reading samples from multiple path sources.\n\n**Note:** This is an advanced setting.\nMost users should use the the default value which will always do the right thing based on the number and type of input nodes for this path.\n","type":"boolean"},"builtin":{"description":"If enabled, the path will start with a set of default and builtin hook functions.\n","type":"boolean","default":true},"queuelen":{"description":"The length of the path queue. It limits how many samples can be _in flight_ at any point in time.\nIf you see queue or pool underrun warnings, try to increase this value.\n","type":"integer"}}}},"http":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"title":"Enable HTTP server","description":"When set to `false`, the built-in HTTP & WebSocket server is disabled and will not listen on any port.\n"},"port":{"type":"integer","default":80,"title":"Listening port","description":"The TCP port number on which HTTP & WebSocket server.\n"},"ssl_cert":{"type":"string","title":"SSL Certificate Path","description":"The public x509 certificate used for server-side SSL encryption.\n","example":"/etc/ssl/certs/mycert.pem"},"ssl_private_key":{"type":"string","title":"SSL Private Key Path","description":"The private x509 key used for server-side SSL encryption.\n","example":"/etc/ssl/private/mykey.pem"}},"additionalProperties":false},"logging":{"type":"object","title":"Logging configuration","properties":{"level":{"title":"The log level","description":"This setting expects one of the allowed strings to adjust the logging level.\nUse this with care! Producing a lot of IO by enabling the debug output might decrease the performance of the server.\n","type":"string","default":"info","enum":["trace","debug","info","warning","error","critical","off"]},"file":{"type":"string","title":"Log file name","description":"Write all log messages to a file.\n"},"syslog":{"type":"boolean","default":false,"title":"Enable syslog logging","description":"If enabled VILLASnode will log to the [system log](https://en.wikipedia.org/wiki/Syslog).\n"},"expressions":{"title":"Logging expressions","description":"The logging expression allow for a fine grained control of log levels per individual logger instance.\nExpressions are provided as a list of logger name pattern and the desired level.\n\n**Note:** The expressions are evaluated in the order of their appearance in the list.\n","type":"array","items":{"type":"object","required":["name","level"],"properties":{"name":{"type":"string","title":"Logger name filter","description":"The [glob](https://man7.org/linux/man-pages/man7/glob.7.html)-style pattern to match the names of the loggers for which the level should be adjusted."},"level":{"type":"string","title":"Log level","description":"The level which should be used for the matched loggers.\n","enum":["trace","debug","info","warning","error","critical","off"]}},"additionalProperties":false}}},"additionalProperties":false},"hugepages":{"type":"integer","default":100,"title":"Number of reserved hugepages","description":"The number of hugepages which will be reservered by the system.\n\nSee: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt\n\nA value of zero will disable the use of huge pages.\n"},"stats":{"type":"number","default":1,"title":"Statistics interval","description":"Specifies the rate at which statistics about the active paths will be periodically printed to the screen.\n\nSetting this value to 5, will print 5 lines per second.\n\nA line includes information such as:\n\n- Source and Destination of path\n- Messages received\n- Messages sent\n- Messages dropped\n"},"affinity":{"type":"integer","default":0,"title":"Task/Process affinity mask","description":"Restricts the exeuction of the daemon to certain CPU cores.\nThis technique, also called 'pinning', improves the determinism of the server by isolating the daemon processes on exclusive cores.\n\nA value of `0` will not change the affinity of the process.\n"},"priority":{"type":"integer","default":0,"description":"Adjusts the scheduling priority of the deamon processes.\nBy default, the daemon uses a real-time optimized FIFO scheduling algorithm.\n\nA value of `0` will not change the priority of the process.\n"},"idle_stop":{"type":"boolean","default":false},"uuid":{"type":["string","null"],"format":"uuid","title":"Super-node UUID","default":null,"description":"Each VILLASnode instance is identified by a globally unique indentifier / UUID.\n\nThis UUID can be queried by the API.\n\nIf the setting is not provided, a UUID will be generated by hashing the active VILLASnode configuration.\nThis ensures that restarting the VILLASnode instance with the identical configuration will yield always the same UUID.\n"},"seed":{"type":"integer","default":0,"title":"Random number generator seed","description":"The seed for the random number generator used by the VILLASnode instance.\n"}}}]}}}}}},"responses":{"200":{"description":"Success. The instance has been restarted.","content":{"application/json":{"examples":{"example1":{"value":{"restarts":5,"config":"http://example.com/path/to/config.json"}}}}}},"400":{"description":"Failure"}}}},"/shutdown":{"post":{"operationId":"shutdown","summary":"Shutdown the VILLASnode instance.","tags":["super-node"],"responses":{"200":{"description":"Success. The instance has been shut down."},"400":{"description":"Failure"}}}},"/nodes":{"get":{"operationId":"get-nodes","summary":"Get a list of all configure node instances.","tags":["nodes"],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"schema":{"type":"array","items":{"$ref":"../components/schemas/node.yaml"}},"example1":{"value":[{"name":"udp_node1","uuid":"b3df1d73-f483-f16c-5936-4ea48295615c","state":"running","affinity":-1,"in":{"address":"*:12000","signals":{"count":8,"type":"float"}},"out":{"address":"127.0.0.1:12001"},"type":"socket","layer":"udp"},{"name":"web_node1","uuid":"19c84350-c83a-8a3b-224b-43fa591c8998","state":"running","affinity":-1,"in":{"vectorize":2,"signals":[{"type":"float","enabled":true,"name":"signal0"},{"type":"float","enabled":true,"name":"signal1"},{"type":"float","enabled":true,"name":"signal2"},{"type":"float","enabled":true,"name":"signal3"}]},"out":{"vectorize":2,"signals":[{"type":"float","enabled":true,"name":"signal0"},{"type":"float","enabled":true,"name":"signal1"},{"type":"float","enabled":true,"name":"signal2"}]},"type":"websocket","vectorize":2,"series":[{"label":"Random walk","unit":"V"},{"label":"Sine","unit":"A"},{"label":"Rect","unit":"Var"},{"label":"Ramp","unit":"°C"}]}]}}}}},"400":{"description":"Failure"}}}},"/node/{uuid-or-name}":{"get":{"operationId":"get-node","summary":"Get the information of a specific node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"examples":{"example1":{"value":{"name":"udp_node1","uuid":"b3df1d73-f483-f16c-5936-4ea48295615c","state":"running","affinity":-1,"in":{"address":"*:12000","signals":{"count":8,"type":"float"}},"out":{"address":"127.0.0.1:12001"},"type":"socket","layer":"udp"}}}}}},"404":{"description":"Error. There is no node with the given UUID or the node does not collect statistics."}}}},"/node/{uuid-or-name}/stats":{"get":{"operationId":"get-node-stats","summary":"Get the statistics of a node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"examples":{"example1":{"value":{"rtp.jitter":{"low":1.3293196E-316,"high":0,"total":0},"rtp.pkts_lost":{"low":1.3285797E-316,"high":1.3290532E-316,"total":0},"rtp.loss_fraction":{"low":3E-323,"high":1.32907453E-316,"total":0},"age":{"low":1.3288619E-316,"high":1.32909588E-316,"total":0},"owd":{"low":3E-323,"high":3E-322,"total":144,"higher":0,"lower":0,"highest":0.099986117,"lowest":0.09990915800000001,"mean":0.09998063221527778,"variance":7.736879555478282E-11,"stddev":0.000008795953362472019,"buckets":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"gap_received":{"low":0,"high":1.32743107E-316,"total":144,"higher":0,"lower":0,"highest":0.10000411000000001,"lowest":0.09999650900000001,"mean":0.09999998652777778,"variance":5.701784607620545E-13,"stddev":7.551016228045431E-7,"buckets":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"gap_sent":{"low":1.58E-321,"high":1.3292848E-316,"total":144,"higher":0,"lower":0,"highest":0.10004273400000001,"lowest":0.09926839700000001,"mean":0.09999436691666665,"variance":3.7637473716438304E-9,"stddev":0.00006134938770390321,"buckets":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"reordered":{"low":8.28904606E-315,"high":1.32930615E-316,"total":0},"skipped":{"low":1.32879865E-316,"high":1.3293275E-316,"total":0}}}}}}},"404":{"description":"Error. There is no node with the given UUID or the node does not collect statistics."}}}},"/node/{uuid-or-name}/stats/reset":{"post":{"operationId":"reset-node-stats","summary":"Reset the statistics counters for a specific node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success. The statistics of the node have been reset."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/node/{uuid-or-name}/start":{"post":{"operationId":"start-node","summary":"Start a node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success. The node has been started."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/node/{uuid-or-name}/stop":{"post":{"operationId":"stop-node","summary":"Stop a node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success. The node has been stopped."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/node/{uuid-or-name}/pause":{"post":{"operationId":"pause-graph","summary":"Pause a node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success. The node has been paused."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/node/{uuid-or-name}/resume":{"post":{"operationId":"resume-node","summary":"Resume a node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success. The node has been resumed."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/node/{uuid-or-name}/restart":{"post":{"operationId":"restart-node","summary":"Retart a node.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success. The node has been restarted."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/node/{uuid-or-name}/file/rewind":{"post":{"operationId":"rewind-file-node","summary":"Rewind the playback file to the beginning.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"responses":{"200":{"description":"Success. The file has been rewound."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/node/{uuid-or-name}/file/seek":{"post":{"operationId":"seek-file-node","summary":"Rewind the playback file to the beginning.","tags":["nodes"],"parameters":[{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}}],"requestBody":{"description":"Sample position in file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["position"],"additionalProperties":false,"properties":{"position":{"type":"integer","example":123,"description":"Skip the first nth samples in the file."}}}}}},"responses":{"200":{"description":"Success. The read-pointer of the file has been changed."},"404":{"description":"Error. There is no node with the given UUID."}}}},"/paths":{"get":{"operationId":"get-paths","summary":"Get a list of all paths.","tags":["paths"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}},"examples":{"example1":{"value":[{"uuid":"251c99af-4b05-9de4-367e-2bb550412e56","state":"running","mode":"any","enabled":true,"builtin":true,"reverse":false,"original_sequence_no":true,"last_sequence":false,"poll":false,"queuelen":1024,"signals":[],"hooks":[],"in":["udp_node1"],"out":["web_node1"]},{"uuid":"61b5674b-95fa-b35f-bff8-c877acf21e3b","state":"running","mode":"any","enabled":true,"builtin":true,"reverse":false,"original_sequence_no":true,"last_sequence":false,"poll":false,"queuelen":1024,"signals":[],"hooks":[],"in":["web_node1"],"out":["udp_node1"]}]}}}}},"400":{"description":"Failure"}}}},"/path/{uuid}":{"post":{"operationId":"get-path","summary":"Get details of a single path.","tags":["paths"],"parameters":[{"name":"uuid","description":"A globally unique identifier for each path.","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"examples":{"example1":{"value":{"uuid":"251c99af-4b05-9de4-367e-2bb550412e56","state":"running","mode":"any","enabled":true,"builtin":true,"reverse":false,"original_sequence_no":true,"last_sequence":false,"poll":false,"queuelen":1024,"signals":[],"hooks":[],"in":["udp_node1"],"out":["web_node1"]}}}}}},"404":{"description":"Error. There is no path with the given UUID."}}}},"/path/{uuid}/start":{"post":{"operationId":"start-path","summary":"Start a path.","tags":["paths"],"parameters":[{"name":"uuid","description":"A globally unique identifier for each path.","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success. The path has been started."},"404":{"description":"Error. There is no path with the given UUID."}}}},"/path/{uuid}/stop":{"post":{"operationId":"stop-path","summary":"Start a path.","tags":["paths"],"parameters":[{"name":"uuid","description":"A globally unique identifier for each path.","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success. The path has been stopped."},"404":{"description":"Error. There is no path with the given UUID."}}}},"/graph.{format}":{"get":{"operationId":"get-graph","summary":"Get a graph representation of the currently loaded configuration.","tags":["super-node"],"parameters":[{"in":"path","name":"format","schema":{"type":"string","description":"The image format of the generated graph.","enum":["ps","eps","txt","svg","svgz","gif","png","jpg","jpeg","bmp","dot","fig","json","pdf"]}},{"in":"query","name":"layout","schema":{"type":"string","description":"The Graphviz layout engine used for rendering the graph.","enum":["circo","dot","fdp","neato","nop","nop1","nop2","osage","patchwork","sfdp","twopi"]}}],"responses":{"200":{"description":"Success"},"400":{"description":"Failure"}}}}},"components":{"schemas":{"Config":{"$schema":"http://json-schema.org/draft-07/schema","title":"VILLASnode configuration file","description":"Schema of the VILLASnode configuration file.","type":"object","additionalProperties":false,"properties":{"ethercat":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global EtherCAT master configuration","type":"object","properties":{"master":{"type":"integer"},"alias":{"type":"integer"},"coupler":{"type":"object","properties":{"position":{"type":"integer"},"product_code":{"type":"integer"},"vendor_id":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"fpgas":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global FPGA configuration","type":"object","additionalProperties":{"allOf":[{"description":"FPGA Card configuration","type":"object","required":["interface"],"properties":{"interface":{"type":"string","enum":["pcie","platform"]},"name":{"type":"string"},"ips":{"type":"string"},"affinity":{"type":"integer"},"do_reset":{"type":"boolean"},"slot":{"type":"string"},"id":{"type":"string"},"polling":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"reverse":{"type":"boolean"}},"additionalProperties":false}},"ignore_ips":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},{"not":{"required":["name"]}}]}},"nodes":{"title":"Node Objects","description":"A mapping from unique identifiers to node configurations.\n","type":"object","additionalProperties":{"x-additionalPropertiesName":"Node Name","$schema":"http://json-schema.org/draft-07/schema","type":"object","discriminator":{"x-villas-plugin":"node","propertyName":"type","mapping":{"amqp":"#/components/schemas/node-amqp","c37.118":"#/components/schemas/node-c37_118","can":"#/components/schemas/node-can","comedi":"#/components/schemas/node-comedi","ethercat":"#/components/schemas/node-ethercat","example":"#/components/schemas/node-example","exec":"#/components/schemas/node-exec","file":"#/components/schemas/node-file","fpga":"#/components/schemas/node-fpga","iec60870-5-104":"#/components/schemas/node-iec60870-5-104","iec61850-8-1":"#/components/schemas/node-iec61850-8-1","iec61850-9-2":"#/components/schemas/node-iec61850-9-2","infiniband":"#/components/schemas/node-infiniband","influxdb":"#/components/schemas/node-influxdb","kafka":"#/components/schemas/node-kafka","loopback":"#/components/schemas/node-loopback","modbus":"#/components/schemas/node-modbus","mqtt":"#/components/schemas/node-mqtt","nanomsg":"#/components/schemas/node-nanomsg","ngsi":"#/components/schemas/node-ngsi","opal.async":"#/components/schemas/node-opal_async","opal.orchestra":"#/components/schemas/node-opal_orchestra","opendss":"#/components/schemas/node-opendss","redis":"#/components/schemas/node-redis","rtp":"#/components/schemas/node-rtp","shmem":"#/components/schemas/node-shmem","signal":"#/components/schemas/node-signal","signal.v2":"#/components/schemas/node-signal_v2","socket":"#/components/schemas/node-socket","stats":"#/components/schemas/node-stats","temper":"#/components/schemas/node-temper","test_rtt":"#/components/schemas/node-test_rtt","uldaq":"#/components/schemas/node-uldaq","webrtc":"#/components/schemas/node-webrtc","websocket":"#/components/schemas/node-websocket","zeromq":"#/components/schemas/node-zeromq"}}}},"paths":{"title":"Path list","description":"A list of uni-directional paths which connect the nodes defined in the `nodes` list.\n","type":"array","default":[],"items":{"type":"object","required":["in"],"additionalProperties":false,"properties":{"in":{"description":"The in settings expects the name of one or more source nodes or mapping expressions.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"out":{"description":"The out setting expects the name of one or more destination nodes. Each sample which is processed by the path will be sent to each of the destination nodes.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"enabled":{"type":"boolean","default":true,"description":"Whether this path is enabled.\nA disabled path is loaded from the configuration but not started.\n"},"mode":{"type":"string","default":"any","enum":["any","all"],"description":"The mode setting specifies under which condition a path is triggered.\nA triggered path will multiplex / merge samples from its input nodes and run the configured hook functions on them.\nAfterwards the processed and merged samples will be send to all output nodes.\n\nTwo modes are currently supported:\n\n- `any`: The path will trigger the path as soon as any of the masked (see `mask`) input nodes received new samples.\n- `all`: The path will trigger the path as soon as all input nodes received at least one new sample.\n"},"mask":{"description":"This setting allows masking the the input nodes which can trigger the path.\n\nSee also `mode` setting.\n","type":"array","items":{"type":"string","description":"A node-name"}},"rate":{"type":"number","minimum":0,"default":0,"description":"A non-zero value will periodically trigger the path and resend the last sample again.\n\nA value of zero will disable this feature.\n"},"original_sequence_no":{"type":"boolean","default":false,"description":"When this flag is set, the original sequence number from the source node will be used when multiplexing the nodes.\n"},"hooks":{"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"uuid":{"description":"A globally unique ID which identifies the path for the use via the API.\n","type":"string","format":"uuid"},"affinity":{"type":"integer","description":"A mask which pins the execution of this path to a set of CPU cores.\n"},"poll":{"description":"A boolean flag which enables the poll-based mode for reading samples from multiple path sources.\n\n**Note:** This is an advanced setting.\nMost users should use the the default value which will always do the right thing based on the number and type of input nodes for this path.\n","type":"boolean"},"builtin":{"description":"If enabled, the path will start with a set of default and builtin hook functions.\n","type":"boolean","default":true},"queuelen":{"description":"The length of the path queue. It limits how many samples can be _in flight_ at any point in time.\nIf you see queue or pool underrun warnings, try to increase this value.\n","type":"integer"}}}},"http":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"title":"Enable HTTP server","description":"When set to `false`, the built-in HTTP & WebSocket server is disabled and will not listen on any port.\n"},"port":{"type":"integer","default":80,"title":"Listening port","description":"The TCP port number on which HTTP & WebSocket server.\n"},"ssl_cert":{"type":"string","title":"SSL Certificate Path","description":"The public x509 certificate used for server-side SSL encryption.\n","example":"/etc/ssl/certs/mycert.pem"},"ssl_private_key":{"type":"string","title":"SSL Private Key Path","description":"The private x509 key used for server-side SSL encryption.\n","example":"/etc/ssl/private/mykey.pem"}},"additionalProperties":false},"logging":{"type":"object","title":"Logging configuration","properties":{"level":{"title":"The log level","description":"This setting expects one of the allowed strings to adjust the logging level.\nUse this with care! Producing a lot of IO by enabling the debug output might decrease the performance of the server.\n","type":"string","default":"info","enum":["trace","debug","info","warning","error","critical","off"]},"file":{"type":"string","title":"Log file name","description":"Write all log messages to a file.\n"},"syslog":{"type":"boolean","default":false,"title":"Enable syslog logging","description":"If enabled VILLASnode will log to the [system log](https://en.wikipedia.org/wiki/Syslog).\n"},"expressions":{"title":"Logging expressions","description":"The logging expression allow for a fine grained control of log levels per individual logger instance.\nExpressions are provided as a list of logger name pattern and the desired level.\n\n**Note:** The expressions are evaluated in the order of their appearance in the list.\n","type":"array","items":{"type":"object","required":["name","level"],"properties":{"name":{"type":"string","title":"Logger name filter","description":"The [glob](https://man7.org/linux/man-pages/man7/glob.7.html)-style pattern to match the names of the loggers for which the level should be adjusted."},"level":{"type":"string","title":"Log level","description":"The level which should be used for the matched loggers.\n","enum":["trace","debug","info","warning","error","critical","off"]}},"additionalProperties":false}}},"additionalProperties":false},"hugepages":{"type":"integer","default":100,"title":"Number of reserved hugepages","description":"The number of hugepages which will be reservered by the system.\n\nSee: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt\n\nA value of zero will disable the use of huge pages.\n"},"stats":{"type":"number","default":1,"title":"Statistics interval","description":"Specifies the rate at which statistics about the active paths will be periodically printed to the screen.\n\nSetting this value to 5, will print 5 lines per second.\n\nA line includes information such as:\n\n- Source and Destination of path\n- Messages received\n- Messages sent\n- Messages dropped\n"},"affinity":{"type":"integer","default":0,"title":"Task/Process affinity mask","description":"Restricts the exeuction of the daemon to certain CPU cores.\nThis technique, also called 'pinning', improves the determinism of the server by isolating the daemon processes on exclusive cores.\n\nA value of `0` will not change the affinity of the process.\n"},"priority":{"type":"integer","default":0,"description":"Adjusts the scheduling priority of the deamon processes.\nBy default, the daemon uses a real-time optimized FIFO scheduling algorithm.\n\nA value of `0` will not change the priority of the process.\n"},"idle_stop":{"type":"boolean","default":false},"uuid":{"type":["string","null"],"format":"uuid","title":"Super-node UUID","default":null,"description":"Each VILLASnode instance is identified by a globally unique indentifier / UUID.\n\nThis UUID can be queried by the API.\n\nIf the setting is not provided, a UUID will be generated by hashing the active VILLASnode configuration.\nThis ensures that restarting the VILLASnode instance with the identical configuration will yield always the same UUID.\n"},"seed":{"type":"integer","default":0,"title":"Random number generator seed","description":"The seed for the random number generator used by the VILLASnode instance.\n"}}},"Node":{"$schema":"http://json-schema.org/draft-07/schema","type":"object","discriminator":{"x-villas-plugin":"node","propertyName":"type","mapping":{"amqp":"#/components/schemas/node-amqp","c37.118":"#/components/schemas/node-c37_118","can":"#/components/schemas/node-can","comedi":"#/components/schemas/node-comedi","ethercat":"#/components/schemas/node-ethercat","example":"#/components/schemas/node-example","exec":"#/components/schemas/node-exec","file":"#/components/schemas/node-file","fpga":"#/components/schemas/node-fpga","iec60870-5-104":"#/components/schemas/node-iec60870-5-104","iec61850-8-1":"#/components/schemas/node-iec61850-8-1","iec61850-9-2":"#/components/schemas/node-iec61850-9-2","infiniband":"#/components/schemas/node-infiniband","influxdb":"#/components/schemas/node-influxdb","kafka":"#/components/schemas/node-kafka","loopback":"#/components/schemas/node-loopback","modbus":"#/components/schemas/node-modbus","mqtt":"#/components/schemas/node-mqtt","nanomsg":"#/components/schemas/node-nanomsg","ngsi":"#/components/schemas/node-ngsi","opal.async":"#/components/schemas/node-opal_async","opal.orchestra":"#/components/schemas/node-opal_orchestra","opendss":"#/components/schemas/node-opendss","redis":"#/components/schemas/node-redis","rtp":"#/components/schemas/node-rtp","shmem":"#/components/schemas/node-shmem","signal":"#/components/schemas/node-signal","signal.v2":"#/components/schemas/node-signal_v2","socket":"#/components/schemas/node-socket","stats":"#/components/schemas/node-stats","temper":"#/components/schemas/node-temper","test_rtt":"#/components/schemas/node-test_rtt","uldaq":"#/components/schemas/node-uldaq","webrtc":"#/components/schemas/node-webrtc","websocket":"#/components/schemas/node-websocket","zeromq":"#/components/schemas/node-zeromq"}}},"Hook":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}},"Format":{"$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"FormatEdgeflex":{"title":"PMU measurements as used in the EdgeFlex project by Manuel","description":"VILLASnode does not support deseralization (yet).\n","type":"object","required":["created"],"properties":{"created":{"title":"Sampling timestamp","description":"A timestamps in miliseconds since 1970-01-01 00:00:00","type":"number","minimum":0}},"additionalProperties":{"description":"Key-value pairs of measurements","anyOf":[{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"object","description":"A complex number represented in real and imaginary components","properties":{"real":{"type":"number"},"imag":{"type":"number"}},"additionalProperties":false}]},"example":{"created":1633791645123,"signal0":123.456,"signal1":true,"signal2":1234,"signal3":{"real":1234.4556,"imag":23232.12312}}},"FormatIgor":{"title":"PMU format used by Igor","example":{"device":"device1","timestamp":"2020-05-20T10:27:57.980802+00:00","readings":[{"channel":"BUS1-VA","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IA","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-VB","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IB","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-VC","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IC","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-VN","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IN","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11}]},"type":"object","required":["device","timestamp","readings"],"properties":{"device":{"description":"ID for measurement device","type":"string"},"timestamp":{"description":"Timestamp of measurement in ISO 8601 format","type":"string","pattern":"^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$"},"readings":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","description":"Name of the monitored bus"},"magnitude":{"type":"number","description":"Amplitude of the measured signal [V]"},"phase":{"type":"number","description":"Phase of the measured signal [radian]"},"frequency":{"type":"number","description":"Frequency of the line signal [Hz]"},"rocof":{"type":"number","description":"Rate of change of frequency [Hz/s]"}},"additionalProperties":false}}},"additionalProperties":false},"FormatSognoOld":{"title":"Original PMU sensor data format as used in the SOGNO EU project","type":"object","required":["device","timestamp","component","measurand","phase","data"],"properties":{"device":{"description":"ID for measurement device","type":"string"},"timestamp":{"description":"Timestamp of measurement in ISO 8601 format","type":"string","pattern":"^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$"},"component":{"description":"ID (uuid) from CIM document","type":"string","format":"uuid"},"measurand":{"type":"string","enum":["voltmagnitude","voltangle","currmagnitude","currangle","activepower","reactivepower","apparentpower","frequency"]},"phase":{"type":"string","enum":["A","B","C"]},"data":{"type":"number","description":"Measurement value as in the following format depending on value of measurand:\n - voltmagnitude: phase-to-ground RMS value, unit volts\n - voltangle: unit radian\n - currmagnitude: RMS value, unit ampere\n - currangle: unit radian\n - activepower: single phase power, unit watts\n - reactivepower: single phase power, unit voltampere reactive\n - apparentpower: single phase power, unit voltampere\n - frequency: unit hertz\n"}},"additionalProperties":false,"example":{"device":"pmu-abc0","timestamp":"2021-10-07T10:11:12.1231241+02:00","component":"7a30b61a-2913-11ec-9621-0242ac130002","measurand":"voltmagnitude","phase":"A","data":123124}},"FormatSogno":{"title":"PMU format used in SOGNO LF project","example":{"device":"device1","timestamp":"2020-05-20T10:27:57.980802+00:00","readings":[{"component":"7a30b61a-2913-11ec-9621-0242ac130002","measurand":"voltmagnitude","phase":"A","data":123}]},"type":"object","required":["device","timestamp","readings"],"properties":{"device":{"description":"ID for measurement device","type":"string"},"timestamp":{"description":"Timestamp of measurement in ISO 8601 format","type":"string","pattern":"^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$"},"readings":{"type":"array","items":{"type":"object","properties":{"component":{"description":"ID (uuid) from CIM document","type":"string","format":"uuid"},"measurand":{"type":"string","enum":["voltmagnitude","voltangle","currmagnitude","currangle","activepower","reactivepower","apparentpower","frequency"]},"phase":{"type":"string","enum":["A","B","C"]},"data":{"type":"number","description":"Measurement value as in the following format depending on value of measurand:\n - voltmagnitude: phase-to-ground RMS value, unit volts\n - voltangle: unit radian\n - currmagnitude: RMS value, unit ampere\n - currangle: unit radian\n - activepower: single phase power, unit watts\n - reactivepower: single phase power, unit voltampere reactive\n - apparentpower: single phase power, unit voltampere\n - frequency: unit hertz\n"}},"additionalProperties":false}}},"additionalProperties":false},"plugin-ethercat":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global EtherCAT master configuration","type":"object","properties":{"master":{"type":"integer"},"alias":{"type":"integer"},"coupler":{"type":"object","properties":{"position":{"type":"integer"},"product_code":{"type":"integer"},"vendor_id":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"shared-fpga-card":{"description":"FPGA Card configuration","type":"object","required":["interface"],"properties":{"interface":{"type":"string","enum":["pcie","platform"]},"name":{"type":"string"},"ips":{"type":"string"},"affinity":{"type":"integer"},"do_reset":{"type":"boolean"},"slot":{"type":"string"},"id":{"type":"string"},"polling":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"reverse":{"type":"boolean"}},"additionalProperties":false}},"ignore_ips":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"plugin-fpgas":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global FPGA configuration","type":"object","additionalProperties":{"allOf":[{"description":"FPGA Card configuration","type":"object","required":["interface"],"properties":{"interface":{"type":"string","enum":["pcie","platform"]},"name":{"type":"string"},"ips":{"type":"string"},"affinity":{"type":"integer"},"do_reset":{"type":"boolean"},"slot":{"type":"string"},"id":{"type":"string"},"polling":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"reverse":{"type":"boolean"}},"additionalProperties":false}},"ignore_ips":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},{"not":{"required":["name"]}}]}},"shared-format-column-separator":{"title":"Column Separator","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Separator between entries in column-based formats.\n"},"shared-format-line-delimiter":{"title":"Line Delimiter","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Delimiter following rows in line-based formats.\n"},"shared-format-line-comment_prefix":{"title":"Line Comment Prefix","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Prefix indicating that a row in line-based format should be treated as a comment.\n"},"shared-format-line-header":{"title":"First Line Header","type":"boolean","description":"Print a single header-row at the beginning of a line-based format.\n"},"shared-format-line-skip_first_line":{"title":"Skip First Line","type":"boolean","description":"Skip the first row in a line-based format.\n"},"shared-format-real_precision":{"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"shared-format-ts_origin":{"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"shared-format-ts_received":{"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"shared-format-sequence":{"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"shared-format-data":{"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"shared-format-offset":{"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"},"format-csv":{"title":"csv","type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"csv"},"separator":{"default":",","title":"Column Separator","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Separator between entries in column-based formats.\n"},"delimiter":{"default":"\n","title":"Line Delimiter","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Delimiter following rows in line-based formats.\n"},"comment_prefix":{"default":"#","title":"Line Comment Prefix","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Prefix indicating that a row in line-based format should be treated as a comment.\n"},"header":{"default":true,"title":"First Line Header","type":"boolean","description":"Print a single header-row at the beginning of a line-based format.\n"},"skip_first_line":{"default":false,"title":"Skip First Line","type":"boolean","description":"Skip the first row in a line-based format.\n"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":true,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"shared-format-raw-bits":{"description":"Number of bits per signal.","type":"integer","enum":[8,16,32,64,128]},"shared-format-raw-endianess":{"description":"The endianess of the data.","type":"string","enum":["big","little"]},"shared-format-raw-fake":{"description":"Send and interpret the first three signals of each sample as the following header fields:\n- sequence number\n- timestamp seconds\n- timestamp nano-seconds\n","type":"boolean"},"format-gtnet":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"gtnet"},"bits":{"default":32,"description":"Number of bits per signal.","type":"integer","enum":[8,16,32,64,128]},"endianess":{"default":"big","description":"The endianess of the data.","type":"string","enum":["big","little"]},"fake":{"default":false,"description":"Send and interpret the first three signals of each sample as the following header fields:\n- sequence number\n- timestamp seconds\n- timestamp nano-seconds\n","type":"boolean"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":false,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":false,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-iotagent_ul":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"iotagent_ul"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"shared-format-json-indent":{"type":"integer","minimum":0,"maximum":31,"description":"Pretty-print the result, using newlines between array and object items, and indenting with n spaces.\nIf the settings is not used or is 0, no newlines are inserted between array and object items.\n"},"shared-format-json-compact":{"type":"boolean","description":"This flag enables a compact representation, i.e. sets the separator between array and object items to \",\" and between object keys and values to \":\".\nWithout this flag, the corresponding separators are \", \" and \": \" for more readable output.\n"},"shared-format-json-ensure_ascii":{"type":"boolean","description":"If this flag is used, the output is guaranteed to consist only of ASCII characters.\nThis is achieved by escaping all Unicode characters outside the ASCII range.\n"},"shared-format-json-sort_keys":{"type":"boolean","description":"If this flag is used, all the objects in output are sorted by key.\nThis is useful e.g. if two JSON texts are diffed or visually compared.\n"},"shared-format-json-escape_slash":{"type":"boolean","default":false,"description":"Escape the `/` characters in strings with `\\/`."},"format-json":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"json"},"indent":{"default":0,"type":"integer","minimum":0,"maximum":31,"description":"Pretty-print the result, using newlines between array and object items, and indenting with n spaces.\nIf the settings is not used or is 0, no newlines are inserted between array and object items.\n"},"compact":{"default":false,"type":"boolean","description":"This flag enables a compact representation, i.e. sets the separator between array and object items to \",\" and between object keys and values to \":\".\nWithout this flag, the corresponding separators are \", \" and \": \" for more readable output.\n"},"ensure_ascii":{"default":false,"type":"boolean","description":"If this flag is used, the output is guaranteed to consist only of ASCII characters.\nThis is achieved by escaping all Unicode characters outside the ASCII range.\n"},"sort_keys":{"default":false,"type":"boolean","description":"If this flag is used, all the objects in output are sorted by key.\nThis is useful e.g. if two JSON texts are diffed or visually compared.\n"},"escape_slash":{"default":false,"type":"boolean","description":"Escape the `/` characters in strings with `\\/`."},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-json_edgeflex":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"json.edgeflex"},"indent":{"default":0,"type":"integer","minimum":0,"maximum":31,"description":"Pretty-print the result, using newlines between array and object items, and indenting with n spaces.\nIf the settings is not used or is 0, no newlines are inserted between array and object items.\n"},"compact":{"default":false,"type":"boolean","description":"This flag enables a compact representation, i.e. sets the separator between array and object items to \",\" and between object keys and values to \":\".\nWithout this flag, the corresponding separators are \", \" and \": \" for more readable output.\n"},"ensure_ascii":{"default":false,"type":"boolean","description":"If this flag is used, the output is guaranteed to consist only of ASCII characters.\nThis is achieved by escaping all Unicode characters outside the ASCII range.\n"},"sort_keys":{"default":false,"type":"boolean","description":"If this flag is used, all the objects in output are sorted by key.\nThis is useful e.g. if two JSON texts are diffed or visually compared.\n"},"escape_slash":{"default":false,"type":"boolean","description":"Escape the `/` characters in strings with `\\/`."},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-json_kafka":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"json.kafka"},"schema":{"type":"object","additionalProperties":true},"indent":{"default":0,"type":"integer","minimum":0,"maximum":31,"description":"Pretty-print the result, using newlines between array and object items, and indenting with n spaces.\nIf the settings is not used or is 0, no newlines are inserted between array and object items.\n"},"compact":{"default":false,"type":"boolean","description":"This flag enables a compact representation, i.e. sets the separator between array and object items to \",\" and between object keys and values to \":\".\nWithout this flag, the corresponding separators are \", \" and \": \" for more readable output.\n"},"ensure_ascii":{"default":false,"type":"boolean","description":"If this flag is used, the output is guaranteed to consist only of ASCII characters.\nThis is achieved by escaping all Unicode characters outside the ASCII range.\n"},"sort_keys":{"default":false,"type":"boolean","description":"If this flag is used, all the objects in output are sorted by key.\nThis is useful e.g. if two JSON texts are diffed or visually compared.\n"},"escape_slash":{"default":false,"type":"boolean","description":"Escape the `/` characters in strings with `\\/`."},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-json_reserve":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"json.reserve"},"indent":{"default":0,"type":"integer","minimum":0,"maximum":31,"description":"Pretty-print the result, using newlines between array and object items, and indenting with n spaces.\nIf the settings is not used or is 0, no newlines are inserted between array and object items.\n"},"compact":{"default":false,"type":"boolean","description":"This flag enables a compact representation, i.e. sets the separator between array and object items to \",\" and between object keys and values to \":\".\nWithout this flag, the corresponding separators are \", \" and \": \" for more readable output.\n"},"ensure_ascii":{"default":false,"type":"boolean","description":"If this flag is used, the output is guaranteed to consist only of ASCII characters.\nThis is achieved by escaping all Unicode characters outside the ASCII range.\n"},"sort_keys":{"default":false,"type":"boolean","description":"If this flag is used, all the objects in output are sorted by key.\nThis is useful e.g. if two JSON texts are diffed or visually compared.\n"},"escape_slash":{"default":false,"type":"boolean","description":"Escape the `/` characters in strings with `\\/`."},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-opal_asyncip":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"opal.asyncip"},"dev_id":{"default":0,"type":"integer"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":false,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-protobuf":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"protobuf"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-raw":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"raw"},"bits":{"default":32,"description":"Number of bits per signal.","type":"integer","enum":[8,16,32,64,128]},"endianess":{"default":"little","description":"The endianess of the data.","type":"string","enum":["big","little"]},"fake":{"default":false,"description":"Send and interpret the first three signals of each sample as the following header fields:\n- sequence number\n- timestamp seconds\n- timestamp nano-seconds\n","type":"boolean"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":false,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":false,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-tsv":{"title":"tsv","type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"tsv"},"separator":{"default":"\t","title":"Column Separator","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Separator between entries in column-based formats.\n"},"delimiter":{"default":"\n","title":"Line Delimiter","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Delimiter following rows in line-based formats.\n"},"comment_prefix":{"default":"#","title":"Line Comment Prefix","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Prefix indicating that a row in line-based format should be treated as a comment.\n"},"header":{"default":true,"title":"First Line Header","type":"boolean","description":"Print a single header-row at the beginning of a line-based format.\n"},"skip_first_line":{"default":false,"title":"Skip First Line","type":"boolean","description":"Skip the first row in a line-based format.\n"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":true,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-value":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"value"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":false,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":false,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"shared-format-villas-source_index":{"title":"Source Index","description":"VILLASnode source index for outgoing messages.\nThe source index of incoming messages will be verified against this value if `validate_source_index` is enabled.\n","type":"integer","minimum":0},"shared-format-villas-validate_source_index":{"title":"Validate Source Index","description":"Validate the source index of incoming messages.\n","type":"boolean"},"format-villas_binary":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"villas.binary"},"source_index":{"default":0,"title":"Source Index","description":"VILLASnode source index for outgoing messages.\nThe source index of incoming messages will be verified against this value if `validate_source_index` is enabled.\n","type":"integer","minimum":0},"validate_source_index":{"default":false,"title":"Validate Source Index","description":"Validate the source index of incoming messages.\n","type":"boolean"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-villas_human":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"villas.human"},"delimiter":{"default":"\n","title":"Line Delimiter","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Delimiter following rows in line-based formats.\n"},"comment_prefix":{"default":"#","title":"Line Comment Prefix","type":"string","pattern":"^[\\x00-\\x7F]$","description":"Prefix indicating that a row in line-based format should be treated as a comment.\n"},"header":{"default":true,"title":"First Line Header","type":"boolean","description":"Print a single header-row at the beginning of a line-based format.\n"},"skip_first_line":{"default":false,"title":"Skip First Line","type":"boolean","description":"Skip the first row in a line-based format.\n"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format-villas_web":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"villas.web"},"source_index":{"default":0,"title":"Source Index","description":"VILLASnode source index for outgoing messages.\nThe source index of incoming messages will be verified against this value if `validate_source_index` is enabled.\n","type":"integer","minimum":0},"validate_source_index":{"default":false,"title":"Validate Source Index","description":"Validate the source index of incoming messages.\n","type":"boolean"},"real_precision":{"default":17,"title":"Floating Point Decimal Precision","type":"integer","minimum":0,"maximum":31,"description":"Output all real numbers with at most n digits of precision.\nA precision of 17 is sufficient to correctly and losslessly encode all IEEE 754 double precision floating point numbers.\n"},"ts_origin":{"default":true,"title":"Include Origin Timestamp","type":"boolean","description":"Include a timestamp recorded at a sample's origin.\n"},"ts_received":{"default":false,"title":"Include Received Timestamp","type":"boolean","description":"Include a timestamp recorded when a sample was received by a VILLASnode instance.\n"},"sequence":{"default":true,"title":"Include Sequence Number","type":"boolean","description":"Include the sequence number of a sample.\n"},"data":{"default":true,"title":"Include Data","type":"boolean","description":"Include sample data.\n"},"offset":{"default":false,"title":"Include Timestamp Offset","type":"boolean","description":"Include difference between received and origin timestamp.\n"}}},"format":{"$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"shared-node-enabled":{"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"shared-node-builtin":{"type":"boolean","default":true,"title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"shared-node-vectorize":{"type":"integer","minimum":1,"default":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"shared-hook-priority":{"type":"integer","minimum":0},"shared-hook-signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"shared-hook-signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}},"hook-average":{"type":"object","required":["type","offset"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"average"},"offset":{"type":"integer","description":"The signal offset at which the average signal should be inserted.\n\n**Examples:**\n- `0` inserts the averaged signal before all other signals in the sample\n- `1` inserts the averaged signal after the first signal.\n"},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"hook-cast":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"cast"},"new_type":{"type":"string","enum":["integer","float","boolean","complex"],"description":"The type of the casted signal.","example":"integer"},"new_name":{"type":"string","description":"The new name of the casted signal.","example":"BusA.V"},"new_unit":{"type":"string","description":"The new unit of the casted signal.","example":"V"},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"hook-decimate":{"type":"object","required":["type","ratio"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"decimate"},"ratio":{"type":"integer","description":"The decimation ratio. A value of 4 will skip every, but the 4th sample in a row.","example":4},"renumber":{"type":"boolean","default":false,"description":"Renumber the sequence numbers of the output samples starting from zero."},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-digest":{"type":"object","required":["type","uri","algorithm"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"digest"},"uri":{"description":"The output file for digests.","example":"digest.txt","type":"string"},"algorithm":{"description":"The algorithm used for calculating digests.","example":"sha256","type":"string"},"mode":{"description":"The file open mode passed to fopen (e.g. \"w\" to truncate, \"a\" to append).","example":"w","type":"string"},"priority":{"default":999,"type":"integer","minimum":0}}},"hook-dp":{"type":"object","required":["type","f0","harmonics","signal"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"dp"},"f0":{"description":"The fundamental frequency.","example":50,"type":"number"},"dt":{"description":"The timestep of the input samples. Exclusive with `rate` setting.","examples":[0.00005],"type":"number"},"rate":{"description":"The rate of the input samples. Exclusive with `dt` setting.","type":"number"},"harmonics":{"type":"array","minItems":1,"description":"A list of selected harmonics which should be calculated.","example":[0,1,3,5],"items":{"type":"integer"}},"inverse":{"description":"Enable the calucation of the inverse transform.","type":"boolean","default":false},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"description":"The name or index of a signal to which this hook should be applied","oneOf":[{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},{"type":"integer"}]}},"oneOf":[{"required":["dt"]},{"required":["rate"]}]},"hook-drop":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"drop"},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-dump":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"dump"},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-ebm":{"$schema":"http://json-schema.org/draft-07/schema","type":"object","required":["type","phases"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"ebm"},"phases":{"description":"Signal indices for voltage & current values for each phase.","type":"array","items":{"type":"array","minItems":2,"examples":[[0,1],[2,3],[4,5]],"additionalItems":false,"items":[{"title":"Voltage Signal Index","type":"integer"},{"title":"Current Signal Index","type":"integer"}]}},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-fix":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"fix"},"priority":{"default":99,"type":"integer","minimum":0}}},"shared-duration":{"oneOf":[{"type":"string","description":"Duration as a string, e.g., \"1h30m\", \"45s\", \"200ms\".\n","pattern":"^(\\d+(d|h|ms|us|ns|m|s))+$","examples":["6d23h30m50s40ms","45s","2d200ms"]},{"type":"integer","description":"Duration as integer.\n","minimum":0,"examples":[5400000,45000,200]}]},"hook-frame":{"type":"object","required":["type","interval"],"properties":{"type":{"type":"string","const":"frame"},"trigger":{"description":"The trigger for new frames.","type":"string","default":"timestamp","enum":["sequence","timestamp"]},"interval":{"description":"The interval in which frames are annotated.","default":"1s","not":{"const":null}},"priority":{"default":10,"type":"integer","minimum":0}},"additionalProperties":false,"oneOf":[{"required":["trigger"],"properties":{"trigger":{"const":"sequence"},"interval":{"type":"integer"}},"additionalProperties":{}},{"properties":{"trigger":{"const":"timestamp"},"interval":{"oneOf":[{"type":"string","description":"Duration as a string, e.g., \"1h30m\", \"45s\", \"200ms\".\n","pattern":"^(\\d+(d|h|ms|us|ns|m|s))+$","examples":["6d23h30m50s40ms","45s","2d200ms"]},{"type":"integer","description":"Duration as integer.\n","minimum":0,"examples":[5400000,45000,200]}]}},"additionalProperties":{}}]},"hook-gate":{"type":"object","required":["type","signal"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"gate"},"mode":{"description":"The triggering condition at which the gate opens.","type":"string","default":"rising_edge","enum":["above","below","rising_edge","falling_edge"]},"threshold":{"default":0.5,"description":"The threshold the signal needs to overcome before the gate opens.","type":"number"},"duration":{"description":"The number of seconds for which the gate opens when the triggering condition is met. Exclusive with the `samples` setting.","type":"number"},"samples":{"description":"The number if samples for which the gate opens when the triggering condition is met. Exclusive with the `duration` setting.","type":"integer"},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"}}},"hook-jitter_calc":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"jitter_calc"},"priority":{"default":0,"type":"integer","minimum":0}}},"hook-limit_rate":{"type":"object","required":["type","rate"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"limit_rate"},"rate":{"type":"number","exclusiveMinimum":0,"description":"The maximum sample rate in `1/s` before this hook will drop samples."},"mode":{"type":"string","default":"local","description":"Timestamp which should be used for rate estimation.","enum":["local","received","origin"]},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-limit_value":{"type":"object","required":["type","min","max"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"limit_value"},"min":{"description":"The smallest value which will pass through the hook before getting clipped.","type":"number"},"max":{"description":"The largest value which will pass through the hook before getting clipped.","type":"number"},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"shared-signal-name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"shared-signal-unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"shared-signal-type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"shared-signal-init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"shared-signal-enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"},"hook-lua":{"type":"object","required":["type"],"additionalProperties":{"description":"The Lua hook will pass the complete hook configuration to the `prepare()` Lua function.\nSo you can add arbitrary settings here which are then consumed by the Lua script.\n"},"properties":{"type":{"type":"string","const":"lua"},"use_names":{"type":"boolean","default":true,"description":"Enables or disables the use of signal names in the `process()` Lua function. If disabled, numeric indices will be used."},"script":{"type":"string","description":"Provide the path to a Lua script containing functions for the individual hook points.\nDefine some or all of the following functions in your Lua script:\n\n#### `prepare(cfg)`\n\nCalled during initialization with a Lua table which contains the full hook configuration.\n\n#### `start()`\n\nCalled when the associated node or path is started\n\n#### `stop()`\n\nCalled when the associated node or path is stopped\n\n#### `restart()`\n\nCalled when the associated node or path is restarted.\nFalls back to `stop()` + `start()` if absent.\n\n#### `process(smp)`\n\nCalled for each sample which is being processed.\nThe sample is passed as a Lua table with the following fields:\n\n- `sequence` The sequence number of the sample.\n- `flags` The flags field of the sample.\n- `ts_origin` The origin timestamp as a Lua table containing the following keys:\n| Index | Description |\n|:-- |:-- |\n| 0 | seconds |\n| 1 | nanoseconds |\n\n- `ts_received` The receive timestamp a Lua table containing the following keys:\n| Index | Description |\n|:-- |:-- |\n| 0 | seconds |\n| 1 | nanoseconds |\n\n- `data` The sample data as a Lua table container either numeric indices or the signal names depending on the 'use_names' option of the hook.\n\n#### `periodic()`\n\nCalled periodically with the rate of @ref node-config-stats.\n"},"signals":{"description":"A definition of signals which this hook will emit.\nHere a list of signal definitions like @ref node-config-node-signals is expected.\n","type":"array","items":{"type":"object","required":["expression"],"additionalProperties":{"description":"The Lua hook passes each signal definition to the Lua script.\nYou may add arbitrary custom properties to a signal here which are\nthen available as context to your Lua code (e.g. within `prepare()`\nor `process()`). You are responsible for consuming them in your script.\n"},"properties":{"expression":{"type":"string","example":"math.sqrt(smp.data[0] ^ 2 + smp.data[1] ^ 2)","description":"An arbitrary Lua expression which will be evaluated and used for the value of the signal.\nNote you can access the current sample using the global Lua variable `smp`.\n"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}}}},"priority":{"default":1,"type":"integer","minimum":0}}},"hook-ma":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"ma"},"window_size":{"type":"integer","description":"The size of the window (number of samples) which should be used for the moving average filter.","example":100,"default":0,"minimum":0},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"hook-pmu_dft":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"pmu_dft"},"sample_rate":{"type":"integer","default":0,"minimum":0,"example":10000,"description":"The sampling rate of the input signal."},"start_frequency":{"type":"number","minimum":0,"example":49.7,"description":"The lowest frequency bin."},"end_frequency":{"type":"number","example":50.3,"minimum":0,"description":"The highest frequency bin."},"frequency_resolution":{"type":"number","example":0.1,"minimum":0,"description":"The frequency resolution of the DFT."},"dft_rate":{"type":"integer","example":1,"minimum":1,"description":"The number of phasor calculations performed per second."},"window_size_factor":{"type":"integer","default":1,"description":"A factor that increases the automatically determined window size by a multiplicative factor."},"window_type":{"type":"string","enum":["flattop","hamming","hann","none"],"default":"none","description":"The window type."},"padding_type":{"type":"string","enum":["zero","signal_repeat"],"default":"none","description":"The padding type."},"estimate_type":{"type":"string","enum":["quadratic"],"default":"none","description":"The frequency estimation type."},"pps_index":{"type":"integer","description":"The signal index of the PPS signal. This is only needed if data dumper is active.","default":0},"angle_unit":{"type":"string","enum":["rad","degree"],"default":"rad","description":"The unit of the phase angle."},"add_channel_name":{"type":"boolean","default":false,"description":"Adds the name of the channel as a suffix to the signal name e.g `amplitude_ch1`."},"timestamp_align":{"enum":["left","center","right"],"default":"center","description":"The timestamp alignment in respect to the the window."},"phase_offset":{"type":"number","default":0,"example":10,"description":"An offset added to a calculated phase."},"amplitude_offset":{"type":"number","default":0,"example":10,"description":"An offset added to the calculated amplitude."},"frequency_offset":{"type":"number","default":0,"example":0.2,"description":"An offset added to the calculated frequency."},"rocof_offset":{"type":"number","default":0,"example":1,"description":"An offset added to the calculated RoCoF. This setting does not really make sense but is available for completeness reasons"},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"hook-pps_ts":{"type":"object","required":["type","signal"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"pps_ts"},"mode":{"type":"string","enum":["simple","horizon"],"default":"simple","description":"The synchronization mode. The `horizon` mode is currently no recommended to use as it is not fully tested."},"threshold":{"type":"number","default":1.5,"description":"The signal level threshold of the PPS signal which is used to detect an edge."},"expected_smp_rate":{"type":"number","default":1,"description":"The expected sampling rate of the input signal. Only important for a faster initialization."},"horizon_estimation":{"type":"integer","default":10},"horizon_compensation":{"type":"integer","default":10},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"}}},"hook-print":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"print"},"output":{"type":"string","default":"/dev/stdout","description":"An optional path to a file to which the samples processed by this hook will be written to."},"format":{"default":"villas.human","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"prefix":{"type":"string","default":"","description":"An optional prefix which will be prepended to each line written by this hook to the output"},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-reorder_ts":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"reorder_ts"},"window_size":{"type":"integer","default":16,"minimum":1,"description":"The number of samples buffered for reordering."},"priority":{"default":2,"type":"integer","minimum":0}}},"hook-restart":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"restart"},"priority":{"default":1,"type":"integer","minimum":0}}},"hook-rms":{"type":"object","required":["type","window_size"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"rms"},"window_size":{"type":"integer","description":"The size of the window (number of samples) which should be used for the moving average filter.","example":100,"minimum":1},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"hook-round":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"round"},"precision":{"type":"integer","default":1,"example":4,"description":"The number of decimal digits to which the signal is rounded."},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"hook-scale":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"scale"},"offset":{"type":"number","default":0,"example":100.5,"description":"The offset which is added to the signal after gain."},"scale":{"type":"number","default":1,"example":1000,"description":"The factor by which the signal is multiplied before the offset is added."},"priority":{"default":99,"type":"integer","minimum":0},"signal":{"type":"string","description":"The name of a signal to which this hook should be applied","example":"busA.V"},"signals":{"type":"array","minItems":1,"description":"A list of signal names to which a hook should be applied.","example":["busA.V","busB.V","busC.V"],"items":{"type":"string","description":"The name of a signal to which a hook should be applied."}}},"oneOf":[{"required":["signals"]},{"required":["signal"]}]},"hook-shift_seq":{"type":"object","required":["type","offset"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"shift_seq"},"offset":{"type":"integer","description":"The offset which is added to the sequence number of each processed sample."},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-shift_ts":{"type":"object","required":["type","offset"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"shift_ts"},"mode":{"type":"string","enum":["origin","received"],"description":"The timestamp field which should be adjusted by the `offset` setting."},"offset":{"type":"number","description":"The offset in seconds which is added to the timestamp field of each processed sample."},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-skip_first":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"skip_first"},"samples":{"type":"integer","description":"The number of samples which should be dropped by this hook after a start or restart of the node/path."},"seconds":{"type":"number","description":"The number of seconds for which this hook should initially drop samples after a start or restart of the node/path."},"priority":{"default":99,"type":"integer","minimum":0}},"oneOf":[{"required":["samples"]},{"required":["seconds"]}]},"hook-stats":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"stats"},"format":{"type":"string","enum":["human","json","matlab"]},"buckets":{"type":"integer","default":20,"description":"The number of buckets which should be used for the underlying histograms."},"warmup":{"type":"integer","default":500,"description":"Use the first `warmup` samples to estimate the bucket range of the underlying histograms."},"verbose":{"type":"boolean","default":false,"description":"Include full dumps of the histogram buckets into the output."},"output":{"type":"string","description":"The file where you want to write the report to. If omitted, stdout (the terminal) will be used.","default":"/dev/stdout"},"priority":{"default":99,"type":"integer","minimum":0}}},"hook-ts":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"ts"},"priority":{"default":99,"type":"integer","minimum":0}}},"hook":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}},"shared-hook-list":{"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"shared-signal-description":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"shared-signal-list":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"shared-node-in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"shared-node-netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"shared-node-fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"shared-node-out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"node-amqp":{"title":"Advanced Messaging & Queuing Protocol (AMQP)","type":"object","required":["type","exchange","routing_key"],"properties":{"type":{"type":"string","const":"amqp"},"format":{"$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"uri":{"type":"string","format":"uri","example":"amqp://guest:guest@localhost:5672/","description":"A complete AMQP connection URI.\n\nIf set, it takes precedence over the individual `host`, `port`, `username`, `password` and `vhost` settings, which are otherwise used to construct the URI.\n\nSee also: https://www.rabbitmq.com/uri-spec.html\n"},"host":{"type":"string","default":"localhost","description":"The hostname of the AMQP broker.\nUsed to construct the connection URI when `uri` is not set.\n"},"port":{"type":"integer","default":5672,"description":"The port number of the AMQP broker.\nUsed to construct the connection URI when `uri` is not set.\n"},"username":{"type":"string","default":"guest","description":"The username used for authentication with the AMQP broker.\nUsed to construct the connection URI when `uri` is not set.\n"},"password":{"type":"string","default":"guest","description":"The password used for authentication with the AMQP broker.\nUsed to construct the connection URI when `uri` is not set.\n"},"vhost":{"type":"string","default":"/","description":"The AMQP virtual host.\nUsed to construct the connection URI when `uri` is not set.\n"},"exchange":{"type":"string","description":"The name of the AMQP exchange the node will publish the messages to.\n"},"routing_key":{"type":"string","description":"The routing key of published messages as well as the routing key which is used to bind the subcriber queue.\n"},"ssl":{"description":"Note: These settings are only used if the `uri` setting is using the `amqps://` schema.\n","type":"object","properties":{"verify_hostname":{"type":"boolean","default":true},"verify_peer":{"type":"boolean","default":true},"ca_cert":{"type":"string","description":"Path to a CA certificate file used to verify the broker."},"client_cert":{"type":"string","description":"Path to the client certificate file."},"client_key":{"type":"string","description":"Path to the client private key file."}},"additionalProperties":false},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-c37.118-phasor":{"type":"object","description":"Configuration of a single phasor channel.\n","required":["signal","unit"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this phasor (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the phasor channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","enum":["volt","ampere"],"description":"Physical unit of the phasor.\n"},"component":{"type":"string","default":"phase_a","enum":["zero_sequence","positive_sequence","negative_sequence","phase_a","phase_b","phase_c"],"description":"The phasor component (sequence or phase) that this phasor represents.\n"},"modifications":{"type":"array","uniqueItems":true,"description":"Measurement modifications applied to the phasor (CONFIG3 only).\n","items":{"type":"string","enum":["upsampled_with_interpolation","upsampled_with_extrapolation","downsampled_with_reselection","downsampled_with_fir_filter","downsampled_with_non_fir_filter","filtered_without_resampling","magnitude_adjusted_for_calibration","phase_adjusted_for_calibration","phase_adjusted_for_rotation","pseudo_phasor_value","other"]}}},"additionalProperties":false},"node-c37.118-analog":{"type":"object","description":"Configuration of a single analog channel.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this analog channel (server\ndirection).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the analog channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","default":"point_on_wave","enum":["point_on_wave","rms","peak"],"description":"Type of the analog value.\n"}},"additionalProperties":false},"node-c37.118-digital":{"type":"object","description":"Configuration of a single digital status bit. Every 16 bits form one\ndigital status word.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this bit (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the bit. Defaults to the signal name. Clients using revision\n2005 of the protocol might see the name truncated to 16 characters.\n"},"normal":{"type":"boolean","default":false,"description":"Normal state of the digital status bit.\n"}},"additionalProperties":false},"node-c37.118-pmu":{"type":"object","description":"Configuration of a single PMU.\n","required":["name","frequency","rocof"],"properties":{"name":{"type":"string","maxLength":255,"description":"Station name of the PMU. Clients using revision 2005 of the protocol\nmight see the name truncated to 16 characters.\n"},"idcode":{"type":"integer","default":1,"minimum":0,"maximum":65535,"description":"Data stream ID code of the PMU.\n"},"guid":{"type":"string","format":"uuid","description":"Global PMU identifier. Defaults to the node's UUID.\n"},"nominal_frequency":{"type":"number","enum":[50,60],"default":50,"description":"Nominal line frequency in Hz.\n"},"latitude":{"type":"number","description":"Latitude of the PMU in degrees (CONFIG3 only). Defaults to unknown.\n"},"longitude":{"type":"number","description":"Longitude of the PMU in degrees (CONFIG3 only). Defaults to unknown.\n"},"elevation":{"type":"number","description":"Elevation of the PMU in meters (CONFIG3 only). Defaults to unknown.\n"},"service_class":{"type":"string","default":"measurement","enum":["measurement","protection"],"description":"Performance/service class of the PMU (CONFIG3 only). `measurement`\nmaps to service class M, `protection` to service class P.\n"},"window":{"type":"integer","default":0,"minimum":0,"description":"Phasor measurement window length in microseconds (CONFIG3 only).\n"},"group_delay":{"type":"integer","default":0,"minimum":0,"description":"Phasor measurement group delay in microseconds (CONFIG3 only).\n"},"frequency":{"type":"string","description":"Name of the input signal providing the measured frequency (server\ndirection only).\n"},"rocof":{"type":"string","description":"Name of the input signal providing the rate of change of frequency\n(server direction only).\n"},"phasor":{"type":"array","items":{"type":"object","description":"Configuration of a single phasor channel.\n","required":["signal","unit"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this phasor (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the phasor channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","enum":["volt","ampere"],"description":"Physical unit of the phasor.\n"},"component":{"type":"string","default":"phase_a","enum":["zero_sequence","positive_sequence","negative_sequence","phase_a","phase_b","phase_c"],"description":"The phasor component (sequence or phase) that this phasor represents.\n"},"modifications":{"type":"array","uniqueItems":true,"description":"Measurement modifications applied to the phasor (CONFIG3 only).\n","items":{"type":"string","enum":["upsampled_with_interpolation","upsampled_with_extrapolation","downsampled_with_reselection","downsampled_with_fir_filter","downsampled_with_non_fir_filter","filtered_without_resampling","magnitude_adjusted_for_calibration","phase_adjusted_for_calibration","phase_adjusted_for_rotation","pseudo_phasor_value","other"]}}},"additionalProperties":false},"description":"The phasor channels of the PMU.\n"},"analog":{"type":"array","items":{"type":"object","description":"Configuration of a single analog channel.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this analog channel (server\ndirection).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the analog channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","default":"point_on_wave","enum":["point_on_wave","rms","peak"],"description":"Type of the analog value.\n"}},"additionalProperties":false},"description":"The analog channels of the PMU.\n"},"digital":{"type":"array","items":{"type":"object","description":"Configuration of a single digital status bit. Every 16 bits form one\ndigital status word.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this bit (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the bit. Defaults to the signal name. Clients using revision\n2005 of the protocol might see the name truncated to 16 characters.\n"},"normal":{"type":"boolean","default":false,"description":"Normal state of the digital status bit.\n"}},"additionalProperties":false},"description":"The digital status bits of the PMU. Every 16 bits form one digital\nstatus word.\n"}},"additionalProperties":false},"node-c37_118":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"c37.118"},"in":{"type":"object","required":["address"],"description":"Client (PDC) side. When an address is given, the node connects to a\nremote PMU / PDC, requests its configuration and reads data frames.\n","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"address":{"type":"string","description":"Hostname or IP address of the remote PMU / PDC in the format\n`host[:port]`. The port defaults to the C37.118 port 4712 when\nomitted.\n"},"idcode":{"type":"integer","default":1,"minimum":0,"maximum":65535,"description":"IDCODE placed in the command frames sent to the remote device.\n"}},"additionalProperties":false},"out":{"type":"object","required":["address","data_rate","pmus"],"description":"Server (PMU / PDC) side. When an address is given, the node listens for\na connecting PDC, answers configuration and command frames and streams\ndata frames built from the samples written to the node.\n","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"address":{"type":"string","description":"Local address to bind to in the format `host[:port]`. An empty host\nbinds to all interfaces. The port defaults to the C37.118 port 4712\nwhen omitted.\n"},"idcode":{"type":"integer","default":1,"minimum":0,"maximum":65535,"description":"IDCODE reported in the frames served to the connecting PDC.\n"},"testing":{"type":"boolean","default":false,"description":"Enable \"testing\" mode. This is only intended to be used by our\nintegration tests.\n\nThis causes the server to not discard samples when no client is\nconnected. This option effectively makes the server busy-wait\nfor a client to connect and can easily exhaust the internal\nqueue of sent samples.\n"},"time_base":{"type":"integer","default":1000000,"minimum":1,"maximum":16777215,"description":"Resolution of the fractional second (FRACSEC) timestamp, i.e. the\nnumber of sub-second units per second. The C37.118 TIME_BASE field\nis 24 bits wide, so the value must not exceed 16777215.\n"},"data_rate":{"type":"number","minimum":0.0000305175,"maximum":32767,"description":"Reporting rate in frames per second. Rates below one frame per\nsecond are supported (e.g. 0.5 for one frame every two seconds) and\nare encoded using the C37.118 seconds-per-frame representation.\n"},"pmus":{"type":"array","minItems":1,"items":{"type":"object","description":"Configuration of a single PMU.\n","required":["name","frequency","rocof"],"properties":{"name":{"type":"string","maxLength":255,"description":"Station name of the PMU. Clients using revision 2005 of the protocol\nmight see the name truncated to 16 characters.\n"},"idcode":{"type":"integer","default":1,"minimum":0,"maximum":65535,"description":"Data stream ID code of the PMU.\n"},"guid":{"type":"string","format":"uuid","description":"Global PMU identifier. Defaults to the node's UUID.\n"},"nominal_frequency":{"type":"number","enum":[50,60],"default":50,"description":"Nominal line frequency in Hz.\n"},"latitude":{"type":"number","description":"Latitude of the PMU in degrees (CONFIG3 only). Defaults to unknown.\n"},"longitude":{"type":"number","description":"Longitude of the PMU in degrees (CONFIG3 only). Defaults to unknown.\n"},"elevation":{"type":"number","description":"Elevation of the PMU in meters (CONFIG3 only). Defaults to unknown.\n"},"service_class":{"type":"string","default":"measurement","enum":["measurement","protection"],"description":"Performance/service class of the PMU (CONFIG3 only). `measurement`\nmaps to service class M, `protection` to service class P.\n"},"window":{"type":"integer","default":0,"minimum":0,"description":"Phasor measurement window length in microseconds (CONFIG3 only).\n"},"group_delay":{"type":"integer","default":0,"minimum":0,"description":"Phasor measurement group delay in microseconds (CONFIG3 only).\n"},"frequency":{"type":"string","description":"Name of the input signal providing the measured frequency (server\ndirection only).\n"},"rocof":{"type":"string","description":"Name of the input signal providing the rate of change of frequency\n(server direction only).\n"},"phasor":{"type":"array","items":{"type":"object","description":"Configuration of a single phasor channel.\n","required":["signal","unit"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this phasor (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the phasor channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","enum":["volt","ampere"],"description":"Physical unit of the phasor.\n"},"component":{"type":"string","default":"phase_a","enum":["zero_sequence","positive_sequence","negative_sequence","phase_a","phase_b","phase_c"],"description":"The phasor component (sequence or phase) that this phasor represents.\n"},"modifications":{"type":"array","uniqueItems":true,"description":"Measurement modifications applied to the phasor (CONFIG3 only).\n","items":{"type":"string","enum":["upsampled_with_interpolation","upsampled_with_extrapolation","downsampled_with_reselection","downsampled_with_fir_filter","downsampled_with_non_fir_filter","filtered_without_resampling","magnitude_adjusted_for_calibration","phase_adjusted_for_calibration","phase_adjusted_for_rotation","pseudo_phasor_value","other"]}}},"additionalProperties":false},"description":"The phasor channels of the PMU.\n"},"analog":{"type":"array","items":{"type":"object","description":"Configuration of a single analog channel.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this analog channel (server\ndirection).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the analog channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","default":"point_on_wave","enum":["point_on_wave","rms","peak"],"description":"Type of the analog value.\n"}},"additionalProperties":false},"description":"The analog channels of the PMU.\n"},"digital":{"type":"array","items":{"type":"object","description":"Configuration of a single digital status bit. Every 16 bits form one\ndigital status word.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this bit (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the bit. Defaults to the signal name. Clients using revision\n2005 of the protocol might see the name truncated to 16 characters.\n"},"normal":{"type":"boolean","default":false,"description":"Normal state of the digital status bit.\n"}},"additionalProperties":false},"description":"The digital status bits of the PMU. Every 16 bits form one digital\nstatus word.\n"}},"additionalProperties":false},"description":"The list of PMU configurations served by this node.\n"}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-c37.118-pmu":{"type":"object","description":"Configuration of a single PMU.\n","required":["name","frequency","rocof"],"properties":{"name":{"type":"string","maxLength":255,"description":"Station name of the PMU. Clients using revision 2005 of the protocol\nmight see the name truncated to 16 characters.\n"},"idcode":{"type":"integer","default":1,"minimum":0,"maximum":65535,"description":"Data stream ID code of the PMU.\n"},"guid":{"type":"string","format":"uuid","description":"Global PMU identifier. Defaults to the node's UUID.\n"},"nominal_frequency":{"type":"number","enum":[50,60],"default":50,"description":"Nominal line frequency in Hz.\n"},"latitude":{"type":"number","description":"Latitude of the PMU in degrees (CONFIG3 only). Defaults to unknown.\n"},"longitude":{"type":"number","description":"Longitude of the PMU in degrees (CONFIG3 only). Defaults to unknown.\n"},"elevation":{"type":"number","description":"Elevation of the PMU in meters (CONFIG3 only). Defaults to unknown.\n"},"service_class":{"type":"string","default":"measurement","enum":["measurement","protection"],"description":"Performance/service class of the PMU (CONFIG3 only). `measurement`\nmaps to service class M, `protection` to service class P.\n"},"window":{"type":"integer","default":0,"minimum":0,"description":"Phasor measurement window length in microseconds (CONFIG3 only).\n"},"group_delay":{"type":"integer","default":0,"minimum":0,"description":"Phasor measurement group delay in microseconds (CONFIG3 only).\n"},"frequency":{"type":"string","description":"Name of the input signal providing the measured frequency (server\ndirection only).\n"},"rocof":{"type":"string","description":"Name of the input signal providing the rate of change of frequency\n(server direction only).\n"},"phasor":{"type":"array","items":{"type":"object","description":"Configuration of a single phasor channel.\n","required":["signal","unit"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this phasor (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the phasor channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","enum":["volt","ampere"],"description":"Physical unit of the phasor.\n"},"component":{"type":"string","default":"phase_a","enum":["zero_sequence","positive_sequence","negative_sequence","phase_a","phase_b","phase_c"],"description":"The phasor component (sequence or phase) that this phasor represents.\n"},"modifications":{"type":"array","uniqueItems":true,"description":"Measurement modifications applied to the phasor (CONFIG3 only).\n","items":{"type":"string","enum":["upsampled_with_interpolation","upsampled_with_extrapolation","downsampled_with_reselection","downsampled_with_fir_filter","downsampled_with_non_fir_filter","filtered_without_resampling","magnitude_adjusted_for_calibration","phase_adjusted_for_calibration","phase_adjusted_for_rotation","pseudo_phasor_value","other"]}}},"additionalProperties":false},"description":"The phasor channels of the PMU.\n"},"analog":{"type":"array","items":{"type":"object","description":"Configuration of a single analog channel.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this analog channel (server\ndirection).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the analog channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","default":"point_on_wave","enum":["point_on_wave","rms","peak"],"description":"Type of the analog value.\n"}},"additionalProperties":false},"description":"The analog channels of the PMU.\n"},"digital":{"type":"array","items":{"type":"object","description":"Configuration of a single digital status bit. Every 16 bits form one\ndigital status word.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this bit (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the bit. Defaults to the signal name. Clients using revision\n2005 of the protocol might see the name truncated to 16 characters.\n"},"normal":{"type":"boolean","default":false,"description":"Normal state of the digital status bit.\n"}},"additionalProperties":false},"description":"The digital status bits of the PMU. Every 16 bits form one digital\nstatus word.\n"}},"additionalProperties":false},"node-c37.118-phasor":{"type":"object","description":"Configuration of a single phasor channel.\n","required":["signal","unit"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this phasor (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the phasor channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","enum":["volt","ampere"],"description":"Physical unit of the phasor.\n"},"component":{"type":"string","default":"phase_a","enum":["zero_sequence","positive_sequence","negative_sequence","phase_a","phase_b","phase_c"],"description":"The phasor component (sequence or phase) that this phasor represents.\n"},"modifications":{"type":"array","uniqueItems":true,"description":"Measurement modifications applied to the phasor (CONFIG3 only).\n","items":{"type":"string","enum":["upsampled_with_interpolation","upsampled_with_extrapolation","downsampled_with_reselection","downsampled_with_fir_filter","downsampled_with_non_fir_filter","filtered_without_resampling","magnitude_adjusted_for_calibration","phase_adjusted_for_calibration","phase_adjusted_for_rotation","pseudo_phasor_value","other"]}}},"additionalProperties":false},"node-c37.118-analog":{"type":"object","description":"Configuration of a single analog channel.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this analog channel (server\ndirection).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the analog channel. Defaults to the signal name. Clients using\nrevision 2005 of the protocol might see the name truncated to 16\ncharacters.\n"},"unit":{"type":"string","default":"point_on_wave","enum":["point_on_wave","rms","peak"],"description":"Type of the analog value.\n"}},"additionalProperties":false},"node-c37.118-digital":{"type":"object","description":"Configuration of a single digital status bit. Every 16 bits form one\ndigital status word.\n","required":["signal"],"properties":{"signal":{"type":"string","description":"Name of the input signal mapped to this bit (server direction).\n"},"name":{"type":"string","maxLength":255,"description":"Name of the bit. Defaults to the signal name. Clients using revision\n2005 of the protocol might see the name truncated to 16 characters.\n"},"normal":{"type":"boolean","default":false,"description":"Normal state of the digital status bit.\n"}},"additionalProperties":false}}},"node-can-signal":{"type":"object","properties":{"can_id":{"type":"integer","default":0},"can_size":{"type":"integer","default":8},"can_offset":{"type":"integer","default":0},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-can":{"type":"object","required":["type","interface_name"],"properties":{"type":{"type":"string","const":"can"},"interface_name":{"type":"string","description":"Name of the Socket CAN interface"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","properties":{"can_id":{"type":"integer","default":0},"can_size":{"type":"integer","default":8},"can_offset":{"type":"integer","default":0},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","properties":{"can_id":{"type":"integer","default":0},"can_size":{"type":"integer","default":8},"can_offset":{"type":"integer","default":0},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-can-signal":{"type":"object","properties":{"can_id":{"type":"integer","default":0},"can_size":{"type":"integer","default":8},"can_offset":{"type":"integer","default":0},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-comedi-signal":{"type":"object","required":["channel","range","aref"],"properties":{"channel":{"type":"integer"},"range":{"type":"integer"},"aref":{"type":"integer"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-comedi":{"title":"Comedi-compatible DAQ/ADC cards","type":"object","required":["type","device"],"properties":{"type":{"type":"string","const":"comedi"},"device":{"type":"string","description":"The path to the Comedi device file.","example":"/dev/comedi0"},"in":{"type":"object","required":["rate","signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"subdevice":{"type":"integer","description":"The Comedi subdevice number. Auto-detected if not specified."},"bufsize":{"type":"integer","default":16,"description":"The size of the Comedi buffer in kilobytes."},"rate":{"type":"integer","description":"The sampling rate in Hertz."},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","minItems":1,"items":{"type":"object","required":["channel","range","aref"],"properties":{"channel":{"type":"integer"},"range":{"type":"integer"},"aref":{"type":"integer"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","required":["rate","signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"subdevice":{"type":"integer","description":"The Comedi subdevice number. Auto-detected if not specified."},"bufsize":{"type":"integer","default":16,"description":"The size of the Comedi buffer in kilobytes."},"rate":{"type":"integer","description":"The sampling rate in Hertz."},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","minItems":1,"items":{"type":"object","required":["channel","range","aref"],"properties":{"channel":{"type":"integer"},"range":{"type":"integer"},"aref":{"type":"integer"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-comedi-signal":{"type":"object","required":["channel","range","aref"],"properties":{"channel":{"type":"integer"},"range":{"type":"integer"},"aref":{"type":"integer"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-ethercat":{"title":"Send and receive samples over an EtherCAT connection","type":"object","required":["type"],"properties":{"type":{"type":"string","const":"ethercat"},"rate":{"type":"number","default":1000,"description":"The cyclic rate in Hertz at which process data is exchanged."},"in":{"type":"object","required":["num_channels"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"num_channels":{"type":"integer","default":8},"range":{"type":"number","default":10},"position":{"type":"integer","default":2},"product_code":{"type":"integer"},"vendor_id":{"type":"integer"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","required":["num_channels"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"num_channels":{"type":"integer","default":8},"range":{"type":"number","default":10},"position":{"type":"integer","default":1},"product_code":{"type":"integer"},"vendor_id":{"type":"integer"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-example":{"title":"Example Node","type":"object","required":["type"],"properties":{"type":{"type":"string","const":"example"},"setting1":{"type":"integer","minimum":0,"maximum":100,"default":72,"description":"A first setting"},"setting2":{"type":"string","minimum":0,"maximum":10,"default":"something","description":"Another setting"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-exec":{"title":"Exec","type":"object","required":["type","exec"],"properties":{"type":{"type":"string","const":"exec"},"format":{"default":"villas.human","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"shell":{"type":"boolean","default":false,"description":"If set, the `exec` setting gets passed the shell (`/usr/bin`).\nIn this case the `exec` setting must be given as a string.\n\nIf not set, we will directly execute the sub-process via `execvpe(2)`.\nIn this case the exec setting must be given as an array (`argv[]`).\n"},"exec":{"description":"The program which should be executed in the sub-process.\n\nThe option is passed to the system shell for execution.\n","oneOf":[{"type":"array","minItems":1,"items":{"type":"string"}},{"type":"string"}]},"flush":{"type":"boolean","default":true,"description":"Flush stream every time VILLASnode passes data the sub-process.\n"},"working_directory":{"type":"string","description":"If set, the working directory for the sub-process will be changed.\n"},"environment":{"type":"object","description":"A object of key/value pairs of environment variables which should be passed to the sub-process in addition to the parent environment.\n","additionalProperties":{"type":"string"}},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-file":{"title":"File","type":"object","required":["type","uri"],"properties":{"type":{"type":"string","const":"file"},"format":{"default":"villas.human","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"uri":{"type":"string","description":"Specifies the path to a local file which is written to or read from depending on which group (`in` or `out`) is used.\n\nThis setting allows to add special placeholders for time and date values.\nSee [strftime(3)](http://man7.org/linux/man-pages/man3/strftime.3.html) for a list of supported placeholder.\n\n**Example**:\n\n```\nuri = \"logs/measurements_%Y-%m-%d_%H-%M-%S.log\"\n```\n\nwill create a file called:\n\n```\n./logs/measurements_2015-08-09_22-20-50.log\n```\n"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"epoch":{"type":"number"},"epoch_mode":{"type":"string","enum":["direct","wait","relative","absolute","original"],"description":"The *epoch* describes the point in time when the first message will be read from the file.\nThis setting allows to select the behavior of the following `epoch` setting.\nIt can be used to adjust the point in time when the first value should be read.\n\nThe behavior of `epoch` is depending on the value of `epoch_mode`.\n\nTo facilitate the following description of supported `epoch_mode`'s, we will introduce some intermediate variables (timestamps).\nThose variables will also been displayed during the startup phase of the server to simplify debugging.\n\n- `epoch` is the value of the `epoch` setting.\n- `first` is the timestamp of the first message / line in the input file.\n- `offset` will be added to the timestamps in the file to obtain the real time when the message will be sent.\n- `start` is the point in time when the first message will be sent (`first + offset`).\n- `eta` the time to wait until the first message will be send (`start - now`)\n\nThe supported values for `epoch_mode`:\n\n| `epoch_mode` \t| `offset` \t\t| `start = first + offset` |\n| :--\t\t| :--\t\t\t| :-- |\n| `direct` \t| `now - first + epoch` \t| `now + epoch` |\n| `wait` \t| `now + epoch` \t\t| `now + first` |\n| `relative` \t| `epoch` \t\t| `first + epoch` |\n| `absolute` \t| `epoch - first` \t| `epoch` |\n| `original` \t| `0` \t\t\t| immediately |\n"},"rate":{"type":"number","default":0,"description":"By default `send_rate` has the value `0` which means that the time between consecutive samples is the same as in the `in` file based on the timestamps in the first column.\n\nIf this setting has a non-zero value, the default behavior is overwritten with a fixed rate.\n"},"eof":{"type":"string","default":"exit","enum":["rewind","wait","exit","stop"],"description":"Defines the behavior if the end of file of the input file is reached.\n\n- `rewind` will rewind the file pointer and restart reading samples from the beginning of the file.\n- `exit` will terminated the program.\n- `wait` will periodically test if there are new samples which have been appended to the file.\n"},"buffer_size":{"type":"integer","minimum":0,"default":0,"description":"Similar to the [`out.buffer_size` setting](#out-buffer_size). This means that the data is loaded into the buffer before it is passed on to the node.\n\nIf `in.buffer_size = 0`, no buffer will be generated.\n"},"skip":{"type":"integer","minimum":0,"default":0,"description":"The number of lines which should be skipped at the beginning of the input file.\n"}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"flush":{"type":"boolean","description":"With this setting enabled, the outgoing file is flushed whenever new samples have been written to it.\n"},"buffer_size":{"type":"integer","default":0,"minimum":0,"description":"If this is set to a positive value ``, the node will generate a full [stream buffer](https://linux.die.net/man/3/setvbuf) with a size of `` bytes. This means that the data is buffered and not written until the buffer is full or until the node is stopped.\n\nIf `out.buffer_size = 0`, no buffer will be generated.\n"}},"additionalProperties":false}},"additionalProperties":false},"node-fpga":{"title":"VILLASfpga node-type","type":"object","required":["type","card"],"properties":{"type":{"type":"string","const":"fpga"},"card":{"description":"The FPGA card to use for this node.\nEither the name of a card defined elsewhere, or an inline card definition object.\n","oneOf":[{"type":"string","description":"The name of the FPGA card."},{"allOf":[{"description":"FPGA Card configuration","type":"object","required":["interface"],"properties":{"interface":{"type":"string","enum":["pcie","platform"]},"name":{"type":"string"},"ips":{"type":"string"},"affinity":{"type":"integer"},"do_reset":{"type":"boolean"},"slot":{"type":"string"},"id":{"type":"string"},"polling":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"reverse":{"type":"boolean"}},"additionalProperties":false}},"ignore_ips":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},{"required":["name"]}]}]},"connect":{"type":"array","description":"A list of connect strings describing the internal FPGA IP interconnections.","items":{"type":"string"}},"low_latency_mode":{"type":"boolean","description":"Enables low-latency mode using scatter-gather DMA."},"timestep":{"type":"number","default":0.01,"description":"The simulation timestep in seconds."},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-iec60870-5-104-signal":{"type":"object","required":["ioa"],"properties":{"asdu_type":{"description":"Human readable names for the supported IEC60870 message types.","type":"string","enum":["single-point","double-point","scaled-int","normalized-float","short-float"]},"with_timestamp":{"description":"Only for use with the human readable asdu_type.","type":"boolean","default":false},"asdu_type_id":{"description":"The IEC60870 standard type id.","type":"string","enum":["M_SP_NA_1","M_SP_TB_1","M_DP_NA_1","M_DP_TB_1","M_ME_NB_1","M_ME_TB_1","M_ME_NA_1","M_ME_TA_1","M_ME_NC_1","M_ME_TC_1"]},"ioa":{"description":"The IEC60870 information object address associated with this signal.","type":"integer","minimum":1},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-iec60870-5-104":{"title":"IEC 60870-5-104","type":"object","required":["type"],"properties":{"type":{"type":"string","const":"iec60870-5-104"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"address":{"type":"string","default":"localhost","description":"Hostname or IP address for the IEC60870 slave to listen on.\n"},"port":{"type":"integer","default":2404,"description":"Port number of the IEC60870 slave.\n"},"ca":{"type":"integer","default":1,"description":"Common Address of the IEC60870 slave.\n"},"low_priority_queue":{"type":"integer","default":100,"description":"Message queue size for the periodic messages (increase on dropped simulation data messages).\n"},"high_priority_queue":{"type":"integer","default":100,"description":"Message queue size for interrogation responses (increase on missing signals in interrogation response).\n"},"apci_t0":{"type":"integer"},"apci_t1":{"type":"integer"},"apci_t2":{"type":"integer"},"apci_t3":{"type":"integer"},"apci_k":{"type":"integer"},"apci_w":{"type":"integer"},"out":{"type":"object","required":["signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"duplicate_ioa_is_sequence":{"type":"boolean","default":false,"description":"Treat consecutive signals with the same IOA as a sequence by assigning subsequent IOAs.\n"},"signals":{"type":"array","items":{"type":"object","required":["ioa"],"properties":{"asdu_type":{"description":"Human readable names for the supported IEC60870 message types.","type":"string","enum":["single-point","double-point","scaled-int","normalized-float","short-float"]},"with_timestamp":{"description":"Only for use with the human readable asdu_type.","type":"boolean","default":false},"asdu_type_id":{"description":"The IEC60870 standard type id.","type":"string","enum":["M_SP_NA_1","M_SP_TB_1","M_DP_NA_1","M_DP_TB_1","M_ME_NB_1","M_ME_TB_1","M_ME_NA_1","M_ME_TA_1","M_ME_NC_1","M_ME_TC_1"]},"ioa":{"description":"The IEC60870 information object address associated with this signal.","type":"integer","minimum":1},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-iec60870-5-104-signal":{"type":"object","required":["ioa"],"properties":{"asdu_type":{"description":"Human readable names for the supported IEC60870 message types.","type":"string","enum":["single-point","double-point","scaled-int","normalized-float","short-float"]},"with_timestamp":{"description":"Only for use with the human readable asdu_type.","type":"boolean","default":false},"asdu_type_id":{"description":"The IEC60870 standard type id.","type":"string","enum":["M_SP_NA_1","M_SP_TB_1","M_DP_NA_1","M_DP_TB_1","M_ME_NB_1","M_ME_TB_1","M_ME_NA_1","M_ME_TA_1","M_ME_NC_1","M_ME_TC_1"]},"ioa":{"description":"The IEC60870 information object address associated with this signal.","type":"integer","minimum":1},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-iec61850-8-1-publisher-data":{"type":"object","required":["mms_type"],"properties":{"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Basic data type of the value in the transmitted array.\n"},"signal":{"type":"string","description":"Name of the input signal for the value.\n"},"value":{"type":["integer","number","boolean"],"description":"Constant signal value.\n"},"mms_bitstring_size":{"type":"integer","default":32,"description":"Size metadata for mms_type bitstring.\n"}},"additionalProperties":false},"node-iec61850-8-1-key":{"type":"object","required":["id","security","signature"],"properties":{"id":{"type":"integer","description":"Numeric identifier of the session key.\n"},"security":{"type":"string","enum":["aes_128_gcm","aes_256_gcm","none"],"description":"Security (encryption) algorithm for the session key.\n"},"signature":{"type":"string","enum":["aes_gmac_64","aes_gmac_128","hmac_sha256_80","hmac_sha256_128","hmac_sha256_256","hmac_sha3_80","hmac_sha3_128","hmac_sha3_256","none"],"description":"Signature algorithm for the session key.\n"},"string":{"type":"string","description":"The key material as a raw string. Mutually exclusive with 'base64'.\n"},"base64":{"type":"string","description":"The key material as a base64 encoded string. Mutually exclusive with 'string'.\n"}},"additionalProperties":false},"node-iec61850-8-1-subscriber-signal":{"type":"object","required":["subscriber","index","mms_type"],"properties":{"subscriber":{"type":"string","description":"Name of the subscriber (see 'subscribers') this signal is mapped to.\n"},"index":{"type":"integer","description":"Index within the received GOOSE event array.\n"},"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Expected basic data type in received array.\n"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-iec61850-8-1-subscriber":{"type":"object","required":["go_cb_ref"],"properties":{"go_cb_ref":{"type":"string"},"dst_address":{"type":"string"},"app_id":{"type":"integer"},"trigger":{"type":"string","enum":["always","change"],"default":"always"}},"additionalProperties":false},"node-iec61850-8-1-publisher":{"type":"object","required":["go_cb_ref","data_set_ref","app_id","conf_rev","time_allowed_to_live","data"],"properties":{"go_id":{"type":"string"},"go_cb_ref":{"type":"string"},"data_set_ref":{"type":"string"},"dst_address":{"type":"string"},"app_id":{"type":"integer"},"conf_rev":{"type":"integer"},"time_allowed_to_live":{"type":"integer"},"burst":{"type":"integer","default":1},"data":{"type":"array","items":{"type":"object","required":["mms_type"],"properties":{"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Basic data type of the value in the transmitted array.\n"},"signal":{"type":"string","description":"Name of the input signal for the value.\n"},"value":{"type":["integer","number","boolean"],"description":"Constant signal value.\n"},"mms_bitstring_size":{"type":"integer","default":32,"description":"Size metadata for mms_type bitstring.\n"}},"additionalProperties":false}}},"additionalProperties":false},"node-iec61850-8-1":{"title":"IEC 61850-8-1 (GOOSE)","type":"object","required":["type"],"properties":{"type":{"type":"string","const":"iec61850-8-1"},"keys":{"type":"array","description":"Session keys used for R-GOOSE (routed GOOSE).\n","items":{"type":"object","required":["id","security","signature"],"properties":{"id":{"type":"integer","description":"Numeric identifier of the session key.\n"},"security":{"type":"string","enum":["aes_128_gcm","aes_256_gcm","none"],"description":"Security (encryption) algorithm for the session key.\n"},"signature":{"type":"string","enum":["aes_gmac_64","aes_gmac_128","hmac_sha256_80","hmac_sha256_128","hmac_sha256_256","hmac_sha3_80","hmac_sha3_128","hmac_sha3_256","none"],"description":"Signature algorithm for the session key.\n"},"string":{"type":"string","description":"The key material as a raw string. Mutually exclusive with 'base64'.\n"},"base64":{"type":"string","description":"The key material as a base64 encoded string. Mutually exclusive with 'string'.\n"}},"additionalProperties":false}},"in":{"type":"object","required":["subscribers","signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","required":["subscriber","index","mms_type"],"properties":{"subscriber":{"type":"string","description":"Name of the subscriber (see 'subscribers') this signal is mapped to.\n"},"index":{"type":"integer","description":"Index within the received GOOSE event array.\n"},"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Expected basic data type in received array.\n"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"subscribers":{"type":"object","additionalProperties":{"type":"object","required":["go_cb_ref"],"properties":{"go_cb_ref":{"type":"string"},"dst_address":{"type":"string"},"app_id":{"type":"integer"},"trigger":{"type":"string","enum":["always","change"],"default":"always"}},"additionalProperties":false}},"routed":{"type":"boolean","default":false,"description":"Use R-GOOSE (routed GOOSE) instead of layer 2 GOOSE.\n"},"local_address":{"type":"string","default":"localhost","description":"Local address to bind to for R-GOOSE.\n"},"local_port":{"type":"integer","default":102,"description":"Local port to bind to for R-GOOSE.\n"},"multicast_groups":{"type":"array","items":{"type":"string"},"description":"Multicast groups to join for R-GOOSE.\n"},"interface":{"type":"string","default":"lo","description":"Name of the ethernet interface to receive on (layer 2 GOOSE).\n"},"with_timestamp":{"type":"boolean","default":true}},"additionalProperties":false},"out":{"type":"object","required":["publishers"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"publishers":{"type":"array","items":{"type":"object","required":["go_cb_ref","data_set_ref","app_id","conf_rev","time_allowed_to_live","data"],"properties":{"go_id":{"type":"string"},"go_cb_ref":{"type":"string"},"data_set_ref":{"type":"string"},"dst_address":{"type":"string"},"app_id":{"type":"integer"},"conf_rev":{"type":"integer"},"time_allowed_to_live":{"type":"integer"},"burst":{"type":"integer","default":1},"data":{"type":"array","items":{"type":"object","required":["mms_type"],"properties":{"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Basic data type of the value in the transmitted array.\n"},"signal":{"type":"string","description":"Name of the input signal for the value.\n"},"value":{"type":["integer","number","boolean"],"description":"Constant signal value.\n"},"mms_bitstring_size":{"type":"integer","default":32,"description":"Size metadata for mms_type bitstring.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"routed":{"type":"boolean","default":false,"description":"Use R-GOOSE (routed GOOSE) instead of layer 2 GOOSE.\n"},"local_address":{"type":"string","default":"localhost","description":"Local address to bind to for R-GOOSE.\n"},"local_port":{"type":"integer","default":0,"description":"Local port to bind to for R-GOOSE.\n"},"remote_address":{"type":"string","default":"localhost","description":"Remote address to send to for R-GOOSE.\n"},"remote_port":{"type":"integer","default":102,"description":"Remote port to send to for R-GOOSE.\n"},"key_id":{"type":"integer","description":"The id of the session key (see 'keys') to use for R-GOOSE.\n"},"interface":{"type":"string","default":"lo","description":"Name of the ethernet interface to send on (layer 2 GOOSE).\n"},"resend_interval":{"type":"number","description":"Time interval for periodic resend of last sample in floating point seconds.\n"}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-iec61850-8-1-key":{"type":"object","required":["id","security","signature"],"properties":{"id":{"type":"integer","description":"Numeric identifier of the session key.\n"},"security":{"type":"string","enum":["aes_128_gcm","aes_256_gcm","none"],"description":"Security (encryption) algorithm for the session key.\n"},"signature":{"type":"string","enum":["aes_gmac_64","aes_gmac_128","hmac_sha256_80","hmac_sha256_128","hmac_sha256_256","hmac_sha3_80","hmac_sha3_128","hmac_sha3_256","none"],"description":"Signature algorithm for the session key.\n"},"string":{"type":"string","description":"The key material as a raw string. Mutually exclusive with 'base64'.\n"},"base64":{"type":"string","description":"The key material as a base64 encoded string. Mutually exclusive with 'string'.\n"}},"additionalProperties":false},"node-iec61850-8-1-subscriber":{"type":"object","required":["go_cb_ref"],"properties":{"go_cb_ref":{"type":"string"},"dst_address":{"type":"string"},"app_id":{"type":"integer"},"trigger":{"type":"string","enum":["always","change"],"default":"always"}},"additionalProperties":false},"node-iec61850-8-1-subscriber-signal":{"type":"object","required":["subscriber","index","mms_type"],"properties":{"subscriber":{"type":"string","description":"Name of the subscriber (see 'subscribers') this signal is mapped to.\n"},"index":{"type":"integer","description":"Index within the received GOOSE event array.\n"},"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Expected basic data type in received array.\n"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-iec61850-8-1-publisher":{"type":"object","required":["go_cb_ref","data_set_ref","app_id","conf_rev","time_allowed_to_live","data"],"properties":{"go_id":{"type":"string"},"go_cb_ref":{"type":"string"},"data_set_ref":{"type":"string"},"dst_address":{"type":"string"},"app_id":{"type":"integer"},"conf_rev":{"type":"integer"},"time_allowed_to_live":{"type":"integer"},"burst":{"type":"integer","default":1},"data":{"type":"array","items":{"type":"object","required":["mms_type"],"properties":{"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Basic data type of the value in the transmitted array.\n"},"signal":{"type":"string","description":"Name of the input signal for the value.\n"},"value":{"type":["integer","number","boolean"],"description":"Constant signal value.\n"},"mms_bitstring_size":{"type":"integer","default":32,"description":"Size metadata for mms_type bitstring.\n"}},"additionalProperties":false}}},"additionalProperties":false},"node-iec61850-8-1-publisher-data":{"type":"object","required":["mms_type"],"properties":{"mms_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","bitstring","float32","float64"],"description":"Basic data type of the value in the transmitted array.\n"},"signal":{"type":"string","description":"Name of the input signal for the value.\n"},"value":{"type":["integer","number","boolean"],"description":"Constant signal value.\n"},"mms_bitstring_size":{"type":"integer","default":32,"description":"Size metadata for mms_type bitstring.\n"}},"additionalProperties":false}}},"node-iec61850-9-2-signal":{"type":"object","properties":{"iec_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","int64u","float32","float64","enumerated","coded_enum","octet_string","visible_string","objectname","objectreference","timestamp","entrytime","bitstring"]},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-iec61850-9-2":{"title":"IEC 61850-9-2 (Sampled Values)","type":"object","required":["type","interface"],"properties":{"type":{"type":"string","const":"iec61850-9-2"},"interface":{"type":"string","description":"Name of network interface to/from which this node will publish/subscribe for SV frames."},"app_id":{"type":"integer","default":16384},"dst_address":{"type":"string","default":"01:0c:cd:01:00:01"},"in":{"type":"object","required":["signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"check_dst_address":{"type":"boolean","default":false},"signals":{"type":"array","minItems":1,"items":{"type":"object","properties":{"iec_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","int64u","float32","float64","enumerated","coded_enum","octet_string","visible_string","objectname","objectreference","timestamp","entrytime","bitstring"]},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","required":["signals","sv_id"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","minItems":1,"items":{"type":"object","properties":{"iec_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","int64u","float32","float64","enumerated","coded_enum","octet_string","visible_string","objectname","objectreference","timestamp","entrytime","bitstring"]},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"sv_id":{"type":"string"},"conf_rev":{"type":"integer"},"smp_mod":{"type":"string","enum":["per_nominal_period","samples_per_second","seconds_per_sample"]},"smp_synch":{"type":"string","enum":["not_synchronized","local_clock","global_clock"]},"smp_rate":{"type":"integer"},"vlan":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"id":{"type":"integer","default":0},"priority":{"type":"integer","default":4}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-iec61850-9-2-signal":{"type":"object","properties":{"iec_type":{"type":"string","enum":["boolean","int8","int16","int32","int64","int8u","int16u","int32u","int64u","float32","float64","enumerated","coded_enum","octet_string","visible_string","objectname","objectreference","timestamp","entrytime","bitstring"]},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-infiniband":{"title":"InfiniBand (RDMA) node-type","type":"object","required":["type"],"properties":{"type":{"type":"string","const":"infiniband"},"rdma_transport_mode":{"type":"string","enum":["RC","UC","UD"],"default":"RC","description":"This specifies the type of connection the node will set up.\n\n* `RC` provides reliable, connection-oriented, message based communication between the nodes. Packets are delivered in order. In this mode, one Queue Pair is connected to one other Queue Pair.\n* `UC` provides unreliable, connection-oriented, message based communication between the nodes. This service type is not officially supported by the RDMA communication manager and is implemented for scientific purposes in VILLASnode. [The InfiniBand node-type source code provides information on how to enable this service type.](https://git.rwth-aachen.de/acs/public/villas/node/blob/master/lib/nodes/infiniband.c#L429)\n* `UD` provides unreliable, connection-less, datagram communication between nodes. Both ordering and delivery are not guaranteed in this mode.\n\n`RC`, `UC`, and `UD` are mapped to the Queue Pair types as `RDMA_PS_TCP`/`IBV_QPT_RC`, `RDMA_PS_IPOIB`/`IBV_QPT_UC`, and `RDMA_PS_UDP`/`IBV_QPT_UD`, respectively.\nIf two nodes should be connected, both should be set to the same `rdma_transport_mode`.\n\nMore information on these two modes can be found on the manual page for [`rdma_create_id()`](https://linux.die.net/man/3/rdma_create_id).\n"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"address":{"type":"string","description":"Connections between `infiniband` nodes are established over IP over IB (IPoIP).\nTo use this node, you have to make sure that the linux driver `ib_ipoib` is loaded.\nIf it is not loaded, load it with `modprobe ib_ipoib`.\n\nIf it is loaded, you have to make sure that the Host Channel Adapters (HCAs) have an IP address.\nYou can configure the IP address of the Infiniband HCA with the `ifconfig` utility, exactly like you would configure normal Ethernet adapters.\n\nAs soon as an IP is set for the local HCA, this entry can be used to point to the adapter and to define the port which will be used for connection related communication.\n\n**Example**:\n\n```\nin = {\n address=\"10.0.0.1:1337\"\n}\n```\n\nbinds the node to the local device which is bound to `10.0.0.1`. It will use port `1337` for communication related to the connection.\n"},"max_wrs":{"type":"integer","default":128,"description":"Before a packet can be received with Infiniband, the application has to describe how this will be handled (e.g., to what address the data will be written).\nThis happens in a so called Work Request (WR).\n\n`in.max_wrs` sets the maximum number of receive Work Requests which can be posted to the receive queue of the Queue Pair.\n\nFor higher throughput, it is recommended to increase this value since it will serve as a buffer.\n"},"cq_size":{"type":"integer","default":128,"description":"This value defines the number of Work Completions the Completion Queue can hold.\n\nIf a packet is received, the Queue Pair will write a Work Completion to the Completion Queue.\nThe node polls this queue to process received packets. If the Completion Queue gets full, which is often caused by `cq_size` being to small, and thus the receive queue is not able to post Work Completions, the node will abort.\n\nIf a connection is disconnected, all outstanding Work Requests—even is they are not used—are flushed to the Completion Queue.\nHere applies the same as mentioned above: if the Completion Queue has fewer space left than outstanding Work Requests are available, this will result in an error.\n\nIt is therefor recommended to set the value of `cq_size` to at least\n\n```\nin.cq_size >= in.max_wrs - in.buffer_subtraction\n```\n"},"buffer_subtraction":{"type":"integer","default":16,"description":"As mentioned in the `in.max_wrs` settings, Work Requests have to be present in the receive queue, for it to be able to process received data.\nTo take full advantage of the zero-copy capabilities of Infiniband this node-type directly posts addresses from the VILLASnode to the receive queue instead of copying all data over after receiving it.\n\nThis technique relies on the exchange of addresses. This means that if an array of `in.vectorize` addresses is handed over to the node-type, max `release` <= `in.vectorize` addresses that point to received data can be returned.\n\nFurthermore, if `release` addresses should be returned, `release` addresses from the original array must be posted to the receive queue.\nTo ensure that we can always post at least `in.vectorize` new samples to the receive queue, `in.buffer_subtraction` must always be bigger than `in.vectorize`.\n\nA second factor is performance: if `in.buffer_subtraction` is too small it might take long before the node starts to process data since it has to fill almost the complete queue first.\nIf `in.buffer_subtraction` is too big, the receive buffer might be too small.\n\nThus, the maximum number of Work Requests to be present in the receive queue is defined as follows:\n\n```c\nmax_wrs_posted = in.max_wrs - in.buffer_subtraction\n```\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"address":{"type":"string","description":"This value defines the IPoIB address of the remote node and is used to establish a connection to the remote host—in case of `RDMA_PS_TCP`—or to get the address handle of the remote host—in case of `RDMA_PS_UDP`.\n\nThis is similar to `in.address`.\n\n`out.address` has no default value and if it is not defined the node will be set to listening mode and all `out` configuration will be ignored.\n\n**Example**:\n\n```\nout = {\n address = \"10.0.0.1:1337\"\n}\n```\n"},"resolution_timeout":{"type":"integer","default":1000,"description":"This defines the time in milliseconds [`rdma_resolve_addr()`](https://linux.die.net/man/3/rdma_resolve_addr) waits for the resolution of the destination address to complete.\n"},"max_wrs":{"type":"integer","default":128,"description":"This is similar to `in.max_wrs` but for the send side of the Queue Pair.\nIn contrast to the receive queue, there is no minimum amount of Work Requests in this queue and it can be filled up completely to `out.max_wrs`.\n"},"cq_size":{"type":"integer","default":128,"description":"This is similar to `in.cq_size`.\n\nAn important side note for the receive completion queue was that it should be able to hold all Work Requests if the receive queue is flushed.\nSince no \"preparatory\" Work Requests are posted to the send queue and and thus all work requests are send out as soon as possible, there is no need for `out.cq_size` to be as big as `out.max_wrs`.\n"},"send_inline":{"type":"boolean","default":true,"description":"It is possible that the CPU copies the data to be sent directly to the HCA.\nThen, the HCA can take the data from it's internal memory as soon as it is ready to send it.\nThis has the advantage that the buffer can be returned immediately to the VILLASnode and that it increases performance.\n\nIf this flag is set, the [`infiniband`](../nodes/infiniband.md) node-type checks if a sample is small enough to be sent inline, and if this is the case sends it inline.\n"},"max_inline_data":{"type":"integer","default":0,"description":"This value represents the maximum number of bytes to be send inline.\nThe maximum number of this value depends on the HCA.\nThe settings defaults to zero. However, many HCAs will automatically adjust it to 60.\n\n*Important note*: The greater this value gets, the smaller `out.max_wrs` can be. If `out.max_inline_data` is too big for the number specified in `out.max_wrs`, the node will return an error that the Queue Pair could not be created.\nSince this is different for various HCAs, it is not possible for us to give more specified errors.\n\n**Example**:\n\n```\nout = {\n send_inline = 1,\n max_inline_data = 60\n}\n```\n\nEvery sample which is smaller than 60 bytes will be send inline. All other samples will be sent normally.\n"},"use_fallback":{"type":"boolean","default":true,"description":"If an out section with a valid remote entry is present in the configuration file, the node will first bind to the local host channel adapter and subsequentially try to connect to the remote host.\nIf the latter fails (e.g., because the remote host was not reachable or rejected the connection), there are two possible outcomes: the node can throw an error and abort or it can show a warning and continue in listening mode.\n\nIf `use_fallback = true`, the node will fallback to listening mode if it is not able to connect to the remote host.\n"},"periodic_signaling":{"type":"integer","default":"","description":"If a sample is sent inline, no Completion Queue Entry (CQE) is generated.\nHowever, once a while, a CQE must be generated to prevent the Send Queue from overflowing.\nTherefore, every `out.periodic_signaling`th sample will be sent normally with signaling.\n\nIt turns out that the ideal value in most cases is `out.max_wrs / 2`.\nHence, usually, it is not necessary to explicitly set this value.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-influxdb":{"title":"InfluxDB","type":"object","required":["type","server","key"],"properties":{"type":{"type":"string","const":"influxdb"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"server":{"type":"string","description":"A hostname/port combination of the InfluxDB database server."},"key":{"type":"string","description":"The key is the measurement name and any optional tags separated by commas.\n\nSee also: [InfluxDB documentation](https://docs.influxdata.com/influxdb/v0.9/write_protocols/line/#key).\n"},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-kafka":{"type":"object","required":["type","server","protocol"],"properties":{"type":{"type":"string","const":"kafka"},"format":{"default":"villas.binary","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"server":{"type":"string","description":"The bootstrap server `{ip}:{port}` of the Kafka message brokers cluster.\n"},"protocol":{"type":"string","enum":["PLAINTEXT","SASL_PLAINTEXT","SASL_SSL","SSL"],"description":"The [security protocol](https://kafka.apache.org/24/javadoc/org/apache/kafka/common/security/auth/SecurityProtocol.html) which is used for authentication with the Kafka cluster.\n"},"client_id":{"type":"string","default":"villas-node","description":"The Kafka client identifier."},"timeout":{"type":"number","description":"A timeout in seconds for the broker connection.","default":1},"ssl":{"type":"object","required":["ca"],"properties":{"ca":{"type":"string","description":"Path to a Certificate Authority (CA) bundle which is used to validate broker server certificate."}},"additionalProperties":false},"sasl":{"type":"object","description":"An object for configuring the SASL authentication against the broker.\nThis setting is used if the `protocol` setting is on of `SASL_PLAINTEXT` or `SASL_SSL`.\n","required":["mechanisms","username","password"],"properties":{"mechanisms":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}},"additionalProperties":false},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"consume":{"type":"string","description":"The Kafka topic to which this node-type will subscribe for receiving messages."},"group_id":{"type":"string","description":"The group id of the Kafka client used for receiving messages."},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"produce":{"type":"string","description":"The Kafka topic to which this node-type will publish messages."},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-loopback":{"title":"Loopback","type":"object","required":["type"],"properties":{"type":{"type":"string","const":"loopback"},"queuelen":{"type":"integer","minimum":0,"description":"The queue length of the internal queue which buffers the samples."},"mode":{"type":"string","enum":["pthread","polling","eventfd","auto"],"default":"auto","description":"Specify the synchronization mode of the internal queue."},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-modbus-signal":{"type":"object","required":["address"],"properties":{"address":{"type":"integer","description":"The modbus register address."},"integer_registers":{"type":"integer","description":"The number of consecutive registers combined into a single integer value.\n","minimum":1,"maximum":4},"word_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of two modbus registers joined together to form a larger number.","default":"big"},"byte_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of the bytes within a modbus register.","default":"big"},"scale":{"type":"number","description":"The scale of the register's value.","default":1},"offset":{"type":"number","description":"The offset of the register's value.","default":0},"bit":{"type":"integer","description":"The bit index within a register.","minimum":0,"maximum":15},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-modbus":{"title":"Read and write Modbus registers","type":"object","required":["type","transport"],"properties":{"type":{"type":"string","const":"modbus"},"transport":{"type":"string","description":"The transport protocol used for Modbus communication.","enum":["tcp","rtu"]},"response_timeout":{"type":"number","description":"The timeout in seconds when waiting for responses from a Modbus server.","default":1,"example":1},"reconnect_interval":{"type":"number","description":"The interval in seconds for trying to reconnect on connection loss.","default":10},"min_block_usage":{"type":"number","description":"The minimum ratio of used registers to queried registers for a merged block of registers.\nThis caps the amount of unnecessary data transmitted.\n","default":0.25},"max_block_size":{"type":"integer","description":"The maximum size (in registers) of a merged block of register mappings.","default":32},"rate":{"type":"number","description":"The rate at which Modbus device registers are queried for changes.","example":1},"remote":{"type":"string","description":"The hostname or IP of the Modbus TCP device. Only used with `transport = tcp`.","example":"example.com"},"port":{"type":"integer","description":"The port number of the Modbus TCP device. Only used with `transport = tcp`.","default":502},"device":{"type":"string","description":"Path to the serial device file. Only used with `transport = rtu`.","example":"/dev/ttyS0"},"baudrate":{"type":"integer","description":"The baudrate used for serial communication. Only used with `transport = rtu`.","example":9600},"parity":{"type":"string","enum":["none","even","odd"],"description":"The parity used for serial communication. Only used with `transport = rtu`.","example":"none"},"data_bits":{"type":"integer","description":"The data bits used for serial communication. Only used with `transport = rtu`.","minimum":5,"maximum":8,"example":5},"stop_bits":{"type":"integer","description":"The stop bits used for serial communication. Only used with `transport = rtu`.","minimum":1,"maximum":2,"example":1},"unit":{"type":"integer","description":"The addressed unit used for communication. Optional for TCP.","minimum":0,"maximum":65535,"example":1},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","required":["address"],"properties":{"address":{"type":"integer","description":"The modbus register address."},"integer_registers":{"type":"integer","description":"The number of consecutive registers combined into a single integer value.\n","minimum":1,"maximum":4},"word_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of two modbus registers joined together to form a larger number.","default":"big"},"byte_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of the bytes within a modbus register.","default":"big"},"scale":{"type":"number","description":"The scale of the register's value.","default":1},"offset":{"type":"number","description":"The offset of the register's value.","default":0},"bit":{"type":"integer","description":"The bit index within a register.","minimum":0,"maximum":15},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","required":["address"],"properties":{"address":{"type":"integer","description":"The modbus register address."},"integer_registers":{"type":"integer","description":"The number of consecutive registers combined into a single integer value.\n","minimum":1,"maximum":4},"word_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of two modbus registers joined together to form a larger number.","default":"big"},"byte_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of the bytes within a modbus register.","default":"big"},"scale":{"type":"number","description":"The scale of the register's value.","default":1},"offset":{"type":"number","description":"The offset of the register's value.","default":0},"bit":{"type":"integer","description":"The bit index within a register.","minimum":0,"maximum":15},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-modbus-signal":{"type":"object","required":["address"],"properties":{"address":{"type":"integer","description":"The modbus register address."},"integer_registers":{"type":"integer","description":"The number of consecutive registers combined into a single integer value.\n","minimum":1,"maximum":4},"word_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of two modbus registers joined together to form a larger number.","default":"big"},"byte_endianess":{"type":"string","enum":["big","little"],"description":"The ordering of the bytes within a modbus register.","default":"big"},"scale":{"type":"number","description":"The scale of the register's value.","default":1},"offset":{"type":"number","description":"The offset of the register's value.","default":0},"bit":{"type":"integer","description":"The bit index within a register.","minimum":0,"maximum":15},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-mqtt":{"type":"object","required":["type","host"],"properties":{"type":{"type":"string","const":"mqtt"},"format":{"default":"json","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"username":{"type":"string","description":"The username which is used for authentication with the MQTT broker."},"password":{"type":"string","description":"The password which is used for authentication with the MQTT broker."},"host":{"type":"string","description":"The hostname of the MQTT broker.","example":"example.com"},"port":{"type":"integer","description":"The port number of the MQTT broker.","default":1883},"retain":{"type":"boolean","description":"Set to true to make the will a retained message.","default":false},"keepalive":{"type":"integer","default":5,"description":"The MQTT keepalive value."},"qos":{"type":"integer","default":0,"description":"The quality of service (QoS) to use for the subscription."},"ssl":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"insecure":{"type":"boolean"},"cafile":{"type":"string","description":"Path to a file containing the PEM encoded trusted CA certificate file."},"capath":{"type":"string","description":"Path to a directory containing the PEM encoded trusted CA certificate files."},"certfile":{"type":"string","description":"Path to a file containing the PEM encoded certificate file for this client."},"keyfile":{"type":"string","description":"Path to a file containing the PEM encoded private key for this client."},"cipher":{"type":"string","description":"A string describing the ciphers available for use. See the `openssl ciphers` tool for more information."},"verify":{"type":"boolean","default":true,"description":"Configure verification of the server hostname in the server certificate.\nIf value is set to true, it is impossible to guarantee that the host you are connecting to is not impersonating your server.\nThis can be useful in initial server testing, but makes it possible for a malicious third party to impersonate your server through DNS spoofing, for example.\nDo not use this function in a real system.\nSetting value to true makes the connection encryption pointless.\n"},"tls_version":{"type":"string","enum":["tlsv1","tlsv1.1","tlsv1.2"],"description":"The version of the SSL/TLS protocol to use as a string.\nIf not set, the default value is used. The default value and the available values depend on the version of openssl that the library was compiled against.\nFor openssl >= 1.0.1, the available options are tlsv1.2, tlsv1.1 and tlsv1, with tlv1.2 as the default.\nFor openssl < 1.0.1, only tlsv1 is available.\n"}},"additionalProperties":false},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"subscribe":{"type":"string","description":"Topic to which this node subscribes."},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"publish":{"type":"string","description":"Topic to which this node publishes."},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-nanomsg":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"nanomsg"},"format":{"default":"json","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"endpoints":{"description":"A single endpoint URI or list of URIs to which this node should connect as a subscriber.","oneOf":[{"type":"string","format":"uri"},{"type":"array","items":{"type":"string","format":"uri"}}]},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"endpoints":{"description":"A single endpoint URI or list of URIs on which this node should listen for subscribers.","oneOf":[{"type":"string","format":"uri"},{"type":"array","items":{"type":"string","format":"uri"}}]},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-ngsi-signal":{"type":"object","properties":{"ngsi_attribute_name":{"type":"string","description":"Name of the NGSI attribute this signal is mapped to.\nDefaults to the signal name.\n"},"ngsi_attribute_type":{"type":"string","description":"Type of the NGSI attribute this signal is mapped to.\nDefaults to the signal unit.\n"},"ngsi_metadatas":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-ngsi":{"title":"FIWARE NGSI 9/10","type":"object","required":["type","endpoint","entity_id","entity_type"],"properties":{"type":{"type":"string","const":"ngsi"},"endpoint":{"type":"string","format":"uri"},"entity_id":{"type":"string","description":"ID of NGSI entity."},"entity_type":{"type":"string","description":"Type of NGSI entity."},"ssl_verify":{"type":"boolean","default":true,"description":"Verify SSL certificate against local trust store."},"timeout":{"description":"Timeout in seconds for HTTP requests.","type":"number","default":1},"rate":{"description":"Polling rate in Hz for requesting entity updates from broker.","type":"number","default":1},"access_token":{"type":"string","description":"Send 'Auth-Token' header with every HTTP request."},"create":{"type":"boolean","default":true,"description":"Create NGSI entities during startup of node."},"delete":{"type":"boolean","default":true,"description":"Remove NGSI entities during shutdown of node."},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","properties":{"ngsi_attribute_name":{"type":"string","description":"Name of the NGSI attribute this signal is mapped to.\nDefaults to the signal name.\n"},"ngsi_attribute_type":{"type":"string","description":"Type of the NGSI attribute this signal is mapped to.\nDefaults to the signal unit.\n"},"ngsi_metadatas":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","properties":{"ngsi_attribute_name":{"type":"string","description":"Name of the NGSI attribute this signal is mapped to.\nDefaults to the signal name.\n"},"ngsi_attribute_type":{"type":"string","description":"Type of the NGSI attribute this signal is mapped to.\nDefaults to the signal unit.\n"},"ngsi_metadatas":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-ngsi-signal":{"type":"object","properties":{"ngsi_attribute_name":{"type":"string","description":"Name of the NGSI attribute this signal is mapped to.\nDefaults to the signal name.\n"},"ngsi_attribute_type":{"type":"string","description":"Type of the NGSI attribute this signal is mapped to.\nDefaults to the signal unit.\n"},"ngsi_metadatas":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-opal_async":{"title":"OPAL-RT Asynchronous Process","type":"object","required":["type","id"],"properties":{"type":{"type":"string","const":"opal.async"},"id":{"description":"The Send/Recv ID of the RT-Lab OpAsyncSend/Recv blocks.","minimum":1,"default":1,"type":"integer"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"reply":{"description":"Send a confirmation to the Simulink model that signals have been received and processed.","default":false,"type":"boolean"}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"opal-orchestra-connection-local":{"type":"object","properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"extcomm":{"type":"string","default":"none","enum":["udp","tcp","none"],"description":"Type of external communication protocol helper which should be started."},"addr_framework":{"type":"string","description":"The IP address of the target on which the framework is running."},"port_framework":{"type":"integer","minimum":0,"maximum":65535,"description":"The port on which the framework will be reachable."},"nic_framework":{"type":"string","description":"The network interface that the framework will use to communicate with the client."},"nic_client":{"type":"string","description":"The network interface that the client will use to communicate with the framework."},"core_framework":{"type":"integer","minimum":0,"description":"The core on which the tool of the framework is running. The index starts at 0."},"core_client":{"type":"integer","minimum":0,"description":"The core on which the tool of the client is running. The index starts at 0."}},"additionalProperties":false},"opal-orchestra-connection-remote":{"type":"object","required":["card","pci_index"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"card":{"type":"string","example":"VMIPCI5565-64M","description":"Type of reflective memory card used for a remote connection."},"pci_index":{"type":"integer","minimum":1,"description":"PCI index that corresponds to the communication card used for remote connection."}},"additionalProperties":false},"opal-orchestra-connection-dolphin":{"type":"object","required":["node_id_framework","segment_id"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"node_id_framework":{"type":"integer","minimum":4,"maximum":4096,"description":"Node ID for Dolphin node which hosts the Orchestra framework."},"segment_id":{"type":"integer","minimum":1,"maximum":65535,"description":"Segment ID used to uniquely identify the framework domain. Note that another segment ID is automatically calculated outside of this range to identify the client segment."}},"additionalProperties":false},"opal-orchestra-connection":{"type":"object","description":"Configuration of the connection to the OPAL-RT Orchestra framework.\n","required":["type"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"}},"discriminator":{"propertyName":"type","mapping":{"local":"#/components/schemas/opal-orchestra-connection-local","remote":"#/components/schemas/opal-orchestra-connection-remote","dolphin":"#/components/schemas/opal-orchestra-connection-dolphin"}},"oneOf":[{"type":"object","properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"extcomm":{"type":"string","default":"none","enum":["udp","tcp","none"],"description":"Type of external communication protocol helper which should be started."},"addr_framework":{"type":"string","description":"The IP address of the target on which the framework is running."},"port_framework":{"type":"integer","minimum":0,"maximum":65535,"description":"The port on which the framework will be reachable."},"nic_framework":{"type":"string","description":"The network interface that the framework will use to communicate with the client."},"nic_client":{"type":"string","description":"The network interface that the client will use to communicate with the framework."},"core_framework":{"type":"integer","minimum":0,"description":"The core on which the tool of the framework is running. The index starts at 0."},"core_client":{"type":"integer","minimum":0,"description":"The core on which the tool of the client is running. The index starts at 0."}},"additionalProperties":false},{"type":"object","required":["card","pci_index"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"card":{"type":"string","example":"VMIPCI5565-64M","description":"Type of reflective memory card used for a remote connection."},"pci_index":{"type":"integer","minimum":1,"description":"PCI index that corresponds to the communication card used for remote connection."}},"additionalProperties":false},{"type":"object","required":["node_id_framework","segment_id"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"node_id_framework":{"type":"integer","minimum":4,"maximum":4096,"description":"Node ID for Dolphin node which hosts the Orchestra framework."},"segment_id":{"type":"integer","minimum":1,"maximum":65535,"description":"Segment ID used to uniquely identify the framework domain. Note that another segment ID is automatically calculated outside of this range to identify the client segment."}},"additionalProperties":false}],"additionalProperties":true},"node-opal_orchestra-signal":{"type":"object","properties":{"orchestra_name":{"type":"string","description":"Name of the corresponding Orchestra data item. Defaults to the VILLAS signal name."},"orchestra_type":{"type":"string","enum":["boolean","unsigned int8","unsigned int16","unsigned int32","unsigned int64","int8","int16","int32","int64","float32","float64","bus"],"description":"Type of the corresponding Orchestra data item. Defaults to a type derived from the VILLAS signal type."},"orchestra_index":{"type":"integer","minimum":0,"description":"Index of this signal within the Orchestra data item (for bus/array items)."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-opal_orchestra":{"title":"OPAL-RT Orchestra","type":"object","required":["type","domain"],"properties":{"type":{"type":"string","const":"opal.orchestra"},"domain":{"type":"string","description":"The name of the domain to which the connection is requested. This domain must exist in the DDF read by an RT-LAB subsystem."},"synchronous":{"type":"boolean","description":"Determines whether domain participants exchange simulation data synchronously or asynchronously."},"states":{"type":"boolean"},"connection":{"type":"object","description":"Configuration of the connection to the OPAL-RT Orchestra framework.\n","required":["type"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"}},"discriminator":{"propertyName":"type","mapping":{"local":"#/components/schemas/opal-orchestra-connection-local","remote":"#/components/schemas/opal-orchestra-connection-remote","dolphin":"#/components/schemas/opal-orchestra-connection-dolphin"}},"oneOf":[{"type":"object","properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"extcomm":{"type":"string","default":"none","enum":["udp","tcp","none"],"description":"Type of external communication protocol helper which should be started."},"addr_framework":{"type":"string","description":"The IP address of the target on which the framework is running."},"port_framework":{"type":"integer","minimum":0,"maximum":65535,"description":"The port on which the framework will be reachable."},"nic_framework":{"type":"string","description":"The network interface that the framework will use to communicate with the client."},"nic_client":{"type":"string","description":"The network interface that the client will use to communicate with the framework."},"core_framework":{"type":"integer","minimum":0,"description":"The core on which the tool of the framework is running. The index starts at 0."},"core_client":{"type":"integer","minimum":0,"description":"The core on which the tool of the client is running. The index starts at 0."}},"additionalProperties":false},{"type":"object","required":["card","pci_index"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"card":{"type":"string","example":"VMIPCI5565-64M","description":"Type of reflective memory card used for a remote connection."},"pci_index":{"type":"integer","minimum":1,"description":"PCI index that corresponds to the communication card used for remote connection."}},"additionalProperties":false},{"type":"object","required":["node_id_framework","segment_id"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"node_id_framework":{"type":"integer","minimum":4,"maximum":4096,"description":"Node ID for Dolphin node which hosts the Orchestra framework."},"segment_id":{"type":"integer","minimum":1,"maximum":65535,"description":"Segment ID used to uniquely identify the framework domain. Note that another segment ID is automatically calculated outside of this range to identify the client segment."}},"additionalProperties":false}],"additionalProperties":true},"ddf":{"type":"string","description":"The path to the DDF file that describes the data exchanged in the specified domain."},"connect_timeout":{"default":"5s","description":"The duration after which a failed connection attempt times out.","oneOf":[{"type":"string","description":"Duration as a string, e.g., \"1h30m\", \"45s\", \"200ms\".\n","pattern":"^(\\d+(d|h|ms|us|ns|m|s))+$","examples":["6d23h30m50s40ms","45s","2d200ms"]},{"type":"integer","description":"Duration as integer.\n","minimum":0,"examples":[5400000,45000,200]}]},"flag_delay":{"default":"0s","description":"Forces the local Orchestra communication to be made with flags instead of semaphores when using an external communication process. Flags are recommended for better performance: they are faster but also more CPU-consuming.","oneOf":[{"type":"string","description":"Duration as a string, e.g., \"1h30m\", \"45s\", \"200ms\".\n","pattern":"^(\\d+(d|h|ms|us|ns|m|s))+$","examples":["6d23h30m50s40ms","45s","2d200ms"]},{"type":"integer","description":"Duration as integer.\n","minimum":0,"examples":[5400000,45000,200]}]},"flag_delay_tool":{"description":"Forces the local Orchestra communication to be made with flags instead of semaphores when using an external communication process. Flags are recommended for better performance: they are faster but also more CPU-consuming.","oneOf":[{"type":"string","description":"Duration as a string, e.g., \"1h30m\", \"45s\", \"200ms\".\n","pattern":"^(\\d+(d|h|ms|us|ns|m|s))+$","examples":["6d23h30m50s40ms","45s","2d200ms"]},{"type":"integer","description":"Duration as integer.\n","minimum":0,"examples":[5400000,45000,200]}]},"skip_wait_to_go":{"type":"boolean","default":false,"description":"Sets the WaitToGo setting of the model. When true, VILLASnode ignores the WaitToGo during the connection step. When false, VILLASnode performs the WaitToGo during the connection step."},"ddf_overwrite":{"type":"boolean","default":false,"description":"If true, the DDF file provided in the 'dff' setting will be overwriting with settings and signals from the VILLASnode configuration."},"ddf_overwrite_only":{"type":"boolean","default":false,"description":"If true, VILLASnode will overwrite the file provided in the 'ddf' setting, and terminate immediately afterwards."},"rate":{"type":"number","default":1,"description":"In asynchronous mode (see 'synchronous' setting), this rate defines how often per second the data exchange with the Orchestra domain takes place."},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","properties":{"orchestra_name":{"type":"string","description":"Name of the corresponding Orchestra data item. Defaults to the VILLAS signal name."},"orchestra_type":{"type":"string","enum":["boolean","unsigned int8","unsigned int16","unsigned int32","unsigned int64","int8","int16","int32","int64","float32","float64","bus"],"description":"Type of the corresponding Orchestra data item. Defaults to a type derived from the VILLAS signal type."},"orchestra_index":{"type":"integer","minimum":0,"description":"Index of this signal within the Orchestra data item (for bus/array items)."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","properties":{"orchestra_name":{"type":"string","description":"Name of the corresponding Orchestra data item. Defaults to the VILLAS signal name."},"orchestra_type":{"type":"string","enum":["boolean","unsigned int8","unsigned int16","unsigned int32","unsigned int64","int8","int16","int32","int64","float32","float64","bus"],"description":"Type of the corresponding Orchestra data item. Defaults to a type derived from the VILLAS signal type."},"orchestra_index":{"type":"integer","minimum":0,"description":"Index of this signal within the Orchestra data item (for bus/array items)."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"opal-orchestra-connection":{"type":"object","description":"Configuration of the connection to the OPAL-RT Orchestra framework.\n","required":["type"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"}},"discriminator":{"propertyName":"type","mapping":{"local":"#/components/schemas/opal-orchestra-connection-local","remote":"#/components/schemas/opal-orchestra-connection-remote","dolphin":"#/components/schemas/opal-orchestra-connection-dolphin"}},"oneOf":[{"type":"object","properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"extcomm":{"type":"string","default":"none","enum":["udp","tcp","none"],"description":"Type of external communication protocol helper which should be started."},"addr_framework":{"type":"string","description":"The IP address of the target on which the framework is running."},"port_framework":{"type":"integer","minimum":0,"maximum":65535,"description":"The port on which the framework will be reachable."},"nic_framework":{"type":"string","description":"The network interface that the framework will use to communicate with the client."},"nic_client":{"type":"string","description":"The network interface that the client will use to communicate with the framework."},"core_framework":{"type":"integer","minimum":0,"description":"The core on which the tool of the framework is running. The index starts at 0."},"core_client":{"type":"integer","minimum":0,"description":"The core on which the tool of the client is running. The index starts at 0."}},"additionalProperties":false},{"type":"object","required":["card","pci_index"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"card":{"type":"string","example":"VMIPCI5565-64M","description":"Type of reflective memory card used for a remote connection."},"pci_index":{"type":"integer","minimum":1,"description":"PCI index that corresponds to the communication card used for remote connection."}},"additionalProperties":false},{"type":"object","required":["node_id_framework","segment_id"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"node_id_framework":{"type":"integer","minimum":4,"maximum":4096,"description":"Node ID for Dolphin node which hosts the Orchestra framework."},"segment_id":{"type":"integer","minimum":1,"maximum":65535,"description":"Segment ID used to uniquely identify the framework domain. Note that another segment ID is automatically calculated outside of this range to identify the client segment."}},"additionalProperties":false}],"additionalProperties":true},"opal-orchestra-connection-local":{"type":"object","properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"extcomm":{"type":"string","default":"none","enum":["udp","tcp","none"],"description":"Type of external communication protocol helper which should be started."},"addr_framework":{"type":"string","description":"The IP address of the target on which the framework is running."},"port_framework":{"type":"integer","minimum":0,"maximum":65535,"description":"The port on which the framework will be reachable."},"nic_framework":{"type":"string","description":"The network interface that the framework will use to communicate with the client."},"nic_client":{"type":"string","description":"The network interface that the client will use to communicate with the framework."},"core_framework":{"type":"integer","minimum":0,"description":"The core on which the tool of the framework is running. The index starts at 0."},"core_client":{"type":"integer","minimum":0,"description":"The core on which the tool of the client is running. The index starts at 0."}},"additionalProperties":false},"opal-orchestra-connection-remote":{"type":"object","required":["card","pci_index"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"card":{"type":"string","example":"VMIPCI5565-64M","description":"Type of reflective memory card used for a remote connection."},"pci_index":{"type":"integer","minimum":1,"description":"PCI index that corresponds to the communication card used for remote connection."}},"additionalProperties":false},"opal-orchestra-connection-dolphin":{"type":"object","required":["node_id_framework","segment_id"],"properties":{"type":{"description":"The type of connection to the OPAL-RT Orchestra framework.","type":"string"},"node_id_framework":{"type":"integer","minimum":4,"maximum":4096,"description":"Node ID for Dolphin node which hosts the Orchestra framework."},"segment_id":{"type":"integer","minimum":1,"maximum":65535,"description":"Segment ID used to uniquely identify the framework domain. Note that another segment ID is automatically calculated outside of this range to identify the client segment."}},"additionalProperties":false},"node-opal_orchestra-signal":{"type":"object","properties":{"orchestra_name":{"type":"string","description":"Name of the corresponding Orchestra data item. Defaults to the VILLAS signal name."},"orchestra_type":{"type":"string","enum":["boolean","unsigned int8","unsigned int16","unsigned int32","unsigned int64","int8","int16","int32","int64","float32","float64","bus"],"description":"Type of the corresponding Orchestra data item. Defaults to a type derived from the VILLAS signal type."},"orchestra_index":{"type":"integer","minimum":0,"description":"Index of this signal within the Orchestra data item (for bus/array items)."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-opendss":{"title":"Interface to OpenDSS, EPRI's Distribution System Simulator","type":"object","required":["type","in","out"],"properties":{"type":{"type":"string","const":"opendss"},"file_path":{"type":"string","description":"Specifies the URI to a OpenDSS file.\n"},"in":{"type":"object","required":["list"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"list":{"type":"array","items":{"type":"object","required":["name","type","data"],"properties":{"name":{"type":"string","description":"Name of the element.\n"},"type":{"type":"string","description":"Type of the element.\n"},"data":{"type":"array","description":"Data to be input. Possible options depend on the element type.\n","items":{"type":"string"}}},"oneOf":[{"title":"Load or generator","properties":{"type":{"type":"string","enum":["load","generator"]},"data":{"type":"array","items":{"enum":["kV","kW","kVar","Pf"]}}},"additionalProperties":true},{"title":"Current source","properties":{"type":{"type":"string","const":"isource"},"data":{"type":"array","items":{"enum":["Amps","AngleDeg","Frequency"]}}},"additionalProperties":true}],"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","required":["list"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"list":{"description":"Names of the monitors to be read.\n","type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false},"node-redis":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"redis"},"format":{"default":"json","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"mode":{"type":"string","enum":["key","set-get","hash","hset-hget","channel","pub-sub"],"default":"key","description":"- `key`: [Get](https://redis.io/commands/get)/[Set](https://redis.io/commands/set) of [Redis strings](https://redis.io/topics/data-types#strings)\n - The implementation uses the Redis `MSET` and `MGET` commands.\n- `hash`: Hashtables using [hash data-type](https://redis.io/topics/data-types#hashes)\n - The implementation uses the Redis `HMSET` and `HGETALL` commands.\n- `channel`: [Publish/subscribe](https://redis.io/topics/pubsub)\n - The implementation uses the Redis `PUBLISH` and `SUBSCRIBE` commands.\n"},"uri":{"type":"string","format":"uri","description":"A Redis connection URI in the form of: `redis://:@:/`.\n"},"host":{"type":"string","default":"localhost","description":"The hostname or IP address of the Redis server.\n\nYou can also connect to Redis server with a URI:\n\n- `tcp://[[username:]password@]host[:port][/db]`\n- `unix://[[username:]password@]path-to-unix-domain-socket[/db]`\n"},"port":{"type":"integer","description":"The port number of the Redis server to connect to.","default":6379},"path":{"type":"string","description":"A path of a Unix socket which should be used for the connection."},"user":{"type":"string","default":"default","description":"The username which should be used for authentication.\n\nSee: https://redis.io/commands/auth\n"},"password":{"type":"string","description":"The password which should be used for authentication.\n\nSee: https://redis.io/commands/auth\n"},"db":{"type":"integer","default":0,"description":"The logical database which should be used by the Redis client.\n\nSee: https://redis.io/commands/select\n"},"timeout":{"type":"object","properties":{"connect":{"type":"number","description":"The timeout in seconds for the initial connection establishment."},"socket":{"type":"number","description":"The timeout in seconds for executing commands against the Redis server."}},"additionalProperties":false},"keepalive":{"type":"boolean","default":false,"description":"Enable periodic keepalive packets."},"rate":{"type":"number","description":"The rate in Hertz at which this node polls the Redis server for new values."},"key":{"type":"string","default":"","description":"The key which this node will use in the Redis keyspace."},"channel":{"type":"string","default":"","description":"The channel which this node will use when `mode` setting is `channel`."},"notify":{"type":"boolean","default":true,"description":"Use [Redis keyspace notifications](https://redis.io/topics/notifications) to listen for new updates.\nThis setting is only used if setting `mode` is set to `key` or `hash`.\n"},"ssl":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"If enabled the connection to the Redis server will be encrypted via SSL/TLS."},"cacert":{"type":"string","description":"A path to a CA certificate file."},"cacertdir":{"type":"string","description":"A path to a directory containing CA certificates."},"cert":{"type":"string","description":"A path to a client certificate file."},"key":{"type":"string","description":"A path to the private key file."}},"additionalProperties":false},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-rtp":{"type":"object","required":["type","in","out"],"properties":{"type":{"type":"string","const":"rtp"},"format":{"default":"villas.binary","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"rtcp":{"type":"boolean","description":"Enable Real-time Control Protocol (RTCP)"},"aimd":{"type":"object","properties":{"a":{"type":"number","default":10},"b":{"type":"number","default":0.5},"Kp":{"type":"number","default":1},"Ki":{"type":"number","default":0},"Kd":{"type":"number","default":0},"rate_min":{"type":"number","default":1},"rate_source":{"type":"number","default":2000},"rate_init":{"type":"number"},"log":{"type":"string"},"hook_type":{"type":"string","default":"disabled","enum":["decimate","limit_rate","disabled"]}},"additionalProperties":false},"in":{"type":"object","required":["address"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"address":{"type":"string","description":"The local address and port number this node should listen for incoming packets.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","required":["address"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"address":{"type":"string","description":"The remote address and port number to which this node will send data.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-shmem":{"title":"Shared Memory","type":"object","required":["type","in","out"],"properties":{"type":{"type":"string","const":"shmem"},"queuelen":{"type":"integer","default":"","description":"Length of the input and output queues in elements."},"mode":{"type":"string","default":"pthread","enum":["pthread","polling"],"description":"If set to `pthread`, POSIX condition variables (CV) are used to signal writes between processes.\nIf set to `polling`, no CV's are used, meaning that blocking writes have to be implemented using polling, leading to performance improvements at a cost of unnecessary CPU usage.\n"},"exec":{"description":"Optional name and command-line arguments (as passed to `execve`) of a command to be executed during node startup.\nThis can be used to start the external program directly from VILLASNode. If unset, no command is executed.\n","type":"array","items":{"type":"string"}},"in":{"type":"object","required":["name"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"name":{"type":"string","description":"Name of the POSIX shared memory object.\nMust start with a forward slash (/).\nThe same name should be passed to the external program somehow in its configuration or command-line arguments.\n"}},"additionalProperties":false},"out":{"type":"object","required":["name"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}},"name":{"type":"string","description":"Name of the POSIX shared memory object.\nMust start with a forward slash (/).\nThe same name should be passed to the external program somehow in its configuration or command-line arguments.\n"}},"additionalProperties":false}},"additionalProperties":false},"node-signal-type":{"type":"string","enum":["random","sine","square","triangle","ramp","counter","constant","mixed","pulse"]},"node-signal-value":{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]},"node-signal":{"title":"Signal Generator","type":"object","required":["type","signal"],"properties":{"type":{"type":"string","const":"signal"},"signal":{"description":"The type of signal which should be generated.\n\nA single value is applied to all generated signals, or an array with one\nentry per signal may be given (its length must then match `values`).\n\n- `random`: a random walk with normal distributed step sizes will be generated.\n- `sine`: a sine signal will be generated.\n- `square`: a square / rectangle wave will be generated.\n- `triangle`: a triangle wave will be generated.\n- `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`.\n- `counter`: increasing integer counter is generated.\n- `constant`: a constant value generated.\n- `mixed`: the signals of of each sample are generated by cycling over all remaining signal types.\n- `pulse`: generates pulses with a set frequency, phase and width\n","oneOf":[{"type":"string","enum":["random","sine","square","triangle","ramp","counter","constant","mixed","pulse"]},{"type":"array","items":{"type":"string","enum":["random","sine","square","triangle","ramp","counter","constant","mixed","pulse"]}}]},"values":{"type":"integer","default":1,"description":"The number of signals which each of the generated samples should contain."},"rate":{"type":"number","description":"The rate at which sample should be generated by the node.","default":10},"amplitude":{"default":1,"description":"The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`.","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"frequency":{"default":1,"description":"The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`.","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"phase":{"default":0,"description":"Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`.","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"pulse_width":{"default":1,"description":"The width of the pulse, with respect to the rate","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"pulse_low":{"default":0,"description":"The low value of the pulse signal.","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"pulse_high":{"default":1,"description":"The high value of the pulse signal.","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"stddev":{"default":0.2,"description":"The standard deviation of the normal distributed steps if the `signal` setting is set to `random`.","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"offset":{"default":0,"description":"Adds a constant offset to each of the generated signals.","allOf":[{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}]},"limit":{"type":"integer","default":-1,"description":"Limit the number of generated output samples by this node-type.\nA negative number disables the limitation.\n"},"realtime":{"type":"boolean","default":true,"description":"Wait `1 / rate` seconds between emitting each sample."},"monitor_missed":{"type":"boolean","default":true,"description":"If `true`, the `signal` node-type will count missed steps and warn the user during every iteration about missed steps.\nEspecially at high rates, it can be beneficial for performance to set this flag to `false`.\nWarnings would namely cause system calls which will slow the node down even more, and thus cause even more missed steps.\n"},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-signal-type":{"type":"string","enum":["random","sine","square","triangle","ramp","counter","constant","mixed","pulse"]},"node-signal-value":{"description":"A single value which is applied to all generated signals, or an array\nwith one value per signal (its length must then match `values`).\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}}},"node-signal_v2-signal":{"type":"object","required":["signal"],"properties":{"signal":{"type":"string","enum":["random","sine","square","triangle","ramp","counter","constant","mixed","pulse"],"description":"The type of signal which should be generated:\n\n- `random`: a random walk with normal distributed step sizes will be generated.\n- `sine`: a sine signal will be generated.\n- `square`: a square / rectangle wave will be generated.\n- `triangle`: a triangle wave will be generated.\n- `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`.\n- `counter`: increasing integer counter is generated.\n- `constant`: a constant value generated.\n- `mixed`: the signals of of each sample are generated by cycling over all remaining signal types.\n- `pulse`: generates pulses with a set frequency, phase and width\n"},"amplitude":{"type":"number","description":"The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`.","default":1},"frequency":{"type":"number","description":"The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`.","default":1},"phase":{"type":"number","default":0,"description":"Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`."},"pulse_width":{"type":"number","default":1,"description":"The width of the pulse, with respect to the rate"},"pulse_low":{"type":"number","default":0,"description":"The low value of the pulse signal."},"pulse_high":{"type":"number","default":1,"description":"The high value of the pulse signal."},"stddev":{"type":"number","default":0.2,"description":"The standard deviation of the normal distributed steps if the `signal` setting is set to `random`."},"offset":{"type":"number","default":0,"description":"Adds a constant offset to each of the generated signals."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-signal_v2":{"title":"Signal Generator (v2)","type":"object","required":["type","in"],"properties":{"type":{"type":"string","const":"signal.v2"},"realtime":{"type":"boolean","default":true,"description":"Pace the generation of samples by the `rate` setting."},"limit":{"type":"integer","default":-1,"description":"Stop the node after the provided number of samples."},"rate":{"type":"number","default":10,"description":"The rate at which the samples are generated if operating in real-time mode (See `realtime` option)."},"monitor_missed":{"type":"boolean","default":true,"description":"Raise warnings if the signal generator fails to operate in real-time due to missed deadlines."},"in":{"type":"object","required":["signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","required":["signal"],"properties":{"signal":{"type":"string","enum":["random","sine","square","triangle","ramp","counter","constant","mixed","pulse"],"description":"The type of signal which should be generated:\n\n- `random`: a random walk with normal distributed step sizes will be generated.\n- `sine`: a sine signal will be generated.\n- `square`: a square / rectangle wave will be generated.\n- `triangle`: a triangle wave will be generated.\n- `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`.\n- `counter`: increasing integer counter is generated.\n- `constant`: a constant value generated.\n- `mixed`: the signals of of each sample are generated by cycling over all remaining signal types.\n- `pulse`: generates pulses with a set frequency, phase and width\n"},"amplitude":{"type":"number","description":"The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`.","default":1},"frequency":{"type":"number","description":"The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`.","default":1},"phase":{"type":"number","default":0,"description":"Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`."},"pulse_width":{"type":"number","default":1,"description":"The width of the pulse, with respect to the rate"},"pulse_low":{"type":"number","default":0,"description":"The low value of the pulse signal."},"pulse_high":{"type":"number","default":1,"description":"The high value of the pulse signal."},"stddev":{"type":"number","default":0.2,"description":"The standard deviation of the normal distributed steps if the `signal` setting is set to `random`."},"offset":{"type":"number","default":0,"description":"Adds a constant offset to each of the generated signals."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-signal_v2-signal":{"type":"object","required":["signal"],"properties":{"signal":{"type":"string","enum":["random","sine","square","triangle","ramp","counter","constant","mixed","pulse"],"description":"The type of signal which should be generated:\n\n- `random`: a random walk with normal distributed step sizes will be generated.\n- `sine`: a sine signal will be generated.\n- `square`: a square / rectangle wave will be generated.\n- `triangle`: a triangle wave will be generated.\n- `ramp`: the generator will produce a ramp signal in the interval `[ 0, 1 / f ]`.\n- `counter`: increasing integer counter is generated.\n- `constant`: a constant value generated.\n- `mixed`: the signals of of each sample are generated by cycling over all remaining signal types.\n- `pulse`: generates pulses with a set frequency, phase and width\n"},"amplitude":{"type":"number","description":"The amplitude of the signal when the `signal` setting is one of `sine`, `square` or `triangle`.","default":1},"frequency":{"type":"number","description":"The frequency of the signal when the `signal` setting is one of `sine`, `square`, `triangle`,`pulse` or `ramp`.","default":1},"phase":{"type":"number","default":0,"description":"Tha pase of the signal when the `signal` setting is one of `sine` or `pulse`."},"pulse_width":{"type":"number","default":1,"description":"The width of the pulse, with respect to the rate"},"pulse_low":{"type":"number","default":0,"description":"The low value of the pulse signal."},"pulse_high":{"type":"number","default":1,"description":"The high value of the pulse signal."},"stddev":{"type":"number","default":0.2,"description":"The standard deviation of the normal distributed steps if the `signal` setting is set to `random`."},"offset":{"type":"number","default":0,"description":"Adds a constant offset to each of the generated signals."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-socket":{"type":"object","required":["type","in","out"],"properties":{"type":{"type":"string","const":"socket"},"format":{"default":"villas.binary","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"layer":{"type":"string","enum":["udp","ip","eth","unix","local","tcp-client","tcp-server"],"default":"udp","description":"Select the network layer which should be used for the socket. Please note that `eth` can only be used locally in a LAN as it contains no routing information for the internet.\n"},"in":{"type":"object","required":["address"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"address":{"type":"string","description":"The local address and port number this node should listen for incoming packets.\n\nUse `*` to listen on all interfaces: `local = \"*:12000\"`.\n"},"verify_source":{"type":"boolean","default":false,"description":"Check if source address of incoming packets matches the remote address.\n"},"multicast":{"type":"object","required":["group"],"properties":{"enabled":{"type":"boolean","default":true,"description":"Weather or not multicast group subscription is active.\n"},"group":{"type":"string","description":"The multicast group. Must be within 224.0.0.0/4\n"},"interface":{"type":"string","description":"The address of the interface which should join the multicast group.\n"},"ttl":{"type":"integer","minimum":0,"default":255,"description":"The time to live for outgoing multicast packets.\n"},"loop":{"type":"boolean","default":false,"description":"Whether or not sent multicast packets should be looped back to the local socket.\n"}},"additionalProperties":false},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","required":["address"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"address":{"type":"string","description":"The remote address and port number to which this node will send data.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-stats-signal":{"type":"object","required":["stats"],"properties":{"stats":{"type":"string","description":"The statistic to expose as a signal, given as `..`\n(for example `node1.owd.mean`).\n"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-stats":{"title":"Statistics","type":"object","required":["type","rate","in"],"properties":{"type":{"type":"string","const":"stats"},"rate":{"type":"number","description":"A rate in Hz at which the statistics are generated by this node."},"in":{"type":"object","required":["signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","required":["stats"],"properties":{"stats":{"type":"string","description":"The statistic to expose as a signal, given as `..`\n(for example `node1.owd.mean`).\n"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-stats-signal":{"type":"object","required":["stats"],"properties":{"stats":{"type":"string","description":"The statistic to expose as a signal, given as `..`\n(for example `node1.owd.mean`).\n"},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-temper":{"title":"PCSensor / TEMPer USB temperature sensors","type":"object","required":["type"],"properties":{"type":{"type":"string","const":"temper"},"calibration":{"type":"object","properties":{"scale":{"type":"number","default":1,"description":"A scaling factor for calibrating the sensor."},"offset":{"type":"number","default":0,"description":"An offset for calibrating the sensor."}},"additionalProperties":false},"bus":{"type":"integer","description":"A filter applied to the USB bus number for selecting a specific sensor if multiple are available."},"port":{"type":"integer","description":"A filter applied to the USB port number for selecting a specific sensor if multiple are available."},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-test_rtt":{"title":"Round-trip Time Test","type":"object","required":["type","cases"],"properties":{"type":{"type":"string","const":"test_rtt"},"format":{"default":"villas.human","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"prefix":{"type":"string","description":"A prefix which is prepended to the output file name of the RTT test result file.","example":"test_1"},"output":{"type":"string","default":".","description":"A directory path at which the RTT test result files be placed."},"shutdown":{"type":"boolean","description":"If set, the node will shut down VILLASnode after all test cases have finished."},"cooldown":{"type":"number","default":0,"description":"A default cool-down time between consecutive test cases.\nThe node will insert a pause between the tests to avoid any network effects of the previous test-case to influence the upcoming test-case.\n"},"warmup":{"type":"number","default":0,"description":"A default warm-up time in seconds before the measurement of each test-case is started.\n"},"rates":{"description":"The default list of sending rates in Hz used by test-cases which do not specify their own `rates`.\n","oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]},"values":{"description":"The default list of sample lengths used by test-cases which do not specify their own `values`.\n","oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]},"count":{"type":"integer","default":1000,"description":"The default number of samples used by test-cases which do not specify their own `count`.\n"},"duration":{"type":"number","default":300,"description":"The default duration in seconds used by test-cases which do not specify their own `duration`.\n"},"mode":{"type":"string","enum":["min","max","at_least_count","at_least_duration","stop_after_count","stop_after_duration"],"description":"The default mode used by test-cases which do not specify their own `mode`."},"cases":{"type":"array","description":"A list of test-case specifications.\n\nThe values from the `rates` and `values` settings of each test-case specification will be used to form a cross-product.\n","items":{"type":"object","properties":{"rates":{"description":"A list of sending rates in Hz.\nThe resulting test-case will generate samples at the given rate.\n","example":[10,100,1000,10000],"oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]},"values":{"description":"A list of sample length.\nThe resulting test-case will generate samples with the given number of signals.\n","example":[10,100],"oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]},"count":{"description":"The resulting test-case will send the number of samples specified by this setting.\nThis setting is exclusive with the `duration` setting.\n","type":"integer","example":10000},"duration":{"description":"The resulting test-case will be stopped after the configured duration in seconds.\nThis setting is exclusive with the `count` setting.\n","type":"number","example":60},"mode":{"type":"string","enum":["min","max","at_least_count","at_least_duration","stop_after_count","stop_after_duration"]}},"additionalProperties":false}},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-uldaq-signal":{"type":"object","properties":{"range":{"type":"string","description":"The range for a specific channel. See `range` for allowed values"},"input_mode":{"type":"string","description":"The input mode for a specific channel. See `input_mode` for allowed values"},"channel":{"type":"integer","example":5,"description":"The channel input number of the device."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false},"node-uldaq":{"title":"Measurement Computing DAQ devices (uldaq)","type":"object","required":["type","in"],"properties":{"type":{"type":"string","const":"uldaq"},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"interface_type":{"type":"string","enum":["usb","bluetooth","ethernet","any"],"description":"The interface to which the ADC is connected. Check manual for your device."},"device_id":{"type":"string","example":"10000","description":"The used device type. If empty it is auto detected."},"in":{"type":"object","description":"Configuration for the ul201","required":["sample_rate","signals"],"properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"sample_rate":{"type":"number","minimum":0,"default":1000,"example":10000,"description":"The default sampling rate of the input signals."},"range":{"type":"string","enum":["bipolar-60","bipolar-30","bipolar-15","bipolar-20","bipolar-10","bipolar-5","bipolar-4","bipolar-2.5","bipolar-2","bipolar-1.25","bipolar-1","bipolar-0.625","bipolar-0.5","bipolar-0.25","bipolar-0.125","bipolar-0.2","bipolar-0.1","bipolar-0.078","bipolar-0.05","bipolar-0.01","bipolar-0.005","unipolar-60","unipolar-30","unipolar-15","unipolar-20","unipolar-10","unipolar-5","unipolar-4","unipolar-2.5","unipolar-2","unipolar-1.25","unipolar-1","unipolar-0.625","unipolar-0.5","unipolar-0.25","unipolar-0.125","unipolar-0.2","unipolar-0.1","unipolar-0.078","unipolar-0.05","unipolar-0.01","unipolar-0.005"],"description":"The default input range for signals. Check manual for your device.\n\n## Supported ranges\n\n| Value | Min | Max |\n| :--------------- | :------ | :----- |\n| `bipolar-60` | -60.0 | +60.0 |\n| `bipolar-60` | -60.0 | +60.0 |\n| `bipolar-30` | -30.0 | +30.0 |\n| `bipolar-15` | -15.0 | +15.0 |\n| `bipolar-20` | -20.0 | +20.0 |\n| `bipolar-10` | -10.0 | +10.0 |\n| `bipolar-5` | -5.0 | +5.0 |\n| `bipolar-4` | -4.0 | +4.0 |\n| `bipolar-2.5` | -2.5 | +2.5 |\n| `bipolar-2` | -2.0 | +2.0 |\n| `bipolar-1.25` | -1.25 | +1.25 |\n| `bipolar-1` | -1.0 | +1.0 |\n| `bipolar-0.625` | -0.625 | +0.625 |\n| `bipolar-0.5` | -0.5 | +0.5 |\n| `bipolar-0.25` | -0.25 | +0.25 |\n| `bipolar-0.125` | -0.125 | +0.125 |\n| `bipolar-0.2` | -0.2 | +0.2 |\n| `bipolar-0.1` | -0.1 | +0.1 |\n| `bipolar-0.078` | -0.078 | +0.078 |\n| `bipolar-0.05` | -0.05 | +0.05 |\n| `bipolar-0.01` | -0.01 | +0.01 |\n| `bipolar-0.005` | -0.005 | +0.005 |\n| `unipolar-60` | 0.0 | +60.0 |\n| `unipolar-30` | 0.0 | +30.0 |\n| `unipolar-15` | 0.0 | +15.0 |\n| `unipolar-20` | 0.0 | +20.0 |\n| `unipolar-10` | 0.0 | +10.0 |\n| `unipolar-5` | 0.0 | +5.0 |\n| `unipolar-4` | 0.0 | +4.0 |\n| `unipolar-2.5` | 0.0 | +2.5 |\n| `unipolar-2` | 0.0 | +2.0 |\n| `unipolar-1.25` | 0.0 | +1.25 |\n| `unipolar-1` | 0.0 | +1.0 |\n| `unipolar-0.625` | 0.0 | +0.625 |\n| `unipolar-0.5` | 0.0 | +0.5 |\n| `unipolar-0.25` | 0.0 | +0.25 |\n| `unipolar-0.125` | 0.0 | +0.125 |\n| `unipolar-0.2` | 0.0 | +0.2 |\n| `unipolar-0.1` | 0.0 | +0.1 |\n| `unipolar-0.078` | 0.0 | +0.078 |\n| `unipolar-0.05` | 0.0 | +0.05 |\n| `unipolar-0.005` | 0.0 | +0.00 |\n"},"input_mode":{"type":"string","enum":["differential","single-ended","pseudo-differential"],"description":"The default sampling type. Check manual for you device."},"sample_clock_source":{"type":"string","enum":["internal","external"],"description":"The clock source used for sampling."},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"type":"array","items":{"type":"object","properties":{"range":{"type":"string","description":"The range for a specific channel. See `range` for allowed values"},"input_mode":{"type":"string","description":"The input mode for a specific channel. See `input_mode` for allowed values"},"channel":{"type":"integer","example":5,"description":"The channel input number of the device."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"definitions":{"node-uldaq-signal":{"type":"object","properties":{"range":{"type":"string","description":"The range for a specific channel. See `range` for allowed values"},"input_mode":{"type":"string","description":"The input mode for a specific channel. See `input_mode` for allowed values"},"channel":{"type":"integer","example":5,"description":"The channel input number of the device."},"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"node-webrtc":{"type":"object","required":["type","session"],"properties":{"type":{"type":"string","const":"webrtc"},"format":{"default":"villas.binary","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"wait_seconds":{"type":"integer","default":0,"description":"Suspend start-up of VILLASnode for some seconds until the connection with the remote peer has been established.\n"},"ordered":{"type":"boolean","default":false,"description":"Indicates if data is allowed to be delivered out of order.\nThe default value of false, does not make guarantees that data will be delivered in order.\n"},"max_retransmits":{"type":"integer","default":0,"description":"Limit the number of times a channel will retransmit data if not successfully delivered.\nThis value may be clamped if it exceeds the maximum value supported.\n"},"session":{"type":"string","title":"Session identifier","description":"A unique session identifier which must be shared between two nodes"},"peer":{"type":"string","title":"Peer identifier","description":"A unique peer identifier within the session. Defaults to the node UUID."},"server":{"type":"string","title":"Signaling Server Address","description":"Address to the websocket signaling server","default":"wss://villas.k8s.eonerc.rwth-aachen.de/ws/signaling"},"ice":{"type":"object","title":"ICE configuration settings","properties":{"servers":{"title":"ICE Servers","description":"A list of ICE servers used for connection establishment","type":"array","items":{"type":"string","format":"uri","title":"STUN & TURN server URI","description":"A valid Uniform Resource Identifier (URI) identifying a STUN or TURN server.\n\nSee [RFC7064](https://datatracker.ietf.org/doc/html/rfc7064) and [RFC7065](https://datatracker.ietf.org/doc/html/rfc7065) for details.\n\nAs an extension to the URI format specified additional username & password can be specified as shown in the examples\n"}},"tcp":{"type":"boolean","title":"Enable ICE over TCP","description":"Whether or not ICE candidates using the TCP transport should be gathered."}},"additionalProperties":false},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-websocket":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"websocket"},"wait_connected":{"default":false,"type":"boolean"},"destinations":{"description":"During startup connect to those WebSocket servers as a client.\n\nEach URI must use the following scheme:\n\n```\nprotocol://host:port/nodename\n```\n\nIt starts with a protocol which must be one of `ws` (unencrypted) or `wss` (SSL).\nThe host name or IP address is separated by `://`.\nThe optional port number is separated by a colon `:`.\nThe node name is separated by a slash `/`.\n","type":"array","items":{"type":"string","format":"uri","description":"A WebSocket URI"}},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node-zeromq":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"zeromq"},"format":{"default":"villas.binary","$schema":"http://json-schema.org/draft-07/schema","description":"The payload format which is used to encode and decode exchanged messages.\n","example":"villas.human","type":["object","string"],"discriminator":{"x-villas-plugin":"format","propertyName":"type","mapping":{"csv":"#/components/schemas/format-csv","gtnet":"#/components/schemas/format-gtnet","iotagent_ul":"#/components/schemas/format-iotagent_ul","json":"#/components/schemas/format-json","json.edgeflex":"#/components/schemas/format-json_edgeflex","json.kafka":"#/components/schemas/format-json_kafka","json.reserve":"#/components/schemas/format-json_reserve","opal.asyncip":"#/components/schemas/format-opal_asyncip","protobuf":"#/components/schemas/format-protobuf","raw":"#/components/schemas/format-raw","tsv":"#/components/schemas/format-tsv","value":"#/components/schemas/format-value","villas.binary":"#/components/schemas/format-villas_binary","villas.human":"#/components/schemas/format-villas_human","villas.web":"#/components/schemas/format-villas_web"}}},"pattern":{"type":"string","enum":["pubsub","radiodish"],"description":"The ZeroMQ messaging pattern which is used by this node."},"ipv6":{"type":"boolean","default":false},"curve":{"title":"CurveZMQ cryptography","description":"**Note:** This feature is currently broken.\n\nYou can use the [`villas zmq-keygen`](../usage/villas-zmq-keygen.md) command to create a new keypair for the following configuration options:\n","type":"object","required":["public_key","secret_key"],"properties":{"enabled":{"type":"boolean","description":"Whether or not the encryption is enabled."},"public_key":{"type":"string","description":"The public key of the server.\n"},"secret_key":{"type":"string","description":"The secret key of the server.\n"}},"additionalProperties":false},"in":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"subscribe":{"description":"A single endpoint URI or list of URIs to which this node should connect as a subscriber.","oneOf":[{"type":"string","format":"uri"},{"type":"array","items":{"type":"string","format":"uri"}}]},"filter":{"type":"string","description":"A filter which is used to select messages to receive."},"bind":{"type":"boolean","description":"Whether this node binds to the endpoint instead of connecting to it."},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false},"out":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean","description":"Whether or not this direction of the node is used.\n"},"publish":{"description":"A single endpoint URI or list of URIs on which this node should publish messages.","oneOf":[{"type":"string","format":"uri"},{"type":"array","items":{"type":"string","format":"uri"}}]},"filter":{"type":"string","description":"A filter which is prepended to published messages."},"bind":{"type":"boolean","description":"Whether this node binds to the endpoint instead of connecting to it."},"netem":{"description":"The netem configuration allows the user to apply network impairments to packets send out by the nodes.\n\nPlease note, that the network emulation feature is currently supported by the following node-types:\n- [`socket`](/docs/node/nodes/socket)\n- [`nanomsg`](/docs/node/nodes/nanomsg)\n- [`zeromq`](/docs/node/nodes/zeromq)\n- [`rtp`](/docs/node/nodes/rtp)\n","type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable or disable the network emulation for this node.\n"},"distribution":{"description":"One of the delay distributions supported by the `tc` command (see [tc-netem(8)](https://man7.org/linux/man-pages/man8/tc-netem.8.html)).\n","oneOf":[{"type":"string","enum":["uniform","normal","pareto","paretonormal"]},{"type":"array","items":{"type":"integer"}}]},"correlation":{"type":"number","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1},"delay":{"description":"Delay packets in microseconds.\n","type":"integer","minimum":1},"jitter":{"title":"Jitter","description":"Apply a jitter to the packet delay (in microseconds).\n","type":"integer","minimum":1},"loss":{"title":"Packet Loss Percentage","description":"Percentage of packets which will be dropped.\n","type":"number","minimum":0,"maximum":100},"duplicate":{"title":"Packet Duplication Percentage","description":"Percentage of packets which will be duplicated.\n","type":"number","minimum":0,"maximum":100},"corruption":{"title":"Packet Corruption Percentage","description":"Percentage of packets which will be corrupted.\n","type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"fwmark":{"type":"integer","minimum":1,"description":"Firewall mark (fwmark) which is applied to all outgoing packets of this node.\n\nThis can be used together with the `tc` traffic control subsystem (see also `netem`)\nto classify and shape the traffic emitted by this node.\n"},"builtin":{"default":true,"type":"boolean","title":"Builtin hook functions","description":"By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.\n"},"vectorize":{"default":1,"type":"integer","minimum":1,"description":"This setting allows to send multiple samples in a single message to the destination nodes.\n\nThe value of this setting determines how many samples will be combined into one packet.\n"},"hooks":{"default":[],"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"signals":{"description":"List of signal definition objects","type":"array","example":[{"name":"tap_position","type":"integer","init":0},{"name":"voltage","type":"float","unit":"V","init":230}],"items":{"type":"object","properties":{"name":{"type":"string","title":"Signal name","description":"A name which describes the signal.\n","example":"Bus123_U"},"unit":{"type":"string","title":"Signal unit","description":"The unit of the signal.","example":"V"},"type":{"type":"string","title":"Signal data-type","description":"The data-type of the signal.\n","default":"float","enum":["integer","float","boolean","complex"]},"init":{"title":"Initial signal value.","description":"The initial value of the signal.\n","oneOf":[{"type":"number"},{"type":"boolean"},{"type":"object","required":["real","imag"],"additionalProperties":false,"properties":{"real":{"type":"number"},"imag":{"type":"number"}}}]},"enabled":{"type":"boolean","default":true,"description":"Signals can be disabled which causes them to be ignored.\n"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"node":{"$schema":"http://json-schema.org/draft-07/schema","type":"object","discriminator":{"x-villas-plugin":"node","propertyName":"type","mapping":{"amqp":"#/components/schemas/node-amqp","c37.118":"#/components/schemas/node-c37_118","can":"#/components/schemas/node-can","comedi":"#/components/schemas/node-comedi","ethercat":"#/components/schemas/node-ethercat","example":"#/components/schemas/node-example","exec":"#/components/schemas/node-exec","file":"#/components/schemas/node-file","fpga":"#/components/schemas/node-fpga","iec60870-5-104":"#/components/schemas/node-iec60870-5-104","iec61850-8-1":"#/components/schemas/node-iec61850-8-1","iec61850-9-2":"#/components/schemas/node-iec61850-9-2","infiniband":"#/components/schemas/node-infiniband","influxdb":"#/components/schemas/node-influxdb","kafka":"#/components/schemas/node-kafka","loopback":"#/components/schemas/node-loopback","modbus":"#/components/schemas/node-modbus","mqtt":"#/components/schemas/node-mqtt","nanomsg":"#/components/schemas/node-nanomsg","ngsi":"#/components/schemas/node-ngsi","opal.async":"#/components/schemas/node-opal_async","opal.orchestra":"#/components/schemas/node-opal_orchestra","opendss":"#/components/schemas/node-opendss","redis":"#/components/schemas/node-redis","rtp":"#/components/schemas/node-rtp","shmem":"#/components/schemas/node-shmem","signal":"#/components/schemas/node-signal","signal.v2":"#/components/schemas/node-signal_v2","socket":"#/components/schemas/node-socket","stats":"#/components/schemas/node-stats","temper":"#/components/schemas/node-temper","test_rtt":"#/components/schemas/node-test_rtt","uldaq":"#/components/schemas/node-uldaq","webrtc":"#/components/schemas/node-webrtc","websocket":"#/components/schemas/node-websocket","zeromq":"#/components/schemas/node-zeromq"}}},"path":{"type":"object","required":["in"],"additionalProperties":false,"properties":{"in":{"description":"The in settings expects the name of one or more source nodes or mapping expressions.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"out":{"description":"The out setting expects the name of one or more destination nodes. Each sample which is processed by the path will be sent to each of the destination nodes.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"enabled":{"type":"boolean","default":true,"description":"Whether this path is enabled.\nA disabled path is loaded from the configuration but not started.\n"},"mode":{"type":"string","default":"any","enum":["any","all"],"description":"The mode setting specifies under which condition a path is triggered.\nA triggered path will multiplex / merge samples from its input nodes and run the configured hook functions on them.\nAfterwards the processed and merged samples will be send to all output nodes.\n\nTwo modes are currently supported:\n\n- `any`: The path will trigger the path as soon as any of the masked (see `mask`) input nodes received new samples.\n- `all`: The path will trigger the path as soon as all input nodes received at least one new sample.\n"},"mask":{"description":"This setting allows masking the the input nodes which can trigger the path.\n\nSee also `mode` setting.\n","type":"array","items":{"type":"string","description":"A node-name"}},"rate":{"type":"number","minimum":0,"default":0,"description":"A non-zero value will periodically trigger the path and resend the last sample again.\n\nA value of zero will disable this feature.\n"},"original_sequence_no":{"type":"boolean","default":false,"description":"When this flag is set, the original sequence number from the source node will be used when multiplexing the nodes.\n"},"hooks":{"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"uuid":{"description":"A globally unique ID which identifies the path for the use via the API.\n","type":"string","format":"uuid"},"affinity":{"type":"integer","description":"A mask which pins the execution of this path to a set of CPU cores.\n"},"poll":{"description":"A boolean flag which enables the poll-based mode for reading samples from multiple path sources.\n\n**Note:** This is an advanced setting.\nMost users should use the the default value which will always do the right thing based on the number and type of input nodes for this path.\n","type":"boolean"},"builtin":{"description":"If enabled, the path will start with a set of default and builtin hook functions.\n","type":"boolean","default":true},"queuelen":{"description":"The length of the path queue. It limits how many samples can be _in flight_ at any point in time.\nIf you see queue or pool underrun warnings, try to increase this value.\n","type":"integer"}}},"config-http":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"title":"Enable HTTP server","description":"When set to `false`, the built-in HTTP & WebSocket server is disabled and will not listen on any port.\n"},"port":{"type":"integer","default":80,"title":"Listening port","description":"The TCP port number on which HTTP & WebSocket server.\n"},"ssl_cert":{"type":"string","title":"SSL Certificate Path","description":"The public x509 certificate used for server-side SSL encryption.\n","example":"/etc/ssl/certs/mycert.pem"},"ssl_private_key":{"type":"string","title":"SSL Private Key Path","description":"The private x509 key used for server-side SSL encryption.\n","example":"/etc/ssl/private/mykey.pem"}},"additionalProperties":false},"config-logging":{"type":"object","title":"Logging configuration","properties":{"level":{"title":"The log level","description":"This setting expects one of the allowed strings to adjust the logging level.\nUse this with care! Producing a lot of IO by enabling the debug output might decrease the performance of the server.\n","type":"string","default":"info","enum":["trace","debug","info","warning","error","critical","off"]},"file":{"type":"string","title":"Log file name","description":"Write all log messages to a file.\n"},"syslog":{"type":"boolean","default":false,"title":"Enable syslog logging","description":"If enabled VILLASnode will log to the [system log](https://en.wikipedia.org/wiki/Syslog).\n"},"expressions":{"title":"Logging expressions","description":"The logging expression allow for a fine grained control of log levels per individual logger instance.\nExpressions are provided as a list of logger name pattern and the desired level.\n\n**Note:** The expressions are evaluated in the order of their appearance in the list.\n","type":"array","items":{"type":"object","required":["name","level"],"properties":{"name":{"type":"string","title":"Logger name filter","description":"The [glob](https://man7.org/linux/man-pages/man7/glob.7.html)-style pattern to match the names of the loggers for which the level should be adjusted."},"level":{"type":"string","title":"Log level","description":"The level which should be used for the matched loggers.\n","enum":["trace","debug","info","warning","error","critical","off"]}},"additionalProperties":false}}},"additionalProperties":false},"config":{"$schema":"http://json-schema.org/draft-07/schema","title":"VILLASnode configuration file","description":"Schema of the VILLASnode configuration file.","type":"object","additionalProperties":false,"properties":{"ethercat":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global EtherCAT master configuration","type":"object","properties":{"master":{"type":"integer"},"alias":{"type":"integer"},"coupler":{"type":"object","properties":{"position":{"type":"integer"},"product_code":{"type":"integer"},"vendor_id":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"fpgas":{"$schema":"http://json-schema.org/draft-07/schema","description":"Global FPGA configuration","type":"object","additionalProperties":{"allOf":[{"description":"FPGA Card configuration","type":"object","required":["interface"],"properties":{"interface":{"type":"string","enum":["pcie","platform"]},"name":{"type":"string"},"ips":{"type":"string"},"affinity":{"type":"integer"},"do_reset":{"type":"boolean"},"slot":{"type":"string"},"id":{"type":"string"},"polling":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"reverse":{"type":"boolean"}},"additionalProperties":false}},"ignore_ips":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},{"not":{"required":["name"]}}]}},"nodes":{"title":"Node Objects","description":"A mapping from unique identifiers to node configurations.\n","type":"object","additionalProperties":{"x-additionalPropertiesName":"Node Name","$schema":"http://json-schema.org/draft-07/schema","type":"object","discriminator":{"x-villas-plugin":"node","propertyName":"type","mapping":{"amqp":"#/components/schemas/node-amqp","c37.118":"#/components/schemas/node-c37_118","can":"#/components/schemas/node-can","comedi":"#/components/schemas/node-comedi","ethercat":"#/components/schemas/node-ethercat","example":"#/components/schemas/node-example","exec":"#/components/schemas/node-exec","file":"#/components/schemas/node-file","fpga":"#/components/schemas/node-fpga","iec60870-5-104":"#/components/schemas/node-iec60870-5-104","iec61850-8-1":"#/components/schemas/node-iec61850-8-1","iec61850-9-2":"#/components/schemas/node-iec61850-9-2","infiniband":"#/components/schemas/node-infiniband","influxdb":"#/components/schemas/node-influxdb","kafka":"#/components/schemas/node-kafka","loopback":"#/components/schemas/node-loopback","modbus":"#/components/schemas/node-modbus","mqtt":"#/components/schemas/node-mqtt","nanomsg":"#/components/schemas/node-nanomsg","ngsi":"#/components/schemas/node-ngsi","opal.async":"#/components/schemas/node-opal_async","opal.orchestra":"#/components/schemas/node-opal_orchestra","opendss":"#/components/schemas/node-opendss","redis":"#/components/schemas/node-redis","rtp":"#/components/schemas/node-rtp","shmem":"#/components/schemas/node-shmem","signal":"#/components/schemas/node-signal","signal.v2":"#/components/schemas/node-signal_v2","socket":"#/components/schemas/node-socket","stats":"#/components/schemas/node-stats","temper":"#/components/schemas/node-temper","test_rtt":"#/components/schemas/node-test_rtt","uldaq":"#/components/schemas/node-uldaq","webrtc":"#/components/schemas/node-webrtc","websocket":"#/components/schemas/node-websocket","zeromq":"#/components/schemas/node-zeromq"}}}},"paths":{"title":"Path list","description":"A list of uni-directional paths which connect the nodes defined in the `nodes` list.\n","type":"array","default":[],"items":{"type":"object","required":["in"],"additionalProperties":false,"properties":{"in":{"description":"The in settings expects the name of one or more source nodes or mapping expressions.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"out":{"description":"The out setting expects the name of one or more destination nodes. Each sample which is processed by the path will be sent to each of the destination nodes.\n","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"enabled":{"type":"boolean","default":true,"description":"Whether this path is enabled.\nA disabled path is loaded from the configuration but not started.\n"},"mode":{"type":"string","default":"any","enum":["any","all"],"description":"The mode setting specifies under which condition a path is triggered.\nA triggered path will multiplex / merge samples from its input nodes and run the configured hook functions on them.\nAfterwards the processed and merged samples will be send to all output nodes.\n\nTwo modes are currently supported:\n\n- `any`: The path will trigger the path as soon as any of the masked (see `mask`) input nodes received new samples.\n- `all`: The path will trigger the path as soon as all input nodes received at least one new sample.\n"},"mask":{"description":"This setting allows masking the the input nodes which can trigger the path.\n\nSee also `mode` setting.\n","type":"array","items":{"type":"string","description":"A node-name"}},"rate":{"type":"number","minimum":0,"default":0,"description":"A non-zero value will periodically trigger the path and resend the last sample again.\n\nA value of zero will disable this feature.\n"},"original_sequence_no":{"type":"boolean","default":false,"description":"When this flag is set, the original sequence number from the source node will be used when multiplexing the nodes.\n"},"hooks":{"type":"array","title":"Hook List","example":["print",{"type":"limit_rate","rate":1000}],"items":{"description":"Hooks form a pipeline of steps which process, filter or alter sample data.\n","example":"print","type":["object","string"],"discriminator":{"x-villas-expand":"hook","propertyName":"type","mapping":{"average":"#/components/schemas/hook-average","cast":"#/components/schemas/hook-cast","decimate":"#/components/schemas/hook-decimate","digest":"#/components/schemas/hook-digest","dp":"#/components/schemas/hook-dp","drop":"#/components/schemas/hook-drop","dump":"#/components/schemas/hook-dump","ebm":"#/components/schemas/hook-ebm","fix":"#/components/schemas/hook-fix","frame":"#/components/schemas/hook-frame","gate":"#/components/schemas/hook-gate","jitter_calc":"#/components/schemas/hook-jitter_calc","limit_rate":"#/components/schemas/hook-limit_rate","limit_value":"#/components/schemas/hook-limit_value","lua":"#/components/schemas/hook-lua","ma":"#/components/schemas/hook-ma","pmu_dft":"#/components/schemas/hook-pmu_dft","pps_ts":"#/components/schemas/hook-pps_ts","print":"#/components/schemas/hook-print","reorder_ts":"#/components/schemas/hook-reorder_ts","restart":"#/components/schemas/hook-restart","rms":"#/components/schemas/hook-rms","round":"#/components/schemas/hook-round","scale":"#/components/schemas/hook-scale","shift_seq":"#/components/schemas/hook-shift_seq","shift_ts":"#/components/schemas/hook-shift_ts","skip_first":"#/components/schemas/hook-skip_first","stats":"#/components/schemas/hook-stats","ts":"#/components/schemas/hook-ts"}}}},"uuid":{"description":"A globally unique ID which identifies the path for the use via the API.\n","type":"string","format":"uuid"},"affinity":{"type":"integer","description":"A mask which pins the execution of this path to a set of CPU cores.\n"},"poll":{"description":"A boolean flag which enables the poll-based mode for reading samples from multiple path sources.\n\n**Note:** This is an advanced setting.\nMost users should use the the default value which will always do the right thing based on the number and type of input nodes for this path.\n","type":"boolean"},"builtin":{"description":"If enabled, the path will start with a set of default and builtin hook functions.\n","type":"boolean","default":true},"queuelen":{"description":"The length of the path queue. It limits how many samples can be _in flight_ at any point in time.\nIf you see queue or pool underrun warnings, try to increase this value.\n","type":"integer"}}}},"http":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"title":"Enable HTTP server","description":"When set to `false`, the built-in HTTP & WebSocket server is disabled and will not listen on any port.\n"},"port":{"type":"integer","default":80,"title":"Listening port","description":"The TCP port number on which HTTP & WebSocket server.\n"},"ssl_cert":{"type":"string","title":"SSL Certificate Path","description":"The public x509 certificate used for server-side SSL encryption.\n","example":"/etc/ssl/certs/mycert.pem"},"ssl_private_key":{"type":"string","title":"SSL Private Key Path","description":"The private x509 key used for server-side SSL encryption.\n","example":"/etc/ssl/private/mykey.pem"}},"additionalProperties":false},"logging":{"type":"object","title":"Logging configuration","properties":{"level":{"title":"The log level","description":"This setting expects one of the allowed strings to adjust the logging level.\nUse this with care! Producing a lot of IO by enabling the debug output might decrease the performance of the server.\n","type":"string","default":"info","enum":["trace","debug","info","warning","error","critical","off"]},"file":{"type":"string","title":"Log file name","description":"Write all log messages to a file.\n"},"syslog":{"type":"boolean","default":false,"title":"Enable syslog logging","description":"If enabled VILLASnode will log to the [system log](https://en.wikipedia.org/wiki/Syslog).\n"},"expressions":{"title":"Logging expressions","description":"The logging expression allow for a fine grained control of log levels per individual logger instance.\nExpressions are provided as a list of logger name pattern and the desired level.\n\n**Note:** The expressions are evaluated in the order of their appearance in the list.\n","type":"array","items":{"type":"object","required":["name","level"],"properties":{"name":{"type":"string","title":"Logger name filter","description":"The [glob](https://man7.org/linux/man-pages/man7/glob.7.html)-style pattern to match the names of the loggers for which the level should be adjusted."},"level":{"type":"string","title":"Log level","description":"The level which should be used for the matched loggers.\n","enum":["trace","debug","info","warning","error","critical","off"]}},"additionalProperties":false}}},"additionalProperties":false},"hugepages":{"type":"integer","default":100,"title":"Number of reserved hugepages","description":"The number of hugepages which will be reservered by the system.\n\nSee: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt\n\nA value of zero will disable the use of huge pages.\n"},"stats":{"type":"number","default":1,"title":"Statistics interval","description":"Specifies the rate at which statistics about the active paths will be periodically printed to the screen.\n\nSetting this value to 5, will print 5 lines per second.\n\nA line includes information such as:\n\n- Source and Destination of path\n- Messages received\n- Messages sent\n- Messages dropped\n"},"affinity":{"type":"integer","default":0,"title":"Task/Process affinity mask","description":"Restricts the exeuction of the daemon to certain CPU cores.\nThis technique, also called 'pinning', improves the determinism of the server by isolating the daemon processes on exclusive cores.\n\nA value of `0` will not change the affinity of the process.\n"},"priority":{"type":"integer","default":0,"description":"Adjusts the scheduling priority of the deamon processes.\nBy default, the daemon uses a real-time optimized FIFO scheduling algorithm.\n\nA value of `0` will not change the priority of the process.\n"},"idle_stop":{"type":"boolean","default":false},"uuid":{"type":["string","null"],"format":"uuid","title":"Super-node UUID","default":null,"description":"Each VILLASnode instance is identified by a globally unique indentifier / UUID.\n\nThis UUID can be queried by the API.\n\nIf the setting is not provided, a UUID will be generated by hashing the active VILLASnode configuration.\nThis ensures that restarting the VILLASnode instance with the identical configuration will yield always the same UUID.\n"},"seed":{"type":"integer","default":0,"title":"Random number generator seed","description":"The seed for the random number generator used by the VILLASnode instance.\n"}}},"edgeflex":{"title":"PMU measurements as used in the EdgeFlex project by Manuel","description":"VILLASnode does not support deseralization (yet).\n","type":"object","required":["created"],"properties":{"created":{"title":"Sampling timestamp","description":"A timestamps in miliseconds since 1970-01-01 00:00:00","type":"number","minimum":0}},"additionalProperties":{"description":"Key-value pairs of measurements","anyOf":[{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"object","description":"A complex number represented in real and imaginary components","properties":{"real":{"type":"number"},"imag":{"type":"number"}},"additionalProperties":false}]},"example":{"created":1633791645123,"signal0":123.456,"signal1":true,"signal2":1234,"signal3":{"real":1234.4556,"imag":23232.12312}}},"igor":{"title":"PMU format used by Igor","example":{"device":"device1","timestamp":"2020-05-20T10:27:57.980802+00:00","readings":[{"channel":"BUS1-VA","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IA","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-VB","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IB","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-VC","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IC","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-VN","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11},{"channel":"BUS1-IN","magnitude":9.171,"phase":0.8305,"frequency":50.1,"rocof":0.11}]},"type":"object","required":["device","timestamp","readings"],"properties":{"device":{"description":"ID for measurement device","type":"string"},"timestamp":{"description":"Timestamp of measurement in ISO 8601 format","type":"string","pattern":"^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$"},"readings":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","description":"Name of the monitored bus"},"magnitude":{"type":"number","description":"Amplitude of the measured signal [V]"},"phase":{"type":"number","description":"Phase of the measured signal [radian]"},"frequency":{"type":"number","description":"Frequency of the line signal [Hz]"},"rocof":{"type":"number","description":"Rate of change of frequency [Hz/s]"}},"additionalProperties":false}}},"additionalProperties":false},"sogno-old":{"title":"Original PMU sensor data format as used in the SOGNO EU project","type":"object","required":["device","timestamp","component","measurand","phase","data"],"properties":{"device":{"description":"ID for measurement device","type":"string"},"timestamp":{"description":"Timestamp of measurement in ISO 8601 format","type":"string","pattern":"^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$"},"component":{"description":"ID (uuid) from CIM document","type":"string","format":"uuid"},"measurand":{"type":"string","enum":["voltmagnitude","voltangle","currmagnitude","currangle","activepower","reactivepower","apparentpower","frequency"]},"phase":{"type":"string","enum":["A","B","C"]},"data":{"type":"number","description":"Measurement value as in the following format depending on value of measurand:\n - voltmagnitude: phase-to-ground RMS value, unit volts\n - voltangle: unit radian\n - currmagnitude: RMS value, unit ampere\n - currangle: unit radian\n - activepower: single phase power, unit watts\n - reactivepower: single phase power, unit voltampere reactive\n - apparentpower: single phase power, unit voltampere\n - frequency: unit hertz\n"}},"additionalProperties":false,"example":{"device":"pmu-abc0","timestamp":"2021-10-07T10:11:12.1231241+02:00","component":"7a30b61a-2913-11ec-9621-0242ac130002","measurand":"voltmagnitude","phase":"A","data":123124}},"sogno":{"title":"PMU format used in SOGNO LF project","example":{"device":"device1","timestamp":"2020-05-20T10:27:57.980802+00:00","readings":[{"component":"7a30b61a-2913-11ec-9621-0242ac130002","measurand":"voltmagnitude","phase":"A","data":123}]},"type":"object","required":["device","timestamp","readings"],"properties":{"device":{"description":"ID for measurement device","type":"string"},"timestamp":{"description":"Timestamp of measurement in ISO 8601 format","type":"string","pattern":"^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$"},"readings":{"type":"array","items":{"type":"object","properties":{"component":{"description":"ID (uuid) from CIM document","type":"string","format":"uuid"},"measurand":{"type":"string","enum":["voltmagnitude","voltangle","currmagnitude","currangle","activepower","reactivepower","apparentpower","frequency"]},"phase":{"type":"string","enum":["A","B","C"]},"data":{"type":"number","description":"Measurement value as in the following format depending on value of measurand:\n - voltmagnitude: phase-to-ground RMS value, unit volts\n - voltangle: unit radian\n - currmagnitude: RMS value, unit ampere\n - currangle: unit radian\n - activepower: single phase power, unit watts\n - reactivepower: single phase power, unit voltampere reactive\n - apparentpower: single phase power, unit voltampere\n - frequency: unit hertz\n"}},"additionalProperties":false}}},"additionalProperties":false}},"parameters":{"node-uuid-name":{"name":"uuid-or-name","description":"Either a UUID or node-name","in":"path","required":true,"schema":{"oneOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"[a-z0-9_-]{2,32}"}]}},"path-uuid":{"name":"uuid","description":"A globally unique identifier for each path.","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}}},"x-tagGroups":[{"name":"VILLASnode APIs","tags":["super-node","nodes","paths"]},{"name":"Configuration Files","tags":["config"]},{"name":"Format Schemas","tags":["format-edgeflex","format-igor","format-sogno","format-sogno-old"]}]})BUNDLED_SCHEMA"); + // clang-format on + + return schema; +} + +} // namespace villas::node diff --git a/packaging/deps.sh b/packaging/deps.sh index c11ab556a..741ad57be 100644 --- a/packaging/deps.sh +++ b/packaging/deps.sh @@ -587,6 +587,22 @@ if ! find /usr/{local/,}{lib,bin} -name "libOpenDSSC.so" | grep -q . && echo "${PREFIX}/openDSSC/bin/" > /etc/ld.so.conf.d/opendssc.conf fi +# Build & Install nlohmann_json_schema_validator +if ! cmake --find-package -DNAME=nlohmann_json_schema_validator -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST >/dev/null 2>/dev/null && \ + should_build "nlohmann_json_schema_validator" "for JSON schema validation" "required"; then + git clone ${GIT_OPTS} --branch 2.4.0 https://github.com/pboettch/json-schema-validator.git + mkdir -p json-schema-validator/build + pushd json-schema-validator/build + cmake -DJSON_VALIDATOR_BUILD_TESTS=OFF \ + -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF \ + -DBUILD_SHARED_LIBS=ON \ + ${CMAKE_OPTS} .. + cmake --build . \ + --target install \ + --parallel ${PARALLEL} + popd +fi + # Build & Install ghc::filesystem if ! cmake --find-package -DNAME=ghc_filesystem -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST >/dev/null 2>/dev/null && \ should_build "ghc_filesystem" "for compatability with older compilers"; then diff --git a/packaging/docker/Dockerfile.fedora-minimal b/packaging/docker/Dockerfile.fedora-minimal index 49a910ed2..599e9e5f3 100644 --- a/packaging/docker/Dockerfile.fedora-minimal +++ b/packaging/docker/Dockerfile.fedora-minimal @@ -25,7 +25,8 @@ RUN dnf -y install \ spdlog-devel \ fmt-devel \ libwebsockets-devel \ - json-devel + json-devel \ + json-schema-validator-devel ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 diff --git a/packaging/nix/villas.nix b/packaging/nix/villas.nix index e2d9b47e4..80258b951 100644 --- a/packaging/nix/villas.nix +++ b/packaging/nix/villas.nix @@ -52,6 +52,7 @@ libuuid, libwebsockets, nlohmann_json, + nlohmann_json_schema_validator, openssl, pkg-config, gcc14Stdenv, @@ -150,6 +151,7 @@ gcc14Stdenv.mkDerivation { ]; buildInputs = [ + nlohmann_json_schema_validator libwebsockets openssl curl diff --git a/tools/bundle_schema.sh b/tools/bundle_schema.sh new file mode 100755 index 000000000..e687aea31 --- /dev/null +++ b/tools/bundle_schema.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: 2014-2025 The VILLASframework Authors +# SPDX-License-Identifier: Apache-2.0 +# +# Bundle the OpenAPI YAML schema and embed it as a C++ raw string literal. +# +# Usage: tools/bundle_schema.sh + +set -euo pipefail + +TOPLEVEL="$(git rev-parse --show-toplevel)" + +bundled_schema() { + redocly bundle villas-node \ + --config "${TOPLEVEL}/doc/redocly.yaml" \ + --skip-preprocessor=villas/expand-discriminator \ + --dereferenced \ + --ext json | \ + jq --compact-output +} + +BUNDLED_SCHEMA="$(bundled_schema)" + +cat > "${TOPLEVEL}/lib/json_schema.cpp" <<<" +// SPDX-FileCopyrightText: 2014-2025 The VILLASframework Authors +// SPDX-License-Identifier: Apache-2.0 +// Generated file — do not edit + +#include + +namespace villas::node { + +Json const &bundled_schemas() { + // clang-format off + static auto const schema = Json::parse(R\"BUNDLED_SCHEMA(${BUNDLED_SCHEMA})BUNDLED_SCHEMA\"); + // clang-format on + + return schema; +} + +} // namespace villas::node" From 74f763e25a1b1e13bd6b24c907ee551352038bd4 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Fri, 7 Aug 2026 23:24:05 +0200 Subject: [PATCH 59/84] feat(clangd): Add compilation database path to build dir Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- .clangd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.clangd b/.clangd index 6c614a474..ef4ec52cd 100644 --- a/.clangd +++ b/.clangd @@ -4,3 +4,6 @@ --- Diagnostics: UnusedIncludes: Strict + +CompileFlags: + CompilationDatabase: build From e5c1fbc78c8563fb5d6657e9384335333e2d21ac Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Fri, 7 Aug 2026 23:09:41 +0200 Subject: [PATCH 60/84] feat(config): Validate configuration against JSON schema - Remove villas-conf2json and villas-test-config - Add villas-config tool for migration and validation Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- common/include/villas/jansson.hpp | 15 +- include/villas/api/response.hpp | 3 +- include/villas/format.hpp | 20 ++ include/villas/hook.hpp | 21 ++ include/villas/node.hpp | 26 ++ include/villas/super_node.hpp | 39 ++- lib/api/requests/config.cpp | 5 +- lib/api/requests/restart.cpp | 2 +- lib/node.cpp | 191 +++++++++++- lib/node_direction.cpp | 37 +-- lib/nodes/c37_118.cpp | 1 - lib/nodes/ethercat.cpp | 16 +- lib/nodes/fpga.cpp | 6 +- lib/super_node.cpp | 287 ++++++++++++++++--- src/CMakeLists.txt | 15 +- src/villas-conf2json.cpp | 87 ------ src/villas-config.cpp | 136 +++++++++ src/villas-graph.cpp | 22 +- src/villas-node.cpp | 34 ++- src/villas-pipe.cpp | 29 +- src/villas-test-config.cpp | 120 -------- tests/integration/CMakeLists.txt | 1 + tests/integration/api-config.sh | 2 +- tests/integration/api-stress.sh | 2 +- tests/integration/missing-example-configs.sh | 45 --- tests/integration/test-config.sh | 63 ++-- tests/unit/config.cpp | 1 - tools/villas | 2 +- 28 files changed, 766 insertions(+), 462 deletions(-) delete mode 100644 src/villas-conf2json.cpp create mode 100644 src/villas-config.cpp delete mode 100644 src/villas-test-config.cpp delete mode 100755 tests/integration/missing-example-configs.sh diff --git a/common/include/villas/jansson.hpp b/common/include/villas/jansson.hpp index e8de619b3..026db68cb 100644 --- a/common/include/villas/jansson.hpp +++ b/common/include/villas/jansson.hpp @@ -43,12 +43,7 @@ class JanssonPtr { ::json_t *release() { return std::exchange(inner, nullptr); } - void reset() { - json_decref(inner); - inner = nullptr; - } - - void reset(::json_t *json) { + void reset(::json_t *json = nullptr) { json_decref(inner); inner = json_incref(json); } @@ -56,8 +51,12 @@ class JanssonPtr { void swap(JanssonPtr &other) { std::swap(inner, other.inner); } operator bool() { return inner != nullptr; } - ::json_t *get() const { return inner; } - ::json_t *operator->() const { return inner; } + + ::json_t const *get() const { return inner; } + ::json_t *get() { return inner; } + + ::json_t const *operator->() const { return inner; } + ::json_t *operator->() { return inner; } friend void swap(JanssonPtr &lhs, JanssonPtr &rhs) { lhs.swap(rhs); } friend auto operator<=>(JanssonPtr const &, JanssonPtr const &) = default; diff --git a/include/villas/api/response.hpp b/include/villas/api/response.hpp index dea447370..05bb89e6e 100644 --- a/include/villas/api/response.hpp +++ b/include/villas/api/response.hpp @@ -9,11 +9,10 @@ #include -#include - #include #include #include +#include #include #include diff --git a/include/villas/format.hpp b/include/villas/format.hpp index 56f0fde18..78f021e92 100644 --- a/include/villas/format.hpp +++ b/include/villas/format.hpp @@ -8,8 +8,10 @@ #pragma once #include +#include #include +#include #include #include #include @@ -115,10 +117,28 @@ class BinaryFormat : public Format { }; class FormatFactory : public plugin::Plugin { + std::optional schema; public: using plugin::Plugin::Plugin; + JsonSchema const &getSchema() { + if (schema) + return *schema; + + static auto const &schemas = bundled_schemas(); + static auto const &mapping = schemas.at( + "/components/schemas/Format/discriminator/mapping"_json_pointer); + auto uri = JsonUri(mapping.at(getName()).get_ref()); + return schema.emplace(schemas.at(uri.pointer())); + } + + /* Compute a JSON Patch which migrates a deprecated format configuration. + * + * @return A JSON Patch with paths relative to json. + */ + virtual Json migrate(Json const &json) const { return Json::array(); } + virtual Format *make() = 0; static Format *make(json_t *json); diff --git a/include/villas/hook.hpp b/include/villas/hook.hpp index b0a731ba5..6a8a74874 100644 --- a/include/villas/hook.hpp +++ b/include/villas/hook.hpp @@ -11,9 +11,12 @@ #pragma once +#include + #include #include #include +#include #include #include #include @@ -175,6 +178,7 @@ class LimitHook : public Hook { }; class HookFactory : public plugin::Plugin { + std::optional schema; protected: virtual void init(Hook::Ptr h) { @@ -185,6 +189,23 @@ class HookFactory : public plugin::Plugin { public: using plugin::Plugin::Plugin; + JsonSchema const &getSchema() { + if (schema) + return *schema; + + static auto const &schemas = bundled_schemas(); + static auto const &mapping = schemas.at( + "/components/schemas/Hook/discriminator/mapping"_json_pointer); + auto uri = JsonUri(mapping.at(getName()).get_ref()); + return schema.emplace(schemas.at(uri.pointer())); + } + + /* Compute a JSON Patch which migrates a deprecated hook configuration. + * + * @return A JSON Patch with paths relative to json. + */ + virtual Json migrate(Json const &json) const { return Json::array(); } + virtual Hook::Ptr make(Path *p, Node *n) = 0; virtual int getFlags() const = 0; diff --git a/include/villas/node.hpp b/include/villas/node.hpp index 021b03851..7a88ba0ad 100644 --- a/include/villas/node.hpp +++ b/include/villas/node.hpp @@ -8,6 +8,7 @@ #pragma once #include +#include #include #include @@ -17,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -277,6 +279,7 @@ class Node { }; class NodeFactory : public villas::plugin::Plugin { + std::optional schema; friend Node; @@ -316,6 +319,29 @@ class NodeFactory : public villas::plugin::Plugin { static Node *make(const std::string &type, const uuid_t &id = {}, const std::string &name = ""); + JsonSchema const &getSchema() { + if (schema) + return *schema; + + static auto const &schemas = bundled_schemas(); + static auto const &mapping = schemas.at( + "/components/schemas/Node/discriminator/mapping"_json_pointer); + auto uri = JsonUri(mapping.at(getName()).get_ref()); + return schema.emplace(schemas.at(uri.pointer())); + } + + /* Compute a JSON Patch which migrates a deprecated node configuration. + * + * The base implementation covers the settings which are shared between all + * node-types. Since the operations of a patch are relative to the state left + * by the preceding ones, an override can not merge its own patch with the + * one of the base implementation. It has to apply the base patch first and + * compute its own operations against the result. + * + * @return A JSON Patch with paths relative to json. + */ + virtual Json migrate(Json const &json) const; + std::string getType() const override { return "node"; } friend std::ostream &operator<<(std::ostream &os, const NodeFactory &f) { diff --git a/include/villas/super_node.hpp b/include/villas/super_node.hpp index 7f197ebfb..77d3c991d 100644 --- a/include/villas/super_node.hpp +++ b/include/villas/super_node.hpp @@ -18,7 +18,7 @@ extern "C" { #include #include #include -#include +#include #include #include #include @@ -28,14 +28,19 @@ extern "C" { #include namespace villas { + namespace node { // Forward declarations class Node; +struct SuperNodeValidateOptions { + bool apply_migrations = false; + bool apply_defaults = false; +}; + // Global configuration class SuperNode { - protected: enum State state; @@ -67,28 +72,17 @@ class SuperNode { struct timespec started; // The time at which the instance has been started. - fs::path configPath; - JanssonPtr configRoot; // The configuration file. - -public: - // Inititalize configuration object before parsing the configuration. - SuperNode(); - - int init(); + fs::path search_path; + Json config; // The configuration file. - // Wrapper for parse() which loads the config first. - void parse(fs::path const &path); - - /* Parse super-node configuration. - * - * @param json A libjansson object which contains the configuration. - */ void parse(json_t *json); - - // Check validity of super node configuration. void check(); - // Initialize after parsing the configuration file. +public: + SuperNode(Json config, fs::path search_path = {}); + + static void validate(Json &config, SuperNodeValidateOptions const &opts); + void prepare(); void start(); void stop(); @@ -138,9 +132,8 @@ class SuperNode { Web *getWeb() { return &web; } #endif - json_t *getConfig() { return configRoot.get(); } - - fs::path const &getConfigPath() const { return configPath; } + Json const &getConfig() const { return config; } + fs::path const &getSearchPath() const { return search_path; } int getAffinity() const { return affinity; } diff --git a/lib/api/requests/config.cpp b/lib/api/requests/config.cpp index 2332f35b9..648efb3cd 100644 --- a/lib/api/requests/config.cpp +++ b/lib/api/requests/config.cpp @@ -20,7 +20,7 @@ class ConfigRequest : public Request { using Request::Request; Response *execute() override { - json_t *json = session->getSuperNode()->getConfig(); + JanssonPtr json = session->getSuperNode()->getConfig(); if (method != Session::Method::GET) throw Error::invalidMethod(this); @@ -29,8 +29,7 @@ class ConfigRequest : public Request { throw Error::badRequest(nullptr, "Config endpoint does not accept any body data"); - auto *json_config = json ? json_incref(json) : json_object(); - + auto *json_config = json ? json.release() : json_object(); return new JsonResponse(session, HTTP_STATUS_OK, json_config); } }; diff --git a/lib/api/requests/restart.cpp b/lib/api/requests/restart.cpp index fb9fa4f8f..ec2baf7df 100644 --- a/lib/api/requests/restart.cpp +++ b/lib/api/requests/restart.cpp @@ -81,7 +81,7 @@ class RestartRequest : public Request { nullptr, "Parameter 'config' must be either a URL (string) or " "a configuration (object)"); } else // If no config is provided via request, we will use the previous one - configUri = session->getSuperNode()->getConfigPath(); + configUri = session->getSuperNode()->getSearchPath(); logger->info("Restarting to {}", configUri); diff --git a/lib/node.cpp b/lib/node.cpp index 59718db6b..bd559cb4e 100644 --- a/lib/node.cpp +++ b/lib/node.cpp @@ -5,6 +5,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include +#include #include #include @@ -27,6 +29,7 @@ extern "C" { #include #include #include +#include #include #include #include @@ -41,6 +44,7 @@ extern "C" { using namespace villas; using namespace villas::node; using namespace villas::utils; +using namespace std::string_view_literals; Node::Node(const uuid_t &id, const std::string &name) : logger(Log::get("node")), sequence_init(0), sequence(0), @@ -143,8 +147,6 @@ int Node::parse(json_t *json) { NodeDirection *dir; } dirs[] = {{"in", &in}, {"out", &out}}; - const char *fields[] = {"signals", "builtin", "vectorize", "hooks"}; - for (unsigned j = 0; j < std::size(dirs); j++) { json_t *json_dir = json_object_get(json, dirs[j].str); @@ -153,15 +155,6 @@ int Node::parse(json_t *json) { json_dir = json_pack("{ s: b }", "enabled", 0); } - // Copy missing fields from main node config to direction config - for (unsigned i = 0; i < std::size(fields); i++) { - json_t *json_field_dir = json_object_get(json_dir, fields[i]); - json_t *json_field_node = json_object_get(json, fields[i]); - - if (json_field_node && !json_field_dir) - json_object_set(json_dir, fields[i], json_field_node); - } - ret = dirs[j].dir->parse(json_dir); if (ret) return ret; @@ -470,6 +463,182 @@ Node *NodeFactory::make(const std::string &type, const uuid_t &id, return nf->make(id, name); } +/* A homogenous signal list used to be expressed as a single signal description + * carrying a `count` attribute. Expand it into a list of `count` copies, with + * the index appended to the name of each copy. + * + * @return The expanded list, or nothing if signals is not a `count` shorthand. + */ +static std::optional expand_signal_count(Json const &signals) { + if (not signals.is_object()) + return std::nullopt; + + auto count = signals.find("count"); + if (count == signals.end() or not count->is_number_integer()) + return std::nullopt; + + auto n = count->get(); + if (n < 0) + return std::nullopt; + + auto signal = signals; + signal.erase("count"); + + auto expanded = Json::array(); + for (std::int64_t index = 0; index < n; index++) { + auto element = signal; + + if (auto name = element.find("name"); + name != element.end() and name->is_string()) + *name = fmt::format("{}{}", name->get_ref(), index); + + expanded.push_back(std::move(element)); + } + + return expanded; +} + +/* A signal list used to be expressed as a format string of type characters, + * each optionally prefixed by a repetition count. Expand it into a list of + * consecutively numbered signals. + * + * @return The expanded list, or nothing if format is not a valid format + * string. Schema validation reports it in that case. + */ +static std::optional expand_signal_format(std::string const &format) { + auto expanded = Json::array(); + + for (auto pos = std::size_t{0}; pos < format.size();) { + auto digits = format.find_first_not_of("0123456789", pos); + if (digits == std::string::npos) + return std::nullopt; // A repetition count without a type character. + + // The repetition count is optional and defaults to one. + auto count = std::size_t{1}; + if (digits != pos) { + auto [_, ec] = + std::from_chars(format.data() + pos, format.data() + digits, count); + if (ec != std::errc{}) + return std::nullopt; + } + + auto type = signalTypeFromFormatString(format[digits]); + if (type == SignalType::INVALID) + return std::nullopt; + + for (auto index = std::size_t{0}; index < count; index++) + expanded.push_back(Json::object({ + {"name", fmt::format("signal{}", expanded.size())}, + {"type", signalTypeToString(type)}, + })); + + pos = digits + 1; + } + + return expanded; +} + +// Expand the deprecated shorthands for a signal list. +static std::optional migrate_signal_list(Json const &signals) { + if (signals.is_object()) + return expand_signal_count(signals); + + if (signals.is_string()) + return expand_signal_format(signals.get_ref()); + + return std::nullopt; +} + +Json NodeFactory::migrate(Json const &json) const { + auto patch = Json::array(); + + if (not json.is_object()) + return patch; + + auto create = false; + for (auto const &setting : {"builtin"sv, "vectorize"sv, "hooks"sv}) { + auto value = json.find(setting); + if (value == json.end()) + continue; + + for (auto const &direction : {"in"sv, "out"sv}) { + auto dir = json.find(direction); + if (dir != json.end() and (!dir->is_object() or dir->contains(setting))) + continue; + + auto path = JsonPointer{} / std::string(direction) / std::string(setting); + patch.push_back(Json::object({ + {"op", "add"}, + {"path", path.to_string()}, + {"value", *value}, + })); + + create = true; + } + + auto path = JsonPointer{} / std::string(setting); + patch.push_back(Json::object({ + {"op", "remove"}, + {"path", path.to_string()}, + })); + } + + auto signals = std::invoke([&]() -> std::optional { + if (auto it = json.find("signals"); it != json.end()) { + patch.push_back(Json::object({ + {"op", "remove"}, + {"path", "/signals"}, + })); + + return migrate_signal_list(*it).value_or(*it); + } + + return std::nullopt; + }); + + for (auto const &direction : {"in"sv, "out"sv}) { + auto dir = json.find(direction); + auto path = JsonPointer{} / std::string(direction) / "signals"; + + if (dir != json.end() and dir->contains("signals")) { + if (auto new_signals = migrate_signal_list(dir->at("signals"))) + patch.push_back(Json::object({ + {"op", "replace"}, + {"path", path.to_string()}, + {"value", *new_signals}, + })); + } else if (signals) { + patch.push_back(Json::object({ + {"op", "add"}, + {"path", path.to_string()}, + {"value", *signals}, + })); + + create = true; + } + } + + if (create) { + if (not json.contains("in")) + patch.insert(patch.begin(), + {Json::object({ + {"op", "add"}, + {"path", "/in"}, + {"value", Json::object({{"enabled", false}})}, + })}); + + if (not json.contains("out")) + patch.insert(patch.begin(), + {Json::object({ + {"op", "add"}, + {"path", "/out"}, + {"value", Json::object({{"enabled", false}})}, + })}); + } + + return patch; +} + int NodeFactory::start(SuperNode *sn) { getLogger()->info("Initialized node type which is used by {} nodes", instances.size()); diff --git a/lib/node_direction.cpp b/lib/node_direction.cpp index ff32fcbd7..8c43a329e 100644 --- a/lib/node_direction.cpp +++ b/lib/node_direction.cpp @@ -43,50 +43,15 @@ int NodeDirection::parse(json_t *json) { signals = std::make_shared(); if (!signals) throw MemoryAllocationError(); - } else if (json_is_object(json_signals) || json_is_array(json_signals)) { + } else if (json_is_array(json_signals)) { signals = std::make_shared(); if (!signals) throw MemoryAllocationError(); - if (json_is_object(json_signals)) { - json_t *json_name, *json_signal = json_signals; - int count; - - janssonUnpack(json_signal, "{ s: i }", "count", &count); - - json_signals = json_array(); - for (int i = 0; i < count; i++) { - json_t *json_signal_copy = json_copy(json_signal); - - json_object_del(json_signal, "count"); - - // Append signal index - json_name = json_object_get(json_signal_copy, "name"); - if (json_name) { - const char *name = json_string_value(json_name); - char *name_new; - - int ret __attribute__((unused)); - ret = asprintf(&name_new, "%s%d", name, i); - - json_string_set(json_name, name_new); - } - - json_array_append_new(json_signals, json_signal_copy); - } - json_object_set_new(json, "signals", json_signals); - } - ret = signals->parse(json_signals); if (ret) throw ConfigError(json_signals, "node-config-node-signals", "Failed to parse signal definition"); - } else if (json_is_string(json_signals)) { - const char *dt = json_string_value(json_signals); - - signals = std::make_shared(dt); - if (!signals) - return -1; } else { signals = std::make_shared(DEFAULT_SAMPLE_LENGTH, SignalType::FLOAT); diff --git a/lib/nodes/c37_118.cpp b/lib/nodes/c37_118.cpp index ce4e6a3d8..8612bee21 100644 --- a/lib/nodes/c37_118.cpp +++ b/lib/nodes/c37_118.cpp @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/lib/nodes/ethercat.cpp b/lib/nodes/ethercat.cpp index acd0c120d..2a34ee3bd 100644 --- a/lib/nodes/ethercat.cpp +++ b/lib/nodes/ethercat.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -100,15 +101,16 @@ int villas::node::ethercat_type_start(villas::node::SuperNode *sn) { if (sn == nullptr) throw RuntimeError("EtherCAT node-type requires super-node"); - json_t *json = sn->getConfig(); + JanssonPtr json = sn->getConfig(); if (json) { - ret = json_unpack_ex( - json, &err, 0, "{ s?: i, s?:i, s?: { s?: { s?: i, s?: i, s?: i } } }", - "ethernet", "master", &master_id, "alias", &alias, "coupler", - "position", &coupler.position, "product_code", &coupler.product_code, - "vendor_id", &coupler.vendor_id); + ret = + json_unpack_ex(json.get(), &err, 0, + "{ s?: i, s?:i, s?: { s?: { s?: i, s?: i, s?: i } } }", + "ethernet", "master", &master_id, "alias", &alias, + "coupler", "position", &coupler.position, "product_code", + &coupler.product_code, "vendor_id", &coupler.vendor_id); if (ret) - throw ConfigError(json, err, "node-config-node-ethercat"); + throw ConfigError(json.get(), err, "node-config-node-ethercat"); } master = ecrt_request_master(master_id); diff --git a/lib/nodes/fpga.cpp b/lib/nodes/fpga.cpp index e4af36d3b..3ddf08edf 100644 --- a/lib/nodes/fpga.cpp +++ b/lib/nodes/fpga.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -381,8 +382,9 @@ int FpgaNodeFactory::start(SuperNode *sn) { } if (cards.empty()) { - auto searchPath = sn->getConfigPath(); - createCards(sn->getConfig(), cards, searchPath, vfioContainer); + JanssonPtr config = sn->getConfig(); + auto searchPath = sn->getSearchPath(); + createCards(config.get(), cards, searchPath, vfioContainer); } return NodeFactory::start(sn); diff --git a/lib/super_node.cpp b/lib/super_node.cpp index 6dc94eeb7..b664cab31 100644 --- a/lib/super_node.cpp +++ b/lib/super_node.cpp @@ -7,24 +7,28 @@ #include #include - -#include +#include #include +#include +#include +#include #include +#include +#include #include #include #include #include #include +#include #include #include +#include #include #include #include -#include "villas/json.hpp" - #ifdef WITH_NETEM #include #endif @@ -32,7 +36,7 @@ using namespace villas; using namespace villas::node; -SuperNode::SuperNode() +SuperNode::SuperNode(Json config, fs::path search_path) : state(State::INITIALIZED), idleStop(false), #ifdef WITH_API api(this), @@ -45,7 +49,8 @@ SuperNode::SuperNode() #endif #endif seed(0), priority(0), affinity(0), hugepages(DEFAULT_NR_HUGEPAGES), - statsRate(1.0), task(), started(time_now()) { + statsRate(1.0), task(), started(time_now()), + search_path(std::move(search_path)), config(std::move(config)) { int ret; char hname[128]; @@ -61,20 +66,244 @@ SuperNode::SuperNode() #endif // WITH_NETEM logger = Log::get("super_node"); + + try { + validate(this->config, { + .apply_migrations = true, + .apply_defaults = true, + }); + } catch (JsonError const &error) { + for (auto const &[ptr, msg] : error) { + if (not ptr.empty()) + logger->error("config[{}]: {}", ptr, msg); + else + logger->error("config[/]: {}", msg); + } + + throw RuntimeError("Failed to parse configuration"); + } + + JanssonPtr jansson = this->config; + parse(jansson.get()); + check(); +} + +// migrate path `reverse` property +static Json migrate_paths(Json const &json) { + auto patch = Json::array(); + + auto paths = json.find("paths"); + if (paths == json.end() or not paths->is_array()) + return patch; + + for (auto const index : std::views::iota(size_t(0), paths->size())) { + auto const &path = (*paths)[index]; + if (not path.is_object()) + continue; + + auto reverse = path.find("reverse"); + if (reverse == path.end()) + continue; + + auto ptr = "/paths"_json_pointer / index; + + if (reverse->is_boolean() and reverse->get()) { + auto in = path.find("in"); + auto out = path.find("out"); + + if (in == path.end() or not in->is_string() or + not Node::isValidName(in->get_ref()) or + out == path.end() or not out->is_string() or + not Node::isValidName(out->get_ref())) + throw JsonError({ + .pointer = ptr, + .message = "Only a path between two single nodes can be reversed", + }); + + if (*in == *out) + throw JsonError({ + .pointer = ptr, + .message = "Can not reverse a path with identical in and out nodes", + }); + + auto reversed = path; + reversed.erase("reverse"); + reversed["in"] = *out; + reversed["out"] = *in; + + patch.push_back(Json::object({ + {"op", "add"}, + {"path", ("/paths"_json_pointer / "-").to_string()}, + {"value", std::move(reversed)}, + })); + } + + patch.push_back(Json::object({ + {"op", "remove"}, + {"path", (ptr / "reverse").to_string()}, + })); + } + + return patch; +} + +static void validate_walk_schema(Json &instance, JsonPointer const &ptr, + Json const &schema, + SuperNodeValidateOptions const &opts); + +template +static void validate_plugin(Json &instance, JsonPointer const &ptr, + SuperNodeValidateOptions const &opts) { + Json name; + if (instance.is_string()) + name = instance; + else if (instance.is_object() and instance.contains("type")) + name = instance["type"]; + else + throw JsonError({ + .pointer = ptr, + .message = fmt::format("unknown plugin type"), + }); + + auto factory = plugin::registry->lookup(name); + if (not factory) { + throw JsonError({ + .pointer = instance.is_string() ? ptr : ptr / "type", + .message = fmt::format("unknown plugin type '{}'", name), + }); + } + + if (instance.is_object()) { + auto const &schema = factory->getSchema(); + + if (opts.apply_migrations) { + Json migration_patch = + JsonError::context(ptr, [&]() { return factory->migrate(instance); }); + + auto logger = factory->getLogger(); + for (auto const &op : migration_patch) + logger->warn("migrate[{}]: {}", ptr, op); + + instance.patch_inplace(migration_patch); + } + + auto default_values = + JsonError::context(ptr, [&]() { return schema.validate(instance); }); + if (opts.apply_defaults) + instance.patch_inplace(default_values); + + validate_walk_schema(instance, ptr, schema.json(), opts); + } } -void SuperNode::parse(fs::path const &path) { - configPath = path; +static void validate_walk_schema(Json &instance, JsonPointer const &ptr, + Json const &schema, + SuperNodeValidateOptions const &opts) { + if (not schema.is_object()) + return; + + std::vector diagnostics; + + if (auto discriminator = schema.find("discriminator"); + discriminator != schema.end()) { + if (auto plugin = discriminator->find("x-villas-plugin"); + plugin != discriminator->end()) { + try { + if (*plugin == "node") + validate_plugin(instance, ptr, opts); + else if (*plugin == "hook") + validate_plugin(instance, ptr, opts); + else if (*plugin == "format") + validate_plugin(instance, ptr, opts); + else + throw RuntimeError("invalid x-villas-plugin annotation {} in schema", + *plugin); + } catch (JsonError &error) { + diagnostics.insert(diagnostics.end(), error.begin(), error.end()); + } + } + } + + auto properties = schema.value("properties", Json::object()); + auto additionalProperties = schema.find("additionalProperties"); + if (instance.is_object() and + (not properties.empty() or additionalProperties != schema.end())) { + for (auto const &[property, value] : instance.items()) { + try { + if (auto subschema = properties.find(property); + subschema != properties.end()) + validate_walk_schema(value, ptr / property, *subschema, opts); + else if (additionalProperties != schema.end()) + validate_walk_schema(value, ptr / property, *additionalProperties, + opts); + } catch (JsonError &error) { + diagnostics.insert(diagnostics.end(), error.begin(), error.end()); + } + } + } + + if (auto items = schema.find("items"); + instance.is_array() and items != schema.end()) { + if (items->is_array()) { + auto additionalItems = schema.find("additionalItems"); + for (auto const index : std::views::iota(size_t(0), instance.size())) { + try { + if (index < items->size()) + validate_walk_schema(instance[index], ptr / index, (*items)[index], + opts); + else if (additionalItems != schema.end()) + validate_walk_schema(instance[index], ptr / index, *additionalItems, + opts); + else + break; + } catch (JsonError &error) { + diagnostics.insert(diagnostics.end(), error.begin(), error.end()); + } + } + } else { + for (auto const index : std::views::iota(size_t(0), instance.size())) { + try { + validate_walk_schema(instance[index], ptr / index, *items, opts); + } catch (JsonError &error) { + diagnostics.insert(diagnostics.end(), error.begin(), error.end()); + } + } + } + } + + if (auto subschemas = schema.find("allOf"); subschemas != schema.end()) { + for (auto const &subschema : *subschemas) { + try { + validate_walk_schema(instance, ptr, subschema, opts); + } catch (JsonError &error) { + diagnostics.insert(diagnostics.end(), error.begin(), error.end()); + } + } + } + + if (not diagnostics.empty()) + throw JsonError(diagnostics); +} + +void SuperNode::validate(Json &json, const SuperNodeValidateOptions &opts) { + static auto schema = JsonSchema( + bundled_schemas().at("/components/schemas/Config"_json_pointer)); + + if (opts.apply_migrations) { + Json patch = migrate_paths(json); + + auto logger = Log::get("super_node"); + for (auto const &op : patch) + logger->warn("migration: {}", op); + + json.patch_inplace(patch); + } - load_config_file(path, - { - .allow_libconfig = true, - .allow_environment = true, - .allow_include = true, - }) - .get_to(configRoot); + auto default_values = schema.validate(json); + if (opts.apply_defaults) + json.patch_inplace(default_values); - parse(configRoot.get()); + validate_walk_schema(json, JsonPointer{}, schema.json(), opts); } void SuperNode::parse(json_t *root) { @@ -162,7 +391,7 @@ void SuperNode::parse(json_t *root) { if (!n) throw MemoryAllocationError(); - n->configPath = getConfigPath(); + n->configPath = getSearchPath(); ret = n->parse(json_node); if (ret) { @@ -184,7 +413,6 @@ void SuperNode::parse(json_t *root) { size_t i; json_t *json_path; json_array_foreach (json_paths, i, json_path) { - parse: auto *p = new Path(); if (!p) throw MemoryAllocationError(); @@ -192,29 +420,6 @@ void SuperNode::parse(json_t *root) { p->parse(json_path, nodes, uuid); paths.push_back(p); - - if (p->isReversed()) { - // Only simple paths can be reversed - ret = p->isSimple(); - if (!ret) - throw RuntimeError("Complex paths can not be reversed!"); - - // Parse a second time with in/out reversed - json_path = json_copy(json_path); - - json_t *json_in = json_object_get(json_path, "in"); - json_t *json_out = json_object_get(json_path, "out"); - - if (json_equal(json_in, json_out)) - throw RuntimeError( - "Can not reverse path with identical in/out nodes!"); - - json_object_set(json_path, "reverse", json_false()); - json_object_set(json_path, "in", json_out); - json_object_set(json_path, "out", json_in); - - goto parse; - } } } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7fd670bb4..8212b9b4a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,20 +5,20 @@ # SPDX-License-Identifier: Apache-2.0 set(SRCS + villas-config villas-convert villas-node villas-pipe villas-signal villas-compare - villas-test-config ) +add_executable(villas-config villas-config.cpp) +target_link_libraries(villas-config PUBLIC villas) + add_executable(villas-node villas-node.cpp) target_link_libraries(villas-node PUBLIC villas) -add_executable(villas-test-config villas-test-config.cpp) -target_link_libraries(villas-test-config PUBLIC villas) - add_executable(villas-compare villas-compare.cpp) target_link_libraries(villas-compare PUBLIC villas) @@ -46,13 +46,6 @@ if(WITH_WEB) list(APPEND SRCS villas-relay) endif() -if(WITH_CONFIG) - add_executable(villas-conf2json villas-conf2json.cpp) - target_link_libraries(villas-conf2json PUBLIC villas) - - list(APPEND SRCS villas-conf2json) -endif() - if(LIBZMQ_FOUND) add_executable(villas-zmq-keygen villas-zmq-keygen.cpp) target_link_libraries(villas-zmq-keygen PUBLIC villas-common PkgConfig::LIBZMQ) diff --git a/src/villas-conf2json.cpp b/src/villas-conf2json.cpp deleted file mode 100644 index 14710818c..000000000 --- a/src/villas-conf2json.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* Convert old style config to new JSON format. - * - * Author: Steffen Vogel - * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University - * SPDX-License-Identifier: Apache-2.0 - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include - -namespace villas { -namespace node { -namespace tools { - -class Config2Json : public Tool { - -public: - Config2Json(int argc, char *argv[]) : Tool(argc, argv, "conf2json") {} - -protected: - void usage() override { - std::cout << "Usage: conf2json input.conf > output.json" << std::endl - << std::endl; - - printCopyright(); - } - - int main() override { - int ret; - config_t cfg; - config_setting_t *cfg_root; - json_t *json; - - if (argc != 2) { - usage(); - exit(EXIT_FAILURE); - } - - FILE *f = fopen(argv[1], "r"); - if (f == nullptr) - return -1; - - const char *confdir = dirname(argv[1]); - - config_init(&cfg); - - config_set_include_dir(&cfg, confdir); - - ret = config_read(&cfg, f); - if (ret != CONFIG_TRUE) - return -2; - - cfg_root = config_root_setting(&cfg); - - json = config_to_json(cfg_root); - if (!json) - return -3; - - ret = json_dumpf(json, stdout, JSON_INDENT(2)); - fflush(stdout); - if (ret) - return ret; - - json_decref(json); - config_destroy(&cfg); - - return 0; - } -}; - -} // namespace tools -} // namespace node -} // namespace villas - -int main(int argc, char *argv[]) { - villas::node::tools::Config2Json t(argc, argv); - - return t.run(); -} diff --git a/src/villas-config.cpp b/src/villas-config.cpp new file mode 100644 index 000000000..fe8145bc9 --- /dev/null +++ b/src/villas-config.cpp @@ -0,0 +1,136 @@ +/* Inspect and convert VILLASnode configuration files. + * + * Author: Steffen Vogel + * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +namespace villas { +namespace node { +namespace tools { + +class Config : public Tool { + +public: + Config(int argc, char *argv[]) + : Tool(argc, argv, "config"), apply_migrations(false), + apply_defaults(false), quiet(false) {} + +protected: + fs::path config_path; + bool apply_migrations; + bool apply_defaults; + bool quiet; + + void usage() override { + std::cout << "Usage: villas-config [OPTIONS] CONFIG" << std::endl + << " CONFIG is the path to a configuration file" << std::endl + << " OPTIONS is one or more of the following options:" + << std::endl + << " -m apply configuration migrations" << std::endl + << " -D apply default values from the schemas" + << std::endl + << " -q do not write the configuration to stdout" + << std::endl + << " -d LVL set debug level" << std::endl + << " -V show version and exit" << std::endl + << " -h show usage and exit" << std::endl + << std::endl; + + printCopyright(); + } + + void parse() override { + int c; + while ((c = getopt(argc, argv, "hVmDqd:")) != -1) { + switch (c) { + case 'm': + apply_migrations = true; + break; + + case 'D': + apply_defaults = true; + break; + + case 'q': + quiet = true; + break; + + case 'd': + Log::getInstance().setLevel(optarg); + break; + + case 'V': + printVersion(); + exit(EXIT_SUCCESS); + + case 'h': + case '?': + usage(); + exit(c == '?' ? EXIT_FAILURE : EXIT_SUCCESS); + } + } + + if (argc - optind != 1) { + usage(); + exit(EXIT_FAILURE); + } + + config_path = argv[optind]; + } + + int main() override { + Json config; + + try { + config = load_config_file(config_path, { + .allow_libconfig = true, + .allow_environment = true, + .allow_include = true, + }); + + SuperNode::validate(config, { + .apply_migrations = apply_migrations, + .apply_defaults = apply_defaults, + }); + + logger->info("Configuration validated successfully"); + } catch (const JsonError &error) { + for (auto const &[ptr, msg] : error) { + if (not ptr.empty()) + logger->error("config[{}]: {}", ptr, msg); + else + logger->error("config[/]: {}", msg); + } + + return 1; + } + + if (!quiet) + std::cout << config.dump(2) << std::endl; + + return 0; + } +}; + +} // namespace tools +} // namespace node +} // namespace villas + +int main(int argc, char *argv[]) { + villas::node::tools::Config t(argc, argv); + + return t.run(); +} diff --git a/src/villas-graph.cpp b/src/villas-graph.cpp index 7e810843d..b60f90efb 100644 --- a/src/villas-graph.cpp +++ b/src/villas-graph.cpp @@ -53,8 +53,7 @@ class Graph : public Tool { protected: GVC_t *gvc; graph_t *graph; - - std::string configFilename; + fs::path config_path; void usage() override { std::cout << "Usage: villas-graph [OPTIONS]" << std::endl @@ -74,7 +73,7 @@ class Graph : public Tool { if (i == 0) throw RuntimeError("No configuration file given!"); - configFilename = filenames.front(); + config_path = filenames.front(); } void handler(int signal, siginfo_t *siginfp, void *) override { @@ -99,18 +98,17 @@ class Graph : public Tool { } int main() override { - int ret; - - villas::node::SuperNode sn; + auto config = load_config_file(config_path, { + .allow_libconfig = true, + .allow_environment = true, + .allow_include = true, + }); - sn.parse(configFilename); - sn.check(); - sn.prepare(); + villas::node::SuperNode sn(std::move(config), config_path.parent_path()); graph = sn.getGraph(); - - ret = gvLayoutJobs(gvc, graph); // Take layout engine from command line - if (ret) + if (auto ret = + gvLayoutJobs(gvc, graph)) // Take layout engine from command line return ret; return gvRenderJobs(gvc, graph); diff --git a/src/villas-node.cpp b/src/villas-node.cpp index 858ef5aaa..40957dfc5 100644 --- a/src/villas-node.cpp +++ b/src/villas-node.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -46,9 +47,8 @@ class Node : public Tool { Node(int argc, char *argv[]) : Tool(argc, argv, "node") {} protected: - SuperNode sn; - - std::string uri; + SuperNode *super_node; + fs::path config_path; bool showCapabilities = false; void handler(int signal, siginfo_t *sinfo, void *ctx) override { @@ -61,7 +61,8 @@ class Node : public Tool { logger->info("Received {} signal. Terminating...", strsignal(signal)); } - sn.setState(State::STOPPING); + if (super_node) + super_node->setState(State::STOPPING); } void usage() override { @@ -146,7 +147,7 @@ class Node : public Tool { } if (argc == optind + 1) - uri = argv[optind]; + config_path = argv[optind]; else if (argc != optind) { usage(); exit(EXIT_FAILURE); @@ -164,13 +165,24 @@ class Node : public Tool { } int daemon() { - if (!uri.empty()) - sn.parse(uri); - else - logger->warn("No configuration file specified. Starting unconfigured. " - "Use the API to configure this instance."); + auto sn = std::invoke([&]() { + if (config_path.empty()) { + logger->warn("No configuration file specified. Starting unconfigured. " + "Use the API to configure this instance."); + + return SuperNode(Json::object()); + } + + auto config = load_config_file(config_path, { + .allow_libconfig = true, + .allow_environment = true, + .allow_include = true, + }); + + return SuperNode(config, config_path.parent_path()); + }); - sn.check(); + super_node = &sn; sn.prepare(); sn.start(); sn.run(); diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index ef293b32a..2363b4854 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -236,15 +236,14 @@ class Pipe : public Tool { protected: std::atomic stop; - SuperNode sn; // The global configuration Format *formatter; int timeout; bool reverse; std::string format; std::string dtypes; - std::string uri; - std::string nodestr; + fs::path config_path; + std::string node_name; json_t *config_cli; @@ -390,8 +389,8 @@ class Pipe : public Tool { exit(EXIT_FAILURE); } - uri = argv[optind]; - nodestr = argv[optind + 1]; + config_path = argv[optind]; + node_name = argv[optind + 1]; } int main() override { @@ -402,11 +401,13 @@ class Pipe : public Tool { logger->info("Logging level: {}", Log::getInstance().getLevelName()); - if (!uri.empty()) - sn.parse(uri); - else - logger->warn("No configuration file specified. Starting unconfigured. " - "Use the API to configure this instance."); + auto config = load_config_file(config_path, { + .allow_libconfig = true, + .allow_environment = true, + .allow_include = true, + }); + + villas::node::SuperNode sn(std::move(config), config_path.parent_path()); // Try parsing format config as JSON json_format = json_loads(format.c_str(), 0, &err); @@ -417,21 +418,21 @@ class Pipe : public Tool { formatter->start(dtypes); - node = sn.getNode(nodestr); + node = sn.getNode(node_name); if (!node) - throw RuntimeError("Node {} does not exist!", nodestr); + throw RuntimeError("Node {} does not exist!", node_name); if (recv.enabled && !(node->getFactory()->getFlags() & (int)NodeFactory::Flags::SUPPORTS_READ)) throw RuntimeError("Node {} can not receive data. Consider using " "send-only mode by using '-s' option", - nodestr); + node_name); if (send.enabled && !(node->getFactory()->getFlags() & (int)NodeFactory::Flags::SUPPORTS_WRITE)) throw RuntimeError("Node {} can not send data. Consider using " "receive-only mode by using '-r' option", - nodestr); + node_name); #if defined(WITH_NODE_WEBSOCKET) && defined(WITH_WEB) // Only start web subsystem if villas-pipe is used with a websocket node diff --git a/src/villas-test-config.cpp b/src/villas-test-config.cpp deleted file mode 100644 index c1933fb07..000000000 --- a/src/villas-test-config.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* Main routine. - * - * Author: Steffen Vogel - * SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University - * SPDX-License-Identifier: Apache-2.0 - */ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace villas; -using namespace villas::node; - -namespace villas { -namespace node { -namespace tools { - -class TestConfig : public Tool { - -public: - TestConfig(int argc, char *argv[]) - : Tool(argc, argv, "test-config"), check(false), dump(false) { - int ret; - - ret = memory::init(DEFAULT_NR_HUGEPAGES); - if (ret) - throw RuntimeError("Failed to initialize memory"); - } - -protected: - std::string uri; - - bool check; - bool dump; - - void usage() override { - std::cout << "Usage: villas-test-config [OPTIONS] CONFIG" << std::endl - << " CONFIG is the path to an optional configuration file" - << std::endl - << " OPTIONS is one or more of the following options:" - << std::endl - << " -d LVL set debug level" << std::endl - << " -V show version and exit" << std::endl - << " -c perform plausibility checks on config" - << std::endl - << " -D dump config in JSON format" << std::endl - << " -h show usage and exit" << std::endl - << std::endl; - - printCopyright(); - } - - void parse() override { - int c; - while ((c = getopt(argc, argv, "hcVDd:")) != -1) { - switch (c) { - case 'c': - check = true; - break; - - case 'd': - Log::getInstance().setLevel(optarg); - break; - - case 'D': - dump = true; - break; - - case 'V': - printVersion(); - exit(EXIT_SUCCESS); - - case 'h': - case '?': - usage(); - exit(c == '?' ? EXIT_FAILURE : EXIT_SUCCESS); - } - } - - if (argc - optind < 1) { - usage(); - exit(EXIT_FAILURE); - } - - uri = argv[optind]; - } - - int main() override { - SuperNode sn; - - sn.parse(uri); - - // if (check) - // sn.check(); - - // if (dump) - // json_dumpf(sn.getConfig(), stdout, JSON_INDENT(2)); - - return 0; - } -}; - -} // namespace tools -} // namespace node -} // namespace villas - -int main(int argc, char *argv[]) { - villas::node::tools::TestConfig t(argc, argv); - - return t.run(); -} diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 777ea498d..e7be67e0b 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -12,6 +12,7 @@ add_custom_target(run-integration-tests ${PROJECT_SOURCE_DIR}/tools/integration-tests.sh 2>&1 | c++filt\" USES_TERMINAL DEPENDS + villas-config villas-node villas-pipe villas-signal diff --git a/tests/integration/api-config.sh b/tests/integration/api-config.sh index 065a4aa50..a1e0faf95 100755 --- a/tests/integration/api-config.sh +++ b/tests/integration/api-config.sh @@ -45,4 +45,4 @@ curl -s http://localhost:8080/api/v2/config > fetched.json kill $! # Compare local config with the fetched one -diff -u <(jq -S . < fetched.json) <(jq -S . < config.json) +diff -u <(jq -S < fetched.json) <(villas config -m -D config.json | jq -S) diff --git a/tests/integration/api-stress.sh b/tests/integration/api-stress.sh index 98f906aa6..17cfee621 100755 --- a/tests/integration/api-stress.sh +++ b/tests/integration/api-stress.sh @@ -48,7 +48,7 @@ for J in $(seq 1 ${RUNS}); do FETCHED_CONF=$(mktemp -p ${DIR}) curl -s http://localhost:8080/api/v2/config > ${FETCHED_CONF} - diff -u <(jq -S . < ${FETCHED_CONF}) <(jq -S . < ${LOCAL_CONF}) + diff -u <(jq -S < ${FETCHED_CONF}) <(villas config -m -D ${LOCAL_CONF} | jq -S) RC=$? if [ "$RC" -eq "0" ]; then diff --git a/tests/integration/missing-example-configs.sh b/tests/integration/missing-example-configs.sh deleted file mode 100755 index 781b6f39b..000000000 --- a/tests/integration/missing-example-configs.sh +++ /dev/null @@ -1,45 +0,0 @@ - -#!/usr/bin/env bash -# -# Test example configurations -# -# Author: Steffen Vogel -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -NODE_TYPES=$(villas node -C 2>/dev/null | jq -r '.nodes | join(" ")') -HOOK_TYPES=$(villas node -C 2>/dev/null | jq -r '.hooks | join(" ")') -FORMAT_TYPES=$(villas node -C 2>/dev/null | jq -r '.formats | join(" ")') - -MISSING=0 - -for NODE in ${NODE_TYPES}; do - NODE=${NODE/./-} - [ ${NODE} == "loopback_internal" ] && continue - - if [ ! -f "${SRCDIR}/etc/examples/nodes/${NODE}.conf" ]; then - echo "Missing example config for node-type: ${NODE}" - ((MISSING++)) - fi -done - -for HOOK in ${HOOK_TYPES}; do - [ ${HOOK} == "restart" ] || \ - [ ${HOOK} == "drop" ] || \ - [ ${HOOK} == "fix" ] && continue - - if [ ! -f "${SRCDIR}/etc/examples/hooks/${HOOK}.conf" ]; then - echo "Missing example config for hook-type: ${HOOK}" - ((MISSING++)) - fi -done - -for FORMAT in ${FORMAT_TYPES}; do - FORMAT=${FORMAT/./-} - if [ ! -f "${SRCDIR}/etc/examples/formats/${FORMAT}.conf" ]; then - echo "Missing example config for format-type: ${FORMAT}" - ((MISSING++)) - fi -done - -(( ${MISSING} == 0 )) diff --git a/tests/integration/test-config.sh b/tests/integration/test-config.sh index 277c3a4ce..fd61547a5 100755 --- a/tests/integration/test-config.sh +++ b/tests/integration/test-config.sh @@ -1,31 +1,48 @@ - #!/usr/bin/env bash # # Test example configurations # # Author: Steffen Vogel +# Author: Philipp Jungkamp # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 -set -e - -CONFIGS=$(find ${SRCDIR}/etc/ -name '*.conf' -o -name '*.json') - -for CONFIG in ${CONFIGS}; do - if [ "$(basename ${CONFIG})" == "opal_orchestra.conf" ] || - [ "$(basename ${CONFIG})" == "opal_async.conf" ] || - [ "$(basename ${CONFIG})" == "fpga.conf" ] || - [ "$(basename ${CONFIG})" == "fpga-miob.conf" ] || - [ "$(basename ${CONFIG})" == "paths.conf" ] || - [ "$(basename ${CONFIG})" == "tricks.json" ] || - [ "$(basename ${CONFIG})" == "tricks.conf" ] || - [ "$(basename ${CONFIG})" == "vc707_ips.conf" ] || - [ "$(basename ${CONFIG})" == "infiniband.conf" ] || - [ "$(basename ${CONFIG})" == "global.conf" ]; then - echo "=== Skipping config: ${CONFIG}" - continue - fi - - echo "=== Testing config: ${CONFIG}" - villas test-config -c ${CONFIG} -done +set -eo pipefail + +cd "${SRCDIR}/etc" + +export SKIP_REGEX='/(fpga|infiniband|opal-orchestra)\.(conf|json)$' + +{ + # only test examples for node types that have been included in the build + villas node -C | jq --raw-output0 ' + def examples(caps; $prefix): caps[] | $prefix + gsub("\\."; "-"); + examples(.hooks; "examples/hooks/"), + examples(.nodes; "examples/nodes/"), + examples(.formats; "examples/formats/") + ' + + # add other configurations explicitly using ls --zero + # ls --zero ... +} | xargs -0 -n1 bash -c ' + base="$0" + + echo # prepend empty line + + for candidate in "${base}" "${base}.conf" "${base}.json"; do + if [ ! -f "${candidate}" ]; then + continue + fi + + if [[ "${candidate}" =~ $SKIP_REGEX ]]; then + echo "=== Skipping config: ${candidate}" + exit 0 + fi + + echo "=== Testing config: ${candidate}" + exec villas config -q -m "${candidate}" + done + + echo "=== No config for: ${base}" + exit 0 +' diff --git a/tests/unit/config.cpp b/tests/unit/config.cpp index a04315320..eb9b31bc1 100644 --- a/tests/unit/config.cpp +++ b/tests/unit/config.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/tools/villas b/tools/villas index d146c9424..1155a4b02 100755 --- a/tools/villas +++ b/tools/villas @@ -12,7 +12,7 @@ # SPDX-License-Identifier: Apache-2.0 # Get a list of all available tools -SUBTOOLS="api node compare pipe hook conf2json convert graph relay signal test-config zmq-keygen" +SUBTOOLS="api node compare pipe hook config convert graph relay signal zmq-keygen" # First argument to wrapper is the tool which should be started SUBTOOL=$1 From 97607e153417198be9ab2924f840759e8e090c48 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Sun, 9 Aug 2026 15:35:30 +0200 Subject: [PATCH 61/84] feat(gdb): Add gdbinit for nlohmann::json pretty printing Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- .gdbinit | 12 ++++++++++++ flake.nix | 1 + 2 files changed, 13 insertions(+) create mode 100644 .gdbinit diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 000000000..74e042e35 --- /dev/null +++ b/.gdbinit @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 +# Author: Philipp Jungkamp + +python + +import os +import gdb + +if nlohmann_json_src := os.environ.get('NLOHMANN_JSON_SRC'): + gdb.execute(f"source {nlohmann_json_src}/tools/gdb_pretty_printer/nlohmann-json.py") +end diff --git a/flake.nix b/flake.nix index 9e9054a0b..2c1f5f8c7 100644 --- a/flake.nix +++ b/flake.nix @@ -183,6 +183,7 @@ nativeBuildInputs = pkg.nativeBuildInputs ++ packages; propagatedBuildInputs = pkg.propagatedBuildInputs; propagatedNativeBuildInputs = pkg.propagatedNativeBuildInputs; + env.NLOHMANN_JSON_SRC = pkgs.nlohmann_json.src; }; in rec { From 9e5490be5a861549125c6ab400974bdc261f5ad9 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Sun, 9 Aug 2026 18:46:11 +0200 Subject: [PATCH 62/84] fix(tool): Catch std::exception instead of std::runtime_error Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- common/lib/tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/tool.cpp b/common/lib/tool.cpp index 7776e0db1..ba94c76d1 100644 --- a/common/lib/tool.cpp +++ b/common/lib/tool.cpp @@ -60,7 +60,7 @@ int Tool::run() { logger->info(CLR_GRN("Goodbye!")); return ret; - } catch (const std::runtime_error &e) { + } catch (const std::exception &e) { logger->error("{}", e.what()); return -1; From 9cb4a1a0dce5851598809c2300581f76f33d4311 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Sun, 9 Aug 2026 18:49:44 +0200 Subject: [PATCH 63/84] fix(node): Remove enabled and initial_sequenceno from configuration Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- include/villas/node.hpp | 1 - include/villas/node_direction.hpp | 2 -- lib/node.cpp | 35 ++++++------------------------- lib/node_direction.cpp | 29 +++++++++---------------- lib/nodes/signal.cpp | 8 +++---- 5 files changed, 20 insertions(+), 55 deletions(-) diff --git a/include/villas/node.hpp b/include/villas/node.hpp index 7a88ba0ad..01f7c676f 100644 --- a/include/villas/node.hpp +++ b/include/villas/node.hpp @@ -60,7 +60,6 @@ class Node { public: Logger logger; - uint64_t sequence_init; uint64_t sequence; // This is a counter of received samples, in case the node-type does not generate sequence numbers itself. diff --git a/include/villas/node_direction.hpp b/include/villas/node_direction.hpp index ecd69b356..d6680b8e7 100644 --- a/include/villas/node_direction.hpp +++ b/include/villas/node_direction.hpp @@ -46,8 +46,6 @@ class NodeDirection { HookList hooks; // List of read / write hooks (struct hook). SignalList::Ptr signals; // Signal description. - json_t *config; // A JSON object containing the configuration of the node. - NodeDirection(enum NodeDirection::Direction dir, Node *n); int parse(json_t *json); diff --git a/lib/node.cpp b/lib/node.cpp index bd559cb4e..e3d7eeafc 100644 --- a/lib/node.cpp +++ b/lib/node.cpp @@ -47,7 +47,7 @@ using namespace villas::utils; using namespace std::string_view_literals; Node::Node(const uuid_t &id, const std::string &name) - : logger(Log::get("node")), sequence_init(0), sequence(0), + : logger(Log::get("node")), sequence(0), in(NodeDirection::Direction::IN, this), out(NodeDirection::Direction::OUT, this), configPath(), #ifdef __linux__ @@ -105,19 +105,11 @@ int Node::parse(json_t *json) { assert(state == State::INITIALIZED || state == State::PARSED || state == State::CHECKED); - int ret, en = enabled, init_seq = -1; + int ret; json_error_t err; json_t *json_netem = nullptr; - ret = json_unpack_ex(json, &err, 0, "{ s?: b, s?: i }", "enabled", &en, - "initial_sequenceno", &init_seq); - if (ret) - return ret; - - if (init_seq >= 0) - sequence_init = init_seq; - #ifdef __linux__ ret = json_unpack_ex(json, &err, 0, "{ s?: { s?: o, s?: i } }", "out", "netem", &json_netem, "fwmark", &fwmark); @@ -125,8 +117,6 @@ int Node::parse(json_t *json) { return ret; #endif // __linux__ - enabled = en; - if (json_netem) { #ifdef WITH_NETEM int enabled = 1; @@ -142,23 +132,11 @@ int Node::parse(json_t *json) { #endif // WITH_NETEM } - struct { - const char *str; - NodeDirection *dir; - } dirs[] = {{"in", &in}, {"out", &out}}; - - for (unsigned j = 0; j < std::size(dirs); j++) { - json_t *json_dir = json_object_get(json, dirs[j].str); - - // Skip if direction is unused - if (!json_dir) { - json_dir = json_pack("{ s: b }", "enabled", 0); - } + if (auto ret = in.parse(json_object_get(json, "in"))) + return ret; - ret = dirs[j].dir->parse(json_dir); - if (ret) - return ret; - } + if (auto ret = out.parse(json_object_get(json, "out"))) + return ret; config = json; @@ -206,7 +184,6 @@ int Node::start() { #endif // __linux__ state = State::STARTED; - sequence = sequence_init; return 0; } diff --git a/lib/node_direction.cpp b/lib/node_direction.cpp index 8c43a329e..65ccc9178 100644 --- a/lib/node_direction.cpp +++ b/lib/node_direction.cpp @@ -20,34 +20,27 @@ using namespace villas::node; using namespace villas::utils; NodeDirection::NodeDirection(enum NodeDirection::Direction dir, Node *n) - : direction(dir), path(nullptr), node(n), enabled(1), builtin(1), - vectorize(1), config(nullptr) {} + : direction(dir), path(nullptr), node(n), enabled(0), builtin(1), + vectorize(1) {} int NodeDirection::parse(json_t *json) { int ret; json_t *json_hooks = nullptr; json_t *json_signals = nullptr; - config = json; - - janssonUnpack(json, "{ s?: o, s?: o, s?: i, s?: b, s?: b }", // - "hooks", &json_hooks, // - "signals", &json_signals, // - "vectorize", &vectorize, // - "builtin", &builtin, // - "enabled", &enabled); + if (json) + janssonUnpack(json, "{ s?: o, s?: o, s?: i, s?: b, s?: b }", // + "hooks", &json_hooks, // + "signals", &json_signals, // + "vectorize", &vectorize, // + "builtin", &builtin, // + "enabled", &enabled); if (node->getFactory()->getFlags() & (int)NodeFactory::Flags::PROVIDES_SIGNALS) { - // Do nothing.. Node-type will provide signals signals = std::make_shared(); - if (!signals) - throw MemoryAllocationError(); - } else if (json_is_array(json_signals)) { + } else if (json_signals) { signals = std::make_shared(); - if (!signals) - throw MemoryAllocationError(); - ret = signals->parse(json_signals); if (ret) throw ConfigError(json_signals, "node-config-node-signals", @@ -55,8 +48,6 @@ int NodeDirection::parse(json_t *json) { } else { signals = std::make_shared(DEFAULT_SAMPLE_LENGTH, SignalType::FLOAT); - if (!signals) - return -1; } #ifdef WITH_HOOKS diff --git a/lib/nodes/signal.cpp b/lib/nodes/signal.cpp index 31576d3b3..6dcabbc3a 100644 --- a/lib/nodes/signal.cpp +++ b/lib/nodes/signal.cpp @@ -277,14 +277,14 @@ int SignalNode::_read(struct Sample *smps[], unsigned cnt) { struct Sample *t = smps[0]; struct timespec ts; - uint64_t steps, counter = sequence - sequence_init; + uint64_t steps; assert(cnt == 1); if (rt) ts = time_now(); else { - struct timespec offset = time_from_double(counter * 1.0 / rate); + struct timespec offset = time_from_double(sequence * 1.0 / rate); ts = time_add(&started, &offset); } @@ -300,10 +300,10 @@ int SignalNode::_read(struct Sample *smps[], unsigned cnt) { for (unsigned i = 0; i < t->length; i++) { auto &sig = signals[i]; - sig.read(counter, running, rate, &t->data[i]); + sig.read(sequence, running, rate, &t->data[i]); } - if (limit > 0 && counter >= (unsigned)limit) { + if (limit > 0 && sequence >= (unsigned)limit) { logger->info("Reached limit."); setState(State::STOPPING); From ccb71c4869e6a76be88dcc00b97e262429f5eda6 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Sun, 9 Aug 2026 18:53:51 +0200 Subject: [PATCH 64/84] fix(tests): Fix invalid test and example configurations Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- etc/examples/nodes/can.conf | 1 - etc/examples/nodes/ngsi.conf | 4 ++-- etc/examples/nodes/socket.conf | 4 ---- etc/examples/nodes/stats.conf | 1 - tests/integration/api-nodes.sh | 4 +--- tests/integration/api-paths.sh | 4 +--- tests/integration/api-restart.sh | 2 +- tests/integration/node-c37_118.sh | 1 - tests/integration/node-mapping.sh | 14 ++++++-------- tests/integration/node-opendss.sh | 23 +++++++++++------------ tests/integration/node-stats.sh | 1 - 11 files changed, 22 insertions(+), 37 deletions(-) diff --git a/etc/examples/nodes/can.conf b/etc/examples/nodes/can.conf index 66f0eefb8..5442a6828 100644 --- a/etc/examples/nodes/can.conf +++ b/etc/examples/nodes/can.conf @@ -5,7 +5,6 @@ nodes = { can_node1 = { type = "can" interface_name = "vcan0" - sample_rate = 500000 in = { signals = ( diff --git a/etc/examples/nodes/ngsi.conf b/etc/examples/nodes/ngsi.conf index edb85b52b..2a9e59f12 100644 --- a/etc/examples/nodes/ngsi.conf +++ b/etc/examples/nodes/ngsi.conf @@ -24,7 +24,7 @@ nodes = { timeout = 1 # Verification of SSL server certificates (default is true) - verify_ssl = false + ssl_verify = false in = { signals = ( @@ -32,7 +32,7 @@ nodes = { name = "attr1" ngsi_attribute_name = "attr1" # Defaults to signal 'name' ngsi_attribute_type = "Volts" # Default to signal 'unit' - ngsi_attribute_metadatas = ( + ngsi_metadatas = ( { name="accuracy", type="percent", value="5" } ) } diff --git a/etc/examples/nodes/socket.conf b/etc/examples/nodes/socket.conf index 1e1efd66d..61518d4dc 100644 --- a/etc/examples/nodes/socket.conf +++ b/etc/examples/nodes/socket.conf @@ -8,9 +8,6 @@ nodes = { # Receive and sent 30 samples per message (combining) vectorize = 30 - # The maximum number of samples this node can receive - samplelen = 10 - # By default, all nodes will have a few builtin hooks attached to them # When collecting statistics or measurements these are undesired builtin = false @@ -21,7 +18,6 @@ nodes = { # - eth Send / receive L2 Ethernet frames (IEEE802.3) layer = "udp" - format = "gtnet" in = { diff --git a/etc/examples/nodes/stats.conf b/etc/examples/nodes/stats.conf index ce501a2ab..15e5fd557 100644 --- a/etc/examples/nodes/stats.conf +++ b/etc/examples/nodes/stats.conf @@ -15,7 +15,6 @@ nodes = { stats_node = { type = "stats" - node = "udp_node" rate = 2 in = { diff --git a/tests/integration/api-nodes.sh b/tests/integration/api-nodes.sh index 576973c87..824de18c1 100755 --- a/tests/integration/api-nodes.sh +++ b/tests/integration/api-nodes.sh @@ -25,12 +25,10 @@ cat > config.json < config.json < config.json < config.json < load.dat < expect.dat < Test.DSS << EOF @@ -89,8 +89,7 @@ cat > config.json << EOF "in": { "epoch_mode": "original", "epoch": 10, - "rate": 4, - "buffer": 0 + "rate": 4 } } }, diff --git a/tests/integration/node-stats.sh b/tests/integration/node-stats.sh index 20ffd2e61..a37b71c75 100755 --- a/tests/integration/node-stats.sh +++ b/tests/integration/node-stats.sh @@ -24,7 +24,6 @@ cat > config.json < Date: Sun, 9 Aug 2026 19:01:23 +0200 Subject: [PATCH 65/84] fix(tests): Reap left-over children from integration tests Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- tools/integration-tests.sh | 39 +++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/tools/integration-tests.sh b/tools/integration-tests.sh index b267a9459..4da52acd4 100755 --- a/tools/integration-tests.sh +++ b/tools/integration-tests.sh @@ -20,11 +20,11 @@ LANG=C export PATH SRCDIR BUILDDIR LOGDIR LANG # Default values -VERBOSE=${VERBOSE:-0} -FAIL_FAST=${FAIL_FAST:-0} -FILTER=${FILTER:-'*'} -NUM_SAMPLES=${NUM_SAMPLES:-100} -TIMEOUT=${TIMEOUT:-1m} +: ${VERBOSE:=0} +: ${FAIL_FAST:=0} +: ${FILTER:='*'} +: ${NUM_SAMPLES:=100} +: ${TIMEOUT:=1m} # Parse command line arguments while getopts ":f:l:t:vg" OPT; do @@ -54,19 +54,36 @@ while getopts ":f:l:t:vg" OPT; do esac done -export VERBOSE -export NUM_SAMPLES +export VERBOSE NUM_SAMPLES TIMEOUT -TESTS=${SRCDIR}/tests/integration/${FILTER}.sh +TESTS="${SRCDIR}/tests/integration/"${FILTER}.sh # Preparations -mkdir -p ${LOGDIR} +mkdir -p "${LOGDIR}" PASSED=0 FAILED=0 SKIPPED=0 TIMEDOUT=0 +run_test() { + : "${1:?run_test requires a script parameter}" + + export STATUS_FILE=$(mktemp) + echo 1 > "$STATUS_FILE" + + setsid --wait bash -c ' + timeout "${TIMEOUT}" "$0" "$@" + echo "$?" > "$STATUS_FILE" + kill -TERM -- -$$ 2>/dev/null + ' "$@" + + local status="$(cat "$STATUS_FILE")" + unlink "$STATUS_FILE" + + return "$status" +} + # Preamble echo -e "Starting integration tests for VILLASnode:\n" @@ -78,10 +95,10 @@ for TEST in ${TESTS}; do # Run test if (( ${VERBOSE} == 0 )); then - timeout ${TIMEOUT} ${TEST} &> ${LOGDIR}/${TESTNAME}.log + run_test ${TEST} &> ${LOGDIR}/${TESTNAME}.log RC=$? else - timeout ${TIMEOUT} ${TEST} | tee ${LOGDIR}/${TESTNAME}.log + run_test ${TEST} | tee ${LOGDIR}/${TESTNAME}.log RC=${PIPESTATUS[0]} fi From 1849e7a80d100851ace9c2520af43f8dc86bae4e Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Sun, 9 Aug 2026 21:46:25 +0200 Subject: [PATCH 66/84] feat(config): Allow JSON files with comments Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- common/include/villas/json.hpp | 1 + common/lib/json.cpp | 26 ++++++++++++++++---------- src/villas-config.cpp | 1 + src/villas-graph.cpp | 1 + src/villas-node.cpp | 1 + src/villas-pipe.cpp | 1 + 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/common/include/villas/json.hpp b/common/include/villas/json.hpp index a8bcd1285..d7bb94858 100644 --- a/common/include/villas/json.hpp +++ b/common/include/villas/json.hpp @@ -27,6 +27,7 @@ struct LoadConfigFileOptions { bool allow_libconfig = false; bool allow_environment = false; bool allow_include = false; + bool allow_comments = false; }; // load a configuration file diff --git a/common/lib/json.cpp b/common/lib/json.cpp index 0b3bde1d6..8d4e0040c 100644 --- a/common/lib/json.cpp +++ b/common/lib/json.cpp @@ -150,7 +150,7 @@ void to_json(Json &json, JanssonPtr const &jansson) { namespace { // Implement the deprecated variable substitution syntax. -void expand_substitutions(Json &value, bool resolve_env, +void expand_substitutions(Json &value, bool resolve_env, bool allow_comments, fs::path const *include_dir) { if (not value.is_string()) return; @@ -204,6 +204,7 @@ void expand_substitutions(Json &value, bool resolve_env, .allow_libconfig = false, .allow_environment = resolve_env, .allow_include = include_dir != nullptr, + .allow_comments = allow_comments, }); if (result.is_null()) result = partial_result; @@ -225,14 +226,16 @@ void expand_substitutions(Json &value, bool resolve_env, #ifdef WITH_CONFIG Json parse_libconfig_setting(::config_setting_t const *setting, - bool resolve_env, fs::path const *include_dir) { + bool resolve_env, bool allow_comments, + fs::path const *include_dir) { switch (config_setting_type(setting)) { case CONFIG_TYPE_ARRAY: case CONFIG_TYPE_LIST: { auto array = Json::array(); for (auto const idx : std::views::iota(0, config_setting_length(setting))) { auto const elem = config_setting_get_elem(setting, idx); - array.push_back(parse_libconfig_setting(elem, resolve_env, include_dir)); + array.push_back(parse_libconfig_setting(elem, resolve_env, allow_comments, + include_dir)); } return array; @@ -244,7 +247,8 @@ Json parse_libconfig_setting(::config_setting_t const *setting, auto const elem = config_setting_get_elem(setting, idx); auto name = std::string(config_setting_name(elem)); object.emplace(std::move(name), - parse_libconfig_setting(elem, resolve_env, include_dir)); + parse_libconfig_setting(elem, resolve_env, allow_comments, + include_dir)); } return object; @@ -252,7 +256,7 @@ Json parse_libconfig_setting(::config_setting_t const *setting, case CONFIG_TYPE_STRING: { auto json = Json(std::string(config_setting_get_string(setting))); - expand_substitutions(json, resolve_env, include_dir); + expand_substitutions(json, resolve_env, allow_comments, include_dir); return json; } @@ -299,7 +303,8 @@ extern "C" char const **libconfig_include_func(::config_t *config, char const *, } auto pattern_json = Json(pattern); - expand_substitutions(pattern_json, hook->resolve_env, nullptr); + // The null include_dir only expands environment variables in the pattern. + expand_substitutions(pattern_json, hook->resolve_env, false, nullptr); auto const &pattern_expanded = pattern_json.get_ref(); try { @@ -327,7 +332,7 @@ extern "C" char const **libconfig_include_func(::config_t *config, char const *, #endif -Json load_libconfig_file(std::FILE *file, bool resolve_env, +Json load_libconfig_file(std::FILE *file, bool resolve_env, bool allow_comments, fs::path const *include_dir) { using ConfigDestroy = decltype([](::config_t *c) { ::config_destroy(c); }); using ConfigGuard = std::unique_ptr<::config_t, ConfigDestroy>; @@ -359,7 +364,7 @@ Json load_libconfig_file(std::FILE *file, bool resolve_env, } return parse_libconfig_setting(config_root_setting(&config), resolve_env, - include_dir); + allow_comments, include_dir); } #endif // WITH_CONFIG @@ -381,16 +386,17 @@ Json load_config_file(fs::path const &path, LoadConfigFileOptions const &opts) { auto parser_callback = [&](int depth, Json::parse_event_t event, Json &value) { if (event == Json::parse_event_t::value) - expand_substitutions(value, opts.allow_environment, + expand_substitutions(value, opts.allow_environment, opts.allow_comments, opts.allow_include ? &include_dir : nullptr); return true; }; - return Json::parse(file.get(), parser_callback); + return Json::parse(file.get(), parser_callback, true, opts.allow_comments); } else if (opts.allow_libconfig) { #ifdef WITH_CONFIG return load_libconfig_file(file.get(), opts.allow_environment, + opts.allow_comments, opts.allow_include ? &include_dir : nullptr); #else throw std::runtime_error( diff --git a/src/villas-config.cpp b/src/villas-config.cpp index fe8145bc9..7b44bcd31 100644 --- a/src/villas-config.cpp +++ b/src/villas-config.cpp @@ -99,6 +99,7 @@ class Config : public Tool { .allow_libconfig = true, .allow_environment = true, .allow_include = true, + .allow_comments = true, }); SuperNode::validate(config, { diff --git a/src/villas-graph.cpp b/src/villas-graph.cpp index b60f90efb..2926edd08 100644 --- a/src/villas-graph.cpp +++ b/src/villas-graph.cpp @@ -102,6 +102,7 @@ class Graph : public Tool { .allow_libconfig = true, .allow_environment = true, .allow_include = true, + .allow_comments = true, }); villas::node::SuperNode sn(std::move(config), config_path.parent_path()); diff --git a/src/villas-node.cpp b/src/villas-node.cpp index 40957dfc5..379e7519c 100644 --- a/src/villas-node.cpp +++ b/src/villas-node.cpp @@ -177,6 +177,7 @@ class Node : public Tool { .allow_libconfig = true, .allow_environment = true, .allow_include = true, + .allow_comments = true, }); return SuperNode(config, config_path.parent_path()); diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index 2363b4854..6c675359b 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -405,6 +405,7 @@ class Pipe : public Tool { .allow_libconfig = true, .allow_environment = true, .allow_include = true, + .allow_comments = true, }); villas::node::SuperNode sn(std::move(config), config_path.parent_path()); From c7f6a1f155e4c4af9fa34e77e45dcc53b8c0100c Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 00:12:39 +0200 Subject: [PATCH 67/84] chore(docker): Bump fedore-minimal container to Fedora 43 Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- packaging/docker/Dockerfile.fedora-minimal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/docker/Dockerfile.fedora-minimal b/packaging/docker/Dockerfile.fedora-minimal index 599e9e5f3..40814c18f 100644 --- a/packaging/docker/Dockerfile.fedora-minimal +++ b/packaging/docker/Dockerfile.fedora-minimal @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 ARG DISTRO=fedora -ARG FEDORA_VERSION=41 +ARG FEDORA_VERSION=43 FROM ${DISTRO}:${FEDORA_VERSION} AS dev From 97bf6086f123c43c7dc4e53a2645b33e275c12fb Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 01:22:58 +0200 Subject: [PATCH 68/84] fix(docker): Add workaround for local/lib libraries Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- packaging/docker/Dockerfile.fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/docker/Dockerfile.fedora b/packaging/docker/Dockerfile.fedora index df6e516f4..12c92187a 100644 --- a/packaging/docker/Dockerfile.fedora +++ b/packaging/docker/Dockerfile.fedora @@ -74,7 +74,7 @@ ENV CC=gcc-14 ENV CXX=g++-14 # Add local library directory to linker paths -RUN echo /usr/local/lib >> /etc/ld.so.conf +RUN printf "%s\n" /usr/local/lib /usr/local/lib64 >> /etc/ld.so.conf # Install unpackaged dependencies from source ADD packaging/patches /deps/patches From 63f48f30c2eb3e7d65dacc6533fabee0299159d4 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 04:40:23 +0200 Subject: [PATCH 69/84] feat(nix): Use gcc14Stdenv for devShell.default Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2c1f5f8c7..78ea1a619 100644 --- a/flake.nix +++ b/flake.nix @@ -189,7 +189,7 @@ rec { default = gcc; - gcc = mkShellFor pkgs.stdenv pkgs.villas-node; + gcc = mkShellFor pkgs.gcc14Stdenv pkgs.villas-node; clang = mkShellFor pkgs.clangStdenv pkgs.villas-node; python = pkgs.mkShell { From f5e582801d01f860227acf3dbe44899d6dda8d03 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 14:22:18 +0200 Subject: [PATCH 70/84] chore(hooks): Remove enabled setting for hooks Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- include/villas/hook.hpp | 9 +++------ include/villas/hooks/decimate.hpp | 4 ++-- include/villas/hooks/limit_rate.hpp | 4 ++-- include/villas/hooks/lua.hpp | 2 +- include/villas/hooks/pmu.hpp | 2 +- lib/hook.cpp | 11 +++-------- lib/hook_list.cpp | 3 --- lib/hooks/average.cpp | 4 ++-- lib/hooks/cast.cpp | 4 ++-- lib/hooks/digest.cpp | 4 ++-- lib/hooks/dp.cpp | 8 ++++---- lib/hooks/frame.cpp | 4 ++-- lib/hooks/gate.cpp | 4 ++-- lib/hooks/jitter_calc.cpp | 4 ++-- lib/hooks/limit_value.cpp | 4 ++-- lib/hooks/lua.cpp | 9 ++++----- lib/hooks/ma.cpp | 4 ++-- lib/hooks/pmu.cpp | 4 ++-- lib/hooks/pmu_dft.cpp | 4 ++-- lib/hooks/pmu_ipdft.cpp | 4 ++-- lib/hooks/power.cpp | 10 +++++----- lib/hooks/print.cpp | 4 ++-- lib/hooks/reorder_ts.cpp | 6 ++++-- lib/hooks/rms.cpp | 4 ++-- lib/hooks/round.cpp | 4 ++-- lib/hooks/scale.cpp | 4 ++-- lib/hooks/shift_ts.cpp | 4 ++-- lib/hooks/stats.cpp | 18 ++++++++---------- 28 files changed, 69 insertions(+), 81 deletions(-) diff --git a/include/villas/hook.hpp b/include/villas/hook.hpp index 6a8a74874..6ff6d2592 100644 --- a/include/villas/hook.hpp +++ b/include/villas/hook.hpp @@ -56,7 +56,6 @@ class Hook { int flags; unsigned priority; // A priority to change the order of execution within one type of hook. - bool enabled; // Is this hook active? Path *path; Node *node; @@ -66,7 +65,7 @@ class Hook { json_t *config; // A JSON object containing the configuration of the hook. public: - Hook(Path *p, Node *n, int fl, int prio, bool en = true); + Hook(Path *p, Node *n, int fl, int prio); virtual ~Hook() {} @@ -120,8 +119,6 @@ class Hook { json_t *getConfig() const { return config; } HookFactory *getFactory() const { return factory; } - - bool isEnabled() const { return enabled; } }; class SingleSignalHook : public Hook { @@ -131,8 +128,8 @@ class SingleSignalHook : public Hook { std::string signalName; public: - SingleSignalHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), signalIndex(0) {} + SingleSignalHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), signalIndex(0) {} void parse(json_t *json) override; diff --git a/include/villas/hooks/decimate.hpp b/include/villas/hooks/decimate.hpp index d1fec7d1f..88333ebe8 100644 --- a/include/villas/hooks/decimate.hpp +++ b/include/villas/hooks/decimate.hpp @@ -20,8 +20,8 @@ class DecimateHook : public LimitHook { unsigned counter; public: - DecimateHook(Path *p, Node *n, int fl, int prio, bool en = true) - : LimitHook(p, n, fl, prio, en), ratio(1), renumber(false), counter(0) {} + DecimateHook(Path *p, Node *n, int fl, int prio) + : LimitHook(p, n, fl, prio), ratio(1), renumber(false), counter(0) {} void setRate(double rate, double maxRate = -1) override { assert(maxRate > 0); diff --git a/include/villas/hooks/limit_rate.hpp b/include/villas/hooks/limit_rate.hpp index ecaa01dc6..4c09fb6bf 100644 --- a/include/villas/hooks/limit_rate.hpp +++ b/include/villas/hooks/limit_rate.hpp @@ -22,8 +22,8 @@ class LimitRateHook : public LimitHook { timespec last; public: - LimitRateHook(Path *p, Node *n, int fl, int prio, bool en = true) - : LimitHook(p, n, fl, prio, en), mode(LIMIT_RATE_LOCAL), deadtime(0), + LimitRateHook(Path *p, Node *n, int fl, int prio) + : LimitHook(p, n, fl, prio), mode(LIMIT_RATE_LOCAL), deadtime(0), last({0, 0}) {} void setRate(double rate, double maxRate = -1) override { diff --git a/include/villas/hooks/lua.hpp b/include/villas/hooks/lua.hpp index a9b5edd4d..ed62e7712 100644 --- a/include/villas/hooks/lua.hpp +++ b/include/villas/hooks/lua.hpp @@ -103,7 +103,7 @@ class LuaHook : public Hook { } public: - LuaHook(Path *p, Node *n, int fl, int prio, bool en = true); + LuaHook(Path *p, Node *n, int fl, int prio); ~LuaHook() override; diff --git a/include/villas/hooks/pmu.hpp b/include/villas/hooks/pmu.hpp index b3c1d5ecf..77bebd694 100644 --- a/include/villas/hooks/pmu.hpp +++ b/include/villas/hooks/pmu.hpp @@ -62,7 +62,7 @@ class PmuHook : public MultiSignalHook { const Phasor &lastPhasor); public: - PmuHook(Path *p, Node *n, int fl, int prio, bool en = true); + PmuHook(Path *p, Node *n, int fl, int prio); void prepare() override; diff --git a/lib/hook.cpp b/lib/hook.cpp index 18a758c12..9ad51a84b 100644 --- a/lib/hook.cpp +++ b/lib/hook.cpp @@ -21,12 +21,12 @@ const char *hook_reasons[] = {"ok", "error", "skip-sample", "stop-processing"}; using namespace villas; using namespace villas::node; -Hook::Hook(Path *p, Node *n, int fl, int prio, bool en) +Hook::Hook(Path *p, Node *n, int fl, int prio) : logger(Log::get("hook")), factory(nullptr), state(fl & (int)Hook::Flags::BUILTIN ? State::CHECKED : State::INITIALIZED), // We dont need to parse builtin hooks - flags(fl), priority(prio), enabled(en), path(p), node(n), + flags(fl), priority(prio), path(p), node(n), signals(std::make_shared()), config(nullptr) {} void Hook::prepare(SignalList::Ptr sigs) { @@ -46,19 +46,14 @@ void Hook::parse(json_t *json) { assert(state != State::STARTED); int prio = -1; - int en = -1; - ret = json_unpack_ex(json, &err, 0, "{ s?: i, s?: b }", "priority", &prio, - "enabled", &en); + ret = json_unpack_ex(json, &err, 0, "{ s?: i }", "priority", &prio); if (ret) throw ConfigError(json, err, "node-config-hook"); if (prio >= 0) priority = prio; - if (en >= 0) - enabled = en; - config = json; state = State::PARSED; diff --git a/lib/hook_list.cpp b/lib/hook_list.cpp index ed5db006d..c1ed94720 100644 --- a/lib/hook_list.cpp +++ b/lib/hook_list.cpp @@ -82,9 +82,6 @@ void HookList::prepare(SignalList::Ptr signals, int m, Path *p, Node *n) { } skip_add: - // Remove filters which are not enabled - remove_if([](Hook::Ptr h) { return !h->isEnabled(); }); - // We sort the hooks according to their priority sort([](const value_type &a, const value_type b) { return a->getPriority() < b->getPriority(); diff --git a/lib/hooks/average.cpp b/lib/hooks/average.cpp index d6fb840d2..6b1777dbd 100644 --- a/lib/hooks/average.cpp +++ b/lib/hooks/average.cpp @@ -19,8 +19,8 @@ class AverageHook : public MultiSignalHook { unsigned offset; public: - AverageHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), offset(0) {} + AverageHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), offset(0) {} void prepare() override { assert(state == State::CHECKED); diff --git a/lib/hooks/cast.cpp b/lib/hooks/cast.cpp index 3561cd484..9a1c87ace 100644 --- a/lib/hooks/cast.cpp +++ b/lib/hooks/cast.cpp @@ -19,8 +19,8 @@ class CastHook : public MultiSignalHook { std::string new_unit; public: - CastHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), new_type(SignalType::INVALID) {} + CastHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), new_type(SignalType::INVALID) {} void prepare() override { assert(state == State::CHECKED); diff --git a/lib/hooks/digest.cpp b/lib/hooks/digest.cpp index 59295a7c8..e6d8fbf06 100644 --- a/lib/hooks/digest.cpp +++ b/lib/hooks/digest.cpp @@ -182,8 +182,8 @@ class DigestHook : public Hook { } public: - DigestHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), algorithm(), uri(), + DigestHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), algorithm(), uri(), md_ctx(EVP_MD_CTX_new(), &EVP_MD_CTX_free), md(nullptr), file(nullptr, &FILE_free), first_sequence(std::nullopt), first_timestamp(std::nullopt), last_sequence(std::nullopt), diff --git a/lib/hooks/dp.cpp b/lib/hooks/dp.cpp index 537baae61..3e4ea919c 100644 --- a/lib/hooks/dp.cpp +++ b/lib/hooks/dp.cpp @@ -93,10 +93,10 @@ class DPHook : public Hook { } public: - DPHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), signal_name(nullptr), signal_index(0), - inverse(0), f0(50.0), timestep(50e-6), time(), steps(0), coeffs(), - fharmonics(), fharmonics_len(0) {} + DPHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), signal_name(nullptr), signal_index(0), inverse(0), + f0(50.0), timestep(50e-6), time(), steps(0), coeffs(), fharmonics(), + fharmonics_len(0) {} ~DPHook() override { // Release memory diff --git a/lib/hooks/frame.cpp b/lib/hooks/frame.cpp index 3006835ac..e42db9e47 100644 --- a/lib/hooks/frame.cpp +++ b/lib/hooks/frame.cpp @@ -61,8 +61,8 @@ class FrameHook : public Hook { } public: - FrameHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), interval(TimeInterval(0)), + FrameHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), interval(TimeInterval(0)), last_smp{nullptr, &sample_decref} {} ~FrameHook() override { (void)last_smp.release(); } diff --git a/lib/hooks/gate.cpp b/lib/hooks/gate.cpp index 194b603a5..4e380d566 100644 --- a/lib/hooks/gate.cpp +++ b/lib/hooks/gate.cpp @@ -32,8 +32,8 @@ class GateHook : public SingleSignalHook { timespec startTime; public: - GateHook(Path *p, Node *n, int fl, int prio, bool en = true) - : SingleSignalHook(p, n, fl, prio, en), mode(Mode::RISING_EDGE), + GateHook(Path *p, Node *n, int fl, int prio) + : SingleSignalHook(p, n, fl, prio), mode(Mode::RISING_EDGE), threshold(0.5), duration(-1), samples(-1), previousValue(std::numeric_limits::quiet_NaN()), active(false), startSequence(0) {} diff --git a/lib/hooks/jitter_calc.cpp b/lib/hooks/jitter_calc.cpp index d8af9074e..9814173ea 100644 --- a/lib/hooks/jitter_calc.cpp +++ b/lib/hooks/jitter_calc.cpp @@ -30,8 +30,8 @@ class JitterCalcHook : public Hook { int curr_count; public: - JitterCalcHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), jitter_val(GPS_NTP_DELAY_WIN_SIZE), + JitterCalcHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), jitter_val(GPS_NTP_DELAY_WIN_SIZE), delay_series(GPS_NTP_DELAY_WIN_SIZE), moving_avg(GPS_NTP_DELAY_WIN_SIZE), moving_var(GPS_NTP_DELAY_WIN_SIZE), delay_mov_sum(0), delay_mov_sum_sqrd(0), curr_count(0) {} diff --git a/lib/hooks/limit_value.cpp b/lib/hooks/limit_value.cpp index 6e473b07f..e5c2ec39f 100644 --- a/lib/hooks/limit_value.cpp +++ b/lib/hooks/limit_value.cpp @@ -21,8 +21,8 @@ class LimitValueHook : public MultiSignalHook { float min, max; public: - LimitValueHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), offset(0), min(0), max(0) {} + LimitValueHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), offset(0), min(0), max(0) {} void parse(json_t *json) override { int ret; diff --git a/lib/hooks/lua.cpp b/lib/hooks/lua.cpp index 02f3c6698..deafcdef8 100644 --- a/lib/hooks/lua.cpp +++ b/lib/hooks/lua.cpp @@ -339,11 +339,10 @@ void LuaSignalExpression::evaluate(union SignalData *data, lua_pop(L, 1); } -LuaHook::LuaHook(Path *p, Node *n, int fl, int prio, bool en) - : Hook(p, n, fl, prio, en), - signalsExpressions(std::make_shared()), L(luaL_newstate()), - useNames(true), hasExpressions(false), needsLocking(false), - functions({0}) {} +LuaHook::LuaHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), signalsExpressions(std::make_shared()), + L(luaL_newstate()), useNames(true), hasExpressions(false), + needsLocking(false), functions({0}) {} LuaHook::~LuaHook() { lua_close(L); } diff --git a/lib/hooks/ma.cpp b/lib/hooks/ma.cpp index 1609d8929..4700920f5 100644 --- a/lib/hooks/ma.cpp +++ b/lib/hooks/ma.cpp @@ -21,8 +21,8 @@ class MovingAverageHook : public MultiSignalHook { uint64_t smpMemoryPosition; public: - MovingAverageHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), smpMemory(), accumulator(0.0), + MovingAverageHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), smpMemory(), accumulator(0.0), windowSize(10), smpMemoryPosition(0) {} void prepare() override { diff --git a/lib/hooks/pmu.cpp b/lib/hooks/pmu.cpp index 66b0c8a0b..08cd98489 100644 --- a/lib/hooks/pmu.cpp +++ b/lib/hooks/pmu.cpp @@ -11,8 +11,8 @@ namespace villas { namespace node { -PmuHook::PmuHook(Path *p, Node *n, int fl, int prio, bool en) - : MultiSignalHook(p, n, fl, prio, en), windows(), windowsTs(), +PmuHook::PmuHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), windows(), windowsTs(), timeAlignType(TimeAlign::CENTER), windowType(WindowType::NONE), sampleRate(1), phasorRate(1.0), nominalFreq(1.0), numberPlc(1.), windowSize(1), channelNameEnable(true), angleUnitFactor(1.0), diff --git a/lib/hooks/pmu_dft.cpp b/lib/hooks/pmu_dft.cpp index 45b222f34..87fea1201 100644 --- a/lib/hooks/pmu_dft.cpp +++ b/lib/hooks/pmu_dft.cpp @@ -113,8 +113,8 @@ class PmuDftHook : public MultiSignalHook { double rocofOffset; public: - PmuDftHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), windowType(WindowType::NONE), + PmuDftHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), windowType(WindowType::NONE), paddingType(PaddingType::ZERO), estType(EstimationType::NONE), timeAlignType(TimeAlign::CENTER), smpMemoryData(), smpMemoryTs(), #ifdef DFT_MEM_DUMP diff --git a/lib/hooks/pmu_ipdft.cpp b/lib/hooks/pmu_ipdft.cpp index f67756551..c4455fed2 100644 --- a/lib/hooks/pmu_ipdft.cpp +++ b/lib/hooks/pmu_ipdft.cpp @@ -21,8 +21,8 @@ class IpDftPmuHook : public PmuHook { double estimationRange; // The range around nominalFreq used for estimation public: - IpDftPmuHook(Path *p, Node *n, int fl, int prio, bool en = true) - : PmuHook(p, n, fl, prio, en), frequencyCount(0), estimationRange(0) + IpDftPmuHook(Path *p, Node *n, int fl, int prio) + : PmuHook(p, n, fl, prio), frequencyCount(0), estimationRange(0) {} diff --git a/lib/hooks/power.cpp b/lib/hooks/power.cpp index 33a567af3..ff8093386 100644 --- a/lib/hooks/power.cpp +++ b/lib/hooks/power.cpp @@ -57,11 +57,11 @@ class PowerHook : public MultiSignalHook { enum TimeAlign timeAlignType; public: - PowerHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), smpMemory(), pairings(), - smpMemoryTs(), windowSize(0), smpMemoryPosition(0), - calcActivePower(true), calcReactivePower(true), caclApparentPower(true), - calcCosPhi(true), channelNameEnable(false), angleUnitFactor(1), + PowerHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), smpMemory(), pairings(), smpMemoryTs(), + windowSize(0), smpMemoryPosition(0), calcActivePower(true), + calcReactivePower(true), caclApparentPower(true), calcCosPhi(true), + channelNameEnable(false), angleUnitFactor(1), timeAlignType(TimeAlign::CENTER) {} void prepare() override { diff --git a/lib/hooks/print.cpp b/lib/hooks/print.cpp index 6b0ab5b86..2bb189125 100644 --- a/lib/hooks/print.cpp +++ b/lib/hooks/print.cpp @@ -29,8 +29,8 @@ class PrintHook : public Hook { std::vector output_buffer; public: - PrintHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), output(nullptr) {} + PrintHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), output(nullptr) {} void start() override { assert(state == State::PREPARED || state == State::STOPPED); diff --git a/lib/hooks/reorder_ts.cpp b/lib/hooks/reorder_ts.cpp index aa1f09192..35689c659 100644 --- a/lib/hooks/reorder_ts.cpp +++ b/lib/hooks/reorder_ts.cpp @@ -42,12 +42,14 @@ class ReorderTsHook : public Hook { } public: - ReorderTsHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), window{}, window_size(16), buffer(nullptr) {} + ReorderTsHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), window{}, window_size(16), buffer(nullptr) {} void parse(json_t *json) override { assert(state != State::STARTED); + Hook::parse(json); + json_error_t err; int ret = json_unpack_ex(json, &err, 0, "{ s?: i }", "window_size", &window_size); diff --git a/lib/hooks/rms.cpp b/lib/hooks/rms.cpp index ace8db96b..5f167a1b5 100644 --- a/lib/hooks/rms.cpp +++ b/lib/hooks/rms.cpp @@ -21,8 +21,8 @@ class RMSHook : public MultiSignalHook { uint64_t smpMemoryPosition; public: - RMSHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), smpMemory(), windowSize(0), + RMSHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), smpMemory(), windowSize(0), smpMemoryPosition(0) {} void prepare() override { diff --git a/lib/hooks/round.cpp b/lib/hooks/round.cpp index 9f07c06a3..5cd742995 100644 --- a/lib/hooks/round.cpp +++ b/lib/hooks/round.cpp @@ -17,8 +17,8 @@ class RoundHook : public MultiSignalHook { unsigned precision; public: - RoundHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), precision(1) {} + RoundHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), precision(1) {} void parse(json_t *json) override { int ret; diff --git a/lib/hooks/scale.cpp b/lib/hooks/scale.cpp index 68a9446dd..c579cc037 100644 --- a/lib/hooks/scale.cpp +++ b/lib/hooks/scale.cpp @@ -18,8 +18,8 @@ class ScaleHook : public MultiSignalHook { double offset; public: - ScaleHook(Path *p, Node *n, int fl, int prio, bool en = true) - : MultiSignalHook(p, n, fl, prio, en), scale(1.0), offset(0.0) {} + ScaleHook(Path *p, Node *n, int fl, int prio) + : MultiSignalHook(p, n, fl, prio), scale(1.0), offset(0.0) {} void parse(json_t *json) override { int ret; diff --git a/lib/hooks/shift_ts.cpp b/lib/hooks/shift_ts.cpp index ce2f7074b..fb9fe0b1c 100644 --- a/lib/hooks/shift_ts.cpp +++ b/lib/hooks/shift_ts.cpp @@ -21,8 +21,8 @@ class ShiftTimestampHook : public Hook { enum { SHIFT_ORIGIN, SHIFT_RECEIVED } mode; public: - ShiftTimestampHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), mode(SHIFT_ORIGIN) {} + ShiftTimestampHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), mode(SHIFT_ORIGIN) {} void parse(json_t *json) override { double o; diff --git a/lib/hooks/stats.cpp b/lib/hooks/stats.cpp index f16d5a232..9e33de2ba 100644 --- a/lib/hooks/stats.cpp +++ b/lib/hooks/stats.cpp @@ -25,9 +25,8 @@ class StatsWriteHook : public Hook { StatsHook *parent; public: - StatsWriteHook(StatsHook *pa, Path *p, Node *n, int fl, int prio, - bool en = true) - : Hook(p, n, fl, prio, en), parent(pa) { + StatsWriteHook(StatsHook *pa, Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), parent(pa) { // This hook has no config. We never call parse() for it state = State::PARSED; } @@ -43,9 +42,8 @@ class StatsReadHook : public Hook { StatsHook *parent; public: - StatsReadHook(StatsHook *pa, Path *p, Node *n, int fl, int prio, - bool en = true) - : Hook(p, n, fl, prio, en), last(nullptr), parent(pa) { + StatsReadHook(StatsHook *pa, Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), last(nullptr), parent(pa) { // This hook has no config. We never call parse() for it state = State::PARSED; } @@ -90,11 +88,11 @@ class StatsHook : public Hook { std::string uri; public: - StatsHook(Path *p, Node *n, int fl, int prio, bool en = true) - : Hook(p, n, fl, prio, en), format(Stats::Format::HUMAN), verbose(0), + StatsHook(Path *p, Node *n, int fl, int prio) + : Hook(p, n, fl, prio), format(Stats::Format::HUMAN), verbose(0), warmup(500), buckets(20), output(nullptr), uri() { - readHook = std::make_shared(this, p, n, fl, prio, en); - writeHook = std::make_shared(this, p, n, fl, prio, en); + readHook = std::make_shared(this, p, n, fl, prio); + writeHook = std::make_shared(this, p, n, fl, prio); if (!readHook || !writeHook) throw MemoryAllocationError(); From a4e88bf9de3d6c7055c19181acc32f140d911933 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 14:38:42 +0200 Subject: [PATCH 71/84] fix(super_node): Remove unused broken code Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- lib/super_node.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/super_node.cpp b/lib/super_node.cpp index b664cab31..b8a6cb181 100644 --- a/lib/super_node.cpp +++ b/lib/super_node.cpp @@ -366,26 +366,18 @@ void SuperNode::parse(json_t *root) { json_object_foreach (json_nodes, node_name, json_node) { uuid_t node_uuid; const char *node_type; - const char *node_uuid_str = nullptr; ret = Node::isValidName(node_name); if (!ret) throw RuntimeError("Invalid name for node: {}", node_name); - ret = json_unpack_ex(json_node, &err, 0, "{ s: s, s?: s }", "type", - &node_type, "uuid", &node_uuid_str); + ret = json_unpack_ex(json_node, &err, 0, "{ s: s }", "type", &node_type); if (ret) throw ConfigError(root, err, "node-config-node-type", "Failed to parse type of node '{}'", node_name); - if (node_uuid_str) { - ret = uuid_parse(uuid_str, uuid); - if (ret) - throw ConfigError(json_node, "node-config-node-uuid", - "Failed to parse UUID: {}", uuid_str); - } else - // Generate UUID from node name and super-node UUID - uuid::generateFromString(node_uuid, node_name, uuid::toString(uuid)); + // Generate UUID from node name and super-node UUID + uuid::generateFromString(node_uuid, node_name, uuid::toString(uuid)); auto *n = NodeFactory::make(node_type, node_uuid, node_name); if (!n) From 4e0cb8cf58cfbb144844118788f6f22778d8c1e9 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 15:27:39 +0200 Subject: [PATCH 72/84] fix(format-raw): Remove unnecessary exception Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- lib/formats/raw.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/formats/raw.cpp b/lib/formats/raw.cpp index ea82c2960..2fcf72532 100644 --- a/lib/formats/raw.cpp +++ b/lib/formats/raw.cpp @@ -504,11 +504,6 @@ void RawFormat::parse(json_t *json) { "Failed to parse format configuration"); if (end) { - if (bits <= 8) - throw ConfigError( - json, "node-config-format-raw-endianess", - "An endianess settings must only provided for bits > 8"); - if (!strcmp(end, "little")) endianess = Endianess::LITTLE; else if (!strcmp(end, "big")) From 377769521b247d40f52be50860ff96f1807d9471 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 15:28:19 +0200 Subject: [PATCH 73/84] fix(hook-limit_value): Fix memory corruption Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- lib/hooks/limit_value.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hooks/limit_value.cpp b/lib/hooks/limit_value.cpp index e5c2ec39f..a54217cad 100644 --- a/lib/hooks/limit_value.cpp +++ b/lib/hooks/limit_value.cpp @@ -18,7 +18,8 @@ class LimitValueHook : public MultiSignalHook { protected: unsigned offset; - float min, max; + // jansson unpacks 'F' through a double * + double min, max; public: LimitValueHook(Path *p, Node *n, int fl, int prio) From c726cdd41877607ba209b1c73a5dfe320209de48 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 15:31:53 +0200 Subject: [PATCH 74/84] fix(hook-pmu): Allow explicit none window configuration Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- lib/hooks/pmu.cpp | 2 ++ lib/hooks/pmu_dft.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/hooks/pmu.cpp b/lib/hooks/pmu.cpp index 08cd98489..b8e42e65a 100644 --- a/lib/hooks/pmu.cpp +++ b/lib/hooks/pmu.cpp @@ -127,6 +127,8 @@ void PmuHook::parse(json_t *json) { if (!windowTypeC) logger->info("No Window type given, assume no windowing"); + else if (strcmp(windowTypeC, "none") == 0) + windowType = WindowType::NONE; else if (strcmp(windowTypeC, "flattop") == 0) windowType = WindowType::FLATTOP; else if (strcmp(windowTypeC, "hamming") == 0) diff --git a/lib/hooks/pmu_dft.cpp b/lib/hooks/pmu_dft.cpp index 87fea1201..68ac64c81 100644 --- a/lib/hooks/pmu_dft.cpp +++ b/lib/hooks/pmu_dft.cpp @@ -280,6 +280,8 @@ class PmuDftHook : public MultiSignalHook { if (!windowTypeC) logger->info("No Window type given, assume no windowing"); + else if (strcmp(windowTypeC, "none") == 0) + windowType = WindowType::NONE; else if (strcmp(windowTypeC, "flattop") == 0) windowType = WindowType::FLATTOP; else if (strcmp(windowTypeC, "hamming") == 0) From 9bff5291fed8d41e88f71d91a35327d6676fec47 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 15:33:19 +0200 Subject: [PATCH 75/84] fix(config): Always allow integers where floats are allowed Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- lib/hooks/limit_value.cpp | 2 +- lib/nodes/fpga.cpp | 2 +- lib/nodes/iec61850_goose.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hooks/limit_value.cpp b/lib/hooks/limit_value.cpp index a54217cad..1491abb42 100644 --- a/lib/hooks/limit_value.cpp +++ b/lib/hooks/limit_value.cpp @@ -33,7 +33,7 @@ class LimitValueHook : public MultiSignalHook { MultiSignalHook::parse(json); - ret = json_unpack_ex(json, &err, 0, "{ s: f, s: f }", "min", &min, "max", + ret = json_unpack_ex(json, &err, 0, "{ s: F, s: F }", "min", &min, "max", &max); if (ret) throw ConfigError(json, err, "node-config-hook-average"); diff --git a/lib/nodes/fpga.cpp b/lib/nodes/fpga.cpp index 3ddf08edf..f9019a0e5 100644 --- a/lib/nodes/fpga.cpp +++ b/lib/nodes/fpga.cpp @@ -127,7 +127,7 @@ int FpgaNode::parse(json_t *json) { vfioContainer = std::make_shared(); } - ret = json_unpack_ex(json, &err, 0, "{ s: o, s?: o, s?: b, s?: f}", "card", + ret = json_unpack_ex(json, &err, 0, "{ s: o, s?: o, s?: b, s?: F}", "card", &jsonCard, "connect", &jsonConnectStrings, "low_latency_mode", &lowLatencyMode, "timestep", ×tep); diff --git a/lib/nodes/iec61850_goose.cpp b/lib/nodes/iec61850_goose.cpp index 3b7b19b5b..b7b486598 100644 --- a/lib/nodes/iec61850_goose.cpp +++ b/lib/nodes/iec61850_goose.cpp @@ -900,7 +900,7 @@ void GooseNode::parseOutput(json_t *json) { char const *interface_id = "lo"; ret = json_unpack_ex( json, &err, 0, - "{ s:o, s:?b, s:?s, s:?i, s:?s, s:?i, s:?i, s:?s, s:?f }", // + "{ s:o, s:?b, s:?s, s:?i, s:?s, s:?i, s:?i, s:?s, s:?F }", // "publishers", &json_publishers, // "routed", &routed, // "local_address", &local_address, // From 45f065df0caf64250e987d029156a34befb2707b Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 10 Aug 2026 15:42:12 +0200 Subject: [PATCH 76/84] fix(node-loopback): Fix use of undefined macro Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- lib/nodes/loopback.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nodes/loopback.cpp b/lib/nodes/loopback.cpp index 5cd411afa..a0f844099 100644 --- a/lib/nodes/loopback.cpp +++ b/lib/nodes/loopback.cpp @@ -107,7 +107,7 @@ int LoopbackNode::parse(json_t *json) { if (mode_str) { if (!strcmp(mode_str, "auto")) mode = QueueSignalledMode::AUTO; -#ifdef HAVE_EVENTFD +#ifdef HAS_EVENTFD else if (!strcmp(mode_str, "eventfd")) mode = QueueSignalledMode::EVENTFD; #endif From db91736a8bd90663d0673ca66fc81f36b1bf3508 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 7 Sep 2026 23:04:30 +0200 Subject: [PATCH 77/84] fix(typo): Fix typo in "frequency" Signed-off-by: Steffen Vogel --- lib/hooks/pmu_dft.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hooks/pmu_dft.cpp b/lib/hooks/pmu_dft.cpp index 68ac64c81..e9b59d164 100644 --- a/lib/hooks/pmu_dft.cpp +++ b/lib/hooks/pmu_dft.cpp @@ -269,9 +269,9 @@ class PmuDftHook : public MultiSignalHook { json_t *json_start = json_object_get(json, "start_freqency"); if (json_start) startFrequency = json_number_value(json_start); - json_t *json_end = json_object_get(json, "end_freqency"); + json_t *json_end = json_object_get(json, "end_frequency"); if (json_end) - endFreqency = json_number_value(json_end); + endFrequency = json_number_value(json_end); windowSize = sampleRate * windowSizeFactor / (double)rate; logger->info( From 028ecf5e85a91fbd1fe497b952e304b32af55c64 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 7 Sep 2026 23:10:59 +0200 Subject: [PATCH 78/84] fix(openapi): Fix OpenAPI generation Signed-off-by: Steffen Vogel --- doc/villas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/villas.js b/doc/villas.js index 4dfab978e..37c48288a 100644 --- a/doc/villas.js +++ b/doc/villas.js @@ -229,7 +229,7 @@ function additionalItemsRule() { } } -module.exports = { +export default { id: 'villas', preprocessors: { From 4b0e7b85e64bf88cb93cd2885199345d6dc30653 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 2 Aug 2026 20:37:55 +0200 Subject: [PATCH 79/84] feat: Add grid2op-timeseries-converter script for chronics file generation Signed-off-by: Steffen Vogel --- tools/CMakeLists.txt | 7 + tools/grid2op-timeseries-converter.sh | 353 ++++++++++++++++++++++++++ 2 files changed, 360 insertions(+) create mode 100755 tools/grid2op-timeseries-converter.sh diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index fd638841f..8e486014e 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -25,3 +25,10 @@ install( DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME villas-api ) + +install( + PROGRAMS grid2op-timeseries-converter.sh + COMPONENT bin + DESTINATION ${CMAKE_INSTALL_BINDIR} + RENAME grid2op-timeseries-converter +) diff --git a/tools/grid2op-timeseries-converter.sh b/tools/grid2op-timeseries-converter.sh new file mode 100755 index 000000000..576a4d405 --- /dev/null +++ b/tools/grid2op-timeseries-converter.sh @@ -0,0 +1,353 @@ +#!/usr/bin/env bash +# +# Create chronics files for OpenDSS. +# This script reads a chronics config, grid mapping, and per-element CSV series, +# then writes the OpenDSS-ready load and generator chronics files. +# Reference: https://grid2op.readthedocs.io/en/latest/user/chronics.html +# +# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +die() { + echo "[error] $1" >&2 + exit 1 +} + +cleanup_tmp_dir() { + [[ -n "${tmp_dir:-}" && -d "$tmp_dir" ]] && rm -rf "$tmp_dir" +} + +require_cmd() { + local cmd="$1" + if ! command -v "$cmd" >/dev/null 2>&1; then + die "$cmd is not available. Please install it first." + fi +} + +round_dec() { + local value="$1" + local decimals="$2" + + awk -v value="$value" -v decimals="$decimals" 'BEGIN { + scale = 10^decimals + if (value >= 0) { + rounded = int(value * scale + 0.5) / scale + } else { + rounded = -int(-value * scale + 0.5) / scale + } + printf "%.15g\n", rounded + }' +} + +extract_file_number() { + local file="$1" + local stem + + stem=$(basename -- "$file") + stem=${stem%.*} + + if [[ "$stem" =~ ([0-9]+) ]]; then + printf '%s\n' "${BASH_REMATCH[1]}" + else + die "No numeric index in filename: $file" + fi +} + +sorted_files() { + local dir="$1" + local prefix="$2" + + [[ -d "$dir" ]] || die "Directory missing: $dir" + + local -a files=() + local file + shopt -s nullglob + for file in "$dir"/"$prefix"*.csv; do + files+=("$file") + done + shopt -u nullglob + + if (( ${#files[@]} == 0 )); then + return 0 + fi + + for file in "${files[@]}"; do + printf '%s\t%s\n' "$(extract_file_number "$file")" "$file" + done | sort -n -k1,1 | cut -f2- +} + +load_grid_mapping() { + local grid_file="$1" + local table="$2" + + jq -r --arg table "$table" ' + .["_object"][$table]["_object"] | fromjson as $df | + if ($df.columns | index("bus")) == null then + error($table + " dataframe does not contain a bus column") + else + $df + end | + if (.index | length) != (.data | length) then + error($table + " dataframe index and data length mismatch") + else + . + end | + (.columns | index("bus")) as $bus_idx | + range(0; (.index | length)) as $i | + "\(.index[$i])\t\(.data[$i][$bus_idx])" + ' "$grid_file" +} + +parse_series_csv() { + local file="$1" + local p_out="$2" + local q_out="$3" + local decimals="$4" + + : > "$p_out" + : > "$q_out" + + local first_line=1 + local line + local -a columns=() + local -a cells=() + local p_idx=-1 + local q_idx=-1 + local p_value + local q_value + + while IFS= read -r line || [[ -n "$line" ]]; do + if (( first_line )); then + first_line=0 + [[ -n "$line" ]] || die "Empty CSV: $file" + + IFS=, read -r -a columns <<< "$line" + for i in "${!columns[@]}"; do + case "${columns[$i]}" in + P_norm) p_idx=$i ;; + Q_norm) q_idx=$i ;; + esac + done + + (( p_idx >= 0 )) || die "Column P_norm missing in $file" + (( q_idx >= 0 )) || die "Column Q_norm missing in $file" + continue + fi + + [[ -z "$line" ]] && continue + + IFS=, read -r -a cells <<< "$line" + p_value="${cells[$p_idx]:-0}" + q_value="${cells[$q_idx]:-0}" + + round_dec "$p_value" "$decimals" >> "$p_out" + round_dec "$q_value" "$decimals" >> "$q_out" + done < "$file" + + (( first_line == 0 )) || die "Empty CSV: $file" +} + +write_output() { + local compress="$1" + local dest="$2" + local header="$3" + shift 3 + + local -a columns=("$@") + + if [[ "$compress" == true ]]; then + { + printf '%s\n' "$header" + if (( ${#columns[@]} > 0 )); then + paste -d ';' "${columns[@]}" + fi + } | bzip2 -c > "$dest" + else + { + printf '%s\n' "$header" + if (( ${#columns[@]} > 0 )); then + paste -d ';' "${columns[@]}" + fi + } > "$dest" + fi +} + +usage() { + cat >&2 < "$v_out" + while IFS= read -r _; do + printf '%s\n' "$voltage" >> "$v_out" + done < "$p_out" + + prod_p_columns+=("$p_out") + prod_q_columns+=("$q_out") + prod_v_columns+=("$v_out") + + if [[ -n "$sgen_col_names" ]]; then + sgen_col_names+=';' + fi + sgen_col_names+="sgen_${bus_id}_${sgen_idx}" + sgen_idx=$((sgen_idx + 1)) + done + + mkdir -p "$output_dir" + + local output_suffix="" + if [[ "$compress" == true ]]; then + require_cmd bzip2 + output_suffix=".bz2" + fi + + local -a output_names=(load_p load_q prod_p prod_q prod_v) + local -a output_headers=(load_col_names load_col_names sgen_col_names sgen_col_names sgen_col_names) + local -a output_columns=(load_p_columns load_q_columns prod_p_columns prod_q_columns prod_v_columns) + + local i output_name header_name columns_name + for i in "${!output_names[@]}"; do + output_name="${output_names[$i]}" + header_name="${output_headers[$i]}" + columns_name="${output_columns[$i]}" + + local -n output_columns_ref="$columns_name" + local output_path="$output_dir/${output_name}.csv${output_suffix}" + write_output "$compress" "$output_path" "${!header_name}" "${output_columns_ref[@]}" + done +} + +main "$@" From dc4f622a339063ad11c21bb36c5431b0ebd41a3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 21:46:39 +0000 Subject: [PATCH 80/84] chore(master): Release 1.3.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- doc/package.json | 2 +- python/pyproject.toml | 2 +- 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f6a9e1507..96f1cd949 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.2.2" + ".": "1.3.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index ca3149966..8c96ead58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## [1.3.0](https://github.com/VILLASframework/node/compare/v1.2.2...v1.3.0) (2026-09-07) + + +### Features + +* **clangd:** Add compilation database path to build dir ([cf11c70](https://github.com/VILLASframework/node/commit/cf11c700dd033589b8086f52569b34541be430de)) +* **config:** Allow JSON files with comments ([ddc86cc](https://github.com/VILLASframework/node/commit/ddc86ccaf5712aedc3f295f203f212e97ead7c01)) +* **config:** Validate configuration against JSON schema ([8f7a594](https://github.com/VILLASframework/node/commit/8f7a59442ee1285ba1d9f33d62c5ec9877b32ab1)) +* **editorconfig:** Add yaml configuration ([cb3aa96](https://github.com/VILLASframework/node/commit/cb3aa96950c0ab2969219664d01f172783ca9478)) +* **gdb:** Add gdbinit for nlohmann::json pretty printing ([627543f](https://github.com/VILLASframework/node/commit/627543f09093e16c16e8a569fa22b080c4e5a7c6)) +* **nix:** Use gcc14Stdenv for devShell.default ([f10bc15](https://github.com/VILLASframework/node/commit/f10bc151873d39fb5d104fc7abe6bc2ff40d6593)) +* **node:** Introduce json-schema-validator for bundled schemas ([629844b](https://github.com/VILLASframework/node/commit/629844bdf645e07a0f60cac729051401fb928cc5)) +* **openapi:** Make redocly configuration more strict ([1bb89ea](https://github.com/VILLASframework/node/commit/1bb89ea22b0f4efd41805278e5e20893ea62c444)) + + +### Bug Fixes + +* **config:** Always allow integers where floats are allowed ([ed648e3](https://github.com/VILLASframework/node/commit/ed648e314883baebb98726614eaa1f1d60166696)) +* **docker:** Add workaround for local/lib libraries ([a921bc6](https://github.com/VILLASframework/node/commit/a921bc67e56b8ed653018c9f1223a02aad588fab)) +* **format-raw:** Remove unnecessary exception ([58bc131](https://github.com/VILLASframework/node/commit/58bc131d1b99eebda0048841e20e321a1c02d5c4)) +* **hook-limit_value:** Fix memory corruption ([f0b6da8](https://github.com/VILLASframework/node/commit/f0b6da80604df251978227160724cf3bc376db63)) +* **hook-pmu_dft:** Fix configuration typos ([d782154](https://github.com/VILLASframework/node/commit/d782154131b98b11fe87a43a9cd2f3dd8b241ef0)) +* **hook-pmu:** Allow explicit none window configuration ([f83898a](https://github.com/VILLASframework/node/commit/f83898a138f8419f0f8c362dea8cc47922ecd9c9)) +* **node-loopback:** Fix use of undefined macro ([aff6078](https://github.com/VILLASframework/node/commit/aff6078dcf0387e950c0e36d9666e7c7e23f3c3b)) +* **node:** Remove enabled and initial_sequenceno from configuration ([a617c14](https://github.com/VILLASframework/node/commit/a617c140ff70b2201231e62bbac7bb692ca36950)) +* **openapi:** Fix OpenAPI generation ([90bc643](https://github.com/VILLASframework/node/commit/90bc64386d2f31ac7647fbfe72afd4e56e6d7e93)) +* **openapi:** Use OpenAPI 3.1.1 with JSON Schema Draft 07 dialect ([ca6d257](https://github.com/VILLASframework/node/commit/ca6d257ce2fce19c1a9c5aa2c5b22dd960334ab1)) +* **redocly:** Fix linter configuration ([6f17e43](https://github.com/VILLASframework/node/commit/6f17e4328bd6950684bce0e4a819620a57324cf8)) +* **super_node:** Remove unused broken code ([d2a612f](https://github.com/VILLASframework/node/commit/d2a612fb724aad313bd90d555d5e5e675af4406d)) +* **tests:** Fix invalid test and example configurations ([de7c0ff](https://github.com/VILLASframework/node/commit/de7c0ff811b2a1a2e51a2b82b755e9f49c517b4e)) +* **tests:** Reap left-over children from integration tests ([8e78de4](https://github.com/VILLASframework/node/commit/8e78de44a865f448b48457fa1f67182b8d2b58db)) +* **tool:** Catch std::exception instead of std::runtime_error ([f6fba5d](https://github.com/VILLASframework/node/commit/f6fba5d446626baef0180c9030c4483c319c5c90)) +* **typo:** Fix typo in "frequency" ([ba996ae](https://github.com/VILLASframework/node/commit/ba996aed9ed86cd4dcf7256278a81aaa12dce991)) + ## [1.2.2](https://github.com/VILLASframework/node/compare/v1.2.1...v1.2.2) (2026-09-07) diff --git a/CMakeLists.txt b/CMakeLists.txt index 183c1603c..911051d08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.14) project(villas-node - VERSION 1.2.2 # x-release-please-version + VERSION 1.3.0 # x-release-please-version DESCRIPTION "Open-Source Real-time Multi-protocol Gateway" HOMEPAGE_URL "https://www.fein-aachen.org/projects/villas-node/" LANGUAGES C CXX diff --git a/doc/package.json b/doc/package.json index 77af7beca..5ce68e263 100644 --- a/doc/package.json +++ b/doc/package.json @@ -1,6 +1,6 @@ { "name": "villasnode-api", - "version": "1.2.2", + "version": "1.3.0", "type": "module", "dependencies": { "@redocly/cli": "1.16.0" diff --git a/python/pyproject.toml b/python/pyproject.toml index 88d9e92d7..804685804 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'villas-node' -version = "1.2.2" +version = "1.3.0" description = 'Python support for the VILLASnode simulation-data gateway' readme = 'README.md' requires-python = '>=3.10' From e2f211d477cc6526e712781a509e3701cce50ac4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 21:47:11 +0000 Subject: [PATCH 81/84] chore(master): Release 1.3.0 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c96ead58..07ca86041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features +* Add grid2op-timeseries-converter script for chronics file generation ([df1fbae](https://github.com/VILLASframework/node/commit/df1fbaeb7959503fe354bafc69b834d997d1dbb9)) * **clangd:** Add compilation database path to build dir ([cf11c70](https://github.com/VILLASframework/node/commit/cf11c700dd033589b8086f52569b34541be430de)) * **config:** Allow JSON files with comments ([ddc86cc](https://github.com/VILLASframework/node/commit/ddc86ccaf5712aedc3f295f203f212e97ead7c01)) * **config:** Validate configuration against JSON schema ([8f7a594](https://github.com/VILLASframework/node/commit/8f7a59442ee1285ba1d9f33d62c5ec9877b32ab1)) From b6b16554b4795b4599df62c21fab5398509e393a Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 9 Sep 2026 08:46:06 +0200 Subject: [PATCH 82/84] fix(ci): Add version to Nix builds Signed-off-by: Steffen Vogel --- flake.nix | 11 ++++++++--- packaging/nix/python.nix | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 78ea1a619..e9a7b9e03 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,8 @@ let inherit (nixpkgs) lib; + version = "1.2.0"; # x-release-please-version + nixDir = ./packaging/nix; # Add separateDebugInfo to a derivation @@ -66,15 +68,18 @@ packagesWith = pkgs: rec { default = villas-node; - villas-node-python = pkgs.callPackage (nixDir + "/python.nix") { src = ./.; }; + villas-node-python = pkgs.callPackage (nixDir + "/python.nix") { + src = ./.; + inherit version; + }; villas-node-minimal = pkgs.callPackage (nixDir + "/villas.nix") { src = ./.; - version = "minimal"; + version = "${version}-minimal"; }; villas-node = villas-node-minimal.override { - version = "full"; + version = "${version}-full"; withAllExtras = true; withAllFormats = true; withAllHooks = true; diff --git a/packaging/nix/python.nix b/packaging/nix/python.nix index d91af6ef0..fdd41f54d 100644 --- a/packaging/nix/python.nix +++ b/packaging/nix/python.nix @@ -4,9 +4,11 @@ src, pkgs, python3Packages, + version, }: python3Packages.buildPythonPackage { - name = "villas-node"; + pname = "villas-node"; + inherit version; src = "${src}/python"; format = "pyproject"; propagatedBuildInputs = with python3Packages; [ From f351ffb6493ffc9c77ae1319cb18282f747e4859 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Sep 2026 06:46:31 +0000 Subject: [PATCH 83/84] chore(master): Release 1.3.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ CMakeLists.txt | 2 +- doc/package.json | 2 +- python/pyproject.toml | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 96f1cd949..9049e2fdf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.3.0" + ".": "1.3.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 07ca86041..214bd4f33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.1](https://github.com/VILLASframework/node/compare/v1.3.0...v1.3.1) (2026-09-09) + + +### Bug Fixes + +* **ci:** Add version to Nix builds ([6357645](https://github.com/VILLASframework/node/commit/6357645d63aa70926f22b837a912541ef39f73e8)) + ## [1.3.0](https://github.com/VILLASframework/node/compare/v1.2.2...v1.3.0) (2026-09-07) diff --git a/CMakeLists.txt b/CMakeLists.txt index 911051d08..6448ba65e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.14) project(villas-node - VERSION 1.3.0 # x-release-please-version + VERSION 1.3.1 # x-release-please-version DESCRIPTION "Open-Source Real-time Multi-protocol Gateway" HOMEPAGE_URL "https://www.fein-aachen.org/projects/villas-node/" LANGUAGES C CXX diff --git a/doc/package.json b/doc/package.json index 5ce68e263..75a6c479f 100644 --- a/doc/package.json +++ b/doc/package.json @@ -1,6 +1,6 @@ { "name": "villasnode-api", - "version": "1.3.0", + "version": "1.3.1", "type": "module", "dependencies": { "@redocly/cli": "1.16.0" diff --git a/python/pyproject.toml b/python/pyproject.toml index 804685804..ad194dc27 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'villas-node' -version = "1.3.0" +version = "1.3.1" description = 'Python support for the VILLASnode simulation-data gateway' readme = 'README.md' requires-python = '>=3.10' From 3833f335d0b24951cf2aec9d0fc2fcddd9664a09 Mon Sep 17 00:00:00 2001 From: Manuel Date: Sun, 13 Sep 2026 12:38:20 +0200 Subject: [PATCH 84/84] docs(schema): Update pps_ts schema to fit the hook Signed-off-by: Manuel --- .../components/schemas/hook-pps_ts.yaml | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/doc/openapi/components/schemas/hook-pps_ts.yaml b/doc/openapi/components/schemas/hook-pps_ts.yaml index 78ef0df35..6761fffb0 100644 --- a/doc/openapi/components/schemas/hook-pps_ts.yaml +++ b/doc/openapi/components/schemas/hook-pps_ts.yaml @@ -10,32 +10,11 @@ properties: type: string const: pps_ts - mode: - type: string - enum: - - simple - - horizon - default: simple - description: "The synchronization mode. The `horizon` mode is currently no recommended to use as it is not fully tested." - threshold: type: number default: 1.5 description: "The signal level threshold of the PPS signal which is used to detect an edge." - expected_smp_rate: - type: number - default: 1.0 - description: "The expected sampling rate of the input signal. Only important for a faster initialization." - - horizon_estimation: - type: integer - default: 10 - - horizon_compensation: - type: integer - default: 10 - priority: default: 99 $ref: ./shared-hook-priority.yaml