mListCommands.insert(std::make_pair("crfaders", sCommandPrototypeInfo("list all crossfaders", &CAmTelnetMenuHelper::listCrossfaders)));
mListCommands.insert(std::make_pair("domains", sCommandPrototypeInfo("list all domains", &CAmTelnetMenuHelper::listDomainsCommand)));
mListCommands.insert(std::make_pair("gws", sCommandPrototypeInfo("list all gateways", &CAmTelnetMenuHelper::listGatewaysCommand)));
+ mListCommands.insert(std::make_pair("mainconn", sCommandPrototypeInfo("list all main connections", &CAmTelnetMenuHelper::listMainConnectionsCommand)));
+ mListCommands.insert(std::make_pair("mainsinks", sCommandPrototypeInfo("list all main sinks", &CAmTelnetMenuHelper::listMainSinksCommand)));
+ mListCommands.insert(std::make_pair("mainsources", sCommandPrototypeInfo("list all main sources", &CAmTelnetMenuHelper::listMainSourcesCommand)));
mListCommands.insert(std::make_pair("..", sCommandPrototypeInfo("one step back in menu tree (back to root folder)", &CAmTelnetMenuHelper::oneStepBackCommand)));
mListCommands.insert(std::make_pair("exit", sCommandPrototypeInfo("close telnet session", &CAmTelnetMenuHelper::exitCommand)));
cmdIter = mRootCommands.begin();
while (cmdIter != mRootCommands.end())
{
- line << cmdIter->first << "\t- " << cmdIter->second.info << std::endl;
+ line << cmdIter->first << "\t\t- " << cmdIter->second.info << std::endl;
cmdIter++;
}
break;
cmdIter = mListCommands.begin();
while (cmdIter != mListCommands.end())
{
- line << cmdIter->first << "\t- " << cmdIter->second.info << std::endl;
+ line << cmdIter->first << "\t\t- " << cmdIter->second.info << std::endl;
cmdIter++;
}
break;
cmdIter = mGetCommands.begin();
while (cmdIter != mGetCommands.end())
{
- line << cmdIter->first << "\t- " << cmdIter->second.info << std::endl;
+ line << cmdIter->first << "\t\t- " << cmdIter->second.info << std::endl;
cmdIter++;
}
break;
cmdIter = mSetCommands.begin();
while (cmdIter != mSetCommands.end())
{
- line << cmdIter->first << "\t- " << cmdIter->second.info << std::endl;
+ line << cmdIter->first << "\t\t- " << cmdIter->second.info << std::endl;
cmdIter++;
}
break;
cmdIter = mInfoCommands.begin();
while (cmdIter != mInfoCommands.end())
{
- line << cmdIter->first << "\t- " << cmdIter->second.info << std::endl;
+ line << cmdIter->first << "\t\t- " << cmdIter->second.info << std::endl;
cmdIter++;
}
break;
/****************************************************************************/
{
(void) CmdQueue;
- std::vector<am_Connection_s> listConnections;
- std::stringstream line;
-
- mDatabasehandler->getListConnections(listConnections);
-
- line << "\tCurrent connections: " << listConnections.size() << std::endl;
- sendTelnetLine(filedescriptor, line);
-
- std::vector<am_Connection_s>::iterator it(listConnections.begin());
- while (it != listConnections.end())
+ std::vector<am_Connection_s> listConnections;
+ if(E_OK == mDatabasehandler->getListConnections(listConnections))
{
- line.str("");
- line << "\tID: " << it->connectionID << "\tSrcID: " << it->sourceID << "\tSinkID: " << it->sinkID << "\tFormat: " << it->connectionFormat << "\tdelay: " << it->delay << std::endl;
-
- sendTelnetLine(filedescriptor, line);
- it++;
+ std::stringstream output;
+ output << "\tConnections: " << listConnections.size() << std::endl;
+ for (std::vector<am_Connection_s>::iterator iter(listConnections.begin()); iter < listConnections.end(); iter++)
+ {
+ output << "\tID: " << iter->connectionID
+ << "\tSrcID: " << iter->sourceID
+ << "\tSinkID: " << iter->sinkID
+ << "\tFormat: " << iter->connectionFormat
+ << "\tdelay: " << iter->delay << std::endl;
+ }
+ sendTelnetLine(filedescriptor, output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListConnections");
}
}
/****************************************************************************/
{
(void) CmdQueue;
- std::vector<am_Source_s> listSources;
- std::stringstream line;
-
- mDatabasehandler->getListSources(listSources);
- line << "\tCurrent sources: " << listSources.size();
- sendTelnetLine(filedescriptor, line);
-
- std::vector<am_Source_s>::iterator it(listSources.begin());
- while (it != listSources.end())
+ std::vector<am_Source_s> listSources;
+ if(E_OK == mDatabasehandler->getListSources(listSources))
{
- line.str("");
- line << "\tID: " << it->sourceID << "\tDomainID: " << it->domainID << "\tName: " << it->name << "\tState: " << it->sourceState << "\tVolume: " << it->volume << std::endl;
-
- sendTelnetLine(filedescriptor, line);
- it++;
+ std::stringstream output;
+ output << "\tSources: " << listSources.size() << std::endl;
+ for (std::vector<am_Source_s>::iterator iter(listSources.begin()); iter < listSources.end(); iter++)
+ {
+ output << "\tID: " << iter->sourceID
+ << "\tName: " << iter->name
+ << "\tDomainID: " << iter->domainID
+ << "\tState: " << iter->sourceState
+ << "\tVolume: " << iter->volume << std::endl;
+ }
+ sendTelnetLine(filedescriptor, output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListSources");
}
}
/****************************************************************************/
{
(void) CmdQueue;
- std::vector<am_Sink_s> listSinks;
- std::stringstream line;
-
- mDatabasehandler->getListSinks(listSinks);
- line << "\tCurrent sinks: " << listSinks.size() << std::endl;
- sendTelnetLine(filedescriptor, line);
-
- std::vector<am_Sink_s>::iterator it(listSinks.begin());
- while (it != listSinks.end())
+ std::vector<am_Sink_s> listSinks;
+ if(E_OK == mDatabasehandler->getListSinks(listSinks))
{
- line.str("");
- line << "\tID: " << it->sinkID << "\tDomainID: " << it->domainID << "\tName: " << it->name << "\tAvailable: " << it->available.availability << "\tVolume: " << it->volume << std::endl;
+ std::stringstream output;
+ output << "\tSinks: " << listSinks.size() << std::endl;
+ for (std::vector<am_Sink_s>::iterator iter(listSinks.begin()); iter < listSinks.end(); iter++)
+ {
+ output << "\tID: " << iter->sinkID
+ << "\tDomainID: " << iter->domainID
+ << "\tName: " << iter->name
+ << "\tAvailable: " << iter->available.availability
+ << "\tVolume: " << iter->volume << std::endl;
+ }
- sendTelnetLine(filedescriptor, line);
- it++;
+ sendTelnetLine(filedescriptor, output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListSinks");
}
}
/****************************************************************************/
{
(void) CmdQueue;
- std::vector<am_Crossfader_s> listCrossfaders;
- std::stringstream line;
-
- mDatabasehandler->getListCrossfaders(listCrossfaders);
-
- line << "\tCurrent crossfaders: " << listCrossfaders.size();
- sendTelnetLine(filedescriptor, line);
- std::vector<am_Crossfader_s>::iterator it(listCrossfaders.begin());
- while (it != listCrossfaders.end())
+ std::vector<am_Crossfader_s> listCrossfaders;
+ if(E_OK == mDatabasehandler->getListCrossfaders(listCrossfaders))
{
- line.str("");
- line << "\tID: " << it->crossfaderID << "\tName: " << it->name << "\tSourceID: " << it->sourceID << std::endl;
+ std::stringstream output;
+ output << "\tCrossfaders: " << listCrossfaders.size() << std::endl;
+ for (std::vector<am_Crossfader_s>::iterator iter(listCrossfaders.begin()); iter < listCrossfaders.end(); iter++)
+ {
+ output << "\tID: " << iter->crossfaderID
+ << "\tName: " << iter->name
+ << "\tSourceID: " << iter->sourceID << std::endl;
+ }
- sendTelnetLine(filedescriptor, line);
- it++;
+ sendTelnetLine(filedescriptor, output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListCrossfaders");
}
}
/****************************************************************************/
{
(void) CmdQueue;
- std::vector<am_Domain_s> listDomains;
- std::stringstream line;
- mDatabasehandler->getListDomains(listDomains);
-
- line << "\tCurrent domains: " << listDomains.size() << std::endl;
- sendTelnetLine(filedescriptor, line);
-
- std::vector<am_Domain_s>::iterator it(listDomains.begin());
- while (it != listDomains.end())
+ std::vector<am_Domain_s> listDomains;
+ if(E_OK == mDatabasehandler->getListDomains(listDomains))
{
- line.str("");
- line << "\tID: " << it->domainID << "\tName: " << it->name << "\tBusname: " << it->busname << "\tNodename: " << it->nodename << "\tState: " << static_cast<int>(it->state) << std::endl;
+ std::stringstream output;
+ output << "\tDomains: " << listDomains.size() << std::endl;
+ for (std::vector<am_Domain_s>::iterator iter(listDomains.begin()); iter < listDomains.end(); iter++)
+ {
+ output << "\tID: " << iter->domainID
+ << "\tName: " << iter->name
+ << "\tBusname: " << iter->busname
+ << "\tNodename: " << iter->nodename
+ << "\tState: " << static_cast<int>(iter->state) << std::endl;
+ }
- sendTelnetLine(filedescriptor, line);
- it++;
+ sendTelnetLine(filedescriptor, output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListDomains");
}
}
/****************************************************************************/
{
(void) CmdQueue;
- std::vector<am_Gateway_s> listGateways;
- std::stringstream line;
-
- mDatabasehandler->getListGateways(listGateways);
- line << "\tCurrent gateways: " << listGateways.size();
- sendTelnetLine(filedescriptor, line);
-
- std::vector<am_Gateway_s>::iterator it(listGateways.begin());
- while (it != listGateways.end())
+ std::vector<am_Gateway_s> listGateways;
+ if(E_OK == mDatabasehandler->getListGateways(listGateways))
{
- line.str("");
- line << "\tID: " << it->gatewayID << "\tName: " << it->name << "\tSourceID: " << it->sourceID << "\tSinkID: " << it->sinkID << std::endl;
+ std::stringstream output;
+ output << "\tGateways: " << listGateways.size();
- sendTelnetLine(filedescriptor, line);
- it++;
+ for( std::vector<am_Gateway_s>::iterator iter(listGateways.begin()); iter < listGateways.end(); iter++)
+ {
+ output << "\tID: " << iter->gatewayID
+ << "\tName: " << iter->name
+ << "\tSourceID: " << iter->sourceID
+ << "\tSinkID: " << iter->sinkID << std::endl;
+ }
+ sendTelnetLine(filedescriptor, output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListGateways");
}
}
/****************************************************************************/
{
(void) CmdQueue;
- std::stringstream line;
- line << "\tSender versions:" << std::endl << "\tCtrl: " << mControlSender->getInterfaceVersion() << " | " << "Cmd: " << mCommandSender->getInterfaceVersion() << " | " << "Routing: " << mRoutingSender->getInterfaceVersion() << std::endl;
+ std::stringstream output;
+ output << "\tSender versions:" << std::endl << "\tCtrl: " << mControlSender->getInterfaceVersion() << " | " << "Cmd: " << mCommandSender->getInterfaceVersion() << " | " << "Routing: " << mRoutingSender->getInterfaceVersion() << std::endl;
- sendTelnetLine(filedescriptor, line);
+ sendTelnetLine(filedescriptor, output);
}
/****************************************************************************/
/****************************************************************************/
{
(void) CmdQueue;
- std::stringstream line;
- line << "\tReceiver versions:" << std::endl << "\tCtrl: " << mControlReceiver->getInterfaceVersion() << " | " << "Cmd: " << mCommandReceiver->getInterfaceVersion() << " | " << "Routing: " << mRoutingReceiver->getInterfaceVersion() << std::endl;
+ std::stringstream output;
+ output << "\tReceiver versions:" << std::endl << "\tCtrl: " << mControlReceiver->getInterfaceVersion() << " | " << "Cmd: " << mCommandReceiver->getInterfaceVersion() << " | " << "Routing: " << mRoutingReceiver->getInterfaceVersion() << std::endl;
- sendTelnetLine(filedescriptor, line);
+ sendTelnetLine(filedescriptor, output);
}
{
(void) CmdQueue;
std::vector<am_SystemProperty_s> listSystemProperties;
- std::vector<am_SystemProperty_s>::iterator it;
- std::stringstream line;
- mDatabasehandler->getListSystemProperties(listSystemProperties);
+ if(E_OK == mDatabasehandler->getListSystemProperties(listSystemProperties))
+ {
+ std::stringstream output;
+ output << "\tSystemproperties: " << listSystemProperties.size() << std::endl;
- line << "\tSystemproperties: ";
- sendTelnetLine(filedescriptor, line);
+ std::vector<am_SystemProperty_s>::iterator it;
+ for (it = listSystemProperties.begin(); it < listSystemProperties.end(); it++)
+ {
+ output << "\tType: " << it->type << " Value: " << it->value << std::endl;
+ }
- for (it = listSystemProperties.begin(); it < listSystemProperties.end(); it++)
+ sendTelnetLine(filedescriptor, output);
+ }
+ else
{
- line.str("");
- line << "\tType: " << it->type << " Value: " << it->value << std::endl;
- sendTelnetLine(filedescriptor, line);
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListSystemProperties");
}
+
+
}
/****************************************************************************/
void CAmTelnetMenuHelper::setRoutingCommandExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
/****************************************************************************/
{
- std::stringstream output;
- std::vector<am_Route_s> routingList;
- am_sourceID_t sourceID = 0;
- am_sinkID_t sinkID = 0;
-
- bool error = false;
- am_Error_e rError = E_OK;
if (CmdQueue.size() >= 2)
{
+ bool error = false;
+
std::istringstream istream_sourceID(CmdQueue.front());
CmdQueue.pop();
std::istringstream istream_sinkID(CmdQueue.front());
CmdQueue.pop();
+ am_sourceID_t sourceID = 0;
if (!(istream_sourceID >> sourceID))
error = true;
+
+ am_sinkID_t sinkID = 0;
if (!(istream_sinkID >> sinkID))
error = true;
if (DEBUG_ON)
std::cout << "setRoutingCommandExec(sourceID: " << sourceID << ",sinkID: " << sinkID << ")" << std::endl;
- rError = mRouter->getRoute(true, sourceID, sinkID, routingList);
-
- if (E_OK == rError)
+ std::vector<am_Route_s> routingList;
+ if (E_OK == mRouter->getRoute(true, sourceID, sinkID, routingList))
{
+ std::stringstream output;
+
std::vector<am_Route_s>::iterator rlIter = routingList.begin();
for (int rlCnt = 1; rlIter < routingList.end(); rlIter++)
{
}
else
{
- CmdQueue.pop();
- output << "Not enough arguments to set routing. Please enter sourceID and sinkID after command" << std::endl;
- return;
+ if(!CmdQueue.empty())
+ CmdQueue.pop();
+
+ sendError(filedescriptor,"Not enough arguments to set routing. Please enter sourceID and sinkID after command");
}
}
void CAmTelnetMenuHelper::setConnectionExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
/****************************************************************************/
{
- std::stringstream output;
- am_sourceID_t sourceID = 0;
- am_sinkID_t sinkID = 0;
- am_mainConnectionID_t connID = 0;
+
+
+
+
bool error = false;
am_Error_e rError = E_OK;
std::istringstream istream_sinkID(CmdQueue.front());
CmdQueue.pop();
+ am_sourceID_t sourceID = 0;
if (!(istream_sourceID >> sourceID))
error = true;
+ am_sinkID_t sinkID = 0;
if (!(istream_sinkID >> sinkID))
error = true;
}
// Try to set up connection
+ am_mainConnectionID_t connID = 0;
rError = mCommandReceiver->connect(sourceID, sinkID, connID);
if (E_OK == rError)
{
+ std::stringstream output;
output << "ConnID: " << connID << "\tSrc: " << sourceID << " ---> Sink: " << sinkID << std::endl;
sendTelnetLine(filedescriptor, output);
}
void CAmTelnetMenuHelper::setDisconnectConnIdExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
/****************************************************************************/
{
- std::stringstream output;
-
am_mainConnectionID_t connID = 0;
bool error = false;
if (E_OK == rError)
{
+ std::stringstream output;
output << "ConnID " << connID << " closed successfully! " << std::endl;
sendTelnetLine(filedescriptor, output);
}
void CAmTelnetMenuHelper::setSourceSoundPropertiesExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
/****************************************************************************/
{
- std::stringstream output;
- am_sinkID_t sourceID;
- am_MainSoundProperty_s soundProperty;
- unsigned int tmpType = 0;
- bool error = false;
-
if (CmdQueue.size() >= 3)
{
+ bool error = false;
+
std::istringstream istream_sourceID(CmdQueue.front());
CmdQueue.pop();
std::istringstream istream_value(CmdQueue.front());
CmdQueue.pop();
+ unsigned int tmpType = 0;
if (!(istream_type >> tmpType))
error = true;
+ am_MainSoundProperty_s soundProperty;
if (tmpType < MSP_MAX)
soundProperty.type = static_cast<am_MainSoundPropertyType_e>(tmpType);
else
if (!(istream_value >> soundProperty.value))
error = true;
+ am_sinkID_t sourceID = 0;
if (!(istream_sourceID >> sourceID))
error = true;
if (E_OK == mCommandReceiver->setMainSourceSoundProperty(soundProperty, sourceID))
{
+ std::stringstream output;
output << "MainSourceSoundProperty set: " << soundProperty.type << "->" << soundProperty.value << std::endl;
sendTelnetLine(filedescriptor, output);
}
void CAmTelnetMenuHelper::setSinkSoundPropertiesExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
/****************************************************************************/
{
- std::stringstream output;
- am_sinkID_t sinkID;
- am_MainSoundProperty_s soundProperty;
unsigned int tmpType = 0;
bool error = false;
if (!(istream_type >> tmpType))
error = true;
+ am_MainSoundProperty_s soundProperty;
if (tmpType < MSP_MAX)
soundProperty.type = static_cast<am_MainSoundPropertyType_e>(tmpType);
else
if (!(istream_value >> soundProperty.value))
error = true;
+ am_sinkID_t sinkID = 0;
if (!(istream_sinkID >> sinkID))
error = true;
if (E_OK == mCommandReceiver->setMainSinkSoundProperty(soundProperty, sinkID))
{
+ std::stringstream output;
output << "MainSinkSoundProperty set: " << soundProperty.type << "->" << soundProperty.value << std::endl;
sendTelnetLine(filedescriptor, output);
}
std::vector<std::string> PlugInNames;
std::vector<std::string>::iterator iter;
std::stringstream output;
- am_Error_e rError = E_OK;
- rError = mCommandSender->getListPlugins(PlugInNames);
- output << "CommandSender Plugins loaded: " << PlugInNames.size() << std::endl;
+ if(E_OK == mCommandSender->getListPlugins(PlugInNames))
+ {
+ output << "\tCommandSender Plugins loaded: " << PlugInNames.size() << std::endl;
- for (iter = PlugInNames.begin(); iter < PlugInNames.end(); iter++)
+ for (iter = PlugInNames.begin(); iter < PlugInNames.end(); iter++)
+ {
+ output << iter->c_str() << std::endl;
+ }
+ }
+ else
{
- output << iter->c_str() << std::endl;
+ sendError(filedescriptor,"ERROR: mCommandSender->getListPlugins");
}
- rError = mRoutingSender->getListPlugins(PlugInNames);
- output << std::endl << "RoutingSender Plugins loaded: " << PlugInNames.size() << std::endl;
+ if(E_OK == mRoutingSender->getListPlugins(PlugInNames))
+ {
+ output << std::endl << "\tRoutingSender Plugins loaded: " << PlugInNames.size() << std::endl;
- for (iter = PlugInNames.begin(); iter < PlugInNames.end(); iter++)
+ for (iter = PlugInNames.begin(); iter < PlugInNames.end(); iter++)
+ {
+ output << iter->c_str() << std::endl;
+ }
+ }
+ else
{
- output << iter->c_str() << std::endl;
+ sendError(filedescriptor,"ERROR: mRoutingSender->getListPlugins");
}
+
sendTelnetLine(filedescriptor, output);
}
+
+/****************************************************************************/
+void CAmTelnetMenuHelper::listMainSourcesCommand(std::queue<std::string> & CmdQueue, int & filedescriptor)
+/****************************************************************************/
+{
+ instance->listMainSourcesCommandExec(CmdQueue,filedescriptor);
+}
+
+/****************************************************************************/
+void CAmTelnetMenuHelper::listMainSourcesCommandExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
+/****************************************************************************/
+{
+ (void) CmdQueue;
+ std::vector<am_SourceType_s> listMainSources;
+
+ if(E_OK == mDatabasehandler->getListMainSources(listMainSources))
+ {
+ std::stringstream output;
+ output << std::endl << "\tMainSources: " << listMainSources.size() << std::endl;
+
+ std::vector<am_SourceType_s>::iterator iter;
+ for (iter = listMainSources.begin(); iter < listMainSources.end(); iter++)
+ {
+ output << "\t" << iter->name << "\tID: " << iter->sourceID
+ << "\tClassID: " << iter->sourceClassID
+ << "\tavailability: " << static_cast<int>(iter->availability.availability)
+ << "\tavailabilityReason: " << static_cast<int>(iter->availability.availabilityReason) << std::endl;
+ }
+ sendTelnetLine(filedescriptor,output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListMainSources");
+ }
+}
+
+/****************************************************************************/
+void CAmTelnetMenuHelper::listMainSinksCommand(std::queue<std::string> & CmdQueue, int & filedescriptor)
+/****************************************************************************/
+{
+ instance->listMainSinksCommandExec(CmdQueue,filedescriptor);
+}
+
+/****************************************************************************/
+void CAmTelnetMenuHelper::listMainSinksCommandExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
+/****************************************************************************/
+{
+ (void) CmdQueue;
+ std::vector<am_SinkType_s> listMainSinks;
+
+ if(E_OK == mDatabasehandler->getListMainSinks(listMainSinks))
+ {
+ std::stringstream output;
+ output << std::endl << "\tMainSinks: " << listMainSinks.size() << std::endl;
+
+ std::vector<am_SinkType_s>::iterator iter;
+ for ( iter = listMainSinks.begin(); iter < listMainSinks.end(); iter++)
+ {
+ output << "\t" << iter->name << "\tID: " << iter->sinkID
+ << "\tClassID: " << iter->sinkClassID
+ << "\tavailability: " << static_cast<int>(iter->availability.availability)
+ << "\tavailabilityReason: " << static_cast<int>(iter->availability.availabilityReason)
+ << "\tMuteState: " << iter->muteState
+ << "\tVolume: " << iter->volume << std::endl;
+ }
+ sendTelnetLine(filedescriptor,output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListMainSinks");
+ }
+}
+
+/****************************************************************************/
+void CAmTelnetMenuHelper::listMainConnectionsCommand(std::queue<std::string> & CmdQueue, int & filedescriptor)
+/****************************************************************************/
+{
+ instance->listMainConnectionsCommandExec(CmdQueue,filedescriptor);
+}
+
+/****************************************************************************/
+void CAmTelnetMenuHelper::listMainConnectionsCommandExec(std::queue<std::string> & CmdQueue, int & filedescriptor)
+/****************************************************************************/
+{
+ (void) CmdQueue;
+ std::vector<am_MainConnection_s> listMainConnections;
+
+ if(E_OK == mDatabasehandler->getListMainConnections(listMainConnections))
+ {
+ std::stringstream output;
+ output << std::endl << "\tMainConnections: " << listMainConnections.size() << std::endl;
+
+ std::vector<am_MainConnection_s>::iterator iter;
+ for (iter = listMainConnections.begin(); iter < listMainConnections.end(); iter++)
+ {
+ output << "\tID: " << iter->mainConnectionID
+ << "\tState: " << iter->connectionState
+ << "\tDelay: " << iter->delay
+ << "\tsourceID: " << iter->sourceID
+ << "\tsinkID: " << iter->sinkID << std::endl;
+
+ output << "ConnectionIDs: ";
+ std::vector<am_connectionID_t>::iterator list_connIDs_iter = iter->listConnectionID.begin();
+ for(;list_connIDs_iter < iter->listConnectionID.end();list_connIDs_iter++)
+ {
+ output << *list_connIDs_iter << " ";
+ }
+
+ output << std::endl;
+ }
+ sendTelnetLine(filedescriptor,output);
+ }
+ else
+ {
+ sendError(filedescriptor,"ERROR: mDatabasehandler->getListMainSinks");
+ }
+}
+
+
+
+
+
+