12#ifndef RTCTK_COMPONENTFRAMEWORK_ALERTSERVICE_HPP
13#define RTCTK_COMPONENTFRAMEWORK_ALERTSERVICE_HPP
15#include <log4cplus/logger.h>
56 boost::signals2::connection connection;
66 void CollectGarbage();
71 mutable std::recursive_mutex m_api_mtx;
76 std::vector<Shadow> m_shadow = {};
80 log4cplus::Logger m_logger;
95 std::vector<AlertServiceIf::AlertStatus>
const& active);
96 log4cplus::Logger m_logger;
97 boost::signals2::scoped_connection m_connection;
119 log4cplus::Logger logger);
126 std::vector<AlertStatusObserverIf::AlertStatus>
const& active);
130 log4cplus::Logger m_logger;
131 boost::signals2::scoped_connection m_connection;
133 std::unique_ptr<TypedEventPublisher<AlertStatusEvent>> m_publisher;
Header file for AlertServiceIf and related classes.
Uniquely describes an alert.
Definition: alertServiceIf.hpp:152
Alert observer that publishes alerts to event service using the typed event AlertStatusEvent.
Definition: alertService.hpp:106
Simple alert observer that writes alerts to log.
Definition: alertService.hpp:89
Alert Service interface.
Definition: alertServiceIf.hpp:315
Implementation of AlertServiceIf.
Definition: alertService.hpp:29
ReducedStatus GetReducedStatus() const override
Get the reduced status.
Definition: alertService.cpp:35
std::vector< AlertStatus > GetAlertStatuses() const override
Get status of all alert conditions.
Definition: alertService.cpp:40
AlertSource MakeAlertSource(AlertDescription const &description) override
Creates a new alert source for the specified alert condition.
Definition: alertService.cpp:59
~AlertService() noexcept
Destructor will automatically stop notifier.
Definition: alertService.cpp:32
boost::signals2::connection ConnectReducedStatus(ReducedStatusSignal::slot_type slot) override
Connects a slot to the reduced alert signal.
Definition: alertService.cpp:54
Models a single alert source that can be set or cleared.
Definition: alertServiceIf.hpp:48
std::chrono::system_clock::time_point TimePoint
Timestamp type.
Definition: alertServiceIf.hpp:74
Interface to observe alert status.
Definition: alertServiceIf.hpp:209
boost::signals2::signal< void(ReducedStatus const &, std::vector< AlertStatus > const &)> ReducedStatusSignal
Signal emitted for every change in reduced alert status.
Definition: alertServiceIf.hpp:264
std::optional< bool > ReducedStatus
Represents current alert status.
Definition: alertServiceIf.hpp:220
Interface class for providing pub/sub facilities for JSON events.
Definition: eventServiceIf.hpp:29
A high-level event service API that is aware of event types.
Definition: typedEventService.hpp:248
Framework-provided event definitions.
Definition: commandReplier.cpp:22
Structure describing an alert condition with status from the corresponding AlertSource.
Definition: alertServiceIf.hpp:230
High-level API of the event service.