DEENESPTFRRUARHIKOZHNL

类 ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange

[SWS_DM_01182] Upstream: RS_Diag_04251

class ByteRange final {...};

Represents a single byte value closed range. Type alias of a single diagnostic service pattern element in the DynamicAccessList

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder

用户指南人工智能生成

为动态访问列表中的诊断服务模式定义一个闭合字节值区间。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 772c8ed103eb 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

为动态访问列表中的诊断服务模式定义一个闭合字节值区间。

类 ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange 表示一个闭合字节值区间,用于在动态访问列表中定义诊断服务模式 [SWS_DM_01182]。应用程序使用最小值和最大值创建这些值对象,并将它们传递给生成器以逐步配置服务模式 [SWS_DM_01183]。此外,可以随时通过检查器读取已设定的区间边界。所有成员函数均被声明为 noexcept 的异常安全,而修改性的赋值运算符在并发访问时需要单独的同步。

上下文

类 ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange 表示诊断服务模式内的闭合字节值区间 [SWS_DM_01182]。在动态访问管理(DynamicAccessList)的框架下,它作为基本构建块,用于为诊断请求精确指定各个字节的准则和取值范围 AUTOSAR_AP_SWS_Diagnostics §8.15.2 “Class: ByteRange”。

作为嵌套值类型,ByteRange 与上级 DynamicAccessListDiagServiceBuilder 直接协作。当诊断应用程序创建具有特定阈值的实例时,生成器通过 Add [SWS_DM_01177] 或 EndsWith [SWS_DM_01180] 等方法使用这些对象,以构建用于诊断服务的连续字节模式序列。此外,该类允许通过 GetMin [SWS_DM_01189] 和 GetMax [SWS_DM_01190] 读取配置的边界。

生命周期

ByteRange 的实例通常通过参数化构造函数创建,该构造函数接收最小值(min)和最大值(max)作为闭合值区间 [SWS_DM_01183]。由于它是没有动态资源绑定的无状态值对象,因此不存在复杂的内部运行阶段。

该类实现了符合标准的值语义:它既提供复制构造函数 [SWS_DM_01184],又提供移动构造函数 [SWS_DM_01185],从而使实例可以通过复制或移动轻松传递给生成器方法。与此类似,还提供了复制赋值运算符 [SWS_DM_01186] 和移动赋值运算符 [SWS_DM_01187]。生命周期以析构函数 [SWS_DM_01188] 结束。

关于并发性,AUTOSAR 规定了不同的要求:构造函数和读取操作被归类为线程安全的,而赋值运算符 operator=([SWS_DM_01186]、[SWS_DM_01187])和析构函数 [SWS_DM_01188] 明确为非线程安全。因此,对同一实例的修改操作需要在调用者层采取同步措施。

使用路径

ByteRange 的典型用法是在通过生成器顺序配置服务模式的框架下进行:

  1. 应用程序在指定界限 min 和 max 的情况下创建 ByteRange 对象 [SWS_DM_01183]。
  2. 将该区间传递给 DynamicAccessListDiagServiceBuilder::Add,以在当前位置扩展模式 [SWS_DM_01177]。
  3. 使用 EndsWith 可以定义构成模式末尾的最终区间 [SWS_DM_01180]。
  4. 需要时,应用程序通过 GetMin [SWS_DM_01189] 和 GetMax [SWS_DM_01190] 读取边界值以进行验证。
使用 ByteRange 和 DynamicAccessListDiagServiceBuilder 进行模式定义应用ByteRangeDynamicAccessListDiagServiceBuilderByteRange(min, max)InstanzAdd(range)EndsWith(range)GetMin() / GetMax()Grenzwerte (Byte)

时序图:使用 ByteRange 定义诊断模式时的典型交互。来源:[SWS_DM_01183]、[SWS_DM_01177]、[SWS_DM_01180]、[SWS_DM_01189]、[SWS_DM_01190]。

错误场景

该类的所有成员函数均使用 noexcept 声明,因此完全具备异常安全性(exception safe)[SWS_DM_01183]。无论是构造、赋值还是查询都不会抛出 C++ 异常。

可能出现的错误情况主要涉及逻辑参数化错误:如果应用程序传入的最小值 min 大于最大值 max,规范并未定义明确的错误行为(解释:这种无效的值对可能只有在随后 Builder 中的模式处理期间才会被拒绝,或者导致生成空的匹配模式)。 问题 Q-ea9c65d175d48946 (未决)另一个错误风险在于,在多个线程并发访问同一对象时通过 operator= 进行无保护的赋值,因为赋值操作不是线程安全的 [SWS_DM_01186]。

本类指南基于针对 diag 模块的 AUTOSAR Adaptive 规范 R25-11。

成员图

构造函数和析构函数

2

运算符

1

类图

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__DynamicAccessListDiagServiceBuilder__ByteRange410 ByteRange + ByteRange() + ~ByteRange() + GetMax() + GetMin() + operator=()

详细视图

请在大纲中选择一个条目。

构造函数和析构函数

ByteRange 函数 3

Constructs a value range.

重载 ByteRange 3
ByteRange (Byte min, Byte max) noexcept; SWS_DM_01183
ByteRange (ByteRange const &other) noexcept; SWS_DM_01184
ByteRange (ByteRange &&other) noexcept; SWS_DM_01185
~ByteRange 函数

Destructor of ByteRange.

~ByteRange () noexcept;

方法

GetMax 函数

Reports the highest value to match.

auto GetMax () const noexcept -> Byte;
GetMin 函数

Reports the lowest value to match.

auto GetMin () const noexcept -> Byte;

运算符

operator= 函数 2

Copy assignment operator of ByteRange.

重载 = 2
auto operator= (ByteRange const &other) & noexcept -> ByteRange &; SWS_DM_01186
auto operator= (ByteRange &&other) & noexcept -> ByteRange &; SWS_DM_01187

方法文档

函数 ByteRange [SWS_DM_01183] Upstream: RS_Diag_04251

ByteRange (Byte min, Byte max) noexcept;

Constructs a value range.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
minThe minimum value to match.
maxThe maximum value to match.

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

Record
AUTOSAR/AP/record/SWS_DM_01183
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01183@rel:R25-11#b947d9e6
Content hash
b947d9e6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01183
Status: valid/unmigrated Version: rel:R25-11#76d910b8 Versionshistorie & Revisions (1 transition, 6 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_DM_01183@rel:R25-11#76d910b8
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#88ee71502026-09-30
  • R21-11rel:R21-11#5b6ad4402026-10-14
  • R22-11rel:R22-11#e5a417102026-10-14
  • R23-11rel:R23-11#188249a92026-10-14
  • R24-11rel:R24-11#cbf06b7e2026-10-14
  • R25-11rel:R25-11#76d910b82026-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

函数 ByteRange [SWS_DM_01184] Upstream: RS_Diag_04251

ByteRange (ByteRange const &other) noexcept;

Copy constructor of ByteRange.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
otherObject to construct-assign from.

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

Record
AUTOSAR/AP/record/SWS_DM_01184
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01184@rel:R25-11#8fd1b997
Content hash
8fd1b997
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01184
Status: valid/unmigrated Version: rel:R25-11#70b42108 Versionshistorie & Revisions (1 transition, 6 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_DM_01184@rel:R25-11#70b42108
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#d2c778d92026-09-30
  • R21-11rel:R21-11#8a73de022026-10-14
  • R22-11rel:R22-11#b28526062026-10-14
  • R23-11rel:R23-11#5de9db872026-10-14
  • R24-11rel:R24-11#b95826bf2026-10-14
  • R25-11rel:R25-11#70b421082026-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

函数 ByteRange [SWS_DM_01185] Upstream: RS_Diag_04251

ByteRange (ByteRange &&other) noexcept;

Move constructor of ByteRange.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
otherObject to move-assign from.

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

Record
AUTOSAR/AP/record/SWS_DM_01185
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01185@rel:R25-11#5c489db8
Content hash
5c489db8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01185
Status: valid/unmigrated Version: rel:R25-11#7783f97f Versionshistorie & Revisions (1 transition, 6 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_DM_01185@rel:R25-11#7783f97f
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#05f7580e2026-09-30
  • R21-11rel:R21-11#2b85b98e2026-10-14
  • R22-11rel:R22-11#82eb01f52026-10-14
  • R23-11rel:R23-11#206730ae2026-10-14
  • R24-11rel:R24-11#5e5486b62026-10-14
  • R25-11rel:R25-11#7783f97f2026-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

函数 GetMax [SWS_DM_01190] Upstream: RS_Diag_04251

auto GetMax () const noexcept -> Byte;

Reports the highest value to match.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ByteReturns the the highest value.

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

Record
AUTOSAR/AP/record/SWS_DM_01190
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01190@rel:R25-11#847c0d35
Content hash
847c0d35
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01190
Status: valid/unmigrated Version: rel:R25-11#ed1cf150 Versionshistorie & Revisions (1 transition, 6 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_DM_01190@rel:R25-11#ed1cf150
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#97213c3a2026-09-30
  • R21-11rel:R21-11#9b134c052026-10-14
  • R22-11rel:R22-11#3b0338f22026-10-14
  • R23-11rel:R23-11#110ac01b2026-10-14
  • R24-11rel:R24-11#d75516992026-10-14
  • R25-11rel:R25-11#ed1cf1502026-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

函数 GetMin [SWS_DM_01189] Upstream: RS_Diag_04251

auto GetMin () const noexcept -> Byte;

Reports the lowest value to match.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ByteReturns the lowest value.

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

Record
AUTOSAR/AP/record/SWS_DM_01189
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01189@rel:R25-11#e9b29509
Content hash
e9b29509
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01189
Status: valid/unmigrated Version: rel:R25-11#9261124f Versionshistorie & Revisions (1 transition, 6 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_DM_01189@rel:R25-11#9261124f
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#aec0b79b2026-09-30
  • R21-11rel:R21-11#bac056062026-10-14
  • R22-11rel:R22-11#88ffd3472026-10-14
  • R23-11rel:R23-11#8bdcbed02026-10-14
  • R24-11rel:R24-11#817c457f2026-10-14
  • R25-11rel:R25-11#9261124f2026-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

函数 operator= [SWS_DM_01186] Upstream: RS_Diag_04251

auto operator= (ByteRange const &other) & noexcept -> ByteRange &;

Copy assignment operator of ByteRange.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherObject to copy-assign from.

Rückgabewert

TypBeschreibung
ByteRangeByteRange& Reference to self.

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

Record
AUTOSAR/AP/record/SWS_DM_01186
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01186@rel:R25-11#3b0df3f5
Content hash
3b0df3f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01186
Status: valid/unmigrated Version: rel:R25-11#eb4ce14e Versionshistorie & Revisions (1 transition, 6 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_DM_01186@rel:R25-11#eb4ce14e
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#317708572026-09-30
  • R21-11rel:R21-11#1a6ff2002026-10-14
  • R22-11rel:R22-11#a6f24ffc2026-10-14
  • R23-11rel:R23-11#b7a9b8882026-10-14
  • R24-11rel:R24-11#7faa27852026-10-14
  • R25-11rel:R25-11#eb4ce14e2026-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

函数 operator= [SWS_DM_01187] Upstream: RS_Diag_04251

auto operator= (ByteRange &&other) & noexcept -> ByteRange &;

Move assignment operator of ByteRange.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherObject to move-assign from.

Rückgabewert

TypBeschreibung
ByteRangeByteRange& Reference to self.

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

Record
AUTOSAR/AP/record/SWS_DM_01187
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01187@rel:R25-11#b3323778
Content hash
b3323778
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01187
Status: valid/unmigrated Version: rel:R25-11#53c83f22 Versionshistorie & Revisions (1 transition, 6 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_DM_01187@rel:R25-11#53c83f22
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#3ce3241d2026-09-30
  • R21-11rel:R21-11#b903f9b62026-10-14
  • R22-11rel:R22-11#050a1aeb2026-10-14
  • R23-11rel:R23-11#3eb7f9782026-10-14
  • R24-11rel:R24-11#6a83a6b32026-10-14
  • R25-11rel:R25-11#53c83f222026-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

函数 ~ByteRange [SWS_DM_01188] Upstream: RS_Diag_04251

~ByteRange () noexcept;

Destructor of ByteRange.

Header-Datei#include "ara/diag/dynamic_access_list_diag_service_builder.h"
Scopeclass ara::diag::DynamicAccessListDiagServiceBuilder::ByteRange
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_01188
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01188@rel:R25-11#1dbed39b
Content hash
1dbed39b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01188
Status: valid/unmigrated Version: rel:R25-11#955d556b Versionshistorie & Revisions (1 transition, 6 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_DM_01188@rel:R25-11#955d556b
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#06913fd72026-09-30
  • R21-11rel:R21-11#353666752026-10-14
  • R22-11rel:R22-11#a69400002026-10-14
  • R23-11rel:R23-11#a2058a942026-10-14
  • R24-11rel:R24-11#5947fcb12026-10-14
  • R25-11rel:R25-11#955d556b2026-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