DEENESPTFRRUARHIKOZHNL

service interface StateMachineService

Als ara::com-Dienst modellierte Schnittstelle; Methoden/Felder werden über generierte Proxies/Skeletons aufgerufen (Parameterrichtung IN/OUT).

User GuideAI-GENERATED

Enables control applications to request state changes for configured state machines.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e242ff13fc20 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Enables control applications to request state changes for configured state machines.

The service interface StateMachineService is provided by State Management for each configured state machine so that a SMControlApplication can specifically request state changes via the method RequestTransition [SWS_SM_00600], [SWS_SM_91107]. The service is offered immediately after successful execution of the start step of the state machine and acknowledges requests without fire-and-forget semantics. However, requests are rejected with specific errors if the passed value is invalid, the transition from the current state is not permitted, or an update or recovery session is active at the same time [SWS_SM_91107].

Role and system context of the service interface

The service interface StateMachineService is provided by the functional cluster State Management (SM) via a standardized service port [SWS_SM_91021]. According to the formal interface definition [SWS_SM_91022], State Management instantiates and offers this ara::com-based service for each individual configured instance of a StateMachine [SWS_SM_00600].

A SMControlApplication acts as the primary consumer of this interface, interacting directly with the state machine via the service to request state changes SWS StateManagement §9.2.2 “StateMachine service”. While notifications about entered states to regular adaptive applications are primarily provided via the separate service interface StateMachineNotification [SWS_SM_00665], StateMachineService constitutes the active control interface for initiating transitions.

Methods and Invocation Semantics

The interface defines the method RequestTransition, which must be called by the SMControlApplication to effect a state change in the referenced StateMachine [SWS_SM_91107]. The method expects the input parameter TransitionRequest of type TransitionRequestType, which represents the requested transition value within the underlying TransitionRequestTable [SWS_SM_91107], SWS StateManagement §7.x “TransitionRequestTable”.

For RequestTransition, the property Fire & Forget is set to false [SWS_SM_91107]. The calling application thus receives a binding acknowledgment of the request. Interpretation: Within the ara::com proxy-skeleton pattern, feedback is typically expected to be provided via a ara::core::Future or a corresponding result object that resolves on success or transmits a specific error status in case of an error. Question Q-41fa67738672c735 (open)

Lifecycle and State Dependencies

Every ara::com service configured for a StateMachine to be started—including StateMachineService—must be available and offered (Offer) as soon as the ActionListItem "StartStateMachine" has been executed successfully [SWS_SM_00618]. This allows the SMControlApplication to request a transition immediately after successful creation of the state machine, even if the state machine is still processing the initial ActionList at this point in time SWS StateManagement §7.x “StateMachine service interfaces - Offer”.

Offering the service is stopped (StopOffer) as soon as processing to stop the respective state machine takes place [SWS_SM_00619]. Invocations are additionally subject to functional preconditions: If an update session is currently running in the system, initiating state changes is prohibited in principle [SWS_SM_91107].

Error handling and Application Errors

During the execution of RequestTransition, specific Application Errors can occur, which are reported back to the caller by State Management [SWS_SM_91107]:

  • kInvalidValue: The passed value is not assigned to any transition in the TransitionRequestTable [SWS_SM_91107].
  • kTransitionNotAllowed: The requested state transition is not allowed starting from the current state of the StateMachine [SWS_SM_91107].
  • kRecoveryTransitionOngoing: The request is discarded because recovery is currently being executed [SWS_SM_91107].
  • kTransitionFailed: An error occurred during the execution of the transition to the target state [SWS_SM_91107].
  • kOperationCanceled: The request was aborted because it was superseded by a newer request [SWS_SM_91107].
  • kUpdateInProgress: The operation is forbidden because an update session is currently active [SWS_SM_91107].
Sequence of a transition request via StateMachineServiceSMControlApplicationStateMachineServiceState ManagementUse Case: Service-BereitstellungStartStateMachine verarbeitet: OfferService()Use Case: Request state transitionRequestTransition(TransitionRequest)Zustandswechsel verarbeitenaltSuccessful transitionExecute transition according to TransitionRequestTableErfolgFeedback: SuccessFehlerfall (z. B. kTransitionNotAllowed, kUpdateInProgress)Application ErrorFeedback with error code

Sequence diagram: Sequence of a transition request via StateMachineService with offering, success acknowledgment, and error handling. Sources: [SWS_SM_91107], [SWS_SM_00618], SWS StateManagement §7.x “StateMachine service interfaces - Offer”.

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

Mitglieder

Methods

RequestTransition service method

Has to be called by a SMControlApplication to request a change in the referenced StateMachine.

RequestTransition (IN TransitionRequestType TransitionRequest)

Data types

Application errors

kInvalidValue application error

The provided value is not mapped to any transition.

kOperationCanceled application error

The request was replaced by a newer one and therefore it was cancelled

kRecoveryTransitionOngoing application error

Request will not be carried out, because currently recovery is ongoing.

kTransitionFailed application error

During transition to the requested state an error occurred.

kTransitionNotAllowed application error

Requested transition is not possible from current StateMachine state.

kUpdateInProgress application error

Requested operation is not allowed as update session is in progress.

Documentation

service method RequestTransition [SWS_SM_91107] Upstream: RS_SM_00001, RS_SM_00004

RequestTransition (IN TransitionRequestType TransitionRequest)

Has to be called by a SMControlApplication to request a change in the referenced StateMachine.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e769039e5880 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The service method RequestTransition is called by a SMControlApplication on the interface StateMachineService to request a state change of a referenced StateMachine ([SWS_SM_91107], SWS StateManagement §7.7 “SMControlApplication”). TransitionRequest is passed as a parameter. The method has return values and does not operate according to the fire-and-forget principle. State Management maps the input value via the TransitionRequestTable to a subsequent state depending on the current state ([SWS_SM_00607]) and requests the resulting Function Group States from Execution Management via SetState() (AP EXP SWArchitecture §11.1 “Change System State”).

Error handling

In case of an error, processing is aborted and RequestTransition returns specific application errors ([SWS_SM_91107]):

  • kInvalidValue: The passed value for TransitionRequest is not configured in the TransitionRequestTable ([SWS_SM_00604]).
  • kTransitionNotAllowed: Starting from the current state of the StateMachine, the transition is not permitted according to the configuration ([SWS_SM_00603]).
  • kRecoveryTransitionOngoing: An internal error cleanup is active, which is why the request is not processed further ([SWS_SM_00605]).
  • kUpdateInProgress: The state change is not permitted during an active update session ([SWS_SM_91107]).
  • kTransitionFailed: An error occurred during the processing of ActionListItems ([SWS_SM_00650]).

Concurrency and Limitations

If a new transition request is accepted while an earlier RequestTransition call is still pending for the same StateMachine, the previous request is cancelled and acknowledged with kOperationCanceled ([SWS_SM_00606]). Time-triggered actions such as Sleep ActionListItem do not block incoming triggers; a RequestTransition call can therefore trigger a state change even during such a waiting time (SWS StateManagement §7.7.9 “ActionListItem Sleep”).

This usage note was generated automatically and is based exclusively on the specifications of AUTOSAR R25-11.

Implementer's Guide to follow (complexity I2)

Scopeservice interface StateMachineService
Fire & Forgetfalse
Version1.0

Parameter

NameRichtungTypBeschreibung
TransitionRequestINTransitionRequestTypeRepresents the value to be used as TransitionRequest value in the Transition RequestTable.

Application Errors

FehlerBeschreibung
kInvalidValueThe provided value is not mapped to any transition.
kTransitionNotAllowedRequested transition is not possible from current StateMachine state.
kRecoveryTransitionOngoingRequest will not be carried out, because currently recovery is ongoing.
kTransitionFailedDuring transition to the requested state an error occurred.
kOperationCanceledThe request was replaced by a newer one and therefore it was cancelled
kUpdateInProgressRequested operation is not allowed as update session is in progress.

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

Record
AUTOSAR/AP/record/SWS_SM_91107
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_SM_91107@rel:R25-11#a5b9b5c3
Content hash
a5b9b5c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_StateManagement.pdf#nameddest=SWS_SM_91107
Status: valid/unmigrated Version: rel:R25-11#d4767b6b Versionshistorie & Revisions (1 transition, 3 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_SM_91107@rel:R25-11#d4767b6b
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a5b9b5c32026-09-30
  • R24-11rel:R24-11#75ea2a2c2026-10-14
  • R25-11rel:R25-11#d4767b6b2026-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