diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-01-12 19:41:27 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-01-12 19:41:27 +0100 |
commit | 9164c7e5fd57ed4f5d503c96c97125a90c335b00 (patch) | |
tree | 55a71e5aa5fdb4af558c1ba98bab6d69eabec4f6 /src/ParserConfigfile.cpp | |
parent | c004b44ad7d0dba8e602875e8a367cd7c4008df1 (diff) | |
download | dabmux-9164c7e5fd57ed4f5d503c96c97125a90c335b00.tar.gz dabmux-9164c7e5fd57ed4f5d503c96c97125a90c335b00.tar.bz2 dabmux-9164c7e5fd57ed4f5d503c96c97125a90c335b00.zip |
Define User Application Type in configuration file
Diffstat (limited to 'src/ParserConfigfile.cpp')
-rw-r--r-- | src/ParserConfigfile.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp index 1a954d7..c94a370 100644 --- a/src/ParserConfigfile.cpp +++ b/src/ParserConfigfile.cpp @@ -449,13 +449,6 @@ void parse_configfile(string configuration_file, } if (figType != -1) { - if (! component->isPacketComponent(ensemble->subchannels)) { - stringstream ss; - ss << "Component with uid " << componentuid << - " is not packet, cannot have figtype defined !"; - throw runtime_error(ss.str()); - } - if (figType >= (1<<12)) { stringstream ss; ss << "Component with uid " << componentuid << @@ -463,28 +456,35 @@ void parse_configfile(string configuration_file, throw runtime_error(ss.str()); } - component->packet.appType = figType; - } + if (component->isPacketComponent(ensemble->subchannels)) { + component->packet.appType = figType; - if (packet_address != -1) { - if (! component->isPacketComponent(ensemble->subchannels)) { - stringstream ss; - ss << "Component with uid " << componentuid << - " is not packet, cannot have address defined !"; - throw runtime_error(ss.str()); + } + else { + component->audio.uaType = figType; } - 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()); + if (packet_address != -1) { + if (! component->isPacketComponent(ensemble->subchannels)) { + stringstream ss; + ss << "Component with uid " << componentuid << + " is not packet, cannot have address defined !"; + throw runtime_error(ss.str()); + } + + 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; } - component->packet.datagroup = packet_datagroup; } ensemble->components.push_back(component); |