Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::diag::EcuResetRequest Class Reference

ECU reset request handling service. More...

#include <ecu_reset_request.h>

Inheritance diagram for ara::diag::EcuResetRequest:
ara::diag::routing::RoutableUdsService

Public Member Functions

 EcuResetRequest (const core::InstanceSpecifier &specifier)
 Constructor. More...
 
std::future< OperationOutputHandleMessage (const std::vector< uint8_t > &requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler) override
 Handle an UDS request message. More...
 
std::future< void > RequestReset (ResetRequestType resetType, core::Optional< uint8_t > id, const MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)
 Request the ECU to reset. More...
 
void ExecuteReset (const MetaInfo &metaInfo)
 Execute the ECU reset after the request handling. More...
 
std::future< void > EnableRapidShutdown (bool enable, const MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)
 Set enable state of the rapid shutdown (stand-by) mode. More...
 
- Public Member Functions inherited from ara::diag::routing::RoutableUdsService
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...
 
void StopOffer () noexcept
 Stop offering request handling.
 

Additional Inherited Members

- Static Public Attributes inherited from ara::diag::routing::RoutableUdsService
static const uint8_t cNegativeResponseCodeSid {0x7f}
 Negative response code service ID.
 
- Protected Member Functions inherited from ara::diag::routing::RoutableUdsService
 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...
 
- Protected Attributes inherited from ara::diag::routing::RoutableUdsService
const uint8_t cSubFunctionNotSupported {0x12}
 Unsupported sub-function NRC.
 
const uint8_t cIncorrectMessageLength {0x13}
 Incorrect message length NRC.
 
const uint8_t cRequestSequenceError {0x24}
 Incorrect request sequence NRC.
 
- Static Protected Attributes inherited from ara::diag::routing::RoutableUdsService
static const uint8_t cPositiveResponseSidIncrement {0x40}
 SID increment for a positive response.
 

Detailed Description

ECU reset request handling service.

Constructor & Destructor Documentation

◆ EcuResetRequest()

ara::diag::EcuResetRequest::EcuResetRequest ( const core::InstanceSpecifier specifier)
explicit

Constructor.

Parameters
specifierInstance specifier that owns the service

Member Function Documentation

◆ EnableRapidShutdown()

std::future< void > ara::diag::EcuResetRequest::EnableRapidShutdown ( bool  enable,
const MetaInfo metaInfo,
CancellationHandler &&  cancellationHandler 
)

Set enable state of the rapid shutdown (stand-by) mode.

Parameters
enableIndicate whether or not the rapid shutdown should be enabled
metaInfoRequest handling meta-info
cancellationHandlerRequest cancellation token
Returns
Valid future without any exception
Note
The method is not compatible with the ARA standard.

◆ ExecuteReset()

void ara::diag::EcuResetRequest::ExecuteReset ( const MetaInfo metaInfo)

Execute the ECU reset after the request handling.

Parameters
metaInfoECU reset execution meta-info
Note
The method is not compatible with the ARA standard.
Exceptions
std::logic_errorThrows when the reset has not been requested
Remarks
The method will be called via DM after RequestReset is being triggered.

◆ HandleMessage()

std::future< OperationOutput > ara::diag::EcuResetRequest::HandleMessage ( const std::vector< uint8_t > &  requestData,
MetaInfo metaInfo,
CancellationHandler &&  cancellationHandler 
)
overridevirtual

Handle an UDS request message.

Parameters
requestDataRequest message byte array
metaInfoRequest message metainfo
cancellationHandlerCallback to be invoked when the current conversation is cancelled
Returns
Response byte array

Implements ara::diag::routing::RoutableUdsService.

◆ RequestReset()

std::future< void > ara::diag::EcuResetRequest::RequestReset ( ResetRequestType  resetType,
core::Optional< uint8_t >  id,
const MetaInfo metaInfo,
CancellationHandler &&  cancellationHandler 
)

Request the ECU to reset.

Parameters
resetTypeECU reset type
idType of the custom ECU reset ID (if applicable)
metaInfoRequest handling meta-info
cancellationHandlerRequest cancellation token
Returns
Valid future without any exception
Note
The method is not compatible with the ARA standard.