RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
alertAggregator.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_RTCSUPERVISOR_ALERTAGGREGATOR_HPP
13#define RTCTK_RTCSUPERVISOR_ALERTAGGREGATOR_HPP
14
17
18#include <map>
19#include <mutex>
20#include <string>
21
22namespace rtctk::rtcSupervisor {
23
28public:
32 using ObjectList = std::vector<std::string>;
33
34 AlertAggregator(AlertServiceIf& alerts, OldbIf& oldb, const ObjectList& objects);
35 virtual ~AlertAggregator();
36
37private:
38 void OnAlertStatusChanged(const std::string& id, bool status);
39
40 struct ObjectInfo {
42 AlertSource alert_source;
43 };
44
45 AlertServiceIf& m_alerts;
46 OldbIf& m_oldb;
47 std::mutex m_mutex;
48 std::map<std::string, ObjectInfo> m_objects;
49};
50
51} // namespace rtctk::rtcSupervisor
52
53#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:24
size_t SubscriptionId
Definition repositorySubscriberIf.hpp:50
componentFramework::OldbIf OldbIf
Definition alertAggregator.hpp:31
std::vector< std::string > ObjectList
Definition alertAggregator.hpp:32
componentFramework::AlertServiceIf AlertServiceIf
Definition alertAggregator.hpp:29
componentFramework::AlertSource AlertSource
Definition alertAggregator.hpp:30
virtual ~AlertAggregator()
Definition alertAggregator.cpp:55
AlertAggregator(AlertServiceIf &alerts, OldbIf &oldb, const ObjectList &objects)
Definition alertAggregator.cpp:22
Definition alertAggregator.cpp:18
Header file for OldbIf, which defines the API for OldbAdapters.