An UDS service to handle a diagnostic request by offering itself to a router. More...
#include <routable_uds_service.h>
Public Member Functions | |
uint8_t | GetSid () const noexcept |
Get SID. More... | |
ara::core::Result< void > | Offer () |
Offer handling DM requests. More... | |
bool | IsOffered () const noexcept |
Get offering status of the service. More... | |
virtual std::future< OperationOutput > | HandleMessage (const std::vector< uint8_t > &requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)=0 |
Handle an UDS request message. More... | |
void | StopOffer () noexcept |
Stop offering request handling. | |
Static Public Attributes | |
static const uint8_t | cNegativeResponseCodeSid {0x7f} |
Negative response code service ID. | |
Protected Member Functions | |
RoutableUdsService (const ara::core::InstanceSpecifier &specifier, uint8_t sid) noexcept | |
Constructor. More... | |
void | GenerateNegativeResponse (OperationOutput &response, uint8_t nrc) const |
Generate a negative response with a specific NRC. More... | |
template<class T > | |
bool | TryExtractValue (MetaInfo &metaInfo, std::string key, T &value) const |
Try to extract a value from the given meta-info. More... | |
Static Protected Attributes | |
static const uint8_t | cPositiveResponseSidIncrement {0x40} |
SID increment for a positive response. | |
An UDS service to handle a diagnostic request by offering itself to a router.
|
protectednoexcept |
Constructor.
specifier | Owner instance specifier |
sid | UDS service ID |
|
protected |
Generate a negative response with a specific NRC.
[out] | response | Generated negative response |
nrc | Given Negative Response Code (NRC) |
|
noexcept |
Get SID.
|
pure virtual |
Handle an UDS request message.
requestData | Request message byte array |
metaInfo | Request message metainfo |
cancellationHandler | Callback to be invoked when the current conversation is cancelled |
Implemented in application::helper::ReadDataByIdentifier, ara::diag::EcuResetRequest, ara::diag::GenericRoutine, ara::diag::routing::RequestTransfer, ara::diag::routing::RequestTransferExit, ara::diag::routing::TransferData, and ara::diag::SecurityAccess.
|
noexcept |
Get offering status of the service.
ara::core::Result< void > ara::diag::routing::RoutableUdsService::Offer | ( | ) |
Offer handling DM requests.
|
inlineprotected |
Try to extract a value from the given meta-info.
T | Extracted value integer type |
metaInfo | Given meta-info for value extraction | |
key | Value key within the given meta-info | |
[out] | value | Extracted value |