DEENESPTFRRUARHIKOZHNL

класс ara::diag::Condition

[SWS_DM_00711] Upstream: RS_Diag_04192

class Condition final {...};

DiagnosticConditionInterface.

Header-Datei#include "ara/diag/condition.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

Руководство пользователяСОЗДАНО ИИ

Сообщает состояния разрешения, относящиеся к транспортному средству и системе, в Diagnostic Management для оценки диагностических условий.
СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 40db6d76454c Происхождение Открытые вопросы (2)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Сообщает состояния разрешения, относящиеся к транспортному средству и системе, в Diagnostic Management для оценки диагностических условий.

Класс ara::diag::Condition предоставляет интерфейс DiagnosticConditionInterface, с помощью которого адаптивные приложения сообщают условия окружения и разрешения в Diagnostic Management ([SWS_DM_00712]). Diagnostic Server оценивает эти состояния для целенаправленного управления выполнением стандартизированных диагностических функций или операций удаления в транспортном средстве (AUTOSAR_AP_SWS_Diagnostics §7.3.2.5.5 «Condition checks»). Экземпляры жестко привязаны к прототипу порта и не являются ни копируемыми, ни перемещаемыми. При конкурентном использовании операции опроса и установки требуют внешней синхронизации, поскольку они не являются потокобезопасными.

Контекст

Класс ara::diag::Condition представляет собой программный интерфейс для диагностических условий (DiagnosticConditionInterface) в AUTOSAR Adaptive Platform ([SWS_DM_00712]). В системах диагностики транспортных средств определенные диагностические функции или службы UDS разрешено выполнять только тогда, когда транспортное средство находится в определенном состоянии окружения — например, при неподвижном транспортном средстве со скоростью, равной нулю (AUTOSAR_AP_SWS_Diagnostics §7.3.2.5.5 «Condition checks»). Согласно [SWS_DM_00111] Diagnostic Server выполняет соответствующие проверки окружения, если ISO 14229-1 предписывает проведение проверок условий, специфичных для службы, и в случае невыполнения отвечает сконфигурированным Negative Response Code (NRC).

В рамках архитектуры приложения ara::diag::Condition функционирует как связующее звено между адаптивным приложением и Diagnostic Management (DM). Приложение инстанцирует объект условия через порт, который в модели связан либо через DiagnosticEnableConditionPortMapping, либо через DiagnosticClearConditionPortMapping ([SWS_DM_00712]). Интерпретация: благодаря этому назначению порта определяется, служит ли сообщаемое состояние условием разрешения для регулярных диагностических процессов или критерием для удаления диагностических данных. Вопрос (открытый) Таким образом, объект инкапсулирует передачу состояния в Diagnostic Server, который оценивает условия для поступающих диагностических запросов ([SWS_DM_00111]).

diag_condition_kontext app Anwendungssoftware cond ara::diag::Condition app->cond SetCondition / GetCondition dm Diagnostic Management cond->dm Zustandsabgleich

Контекстная диаграмма: интеграция ara::diag::Condition между прикладным программным обеспечением и Diagnostic Management. Источники: [SWS_DM_00712], [SWS_DM_00111], AUTOSAR_AP_SWS_Diagnostics §7.3.2.5.5 «Condition checks»

Жизненный цикл

Создание объекта ara::diag::Condition осуществляется явно путем передачи ara::core::InstanceSpecifier в конструктор ([SWS_DM_00712]). Этот идентификатор указывает на смоделированный прототип порта приложения. Конструктор объявлен как noexcept и гарантирует безопасность исключений, а также потокобезопасность ([SWS_DM_00712]).

Что касается отношений владения, класс спроектирован как строгий одиночный экземпляр: как конструктор копирования ([SWS_DM_01625]), так и оператор присваивания копированием ([SWS_DM_01623]) удалены (=delete). Точно так же конструктор перемещения ([SWS_DM_01626]) и оператор присваивания перемещением ([SWS_DM_01624]) удалены. Объект условия не может быть ни скопирован, ни перемещен, что обеспечивает жесткую привязку 1:1 к соответствующему порту.

В процессе работы методы SetCondition ([SWS_DM_00715]) и GetCondition ([SWS_DM_00714]) специфицированы как непотокобезопасные. При параллельном доступе из нескольких потоков вызывающее приложение должно обеспечить внешнюю синхронизацию. Жизненный цикл завершается деструктором ~Condition() ([SWS_DM_00713]), который является noexcept и безопасным относительно исключений, однако также не является потокобезопасным.

Путь использования

Типичный путь использования включает инициализацию, периодическое обновление состояния, а также опрос условия:

  1. Инициализация: приложение инстанциирует ara::diag::Condition с указанием подходящего ara::core::InstanceSpecifier ([SWS_DM_00712]) для привязки к конфигурации модели.
  2. Установка состояния: если определяющее состояние транспортного средства или системы изменяется, приложение обновляет условие через SetCondition(condition) ([SWS_DM_00715]). Вызов подтверждает принятие с помощью ara::core::Result<void>.
  3. Опрос состояния: для проверки текущего состояния приложение вызывает GetCondition() ([SWS_DM_00714]). Результат предоставляется асинхронно через ara::core::Future<ConditionType>.
  4. Серверная обработка: интерпретация: Diagnostic Server внутренне обращается к сохраненному состоянию для проверки ожидающих диагностических запросов ([SWS_DM_00111]). Вопрос Q-bbf48f735ef80e33 (открытый)
  5. Завершение: при прекращении работы компонента объект освобождается через деструктор ([SWS_DM_00713]).
Typischer Nutzungspfad von ara::diag::ConditionПриложениеConditionDiagnostic ManagementCondition(specifier)Port-Bindung registrierenSetCondition(condition)Bedingungszustand aktualisierenResult<void>GetCondition()Future<ConditionType>~Condition()

Диаграмма последовательности: типичная последовательность вызовов для инициализации, обновления и опроса диагностического условия. Источники: [SWS_DM_00712], [SWS_DM_00715], [SWS_DM_00714], [SWS_DM_00713]

Сценарии ошибок

Состояния ошибок могут возникать как при инстанциации объекта, так и во время выполнения:

  • Нарушения конструктора: при создании ([SWS_DM_00712]) фреймворк проверяет конфигурацию на соответствие программной модели. Возможные нарушения включают:
    • InstanceSpecifierMappingIntegrityViolation: идентификатор не может быть разрешен в модели или не ссылается на PortPrototype ([SWS_DM_00712]).
    • PortInterfaceMappingViolation: PortPrototype хотя и типизирован с помощью DiagnosticConditionInterface, однако на него не ссылается ни DiagnosticEnableConditionPortMapping, ни DiagnosticClearConditionPortMapping ([SWS_DM_00712]).
    • ProcessMappingViolation: для ссылки на экземпляр во время выполнения не существует подходящего смоделированного процесса ([SWS_DM_00712]).
    • InstanceSpecifierAlreadyInUseViolation: идентификатор уже используется в том же процессе другим экземпляром ([SWS_DM_00712]).
  • Сбой базовых служб диагностики: GetCondition() ([SWS_DM_00714]) может завершиться сбоем через возвращаемый ara::core::Future с ошибкой DiagErrc::kServiceNotAvailable, если базовые функциональные возможности Diagnostic Management временно недоступны.
  • Безошибочное сохранение состояния: для SetCondition() ([SWS_DM_00715]) стандартизированные коды ошибок не определены; функция сообщает об успешном завершении напрямую через пустой ara::core::Result<void>.

Этот текст был создан ИИ. Все технические утверждения основаны исключительно на спецификациях AUTOSAR R25-11.

Карта членов

Конструкторы и деструктор

2

Операторы

1

Диаграмма классов

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

G nara__diag__Condition778 Condition + Condition() + operator=() + ~Condition() + GetCondition() + SetCondition()

Подробный вид

Выберите элемент в оглавлении.

Конструкторы и деструктор

Condition функция 3

Constructor of Condition Class.

Перегрузки Condition 3
explicit Condition (const ara::core::InstanceSpecifier &specifier) noexcept; SWS_DM_00712
Condition (Condition &)=delete; SWS_DM_01625
Condition (Condition &&) noexcept=delete; SWS_DM_01626
~Condition функция

Destructor of class Condition .

~Condition () noexcept;

Методы

GetCondition функция

Get current condition.

ara::core::Future< ConditionType > GetCondition () noexcept;
SetCondition функция

Set condition.

ara::core::Result< void > SetCondition (ConditionType condition) noexcept;

Операторы

operator= функция 2

Condition shall be a single not assignable instance.

Перегрузки = 2
Condition & operator= (Condition &)=delete; SWS_DM_01623
Condition & operator= (Condition &&)=delete; SWS_DM_01624

Документация методов

функция Condition [SWS_DM_00712] Upstream: RS_AP_00137, RS_Diag_04192, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

explicit Condition (const ara::core::InstanceSpecifier &specifier) noexcept;

Constructor of Condition Class.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)InstanceSpeci- InstanceSpecifier either cannot be resolved in the model in the fierMappingIn- context of your executable, or it refers to a model element other tegrityViolation than a PortPrototype. PortInterfaceMap- A PortPrototype that is typed by a pingViolation DiagnosticConditionInterface needs either to be referenced by a DiagnosticEnableConditionPortMapping or a DiagnosticClearConditionPortMapping. ProcessMappingVio- Matching InstanceRef exists, but no matching (modelled) Process lation found that matches the (runtime) process. InstanceSpecifier- Violation message that is sent in case a constructor in the ara AlreadyInUseViola- framework was called with an InstanceSpecifier already in use in tion this process.

Parameter (in)

ParameterBeschreibung
specifierInstanceSpecifier to a PortPrototype of a DiagnosticConditionInterface.

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

Record
AUTOSAR/AP/record/SWS_DM_00712
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00712@rel:R25-11#4f41d712
Content hash
4f41d712
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00712
Status: valid/unmigrated Version: rel:R25-11#7b668fd5 Versionshistorie & Revisions (1 transition, 8 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_00712@rel:R25-11#7b668fd5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b888c2422026-09-30
  • R19-11rel:R19-11#174e087a2026-10-14
  • R20-11rel:R20-11#a3c343192026-10-14
  • R21-11rel:R21-11#a3c343192026-10-14
  • R22-11rel:R22-11#39f9faa92026-10-14
  • R23-11rel:R23-11#90311ab32026-10-14
  • R24-11rel:R24-11#abbd838c2026-10-14
  • R25-11rel:R25-11#7b668fd52026-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

функция Condition [SWS_DM_01625] Upstream: RS_AP_00147

Condition (Condition &)=delete;

Condition shall be a single not copy-able instance.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01625
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01625@rel:R25-11#0cef2ba1
Content hash
0cef2ba1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01625
Status: valid/unmigrated Version: rel:R25-11#beec4163 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_DM_01625@rel:R25-11#beec4163
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#ca5f204e2026-09-30
  • R23-11rel:R23-11#01e7045c2026-10-14
  • R24-11rel:R24-11#c44ce0db2026-10-14
  • R25-11rel:R25-11#beec41632026-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

функция Condition [SWS_DM_01626] Upstream: RS_AP_00147

Condition (Condition &&) noexcept=delete;

Move constructor of Condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01626
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01626@rel:R25-11#974fcbc9
Content hash
974fcbc9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01626
Status: valid/unmigrated Version: rel:R25-11#ca51f3d8 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_DM_01626@rel:R25-11#ca51f3d8
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#ac9f36c82026-09-30
  • R23-11rel:R23-11#a312623b2026-10-14
  • R24-11rel:R24-11#ca51f3d82026-10-14
  • R25-11rel:R25-11#ca51f3d82026-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

функция GetCondition [SWS_DM_00714] Upstream: RS_AP_00139, RS_Diag_04192

ara::core::Future< ConditionType > GetCondition () noexcept;

Get current condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Future<ConditionType >the current condition

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_00714
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00714@rel:R25-11#3fd05e36
Content hash
3fd05e36
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00714
Status: valid/unmigrated Version: rel:R25-11#cff60f5e Versionshistorie & Revisions (1 transition, 8 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_00714@rel:R25-11#cff60f5e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9ee1c93d2026-09-30
  • R19-11rel:R19-11#dfa0a5692026-10-14
  • R20-11rel:R20-11#c75637cb2026-10-14
  • R21-11rel:R21-11#68ca7fb32026-10-14
  • R22-11rel:R22-11#95e6fb892026-10-14
  • R23-11rel:R23-11#941e11c02026-10-14
  • R24-11rel:R24-11#6ceaf9c22026-10-14
  • R25-11rel:R25-11#cff60f5e2026-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

функция SetCondition [SWS_DM_00715] Upstream: RS_AP_00139, RS_Diag_04192

ara::core::Result< void > SetCondition (ConditionType condition) noexcept;

Set condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
conditioncurrent condition

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns void.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_DM_00715
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00715@rel:R25-11#98578f15
Content hash
98578f15
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00715
Status: valid/unmigrated Version: rel:R25-11#334a5f3b Versionshistorie & Revisions (1 transition, 8 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_00715@rel:R25-11#334a5f3b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8b4774082026-09-30
  • R19-11rel:R19-11#a92f5c212026-10-14
  • R20-11rel:R20-11#05dc5cfa2026-10-14
  • R21-11rel:R21-11#05dc5cfa2026-10-14
  • R22-11rel:R22-11#4eee24142026-10-14
  • R23-11rel:R23-11#63e48b532026-10-14
  • R24-11rel:R24-11#69cd75ef2026-10-14
  • R25-11rel:R25-11#334a5f3b2026-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_01623] Upstream: RS_AP_00147

Condition & operator= (Condition &)=delete;

Condition shall be a single not assignable instance.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01623
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01623@rel:R25-11#6c8fc219
Content hash
6c8fc219
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01623
Status: valid/unmigrated Version: rel:R25-11#fc39b2c9 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_DM_01623@rel:R25-11#fc39b2c9
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#ceedce912026-09-30
  • R23-11rel:R23-11#da53ca842026-10-14
  • R24-11rel:R24-11#fc39b2c92026-10-14
  • R25-11rel:R25-11#fc39b2c92026-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_01624] Upstream: RS_AP_00147

Condition & operator= (Condition &&)=delete;

Move assignment operator of Condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01624
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01624@rel:R25-11#fceec1d9
Content hash
fceec1d9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01624
Status: valid/unmigrated Version: rel:R25-11#cd68da4f 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_DM_01624@rel:R25-11#cd68da4f
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#08f5a51a2026-09-30
  • R23-11rel:R23-11#c22af3482026-10-14
  • R24-11rel:R24-11#cd68da4f2026-10-14
  • R25-11rel:R25-11#cd68da4f2026-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

функция ~Condition [SWS_DM_00713] Upstream: RS_AP_00134, RS_Diag_04192

~Condition () noexcept;

Destructor of class Condition .

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
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_00713
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00713@rel:R25-11#64e234e4
Content hash
64e234e4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00713
Status: valid/unmigrated Version: rel:R25-11#a0b1a1c6 Versionshistorie & Revisions (1 transition, 8 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_00713@rel:R25-11#a0b1a1c6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#70f2dd252026-09-30
  • R19-11rel:R19-11#0982897b2026-10-14
  • R20-11rel:R20-11#842e2f302026-10-14
  • R21-11rel:R21-11#842e2f302026-10-14
  • R22-11rel:R22-11#45e9fe152026-10-14
  • R23-11rel:R23-11#c0cf50322026-10-14
  • R24-11rel:R24-11#a0b1a1c62026-10-14
  • R25-11rel:R25-11#a0b1a1c62026-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