From 9164c7e5fd57ed4f5d503c96c97125a90c335b00 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 12 Jan 2015 19:41:27 +0100 Subject: Define User Application Type in configuration file --- src/ParserConfigfile.cpp | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src/ParserConfigfile.cpp') 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); -- cgit v1.2.3