MIRA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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, Status
StatusMap
 

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

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

Member Function Documentation

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.

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

Set the id that is used for displaying status messages.

Status::StatusMode getStatus ( ) const

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

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

Get the status of the specified diagnostic module.

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().

void unregisterDiagnostics ( const std::string &  name)

Unregister a diagnostics module.

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

void unregisterDiagnostics ( DiagnosticsModulePtr  ptr)

Unregister a diagnostics module.

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

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

Get the list of all registered modules.

StatusMap getStatusMap ( ) const

Gets the current status map.

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

Gets the current status map of the specified diagnostics module.

void reflect ( Reflector &  r)
inline

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