5#include "./routable_uds_service.h"
25 static const uint8_t cSid{0x36};
26 static const size_t cMemoryPoolSize{1024};
27 static const uint8_t cInitialBlockSequenceCounter{1};
29 const size_t cSequenceCounterIndex{1};
30 const size_t cRequestParameterOffset{2};
32 const uint8_t cWrongBlockSequenceCounter{0x73};
35 size_t mMemoryAddress;
37 std::array<uint8_t, cMemoryPoolSize> mMemoryPool;
38 uint8_t mCurrentBlockSequenceCounter;
39 uint8_t mNextBlockSequenceCounter;
41 bool tryValidateSequenceCounter(
44 uint8_t blockSequenceCounter,
45 const std::vector<std::uint8_t> &transferRequestParameterRecord,
46 std::promise<OperationOutput> &responsePromise);
62 size_t memorySize)
noexcept;
69 const std::vector<uint8_t> &requestData,
AUTOSAR shortname-path wrapper.
Definition: instance_specifier.h:14
A wrapper class around a conversation cancellation handler callback.
Definition: cancellation_handler.h:12
An UDS service to handle a diagnostic request by offering itself to a router.
Definition: routable_uds_service.h:28
A class to transfer data between diagnostic clients and the server.
Definition: transfer_data.h:23
TransferData(const ara::core::InstanceSpecifier &specifier) noexcept
Constructor.
Definition: transfer_data.cpp:14
bool TrySetTransferConfiguration(TransferDirection transferDirection, size_t memoryAddress, size_t memorySize) noexcept
Try to set the service transfer data configuration.
Definition: transfer_data.cpp:128
std::future< OperationOutput > HandleMessage(const std::vector< uint8_t > &requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler) override
Handle an UDS request message.
Definition: transfer_data.cpp:91
bool TryResetTransferConfiguration() noexcept
Try to reset the service transfer data configuration to default.
Definition: transfer_data.cpp:164
TransferDirection
Transfer data direction between diagnostic clients and the server.
Definition: transfer_data.h:15
@ kNone
Not specified transfer data direction.
@ kDownload
Transfer data from client to server.
@ kUpload
Transfer data from server to client.
Positive response of a handled UDS request.
Definition: routable_uds_service.h:17