summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-03-05 22:49:12 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2012-03-05 22:49:12 +0100
commit8ced1dced5ae1fbc7356ec65c03e6e8201216155 (patch)
treeb4b19aac085948040d775e284455a0041b17e022 /include
parent1b85f2410d1d644ff00284e78b1eeff6cfad2fc4 (diff)
downloadaudiomanager-8ced1dced5ae1fbc7356ec65c03e6e8201216155.tar.gz
* updated license headers
* updated documentation
Diffstat (limited to 'include')
-rw-r--r--include/audiomanagertypes.h407
-rw-r--r--include/command/IAmCommandReceive.h22
-rw-r--r--include/command/IAmCommandSend.h22
-rw-r--r--include/control/IAmControlReceive.h22
-rw-r--r--include/control/IAmControlSend.h24
-rw-r--r--include/projecttypes.h28
-rw-r--r--include/routing/IAmRoutingReceive.h22
-rw-r--r--include/routing/IAmRoutingSend.h22
-rw-r--r--include/shared/CAmDbusWrapper.h39
-rw-r--r--include/shared/CAmDltWrapper.h98
-rw-r--r--include/shared/CAmSerializer.h60
-rw-r--r--include/shared/CAmSocketHandler.h135
12 files changed, 618 insertions, 283 deletions
diff --git a/include/audiomanagertypes.h b/include/audiomanagertypes.h
index afc5519..b16b637 100644
--- a/include/audiomanagertypes.h
+++ b/include/audiomanagertypes.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_1F9A0AD1_FF28_4de6_A5C7_2F570F618734__INCLUDED_)
-#define EA_1F9A0AD1_FF28_4de6_A5C7_2F570F618734__INCLUDED_
+#if !defined(EA_FF16184D_524E_4747_8AC7_DD40DA868A0E__INCLUDED_)
+#define EA_FF16184D_524E_4747_8AC7_DD40DA868A0E__INCLUDED_
#include <stdint.h>
#include "projecttypes.h"
@@ -31,63 +31,63 @@ namespace am {
/**
* a domain ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_domainID_t;
/**
* a source ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sourceID_t;
/**
* a sink ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sinkID_t;
/**
* a gateway ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_gatewayID_t;
/**
* a crossfader ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_crossfaderID_t;
/**
* a connection ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_connectionID_t;
/**
* a mainConnection ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_mainConnectionID_t;
/**
* speed
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_speed_t;
/**
* The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and maximum can be limited by actual project.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef int16_t am_volume_t;
@@ -95,40 +95,40 @@ namespace am {
* This is the volume presented on the command interface. It is in the duty of the Controller to change the volumes given here into meaningful values on the routing interface.
* The range of this type is customer specific.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef int16_t am_mainVolume_t;
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sourceClass_t;
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sinkClass_t;
/**
* time in ms!
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_time_t;
/**
* offset time that is introduced in milli seconds.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef int16_t am_timeSync_t;
/**
* with the help of this enum, sinks and sources can report their availability state
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_Availablility_e
{
@@ -150,7 +150,7 @@ namespace am {
/**
* represents the connection state
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_ConnectionState_e
{
@@ -180,7 +180,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_DomainState_e
{
@@ -206,7 +206,7 @@ namespace am {
/**
* This enum characterizes the data of the EarlyData_t
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_EarlyDataType_e
{
@@ -236,7 +236,7 @@ namespace am {
/**
* the errors of the audiomanager. All possible errors are in here. This enum is used widely as return parameter.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_Error_e
{
@@ -289,7 +289,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_MuteState_e
{
@@ -311,7 +311,7 @@ namespace am {
/**
* The source state reflects the state of the source
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_SourceState_e
{
@@ -334,7 +334,7 @@ namespace am {
/**
* This enumeration is used to define the type of the action that is correlated to a handle.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_Handle_e
{
@@ -354,7 +354,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_InterruptState_e
{
@@ -376,7 +376,7 @@ namespace am {
/**
* describes the active sink of a crossfader.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_HotSink_e
{
@@ -402,7 +402,7 @@ namespace am {
/**
* this describes the availability of a sink or a source together with the latest change
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_Availability_s
{
@@ -420,51 +420,109 @@ namespace am {
};
/**
+ * describes class properties
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_ClassProperty_s
{
public:
+ /**
+ * the property as enum
+ */
am_ClassProperty_e classProperty;
+ /**
+ * the value of the property
+ */
int16_t value;
};
/**
+ * This struct describes the attribiutes of a crossfader.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_Crossfader_s
{
public:
+ /**
+ * This is the ID of the crossfader, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManager daemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_crossfaderID_t crossfaderID;
+ /**
+ * The name of the crossfader. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * The sinkID of the SinkA. Sinks shall be registered before registering the crossfader.
+ */
am_sinkID_t sinkID_A;
+ /**
+ * The sinkID of the SinkB. Sinks shall be registered before registering the crossfader.
+ */
am_sinkID_t sinkID_B;
+ /**
+ * The sourceID of the crossfader source. The source shall be registered before the crossfader.
+ */
am_sourceID_t sourceID;
+ /**
+ * This enum can have 3 states:
+ *
+ * HS_SINKA sinkA is the current hot one, sinkB is not audible
+ * HS_SINKB sinkB is the current hot one, sinkB is not audible
+ * HS_INTERMEDIATE the fader is stuck in between a cross-fading action. This could be due to an abort or an error. Before using the crossfader, it must be set to either HS_SINKA or HS_SINKB.
+ */
am_HotSink_e hotSink;
};
/**
+ * This struct describes the attributes of a gateway.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_Gateway_s
{
public:
+ /**
+ * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_gatewayID_t gatewayID;
+ /**
+ * The name of the gateway. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * The sinkID of the gateway sink-end. The sink is a full blown sink with connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of a gateway as non-visible. Care needs to be taken that the connectionsFormats match with the ones in the conversionMatrix. If the sink is located in the controllingDomain, the ID needs to be retrieved by registering the sink before registering the gateway. In case the sink is in a different domain, the ID needs to be retrieved via peeking.
+ */
am_sinkID_t sinkID;
+ /**
+ * The sourceID of the gateway sink-end. The sink is a full blown source with connectionFormats, sinkClassIDs etc... It makes sense to register the sources of a gateway as non-visible. Care needs to be taken that the connectionsFormats match with the ones in the conversionMatrix. If the source is located in the controllingDomain, the ID needs to be retrieved by registering the source before registering the gateway. In case the source is in a different domain, the ID needs to be retrieved via peeking.
+ */
am_sourceID_t sourceID;
+ /**
+ * The ID of the sink. If the domain is the same like the controlling domain, the ID is known due to registration. If the domain is different, the ID needs to be retrieved via peeking.
+ */
am_domainID_t domainSinkID;
+ /**
+ * The ID of the source. If the domain is the same like the controlling domain, the ID is known due to registration. If the domain is different, the ID needs to be retrieved via peeking.
+ */
am_domainID_t domainSourceID;
+ /**
+ * This is the ID of the domain that registers the gateway.
+ */
am_domainID_t controlDomainID;
+ /**
+ * This is the list of available formats on the source side of the gateway. It is not defined during the gateway registration but copied from the source registration.
+ */
std::vector<am_ConnectionFormat_e> listSourceFormats;
+ /**
+ * This is the list of available formats on the sink side of the gateway. It is not defined during the gateway registration but copied from the sink registration.
+ */
std::vector<am_ConnectionFormat_e> listSinkFormats;
/**
* This is matrix holding information about the conversion capability of the gateway, it's length is defined by the length(listSinkFormats) x length(listSourceFormats).
@@ -491,49 +549,79 @@ namespace am {
/**
* This represents one "hopp" in a route
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_RoutingElement_s
{
public:
+ /**
+ * the source ID
+ */
am_sourceID_t sourceID;
+ /**
+ * the sinkID
+ */
am_sinkID_t sinkID;
+ /**
+ * the domainID the routeElement is in
+ */
am_domainID_t domainID;
+ /**
+ * the connectionformat that is used for the route
+ */
am_ConnectionFormat_e connectionFormat;
};
/**
+ * a list of routing elements that lead from source to sink
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_Route_s
{
public:
+ /**
+ * the sourceID where the route starts
+ */
am_sourceID_t sourceID;
+ /**
+ * the sinkID where the route ends
+ */
am_sinkID_t sinkID;
+ /**
+ * the actual route as list of routing elements
+ */
std::vector<am_RoutingElement_s> route;
};
/**
+ * struct describing the sound property
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SoundProperty_s
{
public:
+ /**
+ * the type of the property - a project specific enum
+ */
am_SoundPropertyType_e type;
+ /**
+ * the actual value of the property
+ */
int16_t value;
};
/**
+ * struct describing system properties
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SystemProperty_s
{
@@ -551,22 +639,33 @@ namespace am {
};
/**
+ * struct describing sinkclasses
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SinkClass_s
{
public:
+ /**
+ * the ID of the sinkClass
+ */
am_sinkClass_t sinkClassID;
+ /**
+ * the name of the sinkClass - must be unique in the system
+ */
std::string name;
+ /**
+ * the list of the class properties. These are pairs of a project specific enum describing the type of the value and an integer holding the real value.
+ */
std::vector<am_ClassProperty_s> listClassProperties;
};
/**
+ * struct describing source classes
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SourceClass_s
{
@@ -576,7 +675,13 @@ namespace am {
* the source ID
*/
am_sourceClass_t sourceClassID;
+ /**
+ * the name of the sourceClass - must be unique in the system
+ */
std::string name;
+ /**
+ * the list of the class properties. These are pairs of a project specific enum describing the type of the value and an integer holding the real value.
+ */
std::vector<am_ClassProperty_s> listClassProperties;
};
@@ -584,15 +689,27 @@ namespace am {
/**
* this type holds all information of sources relevant to the HMI
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SourceType_s
{
public:
+ /**
+ * This is the ID of the source, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sourceID_t sourceID;
+ /**
+ * The name of the source. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * the availability of the source
+ */
am_Availability_s availability;
+ /**
+ * the sourceClassID, indicates the class the source is in. This information can be used by the Controller to implement different behaviour for different classes.
+ */
am_sourceClass_t sourceClassID;
};
@@ -600,43 +717,75 @@ namespace am {
/**
* this type holds all information of sinks relevant to the HMI
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SinkType_s
{
public:
+ /**
+ * This is the ID of the sink, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sinkID_t sinkID;
+ /**
+ * The name of the sink. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * This attribute reflects the availability of the sink. There are several reasons why a sink could be not available for the moment: for example the shutdown of a sink because of overtemperature or over- & undervoltage. The availability consists of two pieces of information:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
+ */
am_Availability_s availability;
+ /**
+ * This is the representation of the Volume for the commandInterface. It is used by the HMI to set the volume of a sink, the AudioManagerController has to transform this into real source and sink volumes.
+ */
am_mainVolume_t volume;
am_MuteState_e muteState;
+ /**
+ * The sinkClassID references to a sinkClass. With the help of classification, rules can be setup to define the system behaviour.
+ */
am_sinkClass_t sinkClassID;
};
/**
+ * a handle is used for asynchronous operations and is uniquely assigned for each of this operations
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_Handle_s
{
public:
+ /**
+ * the handletype
+ */
am_Handle_e handleType:4;
+ /**
+ * the handle as value
+ */
uint16_t handle:12;
};
/**
+ * struct describung mainsound property
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_MainSoundProperty_s
{
public:
+ /**
+ * the type of the property
+ */
am_MainSoundPropertyType_e type;
+ /**
+ * the actual value
+ */
int16_t value;
};
@@ -644,29 +793,51 @@ namespace am {
/**
* this type holds all information of connections relevant to the HMI
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_MainConnectionType_s
{
public:
+ /**
+ * the ID of the mainconnection
+ */
am_mainConnectionID_t mainConnectionID;
+ /**
+ * the sourceID where the connection starts
+ */
am_sourceID_t sourceID;
+ /**
+ * the sinkID where the connection ends
+ */
am_sinkID_t sinkID;
+ /**
+ * the delay of the mainconnection
+ */
am_timeSync_t delay;
+ /**
+ * the current connection state
+ */
am_ConnectionState_e connectionState;
};
/**
+ * struct that holds attribiutes of a mainconnection
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_MainConnection_s
{
public:
+ /**
+ * the assigned ID
+ */
am_mainConnectionID_t mainConnectionID;
+ /**
+ * the current connection state
+ */
am_ConnectionState_e connectionState;
/**
* the sinkID
@@ -676,96 +847,218 @@ namespace am {
* the sourceID
*/
am_sourceID_t sourceID;
+ /**
+ * the delay of the connection
+ */
am_timeSync_t delay;
+ /**
+ * the list of sub connection IDs the mainconnection consists of
+ */
std::vector<am_connectionID_t> listConnectionID;
};
/**
+ * This struct describes the attribiutes of a sink
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Sink_s
{
public:
+ /**
+ * This is the ID of the sink, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sinkID_t sinkID;
+ /**
+ * The name of the sink. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * The domainID is the domain the sink belongs to. A sink can only be in one domain.
+ */
am_domainID_t domainID;
+ /**
+ * The sinkClassID references to a sinkClass. With the help of classification, rules can be setup to define the system behaviour.
+ */
am_sinkClass_t sinkClassID;
+ /**
+ * This is the volume of the sink. It is set by the AudioManagerController.
+ */
am_volume_t volume;
+ /**
+ * This Boolean flag indicates whether a sink is visible to the commandInterface or not. If the User must have the possibility to choose the source in the HMI, it must be visible. But there are also good reasons for invisible sinks, for example if the sink is part of a crossfader or gateway. HMI relevant changes in visible sinks will be automatically reported by the daemon to the commandInterface.
+ */
bool visible;
+ /**
+ * This attribute reflects the availability of the sink. There are several reasons why a sink could be not available for the moment: for example the shutdown of a sink because of overtemperature or over- & undervoltage. The availability consists of two pieces of information:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
+ */
am_Availability_s available;
+ /**
+ * This attribute reflects the muteState of the sink. The information is not the "real" state of the sink, but the HMI representation for he commandInterface controlled by the AudioManagerController.
+ */
am_MuteState_e muteState;
+ /**
+ * This is the representation of the Volume for the commandInterface. It is used by the HMI to set the volume of a sink, the AudioManagerController has to transform this into real source and sink volumes.
+ */
am_mainVolume_t mainVolume;
+ /**
+ * This is the list of soundProperties, that the sink is capable of. The soundProperties itself are project specific. For sinks, a possible soundProperty could be for example settings.
+ */
std::vector<am_SoundProperty_s> listSoundProperties;
+ /**
+ * This list holds information about the formats that the Source is capable of supporting when delivering audio.
+ */
std::vector<am_ConnectionFormat_e> listConnectionFormats;
+ /**
+ * This is the list of the available mainSoundProperties. The principle is the same than with soundProperties, but they are only visible to the CommandInterface.
+ */
std::vector<am_MainSoundProperty_s> listMainSoundProperties;
};
/**
+ * This struct describes the attribiutes of a source
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Source_s
{
public:
+ /**
+ * This is the ID of the source, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sourceID_t sourceID;
+ /**
+ * The domainID is the domain the source belongs to. A source can only be in one domain.
+ */
am_domainID_t domainID;
+ /**
+ * The name of the source. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * the sourceClassID, indicates the class the source is in. This information can be used by the Controller to implement different behaviour for different classes.
+ */
am_sourceClass_t sourceClassID;
+ /**
+ * The source state is an indication towards the source if it is actively heard or not. The source can use this information to implement features like automatic spin down of CD's in case the CD is not the active source or AF following of a tuner that is not actively heard. The source state is set by the AudioManagerController.There are 3 possible states:
+ *
+ * SS_ON: the source is active
+ * SS_OFF: the source is off
+ * SS_PAUSED: the source is paused and not active.
+ */
am_SourceState_e sourceState;
+ /**
+ * This is the volume of the source. It is set by the AudioManagerController. It is used to adopt different audiolevels in a system and mixing of sources (e.g. navigation hints & music).
+ */
am_volume_t volume;
+ /**
+ * This Boolean flag indicates whether a source is visible to the commandInterface or not. If the User must have the possibility to choose the source in the HMI, it must be visible. But there are also good reasons for invisible sources, for example if the source is part of a crossfader or gateway. HMI relevant changes in visible sources will be automatically reported by the daemon to the commandInterface.
+ */
bool visible;
+ /**
+ * This attribute reflects the availability of the source. There are several reasons why a source could be not available for the moment. For example a CD player which has no CD entered in the slot can be unavailable, or a USB player with no or unreadable stick attached. Other scenarios involve the shutdown of a source because of overtemperature or over- & undervoltage. The availability consists of two informations:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
+ */
am_Availability_s available;
+ /**
+ * Some special sources can have special behaviors, the are so called "Low Level Interrupts". Here the current status is documented. The information can be used by the AudioManagerController to react to the changes by for example lowering the volume of the mainSources. The two states are
+ *
+ * IS_OFF: the interrupt is not active at the moment
+ * IS_INTERRUPTED: the interrupt is playing at the moment.
+ */
am_InterruptState_e interruptState;
/**
- * This list holds all soundProperties of the source
+ * This is the list of soundProperties, that the source is capable of. The soundProperties itself are project specific. For sources, a possible soundProperty could be navigation volume offset, for example.
*/
std::vector<am_SoundProperty_s> listSoundProperties;
/**
- * list of the supported ConnectionFormats
+ * This list holds information about the formats that the Source is capable of supporting when delivering audio.
*/
std::vector<am_ConnectionFormat_e> listConnectionFormats;
/**
- * This list holds all MainSoundProperties of the source (all the ones that can be set via the HMI)
+ * This is the list of the available mainSoundProperties. The principle is the same than with soundProperties, but they are only visible to the CommandInterface.
*/
std::vector<am_MainSoundProperty_s> listMainSoundProperties;
};
/**
+ * This struct describes the attribiutes of a domain
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Domain_s
{
public:
+ /**
+ * the domain ID
+ */
am_domainID_t domainID;
+ /**
+ * the name of the domain
+ */
std::string name;
+ /**
+ * the busname. This is equal to a plugin name and is used to dispatch messages to the elements of a plugin
+ */
std::string busname;
+ /**
+ * the name of the node
+ */
std::string nodename;
+ /**
+ * indicated if the domain is independent at startup or not
+ */
bool early;
+ /**
+ * indicates if the domain registration is complete or not
+ */
bool complete;
+ /**
+ * the current domain state
+ */
am_DomainState_e state;
};
/**
+ * a connection
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Connection_s
{
public:
+ /**
+ * the assigned ID
+ */
am_connectionID_t connectionID;
+ /**
+ * the source the audio flows from
+ */
am_sourceID_t sourceID;
+ /**
+ * the sink the audio flows to
+ */
am_sinkID_t sinkID;
+ /**
+ * the delay of the conneciton
+ */
am_timeSync_t delay;
+ /**
+ * the used connectionformat
+ */
am_ConnectionFormat_e connectionFormat;
};
@@ -775,7 +1068,7 @@ namespace am {
* volume_t in case of ED_SOURCE_VOLUME, ED_SINK_VOLUME
* soundProperty_t in case of ED_SOURCE_PROPERTY, ED_SINK_PROPERTY
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
union am_EarlyData_u
{
@@ -791,7 +1084,7 @@ namespace am {
* sourceID in case of ED_SOURCE_VOLUME, ED_SOURCE_PROPERTY
* sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
union am_DataType_u
{
@@ -804,7 +1097,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
struct am_EarlyData_s
{
@@ -816,4 +1109,4 @@ namespace am {
};
}
-#endif // !defined(EA_1F9A0AD1_FF28_4de6_A5C7_2F570F618734__INCLUDED_)
+#endif // !defined(EA_FF16184D_524E_4747_8AC7_DD40DA868A0E__INCLUDED_)
diff --git a/include/command/IAmCommandReceive.h b/include/command/IAmCommandReceive.h
index f56c838..bd76d35 100644
--- a/include/command/IAmCommandReceive.h
+++ b/include/command/IAmCommandReceive.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_33827DF9_2BDB_4811_85B2_0EA4CD5519E4__INCLUDED_)
-#define EA_33827DF9_2BDB_4811_85B2_0EA4CD5519E4__INCLUDED_
+#if !defined(EA_1D908AFD_101D_4782_AA75_196D1BE1ED96__INCLUDED_)
+#define EA_1D908AFD_101D_4782_AA75_196D1BE1ED96__INCLUDED_
#include <vector>
#include <string>
@@ -33,13 +33,15 @@ class CAmSocketHandler;
namespace am {
/**
* The interface towards the Controlling Instance (e.g HMI). It handles the communication towards the HMI and other system components who need to interact with the audiomanagement.
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:42 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
class IAmCommandReceive
{
@@ -217,4 +219,4 @@ namespace am {
};
}
-#endif // !defined(EA_33827DF9_2BDB_4811_85B2_0EA4CD5519E4__INCLUDED_)
+#endif // !defined(EA_1D908AFD_101D_4782_AA75_196D1BE1ED96__INCLUDED_)
diff --git a/include/command/IAmCommandSend.h b/include/command/IAmCommandSend.h
index 0a447f9..64d2a39 100644
--- a/include/command/IAmCommandSend.h
+++ b/include/command/IAmCommandSend.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_E4CFF16E_3331_4608_971A_20131753B26D__INCLUDED_)
-#define EA_E4CFF16E_3331_4608_971A_20131753B26D__INCLUDED_
+#if !defined(EA_92DF8B64_35C7_48b1_9BE8_4D9BA5BA43E7__INCLUDED_)
+#define EA_92DF8B64_35C7_48b1_9BE8_4D9BA5BA43E7__INCLUDED_
#include <vector>
#include <string>
@@ -34,13 +34,15 @@ class IAmCommandReceive;
namespace am {
/**
* This interface handles all communication from the AudioManagerDaemon towards the system. It is designed in such a way that only callbacks with no return types are implemented. So when the CommandInterfacePlugins are designed in such a way that they broadcast signals to any node who is interested in the particular information (like signals on Dbus for example), more information can be retrieved via the CommandReceiveInterface.
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:43 PM
+ * @created 05-Mar-2012 9:02:08 PM
*/
class IAmCommandSend
{
@@ -191,4 +193,4 @@ namespace am {
};
}
-#endif // !defined(EA_E4CFF16E_3331_4608_971A_20131753B26D__INCLUDED_)
+#endif // !defined(EA_92DF8B64_35C7_48b1_9BE8_4D9BA5BA43E7__INCLUDED_)
diff --git a/include/control/IAmControlReceive.h b/include/control/IAmControlReceive.h
index bc160aa..0c440f4 100644
--- a/include/control/IAmControlReceive.h
+++ b/include/control/IAmControlReceive.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_857044C8_1BA8_4972_9083_E7BDD50F6922__INCLUDED_)
-#define EA_857044C8_1BA8_4972_9083_E7BDD50F6922__INCLUDED_
+#if !defined(EA_9408C8ED_AF20_4839_B557_1316C8F36E07__INCLUDED_)
+#define EA_9408C8ED_AF20_4839_B557_1316C8F36E07__INCLUDED_
#include <vector>
#include <string>
@@ -32,13 +32,15 @@ class CAmSocketHandler;
namespace am {
/**
* This interface gives access to all important functions of the audiomanager that are used by the AudioManagerController to control the system.
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:43 PM
+ * @created 05-Mar-2012 9:02:08 PM
*/
class IAmControlReceive
{
@@ -611,4 +613,4 @@ namespace am {
};
}
-#endif // !defined(EA_857044C8_1BA8_4972_9083_E7BDD50F6922__INCLUDED_)
+#endif // !defined(EA_9408C8ED_AF20_4839_B557_1316C8F36E07__INCLUDED_)
diff --git a/include/control/IAmControlSend.h b/include/control/IAmControlSend.h
index edf6d2e..74b840a 100644
--- a/include/control/IAmControlSend.h
+++ b/include/control/IAmControlSend.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_4CA53F2D_FD24_4389_9279_AD92791BD0B6__INCLUDED_)
-#define EA_4CA53F2D_FD24_4389_9279_AD92791BD0B6__INCLUDED_
+#if !defined(EA_F93E3E9B_27D4_41be_8507_07034DAC88C8__INCLUDED_)
+#define EA_F93E3E9B_27D4_41be_8507_07034DAC88C8__INCLUDED_
#include <vector>
#include <string>
@@ -28,18 +28,22 @@ namespace am {
class IAmControlReceive;
}
+#include "IAmControlReceive.h"
+
#define ControlSendVersion "1.0"
namespace am {
/**
* This interface is presented by the AudioManager controller.
* All the hooks represent system events that need to be handled. The callback functions are used to handle for example answers to function calls on the AudioManagerCoreInterface.
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:44 PM
+ * @created 05-Mar-2012 9:02:08 PM
*/
class IAmControlSend
{
@@ -385,4 +389,4 @@ namespace am {
};
}
-#endif // !defined(EA_4CA53F2D_FD24_4389_9279_AD92791BD0B6__INCLUDED_)
+#endif // !defined(EA_F93E3E9B_27D4_41be_8507_07034DAC88C8__INCLUDED_)
diff --git a/include/projecttypes.h b/include/projecttypes.h
index 2c03d5a..e4b7cb4 100644
--- a/include/projecttypes.h
+++ b/include/projecttypes.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,19 +11,20 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_3B985F0B_FAF4_4ad9_B5EA_59C989D2321B__INCLUDED_)
-#define EA_3B985F0B_FAF4_4ad9_B5EA_59C989D2321B__INCLUDED_
+#if !defined(EA_E3FA794F_2DEB_48eb_BF6A_69D59A10533C__INCLUDED_)
+#define EA_E3FA794F_2DEB_48eb_BF6A_69D59A10533C__INCLUDED_
namespace am {
/**
* This enum classifies the format in which data is exchanged within a connection. The enum itself is project specific although there are some Genivi standard formats defined.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_ConnectionFormat_e
{
@@ -54,7 +54,7 @@ namespace am {
/**
* This enum gives the information about reason for reason for Source/Sink change
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_AvailabilityReason_e
{
@@ -92,7 +92,7 @@ namespace am {
/**
* product specific identifier of property
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_ClassProperty_e
{
@@ -115,7 +115,7 @@ namespace am {
* The given ramp types here are just a possiblity. 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.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_RampType_e
{
@@ -137,7 +137,7 @@ namespace am {
/**
* sound properties. Within genivi only the standard properties are defined, for products these need to be extended.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_SoundPropertyType_e
{
@@ -163,7 +163,7 @@ namespace am {
/**
* Here are all SoundProperties that can be set via the CommandInterface. Product specific
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_MainSoundPropertyType_e
{
@@ -189,7 +189,7 @@ namespace am {
/**
* describes the different system properties. Project specific
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_SystemPropertyType_e
{
@@ -200,4 +200,4 @@ namespace am {
SYP_MAX
};
}
-#endif // !defined(EA_3B985F0B_FAF4_4ad9_B5EA_59C989D2321B__INCLUDED_)
+#endif // !defined(EA_E3FA794F_2DEB_48eb_BF6A_69D59A10533C__INCLUDED_)
diff --git a/include/routing/IAmRoutingReceive.h b/include/routing/IAmRoutingReceive.h
index d654d23..62d784e 100644
--- a/include/routing/IAmRoutingReceive.h
+++ b/include/routing/IAmRoutingReceive.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_8A0F2164_0638_43df_A114_D343F60C0938__INCLUDED_)
-#define EA_8A0F2164_0638_43df_A114_D343F60C0938__INCLUDED_
+#if !defined(EA_34CAC05D_FC87_41fc_825D_9F6B9A5177B0__INCLUDED_)
+#define EA_34CAC05D_FC87_41fc_825D_9F6B9A5177B0__INCLUDED_
#include <vector>
#include <string>
@@ -34,13 +34,15 @@ class CAmSocketHandler;
namespace am {
/**
* Routing Receive sendInterface description. This class implements everything from RoutingAdapter -> Audiomanager
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:44 PM
+ * @created 05-Mar-2012 9:02:09 PM
*/
class IAmRoutingReceive
{
@@ -345,4 +347,4 @@ namespace am {
};
}
-#endif // !defined(EA_8A0F2164_0638_43df_A114_D343F60C0938__INCLUDED_)
+#endif // !defined(EA_34CAC05D_FC87_41fc_825D_9F6B9A5177B0__INCLUDED_)
diff --git a/include/routing/IAmRoutingSend.h b/include/routing/IAmRoutingSend.h
index d22489b..79d268c 100644
--- a/include/routing/IAmRoutingSend.h
+++ b/include/routing/IAmRoutingSend.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_98A8173D_A5F4_4ee2_B909_152612E7BF00__INCLUDED_)
-#define EA_98A8173D_A5F4_4ee2_B909_152612E7BF00__INCLUDED_
+#if !defined(EA_D9F37547_FAF0_4337_9048_07D8EDDE0AB0__INCLUDED_)
+#define EA_D9F37547_FAF0_4337_9048_07D8EDDE0AB0__INCLUDED_
#include <vector>
#include <string>
@@ -34,13 +34,15 @@ class IAmRoutingReceive;
namespace am {
/**
* This class implements everything from Audiomanager -> RoutingAdapter
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:44 PM
+ * @created 05-Mar-2012 9:02:09 PM
*/
class IAmRoutingSend
{
@@ -201,4 +203,4 @@ namespace am {
};
}
-#endif // !defined(EA_98A8173D_A5F4_4ee2_B909_152612E7BF00__INCLUDED_)
+#endif // !defined(EA_D9F37547_FAF0_4337_9048_07D8EDDE0AB0__INCLUDED_)
diff --git a/include/shared/CAmDbusWrapper.h b/include/shared/CAmDbusWrapper.h
index 26131c2..c89220f 100644
--- a/include/shared/CAmDbusWrapper.h
+++ b/include/shared/CAmDbusWrapper.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,21 +12,24 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmDbusWrapper.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef DBUSWRAPPER_H_
#define DBUSWRAPPER_H_
-#include <config.h>
#include <dbus/dbus.h>
#include <string>
#include <list>
+#include "config.h"
#include "shared/CAmSocketHandler.h"
namespace am
{
+
/**
- * This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins)
+ * This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins). Works on the basis of CAmSocketHandler
*/
class CAmDbusWrapper
{
@@ -34,19 +37,7 @@ public:
CAmDbusWrapper(CAmSocketHandler* socketHandler);
virtual ~CAmDbusWrapper();
- /**
- * registers a callback that is entered as path below the main path.
- * The configuration of the mainpath is done via DBusConfiguration.h
- * @param vtable the vtable that holds a pointer to the callback that is called when the path is called from the dbus
- * @param path the name of the path
- * @param userdata pointer to the class that will handle the callback
- */
void registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata);
-
- /**
- * returns the dbus connection
- * @param connection pointer to the connection
- */
void getDBusConnection(DBusConnection*& connection) const;
static dbus_bool_t addWatch(DBusWatch *watch, void *userData);
@@ -70,7 +61,7 @@ public:
TAmShTimerCallBack<CAmDbusWrapper> pDbusTimerCallback;
private:
- static CAmDbusWrapper* mpReference;
+ static CAmDbusWrapper* mpReference; //!< reference to the dbus instance
static DBusHandlerResult cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference);
dbus_bool_t addWatchDelegate(DBusWatch * watch, void* userData);
void removeWatchDelegate(DBusWatch *watch, void *userData);
@@ -78,13 +69,13 @@ private:
dbus_bool_t addTimeoutDelegate(DBusTimeout *timeout, void* userData);
void removeTimeoutDelegate(DBusTimeout *timeout, void* userData);
void toggleTimeoutDelegate(DBusTimeout *timeout, void* userData);
- DBusObjectPathVTable mObjectPathVTable;
- DBusConnection* mpDbusConnection;
- DBusError mDBusError;
- std::list<std::string> mListNodes;
- std::vector<sh_timerHandle_t*> mpListTimerhandles;
- CAmSocketHandler *mpSocketHandler;
- std::map<DBusWatch*, sh_pollHandle_t> mMapHandleWatch;
+ DBusObjectPathVTable mObjectPathVTable; //!< the vpathtable
+ DBusConnection* mpDbusConnection; //!< pointer to the dbus connection used
+ DBusError mDBusError; //!< dbuserror
+ std::list<std::string> mListNodes; //!< holds a list of all nodes of the dbus
+ std::vector<sh_timerHandle_t*> mpListTimerhandles; //!< pointer to the timer handles
+ CAmSocketHandler *mpSocketHandler; //!< pointer to the sockethandler
+ std::map<DBusWatch*, sh_pollHandle_t> mMapHandleWatch; //!< map to the handle watches
};
}
diff --git a/include/shared/CAmDltWrapper.h b/include/shared/CAmDltWrapper.h
index 0df9cde..f3d39cc 100644
--- a/include/shared/CAmDltWrapper.h
+++ b/include/shared/CAmDltWrapper.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,78 +12,78 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmDltWrapper.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef DLTWRAPPER_H_
#define DLTWRAPPER_H_
#include "config.h"
+#include <string>
#ifdef WITH_DLT
#include <dlt/dlt.h>
#else
-#include <stdint.h>
+#include <cstdint>
#include <sstream>
-namespace am {
-
-#define DLT_USER_BUF_MAX_SIZE 2048
-
-/**
- * This structure is used for every context used in an application.
- */
-typedef struct
+namespace am
{
- char contextID[4]; /**< context id */
- int32_t log_level_pos; /**< offset in user-application context field */
-} DltContext;
-/**
- * Definitions of DLT log level
- */
-typedef enum
-{
- DLT_LOG_DEFAULT = -1, /**< Default log level */
- DLT_LOG_OFF = 0x00, /**< Log level off */
- DLT_LOG_FATAL = 0x01, /**< fatal system error */
- DLT_LOG_ERROR = 0x02, /**< error with impact to correct functionality */
- DLT_LOG_WARN = 0x03, /**< warning, correct behaviour could not be ensured */
- DLT_LOG_INFO = 0x04, /**< informational */
- DLT_LOG_DEBUG = 0x05, /**< debug */
- DLT_LOG_VERBOSE = 0x06 /**< highest grade of information */
-} DltLogLevelType;
+#define DLT_USER_BUF_MAX_SIZE 2048
-/**
- * This structure is used for context data used in an application.
- */
-typedef struct
-{
- DltContext *handle; /**< pointer to DltContext */
- std::stringstream buffer; /**< buffer for building log message*/
- int32_t log_level; /**< log level */
- int32_t trace_status; /**< trace status */
- int32_t args_num; /**< number of arguments for extended header*/
- uint8_t mcnt; /**< message counter */
- char* context_description; /**< description of context */
-} DltContextData;
+ /**
+ * This structure is used for every context used in an application.
+ */
+ typedef struct
+ {
+ char contextID[4]; /**< context id */
+ int32_t log_level_pos; /**< offset in user-application context field */
+ }DltContext;
+
+ /**
+ * Definitions of DLT log level
+ */
+ typedef enum
+ {
+ DLT_LOG_DEFAULT = -1, /**< Default log level */
+ DLT_LOG_OFF = 0x00, /**< Log level off */
+ DLT_LOG_FATAL = 0x01, /**< fatal system error */
+ DLT_LOG_ERROR = 0x02, /**< error with impact to correct functionality */
+ DLT_LOG_WARN = 0x03, /**< warning, correct behaviour could not be ensured */
+ DLT_LOG_INFO = 0x04, /**< informational */
+ DLT_LOG_DEBUG = 0x05, /**< debug */
+ DLT_LOG_VERBOSE = 0x06 /**< highest grade of information */
+ }DltLogLevelType;
+
+ /**
+ * This structure is used for context data used in an application.
+ */
+ typedef struct
+ {
+ DltContext *handle; /**< pointer to DltContext */
+ std::stringstream buffer; /**< buffer for building log message*/
+ int32_t log_level; /**< log level */
+ int32_t trace_status; /**< trace status */
+ int32_t args_num; /**< number of arguments for extended header*/
+ uint8_t mcnt; /**< message counter */
+ char* context_description; /**< description of context */
+ }DltContextData;
#define DLT_DECLARE_CONTEXT(CONTEXT) \
DltContext CONTEXT;
-
#define DLT_IMPORT_CONTEXT(CONTEXT) \
extern DltContext CONTEXT;
#endif // WITH_DLT
-
-#include <string>
-
namespace am
{
/**
- * Wraps around the dlt wrapper. This class is instantiated as a singleton and offers a default
+ * Wraps around the dlt. This class is instantiated as a singleton and offers a default
* context (maincontext) that is registered to log to.
* Logging under the default context can simply be done with the logInfo/logError templates with up to 10 values at a time.
* For logging with a different context, you can use the log template. First register a context with registerContext.
@@ -114,8 +114,8 @@ public:
private:
CAmDltWrapper(const bool enableNoDLTDebug); //is private because of singleton pattern
#ifndef WITH_DLT
- template<class T> void appendNoDLT(T value);
- bool mEnableNoDLTDebug;
+ template<class T> void appendNoDLT(T value);
+ bool mEnableNoDLTDebug;
#endif
DltContext mDltContext; //!< the default context
DltContextData mDltContextData; //!< contextdata
@@ -129,7 +129,7 @@ private:
*/
inline CAmDltWrapper* getWrapper()
{
- return CAmDltWrapper::instance();
+ return (CAmDltWrapper::instance());
}
/**
diff --git a/include/shared/CAmSerializer.h b/include/shared/CAmSerializer.h
index 3cb8f5a..8a955df 100644
--- a/include/shared/CAmSerializer.h
+++ b/include/shared/CAmSerializer.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,6 +12,8 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmSerializer.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef CAMSERIALIZER_H_
@@ -74,7 +76,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)();
- return true;
+ return (true);
};
};
@@ -99,7 +101,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument);
- return true;
+ return (true);
};
};
@@ -126,7 +128,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument, mArgument1);
- return true;
+ return (true);
};
};
@@ -157,7 +159,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument, mArgument1, mArgument2);
- return true;
+ return (true);
}
;
};
@@ -191,7 +193,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3);
- return true;
+ return (true);
}
;
};
@@ -220,13 +222,13 @@ private:
{
mRetval = (*mInstance.*mFunction)();
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
TretVal returnResults()
{
- return mRetval;
+ return (mRetval);
}
};
@@ -256,14 +258,14 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
TretVal returnResults(Targ& argument)
{
argument = mArgument;
- return mRetval;
+ return (mRetval);
}
};
@@ -290,14 +292,14 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
TretVal returnResults(Targ& argument)
{
argument = mArgument;
- return mRetval;
+ return (mRetval);
}
};
@@ -329,7 +331,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -337,7 +339,7 @@ private:
{
argument = mArgument;
argument1 = mArgument1;
- return mRetval;
+ return (mRetval);
}
};
@@ -366,7 +368,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -374,7 +376,7 @@ private:
{
argument = mArgument;
argument1 = mArgument1;
- return mRetval;
+ return (mRetval);
}
};
@@ -407,7 +409,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -416,7 +418,7 @@ private:
argument = mArgument;
argument1 = mArgument1;
argument2 = mArgument2;
- return mRetval;
+ return (mRetval);
}
};
@@ -450,7 +452,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -460,7 +462,7 @@ private:
argument1 = mArgument1;
argument2 = mArgument2;
argument3 = mArgument3;
- return mRetval;
+ return (mRetval);
}
};
@@ -494,7 +496,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3, mArgument4);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -505,7 +507,7 @@ private:
argument2 = mArgument2;
argument3 = mArgument3;
argument4 = mArgument4;
- return mRetval;
+ return (mRetval);
}
};
@@ -540,7 +542,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3, mArgument4, mArgument5);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -552,7 +554,7 @@ private:
argument3 = mArgument3;
argument4 = mArgument4;
argument5 = mArgument5;
- return mRetval;
+ return (mRetval);
}
};
@@ -913,8 +915,8 @@ public:
(void) handle;
(void) userData;
if (mListDelegatePoiters.empty())
- return false;
- return true;
+ return (false);
+ return (true);
}
bool dispatcherCallback(const sh_pollHandle_t handle, void* userData)
@@ -926,8 +928,8 @@ public:
if (delegatePoiter->call(mReturnPipe))
delete delegatePoiter;
if (mListDelegatePoiters.empty())
- return false;
- return true;
+ return (false);
+ return (true);
}
TAmShPollFired<CAmSerializer> receiverCallbackT;
diff --git a/include/shared/CAmSocketHandler.h b/include/shared/CAmSocketHandler.h
index e0ea797..8df6872 100644
--- a/include/shared/CAmSocketHandler.h
+++ b/include/shared/CAmSocketHandler.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,6 +12,8 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmSocketHandler.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef SOCKETHANDLER_H_
@@ -34,22 +36,26 @@ static volatile sig_atomic_t gDispatchDone = 0; //this global is used to stop th
typedef uint16_t sh_timerHandle_t; //!<this is a handle for a timer to be used with the SocketHandler
typedef uint16_t sh_pollHandle_t; //!<this is a handle for a filedescriptor to be used with the SocketHandler
-class CAmShPollPrepare;
-class CAmShPollCheck;
-class CAmShPollFired;
-class CAmShPollDispatch;
-class CAmShTimerCallBack;
+class IAmShPollPrepare;
+class IAmShPollCheck;
+class IAmShPollFired;
+class IAmShPollDispatch;
+class IAmShTimerCallBack;
+/**
+ * The sockethandler implements a mainloop for the audiomanager. Plugins and different parts of the audiomanager add their filedescriptors to the handler to get called
+ * on communication of the filedescriptors.
+ */
class CAmSocketHandler
{
public:
CAmSocketHandler();
- virtual ~CAmSocketHandler();
+ ~CAmSocketHandler();
- am_Error_e addFDPoll(const int fd, const short event, CAmShPollPrepare *prepare, CAmShPollFired *fired, CAmShPollCheck *check, CAmShPollDispatch *dispatch, void* userData, sh_pollHandle_t& handle);
+ am_Error_e addFDPoll(const int fd, const short event, IAmShPollPrepare *prepare, IAmShPollFired *fired, IAmShPollCheck *check, IAmShPollDispatch *dispatch, void* userData, sh_pollHandle_t& handle);
am_Error_e removeFDPoll(const sh_pollHandle_t handle);
am_Error_e updateEventFlags(const sh_pollHandle_t handle, const short events);
- am_Error_e addTimer(const timespec timeouts, CAmShTimerCallBack*& callback, sh_timerHandle_t& handle, void* userData);
+ am_Error_e addTimer(const timespec timeouts, IAmShTimerCallBack*& callback, sh_timerHandle_t& handle, void* userData);
am_Error_e removeTimer(const sh_timerHandle_t handle);
am_Error_e restartTimer(const sh_timerHandle_t handle, const timespec timeouts);
am_Error_e stopTimer(const sh_timerHandle_t handle);
@@ -61,7 +67,7 @@ private:
sh_timerHandle_t handle; //!<the handle of the timer
timespec countdown; //!<the countdown, this value is decreased every time the timer is up
timespec timeout; //!<the original timer value
- CAmShTimerCallBack* callback; //!<the callbackfunction
+ IAmShTimerCallBack* callback; //!<the callbackfunction
void * userData; //!<saves a void pointer together with the rest.
};
@@ -71,17 +77,19 @@ private:
timespec param;
public:
CAmShSubstractTime(timespec param) :
- param(param){}
+ param(param)
+ {
+ }
void operator()(sh_timer_s& t) const;
};
struct sh_poll_s //!<struct that holds information about polls
{
sh_pollHandle_t handle; //!<handle to uniquely adress a filedesriptor
- CAmShPollPrepare *prepareCB;
- CAmShPollFired *firedCB;
- CAmShPollCheck *checkCB;
- CAmShPollDispatch *dispatchCB;
+ IAmShPollPrepare *prepareCB;
+ IAmShPollFired *firedCB;
+ IAmShPollCheck *checkCB;
+ IAmShPollDispatch *dispatchCB;
pollfd pollfdValue; //!<the array for polling the filedescriptors
void *userData; //!<userdata saved together with the callback.
};
@@ -95,7 +103,9 @@ private:
mListPollfd_t& mArray;
public:
CAmShCopyPollfd(mListPollfd_t& dest) :
- mArray(dest){}
+ mArray(dest)
+ {
+ }
void operator()(const sh_poll_s& row);
};
@@ -106,12 +116,12 @@ private:
timespec* insertTime(timespec& buffertime);
static bool compareCountdown(const sh_timer_s& a, const sh_timer_s& b)
{
- return (a.countdown.tv_sec == b.countdown.tv_sec) ? (a.countdown.tv_nsec < b.countdown.tv_nsec) : (a.countdown.tv_sec < b.countdown.tv_sec);
+ return ((a.countdown.tv_sec == b.countdown.tv_sec) ? (a.countdown.tv_nsec < b.countdown.tv_nsec) : (a.countdown.tv_sec < b.countdown.tv_sec));
}
static bool onlyFiredEvents(const pollfd& a)
{
- return a.revents == 0 ? false : true;
+ return (a.revents == 0 ? false : true);
}
//todo: maybe we could simplify mListActiveTimer to hold only the handle and the countdown ....
@@ -127,56 +137,68 @@ private:
};
/**
- * classic functor for the BasicTimerCallback
+ * prototype for the timer callback
*/
-class CAmShTimerCallBack
+class IAmShTimerCallBack
{
public:
virtual void Call(const sh_timerHandle_t handle, void* userData)=0;
- virtual ~CAmShTimerCallBack(){};
+ virtual ~IAmShTimerCallBack(){};
};
-class CAmShPollPrepare
+/**
+ * prototype for poll prepared callback
+ */
+class IAmShPollPrepare
{
public:
virtual void Call(const sh_pollHandle_t handle, void* userData)=0;
- virtual ~CAmShPollPrepare(){};
+ virtual ~IAmShPollPrepare(){};
};
-class CAmShPollFired
+/**
+ * prototype for poll fired callback
+ */
+class IAmShPollFired
{
public:
virtual void Call(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)=0;
- virtual ~ CAmShPollFired(){};
+ virtual ~ IAmShPollFired(){};
};
-class CAmShPollCheck
+/**
+ * prototype for poll check callback
+ */
+class IAmShPollCheck
{
public:
virtual bool Call(const sh_pollHandle_t handle, void* userData)=0;
- virtual ~ CAmShPollCheck(){};
+ virtual ~ IAmShPollCheck(){};
};
-class CAmShPollDispatch
+/**
+ * prototype for dispatch callback
+ */
+class IAmShPollDispatch
{
public:
virtual bool Call(const sh_pollHandle_t handle, void* userData)=0;
- virtual ~ CAmShPollDispatch() {};
+ virtual ~ IAmShPollDispatch(){};
};
/**
* template to create the functor for a class
*/
-template<class TClass> class TAmShTimerCallBack: public CAmShTimerCallBack
+template<class TClass> class TAmShTimerCallBack: public IAmShTimerCallBack
{
private:
TClass* mInstance;
void (TClass::*mFunction)(sh_timerHandle_t handle, void* userData);
public:
- TAmShTimerCallBack(TClass* instance, void(TClass::*function)(sh_timerHandle_t handle, void* userData)) :
- mInstance(instance),//
- mFunction(function) {};
+ TAmShTimerCallBack(TClass* instance, void (TClass::*function)(sh_timerHandle_t handle, void* userData)) :
+ mInstance(instance), //
+ mFunction(function){};
virtual void Call(sh_timerHandle_t handle, void* userData)
{
@@ -185,74 +207,87 @@ public:
};
/**
- * template to create the functor for a class
+ * template for a callback
*/
-template<class TClass> class TAmShPollPrepare: public CAmShPollPrepare
+template<class TClass> class TAmShPollPrepare: public IAmShPollPrepare
{
private:
TClass* mInstance;
void (TClass::*mFunction)(const sh_timerHandle_t handle, void* userData);
public:
- TAmShPollPrepare(TClass* instance, void(TClass::*function)(const sh_timerHandle_t handle, void* userData)) :
+ TAmShPollPrepare(TClass* instance, void (TClass::*function)(const sh_timerHandle_t handle, void* userData)) :
mInstance(instance), //
mFunction(function){};
virtual void Call(const sh_timerHandle_t handle, void* userData)
{
(*mInstance.*mFunction)(handle, userData);
- };
+ }
+ ;
};
-template<class TClass> class TAmShPollFired: public CAmShPollFired
+/**
+ * template for a callback
+ */
+template<class TClass> class TAmShPollFired: public IAmShPollFired
{
private:
TClass* mInstance;
void (TClass::*mFunction)(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
public:
- TAmShPollFired(TClass* instance, void(TClass::*function)(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)) :
+ TAmShPollFired(TClass* instance, void (TClass::*function)(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)) :
mInstance(instance), //
mFunction(function){};
virtual void Call(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)
{
(*mInstance.*mFunction)(pollfd, handle, userData);
- };
+ }
+ ;
};
-template<class TClass> class TAmShPollCheck: public CAmShPollCheck
+/**
+ * template for a callback
+ */
+template<class TClass> class TAmShPollCheck: public IAmShPollCheck
{
private:
TClass* mInstance;
bool (TClass::*mFunction)(const sh_pollHandle_t handle, void* userData);
public:
- TAmShPollCheck(TClass* instance, bool(TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
+ TAmShPollCheck(TClass* instance, bool (TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
mInstance(instance), //
mFunction(function){};
virtual bool Call(const sh_pollHandle_t handle, void* userData)
{
- return (*mInstance.*mFunction)(handle, userData);
- };
+ return ((*mInstance.*mFunction)(handle, userData));
+ }
+ ;
};
-template<class TClass> class TAmShPollDispatch: public CAmShPollDispatch
+/**
+ * template for a callback
+ */
+template<class TClass> class TAmShPollDispatch: public IAmShPollDispatch
{
private:
TClass* mInstance;
bool (TClass::*mFunction)(const sh_pollHandle_t handle, void* userData);
public:
- TAmShPollDispatch(TClass* instance, bool(TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
+ TAmShPollDispatch(TClass* instance, bool (TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
mInstance(instance), //
- mFunction(function) {};
+ mFunction(function){};
virtual bool Call(const sh_pollHandle_t handle, void* userData)
{
- return (*mInstance.*mFunction)(handle, userData);
- };
+ return ((*mInstance.*mFunction)(handle, userData));
+ }
+ ;
};
} /* namespace am */
#endif /* SOCKETHANDLER_H_ */