29 #include <sys/types.h> 43 #define REQUIRED_INTERFACE_VERSION_MAJOR 1 44 #define REQUIRED_INTERFACE_VERSION_MINOR 0 46 #define __METHOD_NAME__ std::string (std::string("CAmRoutingSender::") + __func__) 49 const std::vector<std::string>& listOfPluginDirectories,
54 mMapConnectionInterface(),
55 mMapCrossfaderInterface(),
56 mMapDomainInterface(),
58 mMapSourceInterface(),
60 mpDatabaseHandler(databaseHandler) {
62 loadPlugins(listOfPluginDirectories);
94 void CAmRoutingSender::loadPlugins(
const std::vector<std::string>& listOfPluginDirectories)
96 if (listOfPluginDirectories.empty())
101 std::vector<std::string> sharedLibraryNameList;
102 std::vector<std::string>::const_iterator dirIter = listOfPluginDirectories.begin();
103 std::vector<std::string>::const_iterator dirIterEnd = listOfPluginDirectories.end();
106 for (; dirIter < dirIterEnd; ++dirIter)
108 const char* directoryName = dirIter->c_str();
110 DIR *directory = opendir(directoryName);
119 struct dirent *itemInDirectory = 0;
120 while ((itemInDirectory = readdir(directory)))
122 unsigned char entryType = itemInDirectory->d_type;
123 std::string entryName = itemInDirectory->d_name;
124 std::string fullName = *dirIter +
"/" + entryName;
126 bool regularFile = (entryType == DT_REG || entryType == DT_LNK);
127 bool sharedLibExtension = (
"so" == entryName.substr(entryName.find_last_of(
".") + 1));
130 if (entryType == DT_UNKNOWN)
134 if (stat(fullName.c_str(), &buf))
140 regularFile = S_ISREG(buf.st_mode);
143 if (regularFile && sharedLibExtension)
146 std::string name(directoryName);
147 sharedLibraryNameList.push_back(name +
"/" + entryName);
159 std::vector<std::string>::iterator iter = sharedLibraryNameList.begin();
160 std::vector<std::string>::iterator iterEnd = sharedLibraryNameList.end();
162 for (; iter != iterEnd; ++iter)
167 void* tempLibHandle = NULL;
168 createFunc = getCreateFunction<IAmRoutingSend*()>(*iter, tempLibHandle);
181 dlclose(tempLibHandle);
191 uint16_t minorVersion, majorVersion, cMinorVersion, cMajorVersion;
192 std::istringstream(version.substr(0, 1)) >> majorVersion;
193 std::istringstream(version.substr(2, 1)) >> minorVersion;
194 std::istringstream(cVersion.substr(0, 1)) >> cMajorVersion;
195 std::istringstream(cVersion.substr(2, 1)) >> cMinorVersion;
197 if (majorVersion < cMajorVersion || ((majorVersion == cMajorVersion) && (minorVersion > cMinorVersion)))
200 dlclose(tempLibHandle);
206 assert(!routerInterface.
busName.empty());
207 mListInterfaces.push_back(routerInterface);
208 mListLibraryHandles.push_back(tempLibHandle);
215 HandlesMap::iterator it = mlistActiveHandles.begin();
218 for (; it != mlistActiveHandles.end(); ++it)
226 mpRoutingReceiver = iRoutingReceiver;
229 std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
230 std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end();
231 for (; iter < iterEnd; ++iter)
233 am_Error_e error = (*iter).routingInterface->startupInterface(iRoutingReceiver);
239 return (returnError);
244 auto iter (mlistActiveHandles.find(handle));
245 if (iter == mlistActiveHandles.end())
251 return (iter->second->returnInterface()->asyncAbort(handle));
256 auto iter (mMapSinkInterface.find(sinkID));
257 if (iter == mMapSinkInterface.end())
279 tempConnection.
sinkID = sinkID;
283 tempConnection.
delay=-1;
290 mMapConnectionInterface.insert(std::make_pair(connectionID, iter->second));
291 auto handleData = std::make_shared<handleConnect>(iter->second,connectionID,mpDatabaseHandler);
295 logInfo(
__METHOD_NAME__,
"connectionID=",connectionID,
"connectionFormat=", connectionFormat,
"sourceID=", sourceID,
"sinkID=", sinkID,
"handle=",handle);
296 am_Error_e syncError(iter->second->asyncConnect(handle, connectionID, sourceID, sinkID, connectionFormat));
300 logError(
__METHOD_NAME__,
"Error while calling connect connectionID:",connectionID,
"sourceID:",sourceID,
"sinkID:",sinkID,
"connectionFormat:",connectionFormat,
"handle",handle);
308 auto iter(mMapConnectionInterface.find(connectionID));
309 if (iter == mMapConnectionInterface.end())
329 auto handleData = std::make_shared<handleDisconnect>(iter->second,connectionID,mpDatabaseHandler,
this);
334 am_Error_e syncError(iter->second->asyncDisconnect(handle, connectionID));
345 auto iter (mMapSinkInterface.find(sinkID));
346 if (iter == mMapSinkInterface.end())
366 auto handleData = std::make_shared<handleSinkVolume>(iter->second,sinkID,mpDatabaseHandler,volume);
370 logInfo(
__METHOD_NAME__,
"sinkID=", sinkID,
"volume=", volume,
"ramp=", ramp,
"time=", time,
"handle=",handle);
371 am_Error_e syncError(iter->second->asyncSetSinkVolume(handle, sinkID, volume, ramp, time));
375 logError(
__METHOD_NAME__,
"Error while calling asyncSetSinkVolume sinkID:",sinkID,
"handle:",handle,
"volume:",volume,
"ramp:",ramp,
"time:",time);
382 auto iter (mMapSourceInterface.find(sourceID));
383 if (iter == mMapSourceInterface.end())
403 auto handleData = std::make_shared<handleSourceVolume>(iter->second,sourceID,mpDatabaseHandler,volume);
407 logInfo(
__METHOD_NAME__,
"sourceID=", sourceID,
"volume=", volume,
"ramp=", ramp,
"time=", time,
"handle=",handle);
408 am_Error_e syncError(iter->second->asyncSetSourceVolume(handle, sourceID, volume, ramp, time));
412 logError(
__METHOD_NAME__,
"Error while calling asyncSetSourceVolume sourceID:",sourceID,
"handle:",handle,
"volume:",volume,
"ramp:",ramp,
"time:",time);
419 auto iter (mMapSourceInterface.find(sourceID));
420 if (iter == mMapSourceInterface.end())
440 auto handleData = std::make_shared<handleSourceState>(iter->second,sourceID,state,mpDatabaseHandler);
444 am_Error_e syncError(iter->second->asyncSetSourceState(handle, sourceID, state));
448 logError(
__METHOD_NAME__,
"Error while calling asyncSetSourceState sourceID:",sourceID,
"handle:",handle,
"state:",state);
455 auto iter (mMapSinkInterface.find(sinkID));
456 if (iter == mMapSinkInterface.end())
476 auto handleData = std::make_shared<handleSinkSoundProperty>(iter->second,sinkID,soundProperty,mpDatabaseHandler);
481 am_Error_e syncError(iter->second->asyncSetSinkSoundProperty(handle, sinkID, soundProperty));
485 logError(
__METHOD_NAME__,
"Error while calling asyncSetSinkSoundProperty sinkID:",sinkID,
"handle:",handle,
"soundProperty:",soundProperty.
type,soundProperty.
value);
492 auto iter (mMapSourceInterface.find(sourceID));
493 if (iter == mMapSourceInterface.end())
513 auto handleData = std::make_shared<handleSourceSoundProperty>(iter->second,sourceID,soundProperty,mpDatabaseHandler);
516 logInfo(
__METHOD_NAME__,
"sourceID=", sourceID,
"soundProperty.Type=", soundProperty.
type,
"soundProperty.value=", soundProperty.
value,
"handle=",handle);
517 am_Error_e syncError(iter->second->asyncSetSourceSoundProperty(handle, sourceID, soundProperty));
521 logError(
__METHOD_NAME__,
"Error while calling asyncSetSourceSoundProperty sourceID:",sourceID,
"handle:",handle,
"soundProperty:",soundProperty.
type,soundProperty.
value);
528 auto iter (mMapSourceInterface.find(sourceID));
529 if (iter == mMapSourceInterface.end())
549 auto handleData = std::make_shared<handleSourceSoundProperties>(iter->second,sourceID,listSoundProperties,mpDatabaseHandler);
554 am_Error_e syncError(iter->second->asyncSetSourceSoundProperties(handle, sourceID, listSoundProperties));
558 logError(
__METHOD_NAME__,
"Error while calling asyncSetSourceSoundProperties sourceID:",sourceID,
"handle:",handle);
565 auto iter (mMapSinkInterface.find(sinkID));
566 if (iter == mMapSinkInterface.end())
586 auto handleData = std::make_shared<handleSinkSoundProperties>(iter->second,sinkID,listSoundProperties,mpDatabaseHandler);
591 am_Error_e syncError(iter->second->asyncSetSinkSoundProperties(handle, sinkID, listSoundProperties));
602 auto iter (mMapCrossfaderInterface.find(crossfaderID));
603 if (iter == mMapCrossfaderInterface.end())
623 auto handleData = std::make_shared<handleCrossFader>(iter->second,crossfaderID,hotSink,mpDatabaseHandler);
627 logInfo(
__METHOD_NAME__,
"hotSource=", hotSink,
"crossfaderID=", crossfaderID,
"rampType=", rampType,
"rampTime=", time,
"handle=",handle);
628 am_Error_e syncError(iter->second->asyncCrossFade(handle, crossfaderID, hotSink, rampType, time));
639 DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
640 iter = mMapDomainInterface.find(domainID);
641 if (iter != mMapDomainInterface.end())
642 return (iter->second->setDomainState(domainID, domainState));
653 std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
654 std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end();
655 for (; iter < iterEnd; ++iter)
657 if ((*iter).busName.compare(domainData.
busname) == 0)
659 mMapDomainInterface.insert(std::make_pair(domainData.
domainID, (*iter).routingInterface));
663 logError(__PRETTY_FUNCTION__,
" Could not find busname for bus",domainData.
busname);
674 DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
675 iter = mMapDomainInterface.find(sourceData.
domainID);
676 if (iter != mMapDomainInterface.end())
678 mMapSourceInterface.insert(std::make_pair(sourceData.
sourceID, iter->second));
681 logError(__PRETTY_FUNCTION__,
" Could not find domainInterface for domainID",sourceData.
domainID);
692 DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
693 iter = mMapDomainInterface.find(sinkData.
domainID);
694 if (iter != mMapDomainInterface.end())
696 mMapSinkInterface.insert(std::make_pair(sinkData.
sinkID, iter->second));
699 logError(__PRETTY_FUNCTION__,
"Could not find domainInterface for domainID",sinkData.
domainID);
710 DomainInterfaceMap::iterator iter = mMapSourceInterface.begin();
711 iter = mMapSourceInterface.find(crossfaderData.
sourceID);
712 if (iter != mMapSourceInterface.end())
714 mMapSourceInterface.insert(std::make_pair(crossfaderData.
crossfaderID, iter->second));
717 logError(__PRETTY_FUNCTION__,
" Could not find sourceInterface for source",crossfaderData.
sourceID);
727 DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
728 iter = mMapDomainInterface.find(domainID);
729 if (iter != mMapDomainInterface.end())
731 mMapDomainInterface.erase(iter);
744 SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
745 iter = mMapSourceInterface.find(sourceID);
746 if (iter != mMapSourceInterface.end())
748 mMapSourceInterface.erase(iter);
761 SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
762 iter = mMapSinkInterface.find(sinkID);
763 if (iter != mMapSinkInterface.end())
765 mMapSinkInterface.erase(iter);
778 CrossfaderInterfaceMap::iterator iter = mMapCrossfaderInterface.begin();
779 iter = mMapCrossfaderInterface.find(crossfaderID);
780 if (iter != mMapCrossfaderInterface.end())
782 mMapCrossfaderInterface.erase(iter);
796 if (mlistActiveHandles.erase(handle))
807 HandlesMap::const_iterator it = mlistActiveHandles.begin();
808 for (; it != mlistActiveHandles.end(); ++it)
810 listHandles.push_back(it->first);
821 am_Handle_s CAmRoutingSender::createHandle(std::shared_ptr<handleDataBase> handleData,
const am_Handle_e type)
826 for (
int checkOverflow=0;checkOverflow<1024;checkOverflow++)
828 if (++mHandleCount>=1024)
832 handle.
handle = mHandleCount;
834 if ( mlistActiveHandles.find(handle) == mlistActiveHandles.end() )
836 mlistActiveHandles.insert(std::make_pair(handle, handleData));
837 if (mlistActiveHandles.size()>100)
857 std::vector<uint16_t> listStartupHandles;
858 for (
size_t i = 0; i < mListInterfaces.size(); i++)
866 std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
867 std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end();
868 std::vector<uint16_t>::const_iterator handleIter(listStartupHandles.begin());
869 for (; iter < iterEnd; ++iter)
871 (*iter).routingInterface->setRoutingReady(*(handleIter++));
879 std::vector<uint16_t> listStartupHandles;
880 for (
size_t i = 0; i < mListInterfaces.size(); i++)
888 std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
889 std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end();
890 std::vector<uint16_t>::const_iterator handleIter(listStartupHandles.begin());
891 for (; iter < iterEnd; ++iter)
893 (*iter).routingInterface->setRoutingRundown(*(handleIter++));
900 if (listVolumes.empty())
904 if (listVolumes[0].volumeType==
VT_SINK)
907 SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
908 iter = mMapSinkInterface.find(sinkID);
909 if(iter!=mMapSinkInterface.end())
910 pRoutingInterface=iter->second;
915 else if (listVolumes[0].volumeType==
VT_SOURCE)
918 SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
919 iter = mMapSourceInterface.find(sourceID);
920 if (iter!=mMapSourceInterface.end())
921 pRoutingInterface=iter->second;
928 auto handleData = std::make_shared<handleSetVolumes>(pRoutingInterface,listVolumes,mpDatabaseHandler);
932 am_Error_e syncError(pRoutingInterface->asyncSetVolumes(handle, listVolumes));
943 auto iter (mMapSinkInterface.find(sinkID));
944 if (iter == mMapSinkInterface.end())
964 auto handleData = std::make_shared<handleSetSinkNotificationConfiguration>(iter->second,sinkID,notificationConfiguration,mpDatabaseHandler);
968 logInfo(
__METHOD_NAME__,
"sinkID=",sinkID,
"notificationConfiguration.type=",notificationConfiguration.
type,
"notificationConfiguration.status",notificationConfiguration.
status,
"notificationConfiguration.parameter",notificationConfiguration.
parameter);
969 am_Error_e syncError(iter->second->asyncSetSinkNotificationConfiguration(handle, sinkID, notificationConfiguration));
973 logError(
__METHOD_NAME__,
"Error while calling asyncSetSinkNotificationConfiguration sinkID:",sinkID,
"handle:",handle);
980 auto iter (mMapSourceInterface.find(sourceID));
981 if (iter == mMapSourceInterface.end())
1001 auto handleData = std::make_shared<handleSetSourceNotificationConfiguration>(iter->second,sourceID,notificationConfiguration,mpDatabaseHandler);
1005 logInfo(
__METHOD_NAME__,
"sourceID=",sourceID,
"notificationConfiguration.type=",notificationConfiguration.
type,
"notificationConfiguration.status",notificationConfiguration.
status,
"notificationConfiguration.parameter",notificationConfiguration.
parameter);
1006 am_Error_e syncError(iter->second->asyncSetSourceNotificationConfiguration(handle, sourceID, notificationConfiguration));
1010 logError(
__METHOD_NAME__,
"Error while calling asyncSetSourceNotificationConfiguration sourceID:",sourceID,
"handle:",handle);
1015 void CAmRoutingSender::unloadLibraries(
void)
1017 std::vector<void*>::iterator iterator = mListLibraryHandles.begin();
1018 for (; iterator < mListLibraryHandles.end(); ++iterator)
1022 mListLibraryHandles.clear();
1027 std::vector<InterfaceNamePairs>::const_iterator it = mListInterfaces.begin();
1028 for (; it != mListInterfaces.end(); ++it)
1030 interfaces.push_back(it->busName);
1041 DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
1042 iter = mMapDomainInterface.find(domainID);
1043 if (iter != mMapDomainInterface.end())
1044 return (iter->second->resyncConnectionState(domainID, listOfExistingConnections));
1050 auto it(mlistActiveHandles.find(handle));
1051 if (it!=mlistActiveHandles.end())
1053 am_Error_e error(it->second->writeDataToDatabase());
1054 mlistActiveHandles.erase(handle);
1063 auto it(mlistActiveHandles.find(handle));
1064 if (it!=mlistActiveHandles.end())
1078 auto iter(mlistActiveHandles.find(handle));
1079 if (iter!=mlistActiveHandles.end())
1093 std::vector<am_SoundProperty_s>::const_iterator it = mlistSoundProperties.begin();
1094 for (; it != mlistSoundProperties.end(); ++it)
1108 std::vector<am_SoundProperty_s>::const_iterator it = mlistSoundProperties.begin();
1109 for (; it != mlistSoundProperties.end(); ++it)
1138 mConnectionPending =
false;
1149 std::vector<am_Volumes_s>::const_iterator iterator (mlistVolumes.begin());
1151 for (;iterator!=mlistVolumes.end();++iterator)
1153 if (iterator->volumeType==
VT_SINK)
1155 return (mpDatabaseHandler->
changeSinkVolume(iterator->volumeID.sink,iterator->volume));
1157 else if (iterator->volumeType==
VT_SOURCE)
1159 return (mpDatabaseHandler->
changeSourceVolume(iterator->volumeID.source,iterator->volume));
1177 ConnectionInterfaceMap::iterator iter = mMapConnectionInterface.begin();
1178 iter = mMapConnectionInterface.find(connectionID);
1179 if (iter != mMapConnectionInterface.end())
1181 mMapConnectionInterface.erase(iter);
1189 if (mConnectionPending)
am_Error_e writeDataToDatabase()
function to write the handle data to the database
std::string busname
the busname.
SPDX license identifier: MPL-2.0.
This error is returned in case a connect is issued with a connectionFormat that cannot be selected fo...
std::function< void(const am_sourceID_t, const bool)> dboRemovedSource
am_Error_e asyncAbort(const am_Handle_s &handle)
uint16_t am_connectionID_t
a connection ID
std::function< void(const am_Sink_s &)> dboNewSink
am_timeSync_t delay
the delay of the conneciton
void logWarning(T value, TArgs...args)
logs given values with warninglevel with the default context
A Common-API wrapper class, which loads the common-api runtime and instantiates all necessary objects...
the desired object is non existent
virtual am_Error_e changeCrossFaderHotSink(const am_crossfaderID_t crossfaderID, const am_HotSink_e hotsink)=0
am_CustomNotificationType_t type
The notification type of the notification.
am_Error_e
the errors of the audiomanager.
This struct holds information about the configuration for notifications.
am_Error_e writeDataToDatabase()
function to write the handle data to the database
void logInfo(T value, TArgs...args)
logs given values with infolevel with the default context
am_Error_e getListHandles(std::vector< am_Handle_s > &listHandles) const
std::function< void(const am_sinkID_t, const bool)> dboRemovedSink
This struct describes the attribiutes of a sink.
am_Error_e writeDataToDatabase()
function to write the handle data to the database
This class implements everything from Audiomanager -> RoutingAdapter There are two rules that have to...
virtual am_Error_e changeSourceState(const am_sourceID_t sourceID, const am_SourceState_e sourceState)=0
void getInterfaceVersion(std::string &version) const
am_Error_e asyncCrossFade(am_Handle_s &handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_CustomRampType_t rampType, const am_time_t time)
am_sinkID_t sinkID
This is the ID of the sink, it is unique in the system.
void checkVolume(const am_Handle_s handle, const am_volume_t volume)
This struct describes the attribiutes of a domain.
void waitOnRundown(bool rundown)
tells the RoutingReceiver to start waiting for all handles to be confirmed
am_Error_e addSinkLookup(const am_Sink_s &sinkData)
am_Error_e writeDataToDatabase()
function to write the handle data to the database
std::function< void(const am_crossfaderID_t)> dboRemoveCrossfader
virtual void getInterfaceVersion(std::string &version) const =0
This function returns the version of the interface.
uint16_t am_crossfaderID_t
a crossfader ID
uint16_t am_CustomConnectionFormat_t
This type classifies the format in which data is exchanged within a connection.
SPDX license identifier: MPL-2.0.
am_Error_e writeDataToDatabase()
function to write the handle data to the database
am_crossfaderID_t crossfaderID
This is the ID of the crossfader, it is unique in the system.
am_Error_e asyncSetSinkSoundProperty(am_Handle_s &handle, const am_sinkID_t sinkID, const am_SoundProperty_s &soundProperty)
am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState)
am_Error_e addCrossfaderLookup(const am_Crossfader_s &crossfaderData)
am_Error_e asyncDisconnect(am_Handle_s &handle, const am_connectionID_t connectionID)
am_Error_e addDomainLookup(const am_Domain_s &domainData)
SPDX license identifier: MPL-2.0.
std::function< void(const am_Source_s &)> dboNewSource
Implements the Receiving side of the RoutingPlugins.
std::function< void(const am_domainID_t)> dboRemoveDomain
the following type is a sink
std::string busName
the busname
am_CustomConnectionFormat_t connectionFormat
the used connectionformat
am_Error_e writeDataToDatabase()
function to write the handle data to the database
virtual am_Error_e changeConnectionFinal(const am_connectionID_t connectionID)=0
am_sourceID_t sourceID
The sourceID of the crossfader source.
am_Error_e removeCrossfaderLookup(const am_crossfaderID_t crossfaderID)
am_Error_e asyncSetSourceVolume(am_Handle_s &handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time)
am_Error_e asyncSetSourceSoundProperty(am_Handle_s &handle, const am_sourceID_t sourceID, const am_SoundProperty_s &soundProperty)
SPDX license identifier: MPL-2.0.
am_domainID_t domainID
The domainID is the domain the source belongs to.
the following type is a source
am_Error_e addSourceLookup(const am_Source_s &sourceData)
am_Error_e resyncConnectionState(const am_domainID_t domainID, std::vector< am_Connection_s > &listOfExistingConnections)
am_Error_e asyncSetSourceSoundProperties(am_Handle_s &handle, const std::vector< am_SoundProperty_s > &listSoundProperties, const am_sourceID_t sourceID)
a handle is used for asynchronous operations and is uniquely assigned for each of this operations ...
am_Error_e writeDataToDatabase()
function to write the handle data to the database
am_Error_e writeDataToDatabase()
function to write the handle data to the database
IAmRoutingSend * routingInterface
pointer to the routingInterface
am_Error_e writeDataToDatabase()
function to write the handle data to the database
uint16_t am_sourceID_t
a source ID
am_Error_e asyncSetSinkSoundProperties(am_Handle_s &handle, const std::vector< am_SoundProperty_s > &listSoundProperties, const am_sinkID_t sinkID)
struct describing the sound property
am_Error_e asyncSetSourceState(am_Handle_s &handle, const am_sourceID_t sourceID, const am_SourceState_e state)
am_sourceID_t sourceID
the source the audio flows from
virtual am_Error_e removeConnection(const am_connectionID_t connectionID)=0
uint16_t getStartupHandle()
returns a startup handle
am_NotificationStatus_e status
The Notification status.
virtual am_Error_e returnBusName(std::string &BusName) const =0
this method is used to retrieve the busname during startup of the plugin.
This class handles and abstracts the database.
SPDX license identifier: MPL-2.0.
am_Error_e writeDataToDatabase()
function to write the handle data to the database
am_HotSink_e
describes the active sink of a crossfader.
std::function< void(const am_Domain_s &)> dboNewDomain
int16_t am_volume_t
The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE).
This struct describes the attribiutes of a crossfader.
am_Error_e asyncSetSinkVolume(am_Handle_s &handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time)
am_sourceID_t sourceID
This is the ID of the source, it is unique in the system.
am_CustomSoundPropertyType_t type
the type of the property - a project specific enum
bool handleExists(const am_Handle_s handle)
returns true if the handle exists
am_Handle_e handleType
the handletype
am_Error_e getListPlugins(std::vector< std::string > &interfaces) const
uint16_t getRundownHandle()
returns a rundown handle
am_Error_e writeToDatabaseAndRemove(const am_Handle_s handle)
write data to Database and remove handle
the desired action is not possible
virtual am_Error_e changeSinkSoundPropertyDB(const am_SoundProperty_s &soundProperty, const am_sinkID_t sinkID)=0
am_connectionID_t connectionID
the assigned ID
am_domainID_t domainID
the domain ID
virtual am_Error_e changeSinkNotificationConfigurationDB(const am_sinkID_t sinkID, const am_NotificationConfiguration_s notificationConfiguration)=0
am_Error_e startupInterfaces(CAmRoutingReceiver *iRoutingReceiver)
uint16_t handle
the handle as value
void logError(T value, TArgs...args)
logs given values with errorlevel with the default context
am_Error_e removeHandle(const am_Handle_s &handle)
removes a handle from the list
uint16_t am_time_t
time in ms!
am_Handle_e
This enumeration is used to define the type of the action that is correlated to a handle...
am_Error_e writeDataToDatabase()
function to write the handle data to the database
am_Error_e removeSinkLookup(const am_sinkID_t sinkID)
uint16_t am_domainID_t
a domain ID
no error - positive reply
virtual am_Error_e changeSourceVolume(const am_sourceID_t sourceID, const am_volume_t volume)=0
int16_t value
the actual value of the property
am_Error_e writeDataToDatabase()
function to write the handle data to the database
am_Error_e removeSourceLookup(const am_sourceID_t sourceID)
CAmRoutingSender(const std::vector< std::string > &listOfPluginDirectories, IAmDatabaseHandler *databaseHandler)
am_Error_e asyncSetVolumes(am_Handle_s &handle, const std::vector< am_Volumes_s > &listVolumes)
void waitOnStartup(bool startup)
tells the RoutingReceiver to start waiting for all handles to be confirmed
This struct describes the attribiutes of a source.
virtual am_Error_e changeSourceNotificationConfigurationDB(const am_sourceID_t sourceID, const am_NotificationConfiguration_s notificationConfiguration)=0
uint16_t am_CustomRampType_t
The given ramp types here are just examples.
virtual am_Error_e enterConnectionDB(const am_Connection_s &connection, am_connectionID_t &connectionID)=0
std::function< void(const am_Crossfader_s &)> dboNewCrossfader
am_Error_e writeDataToDatabase()
function to write the handle data to the database
uint16_t am_sinkID_t
a sink ID
am_Error_e asyncSetSinkNotificationConfiguration(am_Handle_s &handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s ¬ificationConfiguration)
int16_t parameter
This gives additional information to the notification status.
am_domainID_t domainID
The domainID is the domain the sink belongs to.
am_SourceState_e
The source state reflects the state of the source.
am_Error_e removeConnectionLookup(const am_connectionID_t connectionID)
virtual am_Error_e changeSourceSoundPropertyDB(const am_SoundProperty_s &soundProperty, const am_sourceID_t sourceID)=0
am_Error_e asyncConnect(am_Handle_s &handle, am_connectionID_t &connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_CustomConnectionFormat_t connectionFormat)
am_Error_e asyncSetSourceNotificationConfiguration(am_Handle_s &handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s ¬ificationConfiguration)
am_sinkID_t sinkID
the sink the audio flows to
< is used to pair interfaces with busnames
am_Error_e removeDomainLookup(const am_domainID_t domainID)
am_volume_t returnVolume()
virtual am_Error_e changeSinkVolume(const am_sinkID_t sinkID, const am_volume_t volume)=0