summaryrefslogtreecommitdiff
path: root/AudioManagerUtilities/include
Commit message (Collapse)AuthorAgeFilesLines
* AM: Reorganize daemon, core, utilities and tests to make use of the new ↵Martin Koch2020-01-142-2/+2
| | | | | | | | | | | | logging architecture. - Known side-effect: CAmSerializer.h and TAmPluginTemplate.h no longer indirectly include dlt_user.h. Thus macros like DLT_DECLARE_CONTEXT and DLT_IMPORT_CONTEXT may be undefined in application code unless CAmDltWrapper.h or dlt_user.h is included explicitly. - Since the DLT functionality is now encapsulated inside a dedicated class, such declaration is usually superfluous and can be dropped. Signed-off-by: Martin Koch <mkoch@de.adit-jv.com>
* AM_Utils: reduce CAmDltWrapper to legacy wrapper around new logging architectureMartin Koch2020-01-142-327/+34
| | | | Signed-off-by: Martin Koch <mkoch@de.adit-jv.com>
* AM-Utils: Introduce new logging architecture, providing separate classes for ↵Martin Koch2020-01-146-0/+823
| | | | | | each logging channel (DLT, file or stdout) and a channel-independent wrapper class. (first preparation step of AM for build without strong dependency to DLT library) Signed-off-by: Martin Koch <mkoch@de.adit-jv.com>
* Notifying observers of sound properties only by value changes.genivi_impJacqueline Molz2018-08-222-28/+33
| | | | | | | | | Fix infinite loop in CAmDltWrapper by logging out enum values exceeding the boundaries. Minor changes: Pull request 36 changed implementation to database macros (review comments) added option "WITH_DATABASE_CHANGE_CHECK" to audiomanagerconfig.h.in whitespace cleanup in test/AmMapHandlerTest/CAmMapHandlerTest.cpp additional cast to uint in DB_UPDATE call in function removeMainConnectionDB to solve error in macro expansion
* FOO: Issue #26 fix white space issues and apply new coding styleJens Lorenz2018-07-038-1700/+1830
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* codestyle: Remove empty single line c++ comments in ctor initializersJens Lorenz2018-06-202-15/+15
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Fix inconsistent fdPollingArrayJens Lorenz2018-06-121-10/+10
| | | | | | | | | | | | | | | | In case someone removed a fd and closed it opened a new one and added it to the socket handler the container state of the object in map was changed from either REMOVE/CLOSE to UNINIT. This leads to the emplace call in the fdPollingArray vector and the fd is maintained twice. Over the entire runtime there will be zombie fds provided to ppoll functions which will race a POLLERR revent leading to 100% cpu load. Also the CLOSE state is now removed because only the application is aware if a fd has to be closed. For instance calling add/remove in a loop were start_listenting is not running will turn to a system issue were no fds can be provided by the operation system. Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Store signalfd as file descriptor instead of pollfd handleJens Lorenz2018-04-091-3/+1
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Wakeup of ppoll is now also triggered on addFdPollJens Lorenz2018-04-091-0/+1
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Cleanup indents and whitespacesJens Lorenz2018-04-091-1/+1
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: ONLY timers will be closed in worker threadJens Lorenz2018-04-091-2/+4
| | | | | | | The removeFDPoll API is extended to allow applications to close the fd by the central worker thread. Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Rework of socketHandler to avoid calls of invalidated objectsJens Lorenz2018-04-091-16/+17
| | | | | | | | | | | | | | | | | | | This patch tries to follow the idea raised in PR26. Following two patches have been reworked: commit: cfe0e77aaf87a0590ceea42f6afa62b0c7d95e80 commit: bc33226f59910a960f62d419ba10d4ea761e3724 The biggest change applies to the internal database. Instead of having a vector for all items which will be copied inside the worker thread the new approach aims a central map which allows to store the sh_poll elements in containers. By this a container is valid until it is remove from map. The remove of items inside a map is now centralized within the worker and only the worker is responsible to keep the ppoll list and the map in sync. This patch also extends the unit tests to stress different timer scenarios. Signed-off-by: Aleksandar Donchev <Aleksander.Donchev@partner.bmw.de> Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Change from mPipe to eventfdJens Lorenz2018-04-091-5/+3
| | | | | | This commit is the first commit of a rework of the CAmSochetHandler class. Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Improve timer implementation and ensure that no fd leak happensJens Lorenz2018-04-091-1/+3
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Common API WrapperAleksandar Donchev2018-03-271-93/+92
| | | | | | | | | All methods in CAPI wrapper with connectionID parameter are deprecated because CAPI creates new filedescriptor per connection which isn't needed. * revents flag is passed to the CommonAPI watcher instead events * revents set to 0 in Sockethandler Signed-off-by: Christian Linke <christian.linke@bmw.de>
* Revert "Utility updates capi fixes"revert-26-utilityUpdates_CAPI_fixesJens Lorenz2018-03-132-145/+133
|
* Remainning fixes from utility updateutilityUpdates_CAPI_fixesDon Al2018-02-271-53/+52
| | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I3c8a2b474bc8fac62c76a46545a231c718edb2a9
* The real-time scheduler removed.Aleksandar Donchev2018-02-131-22/+0
| | | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I7c8a2c474bc8fac62c76a46545a231c518edb2a8
* Cmake parameters for real-time scheduler's priority and policy and throw ↵Aleksandar Donchev2018-02-131-0/+22
| | | | | | | | runtime error if read fails. Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I6a7a2c424bc8fac62c76a66545a231c518edb2e1
* FIx for CAPI timeouts and support for more than one CAPI watchAleksandar Donchev2018-02-131-18/+28
| | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I9a9d2c424bc8fac62c76a66545a531c518edb2e3
* Real time scheduler added, capi wrapper timeout return value considered in ↵Aleksandar Donchev2018-02-131-7/+0
| | | | | | | registerTimeout, only requested revent passed from within the camsockethandler instead of all Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I2d9d2c424ac3fac62c76a66545a531c518edb2e8
* * All methods in CAPI wrapper with connectionID parameter are deprecated ↵Aleksandar Donchev2018-02-132-97/+93
| | | | | | | | | | | because CommonAPI creates new filedescriptor per connection which isn't needed. * revents flag is passed to the CommonAPI watcher instead events * revents set to 0 in Sockethandler Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I9d9d2c424ac9fad62c76a66545c731c518adb2e4
* Runtime check for calls to the sockethandler from other threadsAleksandar Donchev2018-02-131-0/+6
| | | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I9d9d3c424ac9fad62c76a76545c731b518bdb1e2
* A filedescriptor removal will set an invalidation flag which will prevent ↵Aleksandar Donchev2018-02-131-4/+7
| | | | | | | | | | | calls on the invalidated objects in the current iteration. Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I9d5d3c434ac9fad62c76a76145c731b538aeb1e3 # Conflicts: # AudioManagerUtilities/src/CAmSocketHandler.cpp
* Timer fd is closed at the beginning of the next iteration + some unit tests. ↵Aleksandar Donchev2018-02-131-3/+8
| | | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I8c5d3c436ac9fad62c76a26145c731b538abb1e7
* Merge pull request #23 from JensLorenz/cmake_and_dlt_endless_loop_fixGENIVI Audio Manager Maintainer2018-02-071-184/+183
|\ | | | | Cmake and dlt endless loop fix
| * AMUtil: Fixes infinite loop in dlt wrapper for out of range values of ↵Jens Lorenz2018-02-051-184/+183
| | | | | | | | | | | | enumerations. Signed-off-by: Kapildev Patel <kpatel@jp.adit-jv.com>
* | AMUtil: use DLT API only when DLT is selectedGuerra Mattia2017-09-291-2/+5
| | | | | | | | | | | | | | | | Protecting access to DLT API dlt_user_is_logLevel_enabled by checking if destination is really meant to be DLT daemon. Otherwise, invalid DLT Context could be accessed. Signed-off-by: Guerra Mattia <mguerra@de.adit-jv.com>
* | CMake: Add pthread supportJens Lorenz2017-09-291-1/+0
| | | | | | | | | | | | | | If DLT is turned off, CAmDltWrapper needs linkage to pthread. Furthermore, CAmSerializer doesn't need to #include pthread. Signed-off-by: Guerra Mattia <mguerra@de.adit-jv.com>
* | AMUtil: Fix for destroy controller on rundownJens Lorenz2017-09-291-0/+6
| | | | | | | | | | | | | | | | | | On rundown the controller will be unloaded. In case the controller wasn't loaded successfully or the controller doesn't implement the destroy function the rundown of AudioManager crashed. Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* | AM: Destroy plugin implementation.Kapildev Patel2017-09-291-0/+34
|/ | | | | | | With these changes AudioManager would call destroy function of the controller plugin at the time of shutdown. Signed-off-by: Kapildev Patel <kpatel@jp.adit-jv.com>
* The primary signals SIGINT and SIGQUIT are handled on top level inAleksandar Donchev2017-07-101-411/+380
| | | | | | | | | contrast to secondary signals SIGHUP, SIGTERM, SIGCHLD, which are handled in the SocketHandler. Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I8c5d3c436ac9fcd61c76a26145c731b427cab1e6
* Fix for bug in CAmSocketHandler causing invalid pointers and crash.Aleksandar Donchev2017-05-022-17/+25
| | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I8d3d2b436ac9fcd61c73a28145a731f327cab1e2
* Two versions of CAmSerializer due to interface changes.Aleksandar Donchev2017-05-021-546/+1209
| | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I8c5d2b436ac9fcd61c76a21145c731f327cab1e2
* Signal handling via main loop with signalfd.Aleksandar Donchev2017-05-021-45/+91
| | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I8c4c2c436ac9fcd61c76a21145c731f327cab0c1
* CAmSerializer interface extended to support std::function. Aleksandar Donchev2017-05-022-810/+548
| | | | | Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I8b4c2c436ac9fbc37c76a21145c731f327cab0e4
* CAmSocketHandler - usage of std::function instead of function pointers,Aleksandar Donchev2017-05-021-163/+72
| | | | | | | code cleanup and minior optimizations. Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I8c2c2c436ac9abc37c76a12245c731f327cab0e5
* Linux specific TIMERFD implementation as alternative timer mechanismAleksandar Donchev2017-05-021-363/+451
| | | | Signed-off-by: Christian Linke <christian.linke@bmw.de>
* AMUtil: Enhancement of check log level support for DLT.Jens Lorenz2017-02-151-3/+4
| | | | | | | The DLT version determination works in AudioManager repository. Other libraries including header only don't know the respective version. Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AMUtil: Check log level support of DLT added.Jens Lorenz2016-12-081-0/+12
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* Utility: Serializer::dtor must also remove the fd from list to prevent crash.Jens Lorenz2016-11-141-6/+10
| | | | Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
* AudioManagerUtilities: fix dlt cmake integrationMathieu Duponchelle2016-11-141-1/+1
| | | | | | | | | The wrong variables from pkg_check_modules were used, effectively forcing the inclusion of dlt.h to happen from /include. Fix this to take advantage of pkg-config and allow building against a non-system-wide dlt-daemon.
* Changed error to warning in database if data is receivedChristian Linke2016-07-291-0/+8
| | | Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
* cleanup routing interface to add clean abort and resend possibilities7.5Christian Linke2016-06-171-0/+17
| | | Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
* try catch for sockethandler callbacksChristian Linke2016-05-181-99/+29
| | | | | small improvements of sockethandler. Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
* close pipes after useChristian Linke2016-05-171-0/+1
| | | | | Signed-off-by: Christian Linke <Christian.Linke@bmw.de> Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
* optimize static const in audiomanagertypes.h and CAmDltWrapper template ↵Christian Linke2016-05-171-103/+31
| | | | | specializations Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
* switch off std::out route informationChristian Linke2016-04-271-0/+4
| | | | | destroy pipe in destructor of CAmSerializer. Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
* enable deleting of CommandLineSingletonChristian Linke2016-04-201-0/+5
| | | | | fix log message Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
* fix bug in Databasehandler changeChristian Linke2016-04-201-0/+2
| | | Signed-off-by: Christian Linke <Christian.Linke@bmw.de>