AudioManager  7.6.6
Native Application Runtime Environment
main.cpp File Reference

SPDX license identifier: MPL-2.0. More...

#include "audiomanagerconfig.h"
#include <sys/resource.h>
#include <sys/stat.h>
#include <unistd.h>
#include <cstdlib>
#include <cassert>
#include <fcntl.h>
#include <csignal>
#include <cstring>
#include <cstdio>
#include <new>
#include "CAmRouter.h"
#include "CAmControlSender.h"
#include "CAmCommandSender.h"
#include "CAmRoutingSender.h"
#include "CAmRoutingReceiver.h"
#include "CAmCommandReceiver.h"
#include "CAmControlReceiver.h"
#include "CAmDltWrapper.h"
#include "CAmSocketHandler.h"
#include "CAmCommandLineSingleton.h"
#include "CAmDatabaseHandlerMap.h"

Go to the source code of this file.

Macros

#define AUDIOMANGER_APP_ID   "AUDI"
 
#define AUDIOMANGER_APP_DESCRIPTION   "AudioManager"
 

Functions

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")
 
TCLAP::ValueArg< std::string > commandPluginDir ("l","CommandPluginDir","path for looking for command plugins", false," ","string")
 
TCLAP::ValueArg< std::string > dltLogFilename ("F","dltLogFilename","the name of the logfile, absolute path. Only if logging is et to file", false," ","string")
 
TCLAP::ValueArg< unsigned int > dltOutput ("O","dltOutput","defines where logs are written. 0=dlt-daemon(default), 1=command line, 2=file ", false, 0,"int")
 
TCLAP::SwitchArg dltEnable ("e","dltEnable","Enables or disables dlt logging. Default = enabled", true)
 
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 currentSettings ("i","currentSettings","print current settings and exit", false)
 
TCLAP::SwitchArg daemonizeAM ("d","daemonize","daemonize Audiomanager. Better use systemd...", false)
 
void OutOfMemoryHandler ()
 the out of memory handler More...
 
void daemonize ()
 daemonizes the AudioManager More...
 
void printCmdInformation ()
 
void mainProgram (int argc, char *argv[])
 
int main (int argc, char *argv[], char **envp)
 main More...
 

Variables

std::vector< std::string > listCommandPluginDirs
 
std::vector< std::string > listRoutingPluginDirs
 
std::vector< uint8_t > listOfSignalsFD = {SIGHUP, SIGTERM, SIGCHLD}
 
int fd0
 
int fd1
 
int fd2
 

Detailed Description

SPDX license identifier: MPL-2.0.

Copyright (C) 2012, BMW AG

This file is part of GENIVI Project AudioManager.

Contributions are licensed to the GENIVI Alliance under one or more Contribution License Agreements.

Author
Christian Linke, chris.nosp@m.tian.nosp@m..link.nosp@m.e@bm.nosp@m.w.de BMW 2011,2012
Frank Herchet, frank.nosp@m..fh..nosp@m.herch.nosp@m.et@b.nosp@m.mw.de BMW 2012

For further information see http://www.genivi.org/.

Definition in file main.cpp.

Macro Definition Documentation

#define AUDIOMANGER_APP_DESCRIPTION   "AudioManager"

Definition at line 68 of file main.cpp.

#define AUDIOMANGER_APP_ID   "AUDI"

Definition at line 64 of file main.cpp.

Function Documentation

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> commandPluginDir ( "l"  ,
"CommandPluginDir"  ,
"path for looking for command plugins"  ,
false  ,
" "  ,
"string"   
)
TCLAP::ValueArg<std::string> controllerPlugin ( "c"  ,
"controllerPlugin"  ,
"use controllerPlugin full path with .so ending"  ,
false  ,
CONTROLLER_PLUGIN_DIR  ,
"string"   
)
TCLAP::SwitchArg currentSettings ( "i"  ,
"currentSettings"  ,
"print current settings and exit"  ,
false   
)
void daemonize ( )

daemonizes the AudioManager

Definition at line 112 of file main.cpp.

TCLAP::SwitchArg daemonizeAM ( "d"  ,
"daemonize"  ,
"daemonize Audiomanager. Better use systemd..."  ,
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 dltEnable ( "e"  ,
"dltEnable"   
)
TCLAP::ValueArg<std::string> dltLogFilename ( "F"  ,
"dltLogFilename"  ,
"the name of the  logfile,
absolute path.Only if logging is et to file"  ,
false  ,
" "  ,
"string"   
)
TCLAP::ValueArg<unsigned int> dltOutput ( "O"  ,
"dltOutput"  ,
"defines where logs are written.  0 = dlt-daemon(default),
= command line 
)
int main ( int  argc,
char *  argv[],
char **  envp 
)

main

Parameters
argc
argv
Returns

Definition at line 388 of file main.cpp.

void mainProgram ( int  argc,
char *  argv[] 
)

Definition at line 216 of file main.cpp.

void OutOfMemoryHandler ( )

the out of memory handler

Definition at line 103 of file main.cpp.

void printCmdInformation ( )

Definition at line 162 of file main.cpp.

TCLAP::ValueArg<std::string> routingPluginDir ( "r"  ,
"RoutingPluginDir"  ,
"path for looking for routing plugins"  ,
false  ,
" "  ,
"string"   
)

Variable Documentation

int fd0

Definition at line 94 of file main.cpp.

int fd1

Definition at line 94 of file main.cpp.

int fd2

Definition at line 94 of file main.cpp.

std::vector<std::string> listCommandPluginDirs

Definition at line 75 of file main.cpp.

std::vector<uint8_t> listOfSignalsFD = {SIGHUP, SIGTERM, SIGCHLD}

Definition at line 79 of file main.cpp.

std::vector<std::string> listRoutingPluginDirs

Definition at line 76 of file main.cpp.