진단 요청 시 공유 메모리 영역을 통해 전체 파일 또는 디렉터리를 읽을 수 있도록 지원합니다.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 4c654c39d186출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
진단 요청 시 공유 메모리 영역을 통해 전체 파일 또는 디렉터리를 읽을 수 있도록 지원합니다.
ara::diag::DataTransferReadSharedDataHandler 클래스는 공유 메모리([SWS_DM_01497])를 통한 파일 및 디렉터리 내용의 읽기 진단 데이터 전송을 처리하는 데 사용됩니다. 세션이 시작된 후 애플리케이션 구현체는 Read()를 통해 전체 데이터를 공유 데이터 뷰로 제공하고, ReleaseHandler에 의한 해제 알림이 있을 때까지 할당된 버퍼를 유지합니다([SWS_DM_01504]). 핸들러 전용 객체를 소멸시키기 전에 반드시 ExitRead()를 통해 전송 세션을 종료해야 합니다. 이 객체는 단일 전송 세션 전용이므로 이동할 수는 있지만 복사할 수는 없습니다.
컨텍스트
ara::diag::DataTransferReadSharedDataHandler 클래스는 diag 모듈(AUTOSAR_AP_SWS_Diagnostics §8.10.5 “Class: DataTransferReadSharedDataHandler”) 내 AUTOSAR Adaptive Platform의 진단 영역에 속합니다. 이 클래스의 핵심 역할은 RequestReadFile 또는 RequestReadDirectory와 같은 UDS 요청에 의해 트리거된 파일 및 디렉터리 내용에 대한 데이터 전송을 처리하는 것입니다([SWS_DM_01497]). 각 전송 블록마다 개별 복사 단계를 거치는 대신, 이 핸들러를 사용하면 애플리케이션별 구현체가 전체 데이터를 연속된 공유 메모리 영역으로 제공할 수 있습니다.
전체 시스템 흐름에서 세 가지 주요 주체가 협력합니다. 외부 UDS 클라이언트가 제어기에 읽기 요청을 전송합니다. 진단 런타임 환경 AraDiag은 요청을 수신하여 DataTransferReadSharedDataHandler의 구체적인 구현체로 실행을 전달합니다([SWS_DM_01497], [SWS_DM_01504]). 세 번째 파트너인 ReleaseHandler는 플랫폼에서 공유 메모리 리소스가 더 이상 필요하지 않아 해제될 수 있는 즉시 애플리케이션에 신호를 보냅니다([SWS_DM_01504]).
동시성과 관련하여 핵심 메서드 Read() 및 ExitRead()은 스레드 안전하지 않은 것(not thread-safe)으로 식별되는 반면, 인터페이스의 모든 함수는 예외 안전성(exception safe)을 보장합니다([SWS_DM_01498], [SWS_DM_01504], [SWS_DM_01505]).
사용 경로
공유 메모리 영역을 사용한 데이터 전송의 일반적인 호출 순서는 여러 단계로 구성됩니다:
공유 데이터 제공:AraDiag은 순수 가상 메서드 Read()을 호출하고 ReleaseHandler, MetaInfo 및 CancellationHandler를 전달합니다([SWS_DM_01504]). 애플리케이션은 전체 파일 또는 디렉터리 콘텐츠를 할당하고 이에 대한 공유 뷰를 ara::core::Span<ara::core::Byte>로서 ara::core::Future을 통해 AraDiag에 다시 전달합니다([SWS_DM_01504]).
메모리 유지 및 해제: 애플리케이션은 메모리 영역을 안전하게 해제할 수 있음을 ReleaseHandler이 알릴 때까지 할당된 메모리를 반드시 온전하게 유지해야 합니다([SWS_DM_01504]). 애플리케이션은 이를 위해 ReleaseHandler에 알림자(notifier) 함수를 등록하거나 그 상태를 능동적으로 쿼리할 수 있습니다([SWS_DM_01504]). 해석: ReleaseHandler을 통한 신호 전달은 데이터 블록이 UDS 클라이언트에 성공적으로 전송되는 즉시 AraDiag에 의해 비동기적으로 수행될 것으로 보입니다. 질문 Q-0fbc1c5e667c9a68 (열림)
데이터 제공 시 또는 전송 종료 시 오류가 발생하면, ISO 14229-1에 따른 DiagUdsNrcErrc 도메인의 ara::core::ErrorCode과 함께 각 ara::core::Future을 통해 보고됩니다([SWS_DM_01504], [SWS_DM_01505]).
또 다른 시나리오는 진행 중인 진단 대화의 취소입니다. 두 메서드 모두 CancellationHandler을 수신합니다([SWS_DM_01504], [SWS_DM_01505]). 애플리케이션은 cancellation_handler.IsCanceled()을 통해 취소 상태를 동기식으로 확인하거나 조기 취소 시 즉각적으로 대응할 수 있도록 cancellation_handler.SetNotifier()를 통해 알림 함수를 등록할 수 있습니다([SWS_DM_01504], [SWS_DM_01505]).
소멸자와 관련된 선행 조건 위반(즉, ExitRead()이 호출되기 전에 객체가 소멸되는 경우)은 요구사항 [SWS_DM_01499]에 위배되며 잘못된 프로그램 상태를 초래합니다.
이 클래스 가이드는 AUTOSAR Adaptive Platform 릴리스 R25-11 사양을 기반으로 한다.
Provides the whole data to be read out from the application in form of a shared data view. The whole file/directory info content to be sent back to the UDS client will be allocated by the application and its shared ownership (view over the memory location) is passed as a result to AraDiag. The allocated memory must be kept until the ReleaseHandler’s notifier is invoked or the status polled, signalling that the memory, addressed by the Span now can safely be released.
exit_type (DataTransferExitType): 세션 종료 이유를 지정합니다.
transfer_request_parameter_record (ara::core::Span<const ara::core::Byte>): 전송을 지원하기 위한 제조업체별 매개변수를 포함합니다. 데이터는 관련 Promise가 충족되거나 처리가 취소될 때까지 유효하게 유지됩니다.
meta_info (MetaInfo const&): 진단 요청의 추가 메타 정보를 포함합니다.
cancellation_handler (CancellationHandler): cancellation_handler.IsCanceled()을(를) 통한 취소 상태 확인 및 대화 취소 시 호출되는 알림 함수의 cancellation_handler.SetNotifier()을(를) 통한 등록을 허용합니다.
오류 처리 및 반환값
성공적으로 완료되면 Future은(는) 긍정 응답에서 SID 뒤에 배치되는 출력 데이터(transferResponseParameterRecord)를 제공합니다 [SWS_DM_01505]. 오류 발생 시 Future은(는) DiagUdsNrcErrc의 오류 코드(ISO 14229-1에 따른 해당 NRC)로 충족됩니다 [SWS_DM_01505].
동시성 및 수명 주기
이 메서드는 noexcept(으)로 선언되어 있지만(exception safe), 명시적으로 not thread-safe로 지정되어 있습니다 [SWS_DM_01505]. 객체 수명 주기와 관련하여 ExitRead()이(가) 호출되기 전에는 DataTransferReadSharedDataHandler 인스턴스를 어떠한 경우에도 소멸시켜서는 안 된다는 규정이 적용됩니다([SWS_DM_01499]). 관련 클래스 DataTransferReadByPullHandler ([SWS_DM_01514]) 및 DataTransferReadByPushHandler ([SWS_DM_01523])에 대해서도 유사한 종료 함수 및 소멸자 요구사항이 존재합니다.
이 사용 지침은 AI에 의해 작성되었으며 AUTOSAR Adaptive Platform의 사양을 기반으로 합니다.
This parameter record contains parameter(s), which are required
parameter_record
by the server to support the transfer of data. Format and length of this parameter(s) are vehicle manufacturer specific. Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
meta_info
contains additional meta information of the request.
cancellation_handler
This parameter is used to • Query the current cancellation status by calling cancellation_ handler.IsCanceled(). Returns true in case, the current conversation has been cancelled and false otherwise. • Register a notifier function by calling cancellation_handler.Set Notifier(). The registered notifier is called if the current conversation is cancelled.
Returns a Future, which either gets readied to OperationOutput (transferResponseParameterRecord for a positive response message) or readied with ErrorCode from DiagUdsNrcErrc (for an negative response message). Data in OperationOutput.response_data will be placed after SID as transferResponseParameterRecord in the positive response.
Fehler
Fehlercode
Beschreibung
Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc.
Request a governed re-review of this record. The record is not changed immediately.
Provides the whole data to be read out from the application in form of a shared data view. The whole file/directory info content to be sent back to the UDS client will be allocated by the application and its shared ownership (view over the memory location) is passed as a result to AraDiag. The allocated memory must be kept until the ReleaseHandler’s notifier is invoked or the status polled, signalling that the memory, addressed by the Span now can safely be released.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: cba844c9db1e출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
인터페이스 ara::diag::DataTransferReadSharedDataHandler의 메서드 Read은(는) UDS 클라이언트를 위해 공유 메모리 뷰([SWS_DM_01504])를 통해 읽어올 파일 또는 디렉터리 데이터를 제공합니다. 호출은 비동기식으로 수행되며 ara::core::Span<ara::core::Byte>을(를) 포함하는 ara::core::Future을(를) 반환합니다([SWS_DM_01504]).
사용 및 수명 주기
구현 애플리케이션은 전체 콘텐츠를 직접 할당하고 해당 뷰를 AraDiag에 전달합니다. 기본 메모리 영역은 전달된 ReleaseHandler을(를) 통해 해당 알리미(notifier)에 의해 해제가 신호되거나 상태 확인을 통해 쿼리될 때까지([SWS_DM_01504]) 반드시 변경되지 않은 상태로 유지되어야 합니다. ReleaseHandler은(는) 동일한 UDS 클라이언트에 대해 MetaInfo을(를) 기반으로 저장되어야 합니다([SWS_DM_01504]). CancellationHandler을(를) 통해 진행 중인 전송을 IsCanceled()(으)로 모니터링하거나 중단 알리미를 SetNotifier()(으)로 등록할 수 있습니다([SWS_DM_01504]).
오류 처리 및 동시성
성공 시 데이터는 blockSequenceCounter 뒤에 transferResponseParameterRecord(으)로 전송됩니다([SWS_DM_01504]). 읽기에 실패하면 Future은(는) ISO 14229-1에 따라 DiagUdsNrcErrc의 적절한 오류 코드로 완료되어야 합니다([SWS_DM_01504]). 애플리케이션의 인터페이스가 아직 또는 더 이상 offer()(으)로 제공되지 않는 경우, 서버는 NRC 0x94(ResourceTemporarilyNotAvailable)를 보고합니다([SWS_DM_01257]). 이 함수는 noexcept 및 예외 안전으로 지정되어 있지만 스레드 안전하지 않은 것으로 간주됩니다(not thread-safe)([SWS_DM_01504]).
경계
데이터 블록이 미리 정의된 버퍼로 복사되는 DataTransferReadByPullHandler::Read([SWS_DM_01513])이나 소유권 이전을 통해 벡터를 제공하는 DataTransferReadByPushHandler::Read([SWS_DM_01522])와 달리, 이 핸들러는 버퍼 복사 없이 공유 메모리를 통해 전체 콘텐츠를 전송합니다([SWS_DM_01504]).
The release shared resource handler to be stored and used by the application until a new one is passed for the same meta_info (UDS client).
meta_info
Contains additional meta information.
cancellation_handler
This parameter is used to • Query the current cancellation status by calling cancellation_ handler.IsCanceled(). Returns true in case, the current conversation has been cancelled and false otherwise. • Register a notifier function by calling cancellation_handler.Set Notifier(). The registered notifier is called if the current conversation is cancelled.
Returns a Future, which either gets readied to ReadSharedOutput (transferResponseParameterRecord for a positive response message) or readied with ErrorCode from DiagUdsNrcErrc (for an negative response message). Data in ReleaseSharedHandler.responseData will be placed after the blockSequenceCounter as transferResponseParameterRecord in the positive response.
Fehler
Fehlercode
Beschreibung
Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc.
Request a governed re-review of this record. The record is not changed immediately.
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문