이벤트 핸들과 콜백 알림을 통해 여러 진단 이벤트를 쿼리하고 모니터링할 수 있도록 합니다.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 4cd8b0cbe34d출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
이벤트 핸들과 콜백 알림을 통해 여러 진단 이벤트를 쿼리하고 모니터링할 수 있도록 합니다.
이 클래스를 통해 애플리케이션은 이벤트 핸들 [SWS_DM_01705]을(를) 기반으로 공통 인터페이스를 통해 여러 진단 이벤트의 상태 기반 쿼리 및 모니터링을 수행할 수 있습니다. 알림 콜백 등록 외에도 이벤트 상태, 디바운싱, 오류 카운터 및 DTC 번호 조회를 위한 비동기 메서드가 제공됩니다 [SWS_DM_01707], [SWS_DM_01709]. 인스턴스는 복사 및 이동이 모두 불가능하며, 스레드 안전하지 않은 소멸자로 인해 해제 전에 활성 작업의 순차적인 종료가 필요합니다 [SWS_DM_01706], [SWS_DM_02067].
컨텍스트
ara::diag::MultipleEvent 클래스는 애플리케이션이 다중 이벤트용 인터페이스를 통해 진단 이벤트를 쿼리하고 모니터링할 수 있는 인터페이스를 제공합니다 [SWS_DM_01705]. 단일 이벤트 클래스와 달리 MultipleEvent 인스턴스에 대한 작업은 EventHandleType 타입의 식별자를 통해 특정 이벤트를 어드레싱합니다 [SWS_DM_01707], [SWS_DM_01708]. 이 클래스는 애플리케이션 소프트웨어 컴포넌트와 Adaptive AUTOSAR의 진단 관리(DM) 사이의 인터페이스 역할을 합니다 AUTOSAR AP SWS Diagnostics, 69쪽. DiagnosticMultipleEventInterface의 포트 프로토타입을 통해 객체가 구성된 진단 인프라에 바인딩됩니다 [SWS_DM_01705].
수명 주기
MultipleEvent 인스턴스는 ara::core::InstanceSpecifier을(를) 지정하는 명시적 생성자를 통해 생성됩니다 [SWS_DM_01705]. 생성자는 스레드 안전하며 인터페이스 타입 DiagnosticMultipleEventInterface의 포트 프로토타입에 대한 모델링된 바인딩을 검증합니다 [SWS_DM_01705]. 매핑이 실패하거나 프로세스 내에서 동일한 인스턴스 식별자가 재사용되면 플랫폼은 InstanceSpecifierAlreadyInUseViolation 또는 PortInterfaceMappingViolation과(와) 같은 해당 위반을 보고합니다 [SWS_DM_01705].
인스턴스화 후, 애플리케이션은 일반적으로 특정 이벤트(EventHandleType을(를) 통해 식별됨)의 상태 변경에 대한 알림을 받기 위해 SetEventStatusChangedNotifier을(를) 사용하여 콜백 함수를 등록합니다 [SWS_DM_01708]. 동일한 이벤트에 대해 이 메서드를 다시 호출하면 이전에 설정된 알리미(notifier)를 덮어씁니다 [SWS_DM_01708]. 이 등록 함수는 스레드 안전하지 않습니다 [SWS_DM_01708].
실행 중에 최신 진단 정보를 이벤트 핸들별로 지정하여 쿼리할 수 있습니다. 모든 상태 기반 읽기 작업은 데이터를 ara::core::Future에 담아 비동기식으로 반환합니다:
GetEventStatus은(는) 이벤트의 현재 상태 바이트를 EventStatusByte(으)로 반환합니다 [SWS_DM_01707].
시퀀스 다이어그램: MultipleEvent를 통한 진단 이벤트 관찰 및 쿼리의 일반적인 사용 경로. 출처: [SWS_DM_01705], [SWS_DM_01707], [SWS_DM_01708], [SWS_DM_01709], [SWS_DM_01710], [SWS_DM_01711]
오류 시나리오
MultipleEvent의 메서드는 ara::core::Result 내부 또는 반환된 ara::core::Future 내에 캡슐화되어 전달되는 DiagErrc 타입을 통해 오류 상태를 알립니다 [SWS_DM_01707], [SWS_DM_01708], [SWS_DM_01709]. 다음과 같은 오류 케이스가 지정되어 있습니다:
Register a notifier function which is called if a diagnostic event is changed. A consecutive call of this method will overwrite the previous registered notifier.
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 referenced by a pingViolation DiagnosticMultipleEventPortMapping needs to be typed by a DiagnosticMultipleEventInterface. 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)
Parameter
Beschreibung
specifier
InstanceSpecifier to a PortPrototype of a DiagnosticMultipleEventInterface.
Request a governed re-review of this record. The record is not changed immediately.
Register a notifier function which is called if a diagnostic event is changed. A consecutive call of this method will overwrite the previous registered notifier.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: bd91ad4f4cb5출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
메서드 ara::diag::MultipleEvent::SetEventStatusChangedNotifier[SWS_DM_01708]은(는) 진단 이벤트의 상태가 변경될 때 호출되는 EventStatusByteNotifier 타입의 콜백 함수를 등록합니다. 매개변수 eventHandle을(를) 통해 인스턴스 내에서 원하는 이벤트가 식별됩니다. 이 메서드는 noexcept(으)로 지정되어 있으며 ara::core::Result<void>을(를) 반환합니다. 다시 호출하면 이전에 등록된 Notifier가 덮어써집니다 [SWS_DM_01708].
오류 처리
등록 중에 오류가 발생하는 경우 ara::core::Result은(는) 해당하는 오류 코드를 반환합니다. kPreFailed[SWS_DM_01708]과 같은 내부 디바운싱 컨텍스트 등에서 오류 DiagErrc::kInvalidArgument이(가) 지정되어 있습니다.
동시성 및 제약사항
이 연산은 exception safe로 선언되어 있지만, 명시적으로 not thread-safe로 분류되어 있습니다 [SWS_DM_01708]. 따라서 동일한 인스턴스에 대한 동시 호출은 외부에서 동기화되어야 합니다.
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문