Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
platform_health_management.h
1#ifndef PLATFORM_HEALTH_MANAGEMENT_H
2#define PLATFORM_HEALTH_MANAGEMENT_H
3
4#include <set>
5#include "../../arxml/arxml_reader.h"
6#include "../../ara/exec/helper/modelled_process.h"
7#include "../../ara/phm/checkpoint_communicator.h"
8#include "../../ara/phm/supervisors/alive_supervision.h"
9#include "../../ara/phm/supervisors/deadline_supervision.h"
10#include "../../ara/phm/supervisors/global_supervision.h"
11#include "../helper/log_recovery_action.h"
12
13namespace application
14{
15 namespace platform
16 {
19 {
20 private:
21 static const std::string cAppId;
22 const ara::exec::FunctionGroup cFunctionGroup;
23
24 ara::phm::CheckpointCommunicator *const mCheckpointCommunicator;
28 helper::LogRecoveryAction mRecoveryAction;
29 std::map<uint32_t, std::function<void()>> mReportDelegates;
30
31 static uint32_t getCheckpointId(const std::string& content);
32 static void fillCheckpoints(
33 const arxml::ArxmlReader &reader,
34 std::set<uint32_t> &checkpoints);
35
36 void onReportCheckpoint(uint32_t checkpoint);
37 bool tryAddReportDelegate(
38 std::string checkpointIdStr,
39 const std::set<uint32_t> &checkpoints,
40 std::function<void()> &&delegate);
41 void configureAliveSupervision(
42 const arxml::ArxmlReader &reader,
43 const std::set<uint32_t> &checkpoints);
44 void configureDeadlineSupervision(
45 const arxml::ArxmlReader &reader,
46 const std::set<uint32_t> &checkpoints);
47 void onGlobalStatusChanged(
49
50 protected:
51 int Main(
52 const std::atomic_bool *cancellationToken,
53 const std::map<std::string, std::string> &arguments) override;
54
55 public:
61 AsyncBsdSocketLib::Poller *poller,
62 ara::phm::CheckpointCommunicator *checkpointCommunicator,
63 std::string functionGroup);
64
66 };
67 }
68}
69
70#endif
A class to provide logging as the recovery action for a failed supervised entity.
Definition: log_recovery_action.h:13
Platform health managment modelled process.
Definition: platform_health_management.h:19
PlatformHealthManagement(AsyncBsdSocketLib::Poller *poller, ara::phm::CheckpointCommunicator *checkpointCommunicator, std::string functionGroup)
Constructor.
Definition: platform_health_management.cpp:10
int Main(const std::atomic_bool *cancellationToken, const std::map< std::string, std::string > &arguments) override
Main running block of the process.
Definition: platform_health_management.cpp:290
A function group representative based on a manifest.
Definition: function_group.h:14
A class that models an instance of an Adaptive (Platform) Application executable.
Definition: modelled_process.h:20
An abstract class to communicate a checkpoint between an application and the PHM cluster.
Definition: checkpoint_communicator.h:15
Supervision method to check an entity aliveness periodically.
Definition: alive_supervision.h:19
Supervision method to check an entity aliveness via the source and target checkpoints.
Definition: deadline_supervision.h:18
A class to report the global supervision status based on several elementary supervisions.
Definition: global_supervision.h:26
A class to read ARXML configuration files.
Definition: arxml_reader.h:14
AUTOSAR application namespace.
Definition: diag_message_handler.cpp:5
Supervision update on global status.
Definition: global_supervision.h:15