1#ifndef ECU_RESET_REQUEST_H
2#define ECU_RESET_REQUEST_H
4#include "./routing/routable_uds_service.h"
23 static const uint8_t cSid{0x11};
25 std::promise<ResetRequestType> mResetTypePromise;
26 std::future<ResetRequestType> mResetTypeFuture;
27 bool mRapidShutdownEnabled;
29 bool TryHandleSubFunction(
33 bool &powerDownTimeRequired);
41 const std::vector<uint8_t> &requestData,
AUTOSAR shortname-path wrapper.
Definition: instance_specifier.h:14
A wrapper around a possible value.
Definition: optional.h:16
A wrapper class around a conversation cancellation handler callback.
Definition: cancellation_handler.h:12
ECU reset request handling service.
Definition: ecu_reset_request.h:21
std::future< OperationOutput > HandleMessage(const std::vector< uint8_t > &requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler) override
Handle an UDS request message.
Definition: ecu_reset_request.cpp:87
std::future< void > EnableRapidShutdown(bool enable, const MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)
Set enable state of the rapid shutdown (stand-by) mode.
Definition: ecu_reset_request.cpp:178
EcuResetRequest(const core::InstanceSpecifier &specifier)
Constructor.
Definition: ecu_reset_request.cpp:10
std::future< void > RequestReset(ResetRequestType resetType, core::Optional< uint8_t > id, const MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)
Request the ECU to reset.
Definition: ecu_reset_request.cpp:144
void ExecuteReset(const MetaInfo &metaInfo)
Execute the ECU reset after the request handling.
Definition: ecu_reset_request.cpp:166
An UDS service to handle a diagnostic request by offering itself to a router.
Definition: routable_uds_service.h:28
ResetRequestType
ECU reset request type.
Definition: ecu_reset_request.h:12
@ kKeyOffOnReset
!< ECU reset due to disconnecting and re-connecting the power supply
@ kHardReset
!< ECU reset due to an application request
@ kCustomReset
!< ECU reset due to the ignition key off and on