Encapsulates an SOVD diagnostic content element together with a key identifier for read and write operations.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 816c129f74baProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Encapsulates an SOVD diagnostic content element together with a key identifier for read and write operations.
The class serves to encapsulate an SOVD diagnostic content element together with a unique key identifier [SWS_DM_02375]. It is populated by Diagnostic Management during write accesses according to ASAM SOVD and forwarded to GenericDiagnosticSovdContent::Write[SWS_DM_02166]. All member functions are specified as thread-safe and exception-safe, with erroneous assignments being reported via ara::core::Result with DiagErrc::kInvalidArgument[SWS_DM_02381].
Context
Within the Adaptive Platform, the class ara::diag::DiagnosticSovdContentElementDataWithKey serves as a data capsule for a single diagnostic content element in the context of ASAM SOVD (Service-Oriented Vehicle Diagnostics) and associates a payload data object with a unique key identifier [SWS_DM_02375]. SOVD data is structured via the model element DiagnosticSovdContent, which is composed of at least one DiagnosticSovdContentElementAUTOSAR_AP_SWS_Diagnostics §7.3.3.3.2 “SOVD Data – Conversion”. While read queries are handled via GenericDiagnosticSovdContent::Read[SWS_DM_01432], the class primarily interacts with Diagnostic Management (DM) and the service interface GenericDiagnosticSovdContent::Write to perform structured write accesses to data resources [SWS_DM_01431], [SWS_DM_02166].
Lifecycle
Instantiation and destruction of ara::diag::DiagnosticSovdContentElementDataWithKey are performed adhering to the RAII principle. The destructor as well as the associated copy and move operations (move/copy constructors and assignment operators) are explicitly declared as noexcept[SWS_DM_02376]. Regarding ownership, the class takes over the payload content by value in SetContent[SWS_DM_02381], while the key name is passed as ara::core::StringView[SWS_DM_02378]. Diagnostic Management likely ensures internally that the underlying character string remains valid during access or is copied into internal memory. Question Q-f00f62f43629a773 (open) According to the specification, all member functions of the class are designed to be thread-safe and exception-safe [SWS_DM_02376], [SWS_DM_02377], [SWS_DM_02378], [SWS_DM_02379], [SWS_DM_02380], [SWS_DM_02381].
Usage Path
The typical usage path occurs upon receiving an SOVD write request for an entity data resource [SWS_DM_01431]. Diagnostic Management creates or uses an instance and first sets the shortName of the respective DiagnosticSovdContentElement using SetName[SWS_DM_02166], [SWS_DM_02378]. The incoming value is then transformed according to the conversion rules AUTOSAR_AP_SWS_Diagnostics §7.3.3.3.2 “SOVD Data – Conversion” and assigned via SetContent[SWS_DM_02166], [SWS_DM_02381]. The data aggregated in this way is subsequently forwarded to GenericDiagnosticSovdContent::Write[SWS_DM_02166]. Consumers can query the key name via GetName[SWS_DM_02377] and inspect or manipulate the data content via the const or non-const overload of GetContent[SWS_DM_02379], [SWS_DM_02380].
In case of an error, the class avoids C++ exceptions and instead reports failures via the return type ara::core::Result<void> of SetContent[SWS_DM_02381]. If setting the content fails—for example, if the passed content type does not match the target structure or is invalid—the error code DiagErrc::kInvalidArgument is returned [SWS_DM_02381]. The caller must check the returned result before the object is passed to GenericDiagnosticSovdContent::Write[SWS_DM_02166].
This class guide is based on the specification AUTOSAR AP Release R25-11. All statements are substantiated by SWS requirements and document locations of the interface ara::diag.
gemini-3.8-flash-low· 2026-10-13 · German original