RTC Toolkit  2.0.0
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
rtctk::componentFramework::AlertStatusEvent Struct Reference

Event published when alert status is changed. More...

#include <eventDefinitions.hpp>

Inheritance diagram for rtctk::componentFramework::AlertStatusEvent:
rtctk::componentFramework::AbstractEvent

Classes

struct  Alert
 Represents an active alert originating from a component instance. More...
 

Public Member Functions

 AlertStatusEvent (bool st, std::vector< Alert > ac, std::string const &origin)
 Construct by providing members. More...
 
 AlertStatusEvent (JsonPayload const &json)
 Construct by deserializing from JSON. More...
 
JsonPayload ToJson () const
 Serialize to JSON. More...
 
- Public Member Functions inherited from rtctk::componentFramework::AbstractEvent
 AbstractEvent ()=delete
 
 AbstractEvent (JsonPayload const &payload)
 
 AbstractEvent (std::string const &origin)
 
JsonPayload ToJson () const
 

Public Attributes

bool status
 Reduced alert status. More...
 
std::vector< Alertactive_alerts
 
- Public Attributes inherited from rtctk::componentFramework::AbstractEvent
std::string origin
 
uint64_t time
 

Static Public Attributes

static const std::string TOPIC_NAME = "alert_status_topic"
 

Detailed Description

Event published when alert status is changed.

The type can represent the alert status of an individual component or can be combined and be reduced to represent status from multiple components or system.

Constructor & Destructor Documentation

◆ AlertStatusEvent() [1/2]

rtctk::componentFramework::AlertStatusEvent::AlertStatusEvent ( bool  st,
std::vector< Alert ac,
std::string const &  origin 
)
inline

Construct by providing members.

◆ AlertStatusEvent() [2/2]

rtctk::componentFramework::AlertStatusEvent::AlertStatusEvent ( JsonPayload const &  json)
inline

Construct by deserializing from JSON.

Member Function Documentation

◆ ToJson()

JsonPayload rtctk::componentFramework::AlertStatusEvent::ToJson ( ) const
inline

Serialize to JSON.

Member Data Documentation

◆ active_alerts

std::vector<Alert> rtctk::componentFramework::AlertStatusEvent::active_alerts

◆ status

bool rtctk::componentFramework::AlertStatusEvent::status

Reduced alert status.

◆ TOPIC_NAME

const std::string rtctk::componentFramework::AlertStatusEvent::TOPIC_NAME = "alert_status_topic"
inlinestatic

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