UDS 읽기 요청 시 애플리케이션이 파일 및 디렉터리 내용을 능동적으로 제공할 수 있도록 지원합니다.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 1ed24b3e3197출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
UDS 읽기 요청 시 애플리케이션이 파일 및 디렉터리 내용을 능동적으로 제공할 수 있도록 지원합니다.
ara::diag::DataTransferReadByPushHandler 클래스는 애플리케이션이 파일 내용을 능동적으로 패킷화하여 제공하는 UDS 읽기 전송을 위한 기본 인터페이스 역할을 합니다[SWS_DM_01515]. 데이터 블록은 Read()을 통해 순차적으로 전달되며, 이후 ExitRead()을 통해 전송 세션이 질서정연하게 완료됩니다[SWS_DM_01523]. 각 핸들러는 정확히 하나의 전송 세션에 엄격하게 바인딩되므로 복사 작업이 금지됩니다. 주요 수명 주기 조건으로서, 인스턴스는 ExitRead() 호출 전에 절대로 소멸되어서는 안 됩니다[SWS_DM_01519].
컨텍스트
ara::diag::DataTransferReadByPushHandler 클래스는 RequestReadFile 또는 RequestReadDirectory와 같은 요청에 의해 시작된 진단 데이터 전송을 위한 기본 및 인터페이스 클래스 역할을 합니다[SWS_DM_01515]. 기본 전송 패턴은 푸시(Push) 원칙을 기반으로 합니다. 즉, 파일 또는 디렉터리 데이터가 특정 애플리케이션 구현체에 의해 능동적으로 패킷화되어 Diagnostic Management(DM)로 전달됩니다AUTOSAR_AP_SWS_Diagnostics §8.10.3 “Class: DataTransferReadByPushHandler”. 외부 UDS 클라이언트, 플랫폼 컴포넌트 ara::diag, 애플리케이션의 구체적인 핸들러 구현체 간에 상호작용이 이루어집니다.
DataTransferReadByPushHandler은 추상 기본 클래스로 설계되었으므로 매개변수가 없는 생성자는 보호된 접근 수준(protected)을 가집니다[SWS_DM_01516]. 인스턴스화는 애플리케이션 내 파생 클래스의 컨텍스트에서 수행됩니다. 인스턴스는 정확히 하나의 파일 전송 세션에 엄격하게 바인딩되며(“one way usage”), 결과적으로 복사 생성자 [SWS_DM_01518] 및 복사 할당 연산자 [SWS_DM_01521]는 명시적으로 삭제됩니다(=delete). 이동 생성자 [SWS_DM_01517] 및 이동 할당 [SWS_DM_01520]은 기본 구현으로 제공되고 예외 안전(noexcept)으로 선언되어 있으므로 이동 작업을 통해 소유권 전송이 가능합니다.
운영 흐름은 데이터 프래그먼트의 반복적인 제공과 체계적인 세션 종료로 나뉩니다. 읽기 작업이 시작된 후 ara::diag은 Read() 메서드를 반복적으로 호출합니다[SWS_DM_01522], AUTOSAR_AP_SWS_Diagnostics §8.10.3.1.3.2 “Read”. 이때 프레임워크는 최적의 처리량을 달성하기 위한 바이트 단위의 권장 반환 크기 가이드라인(recommended_number_bytes_to_return), 요청 컨텍스트(MetaInfo) 및 CancellationHandler을 전달합니다. 애플리케이션은 데이터 패킷을 생성하고 ara::core::Future<ara::core::Vector<ara::core::Byte>>을 통해 해당 소유권을 Diagnostic Management로 이전하며, Diagnostic Management는 블록 시퀀스 카운터 뒤에 페이로드를 UDS 응답 메시지에 삽입합니다[SWS_DM_01522].
모든 데이터 블록이 전송되었거나 세션을 종료해야 하는 즉시 ara::diag은 ExitRead() 메서드를 호출합니다[SWS_DM_01523], AUTOSAR_AP_SWS_Diagnostics §8.10.3.1.3.1 “ExitRead”. 종료 이유(DataTransferExitType exit_type) 외에도 제조사별 요청 파라미터가 transfer_request_parameter_record을 통해 전달됩니다. 이 파라미터 span의 수명은 연관된 프라미스가 충족되거나 처리가 취소될 때까지 구속력 있게 결합됩니다[SWS_DM_01523]. Future을 통해 최종 응답 파라미터 세트가 반환된 후 전송이 종료된 것으로 간주되며, 이로써 핸들러 객체를 안전하게 소멸시키기 위한 조건이 충족됩니다[SWS_DM_01519].
데이터 블록 조합 중 또는 세션 종료 시 오류가 발생하면 해당 ara::core::Future을 통해 비동기식으로 보고됩니다. 긍정 응답 구조 대신 퓨처는 ISO 14229-1에 따른 적절한 부정 응답 코드(Negative Response Code, NRC)에 해당하는 DiagUdsNrcErrc 범위의 오류 코드(ara::core::ErrorCode)와 함께 제공됩니다[SWS_DM_01522], [SWS_DM_01523].
진단 대화가 중단되거나 클라이언트가 취소 요청을 보내면 전달된 CancellationHandler이 적용됩니다. 구현체는 cancellation_handler.IsCanceled()을 통해 현재 취소 상태를 쿼리하거나 대화 취소 시 트리거되는 콜백 함수를 cancellation_handler.SetNotifier()를 통해 등록할 수 있습니다[SWS_DM_01522], [SWS_DM_01523]. 프라미스의 충족 또는 취소는 동시에 ExitRead() 내 파라미터 세트의 유효성 종료를 의미합니다[SWS_DM_01523].
이 가이드는 AUTOSAR Adaptive Platform 릴리스 R25-11 사양을 기반으로 합니다.
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 its ownership is passed as a result to ara::diag.
exit_type (DataTransferExitType): 전송 종료 이유를 지정합니다[SWS_DM_01523].
transfer_request_parameter_record (ara::core::Span<const ara::core::Byte>): 데이터 전송을 지원하기 위한 제조업체별 매개변수를 포함합니다. 기본 데이터는 관련 Promise가 충족되거나 처리가 중단될 때까지 유효해야 합니다[SWS_DM_01523].
meta_info (MetaInfo const &): 진단 요청의 메타 정보를 전달합니다[SWS_DM_01523].
cancellation_handler (CancellationHandler): 세션 중단 시 IsCanceled()을(를) 사용하여 중단 상태를 확인하거나 SetNotifier()을(를) 통해 콜백 함수를 등록하는 데 사용됩니다[SWS_DM_01523].
오류 처리 및 반환값
성공 시 Future은(는) 출력 데이터를 제공하며, 이는 긍정 UDS 응답에서 SID 뒤에 transferResponseParameterRecord(으)로 배치됩니다[SWS_DM_01523]. 실패 시 Future은(는) ISO 14229-1에 따라 DiagUdsNrcErrc의 적절한 부정 응답 코드(NRC)로 완료됩니다[SWS_DM_01523].
동시성 및 수명 주기
이 메서드는 예외 안전(exception safe)이지만 명시적으로 스레드 안전하지 않음(not thread-safe)으로 지정되어 있습니다[SWS_DM_01523]. 객체 수명 주기와 관련하여 구속력 있는 순서 조건이 존재합니다: DataTransferReadByPushHandler의 인스턴스는 ExitRead()을(를) 호출하기 전에 결코 소멸되어서는 안 됩니다[SWS_DM_01519]. 데이터 전송의 관련 핸들러 클래스에도 유사한 요구사항이 적용됩니다[SWS_DM_01510][SWS_DM_01499].
이 텍스트는 AUTOSAR Adaptive R25-11 명세를 기반으로 AI에 의해 생성되었습니다.
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 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 its ownership is passed as a result to ara::diag.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: fcd7efa833df출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
ara::diag::DataTransferReadByPushHandler 클래스의 순수 가상 메서드 Read은(는) 애플리케이션으로부터 파일 또는 디렉터리 정보용 데이터 블록을 비동기식으로 읽어오는 데 사용됩니다[SWS_DM_01522]. 애플리케이션은 각각의 데이터 청크를 조합하고 그 소유권을 ara::core::Vector<ara::core::Byte>(으)로 진단 모듈에 이전합니다.
사용법 및 호출 컨텍스트
이 호출은 헤더 파일 ara/diag/data_transfer.h을(를) 통해 UDS 클라이언트를 위한 응답 데이터를 제공하기 위해 Diagnostic Server에 의해 수행됩니다[SWS_DM_01522]. 이 메서드는 세 가지 매개변수를 예상합니다:
recommended_number_bytes_to_return: 최적의 처리량을 위한 권장 바이트 수입니다. 이 값은 Diagnostic Management의 내부 버퍼 또는 PDU 크기를 기반으로 할 것으로 보입니다. 질문 Q-1a8c1270b192b96f (열림)
meta_info: 수신 진단 요청의 추가 메타 정보입니다(MetaInfo).
cancellation_handler: 연결 중단 시 cancellation_handler.IsCanceled()을(를) 통해 중단 상태를 쿼리하거나 cancellation_handler.SetNotifier()을(를) 사용하여 알림을 등록할 수 있도록 합니다.
처리에 실패하면 Future는 ISO 14229-1에 따른 적절한 NRC를 매핑하는 DiagUdsNrcErrc의 오류 코드로 충족됩니다[SWS_DM_01522]. 인터페이스가 서비스에 의해 아직 또는 더 이상 offer()(으)로 제공되지 않는 경우, Diagnostic Manager는 NRC 0x94(ResourceTemporarilyNotAvailable)(으)로 요청에 응답합니다[SWS_DM_01257]. 이 메서드는 예외 안전(exception safe)이지만 스레드 안전하지 않음(not thread-safe)으로 지정되어 있으므로[SWS_DM_01522], 동시 호출은 애플리케이션 측에서 동기화되어야 합니다.
상호 작용
이 인터페이스의 푸시(push) 원칙은 진단 모듈의 대안적인 읽기 메커니즘을 보완합니다: 사전 정의된 메모리 영역을 사용하는 ara::diag::DataTransferReadByPullHandler::Read[SWS_DM_01513]을(를) 통한 풀(pull) 방식 및 ReleaseHandler[SWS_DM_01504]을(를) 사용한 공유 메모리 영역 제공이 있습니다.
The recommended number of bytes to send back to DM in order to
bytes_to_return
get optimum data throughput.
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 ReadPushOutput (transfer ResponseParameterRecord for a positive response message) or readied with ErrorCode from DiagUdsNrcErrc (for a negative response message). Data in ReadPushOutput.responseData will be placed after block SequenceCounter 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 · 독일어 원문