Defines a closed byte value interval for diagnostic service patterns in dynamic access lists.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 772c8ed103ebProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Defines a closed byte value interval for diagnostic service patterns in dynamic access lists.
The class ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange represents a closed byte value interval for defining diagnostic service patterns in dynamic access lists [SWS_DM_01182]. Applications create these value objects with minimum and maximum values and pass them to the builder for the step-by-step configuration of service patterns [SWS_DM_01183]. In addition, the defined interval boundaries can be read out at any time via inspectors. All member functions are declared as exception-safe as noexcept, whereas modifying assignment operators require separate synchronization during concurrent access.
Context
The class ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange represents a closed byte value interval within a diagnostic service pattern [SWS_DM_01182]. In the context of dynamic access management (DynamicAccessList), it acts as an elementary building block to precisely define criteria and value ranges of individual bytes for diagnostic requests AUTOSAR_AP_SWS_Diagnostics §8.15.2 “Class: ByteRange”.
As a nested value type, ByteRange acts in direct collaboration with the higher-level DynamicAccessListDiagServiceBuilder. While the diagnostic application creates instances with specific threshold values, the builder consumes these objects via methods such as Add[SWS_DM_01177] or EndsWith[SWS_DM_01180] to construct sequential byte pattern sequences for diagnostic services. In addition, the class enables reading out the configured boundaries via GetMin[SWS_DM_01189] and GetMax[SWS_DM_01190].
Lifecycle
Instances of ByteRange are regularly created via the parameterized constructor, which takes the minimum (min) and maximum value (max) as a closed value interval [SWS_DM_01183]. Since this is a stateless value object without dynamic resource binding, no complex internal operational phases exist.
The class implements standard-compliant value semantics: It provides both a copy constructor [SWS_DM_01184] and a move constructor [SWS_DM_01185], allowing instances to be passed to builder methods by copy or by move without issues. Analogously, the copy assignment operator [SWS_DM_01186] and the move assignment operator [SWS_DM_01187] are available. The lifecycle concludes with the destructor [SWS_DM_01188].
With regard to concurrency, AUTOSAR specifies differentiated requirements: constructors and reading operations are classified as thread-safe, whereas the assignment operators operator= ([SWS_DM_01186], [SWS_DM_01187]) and the destructor [SWS_DM_01188] are explicitly non-thread-safe. Modifying operations on the same instance therefore require synchronizing measures at the caller level.
Usage Path
The typical use of ByteRange takes place in the context of sequential configuration of service patterns via the builder:
The application creates a ByteRange object specifying the bounds min and max[SWS_DM_01183].
The interval is passed to DynamicAccessListDiagServiceBuilder::Add to extend the pattern at the current position [SWS_DM_01177].
Using EndsWith, a final interval can be defined that forms the conclusion of the pattern [SWS_DM_01180].
If needed, the application reads out the limit values via GetMin[SWS_DM_01189] and GetMax[SWS_DM_01190] for verification.
Sequence diagram: Typical interaction during the definition of a diagnostic pattern with ByteRange. Sources: [SWS_DM_01183], [SWS_DM_01177], [SWS_DM_01180], [SWS_DM_01189], [SWS_DM_01190].
Error Scenarios
All member functions of the class are declared with noexcept and are therefore completely exception-safe (exception safe) [SWS_DM_01183]. Neither construction nor assignments or queries throw C++ exceptions.
Potential error situations primarily concern logical parameterization errors: If an application passes a minimum value min that is greater than the maximum value max, the specification does not define any explicit error behavior (interpretation: such an invalid pair of values would probably only be rejected during the subsequent pattern processing in the builder or lead to an empty match pattern). Question Q-ea9c65d175d48946 (open) A further error risk lies in unprotected assignment via operator= during concurrent access to the same object by multiple threads, since assignments are not thread-safe [SWS_DM_01186].
This class guide is based on the AUTOSAR Adaptive specification R25-11 for the diag module.
gemini-3.8-flash-low· 2026-10-13 · German original