summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-12-25 17:38:49 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-12-25 17:38:49 +0100
commit9a510ee0e34eebe79c5626b66e7493191b555cef (patch)
tree6324abda0c39fd3dad42b22e1ebb7dfbc7905d20 /src
parent86a0a6d93e336655b5419b233a374a5fe7161e1f (diff)
downloaddabmux-9a510ee0e34eebe79c5626b66e7493191b555cef.tar.gz
dabmux-9a510ee0e34eebe79c5626b66e7493191b555cef.tar.bz2
dabmux-9a510ee0e34eebe79c5626b66e7493191b555cef.zip
Add datagroup option to config file
Diffstat (limited to 'src')
-rw-r--r--src/ParserConfigfile.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp
index 2ae6555..1a954d7 100644
--- a/src/ParserConfigfile.cpp
+++ b/src/ParserConfigfile.cpp
@@ -400,6 +400,7 @@ void parse_configfile(string configuration_file,
int figType = hexparse(pt_comp.get("figtype", "-1"));
int packet_address = hexparse(pt_comp.get("address", "-1"));
+ int packet_datagroup = pt_comp.get("datagroup", false);
uint8_t component_type = hexparse(pt_comp.get("type", "0"));
DabComponent* component = new DabComponent(componentuid);
@@ -475,6 +476,16 @@ void parse_configfile(string configuration_file,
component->packet.address = packet_address;
}
+ if (packet_datagroup) {
+ if (! component->isPacketComponent(ensemble->subchannels)) {
+ stringstream ss;
+ ss << "Component with uid " << componentuid <<
+ " is not packet, cannot have datagroup enabled !";
+ throw runtime_error(ss.str());
+ }
+
+ component->packet.datagroup = packet_datagroup;
+ }
ensemble->components.push_back(component);