진단 런타임 환경이 애플리케이션에서 파일 및 디렉터리 데이터를 단계적으로 가져올 수 있도록 지원합니다.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: a81aee002281출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
진단 런타임 환경이 애플리케이션에서 파일 및 디렉터리 데이터를 단계적으로 가져올 수 있도록 지원합니다.
ara::diag::DataTransferReadByPullHandler 클래스는 UDS 읽기 작업의 일환으로 진단 계층 AraDiag이 애플리케이션에서 능동적으로 가져오는([SWS_DM_01506]) 파일 또는 디렉터리 데이터를 제공하는 역할을 합니다. 동작 절차에는 Read()을 통한 단계적 데이터 조회부터 ExitRead()를 통한 최종 세션 종료까지 포함됩니다. 엄격한 수명 주기 조건으로서, 정확히 단일 전송 세션에 할당된 핸들러 인스턴스는 ExitRead() 호출 전에 절대로 소멸되어서는 안 됩니다([SWS_DM_01510]).
상호작용에는 외부 UDS 클라이언트(진단 테스터), 진단 서브시스템 AraDiag, 애플리케이션별 핸들러 구현체 등 세 가지 컴포넌트가 참여합니다. 외부 클라이언트가 읽기 요청을 전송하면, AraDiag은 핸들러의 메서드를 호출하여 점진적으로 데이터 청크를 제공하고 이를 UDS 클라이언트에 전송합니다([SWS_DM_01513]).
수명 주기
핸들러 인스턴스의 수명 주기는 단일 파일 전송 세션에 독점적으로 바인딩됩니다. 기본 생성자는 protected로 선언되어 있습니다([SWS_DM_01507]). 해석: 따라서 구체적인 애플리케이션은 파생 서브클래스를 구현하고 인스턴스화할 것으로 보입니다. 질문 Q-cb78bc4a1d40968b (열림)
데이터 조회: 데이터 블록을 제공하기 위해 AraDiag은 Read() 메서드를 호출합니다([SWS_DM_01513], AUTOSAR_AP_SWS_Diagnostics §8.10.2.1.3.2 “Read”). 애플리케이션은 AraDiag이 사전 할당한 버퍼에 대한 메모리 뷰 response_data(타입: ara::core::Span<const ara::core::Byte>)를 수신하고, 이를 다음 파일 내용으로 채운 뒤 기록된 바이트 수와 함께 ara::core::Future<std::uint32_t>을 완료합니다. AraDiag은 이 데이터를 블록 시퀀스 카운터(blockSequenceCounter) 뒤에 transferResponseParameterRecord로 긍정 UDS 응답에 삽입합니다([SWS_DM_01513]). 이 단계는 후속 청크에 대해 반복됩니다.
세션 종료: 전송을 정상적으로 종료하기 위해 AraDiag은 ExitRead()을 호출합니다([SWS_DM_01514], AUTOSAR_AP_SWS_Diagnostics §8.10.2.1.3.1 “ExitRead”). 종료 이유 exit_type, 제조사별 파라미터(transfer_request_parameter_record), meta_info 및 cancellation_handler이 전달됩니다. 구현체는 ara::core::Future<ara::core::Vector<ara::core::Byte>>을 통해 이를 확인하며, 그 반환값은 긍정 응답에서 SID 뒤에 전달됩니다([SWS_DM_01514]).
해제:ExitRead() 호출이 완료된 후에만 핸들러 객체를 소멸시킬 수 있습니다([SWS_DM_01510]).
데이터 준비 또는 종료 중 오류가 발생하면, 애플리케이션은 이를 ISO 14229-1에 따른 UDS 오류 코드(DiagUdsNrcErrc)와 함께 반환된 Future을 통해 보고합니다([SWS_DM_01513], [SWS_DM_01514]). 그런 다음 AraDiag는 테스터에 해당하는 부정 UDS 응답(NRC)을 생성합니다.
조기 취소를 위해 두 메서드 모두에 CancellationHandler이 전달됩니다([SWS_DM_01513], [SWS_DM_01514]). 애플리케이션은 대화가 취소되었는지 여부를 cancellation_handler.IsCanceled()을 통해 확인하거나 cancellation_handler.SetNotifier()를 통해 콜백 함수를 등록할 수 있습니다. 제공된 버퍼(response_data 및 transfer_request_parameter_record)는 프라미스가 충족되거나 핸들러를 통해 취소될 때까지 유효하게 유지됩니다.
ExitRead() 호출 전에 인스턴스가 소멸되면 규격 요구사항 위반([SWS_DM_01510])이며, 불완전한 전송 세션 및 정의되지 않은 시스템 상태로 이어질 수 있습니다.
이 클래스 가이드는 AUTOSAR Adaptive R25-11 규격을 기반으로 하며 ara::diag::DataTransferReadByPullHandler 인터페이스에 대한 요구사항을 요약합니다.
Reads data chunk from the application. The first or subsequent file/directory info content chunk to be sent back to the UDS client will be composed by the application and copied into the provided by ara::diag Span with up to the requested Span size.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 7a822a7b2a3d출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
순수 가상 메서드 ExitRead은(는) ara::diag::DataTransferReadByPullHandler[SWS_DM_01514] (AUTOSAR_AP_SWS_Diagnostics §8.10.2.1.3.1 “ExitRead”)의 프레임워크 내에서 진행 중인 데이터 전송 세션을 종료합니다. 이 메서드는 매개변수로 종료 이유 exit_type(타입 DataTransferExitType), transfer_request_parameter_record의 차량 제조업체별 매개변수(ara::core::Span<const ara::core::Byte> 형태), 요청 컨텍스트 meta_info 및 cancellation_handler을(를) 받습니다. 매개변수 transfer_request_parameter_record은(는) 관련 Promise가 충족되거나 Cancellation-Handler를 통해 실행이 취소될 때까지 유효하게 유지됩니다 [SWS_DM_01514].
성공 시 Future는 긍정 응답 메시지를 위해 제공되며, OperationOutput.response_data의 데이터는 서비스 ID 뒤에 transferResponseParameterRecord(으)로 배치됩니다.
오류 발생 시 Future는 부정 응답 메시지를 위해 DiagUdsNrcErrc의 ISO 14229-1에 따른 UDS 오류 코드(NRC)로 충족됩니다.
이 함수는 noexcept(으)로 선언되어 예외 안전(exception safe)하지만, 스레드 안전하지 않습니다(not thread-safe) [SWS_DM_01514]. cancellation_handler을(를) 통해 cancellation_handler.IsCanceled()(으)로 취소 상태를 쿼리하거나 cancellation_handler.SetNotifier()을(를) 통해 대화 취소에 대한 알림 함수를 등록할 수 있습니다 [SWS_DM_01514].
순서와 관련하여 ExitRead()이(가) 호출되기 전에는 DataTransferReadByPullHandler 인스턴스를 어떠한 경우에도 소멸시켜서는 안 됩니다 [SWS_DM_01510]. 해당 종료 함수 및 소멸자 조건은 ara::diag::DataTransferReadSharedDataHandler::ExitRead[SWS_DM_01505] ([SWS_DM_01499]) 및 ara::diag::DataTransferReadByPushHandler::ExitRead[SWS_DM_01523] ([SWS_DM_01519])에 대해서도 병렬로 존재합니다.
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
MetaInfo 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.
A Future, which either gets readied to OperationOutput (transfer ResponseParameterRecord for a positive response message) or readied with UDS 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.
Reads data chunk from the application. The first or subsequent file/directory info content chunk to be sent back to the UDS client will be composed by the application and copied into the provided by ara::diag Span with up to the requested Span size.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 104f857aa59e출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용법 및 호출 시맨틱
ara::diag::DataTransferReadByPullHandler 클래스의 메서드 Read은(는) UDS 데이터 전송 프레임워크 내에서 애플리케이션이 데이터 블록을 읽어오는 데 사용됩니다[SWS_DM_01513]. 애플리케이션은 첫 번째 또는 후속 파일 또는 디렉터리 콘텐츠 블록을 조합하고, 이를 ara::diag에서 전달된 버퍼 response_data(유형 ara::core::Span<const ara::core::Byte>)에 스팬 크기까지 복사합니다.
호출은 비동기식으로 수행되며 ara::core::Future<std::uint32_t>을(를) 반환합니다[SWS_DM_01513]. 성공 시 Future는 실제로 제공된 바이트 수로 충족되며, 이 데이터는 긍정 UDS 응답에서 blockSequenceCounter 뒤에 transferResponseParameterRecord(으)로 배치됩니다. 매개변수 cancellation_handler을(를) 통해 애플리케이션은 IsCanceled()을(를) 사용하여 중단 상태를 쿼리하거나 SetNotifier()을(를) 통해 중단에 대한 알림 함수를 등록할 수 있습니다.
오류 처리 및 제약 조건
오류가 발생하면 Future는 ISO 14229-1에 따라 DiagUdsNrcErrc의 적용 가능한 UDS NRC로 완료됩니다[SWS_DM_01513]. 인터페이스가 offer()을(를) 통해 제공되지 않거나 더 이상 제공되지 않는 경우, DM은 NRC 0x94(ResourceTemporarilyNotAvailable)(으)로 응답합니다[SWS_DM_01257].
동시성 및 상호 작용
이 인터페이스는 스레드 안전하지 않음(not thread-safe)이지만 예외 안전(exception safe)으로 지정되어 있습니다[SWS_DM_01513]. response_data의 메모리 영역은 관련 Promise가 충족되거나 작업이 중단될 때까지만 유효합니다. 데이터 전송을 위한 풀(pull) 패턴의 대안으로 DataTransferReadByPushHandler::Read[SWS_DM_01522]을(를) 통한 푸시(push) 방식 및 DataTransferReadSharedOwnershipHandler::Read[SWS_DM_01504]을(를) 통한 공유 소유권 전송이 존재합니다.
The view over a pre-allocated by AraDiag memory to write in this data chunk. Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
meta_info
MetaInfo 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.
A Future, which either gets readied to actual amount of data provided in the Span (for a positive response message) or readied with UDS ErrorCode from DiagUdsNrcErrc (for an negative response message). Data in response_data will be placed after 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 · 독일어 원문