diff options
author | Martin Koch <martin.koch@ese.de> | 2020-06-19 16:01:19 +0200 |
---|---|---|
committer | Martin Koch <martin.koch@ese.de> | 2020-07-01 14:37:32 +0200 |
commit | 066c3f7f16ef69e80376942e8d6b8c4944b8ed08 (patch) | |
tree | d7d6ee7e5591e6915865ff0b0fa67191091032ca /include/IAmRouting.h | |
parent | 4b34f9dc67e4ff1948d233346c2e5e3b14b8e78a (diff) | |
download | audiomanager-066c3f7f16ef69e80376942e8d6b8c4944b8ed08.tar.gz |
Add support for announcement and handling of pre-established audio connections through routing side
As the complete initialization of the cockpit system takes some time, a few use-cases exist
where information needs to be audible (or visible) right before the system is fully started.
Here we mainly have:
- system alerts
+ door open
+ seat belt missing
+ engine faults
- parking assistant warnings
+ rear view camera screen
+ beeps if distance goes below limit
Both routing- and control-side are extended to allow notifying about such connections
Signed-off-by: Martin Koch <martin.koch@ese.de>
Diffstat (limited to 'include/IAmRouting.h')
-rw-r--r-- | include/IAmRouting.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/IAmRouting.h b/include/IAmRouting.h index 1acaac6..28e8ac9 100644 --- a/include/IAmRouting.h +++ b/include/IAmRouting.h @@ -139,6 +139,34 @@ public: * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
*/
virtual am_Error_e deregisterDomain(const am_domainID_t domainID) =0;
+
+ /**
+ * Support announcement of audio connections already active at AM startup
+ *
+ * @param domainID: home domain announcing this early connection
+ * @param route: list of sub-connections (populated with unspecified connectionID=0 field)
+ * @param state: either stable CS_CONNECTED, CS_DISCONNECTED, CS_SUSPENDED
+ * or transient CS_CONNECTING, CS_DISCONNECTING
+ *
+ * @return success indicator as obtained from the controller
+ *
+ * @note If the connection is announced with one of the transient states
+ * CS_CONNECTING or CS_DISCONNECTING, a secondary registerEarlyConnection()
+ * call is expected once a stable state is reached
+ */
+ virtual am_Error_e registerEarlyConnection(am_domainID_t domainID, const std::vector< am_Connection_s > &route
+ , am_ConnectionState_e state) = 0;
+
+ /**
+ * Notify hand-over acknowledgment of connections surviving shutdown of the AM
+ *
+ * @param handle: composite identifier used in the request
+ * @param errorID: success indicator as obtained from the routing-side application,
+ * e.g. E_OK if the application assumes full responsibility,
+ * any meaningful error condition otherwise
+ */
+ virtual void ackTransferConnection(const am_Handle_s handle, const am_Error_e errorID) = 0;
+
/**
* registers a converter. @return E_OK on succes, E_ALREADY_EXISTENT if already
* registered E_UNKOWN on error
@@ -385,6 +413,25 @@ public: * or be ready again.
*/
virtual void setRoutingRundown(const uint16_t handle) =0;
+
+ /**
+ * Forward hand-over of a connection meant to survive AM shutdown
+ * in routing-side application
+ *
+ * @param handle: composite identifier used to map the response
+ * @param route: names of involved sources and sinks including intermediate gateways
+ * @param state: either stable CS_CONNECTED, CS_DISCONNECTED, CS_SUSPENDED
+ * or transient CS_CONNECTING, CS_DISCONNECTING
+ *
+ * @return success indicator as obtained from the plugins, e.g E_OK or E_COMMUNICATION
+ */
+ virtual am_Error_e asyncTransferConnection(const am_Handle_s handle
+ , const std::vector<std::pair<std::string, std::string>> &route
+ , am_ConnectionState_e state)
+ {
+ return E_NOT_POSSIBLE; // default response if not supported by the plugin
+ }
+
/**
* aborts an asynchronous action.
* @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not
|