Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
generic_routine.h
1#ifndef GENERIC_ROUTINE_H
2#define GENERIC_ROUTINE_H
3
4#include "./routing/routable_uds_service.h"
5#include "./reentrancy.h"
6
7namespace ara
8{
9 namespace diag
10 {
14 {
15 private:
16 static const uint8_t cSid{0x31};
17
18 ReentrancyType mReentrancy;
19
20 public:
24 explicit GenericRoutine(
25 const core::InstanceSpecifier &specifier,
26 ReentrancyType reentrancyType);
27
28 std::future<OperationOutput> HandleMessage(
29 const std::vector<uint8_t> &requestData,
30 MetaInfo &metaInfo,
31 CancellationHandler &&cancellationHandler) override;
32
38 virtual std::future<OperationOutput> Start(
39 uint16_t routineId,
40 std::vector<uint8_t> requestData,
41 MetaInfo &metaInfo,
42 CancellationHandler &&cancellationHandler) = 0;
43
49 virtual std::future<OperationOutput> Stop(
50 uint16_t routineId,
51 std::vector<uint8_t> requestData,
52 MetaInfo &metaInfo,
53 CancellationHandler &&cancellationHandler) = 0;
54
60 virtual std::future<OperationOutput> RequestResults(
61 uint16_t routineId,
62 std::vector<uint8_t> requestData,
63 MetaInfo &metaInfo,
64 CancellationHandler &&cancellationHandler) = 0;
65 };
66 }
67}
68
69#endif
AUTOSAR shortname-path wrapper.
Definition: instance_specifier.h:14
A wrapper class around a conversation cancellation handler callback.
Definition: cancellation_handler.h:12
A service to execute a specific sequence of instructions (routine) and obtain the result.
Definition: generic_routine.h:14
virtual std::future< OperationOutput > RequestResults(uint16_t routineId, std::vector< uint8_t > requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)=0
Request the results of a routine.
std::future< OperationOutput > HandleMessage(const std::vector< uint8_t > &requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler) override
Handle an UDS request message.
Definition: generic_routine.cpp:16
GenericRoutine(const core::InstanceSpecifier &specifier, ReentrancyType reentrancyType)
Constructor.
Definition: generic_routine.cpp:9
virtual std::future< OperationOutput > Start(uint16_t routineId, std::vector< uint8_t > requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)=0
Request starting a routine.
virtual std::future< OperationOutput > Stop(uint16_t routineId, std::vector< uint8_t > requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)=0
Request stopping a routine.
Diagnostic metainfo in different context.
Definition: meta_info.h:24
An UDS service to handle a diagnostic request by offering itself to a router.
Definition: routable_uds_service.h:28
ReentrancyType
Reentrancy type of an instance.
Definition: reentrancy.h:12