Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
alive_supervision.h
1#ifndef ALIVE_SUPERVISION_H
2#define ALIVE_SUPERVISION_H
3
4#include <atomic>
5#include <chrono>
6#include <future>
7#include "./elementary_supervision.h"
8
9namespace ara
10{
11 namespace phm
12 {
15 namespace supervisors
16 {
19 {
20 private:
21 static const TypeOfSupervision cSupervisionType;
22
23 const uint16_t mExpectedAliveIndicationsMin;
24 const uint16_t mExpectedAliveIndicationsMax;
25 const uint8_t mFailedReferenceCyclesTolerance;
26
27 uint8_t mAliveCounter;
28 std::atomic_bool mRunning;
29 std::atomic_uint16_t mAliveIndications;
30 std::future<void> mFuture;
31
32 void supervise(std::chrono::milliseconds aliveReferenceCycle);
33
34 public:
43 uint16_t expectedAliveIndications,
44 uint16_t minMargin,
45 uint16_t maxMargin,
46 std::chrono::milliseconds aliveReferenceCycle,
47 uint8_t failedReferenceCyclesTolerance);
48
49 AliveSupervision() = delete;
51
53 void ReportAliveness() noexcept;
54 };
55 }
56 }
57}
58
59#endif
Supervision method to check an entity aliveness periodically.
Definition: alive_supervision.h:19
void ReportAliveness() noexcept
Report the expected checkpoint.
Definition: alive_supervision.cpp:81
An abstract class the enables a supervision method to report its elementary supervion status.
Definition: elementary_supervision.h:26
TypeOfSupervision
Supervision algorithm type.
Definition: recovery_action.h:14