DEENESPTFRRUARHIKOZHNL

class <SI-Namespace>::skeleton::triggers::<Trigger>

[SWS_CM_00726] Upstream: RS_CM_00201, RS_AP_00114

class <Trigger> {...};

Service skeleton Trigger class, one for each Trigger defined in the ServiceInterface in the role trigger.

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h"
Forwarding-Header#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton/<SiShortname>_skeleton_fwd.h"
Scopenamespace <SI-Namespace>::skeleton::triggers

User GuideAI-GENERATED

Enables service skeletons to send trigger signals and monitor the subscriber status.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6e97d3082aff Provenance
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]).
Sequence of trigger signaling at the service skeletonServer-AppTrigger-Instanzara::comSetSubscriptionStateChangeHandler(handler)voidUse Case: Subscription change by clienthandler(kSubscribed)GetSubscriptionState()kSubscribedUse Case: Trigger sendenSend()Sende Trigger-SignalResult<void>

Sequence diagram: Typical sequence of trigger transmission with subscription monitoring. Sources: [SWS_CM_01110], [SWS_CM_01109], [SWS_CM_00721], SWS_CommunicationManagement §7.2.2.1.4.

Error Scenarios

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.

Member map

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G n_SI_Namespace___skeleton__triggers___Trigger_907 <Trigger> + Send() + SetSubscriptionStateChangeHandler() + GetSubscriptionState() + UnsetSubscriptionStateChangeHandler()

Detail view

Select an entry in the outline.

Methods

Query ara::com::SubscriptionState of an trigger.

ara::com::SubscriptionState GetSubscriptionState () const noexcept;
Send function

Send trigger to all subscribing applications.

ara::core::Result< void > Send () noexcept;

Set/Register ara::com::SubscriptionState change handler

Overloads SetSubscriptionStateChangeHandler 2
void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler) noexcept; SWS_CM_01110
template <typename ExecutorT> void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler, ExecutorT &&executor) noexcept; SWS_CM_01111

Unset/Deregister the ara::com::SubscriptionState change handler

void UnsetSubscriptionStateChangeHandler () noexcept;

Method documentation

function GetSubscriptionState [SWS_CM_01109] Upstream: RS_CM_00106

ara::com::SubscriptionState GetSubscriptionState () const noexcept;

Query ara::com::SubscriptionState of an trigger.

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h"
Scopeclass <SI-Namespace>::skeleton:: triggers::<Trigger>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
ara::com::SubscriptionStateThe state of the subscription (as per [SWS_CM_12008]).

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_01109
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_01109@rel:R25-11#3c94b170
Content hash
3c94b170
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_01109
Status: valid/unmigrated Version: rel:R25-11#3c94b170 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_01109@rel:R25-11#3c94b170
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Send [SWS_CM_00721] Upstream: RS_CM_00201, RS_AP_00114, RS_AP_00121

ara::core::Result< void > Send () noexcept;

Send trigger to all subscribing applications.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a3259c7728c6 Provenance Open 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]).

Regarding concurrency and reentrancy, the sources remain silent; concurrent calls on the same instance presumably must be synchronized on the application side. Question Q-ff3beeb7bad5dd32 (open) In contrast to event-based data transmission via Event::Send ([SWS_CM_00162], [SWS_CM_90437], AUTOSAR_AP_EXP_ARAComAPI p. 10) or field updates via Update ([SWS_CM_00119]), Trigger::Send transmits no payload according to [SWS_CM_00721] (AUTOSAR_AP_EXP_ARAComAPI p. 10), but serves purely as a trigger pulse.

This text was generated by an AI based on the AUTOSAR R25-11 specification.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h"
Scopeclass <SI-Namespace>::skeleton:: triggers::<Trigger>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >• 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

FehlercodeBeschreibung
ComErrc::kServiceNotOfferedrollback_semantics Service has not yet been offered via OfferService()
ComErrc::kMinimumSendIntervalViolationErrorrollback_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.

Record
AUTOSAR/AP/record/SWS_CM_00721
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00721@rel:R25-11#3ca0ef03
Content hash
3ca0ef03
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00721
Status: valid/unmigrated Version: rel:R25-11#358a03ec Versionshistorie & Revisions (1 transition, 6 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_00721@rel:R25-11#358a03ec
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#3ca0ef032026-09-30
  • R21-11rel:R21-11#28e321132026-10-14
  • R22-11rel:R22-11#9e3dfc132026-10-14
  • R23-11rel:R23-11#11d16c2d2026-10-14
  • R24-11rel:R24-11#7198da332026-10-14
  • R25-11rel:R25-11#358a03ec2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function SetSubscriptionStateChangeHandler [SWS_CM_01110] Upstream: RS_CM_00106

void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler) noexcept;

Set/Register ara::com::SubscriptionState change handler

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d968f8357edf Provenance
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.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h"
Scopeclass <SI-Namespace>::skeleton:: triggers::<Trigger>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Parameter (in)

ParameterBeschreibung
handlerThe 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

TypBeschreibung
None

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_01110
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_01110@rel:R25-11#c6e0fca1
Content hash
c6e0fca1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_01110
Status: valid/unmigrated Version: rel:R25-11#c6e0fca1 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_01110@rel:R25-11#c6e0fca1
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function SetSubscriptionStateChangeHandler [SWS_CM_01111] Upstream: RS_CM_00106

template <typename ExecutorT> void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler, ExecutorT &&executor) noexcept;

As per [SWS_CM_12008] but the method shall execute in a provided context

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f69a35ebe8e5 Provenance Open 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.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h"
Scopeclass <SI-Namespace>::skeleton:: triggers::<Trigger>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Template-Parameter

ParameterBeschreibung
ExecutorTAs per [SWS_CM_11360]

Parameter (in)

ParameterBeschreibung
handlerAs per [SWS_CM_12008]
executorAs per [SWS_CM_11360]

Rückgabewert

TypBeschreibung
None

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_01111
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_01111@rel:R25-11#fc3a9545
Content hash
fc3a9545
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_01111
Status: valid/unmigrated Version: rel:R25-11#fc3a9545 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_01111@rel:R25-11#fc3a9545
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function UnsetSubscriptionStateChangeHandler [SWS_CM_01112] Upstream: RS_CM_00106

void UnsetSubscriptionStateChangeHandler () noexcept;

Unset/Deregister the ara::com::SubscriptionState change handler

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d6281d4aa1ed Provenance Open 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.

Interaction and lifecycle: The callback removed via [SWS_CM_01112] is called by Communication Management as soon as the subscription state of the respective trigger changes ([SWS_CM_01101], AUTOSAR_AP_SWS_CommunicationManagement §7.5.15 “Query Service Trigger Subscription State on Skeleton side”). This happens, for example, with the state kSubscribed when the number of active subscriptions becomes greater than zero ([SWS_CM_01102]), or with kNotSubscribed ([SWS_CM_01103]). The handler may be overwritten at runtime ([SWS_CM_01101]); calling UnsetSubscriptionStateChangeHandler cancels the registration again.

Concurrency and related interfaces: Regarding concurrency, the deregistration should take place synchronously, so that after the function call returns, no further state notifications are delivered to the previously registered handler. Question Q-e005c4818e02e52f (open) Analogous deregistration functions are specified on the skeleton side for events ([SWS_CM_12010]) as well as on the proxy side for events ([SWS_CM_00334]), triggers ([SWS_CM_01108]), and fields ([SWS_CM_11609], AUTOSAR_AP_EXP_ARAComAPI §5.3.1 “Proxy Class API’s”).

This usage note was generated automatically based on the AUTOSAR R25-11 specification.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h"
Scopeclass <SI-Namespace>::skeleton:: triggers::<Trigger>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
None

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_01112
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_01112@rel:R25-11#19334e8a
Content hash
19334e8a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_01112
Status: valid/unmigrated Version: rel:R25-11#19334e8a Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_01112@rel:R25-11#19334e8a
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill