From 066c3f7f16ef69e80376942e8d6b8c4944b8ed08 Mon Sep 17 00:00:00 2001 From: Martin Koch Date: Fri, 19 Jun 2020 16:01:19 +0200 Subject: 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 --- include/IAmRouting.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'include/IAmRouting.h') 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> &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 -- cgit v1.2.1 From 3270ab2427164fa41c3bcb4e2662ea625f926d84 Mon Sep 17 00:00:00 2001 From: Martin Koch Date: Thu, 25 Jun 2020 11:01:53 +0200 Subject: AM: add parameter domainID to asyncTransferConnection() Signed-off-by: Martin Koch --- include/IAmRouting.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include/IAmRouting.h') diff --git a/include/IAmRouting.h b/include/IAmRouting.h index 28e8ac9..c58c721 100644 --- a/include/IAmRouting.h +++ b/include/IAmRouting.h @@ -418,14 +418,15 @@ public: * 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 + * @param handle: composite identifier used to map the response + * @param domainID: target domain for this offering + * @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 + virtual am_Error_e asyncTransferConnection(const am_Handle_s handle, am_domainID_t domainID , const std::vector> &route , am_ConnectionState_e state) { -- cgit v1.2.1 From efe1f88f36383ab1f1ad657e14e4fd4885eaf55f Mon Sep 17 00:00:00 2001 From: Martin Koch Date: Fri, 26 Jun 2020 12:21:50 +0200 Subject: AM: change handling or registerEarlyConnection - use type am_Route_s for announcement from routing side - register also main connection internally - forward route details to controller Signed-off-by: Martin Koch --- include/IAmRouting.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/IAmRouting.h') diff --git a/include/IAmRouting.h b/include/IAmRouting.h index c58c721..b86e782 100644 --- a/include/IAmRouting.h +++ b/include/IAmRouting.h @@ -144,7 +144,7 @@ public: * 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 route: list of connection segments * @param state: either stable CS_CONNECTED, CS_DISCONNECTED, CS_SUSPENDED * or transient CS_CONNECTING, CS_DISCONNECTING * @@ -154,7 +154,7 @@ public: * 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 + virtual am_Error_e registerEarlyConnection(am_domainID_t domainID, const am_Route_s &route , am_ConnectionState_e state) = 0; /** -- cgit v1.2.1