Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
deadline_supervision.h
1#ifndef DEADLINE_SUPERVISION_H
2#define DEADLINE_SUPERVISION_H
3
4#include <chrono>
5#include <condition_variable>
6#include <mutex>
7#include <thread>
8#include "./elementary_supervision.h"
9
10namespace ara
11{
12 namespace phm
13 {
14 namespace supervisors
15 {
18 {
19 private:
20 static const TypeOfSupervision cSupervisionType;
21
22 const std::chrono::milliseconds cMinDeadline;
23 const std::chrono::milliseconds cMaxDeadline;
24
25 std::thread mDeadlineThread;
26 bool mTargetIsReached;
27 std::mutex mCvMutex;
28 std::condition_variable mDeadlineCv;
29 std::chrono::time_point<std::chrono::steady_clock> mTimeReference;
30
31 void deadlineWorker();
32
33 public:
39 std::chrono::milliseconds minDeadline,
40 std::chrono::milliseconds maxDeadline);
41
42 DeadlineSupervision() = delete;
44
47
50 };
51 }
52 }
53}
54
55#endif
Supervision method to check an entity aliveness via the source and target checkpoints.
Definition: deadline_supervision.h:18
void ReportTargetCheckpoint()
Report the occurrence of the target checkpoint.
Definition: deadline_supervision.cpp:74
void ReportSourceCheckpoint()
Report the occurrence of the source checkpoint.
Definition: deadline_supervision.cpp:55
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