summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src/ControlReceiver.cpp
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2011-12-29 17:07:38 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2011-12-30 03:08:00 +0100
commit93d7610b460c6212a3098a3eccb127fd45ada345 (patch)
tree0e00544ede90f06dd9933c003c4b7cc72f964af3 /AudioManagerDaemon/src/ControlReceiver.cpp
parentb7e748007bbe0b16fa8a8a089c6cc8fe43bc7aac (diff)
downloadaudiomanager-93d7610b460c6212a3098a3eccb127fd45ada345.tar.gz
*added versioning support automatically out of git
*added commandline parser *changed DLT_CONTEXT for AudioManager to AudioManager *added signalhandler *TODO: make signalhandler not only call but correctly rundown the daemon
Diffstat (limited to 'AudioManagerDaemon/src/ControlReceiver.cpp')
-rw-r--r--AudioManagerDaemon/src/ControlReceiver.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/AudioManagerDaemon/src/ControlReceiver.cpp b/AudioManagerDaemon/src/ControlReceiver.cpp
index d5f2deb..3a88c84 100644
--- a/AudioManagerDaemon/src/ControlReceiver.cpp
+++ b/AudioManagerDaemon/src/ControlReceiver.cpp
@@ -27,7 +27,7 @@
#include <assert.h>
#include <dlt/dlt.h>
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
using namespace am;
@@ -68,7 +68,7 @@ am_Error_e ControlReceiver::getRoute(const bool onlyfree, const am_sourceID_t so
am_Error_e ControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::connect got called, connectionFormat"),DLT_INT(format),DLT_STRING("sourceID"),DLT_INT(sourceID),DLT_STRING("sinkID"),DLT_INT(sinkID));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::connect got called, connectionFormat"),DLT_INT(format),DLT_STRING("sourceID"),DLT_INT(sourceID),DLT_STRING("sinkID"),DLT_INT(sinkID));
am_Connection_s tempConnection;
tempConnection.sinkID=sinkID;
@@ -87,7 +87,7 @@ am_Error_e ControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & co
am_Error_e ControlReceiver::disconnect(am_Handle_s & handle, const am_connectionID_t connectionID)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::disconnect got called, connectionID="),DLT_INT(connectionID));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::disconnect got called, connectionID="),DLT_INT(connectionID));
if (!mDatabaseHandler->existConnectionID(connectionID)) return E_NON_EXISTENT; //todo: check with EA model and correct
return mRoutingSender->asyncDisconnect(handle,connectionID);
@@ -97,7 +97,7 @@ am_Error_e ControlReceiver::disconnect(am_Handle_s & handle, const am_connection
am_Error_e ControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::crossfade got called, hotSource="),DLT_INT(hotSource),DLT_STRING("crossfaderID="),DLT_INT(crossfaderID),DLT_STRING("rampType="),DLT_INT(rampType),DLT_STRING("rampTime="),DLT_INT(rampTime));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::crossfade got called, hotSource="),DLT_INT(hotSource),DLT_STRING("crossfaderID="),DLT_INT(crossfaderID),DLT_STRING("rampType="),DLT_INT(rampType),DLT_STRING("rampTime="),DLT_INT(rampTime));
if (!mDatabaseHandler->existcrossFader(crossfaderID)) return E_NON_EXISTENT;
return mRoutingSender->asyncCrossFade(handle,crossfaderID,hotSource,rampType,rampTime);
@@ -107,7 +107,7 @@ am_Error_e ControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e h
am_Error_e ControlReceiver::setSourceState(am_Handle_s & handle, const am_sourceID_t sourceID, const am_SourceState_e state)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceState got called, sourceID="),DLT_INT(sourceID),DLT_STRING("state="),DLT_INT(state));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceState got called, sourceID="),DLT_INT(sourceID),DLT_STRING("state="),DLT_INT(state));
am_SourceState_e sourceState;
if(mDatabaseHandler->getSoureState(sourceID,sourceState)!=E_OK) return E_UNKNOWN;
@@ -119,7 +119,7 @@ am_Error_e ControlReceiver::setSourceState(am_Handle_s & handle, const am_source
am_Error_e ControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(ramp),DLT_STRING("time="),DLT_INT(time));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(ramp),DLT_STRING("time="),DLT_INT(time));
am_volume_t tempVolume;
if(mDatabaseHandler->getSinkVolume(sinkID,tempVolume)!=E_OK) return E_UNKNOWN;
@@ -131,7 +131,7 @@ am_Error_e ControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_
am_Error_e ControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceVolume got called, sourceID="),DLT_INT(sourceID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(rampType),DLT_STRING("time="),DLT_INT(time));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceVolume got called, sourceID="),DLT_INT(sourceID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(rampType),DLT_STRING("time="),DLT_INT(time));
am_volume_t tempVolume;
if(mDatabaseHandler->getSourceVolume(sourceID,tempVolume)!=E_OK) return E_UNKNOWN;
@@ -143,7 +143,7 @@ am_Error_e ControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourc
am_Error_e ControlReceiver::setSinkSoundProperty(am_Handle_s & handle, const am_sinkID_t sinkID, const am_SoundProperty_s & soundProperty)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkSoundProperty got called, sinkID="),DLT_INT(sinkID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkSoundProperty got called, sinkID="),DLT_INT(sinkID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value));
uint16_t value;
if(mDatabaseHandler->getSinkSoundPropertyValue(sinkID,soundProperty.type,value)!=E_OK) return E_UNKNOWN;
@@ -155,7 +155,7 @@ am_Error_e ControlReceiver::setSinkSoundProperty(am_Handle_s & handle, const am_
am_Error_e ControlReceiver::setSourceSoundProperty(am_Handle_s & handle, const am_sourceID_t sourceID, const am_SoundProperty_s & soundProperty)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceSoundProperty got called, sourceID="),DLT_INT(sourceID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceSoundProperty got called, sourceID="),DLT_INT(sourceID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value));
uint16_t value;
if(mDatabaseHandler->getSourceSoundPropertyValue(sourceID,soundProperty.type,value)!=E_OK) return E_UNKNOWN;
@@ -167,7 +167,7 @@ am_Error_e ControlReceiver::setSourceSoundProperty(am_Handle_s & handle, const a
am_Error_e ControlReceiver::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setDomainState got called, domainID="),DLT_INT(domainID),DLT_STRING("domainState="),DLT_INT(domainState));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setDomainState got called, domainID="),DLT_INT(domainID),DLT_STRING("domainState="),DLT_INT(domainState));
am_DomainState_e tempState=DS_MIN;
if(mDatabaseHandler->getDomainState(domainID,tempState)!=E_OK) return E_UNKNOWN;
@@ -179,7 +179,7 @@ am_Error_e ControlReceiver::setDomainState(const am_domainID_t domainID, const a
am_Error_e ControlReceiver::abortAction(const am_Handle_s handle)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::abortAction got called, handle.type="),DLT_INT(handle.handle),DLT_STRING("handle.handleType="),DLT_INT(handle.handleType));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::abortAction got called, handle.type="),DLT_INT(handle.handle),DLT_STRING("handle.handleType="),DLT_INT(handle.handleType));
return mRoutingSender->asyncAbort(handle);
}
@@ -507,13 +507,13 @@ am_Error_e ControlReceiver::removeSourceClassDB(const am_sourceClass_t sourceCla
void ControlReceiver::setCommandReady()
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setCommandReady got called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setCommandReady got called"));
mCommandSender->cbCommunicationReady();
}
void ControlReceiver::setRoutingReady()
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setRoutingReady got called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setRoutingReady got called"));
mRoutingSender->routingInterfacesReady();
}