Enables adaptive applications to build dynamic access lists and service patterns for diagnostic services.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d14f1d69eb64ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables adaptive applications to build dynamic access lists and service patterns for diagnostic services.
The class is used by adaptive applications to create and configure dynamic access lists for diagnostic services [SWS_DM_01156]. After optional memory pre-allocation, it creates instances for pattern definition of individual service IDs or byte sequences via methods such as MakeServiceBuilder[SWS_DM_01164]. All member functions are declared as exception-safe as noexcept, whereas modifying operations must be protected against concurrent access by the application [SWS_DM_01163].
Context
The class ara::diag::DiagnosticServiceDynamicAccessList is used by an adaptive application (AA) to build a dynamic access list (DynamicAccessList) for diagnostic services [SWS_DM_01156]. It acts as a factory and management unit for service patterns by creating instances of DynamicAccessListDiagServiceBuilder[SWS_DM_01164], [SWS_DM_01165]. In the architecture, the application interacts directly with the list to define access rules based on service identifiers (SID) or byte sequences, which form the basis for dynamic access control in the diagnostic subsystem SWS Diagnostics §8.13.1 “Class: DiagnosticServiceDynamicAccessList”.
Regarding concurrency, the constructors (default, copy, and move constructors) are explicitly specified as thread-safe [SWS_DM_01157], [SWS_DM_01159], [SWS_DM_01160]. In contrast, all mutating methods, such as assignments, memory reservations, and builder creations, as well as the destructor, are defined as not thread-safe [SWS_DM_01161], [SWS_DM_01162], [SWS_DM_01163], [SWS_DM_01164], [SWS_DM_01165], [SWS_DM_01158]. Concurrent access to the same object therefore requires synchronization on the application side.
Usage Path
The typical procedure for building a dynamic service access list comprises the following phases:
Memory pre-allocation: Before adding service patterns, the application can pre-allocate memory for all expected service patterns using Reserve[SWS_DM_01163]. The passed parameters numberOfServiceHeads and maxServiceHeadSize allow a worst-case estimation of the required memory to minimize subsequent dynamic reallocations.
Pattern creation: The application calls MakeServiceBuilder to initiate a diagnostic service pattern. This is done either based on a single SID byte [SWS_DM_01164] or a byte sequence serviceHead for deeper pattern checks [SWS_DM_01165].
Pattern configuration: The method returns an object of type DynamicAccessListDiagServiceBuilder[SWS_DM_01164], which the application subsequently configures.
All public member functions and constructors of the class are declared as noexcept and guarantee strict exception safety (exception safe) [SWS_DM_01157], [SWS_DM_01163], [SWS_DM_01164]. Error conditions in the form of C++ exceptions or return of ara::core::Result with error codes do not occur at this interface. For memory reservation via Reserve, the specification may be an estimate; an underestimation does not lead to function termination, but will likely require subsequent reallocations [SWS_DM_01163]. Question Q-8d33a0315da27aed (open) Application developers must ensure that the non-thread-safe functions Reserve, MakeServiceBuilder and the assignment operators are never executed concurrently on the same object without external locking.
This guide is based on the AUTOSAR standard Release R25-11 and summarizes the specification of the class ara::diag::DiagnosticServiceDynamicAccessList.
Preallocates memory for all service heads to fit into the DynamicAccessList. The preallocation can be just estimated and may calculate just the worst case of memory needed, not exact memory size needed for data numberOfServiceHeads.
This function is used by the AA to construct a pattern for the DynamicAccessList, using only the SID.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: cfdb5e234f29ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The synchronous function MakeServiceBuilder of class ara::diag::DiagnosticServiceDynamicAccessList serves an adaptive application to initiate a pattern for the dynamic access list (DynamicAccessList) via a single service identifier (sid) ([SWS_DM_01164]). It accepts the parameter sid of type DynamicAccessListDiagServiceBuilder::Byte and returns a new instance of DynamicAccessListDiagServiceBuilder ([SWS_DM_01164]). By this call, the application causes the diagnostic server instance to build a new DynamicAccessList starting with the passed single-byte pattern ([SWS_DM_01218]; AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.4 “DynamicAccessList Creation and Update”).
Interaction and Alternatives
After startup, the dynamic access list of all clients is empty by default ([SWS_DM_01214]). In addition to this function, an overload with a byte string (serviceHead) is available to the application ([SWS_DM_01165]). Both overloads represent the entry point used to trigger the creation of a new access list in the server ([SWS_DM_01218]).
Error Handling and Concurrency
The interface is declared as noexcept and specified as exception-safe (exception safe) ([SWS_DM_01164]). It throws no exceptions and returns no error codes; incorrect service identifiers are therefore likely to be noticed only during the subsequent evaluation of the pattern by the diagnostic server. Question Q-eacef79ec6be9fcd (open) In terms of concurrency, the function is explicitly classified as not thread-safe (not thread-safe) ([SWS_DM_01164]). In the event of parallel access from multiple execution contexts, the calling application must ensure external synchronization.
This usage note was generated by an AI based on the AUTOSAR specification R25-11.
This function is used by the AA to construct a pattern for the DynamicAccessList, using a string of bytes.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7426838ef9dfProvenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The method MakeServiceBuilder of class ara::diag::DiagnosticServiceDynamicAccessList serves an Adaptive Application to create a diagnostic pattern for the DynamicAccessList based on a byte sequence ([SWS_DM_01165]).
Parameters:serviceHead (type DynamicAccessListDiagServiceBuilder::Byte String) passes a byte sequence that defines the beginning of the pattern for diagnostic matching ([SWS_DM_01165]).
Return value: Returns an instance of DynamicAccessListDiagServiceBuilder for further configuration of the service pattern ([SWS_DM_01165]).
The function is declared as noexcept and is exception safe, thus generating no C++ exceptions ([SWS_DM_01165]). Error codes or DET/DEM messages are not specified for this call. Since the operation is classified as not thread-safe (not thread-safe), concurrent calls on the same instance must be synchronized by the application ([SWS_DM_01165]).
This usage note was generated by an AI based on the AUTOSAR specification R25-11.
Preallocates memory for all service heads to fit into the DynamicAccessList. The preallocation can be just estimated and may calculate just the worst case of memory needed, not exact memory size needed for data numberOfServiceHeads.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 77bde14da8eeProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The method ara::diag::DiagnosticServiceDynamicAccessList::Reserve pre-allocates memory for service heads within an instance of DiagnosticServiceDynamicAccessList ([SWS_DM_01163], SWS Diagnostics §8.13.1.1.3.3 “Reserve”). This pre-allocation does not have to match the exact memory size, but may be calculated as a worst-case estimate of the maximum required memory ([SWS_DM_01163]).
Usage and Parameters
The call occurs synchronously and processes two input parameters ([SWS_DM_01163]):
numberOfServiceHeads (std::size_t): Number of diagnostic service patterns.
maxServiceHeadSize (std::size_t): Expected maximum number of diagnostic bytes within a single pattern.
The function provides no return value (void) and is specified with noexcept and the property exception safe ([SWS_DM_01163]). Error handling via return codes or exceptions does not exist.
Concurrency and Limitations
The function is classified as not thread-safe ([SWS_DM_01163]). Concurrent accesses by multiple threads to the same instance therefore strictly require external synchronization. Presumably, the method is called before registering service patterns in order to minimize later memory reallocations at runtime. Question Q-e58b6f12a3a0adac (open)
demarcation
This method is to be distinguished from same-named SOVD functions such as in DiagnosticSovdArrayContentElementDataView ([SWS_DM_02240]), DiagnosticSovdRecordContentElementDataView ([SWS_DM_02283]), or DiagnosticSovdContentElementData ([SWS_DM_02345]), which each accept a capacity and are specified as thread-safe.
This usage note is based on the AUTOSAR Adaptive R25-11 specification.
gemini-3.8-flash-low· 2026-10-13 · German original