From 512fb09aec038a612317e89c49ad5a672baf2395 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Mon, 9 Sep 2024 16:26:28 +0200 Subject: [PATCH] feat(dag-parser): add support for application configurations --- dag-syntax.cddl | 1 + include/iceflow/dag-parser.hpp | 1 + src/dag-parser.cpp | 3 +++ 3 files changed, 5 insertions(+) diff --git a/dag-syntax.cddl b/dag-syntax.cddl index 28f43c22..560c7536 100644 --- a/dag-syntax.cddl +++ b/dag-syntax.cddl @@ -38,6 +38,7 @@ node = { ? payloadSize: uint, }, ? downstream: [ + edge ], + ? applicationConfiguration: { * text => any } } edge = { diff --git a/include/iceflow/dag-parser.hpp b/include/iceflow/dag-parser.hpp index 2181acc4..0a2191c4 100644 --- a/include/iceflow/dag-parser.hpp +++ b/include/iceflow/dag-parser.hpp @@ -68,6 +68,7 @@ struct Node { ScalingParameters scalingParameters; CommunicationTask communicationTask; std::vector downstream; + nlohmann::json::object_t applicationConfiguration; }; /** diff --git a/src/dag-parser.cpp b/src/dag-parser.cpp index bb6639c2..50ecc3f6 100644 --- a/src/dag-parser.cpp +++ b/src/dag-parser.cpp @@ -82,6 +82,9 @@ DAGParser DAGParser::parseFromFile(const std::string &filename) { nodeInstance.downstream = edges; } + nodeInstance.applicationConfiguration = + nodeJson.value("applicationConfiguration", nlohmann::json::object()); + nodeList.push_back(nodeInstance); }