Go to the documentation of this file.
11 #ifndef RTCTK_COMPONENTFRAMEWORK_ALERTSERVICE_HPP
12 #define RTCTK_COMPONENTFRAMEWORK_ALERTSERVICE_HPP
14 #include <log4cplus/logger.h>
52 boost::signals2::connection connection;
62 void CollectGarbage();
67 mutable std::recursive_mutex m_api_mtx;
72 std::vector<Shadow> m_shadow = {};
76 log4cplus::Logger m_logger;
90 std::vector<AlertServiceIf::AlertStatus>
const& active);
91 log4cplus::Logger m_logger;
92 boost::signals2::scoped_connection m_connection;
113 log4cplus::Logger logger);
120 std::vector<AlertStatusObserverIf::AlertStatus>
const& active);
124 log4cplus::Logger m_logger;
125 boost::signals2::scoped_connection m_connection;
127 std::unique_ptr<TypedEventPublisher<AlertStatusEvent>> m_publisher;
132 #endif // RTCTK_COMPONENTFRAMEWORK_ALERTSERVICE_HPP
name
Definition: wscript:15
A high-level event service API that is aware of event types.
Definition: typedEventService.hpp:245
Models a single alert source that can be set or cleared.
Definition: alertServiceIf.hpp:42
Definition: commandReplier.cpp:20
High-level API of the event service.
Interface to observe alert status.
Definition: alertServiceIf.hpp:198
Header file for AlertServiceIf and related classes.
Alert observer that publishes alerts to event service using the typed event AlertStatusEvent.
Definition: alertService.hpp:100
std::chrono::system_clock::time_point TimePoint
Timestamp type.
Definition: alertServiceIf.hpp:68
AlertEventPublisher(std::string name, AlertStatusObserverIf &alert_service, EventServiceIf &event_service, log4cplus::Logger logger)
Constructor.
Definition: alertService.cpp:157
boost::signals2::signal< void(ReducedStatus const &, std::vector< AlertStatus > const &)> ReducedStatusSignal
Signal emitted for every change in reduced alert status.
Definition: alertServiceIf.hpp:253
Framework-provided event definitions.
Simple alert observer that writes alerts to log.
Definition: alertService.hpp:84
AlertService(log4cplus::Logger logger)
Definition: alertService.cpp:28
Uniquely describes an alert.
Definition: alertServiceIf.hpp:145
Alert Service interface.
Definition: alertServiceIf.hpp:303
Structure describing an alert condition with status from the corresponding AlertSource.
Definition: alertServiceIf.hpp:219
ReducedStatus GetReducedStatus() const override
Get the reduced status.
Definition: alertService.cpp:34
Interface class for providing pub/sub facilities for JSON events.
Definition: eventServiceIf.hpp:26
boost::signals2::connection ConnectReducedStatus(ReducedStatusSignal::slot_type slot) override
Connects a slot to the reduced alert signal.
Definition: alertService.cpp:53
Implementation of AlertIf.
Definition: alertService.hpp:25
std::vector< AlertStatus > GetAlertStatuses() const override
Get status of all alert conditions.
Definition: alertService.cpp:39
~AlertService() noexcept
Destructor will automatically stop notifier.
Definition: alertService.cpp:31
AlertSource MakeAlertSource(AlertDescription const &description) override
Creates a new alert source for the specified alert condition.
Definition: alertService.cpp:58
AlertLogger(log4cplus::Logger logger, AlertServiceIf &service)
Definition: alertService.cpp:131
std::optional< bool > ReducedStatus
Represents current alert status.
Definition: alertServiceIf.hpp:209