RTC Toolkit  2.0.0
Classes | Public Member Functions | List of all members
rtctk::componentFramework::AlertService Class Reference

Implementation of AlertIf. More...

#include <alertService.hpp>

Inheritance diagram for rtctk::componentFramework::AlertService:
rtctk::componentFramework::AlertServiceIf rtctk::componentFramework::AlertStatusObserverIf rtctk::componentFramework::AlertSourceFactoryIf

Public Member Functions

 AlertService (log4cplus::Logger logger)
 
 ~AlertService () noexcept
 Destructor will automatically stop notifier. More...
 
boost::signals2::connection ConnectReducedStatus (ReducedStatusSignal::slot_type slot) override
 Connects a slot to the reduced alert signal. More...
 
AlertSource MakeAlertSource (AlertDescription const &description) override
 Creates a new alert source for the specified alert condition. More...
 
ReducedStatus GetReducedStatus () const override
 Get the reduced status. More...
 
std::vector< AlertStatusGetAlertStatuses () const override
 Get status of all alert conditions. More...
 
- Public Member Functions inherited from rtctk::componentFramework::AlertServiceIf
virtual ~AlertServiceIf () noexcept=default
 
- Public Member Functions inherited from rtctk::componentFramework::AlertStatusObserverIf
virtual ~AlertStatusObserverIf () noexcept=default
 
- Public Member Functions inherited from rtctk::componentFramework::AlertSourceFactoryIf
virtual ~AlertSourceFactoryIf () noexcept=default
 

Additional Inherited Members

- Public Types inherited from rtctk::componentFramework::AlertStatusObserverIf
using ReducedStatus = std::optional< bool >
 Represents current alert status. More...
 
using TimePoint = std::chrono::system_clock::time_point
 Timestamp type used throughout AlertServiceIf. More...
 
using ReducedStatusSignal = boost::signals2::signal< void(ReducedStatus const &, std::vector< AlertStatus > const &)>
 Signal emitted for every change in reduced alert status. More...
 

Detailed Description

Implementation of AlertIf.

Constructor & Destructor Documentation

◆ AlertService()

rtctk::componentFramework::AlertService::AlertService ( log4cplus::Logger  logger)
explicit
Parameters
loggerLogger instance to use.

◆ ~AlertService()

rtctk::componentFramework::AlertService::~AlertService ( )
noexcept

Destructor will automatically stop notifier.

Member Function Documentation

◆ ConnectReducedStatus()

boost::signals2::connection rtctk::componentFramework::AlertService::ConnectReducedStatus ( ReducedStatusSignal::slot_type  slot)
overridevirtual

Connects a slot to the reduced alert signal.

See ReducedStatusSignal for description.

Parameters
slotsignal slot invoked by unspecified thread when reduced status signal is emitted.
Returns
connection management object that allows caller to disconnect slot from signal.

Implements rtctk::componentFramework::AlertStatusObserverIf.

◆ GetAlertStatuses()

std::vector< AlertService::AlertStatus > rtctk::componentFramework::AlertService::GetAlertStatuses ( ) const
overridevirtual

Get status of all alert conditions.

Returns
vector of all Alerts and their current status as provided by the corresponding AlertSource.

Implements rtctk::componentFramework::AlertStatusObserverIf.

◆ GetReducedStatus()

AlertService::ReducedStatus rtctk::componentFramework::AlertService::GetReducedStatus ( ) const
overridevirtual

Get the reduced status.

Implements rtctk::componentFramework::AlertStatusObserverIf.

◆ MakeAlertSource()

AlertSource rtctk::componentFramework::AlertService::MakeAlertSource ( AlertDescription const &  description)
overridevirtual

Creates a new alert source for the specified alert condition.

Parameters
conditionfor which to create an AlertSource of.
Returns
AlertSource for condition.
Exceptions
AlertConflictExceptionif another alert source is alive with the same AlertDescription::GetId().
RtctkExceptionif other exceptions occurs (nested).

Implements rtctk::componentFramework::AlertSourceFactoryIf.


The documentation for this class was generated from the following files: