Enables service skeletons to send trigger signals and monitor the subscriber status.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6e97d3082affProvenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables service skeletons to send trigger signals and monitor the subscriber status.
Class <SI-Namespace>::skeleton::triggers::<Trigger> enables a server application to send trigger signals to subscribing clients via Communication Management ([SWS_CM_00721]). For flow control, subscriber statuses can be monitored and notification handlers registered ([SWS_CM_01109], [SWS_CM_01110]). Triggering via Send() requires an offered service skeleton and acknowledges violations of minimum sending intervals or network errors with corresponding error codes ([SWS_CM_00721], [SWS_CM_10517]).
Context
Template class <SI-Namespace>::skeleton::triggers::<Trigger> represents the server-side interface of a trigger defined within a ServiceInterface in the role trigger. As a component of the service skeleton, this class serves a service instance to send asynchronous notifications or trigger signals to subscribing client applications across the overall system. A trigger differs from regular events in that it functions primarily as a pure signaling event without complex payload data, as outlined in EXP_ARAComAPI §3 “Trigger::Send” and SWS_CommunicationManagement §7.2.2.1.4 “Handling Triggers”. The interaction partners include the providing server application, the Communication Management middleware (ara::com), as well as subscriber clients connected via the network.
Lifecycle
Instantiation of trigger objects typically occurs as an integral part of the skeleton instance of the respective ServiceInterface. Prior to active use, the skeleton must be offered via Communication Management; if an attempt is made to trigger beforehand, the transmission fails ([SWS_CM_00721]). The class manages the subscription state of subscribers via ara::com::SubscriptionState, which can be queried at any time using GetSubscriptionState() ([SWS_CM_01109]). For asynchronous state monitoring, a callback can be registered via SetSubscriptionStateChangeHandler() ([SWS_CM_01110]). For concurrent architectures, an overload exists that accepts a custom executor so that notifications are executed in the desired thread or task context ([SWS_CM_01111]). The registration can be canceled via UnsetSubscriptionStateChangeHandler() ([SWS_CM_01112]). All methods of the class provide the exception guarantee noexcept (exception safe).
Usage Path
The typical sequence for using a trigger involves monitoring the subscription status as well as the actual initiation of the transmission to all active subscribers:
Handler registration: The service application optionally registers a state handler via SetSubscriptionStateChangeHandler() ([SWS_CM_01110], [SWS_CM_01111]) to be notified of newly joining subscribers.
State check: Using GetSubscriptionState(), the server checks whether at least one active subscriber is present ([SWS_CM_01109]), which constitutes the prerequisite for the send request according to [SWS_CM_10518].
Sending the trigger: Sending is initiated by invoking Send() ([SWS_CM_00721], EXP_ARAComAPI §3 “Trigger::Send”), whereupon Communication Management distributes the signal to all subscribed applications.
Deregistration: During shutdown or when state notifications are no longer desired, UnsetSubscriptionStateChangeHandler() is invoked ([SWS_CM_01112]).
Method Send() returns a ara::core::Result<void>, through which potential transmission and configuration errors are conveyed ([SWS_CM_00721]):
ComErrc::kServiceNotOffered: Occurs if the service instance has not yet been offered via OfferService() ([SWS_CM_00721]).
ComErrc::kMinimumSendIntervalViolationError: Returned if a configured minimum sending interval (minimumSendInterval) between consecutive transmissions has been undercut ([SWS_CM_00721]).
ComErrc::kCommunicationFailure: Reported if sending the trigger fails locally due to an underlying network error ([SWS_CM_10517]).
Invalid handler (InvalidHandlerViolation): Passing a non-existent or empty callable to SetSubscriptionStateChangeHandler() violates API contract conditions ([SWS_CM_01110], [SWS_CM_01111]).
This guide is based exclusively on the AUTOSAR Adaptive Platform Release R25-11 specifications.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a3259c7728c6ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The method Send transmits a trigger without payload to all subscribing applications ([SWS_CM_00721]). It belongs to the skeleton class <SI-Namespace>::skeleton::triggers::<Trigger> and is provided via the header file #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h" ([SWS_CM_00721]).
The function is defined as noexcept, considered exception-safe, and expects no input parameters ([SWS_CM_00721]). ara::core::Result<void> serves as the return type ([SWS_CM_00721]):
Success case: The result contains an empty value (void) and signals the successful triggering of the transmission ([SWS_CM_00721]).
Error case: The result encapsulates an error code from the domain ara::com::ComErrc ([SWS_CM_10432]). Possible errors with rollback semantics are:
ComErrc::kServiceNotOffered: The service has not yet been previously offered via OfferService() ([SWS_CM_00721]).
ComErrc::kMinimumSendIntervalViolationError: A transmission request occurred before the configured minimum send interval ServiceInterfaceDeploymentElement.minimumSendInterval elapsed ([SWS_CM_00721]).
• If successful: an ara::core::Result containing a ara:: core::Result::value_type containing a void • If unsuccessful: an ara::core::Result containing an ara:: core::Result::error_type i.e. a corresponding ara:: com::ComErrc
Fehler
Fehlercode
Beschreibung
ComErrc::kServiceNotOffered
rollback_semantics Service has not yet been offered via OfferService()
ComErrc::kMinimumSendIntervalViolationError
rollback_semantics Minimum Send Interval violation, because a transmission request for a service instance element (event, field or method call) was issued faster than allowed, i.e., the configured minimum send interval ServiceInterfaceDeploymentElement. minimumSendInterval for the service instance element has not yet expired.
Request a governed re-review of this record. The record is not changed immediately.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d968f8357edfProvenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The function SetSubscriptionStateChangeHandler serves on the skeleton side to register a callback function for monitoring subscription changes on a trigger [SWS_CM_01110]. The method belongs to namespace <SI-Namespace>::skeleton::triggers::<Trigger> and is provided via header file <SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h[SWS_CM_01110].
A callable function object of type SubscriptionStateChangeHandler is passed as parameter [SWS_CM_00311][SWS_CM_01110]. The call is declared as noexcept, returns no return value, and is specified as exception-safe (exception safe) [SWS_CM_01110]. If the passed handler callable does not exist or is null, the system reports a InvalidHandlerViolation[SWS_CM_01110].
Communication Management calls the registered callback function as soon as the subscription status of the trigger changes [SWS_CM_01101]:
with the status value kSubscribed as soon as the number of active subscriptions for this trigger becomes greater than 0 [SWS_CM_01102],
with the status value kNotSubscribed on the skeleton side when no active subscriptions exist anymore [SWS_CM_01103].
The registered handler may be overwritten at runtime [SWS_CM_01101]. If execution of the handler is to take place in a defined execution context, the overloaded template variant with a ExecutorT&& parameter is alternatively available [SWS_CM_01111].
This text was generated by an AI based on the AUTOSAR specification R25-11.
class <SI-Namespace>::skeleton:: triggers::<Trigger>
Exception-Sicherheit
exception safe
Verletzungen (Violations)
InvalidHandlerVio- Provided Callable handler does not exist or is null lation
Parameter (in)
Parameter
Beschreibung
handler
The handler (as per [SWS_CM_00311]) that shall be called by Communication Management as soon as the ara::com:: SubscriptionState of the trigger has changed.
Rückgabewert
Typ
Beschreibung
None
Request a governed re-review of this record. The record is not changed immediately.
As per [SWS_CM_12008] but the method shall execute in a provided context
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f69a35ebe8e5ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The template function SetSubscriptionStateChangeHandler registers a callback handler for changes in subscription state (ara::com::SubscriptionState) at the skeleton level for triggers ([SWS_CM_01111]). In addition to the callable parameter handler, the method takes an execution context executor of type ExecutorT ([SWS_CM_01111]). The function has no return value and is defined in scope <SI-Namespace>::skeleton::triggers::<Trigger> ([SWS_CM_01111]).
In contrast to the basic function without executor ([SWS_CM_01110]), this signature ensures that the callback is executed in a user-defined context ([SWS_CM_01111]). As with the event-based variant according to [SWS_CM_12008], execution is presumably delegated to the passed executor object to specifically control threading within the skeleton application. Question Q-ba14993b00a7d972 (open)
The interface is specified as noexcept and exception safe ([SWS_CM_01111]). If the passed callable is invalid or null, according to the specification a InvalidHandlerViolation is present ([SWS_CM_01111]).
Functionally, the method corresponds to the analogous executor overloads for skeleton events ([SWS_CM_12009]) as well as the client-side counterparts of the proxy interface ([SWS_CM_01106], [SWS_CM_11354]).
This usage note was generated automatically based on the specification data of AUTOSAR Adaptive R25-11.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d6281d4aa1edProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The function UnsetSubscriptionStateChangeHandler is used on the skeleton side to remove a previously registered callback for changes of the subscription state (SubscriptionState) on a service trigger ([SWS_CM_01112]). It is defined in namespace <SI-Namespace>::skeleton::triggers::<Trigger> via header <SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h ([SWS_CM_01112]).
Usage and semantics: The interface has the signature void UnsetSubscriptionStateChangeHandler() noexcept, expects no parameters, and has no return value ([SWS_CM_01112]). According to the specification, it is classified as exception safe (exception safe) ([SWS_CM_01112]). Error codes or specific reporting mechanisms (DET/DEM) are not provided for this call.
gemini-3.8-flash-low· 2026-10-13 · German original