From 1111f28e3693ee0f296819654a5c35fe147c395d Mon Sep 17 00:00:00 2001 From: Christian as GENIVI Maintainer Date: Fri, 30 Sep 2016 08:11:30 -0700 Subject: add doxygen documentation for github Signed-off-by: Christian as GENIVI Maintainer --- docs/CAmControlSender_8cpp_source.html | 844 +++++++++++++++++++++++++++++++++ 1 file changed, 844 insertions(+) create mode 100644 docs/CAmControlSender_8cpp_source.html (limited to 'docs/CAmControlSender_8cpp_source.html') diff --git a/docs/CAmControlSender_8cpp_source.html b/docs/CAmControlSender_8cpp_source.html new file mode 100644 index 0000000..8e1b915 --- /dev/null +++ b/docs/CAmControlSender_8cpp_source.html @@ -0,0 +1,844 @@ + + + + + + +AudioManager: AudioManagerCore/src/CAmControlSender.cpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
AudioManager +  7.5.11 +
+
Native Application Runtime Environment
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
CAmControlSender.cpp
+
+
+Go to the documentation of this file.
1 
+
24 #include "CAmControlSender.h"
+
25 #include <cassert>
+
26 #include <fstream>
+
27 #include <iostream>
+
28 #include <sstream>
+
29 #include <stdexcept>
+
30 #include <sys/stat.h>
+
31 #include <sys/types.h>
+
32 #include <dirent.h>
+
33 #include "TAmPluginTemplate.h"
+
34 #include "CAmDltWrapper.h"
+
35 
+
36 namespace am
+
37 {
+
38 
+
39 #define REQUIRED_INTERFACE_VERSION_MAJOR 1
+
40 #define REQUIRED_INTERFACE_VERSION_MINOR 0
+
41 
+
42 CAmControlSender* CAmControlSender::mInstance=NULL;
+
43 
+
44 CAmControlSender::CAmControlSender(std::string controlPluginFile,CAmSocketHandler* sockethandler) :
+
45  receiverCallbackT(this, &CAmControlSender::receiverCallback),//
+
46  checkerCallbackT(this, &CAmControlSender::checkerCallback),//
+
47  dispatcherCallbackT(this, &CAmControlSender::dispatcherCallback), //
+
48  mPipe(), //
+
49  mlibHandle(NULL), //
+
50  mController(NULL), //
+
51  mSignal(0)
+
52 {
+
53  assert(sockethandler);
+
54 
+
55  //Check if a folder is given, then select the first plugin
+
56  struct stat buf;
+
57  const char* conFile(controlPluginFile.c_str());
+
58  stat(conFile, &buf);
+
59  if (S_ISDIR(buf.st_mode))
+
60  {
+
61  std::string directoryName(controlPluginFile);
+
62  logInfo("Searching for ControlPlugin in", directoryName);
+
63  DIR *directory = opendir(directoryName.c_str());
+
64 
+
65  if (!directory)
+
66  {
+
67  logError("Error opening directory ", directoryName);
+
68  throw std::runtime_error("Controller directory could not be openend");
+
69  }
+
70 
+
71  // iterate content of directory
+
72  struct dirent *itemInDirectory = 0;
+
73  while ((itemInDirectory = readdir(directory)))
+
74  {
+
75  unsigned char entryType = itemInDirectory->d_type;
+
76  std::string entryName = itemInDirectory->d_name;
+
77  std::string fullName = directoryName + "/" + entryName;
+
78 
+
79  bool regularFile = (entryType == DT_REG || entryType == DT_LNK);
+
80  bool sharedLibExtension = ("so" == entryName.substr(entryName.find_last_of(".") + 1));
+
81 
+
82  // Handle cases where readdir() could not determine the file type
+
83  if (entryType == DT_UNKNOWN) {
+
84  struct stat buf;
+
85 
+
86  if (stat(fullName.c_str(), &buf)) {
+
87  logInfo(__PRETTY_FUNCTION__,"Failed to stat file: ", entryName, errno);
+
88  continue;
+
89  }
+
90 
+
91  regularFile = S_ISREG(buf.st_mode);
+
92  }
+
93 
+
94  if (regularFile && sharedLibExtension)
+
95  {
+
96  controlPluginFile=directoryName + "/" + entryName;
+
97  logInfo("Found ControlPlugin:", controlPluginFile);
+
98  break;
+
99  }
+
100  }
+
101  closedir(directory);
+
102 
+
103  }
+
104 
+
105  std::ifstream isfile(controlPluginFile.c_str());
+
106  if (!isfile)
+
107  {
+
108  logError("ControlSender::ControlSender: Controller plugin not found:", controlPluginFile);
+
109  throw std::runtime_error("Could not find controller plugin!");
+
110  }
+
111  else if (!controlPluginFile.empty())
+
112  {
+
113  mInstance=this;
+
114  IAmControlSend* (*createFunc)();
+
115  createFunc = getCreateFunction<IAmControlSend*()>(controlPluginFile, mlibHandle);
+
116  assert(createFunc!=NULL);
+
117  mController = createFunc();
+
118 
+
119  //check libversion
+
120  std::string version, cVersion(ControlVersion);
+
121  mController->getInterfaceVersion(version);
+
122  uint16_t minorVersion, majorVersion, cMinorVersion, cMajorVersion;
+
123  std::istringstream(version.substr(0, 1)) >> majorVersion;
+
124  std::istringstream(version.substr(2, 1)) >> minorVersion;
+
125  std::istringstream(cVersion.substr(0, 1)) >> cMajorVersion;
+
126  std::istringstream(cVersion.substr(2, 1)) >> cMinorVersion;
+
127 
+
128 
+
129 
+
130  if (majorVersion < cMajorVersion || ((majorVersion == cMajorVersion) && (minorVersion < cMinorVersion)))
+
131  {
+
132  logError("ControlSender::ControlSender: Interface Version of Controller too old, required version:",ControlVersion," Controller Version:",version,"exiting now");
+
133  throw std::runtime_error("Interface Version of Controller too old");
+
134  }
+
135  }
+
136  else
+
137  {
+
138  logError("ControlSender::ControlSender: No controller loaded !");
+
139  }
+
140 
+
141  //here we need a pipe to be able to call the rundown function out of the mainloop
+
142  if (pipe(mPipe) == -1)
+
143  {
+
144  logError("CAmControlSender could not create pipe!");
+
145  }
+
146 
+
147  //add the pipe to the poll - nothing needs to be proccessed here we just need the pipe to trigger the ppoll
+
148  short event = 0;
+
149  sh_pollHandle_t handle;
+
150  event |= POLLIN;
+
151  sockethandler->addFDPoll(mPipe[0], event, NULL, &receiverCallbackT, &checkerCallbackT, &dispatcherCallbackT, NULL, handle);
+
152 }
+
153 
+ +
155 {
+
156  close(mPipe[0]);
+
157  close(mPipe[1]);
+
158  //if (mlibHandle)
+
159  // dlclose(mlibHandle);
+
160 }
+
161 
+ +
163 {
+
164  assert(mController);
+
165  return (mController->hookUserConnectionRequest(sourceID, sinkID, mainConnectionID));
+
166 }
+
167 
+ +
169 {
+
170  assert(mController);
+
171  return (mController->hookUserDisconnectionRequest(connectionID));
+
172 }
+
173 
+ +
175 {
+
176  assert(mController);
+
177  return (mController->hookUserSetMainSinkSoundProperty(sinkID, soundProperty));
+
178 }
+
179 
+ +
181 {
+
182  assert(mController);
+
183  return (mController->hookUserSetMainSourceSoundProperty(sourceID, soundProperty));
+
184 }
+
185 
+ +
187 {
+
188  assert(mController);
+
189  return (mController->hookUserSetSystemProperty(property));
+
190 }
+
191 
+ +
193 {
+
194  assert(mController);
+
195  return (mController->hookUserVolumeChange(sinkID, newVolume));
+
196 }
+
197 
+
198 am_Error_e CAmControlSender::hookUserVolumeStep(const am_sinkID_t sinkID, const int16_t increment)
+
199 {
+
200  assert(mController);
+
201  return (mController->hookUserVolumeStep(sinkID, increment));
+
202 }
+
203 
+ +
205 {
+
206  assert(mController);
+
207  return (mController->hookUserSetSinkMuteState(sinkID, muteState));
+
208 }
+
209 
+ +
211 {
+
212  assert(mController);
+
213  return (mController->hookSystemRegisterDomain(domainData, domainID));
+
214 }
+
215 
+ +
217 {
+
218  assert(mController);
+
219  return (mController->hookSystemDeregisterDomain(domainID));
+
220 }
+
221 
+ +
223 {
+
224  assert(mController);
+
225  return (mController->hookSystemDomainRegistrationComplete(domainID));
+
226 }
+
227 
+ +
229 {
+
230  assert(mController);
+
231  return (mController->hookSystemRegisterSink(sinkData, sinkID));
+
232 }
+
233 
+ +
235 {
+
236  assert(mController);
+
237  return (mController->hookSystemDeregisterSink(sinkID));
+
238 }
+
239 
+ +
241 {
+
242  assert(mController);
+
243  return (mController->hookSystemRegisterSource(sourceData, sourceID));
+
244 }
+
245 
+ +
247 {
+
248  assert(mController);
+
249  return (mController->hookSystemDeregisterSource(sourceID));
+
250 }
+
251 
+ +
253 {
+
254  assert(mController);
+
255  return (mController->hookSystemRegisterGateway(gatewayData, gatewayID));
+
256 }
+
257 
+ +
259 {
+
260  assert(mController);
+
261  return (mController->hookSystemRegisterConverter(converterData, converterID));
+
262 }
+
263 
+ +
265 {
+
266  assert(mController);
+
267  return (mController->hookSystemDeregisterGateway(gatewayID));
+
268 }
+
269 
+ +
271 {
+
272  assert(mController);
+
273  return (mController->hookSystemDeregisterConverter(converterID));
+
274 }
+
275 
+ +
277 {
+
278  assert(mController);
+
279  return (mController->hookSystemRegisterCrossfader(crossfaderData, crossfaderID));
+
280 }
+
281 
+ +
283 {
+
284  assert(mController);
+
285  return (mController->hookSystemDeregisterCrossfader(crossfaderID));
+
286 }
+
287 
+ +
289 {
+
290  assert(mController);
+
291  mController->hookSystemSinkVolumeTick(handle, sinkID, volume);
+
292 }
+
293 
+ +
295 {
+
296  assert(mController);
+
297  mController->hookSystemSourceVolumeTick(handle, sourceID, volume);
+
298 }
+
299 
+ +
301 {
+
302  assert(mController);
+
303  mController->hookSystemInterruptStateChange(sourceID, interruptState);
+
304 }
+
305 
+ +
307 {
+
308  assert(mController);
+
309  mController->hookSystemSinkAvailablityStateChange(sinkID, availability);
+
310 }
+
311 
+ +
313 {
+
314  assert(mController);
+
315  mController->hookSystemSourceAvailablityStateChange(sourceID, availability);
+
316 }
+
317 
+ +
319 {
+
320  assert(mController);
+
321  mController->hookSystemDomainStateChange(domainID, state);
+
322 }
+
323 
+
324 void CAmControlSender::hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s> & data)
+
325 {
+
326  assert(mController);
+
327  mController->hookSystemReceiveEarlyData(data);
+
328 }
+
329 
+ +
331 {
+
332  assert(mController);
+
333  mController->hookSystemSpeedChange(speed);
+
334 }
+
335 
+ +
337 {
+
338  assert(mController);
+
339  mController->hookSystemTimingInformationChanged(mainConnectionID, time);
+
340 }
+
341 
+
342 void CAmControlSender::cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)
+
343 {
+
344  assert(mController);
+
345  mController->cbAckConnect(handle, errorID);
+
346 }
+
347 
+ +
349 {
+
350  assert(mController);
+
351  mController->cbAckDisconnect(handle, errorID);
+
352 }
+
353 
+
354 void CAmControlSender::cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)
+
355 {
+
356  assert(mController);
+
357  mController->cbAckCrossFade(handle, hostsink, error);
+
358 }
+
359 
+ +
361 {
+
362  assert(mController);
+
363  mController->cbAckSetSinkVolumeChange(handle, volume, error);
+
364 }
+
365 
+ +
367 {
+
368  assert(mController);
+
369  mController->cbAckSetSourceVolumeChange(handle, volume, error);
+
370 }
+
371 
+ +
373 {
+
374  assert(mController);
+
375  mController->cbAckSetSourceState(handle, error);
+
376 }
+
377 
+ +
379 {
+
380  assert(mController);
+
381  mController->cbAckSetSourceSoundProperty(handle, error);
+
382 }
+
383 
+ +
385 {
+
386  if (!mController)
+
387  {
+
388  logError("ControlSender::startupController: no Controller to startup!");
+
389  throw std::runtime_error("ControlSender::startupController: no Controller to startup! Exiting now ...");
+
390  return (E_NON_EXISTENT);
+
391  }
+
392  return (mController->startupController(controlreceiveinterface));
+
393 }
+
394 
+ +
396 {
+
397  assert(mController);
+
398  mController->cbAckSetSinkSoundProperty(handle, error);
+
399 }
+
400 
+ +
402 {
+
403  assert(mController);
+
404  mController->cbAckSetSinkSoundProperties(handle, error);
+
405 }
+
406 
+ +
408 {
+
409  assert(mController);
+
410  mController->cbAckSetSourceSoundProperties(handle, error);
+
411 }
+
412 
+ +
414 {
+
415  assert(mController);
+
416  mController->setControllerReady();
+
417 }
+
418 
+
419 void CAmControlSender::setControllerRundown(const int16_t signal)
+
420 {
+
421  assert(mController);
+
422  logInfo("CAmControlSender::setControllerRundown received, signal=",signal);
+
423  mController->setControllerRundown(signal);
+
424 }
+
425 
+
426 am_Error_e am::CAmControlSender::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t> & listPrioConnectionFormats)
+
427 {
+
428  assert(mController);
+
429  return (mController->getConnectionFormatChoice(sourceID, sinkID, listRoute, listPossibleConnectionFormats, listPrioConnectionFormats));
+
430 }
+
431 
+
432 void CAmControlSender::getInterfaceVersion(std::string & version) const
+
433 {
+
434  version = ControlVersion;
+
435 }
+
436 
+ +
438 {
+
439  assert(mController);
+
440  mController->confirmCommandReady(error);
+
441 }
+
442 
+ +
444 {
+
445  assert(mController);
+
446  mController->confirmRoutingReady(error);
+
447 }
+
448 
+ +
450 {
+
451  assert(mController);
+
452  mController->confirmCommandRundown(error);
+
453 }
+
454 
+ +
456 {
+
457  assert(mController);
+
458  mController->confirmRoutingRundown(error);
+
459 }
+
460 
+
461 am_Error_e CAmControlSender::hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+
462 {
+
463  assert(mController);
+
464  return (mController->hookSystemUpdateSink(sinkID,sinkClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
+
465 }
+
466 
+
467 am_Error_e CAmControlSender::hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+
468 {
+
469  assert(mController);
+
470  return (mController->hookSystemUpdateSource(sourceID,sourceClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
+
471 }
+
472 
+
473 am_Error_e CAmControlSender::hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFromats, const std::vector<bool>& convertionMatrix)
+
474 {
+
475  assert(mController);
+
476  return (mController->hookSystemUpdateGateway(gatewayID,listSourceConnectionFormats,listSinkConnectionFromats,convertionMatrix));
+
477 }
+
478 
+
479 am_Error_e CAmControlSender::hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFromats, const std::vector<bool>& convertionMatrix)
+
480 {
+
481  assert(mController);
+
482  return (mController->hookSystemUpdateConverter(converterID,listSourceConnectionFormats,listSinkConnectionFromats,convertionMatrix));
+
483 }
+
484 
+
485 void CAmControlSender::cbAckSetVolume(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error)
+
486 {
+
487  assert(mController);
+
488  mController->cbAckSetVolumes(handle,listVolumes,error);
+
489 }
+
490 
+ +
492 {
+
493  assert(mController);
+
494  mController->cbAckSetSinkNotificationConfiguration(handle,error);
+
495 }
+
496 
+ +
498 {
+
499  assert(mController);
+
500  mController->cbAckSetSourceNotificationConfiguration(handle,error);
+
501 }
+
502 
+ +
504 {
+
505  assert(mController);
+
506  mController->hookSinkNotificationDataChanged(sinkID,payload);
+
507 }
+
508 
+ +
510 {
+
511  assert(mController);
+
512  mController->hookSourceNotificationDataChanged(sourceID,payload);
+
513 }
+
514 
+ +
516 {
+
517  assert(mController);
+
518  return (mController->hookUserSetMainSinkNotificationConfiguration(sinkID,notificationConfiguration));
+
519 }
+
520 
+ +
522 {
+
523  assert(mController);
+
524  return (mController->hookUserSetMainSourceNotificationConfiguration(sourceID,notificationConfiguration));
+
525 }
+
526 
+
527 void CAmControlSender::receiverCallback(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)
+
528 {
+
529  (void) handle;
+
530  (void) userData;
+
531  //get the signal number from the socket
+
532  ssize_t result = read(pollfd.fd, &mSignal, sizeof(mSignal));
+
533 }
+
534 
+
535 bool CAmControlSender::checkerCallback(const sh_pollHandle_t handle, void* userData)
+
536 {
+
537  (void) handle;
+
538  (void) userData;
+
539  return (true);
+
540 }
+
541 
+ +
543 {
+
544  assert(mController);
+
545  mController->hookSystemSingleTimingInformationChanged(connectionID,time);
+
546 }
+
547 
+ +
552  receiverCallbackT(this, &CAmControlSender::receiverCallback),//
+
553  checkerCallbackT(this, &CAmControlSender::checkerCallback),//
+
554  dispatcherCallbackT(this, &CAmControlSender::dispatcherCallback), //
+
555  mPipe(), //
+
556  mlibHandle(NULL), //
+
557  mController(NULL), //
+
558  mSignal(0)
+
559 {
+
560  logInfo("CAmControlSender was loaded in test mode!");
+
561 }
+
562 
+
563 bool CAmControlSender::dispatcherCallback(const sh_pollHandle_t handle, void* userData)
+
564 {
+
565  (void)handle;
+
566  (void)userData;
+
567  setControllerRundown(mSignal);
+
568  return (false);
+
569 }
+
570 
+
571 }
+
572 
+
573 
+ +
uint16_t am_connectionID_t
a connection ID
+
bool checkerCallback(const sh_pollHandle_t handle, void *userData)
+
bool dispatcherCallback(const sh_pollHandle_t handle, void *userData)
+
am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume)
+
void getInterfaceVersion(std::string &version) const
+
void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s &availability)
+
am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector< am_CustomConnectionFormat_t > &listSourceConnectionFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkConnectionFromats, const std::vector< bool > &convertionMatrix)
+
virtual am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume)=0
sets a user volume
+
the desired object is non existent
+
void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)
+
uint16_t am_sinkClass_t
+
am_Error_e
the errors of the audiomanager.
+
am_InterruptState_e
+
am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s &soundProperty)
+
This struct holds information about the configuration for notifications.
+
am_Error_e hookSystemRegisterSink(const am_Sink_s &sinkData, am_sinkID_t &sinkID)
+
am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)
+
void logInfo(T value, TArgs...args)
logs given values with infolevel with the default context
+
virtual void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state)=0
id called when domainstate was changed
+
am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID)
+ +
void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
+
void hookSystemDomainRegistrationComplete(const am_domainID_t domainID)
+
This struct describes the attribiutes of a sink.
+
This struct holds the payload of a notification.
+
virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)=0
is called when a routing adaptor deregisters a crossfader
+
void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
+
void confirmRoutingReady(const am_Error_e error)
+
virtual void setControllerReady()=0
this message is used tell the controller that it should get ready.
+
virtual am_Error_e hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)=0
update from the source Data
+
void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s &payload)
+
am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID)
+
This struct describes the attribiutes of a domain.
+
virtual void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)=0
ack for connect
+
am_Error_e startupController(IAmControlReceive *controlreceiveinterface)
+
virtual void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)=0
ack for sink volume changes
+
am_Error_e hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
+
#define ControlVersion
Definition: IAmControl.h:35
+
uint16_t am_crossfaderID_t
a crossfader ID
+
The am::CAmSocketHandler implements a mainloop for the AudioManager.
+
virtual void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s &payload)=0
new sinkNotification data is there!
+
am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s &property)
+
void confirmCommandReady(const am_Error_e error)
+
virtual void hookSystemSpeedChange(const am_speed_t speed)=0
this hook provides information about speed changes.
+
TAmShPollCheck< CAmControlSender > checkerCallbackT
+
void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s &availability)
+
int16_t am_timeSync_t
offset time that is introduced in milli seconds.
+
void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s &payload)
+
virtual void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s &payload)=0
new sourceNotification data is there!
+
am_Error_e hookSystemRegisterSource(const am_Source_s &sourceData, am_sourceID_t &sourceID)
+
uint16_t sh_pollHandle_t
this is a handle for a filedescriptor to be used with the SocketHandler
+
void receiverCallback(const pollfd pollfd, const sh_pollHandle_t handle, void *userData)
+
SPDX license identifier: MPL-2.0.
+
void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state)
+
am_Error_e hookSystemRegisterConverter(const am_Converter_s &converterData, am_converterID_t &converterID)
+
virtual am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment)=0
sets a user volume as increment
+
am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector< am_CustomConnectionFormat_t > listPossibleConnectionFormats, std::vector< am_CustomConnectionFormat_t > &listPrioConnectionFormats)
+
virtual am_Error_e hookSystemRegisterConverter(const am_Converter_s &converterData, am_converterID_t &converterID)=0
is called when a routing adaptor registers a converter
+
void setControllerRundown(const int16_t signal)
+
virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s &property)=0
sets a user SystemProperty
+
void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)
+
void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
+
virtual void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)=0
ack for setting of sinksoundproperties
+
virtual void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)=0
The acknowledge of the source notification configuration.
+
virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s &soundProperty)=0
sets a user MainSinkSoundProperty
+
void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID)
+
void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
+
virtual am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s &notificationConfiguration)=0
sets a user MainSourceNotificationConfiguration
+
am_Error_e hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector< am_CustomConnectionFormat_t > &listSourceConnectionFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkConnectionFromats, const std::vector< bool > &convertionMatrix)
+
CAmControlSender()
for testing only contructor - do not use !
+
struct describing system properties
+
void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
+
uint16_t am_converterID_t
a converter ID
+
virtual void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)=0
The acknowledge of the sink notification configuration.
+
virtual void confirmRoutingReady(const am_Error_e error)=0
confirms the setRoutingReady call
+
virtual am_Error_e hookSystemRegisterSource(const am_Source_s &sourceData, am_sourceID_t &sourceID)=0
is called when a routing adaptor registers a source
+
struct describung mainsound property
+
am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s &notificationConfiguration)
+
TAmShPollFired< CAmControlSender > receiverCallbackT
+
virtual void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)=0
is called when an low level interrupt changed its state
+
am_Error_e addFDPoll(const int fd, const short event, IAmShPollPrepare *prepare, IAmShPollFired *fired, IAmShPollCheck *check, IAmShPollDispatch *dispatch, void *userData, sh_pollHandle_t &handle)
Adds a filedescriptor to the polling loop.
+
virtual void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error)=0
ack for setting of source states
+
virtual am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)=0
sets the mute state of a sink
+
am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s &notificationConfiguration)
+
void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)
+
void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
+
virtual am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID)=0
is called when a routing adaptor deregisters a sink
+
virtual void cbAckSetVolumes(const am_Handle_s handle, const std::vector< am_Volumes_s > &listVolumes, const am_Error_e error)=0
ack for mulitple volume changes
+
a handle is used for asynchronous operations and is uniquely assigned for each of this operations ...
+
virtual void confirmCommandRundown(const am_Error_e error)=0
confirms the setCommandRundown call
+
void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
+
am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s &crossfaderData, am_crossfaderID_t &crossfaderID)
+
virtual void hookSystemReceiveEarlyData(const std::vector< am_EarlyData_s > &data)=0
when early data was received
+ +
uint16_t am_sourceID_t
a source ID
+
am_Error_e hookSystemRegisterGateway(const am_Gateway_s &gatewayData, am_gatewayID_t &gatewayID)
+
virtual void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)=0
volumeticks.
+
virtual void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)=0
this hook is fired whenever the timing information of a mainconnection has changed.
+
virtual am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)=0
is called when a routing adaptor deregisters a gateway
+
void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error)
+
am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
+
sends data to the commandInterface, takes the file of the library that needs to be loaded ...
+
am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t &mainConnectionID)
+
virtual void setControllerRundown(const int16_t signal)=0
This message tells the controller that he should prepare everything for the power to be switched off...
+
virtual void hookSystemDomainRegistrationComplete(const am_domainID_t domainID)=0
is called when a domain registered all the elements
+
void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
+
virtual void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)=0
ack for setting of sourcesoundproperties
+
am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID)
+
This struct describes the attributes of a converter.
+ +
virtual am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector< am_CustomConnectionFormat_t > &listSourceConnectionFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkConnectionFormats, const std::vector< bool > &convertionMatrix)=0
updates the Gateway Data
+
This interface is presented by the AudioManager controller.
Definition: IAmControl.h:675
+
a list of routing elements that lead from source to sink
+
virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID)=0
ack for disconnect
+
am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s &soundProperty)
+
am_HotSink_e
describes the active sink of a crossfader.
+
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.
+
virtual void confirmCommandReady(const am_Error_e error)=0
confirms the setCommandReady call
+
am_Error_e hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
+
void hookSystemSpeedChange(const am_speed_t speed)
+
virtual am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID)=0
is called when a disconnection request comes in via the command interface
+
virtual void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s &availability)=0
id called when a sink changed its availability
+
void confirmCommandRundown(const am_Error_e error)
+
virtual am_Error_e hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector< am_CustomConnectionFormat_t > &listSourceConnectionFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkConnectionFormats, const std::vector< bool > &convertionMatrix)=0
updates the Converter Data
+
uint16_t am_sourceClass_t
+
virtual void confirmRoutingRundown(const am_Error_e error)=0
confirms the setRoutingRundown command
+
void cbAckSetVolume(const am_Handle_s handle, const std::vector< am_Volumes_s > &listVolumes, const am_Error_e error)
+
virtual void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)=0
ack for crossfading
+
void hookSystemSingleTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t time)
+
this describes the availability of a sink or a source together with the latest change ...
+
This struct describes the attributes of a gateway.
+
This interface gives access to all important functions of the audiomanager that are used by the Audio...
Definition: IAmControl.h:56
+
virtual am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID)=0
is called when a routing adaptor wants to derigister a domain
+
void logError(T value, TArgs...args)
logs given values with errorlevel with the default context
+
virtual am_Error_e hookSystemDeregisterConverter(const am_converterID_t converterID)=0
is called when a routing adaptor deregisters a converter
+
virtual am_Error_e hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)=0
update form the SinkData
+
virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s &crossfaderData, am_crossfaderID_t &crossfaderID)=0
is called when a routing adaptor registers a crossfader
+
virtual am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t &mainConnectionID)=0
is called when a connection request comes in via the command interface
+
virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)=0
ack for source volume changes
+
am_Error_e hookSystemDeregisterConverter(const am_converterID_t converterID)
+
virtual am_Error_e startupController(IAmControlReceive *controlreceiveinterface)=0
Starts up the controller.
+
TAmShPollDispatch< CAmControlSender > dispatcherCallbackT
+
virtual void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)=0
ack for setting of sinksoundproperties
+
am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)
+
uint16_t am_speed_t
speed
+
uint16_t am_domainID_t
a domain ID
+
void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
+
int16_t am_mainVolume_t
This is the volume presented on the command interface.
+
void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)
+
am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID)
+
SPDX license identifier: MPL-2.0.
+
virtual am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s &notificationConfiguration)=0
sets a user MainSinkNotificationConfiguration
+
virtual void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)=0
ack for setting of sourcesoundproperties
+
void confirmRoutingRundown(const am_Error_e error)
+
virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID)=0
is called when a routing adaptor deregisters a source
+
uint16_t am_gatewayID_t
a gateway ID
+
This struct describes the attribiutes of a source.
+
virtual void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s &availability)=0
id called when a source changed its availability
+
uint16_t am_sinkID_t
a sink ID
+
uint16_t am_mainConnectionID_t
a mainConnection ID
+
void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)
+
virtual am_Error_e hookSystemRegisterDomain(const am_Domain_s &domainData, am_domainID_t &domainID)=0
is called when a routing adaptor registers its domain
+
virtual void hookSystemSingleTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t time)=0
This hook is fired whenever the timing information of a connection has changed.
+
am_Error_e hookSystemRegisterDomain(const am_Domain_s &domainData, am_domainID_t &domainID)
+
virtual am_Error_e hookSystemRegisterSink(const am_Sink_s &sinkData, am_sinkID_t &sinkID)=0
is called when a routing adaptor registers a sink
+
virtual void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)=0
volumeticks.
+
am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment)
+
virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s &gatewayData, am_gatewayID_t &gatewayID)=0
is called when a routing adaptor registers a gateway
+
void hookSystemReceiveEarlyData(const std::vector< am_EarlyData_s > &data)
+
virtual void getInterfaceVersion(std::string &version) const =0
This function returns the version of the interface returns E_OK, E_UNKOWN if version is unknown...
+
virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s &soundProperty)=0
sets a user MainSourceSoundProperty
+
+
+ + + + -- cgit v1.2.1