===================
:Author: Christian Linke <christian.linke@bmw.de>
:doctitle: GENIVI_AudioManager
-
+
Copyright
---------
Copyright (C) 2012, GENIVI Alliance, Inc.
=== Compile Options
These are the compile options with default values:
- BUILD_SHARED_LIBS OFF
- CMAKE_BUILD_TYPE
- CMAKE_INSTALL_PREFIX /usr/local
- GLIB_DBUS_TYPES_TOLERANT ON
- USE_BUILD_LIBS ON
- WITH_DBUS_WRAPPER ON
- WITH_DLT ON
- WITH_DOCUMENTATION OFF
- WITH_MAIN ON
- WITH_PLUGIN_COMMAND ON
- WITH_PLUGIN_CONTROL ON
- WITH_PLUGIN_ROUTING ON
- WITH_SYSTEMD_WATCHDOG OFF
- WITH_TELNET ON
- WITH_TESTS ON
- gmock_build_tests OFF
- gtest_build_samples OFF
- gtest_build_tests OFF
- gtest_disable_pthreads OFF
- gtest_force_shared_crt OFF
-
+ BUILD_SHARED_LIBS OFF
+ CMAKE_BUILD_TYPE
+ CMAKE_INSTALL_PREFIX /usr/local
+ COMMON_API_DBUS_LIBRARY /usr/local/lib/libCommonAPI-DBus.so
+ COMMON_API_LIBRARY /usr/local/lib/libCommonAPI.so
+ GLIB_DBUS_TYPES_TOLERANT ON
+ USE_BUILD_LIBS ON
+ WITH_COMMAND_INTERFACE_COMMON_ ON
+ WITH_DATABASE_STORAGE OFF
+ WITH_DLT ON
+ WITH_DOCUMENTATION ON
+ WITH_ENABLED_IPC CAPI
+ WITH_LOGSTATE ON
+ WITH_NSM ON
+ WITH_OXF_ANIMATION OFF
+ WITH_OXF_TRACE OFF
+ WITH_PLUGIN_COMMAND ON
+ WITH_PLUGIN_CONTROL ON
+ WITH_PLUGIN_ROUTING ON
+ WITH_ROUTING_INTERFACE_ASYNC OFF
+ WITH_ROUTING_INTERFACE_CAPI ON
+ WITH_SYSTEMD_WATCHDOG OFF
+ WITH_TELNET ON
+ WITH_TESTS ON
+ WITH_TEST_CONTROLLER OFF
+ gmock_build_tests OFF
+ gtest_build_samples OFF
+ gtest_build_tests OFF
+ gtest_disable_pthreads OFF
+ gtest_force_shared_crt OFF
+
=== Passing options to cmake:
.-DVERSION="XXX"
.-DMAX_TELNETCONNECTIONS="XXX"
sets the default maximum number of telnetconnections, default is 3
+.-DNSM_PATH="XXX"
+sets the path of the NSM DBUS interface
+
+.-DNSM_INTERFACE="XXX"
+sets the interface to the NSM DBUS interface
+
In order to change these options, you can modify this values with ccmake, do the appropriate changes in
CmakeList.txt or via the commandline for cmake or (when installed via ccmake)
=== Build dependencies
-You will need to fullfill some dependencies in order to comile the GENIVI AudioManager Daemon, these are:
+Basically, all build dependencies are optional- but you might need to use some if you want to have support for Dbus,
+for example...
+
+You will need optionally fullfill some dependencies in order to comile the GENIVI AudioManager Daemon, these are:
* dbus (only when DBUS_WRAPPER==ON) [tested on version 1.2.16]
-* sqlite3 [tested on version 3.6.22]
-* automotive-dlt [greater 2.5.0]
-* doxygen (only when WITH_DOCUMENTATION==ON) [tested on version 1.6.3]
+* sqlite3 [tested on version 3.6.22] (only when WITH_DATABASE_STORAGE==ON)
+* automotive-dlt [greater 2.5.0] (only when WITH_DLT==ON)
+* doxygen [tested on version 1.6.3] (only when WITH_DOCUMENTATION==ON)
+* commonAPI [version > 2.1] (only with WITH_ENABLED_IPC CAPI), more information here http://projects.genivi.org/commonapi/
To install them in a build environment like Ubuntu you can use:
----
sudo apt-get install libdbus-1-dev libsqlite3-dev doxygen git cmake build-essential
----
+=== The NodeStateManager
+
+The nodestatemanager headers are needed to compile the audiomanager. If the nodestatemanagerincludes are not found,
+the headers shipped with the audiomanager are used.
+The nodestatemanager can be retrieved from projects.genivi.org . You can install the headers on you system by
+
+----
+sudo make install-includeHEADERS
+----
+
For building the tests, you will need the following packages:
* python [tested on version 2.6, should work on higher versions as well]
All packages will be placed in a folder called packages
=== Adding own plugins
-Since the AudioManager needs to be completed with on plugins before it can be used, it provides a mechanism to keep the own sources away from the GENIVI code but compile them together.
+The AudioManager needs to be completed with on plugins. To keep the own sources away from the GENIVI code the project specific elements can be reconfigured with own type definitions.
TIP: Using this feature is simple: +
-Just add a folder with the name _ProjectSpecific_ (be sure to name it excactly like this!) on the main level of the AudioManager folder. CMake will look for CMakeLists.txt in this folder and add all files that it finds in /include to the include path. You can use this to add subfolders with your own plugins and includes, and overwrite productspecific.h for example.
-
-.Here is a sample CMakeLists.txt that can be placed in ProjectSpecific folder:
+Create in your projects an own projecttypes.h. The name is no naming convention given. The file is your project specific type definition which will be only referenced by the HMI, Routing Adapters and the Controller Plug-in.
+
+.The are already examples given in audiomanagertypes.h:
----
-cmake_minimum_required(VERSION 2.6)
-
-### set your own buildflags:
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=c++98 -D_GNU_SOURCE -pedantic -Wno-variadic-macros")
-
-##overwrite priojecttypes.h:
-CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/ProjectSpecific/overwrite/projecttypes.h ${CMAKE_SOURCE_DIR}/include/projecttypes.h COPYONLY)
-
-if(WITH_PLUGIN_ROUTING)
- add_subdirectory (../PluginRoutingInterfaceMyRoutingPlugin ${CMAKE_CURRENT_BINARY_DIR}/PluginRoutingInterfaceMyRoutingPlugin )
-endif(WITH_PLUGIN_ROUTING)
-
-if(WITH_PLUGIN_CONTROL)
- add_subdirectory ( ../PluginControlInterfaceMyControlPlugin ${CMAKE_CURRENT_BINARY_DIR}/PluginControlInterfaceMyControlPlugin)
-endif(WITH_PLUGIN_CONTROL)
-
+/**
+ * This type gives the information about reason for Source/Sink change
+ */
+typedef uint16_t am_CustomAvailabilityReason_t;
+static const am_CustomAvailabilityReason_t AR_UNKNOWN = 0;
+/** new media was entered */
+static const am_CustomAvailabilityReason_t AR_GENIVI_NEWMEDIA = 1;
+/** same media was entered */
+static const am_CustomAvailabilityReason_t AR_GENIVI_SAMEMEDIA = 2;
+/** there is no media or media is removed */
+static const am_CustomAvailabilityReason_t AR_GENIVI_NOMEDIA = 3;
+/** there was a temperature event */
+static const am_CustomAvailabilityReason_t AR_GENIVI_TEMPERATURE = 4;
+/** there was a voltage event */
+static const am_CustomAvailabilityReason_t AR_GENIVI_VOLTAGE = 5;
+/** fatal errors on reading or accessing media */
+static const am_CustomAvailabilityReason_t AR_GENIVI_ERRORMEDIA = 6;
+
+/**
+ * This is a custom specific identifier of property. It can be used to
+ * differentiate between interrupt source/sink, main source/sink, etc.
+ */
+typedef uint16_t am_CustomClassProperty_t;
+static const am_CustomClassProperty_t CP_UNKNOWN = 0;
+static const am_CustomClassProperty_t CP_GENIVI_SOURCE_TYPE = 1;
+static const am_CustomClassProperty_t CP_GENIVI_SINK_TYPE = 2;
+
+/**
+ * This type classifies the format in which data is exchanged within a connection.
+ * The type itself is project specific although there are some standard formats
+ * defined.
+ */
+typedef uint16_t am_CustomConnectionFormat_t;
+static const am_CustomConnectionFormat_t CF_UNKNOWN = 0;
+/** plain mono */
+static const am_CustomConnectionFormat_t CF_GENIVI_MONO = 1;
+/** stereo connection */
+static const am_CustomConnectionFormat_t CF_GENIVI_STEREO = 2;
+/** analog connection */
+static const am_CustomConnectionFormat_t CF_GENIVI_ANALOG = 3;
+/** automatic connection. */
+static const am_CustomConnectionFormat_t CF_GENIVI_AUTO = 4;
+
+/**
+ * Here are all SoundProperties that can be set via the CommandInterface.
+ * This type is product specific and can be changed or extended.
+ */
+typedef uint16_t am_CustomMainSoundPropertyType_t;
+static const am_CustomMainSoundPropertyType_t MSP_UNKNOWN = 0;
+/** example value between -10 and +10 */
+static const am_CustomMainSoundPropertyType_t MSP_GENIVI_TREBLE = 1;
+/** example value between -10 and +10 */
+static const am_CustomMainSoundPropertyType_t MSP_GENIVI_MID = 2;
+/** example value between -10 and +10 */
+static const am_CustomMainSoundPropertyType_t MSP_GENIVI_BASS = 3;
+
+/**
+ * The notification types are project specific.
+ */
+typedef uint16_t am_CustomNotificationType_t;
+static const am_CustomNotificationType_t NT_UNKNOWN = 0;
+
+/**
+ * The given ramp types here are just examples. For products, different ramp types
+ * can be defined here. It is in the responsibility of the product to make sure
+ * that the routing plugins are aware of the ramp types used.
+ */
+typedef uint16_t am_CustomRampType_t;
+static const am_CustomRampType_t RAMP_UNKNOWN = 0;
+/** sets directly the value without a ramp */
+static const am_CustomRampType_t RAMP_GENIVI_DIRECT = 1;
+/** Sets the volume as fast as possible */
+static const am_CustomRampType_t RAMP_GENIVI_NO_PLOP = 2;
+static const am_CustomRampType_t RAMP_GENIVI_EXP_INV = 3;
+static const am_CustomRampType_t RAMP_GENIVI_LINEAR = 4;
+static const am_CustomRampType_t RAMP_GENIVI_EXP = 5;
+
+/**
+ * Within genivi only the some example properties are defined.
+ * For products these should be changed or extended.
+ */
+typedef uint16_t am_CustomSoundPropertyType_t;
+static const am_CustomSoundPropertyType_t SP_UNKNOWN = 0;
+/** example treble value min =-10 max =10 */
+static const am_CustomSoundPropertyType_t SP_GENIVI_TREBLE = 1;
+/** example mid value min =-10 max =10 */
+static const am_CustomSoundPropertyType_t SP_GENIVI_MID = 2;
+/** example bass value min =-10 max =10 */
+static const am_CustomSoundPropertyType_t SP_GENIVI_BASS = 3;
+
+/**
+ * Describes the different system properties which are project specific.
+ */
+typedef uint16_t am_CustomSystemPropertyType_t;
+static const am_CustomSystemPropertyType_t SYP_UNKNOWN = 0;
----
=== CommandLine options
----
+
+