MIRA
Public Types | Public Member Functions | Static Public Member Functions | List of all members
StatusManager Class Reference

Manages the status of one or multiple modules inheriting from DiagnosticsModule. More...

#include <fw/Status.h>

Public Types

typedef std::multimap< std::string, StatusStatusMap
 

Public Member Functions

void setID (const std::string &id)
 Set the id that is used for displaying status messages. More...
 
Status::StatusMode getStatus () const
 Get the overall status mode defined by the status of all registered diagnostic modules. More...
 
Status::StatusMode getStatus (const std::string &diagnosticModule) const
 Get the status of the specified diagnostic module. More...
 
void registerDiagnostics (const std::string &name, DiagnosticsModulePtr ptr)
 Register a new diagnostics module by specifying a name and a pointer to the module. More...
 
void unregisterDiagnostics (const std::string &name)
 Unregister a diagnostics module. More...
 
void unregisterDiagnostics (DiagnosticsModulePtr ptr)
 Unregister a diagnostics module. More...
 
std::vector< std::string > getDiagnosticModules () const
 Get the list of all registered modules. More...
 
StatusMap getStatusMap () const
 Gets the current status map. More...
 
DiagnosticsModule::StatusMap getStatusMap (const std::string &diagnosticModule) const
 Gets the current status map of the specified diagnostics module. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 

Static Public Member Functions

static Status::StatusMode getOverallStatus (StatusMap::const_iterator start, StatusMap::const_iterator end)
 Return the overall (most severe) status from a range of status map entries. More...
 

Detailed Description

Manages the status of one or multiple modules inheriting from DiagnosticsModule.

Member Typedef Documentation

◆ StatusMap

typedef std::multimap<std::string, Status> StatusMap

Member Function Documentation

◆ getOverallStatus()

static Status::StatusMode getOverallStatus ( StatusMap::const_iterator  start,
StatusMap::const_iterator  end 
)
inlinestatic

Return the overall (most severe) status from a range of status map entries.

◆ setID()

void setID ( const std::string &  id)
inline

Set the id that is used for displaying status messages.

◆ getStatus() [1/2]

Status::StatusMode getStatus ( ) const

Get the overall status mode defined by the status of all registered diagnostic modules.

◆ getStatus() [2/2]

Status::StatusMode getStatus ( const std::string &  diagnosticModule) const

Get the status of the specified diagnostic module.

◆ registerDiagnostics()

void registerDiagnostics ( const std::string &  name,
DiagnosticsModulePtr  ptr 
)

Register a new diagnostics module by specifying a name and a pointer to the module.

The status of this module is taken into account when getting the overall status using getStatus().

◆ unregisterDiagnostics() [1/2]

void unregisterDiagnostics ( const std::string &  name)

Unregister a diagnostics module.

The status of this module will not longer contribute to the overall status.

◆ unregisterDiagnostics() [2/2]

void unregisterDiagnostics ( DiagnosticsModulePtr  ptr)

Unregister a diagnostics module.

The status of this module will not longer contribute to the overall status.

◆ getDiagnosticModules()

std::vector<std::string> getDiagnosticModules ( ) const

Get the list of all registered modules.

◆ getStatusMap() [1/2]

StatusMap getStatusMap ( ) const

Gets the current status map.

◆ getStatusMap() [2/2]

DiagnosticsModule::StatusMap getStatusMap ( const std::string &  diagnosticModule) const

Gets the current status map of the specified diagnostics module.

◆ reflect()

void reflect ( Reflector &  r)
inline

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