RTC Toolkit 6.0.0-pre2
Loading...
Searching...
No Matches
alertAggregator.hpp
Go to the documentation of this file.
1
12
13#ifndef RTCTK_RTCSUPERVISOR_ALERTAGGREGATOR_HPP
14#define RTCTK_RTCSUPERVISOR_ALERTAGGREGATOR_HPP
15
18
19#include <map>
20#include <mutex>
21#include <string>
22
23namespace rtctk::rtcSupervisor {
24
29public:
33 using ObjectList = std::vector<std::string>;
34
35 AlertAggregator(AlertServiceIf& alerts, OldbIf& oldb, const ObjectList& objects);
36 virtual ~AlertAggregator();
37
38private:
39 void OnAlertStatusChanged(const std::string& id, bool status);
40
41 struct ObjectInfo {
43 AlertSource alert_source;
44 };
45
46 AlertServiceIf& m_alerts;
47 OldbIf& m_oldb;
48 std::mutex m_mutex;
49 std::map<std::string, ObjectInfo> m_objects;
50};
51
52} // namespace rtctk::rtcSupervisor
53
54#endif // RTCTK_RTCSUPERVISOR_STATUSESTIMATOR_HPP
Declares AlertService.
Alert Service interface.
Definition alertServiceIf.hpp:138
Models a single alert source that can be set or cleared.
Definition alertServiceIf.hpp:47
Base interface for all OLDB adapters.
Definition oldbIf.hpp:25
size_t SubscriptionId
Definition repositorySubscriberIf.hpp:51
componentFramework::OldbIf OldbIf
Definition alertAggregator.hpp:32
std::vector< std::string > ObjectList
Definition alertAggregator.hpp:33
componentFramework::AlertServiceIf AlertServiceIf
Definition alertAggregator.hpp:30
componentFramework::AlertSource AlertSource
Definition alertAggregator.hpp:31
virtual ~AlertAggregator()
Definition alertAggregator.cpp:56
AlertAggregator(AlertServiceIf &alerts, OldbIf &oldb, const ObjectList &objects)
Definition alertAggregator.cpp:23
Definition alertAggregator.cpp:19
Header file for OldbIf, which defines the API for OldbAdapters.