DEENESPTFRRUARHIKOZHNL

namespace apext::com::secoc

User GuideAI-GENERATED

Defines interfaces for freshness value management and error handling for secured communication channels.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 05efd4a1afb9 Provenance Open 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)

SecOcKontext AraCom Communication Management (ara::com) SecOcExt Platform Extension Interface (apext::com::secoc) AraCom->SecOcExt verwaltet Lebenszyklus ruft FVM::Initialize AraCom->SecOcExt fragt Frische ab (FVM::GetTxFreshness) FvmImpl OEM / Stack-Vendor FVM-Implementierung FvmImpl->SecOcExt implementiert FVM-Interface

Context diagram: Integration of the namespace apext::com::secoc between Communication Management and vendor-specific FVM implementation. Sources: [SWS_CM_11272], SWS Communication Management §C.1 “Header: apext/com/secoc/fvm.h”.

Lifecycle

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]).
Message protection sequence during transmissionCommunication Management (ara::com)FVM (apext::com::secoc)Use Case: E2E protection and preparationComplete E2E calculationAuthentic Message bereitstellenUse Case: Frischewert-AbfrageGetTxFreshness(freshnessValueId, ...)altErfolgReturn FVContainer with freshness valueAuthenticator berechnenSecOC-Nachricht versendenAuthentication Build Counter = 0kFVNotAvailableFehler kFVNotAvailable meldenAuthentication Build Counter inkrementierenWiederholversuch bis Schwellwert

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.

Topic map

Class diagram

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.

G cluster_ns apext::com::secoc napext__com__secoc__ComSecOcFvmErrorDomain ComSecOcFvmErrorDomain next_ara__core__ErrorDomain ara::core::ErrorDomain napext__com__secoc__ComSecOcFvmErrorDomain->next_ara__core__ErrorDomain napext__com__secoc__ComSecOcFvmException ComSecOcFvmException next_ara__core__Exception ara::core::Exception napext__com__secoc__ComSecOcFvmException->next_ara__core__Exception napext__com__secoc__FVContainer «struct» FVContainer napext__com__secoc__FVM FVM

Detail view

Select an entry in the outline.

Classes

Defines a class representing the SecOc Freshness Value Manager error domain

inherits from ara::core::ErrorDomain

Defines a class for exceptions to be thrown by the SecOc Freshness Value Manager

inherits from ara::core::Exception

A container to hold the length of freshness value in bits and the freshness value itself

FVM class

A freshness value management interface to be implemented by the OEM/stack vendor

Functions

Returns a reference to the apext::com::secoc::ComSecOcFvmErrorDomain object

constexpr const ara::core::ErrorDomain & GetComSecOcFvmErrorDomain () noexcept;
MakeErrorCode function

Creates an instance of ara::core::ErrorCode

constexpr ara::core::ErrorCode MakeErrorCode (apext::com::secoc::Com SecOcFvmErrc errorCode, ara::core::ErrorDomain::SupportDataType data) noexcept;

Types and constants

ComSecOcFvmErrc enumeration

Defines the error codes for the apext::com::secoc::ComSecOcFvmErrorDomain

enum class ComSecOcFvmErrc : ara::core::ErrorDomain::CodeType {...};

Enumerations

enumeration ComSecOcFvmErrc [SWS_CM_11342] Upstream: RS_AP_00130

enum class ComSecOcFvmErrc :          ara::core::ErrorDomain::CodeType {...};

Defines the error codes for the apext::com::secoc::ComSecOcFvmErrorDomain

Header-Datei#include "apext/com/secoc/fvm_error_domain.h"
Forwarding-Header#include "apext/com/com_fwd.h"
Scopenamespace apext::com::secoc
SymbolComSecOcFvmErrc
Basistypara::core::ErrorDomain::CodeType

Werte

EnumeratorBeschreibung
kFVNotAvailable=1 Freshness Value not available
kFVInitializeFailed=2 Initialization of Freshness Value Manager failed

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

Record
AUTOSAR/AP/record/SWS_CM_11342
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11342@rel:R25-11#50596d25
Content hash
50596d25
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11342
Status: valid/unmigrated Version: rel:R25-11#7146e1f4 Versionshistorie & Revisions (1 transition, 7 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_11342@rel:R25-11#7146e1f4
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#50596d252026-09-30
  • R20-11rel:R20-11#9e1f02d92026-10-14
  • R21-11rel:R21-11#9e1f02d92026-10-14
  • R22-11rel:R22-11#e70607272026-10-14
  • R23-11rel:R23-11#0578ae272026-10-14
  • R24-11rel:R24-11#0c1f38782026-10-14
  • R25-11rel:R25-11#7146e1f42026-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

Documentation of free functions

function GetComSecOcFvmErrorDomain [SWS_CM_12521] Upstream: RS_AP_00120, RS_AP_00130

constexpr const ara::core::ErrorDomain & GetComSecOcFvmErrorDomain () noexcept;

Returns a reference to the apext::com::secoc::ComSecOcFvmErrorDomain object

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

Implementer's Guide to follow (complexity I1)

Header-Datei#include "apext/com/secoc/fvm_error_domain.h"
Scopenamespace apext::com::secoc
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
const ara::core::ErrorDomain &Reference to the apext::com::secoc:: ComSecOcFvmErrorDomain object

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

Record
AUTOSAR/AP/record/SWS_CM_12521
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12521@rel:R25-11#61e04edc
Content hash
61e04edc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12521
Status: valid/unmigrated Version: rel:R25-11#8e770345 Versionshistorie & Revisions (1 transition, 5 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_12521@rel:R25-11#8e770345
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#61e04edc2026-09-30
  • R22-11rel:R22-11#149eb8902026-10-14
  • R23-11rel:R23-11#2dfcc3f12026-10-14
  • R24-11rel:R24-11#40d4bc762026-10-14
  • R25-11rel:R25-11#8e7703452026-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 MakeErrorCode [SWS_CM_12522] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130

constexpr ara::core::ErrorCode MakeErrorCode (apext::com::secoc::Com SecOcFvmErrc errorCode, ara::core::ErrorDomain::SupportDataType data) noexcept;

Creates an instance of ara::core::ErrorCode

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

Automatically generated usage note based on the AUTOSAR specification R25-11.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "apext/com/secoc/fvm_error_domain.h"
Scopenamespace apext::com::secoc
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
errorCodeError code number.
dataVendor defined data associated with the error

Rückgabewert

TypBeschreibung
ara::core::ErrorCodeAn ara::core::ErrorCode object.

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

Record
AUTOSAR/AP/record/SWS_CM_12522
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12522@rel:R25-11#208bfd1b
Content hash
208bfd1b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12522
Status: valid/unmigrated Version: rel:R25-11#12f48f61 Versionshistorie & Revisions (1 transition, 5 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_12522@rel:R25-11#12f48f61
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#208bfd1b2026-09-30
  • R22-11rel:R22-11#fd00e04d2026-10-14
  • R23-11rel:R23-11#5a8150df2026-10-14
  • R24-11rel:R24-11#2565df5c2026-10-14
  • R25-11rel:R25-11#12f48f612026-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