DEENESPTFRRUARHIKOZHNL

namespace ara::nm

Diese Seite wurde vollständig KI-generiert auf Basis von SWS NetworkManagement (R25-11) — kein offizieller AUTOSAR-Text und keine automatisch extrahierte API-Seite wie die übrigen Module. Als Interpretation gekennzeichnete Aussagen sind Schlussfolgerungen aus den Quellen.

User GuideAI-GENERATED

Enables control of the requested and effective network state as well as standardized error handling.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 602561c10e10 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Enables control of the requested and effective network state as well as standardized error handling.

With NetworkHandle, the namespace ara::nm provides interfaces for controlled access to the requested and effective network status of the AUTOSAR Adaptive Platform. Possible error situations during operation are mapped via the standardized error codes of the enumeration NmErrc, such as kServiceNotAvailable or kInvalidHandler [SWS_ANM_01111]. For structured error handling, MakeErrorCode creates error codes thread-safely for the error domain NmErrorDomain, which is referenced via GetNmDomain [SWS_ANM_01109]. Applications must consider the reachability of the Network Management service before calls in order to avoid failures during status queries.

Context

On the AUTOSAR Adaptive Platform, the namespace ara::nm provides the core interfaces for functional Network Management. The primary functional interface is formed by the class NetworkHandle, which encapsulates controlled access to both the requested and the effective network status. Via this abstraction mechanism, functional applications and platform services can monitor the current operating state of the underlying communication network and initiate status changes.

For consistent and robust error handling, ara::nm provides standardized types and utility functions that are integrated into the error architecture of AUTOSAR Adaptive. These include the error domain NmErrorDomain, the exception class NmException, and the domain-specific enumeration NmErrc [SWS_ANM_01111]. In addition, the thread-safe functions GetNmDomain [SWS_ANM_01109] and MakeErrorCode [SWS_ANM_01110] are available, which ensure instantiation-compliant and type-compliant handling of error states.

diag_nm_kontext Anwendung Anwendung NetworkHandle NetworkHandle Anwendung->NetworkHandle uses NmErrorDomain NmErrorDomain Anwendung->NmErrorDomain checks NmException NmException Anwendung->NmException catches NetworkHandle->NmErrorDomain references

Context diagram: Interaction of application, NetworkHandle, and error architecture in ara::nm. Sources: [SWS_ANM_01109], [SWS_ANM_01110], [SWS_ANM_01111].

Usage Path

In a typical application scenario, an Adaptive Application interacts with the namespace ara::nm to control the state of the network and react to runtime events. The interaction sequence is divided into the following steps:

  • Initiate status access: The application uses a NetworkHandle to query the requested or currently effective network status.
  • Error detection: If the network request cannot be serviced properly, the interface signals a corresponding error event. Interpretation: In the event of outages of the underlying network services, NetworkHandle is likely to generate error codes internally based on NmErrc. Question Q-97b1567be5e28121 (open)
  • Create error code: The utility function MakeErrorCode [SWS_ANM_01110] accepts a value from NmErrc [SWS_ANM_01111] as well as application-specific supplementary data (ara::core::ErrorDomain::SupportDataType) and generates a full ara::core::ErrorCode from it. The function is specified as constexpr and noexcept and guarantees complete thread safety [SWS_ANM_01110].
  • Verify error domain: The calling component can retrieve a thread-safe reference to the global NmErrorDomain via GetNmDomain [SWS_ANM_01109] to check the error domain of the returned code and resolve domain-specific error descriptions.
Network state interaction sequence and error handlingApplicationNetworkHandleNmErrorDomainNetzstatus anfordernaltService not availableMakeErrorCode(NmErrc::kServiceNotAvailable, ...)[SWS_ANM_01110]ara::core::ErrorCodeReturn error code [SWS_ANM_01111]GetNmDomain() for validation [SWS_ANM_01109]const ara::core::ErrorDomain&NormalbetriebEffektiven Netzstatus liefern

Sequence diagram: Sequence of network status query and error resolution via ara::nm. Sources: [SWS_ANM_01109], [SWS_ANM_01110], [SWS_ANM_01111].

Error Scenarios

The module's standardized error codes are bundled in the enumeration NmErrc, which is based on ara::core::ErrorDomain::CodeType [SWS_ANM_01111]. The module distinguishes between the following error cases:

  • NmErrc::kServiceNotAvailable (Code 1): This error indicates that the service required for network management is not reachable or operational at runtime [SWS_ANM_01111]. In this case, callers must react with retries or fallback strategies.
  • NmErrc::kInvalidHandler (Code 2): Occurs when an invalid or unregistered handler was passed or referenced during an operation [SWS_ANM_01111]. This usually indicates a configuration or initialization error in the caller.

Preconditions for robust calls are an initialized service infrastructure as well as valid parameters when accessing NetworkHandle in order to avoid NmErrc::kServiceNotAvailable or NmErrc::kInvalidHandler [SWS_ANM_01111]. None of the core error handling functions such as MakeErrorCode [SWS_ANM_01110] and GetNmDomain [SWS_ANM_01109] throw exceptions themselves (noexcept). Interpretation: For applications that prefer an exception-based control structure, the exception class NmException is likely to act as a carrier to propagate error states in a structured manner through the call stack. Question Q-67a17c37021e8beb (open)

This guide was created by an AI based on the specification of AUTOSAR Adaptive (Release R25-11).

Topic map

Detail view

Select an entry in the outline.

Classes

Zugang zu angefordertem und effektivem Netzstatus.

Fehlerdomäne für ara::nm.

Exception-Typ für ara::nm.

Functions

GetNmDomain function
constexpr const ara::core::ErrorDomain& GetNmDomain() noexcept;
MakeErrorCode function
constexpr ara::core::ErrorCode MakeErrorCode(NmErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept;

Types and constants

NmErrc enumeration
enum class NmErrc : ara::core::ErrorDomain::CodeType { kServiceNotAvailable = 1, kInvalidHandler = 2 };

Enumerations

enumeration NmErrc [SWS_ANM_01111]

enum class NmErrc : ara::core::ErrorDomain::CodeType { kServiceNotAvailable = 1, kInvalidHandler = 2 };
Headerara/nm/nm_error_domain.h
Upstream-AnforderungRS_AP_00122, RS_AP_00125, RS_AP_00127, RS_AP_00149

Standardisierte Network-Management-Fehlercodes.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ca4d8d10606f Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The enumeration [SWS_ANM_01111] defines the standardized error codes of Network Management (NM) in header ara/nm/nm_error_domain.h. It is also provided via the type alias Errc [SWS_ANM_01103] and, together with the thread-safe factory function MakeErrorCode [SWS_ANM_01110], serves to encapsulate error states in ara::core::Result return values.

The defined error values address specific error cases at the NM interface:

  • kServiceNotAvailable (value 1): Occurs during synchronous queries and requests of the network state when the underlying NM service is unavailable. This applies to reading the effective network state via GetNetworkState [SWS_ANM_01007], querying the requested state via GetNetworkRequestedState [SWS_ANM_01008], and requesting or releasing networks via SetNetworkRequestedState [SWS_ANM_01009].
  • kInvalidHandler (value 2): Reported by registration functions for notification handlers, namely RegisterNetworkStateChangeNotifier [SWS_ANM_01010], [SWS_ANM_01015], and RegisterNetworkRequestedStateChangeNotifier [SWS_ANM_01012], [SWS_ANM_01014]. Since a maximum of one notifier may be registered per interface, this error is likely to occur if an empty callback is passed or a registration already exists (interpretation). Question Q-59365b2b5b2e664c (open)

Regarding concurrency, it should be noted that read-only operations on the network state are thread-safe, whereas SetNetworkRequestedState and all notifier registrations are explicitly specified as not thread-safe. Callers must therefore externally synchronize concurrent accesses to registrations and request changes in order to avoid invalid call states.

This text was created and curated by an AI.

Implementer's Guide to follow (complexity I1)

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

Record
AUTOSAR/AP/record/SWS_ANM_01111
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_ANM_01111@rel:R25-11#3bd1d10b
Content hash
3bd1d10b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_NetworkManagement.pdf#nameddest=SWS_ANM_01111
Status: valid/unmigrated Version: rel:R25-11#31e88722 Versionshistorie & Revisions (1 transition, 4 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_ANM_01111@rel:R25-11#31e88722
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#3bd1d10b2026-09-30
  • R23-11rel:R23-11#b1db0f132026-10-14
  • R24-11rel:R24-11#74d33b0b2026-10-14
  • R25-11rel:R25-11#31e887222026-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 GetNmDomain [SWS_ANM_01109]

constexpr const ara::core::ErrorDomain& GetNmDomain() noexcept;
Headerara/nm/nm_error_domain.h
Upstream-AnforderungRS_AP_00119, RS_AP_00120, RS_AP_00159
Thread Safetythread-safe
Rückgabeconst ara::core::ErrorDomain&

Gibt eine Referenz auf NmErrorDomain zurück.

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

Record
AUTOSAR/AP/record/SWS_ANM_01109
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_ANM_01109@rel:R25-11#ecc7771b
Content hash
ecc7771b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_NetworkManagement.pdf#nameddest=SWS_ANM_01109
Status: valid/unmigrated Version: rel:R25-11#f3783a2f Versionshistorie & Revisions (1 transition, 4 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_ANM_01109@rel:R25-11#f3783a2f
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#43e9e8262026-09-30
  • R23-11rel:R23-11#0c322a072026-10-14
  • R24-11rel:R24-11#f3783a2f2026-10-14
  • R25-11rel:R25-11#f3783a2f2026-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_ANM_01110]

constexpr ara::core::ErrorCode MakeErrorCode(NmErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept;
Headerara/nm/nm_error_domain.h
Upstream-AnforderungRS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00159, RS_AP_00135
Thread Safetythread-safe
Rückgabeara::core::ErrorCode

Erzeugt einen ara::core::ErrorCode für NmErrc.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9124227d46ba Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

In the module anm, the function MakeErrorCode serves to create a standardized ara::core::ErrorCode for errors of the Network Management [SWS_ANM_01110]. The function is defined in the header ara/nm/nm_error_domain.h and synchronously encapsulates the specific error code code of the enumeration type NmErrc together with vendor-specific additional data data of type ara::core::ErrorDomain::SupportDataType into a corresponding error object [SWS_ANM_01110]. Callers pass the respective error state as well as context data to obtain a uniform error object for further error handling [SWS_ANM_01110].

Error Handling and Concurrency

Since MakeErrorCode is declared with the specifier noexcept, the function is guaranteed not to throw exceptions during its execution [SWS_ANM_01110]. Regarding concurrency behavior, the function is classified as thread-safe; it can consequently be safely called from parallel threads without additional external synchronization measures [SWS_ANM_01110]. Due to the qualification as constexpr, the construction of the error object can likely already be performed completely at compile time by the compiler when constant arguments are passed [SWS_ANM_01110]. Question Q-a04f5f6a2218370e (open)

Interaction

As the central creation function for error codes of the Network Management, MakeErrorCode connects the module to the general error handling concept of the AUTOSAR Adaptive Platform [SWS_ANM_01110]. In doing so, it directly addresses the higher-level upstream requirements RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00159, and RS_AP_00135 [SWS_ANM_01110].

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

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

Record
AUTOSAR/AP/record/SWS_ANM_01110
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_ANM_01110@rel:R25-11#428b741c
Content hash
428b741c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_NetworkManagement.pdf#nameddest=SWS_ANM_01110
Status: valid/unmigrated Version: rel:R25-11#2b6b1c06 Versionshistorie & Revisions (1 transition, 4 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_ANM_01110@rel:R25-11#2b6b1c06
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#428b741c2026-09-30
  • R23-11rel:R23-11#1edc012e2026-10-14
  • R24-11rel:R24-11#2b6b1c062026-10-14
  • R25-11rel:R25-11#2b6b1c062026-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