diff options
author | Christian Linke <Christian.Linke@bmw.de> | 2016-02-11 07:28:47 +0100 |
---|---|---|
committer | Christian Linke <Christian.Linke@bmw.de> | 2016-02-15 09:00:59 +0100 |
commit | 5bcd206b9270d9a79e212f91723ea1a08a4d4859 (patch) | |
tree | 55b0cd4d07fbd7ebfd15d58d02e9cae6ae61b127 /AudioManagerDaemon/src/main.cpp | |
parent | 59080ecc2c8840fd85c561adea3f85f5344534a8 (diff) | |
download | audiomanager-5bcd206b9270d9a79e212f91723ea1a08a4d4859.tar.gz |
* rework of the build structure, adopt to standard cmake package structure7.4
* check versions when loading the libs
* introduction of the AudioManagerCore
* give control plugin as file or directory
* remove SQLITE
* either find and use gmock or build and install it
* fixed [Bug 411]
* compile flag gnu11 is now used
Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
Diffstat (limited to 'AudioManagerDaemon/src/main.cpp')
-rwxr-xr-x | AudioManagerDaemon/src/main.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp index 795795d..d71c02b 100755 --- a/AudioManagerDaemon/src/main.cpp +++ b/AudioManagerDaemon/src/main.cpp @@ -79,7 +79,7 @@ std::vector<std::string> listCommandPluginDirs; std::vector<std::string> listRoutingPluginDirs; //commandline options used by the Audiomanager itself -TCLAP::ValueArg<std::string> controllerPlugin("c","controllerPlugin","use controllerPlugin full path with .so ending",false,CONTROLLER_PLUGIN,"string"); +TCLAP::ValueArg<std::string> controllerPlugin("c","controllerPlugin","use controllerPlugin full path with .so ending",false,CONTROLLER_PLUGIN_DIR,"string"); TCLAP::ValueArg<std::string> additionalCommandPluginDirs("L","additionalCommandPluginDirs","additional path for looking for command plugins, can be used after -l option",false," ","string"); TCLAP::ValueArg<std::string> additionalRoutingPluginDirs("R","additionalRoutingPluginDirs","additional path for looking for routing plugins, can be used after -r option ",false," ","string"); TCLAP::ValueArg<std::string> routingPluginDir("r","RoutingPluginDir","path for looking for routing plugins",false," ","string"); @@ -87,8 +87,8 @@ TCLAP::ValueArg<std::string> commandPluginDir("l","CommandPluginDir","path for l TCLAP::ValueArg<std::string> databasePath ("p","databasePath","path for sqlite database (default is in memory)",false,":memory:","string"); TCLAP::ValueArg<unsigned int> telnetPort ("t","telnetport","The port that is used for telnet",false,DEFAULT_TELNETPORT,"int"); TCLAP::ValueArg<unsigned int> maxConnections ("m","maxConnections","Maximal number of connections for telnet",false,MAX_TELNETCONNECTIONS,"int"); -TCLAP::SwitchArg dbusWrapperTypeBool ("t","dbusType","DbusType to be used by CAmDbusWrapper: if option is selected, DBUS_SYSTEM is used otherwise DBUS_SESSION",false); -TCLAP::SwitchArg enableNoDLTDebug ("V","logDlt","print DLT logs to stdout",false); +TCLAP::SwitchArg dbusWrapperTypeBool ("T","dbusType","DbusType to be used by CAmDbusWrapper: if option is selected, DBUS_SYSTEM is used otherwise DBUS_SESSION",false); +TCLAP::SwitchArg enableNoDLTDebug ("V","logDlt","print DLT logs to stdout or dlt-daemon, default on",true); TCLAP::SwitchArg currentSettings("i","currentSettings","print current settings and exit",false); TCLAP::SwitchArg daemonizeAM("d","daemonize","daemonize Audiomanager. Better use systemd...",false); @@ -104,8 +104,7 @@ int fd0, fd1, fd2; void OutOfMemoryHandler() { logError("No more memory - bye"); - //todo: add gracefull dead here. Do what can be done persistence wise - exit(1); + throw std::runtime_error(std::string("SocketHandler::start_listenting ppoll returned with error.")); } /** @@ -169,9 +168,6 @@ void printCmdInformation() printf("\tTelnet portNumber:\t\t\t%i\n", telnetPort.getValue()); printf("\tTelnet maxConnections:\t\t\t%i\n", maxConnections.getValue()); #endif -#ifdef WITH_DATABASE_STORAGE - printf("\tSqlite Database path:\t\t\t%s\n", databasePath.getValue().c_str()); -#endif #ifndef WITH_DLT printf("\tDlt Command Line Output: \t\t%s\n", enableNoDLTDebug.getValue()?"enabled":"not enabled"); #endif @@ -248,9 +244,7 @@ void mainProgram(int argc, char *argv[]) cmd->add(routingPluginDir); cmd->add(currentSettings); cmd->add(daemonizeAM); -#ifndef WITH_DLT cmd->add(enableNoDLTDebug); -#endif #ifdef WITH_DBUS_WRAPPER cmd->add(dbusWrapperTypeBool); #endif |