Defines interfaces for freshness value management and error handling for secured communication channels.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 05efd4a1afb9ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Defines interfaces for freshness value management and error handling for secured communication channels.
The namespace defines the vendor-specific interface for managing freshness values within the scope of Secure Onboard Communication (SecOC) for AUTOSAR Adaptive Platform Communication Management (SWS Communication Management §C.1 “Header: apext/com/secoc/fvm.h”). The lifetime and initialization of the Freshness Value Manager are entirely controlled by Communication Management, which queries freshness values via the interface during configured transmission operations ([SWS_CM_11272]). If freshness values are temporarily unavailable, controlled retries occur up to a defined threshold before faulty messages are discarded. In addition, the namespace provides a dedicated error domain and standardized error codes for diagnostic and exception handling.
Context
The namespace apext::com::secoc defines normative Platform Extension Interfaces within the Communication Management (ara::com) functional cluster of the AUTOSAR Adaptive Platform (SWS Communication Management §C.1 “Header: apext/com/secoc/fvm.h”). The objective of these extension interfaces is to enable OEMs and stack vendors to provide a customized Freshness Value Manager (FVM) that generates, manages, and verifies the freshness values required to prevent replay attacks for Secure Onboard Communication (SecOC).
The namespace essentially interacts with three roles: Communication Management (ara::com), the standardized interface definition (FVM) including data carriers such as FVContainer ([SWS_CM_11286], [SWS_CM_11344]), and the concrete FVM implementation of the vehicle manufacturer or stack supplier. Interpretation: It is assumed that the vendor-specific FVM library is linked as a static or dynamic library as part of system integration, since the specification defines the functional interface but leaves the form of integration open in a stack-specific manner. Question Q-256aef3d6698cc3f (open)
The lifecycle management of an FVM implementation is controlled entirely by Communication Management ara::com ([SWS_CM_11272]). Applications and service instances do not create or manage the FVM component directly.
Startup takes place deterministically during the initialization of the communication stack by calling the library API apext::com::secoc::FVM::Initialize ([SWS_CM_11273]). If initialization cannot be properly completed on the vendor side, the FVM layer signals this error condition via the defined error code kFVInitializeFailed ([SWS_CM_11342]). After a successful initialization call, the Freshness Value Manager remains in the active operating state and answers synchronous requests for transmit and receive freshness values.
Usage Path
The regular usage path is divided into transmission protection and reception verification of messages:
Transmit messages: If a message is configured for SecOC transmission, it is treated as an authentic message ([SWS_CM_11274]). Protection takes place in a fixed sequence after completion of all E2E protection calculations ([SWS_CM_11274]). If the service interface configuration possesses an attribute freshnessValueId, Communication Management calls apext::com::secoc::FVM::GetTxFreshness ([SWS_CM_11274], [SWS_CM_11275]). The freshness value is provided in a FVContainer structure, which holds the bit length in the attribute length and the value itself ([SWS_CM_11286], [SWS_CM_11344]).
Transmit retry mechanism: For each secured message, the system maintains a Authentication Build Counter ([SWS_CM_11275]). After successful generation, the counter is reset to 0. If GetTxFreshness returns the recoverable error kFVNotAvailable or authenticator calculation fails, the counter is incremented and construction is retried ([SWS_CM_11275]). If the counter reaches the threshold SecOCAuthenticationBuildAttempts, the message is discarded ([SWS_CM_11275]).
Receive messages: For incoming SecOC messages with active verification (attribute securedRxVerification true or unset), the authenticator is extracted and the message is verified prior to E2E checks by recalculating the MAC ([SWS_CM_11276], SWS Communication Management §8.1 “SecOC secure channel reception”). If securedRxVerification is set to false, however, verification is bypassed and the message is processed unverified ([SWS_CM_11372]).
Sequence diagram: Call and retry flow when protecting a transmit message using FVM. Sources: [SWS_CM_11274], [SWS_CM_11275].
Error Scenarios
Error situations within the FVM interface are handled via the type-safe error domain ComSecOcFvmErrorDomain, whose instance can be retrieved via GetComSecOcFvmErrorDomain ([SWS_CM_12521]). The error codes are defined in the enumeration type ComSecOcFvmErrc ([SWS_CM_11342]):
kFVNotAvailable (code 1): The required freshness value is temporarily unavailable. This signals a recoverable error to Communication Management, which triggers retries according to the transmission protocol ([SWS_CM_11275], [SWS_CM_11342]).
kFVInitializeFailed (code 2): Initialization of the Freshness Value Manager failed ([SWS_CM_11342]).
Via the helper function MakeErrorCode ([SWS_CM_12522]), error codes can be encapsulated into regular ara::core::ErrorCode objects together with vendor-specific supplementary data (SupportDataType). For failed synchronous calls in exception-based environments, the exception class ComSecOcFvmException is available.
This guide is based on the specification AUTOSAR Adaptive Platform R25-11 (Communication Management). All statements rely exclusively on the specified specification and documentation references.
Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8b6808ee1e7cProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The non-member function GetComSecOcFvmErrorDomain serves to retrieve a reference to the error domain object of the Freshness Value Management (FVM) for SecOC according to [SWS_CM_12521]. The function is defined in the namespace apext::com::secoc and is to be included via the header file apext/com/secoc/fvm_error_domain.h (AUTOSAR_AP_SWS_CommunicationManagement §C.2.2.1.1 “GetComSecOcFvmErrorDomain”). It takes no parameters and synchronously returns a constant reference of type const ara::core::ErrorDomain & to the singleton object apext::com::secoc::ComSecOcFvmErrorDomain.
Error handling
The function is declared as noexcept and specified as completely exception safe [SWS_CM_12521]. No runtime errors occur during the call, and neither exceptions are thrown nor error codes are generated. Rather, the returned error domain serves developers as a reference to unambiguously match FVM-specific error codes within the error handling of SecOC.
Concurrency and Limitations
As a stateless constexpr function without side effects, calling it is expected to be unrestricted concurrent and reentrant. Question Q-16d96e7f64bca93f (open) According to the specification, there are no sequencing requirements or restrictions regarding the calling context [SWS_CM_12521].
Interaction
The definition is based on the requirements RS_AP_00120 and RS_AP_00130 [SWS_CM_12521]. While the specification primarily provides for the namespace apext::com::secoc, the specification ara::com::secoc::GetComSecOcFvmErrorDomain is also found elsewhere (AUTOSAR_AP_SWS_CommunicationManagement p. 598); this is likely an editorial variant within the context of the Adaptive extensions. Question Q-b49307e7cc69a94b (open)
This usage note was generated by an AI and is based on the specification status AUTOSAR Adaptive R25-11.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c91e64600342ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The function apext::com::secoc::MakeErrorCode is used to create an instance of ara::core::ErrorCode for the error domain of Freshness Value Management (SecOC) according to [SWS_CM_12522] (AUTOSAR_AP_SWS_CommunicationManagement §C.2.2.1.2 “MakeErrorCode”). The call is performed synchronously. As parameters, the function requires an error code errorCode of type apext::com::secoc::ComSecOcFvmErrc as well as vendor-specific additional data data of type ara::core::ErrorDomain::SupportDataType[SWS_CM_12522]. It returns the fully initialized ara::core::ErrorCode object [SWS_CM_12522].
Error Handling and Concurrency
The function is specified as noexcept and exception safe, so that the call is guaranteed not to throw any exceptions [SWS_CM_12522]. Specific runtime error messages such as DET or DEM are not defined for this construction function [SWS_CM_12522]. Due to the constexpr qualification, the generation of the error code when passing constant expressions is presumably already feasible at compile time. Question Q-a96337508ba6ecdd (open)
Interaction
The function is provided via the header apext/com/secoc/fvm_error_domain.h in namespace apext::com::secoc[SWS_CM_12522]. In its structure, it corresponds to related error code factories of Communication Management:
gemini-3.8-flash-low· 2026-10-13 · German original