애플리케이션이 비동기 데이터 전달을 통해 UDS RoutineControl 서비스를 일반적으로 처리할 수 있도록 합니다.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: ed3ab770d945출처열린 질문 (2)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
애플리케이션이 비동기 데이터 전달을 통해 UDS RoutineControl 서비스를 일반적으로 처리할 수 있도록 합니다.
이 클래스는 UDS RoutineControl 서비스를 위한 일반 핸들러를 제공하고 다양한 루틴 식별자에 대한 요청을 어댑티브 애플리케이션으로 전달합니다 [SWS_DM_00552]. 개발자는 Start과(와) 같은 비동기 메서드를 통해 요구되는 루틴 액션을 구현하고, Offer을(를) 통해 메시지 전달을 활성화합니다 [SWS_DM_00557]. 인스턴스는 복사하거나 이동할 수 없으므로 수명 주기와 동시성을 생성자 및 인터페이스 구성을 통해 정확하게 제어해야 합니다. 실행 중인 연산은 협력적 취소 및 표준화된 UDS 오류 코드를 지원합니다.
컨텍스트
클래스 ara::diag::GenericRoutine은(는) AUTOSAR Adaptive Platform에서 ISO 14229-1(UDS RoutineControl, Service 0x31)에 따른 진단 루틴 처리를 위한 일반 인터페이스를 제공합니다. 이는 중앙 Diagnostic Management(DM)와 어댑티브 애플리케이션 간의 연결 고리 역할을 합니다. 이 클래스의 인스턴스는 모델에서 DiagnosticServiceGenericMapping을(를) 통해 참조되어야 하는 DiagnosticRoutineGenericInterface 유형의 모델링된 포트 프로토타입에 바인딩됩니다 [SWS_DM_00552]. 유형별 루틴 인터페이스와 달리, GenericRoutine은(는) 진단 요청의 원시 데이터를 ara::core::Span<const std::uint8_t>(으)로 구체적인 루틴 식별자(routineId)와 함께 애플리케이션에 전달합니다 [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556]. 이를 통해 단일 핸들러가 여러 루틴을 유연하게 처리할 수 있습니다.
수명 주기
GenericRoutine의 인스턴스는 특정 포트에 바인딩되며 복사하거나 이동할 수 없습니다. 복사 및 이동 생성자와 대입 연산자는 명시적으로 삭제되었습니다 [SWS_DM_01637], [SWS_DM_01638], [SWS_DM_01635], [SWS_DM_01636]. 초기화는 생성자를 통해 ara::core::InstanceSpecifier 및 동시성 동작(ConcurrencyType: kConcurrent 또는 kNotConcurrent)을 지정하여 수행됩니다 [SWS_DM_00552]. 이 매개변수는 가상 실행 메서드가 스레드 안전하게 구현되어야 하는지 여부를 결정합니다.
일반 루틴을 제공하기 위해 애플리케이션은 GenericRoutine에서 파생되어 필요한 가상 메서드를 재정의합니다. 메서드 Start(UDS 하위 기능 0x01)은 순수 가상(pure virtual)이며 반드시 구현되어야 합니다 [SWS_DM_00554]. 메서드 Stop(하위 기능 0x02) [SWS_DM_00555] 및 RequestResults(하위 기능 0x03) [SWS_DM_00556]은 가상 메서드입니다. 해석: 순수 가상이 아니므로 각 루틴이 중지 또는 별도의 결과 조회를 기능적으로 지원하는 경우에만 재정의해야 할 것으로 추정됩니다. 질문 (열림)
일반적인 흐름은 다음 단계로 구성됩니다:
인스턴스화: 포트 참조 및 동시성 모드와 함께 파생된 핸들러를 생성합니다 [SWS_DM_00552].
활성화: DM을 통한 처리를 허용하기 위해 Offer()을(를) 호출합니다 [SWS_DM_00557].
실행: 들어오는 UDS 요청 시 DM이 Start, Stop 또는 RequestResults을(를) 호출합니다. 애플리케이션은 routineId, requestData, metaInfo 및 CancellationHandler을(를) 수신하고 ara::core::Future<OperationOutput>을(를) 반환합니다 [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556]. requestData의 유효성은 연관된 Promise가 충족되거나 연산이 취소될 때까지 보장됩니다 [SWS_DM_00554].
취소 처리: 애플리케이션은 cancellationHandler.IsCanceled()을(를) 통해 취소 상태를 확인하거나 cancellationHandler.SetNotifier()을(를) 통해 콜백을 등록할 수 있습니다 [SWS_DM_00554]. 해석: 취소 발생 시 애플리케이션은 실행 중인 백그라운드 활동을 조기에 종료하고 신속하게 Promise를 해결할 것으로 추정됩니다. 질문 (열림)
비활성화: 객체가 소멸되기 전에 StopOffer()을(를) 통해 전달을 종료합니다 [SWS_DM_00558].
모델 및 매핑 위반: 모델에서 InstanceSpecifier 해석에 실패하거나, PortPrototype(으)로 식별되지 않거나, 일치하는 DiagnosticServiceGenericMapping이(가) 없는 경우 프레임워크는 InstanceSpecifierMappingIntegrityViolation, PortInterfaceMappingViolation, ProcessMappingViolation 또는 InstanceSpecifierAlreadyInUseViolation과(와) 같은 위반을 보고합니다 [SWS_DM_00552].
제공 오류: 서비스가 이미 제공되고 있음에도 Offer()이(가) 호출되면 호출이 실패하고 오류 코드 DiagOfferErrc::kAlreadyOffered을(를) 반환합니다 [SWS_DM_00557].
진단 오류 코드(NRC): 루틴 연산이 성공적으로 완료되지 못하거나 요청에 유효하지 않은 매개변수가 포함되어 있는 경우, 애플리케이션은 반환된 Future를 OperationOutput(으)로 충족하지 않고 ISO 14229-1에 따라 DiagUdsNrcErrc의 적절한 UDS Negative Response Code(NRC)로 충족합니다 [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556].
이 클래스 가이드는 AUTOSAR Adaptive Platform R25-11 사양을 기반으로 하며 자동 생성되었습니다.
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 DiagnosticRoutineGenericInterface needs to be referenced by a DiagnosticServiceGenericMapping. 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 DiagnosticRoutineGenericInterface.
concurrencyType
Specifies if the interface is implemented as thread safe ( kConcurrent) or non-thread safe (kNotConcurrent).
Request a governed re-review of this record. The record is not changed immediately.
This Offer will enable the DM to forward request messages to this handler.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 36b2772d0811출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
ara::diag::GenericRoutine 클래스의 Offer 함수는 Diagnostic Management(DM)가 루틴에 대한 수신 진단 요청 메시지를 등록된 핸들러로 전달할 수 있도록 설정합니다 [SWS_DM_00557]. 호출은 동기식으로 수행되고 파라미터를 받지 않으며 ara::core::Result<void>을 반환합니다 [SWS_DM_00557]. 이 메서드는 noexcept 사양으로 선언되어 있으므로 예외 안전(exception safe)한 것으로 간주됩니다 [SWS_DM_00557].
오류 처리
제공(offering)에 실패하면 메서드는 부정적인 결과를 반환합니다. 해당 인스턴스에 대해 루틴이 이미 이전에 제공된 경우, 메서드는 특정 오류 코드 DiagOfferErrc::kAlreadyOffered을 반환합니다 [SWS_DM_00557]. 이 오류 사례에 대해서는 롤백 시맨틱이 정의되어 있어 상태가 변경되지 않은 채로 유지됩니다 [SWS_DM_00557]. 또한 오류 식별자 kAlreadyOffered은 진단 호출을 위한 내부 오류 도메인에 고정되어 있습니다 [SWS_DM_00514].
동시성 및 제약사항
이 인터페이스는 명시적으로 스레드 안전하지 않음(not thread-safe)으로 지정되어 있습니다 [SWS_DM_00557]. 애플리케이션의 여러 스레드가 동일한 핸들러에 접근하는 경우 호출을 동기화해야 합니다. 해석: Offer을 실행하기 전에는 요청을 수신할 수 없으므로, 호출은 일반적으로 초기화 중에 수행될 것으로 보입니다. 질문 Q-0c42f415bcb0de20 (열림)
Called for RoutineControl with SubFunction RequestResults (0x03) request for this Diagnostic RoutineIdentifier.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: f4080ca4c8cd출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
클래스 ara::diag::GenericRoutine의 RequestResults 메서드는 매개변수화된 진단 루틴 식별자에 대해 하위 기능 requestRoutineResults (0x03)를 사용하는 서비스 0x31의 UDS RoutineControl 요청을 일반(generic) 방식으로 처리하기 위해 진단 서버 인스턴스에 의해 호출됩니다([SWS_DM_00575], [SWS_DM_00556]).
호출 시 루틴 식별자 routineId, 요청별 메타데이터 metaInfo 및 입력 데이터 requestData이(가) 전달됩니다([SWS_DM_00556]). span requestData의 유효성은 해당 Promise이(가) 이행되거나 실행이 중단될 때까지로 엄격히 제한됩니다([SWS_DM_00556]). 전달된 cancellationHandler은(는) IsCanceled을(를) 통한 중단 상태 쿼리 및 SetNotifier을(를) 통한 알림 함수 등록을 허용합니다([SWS_DM_00556]).
결과는 ara::core::Future<OperationOutput>(으)로 비동기 반환됩니다([SWS_DM_00556]). 해석: 출력 데이터의 제공은 전형적으로 애플리케이션 측 ara::core::Promise을(를) 통해 비동기식으로 이루어질 것으로 보입니다. 질문 Q-f50c8509d7515e3f (열림) 성공 시 Future는 OperationOutput을(를) 제공하는 반면, 오류 시에는 ISO 14229-1에 따른 적절한 UDS NRC가 DiagUdsNrcErrc을(를) 통해 전달됩니다([SWS_DM_00556]). 이 함수는 noexcept(으)로 선언되어 있으며 예외 안전한 것으로 간주됩니다([SWS_DM_00556]).
동시성과 관련하여 스레드 안전성은 조건부입니다(conditional): 메서드를 스레드 안전하게 구현해야 하는지 여부는 생성자에 전달된 ConcurrencyType을(를) 통해 확정적으로 제어됩니다([SWS_DM_00556]).
conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor
Parameter (in)
Parameter
Beschreibung
routineId
the corresponding RoutineIdentifier
requestData
Content of request message (without RoutineIdentifier), Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfo
MetaInfo of the request.
cancellationHandler
This parameter is used to • Query the current cancellation status by calling cancellationHandler.IsCanceled. Returns TRUE in case, the current conversation has been cancelled and FALSE otherwise. • Register a notifier function by calling cancellationHandler.SetNotifier. The registered notifier is called if the current conversation is cancelled.
Called for RoutineControl with SubFunction Start (0x01) request for this DiagnosticRoutine Identifier.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 9e819a027940출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
클래스 ara::diag::GenericRoutine의 메서드 Start은(는) 지정된 routineId에 대해 서브 기능 Start(0x01)를 포함하는 RoutineControl 진단 요청이 수신되는 즉시 호출됩니다 [SWS_DM_00554]. [SWS_DM_00591]에 따른 타입 지정 루틴 인터페이스와 달리, 이 제네릭 인터페이스는 요청 메시지의 로우 데이터를 바이트 범위로 수신합니다.
구현에는 다음 요구사항 및 인터페이스 속성이 적용됩니다:
호출 컨텍스트 및 매개변수:routineId 및 메타데이터(metaInfo) 외에도 매개변수 requestData이(가) 전달됩니다. 요청 데이터의 수명은 Promise가 충족되거나 cancellationHandler에 의해 처리가 취소될 때까지 유효하게 유지됩니다 [SWS_DM_00554].
취소 처리: 루틴은 cancellationHandler.IsCanceled()을(를) 사용하여 현재 취소 상태를 쿼리하거나, 대화가 취소될 때 호출되는 Notifier 함수를 cancellationHandler.SetNotifier()을(를) 통해 등록할 수 있습니다 [SWS_DM_00554].
비동기 시맨틱: 처리는 ara::core::Future<OperationOutput>을(를) 통해 비차단 방식으로 수행됩니다. 성공적으로 실행되면 OperationOutput이(가) 긍정 응답을 위한 페이로드를 제공합니다 [SWS_DM_00554].
오류 처리: 실행이 실패하면 DiagUdsNrcErrc을(를) 사용하여 ISO 14229-1에 따른 적절한 Negative Response Code(NRC)로 Future를 완료해야 합니다 [SWS_DM_00554].
동시성: 이 함수는 예외 안전한 것(noexcept)(으)로 선언되어 있습니다. 제공이 스레드 안전하게 수행되어야 하는지 여부는 생성자에 전달된 ConcurrencyType이(가) 결정합니다 [SWS_DM_00554].
conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor
Parameter (in)
Parameter
Beschreibung
routineId
the corresponding RoutineIdentifier
requestData
Content of request message (without RoutineIdentifier). Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfo
MetaInfo of the request.
cancellationHandler
This parameter is used to • Query the current cancellation status by calling cancellationHandler.IsCanceled. Returns TRUE in case, the current conversation has been cancelled and FALSE otherwise. • Register a notifier function by calling cancellationHandler.SetNotifier. The registered notifier is called if the current conversation is cancelled.
Called for RoutineControl with SubFunction Stop (0x02) request for this DiagnosticRoutine Identifier.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: d8c6cb55284b출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
메소드 Stop은(는) 각각의 제네릭 진단 루틴에 대해 서브기능 Stop(0x02)을(를) 갖는 UDS RoutineControl 요청 시 호출됩니다[SWS_DM_00555]. 타입화된 루틴 인터페이스[SWS_DM_00592]와(과) 비교하여, 이는 루틴 식별자 routineId 및 요청 데이터를 원시 데이터 스팬 requestData(으)로 받습니다[SWS_DM_00555].
입력 데이터 스팬의 수명:requestData의 메모리 영역은 연관된 Promise이(가) 충족되거나 실행이 cancellationHandler을(를) 통해 취소될 때까지 유효하게 유지됩니다[SWS_DM_00555].
취소 처리: 애플리케이션은 cancellationHandler.IsCanceled()을(를) 통해 현재 진단 대화가 취소되었는지 확인하거나, 취소 시 트리거되는 알림 함수를 cancellationHandler.SetNotifier을(를) 통해 등록할 수 있습니다[SWS_DM_00555].
비동기성 및 반환: 이 함수는 비동기식으로 작동하며, 성공 시 긍정 UDS 응답을 위한 출력 데이터를 포함하는 ara::core::Future<OperationOutput>을(를) 반환합니다[SWS_DM_00555].
오류 처리는 부정 진단 반환값을 통해 수행됩니다. 루틴 중지에 실패하면 Future는 DiagUdsNrcErrc을(를) 통해 ISO 14229-1에 따른 적절한 UDS NRC 오류 코드로 완료되어야 합니다[SWS_DM_00555].
동시성과 관련하여 이 메소드는 noexcept 및 예외 안전으로 지정되어 있습니다. 구체적인 구현이 스레드 안전하게 설계되어야 하는지 여부는 생성자에서 인스턴스화 시 전달된 ConcurrencyType에 따라 달라집니다[SWS_DM_00555].
conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor
Parameter (in)
Parameter
Beschreibung
routineId
the corresponding RoutineIdentifier
requestData
Content of request message (without RoutineIdentifier). Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfo
MetaData of the request.
cancellationHandler
This parameter is used to • Query the current cancellation status by calling cancellationHandler.IsCanceled. Returns TRUE in case, the current conversation has been cancelled and FALSE otherwise. • Register a notifier function by calling cancellationHandler.SetNotifier. The registered notifier is called if the current conversation is cancelled.
This StopOffer will disable the forwarding of request messages from DM.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 73588f5f0b57출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
ara::diag::GenericRoutine::StopOffer 메서드는 Diagnostic Management(DM)의 수신 진단 요청을 해당 루틴 인스턴스로 전달하는 것을 비활성화합니다 [SWS_DM_00558]. 이 함수는 시그니처 void StopOffer() noexcept;를 가지며 파라미터를 받지 않고 반환값을 제공하지 않습니다 [SWS_DM_00558]. 호출은 동기식으로 처리되며, 해당 시점부터 루틴이 더 이상 요청을 수신하지 않음을 DM에 알립니다.
오류 처리
이 연산은 exception safe로 지정되어 있으며 noexcept으로 선언되어 있습니다 [SWS_DM_00558]. 실행 시 오류 코드나 C++ 예외는 발생하지 않습니다. 진단 모듈에서 이 인터페이스에 대해 개발 또는 오류 메모리 인스턴스(DET/DEM)로 전달되는 특정 메시지는 정의되어 있지 않습니다.
동시성 및 제약사항
스레딩 동작과 관련하여 이 메서드는 not thread-safe로 명시되어 있습니다 [SWS_DM_00558]. 따라서 ara::diag::GenericRoutine의 동일한 인스턴스에 대한 동시 호출은 애플리케이션 측에서 동기화되어야 합니다. 해석: 호출은 주로 루틴이 일시적으로 비활성화되거나 이전에 제공 호출이 수행된 후 애플리케이션이 제어된 방식으로 종료될 때 발생할 것으로 보입니다. 질문 Q-e110ce01110699e3 (열림)
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문