RTC Toolkit  2.0.0
Classes | Public Types | Public Member Functions | List of all members
rtctk::componentFramework::AlertStatusObserverIf Class Referenceabstract

Interface to observe alert status. More...

#include <alertServiceIf.hpp>

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

Classes

struct  AlertStatus
 Structure describing an alert condition with status from the corresponding AlertSource. More...
 

Public Types

using ReducedStatus = std::optional< bool >
 Represents current alert status. More...
 
using TimePoint = std::chrono::system_clock::time_point
 Timestamp type used throughout AlertServiceIf. More...
 

Public Member Functions

virtual ~AlertStatusObserverIf () noexcept=default
 
Accessors
virtual ReducedStatus GetReducedStatus () const =0
 Get the reduced status. More...
 
virtual std::vector< AlertStatusGetAlertStatuses () const =0
 Get status of all alert conditions. More...
 

Signals

using ReducedStatusSignal = boost::signals2::signal< void(ReducedStatus const &, std::vector< AlertStatus > const &)>
 Signal emitted for every change in reduced alert status. More...
 
virtual boost::signals2::connection ConnectReducedStatus (ReducedStatusSignal::slot_type slot)=0
 Connects a slot to the reduced alert signal. More...
 

Detailed Description

Interface to observe alert status.

Member Typedef Documentation

◆ ReducedStatus

Represents current alert status.

  • boolean true means there is at least one AlertSource with an active alert.
  • boolean false means all AlertSources are inactive.
  • std::nullopt means the status is indeterminate.

◆ ReducedStatusSignal

using rtctk::componentFramework::AlertStatusObserverIf::ReducedStatusSignal = boost::signals2::signal<void( ReducedStatus const&, std::vector<AlertStatus> const&)>

Signal emitted for every change in reduced alert status.

The reduced signal is the reduced status of all alert sources, combined as follows:

  1. Any AlertSource active -> Alert active.
  2. All AlertSources inactive -> Alert inactive.

Signal arguments are:

  • Reduced alert status.
  • Active alert sources.

◆ TimePoint

using rtctk::componentFramework::AlertStatusObserverIf::TimePoint = std::chrono::system_clock::time_point

Timestamp type used throughout AlertServiceIf.

Constructor & Destructor Documentation

◆ ~AlertStatusObserverIf()

virtual rtctk::componentFramework::AlertStatusObserverIf::~AlertStatusObserverIf ( )
virtualdefaultnoexcept

Member Function Documentation

◆ ConnectReducedStatus()

virtual boost::signals2::connection rtctk::componentFramework::AlertStatusObserverIf::ConnectReducedStatus ( ReducedStatusSignal::slot_type  slot)
pure virtual

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.

Implemented in rtctk::componentFramework::AlertService.

◆ GetAlertStatuses()

virtual std::vector<AlertStatus> rtctk::componentFramework::AlertStatusObserverIf::GetAlertStatuses ( ) const
pure virtual

Get status of all alert conditions.

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

Implemented in rtctk::componentFramework::AlertService.

◆ GetReducedStatus()

virtual ReducedStatus rtctk::componentFramework::AlertStatusObserverIf::GetReducedStatus ( ) const
pure virtual

Get the reduced status.

Implemented in rtctk::componentFramework::AlertService.


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