Diagnostics class for status reporting of common libraries. More...
#include <Diagnostics.h>
Public Member Functions | |
Diagnosics () | |
Constructor. | |
int | GetActualStatusQueLength () |
status que length | |
int | GetDefaultOKValue () |
Default ok value read/write. | |
int | GetMaxStatusQueLength () |
Gets the maximal length of status history that can be read. | |
void | ReadActualStatus (short *Level, std::string *Message, std::string *Recommendation) |
Read the status. | |
int | ReadActualStatusLevel () |
Retuns the actual status level. | |
std::string | ReadActualStatusMessage () |
Retuns the actual status message. | |
std::string | ReadActualStatusRecommendation () |
Retuns the actual status recommendation. | |
void | ReportStatus (short Level, std::string Message) |
Report a Status. | |
void | ReportStatus (short Level, std::string Message, std::string Recommendation) |
for simple status report by hand with problem solution | |
void | ReportStatus (short Level, int Errorcode, std::string Errorcode_Namespace, std::string Recommendation) |
report with manually set level for a errorcode and additional comments | |
void | ReportStatus (int Errorcode, std::string Errorcode_Namespace) |
automatic report of status by errorcode. Can be used for return values of library functions. | |
void | SetDefaultOKValue (int Default_Ok_Value) |
sets a new default ok value | |
void | SetMaxStatusQueLength (int StatusQueLength) |
Sets the maximal length of status history that can be read. Default is 5 elements. | |
~Diagnosics () | |
Destructor. | |
Private Attributes | |
int | m_Default_Ok_Value |
std::deque< DiagnosticStatus > * | m_StatusList |
int | m_StatusQueLength |
Diagnostics class for status reporting of common libraries.
This class is ment to provide a easy and short way to report the status (Errors and non-Errors) to the library itself and to ROS. It is designed close to the diagnostics msg topic to be easly wrapped.
Definition at line 72 of file Diagnostics.h.
Diagnosics::Diagnosics | ( | ) | [inline] |
Constructor.
Definition at line 81 of file Diagnostics.h.
Diagnosics::~Diagnosics | ( | ) | [inline] |
Destructor.
Definition at line 95 of file Diagnostics.h.
int Diagnosics::GetActualStatusQueLength | ( | ) | [inline] |
status que length
returns the Status que length right now
Definition at line 227 of file Diagnostics.h.
int Diagnosics::GetDefaultOKValue | ( | ) | [inline] |
Default ok value read/write.
returns the actual default ok value
Definition at line 253 of file Diagnostics.h.
int Diagnosics::GetMaxStatusQueLength | ( | ) | [inline] |
Gets the maximal length of status history that can be read.
Definition at line 243 of file Diagnostics.h.
void Diagnosics::ReadActualStatus | ( | short * | Level, |
std::string * | Message, | ||
std::string * | Recommendation | ||
) | [inline] |
Read the status.
Outputs the actual status to the passed pointers.
string arguments are resized for the message
Definition at line 177 of file Diagnostics.h.
int Diagnosics::ReadActualStatusLevel | ( | ) | [inline] |
Retuns the actual status level.
Definition at line 194 of file Diagnostics.h.
std::string Diagnosics::ReadActualStatusMessage | ( | ) | [inline] |
Retuns the actual status message.
Definition at line 203 of file Diagnostics.h.
std::string Diagnosics::ReadActualStatusRecommendation | ( | ) | [inline] |
Retuns the actual status recommendation.
Definition at line 212 of file Diagnostics.h.
void Diagnosics::ReportStatus | ( | short | Level, |
std::string | Message | ||
) | [inline] |
void Diagnosics::ReportStatus | ( | short | Level, |
std::string | Message, | ||
std::string | Recommendation | ||
) | [inline] |
for simple status report by hand with problem solution
Definition at line 124 of file Diagnostics.h.
void Diagnosics::ReportStatus | ( | short | Level, |
int | Errorcode, | ||
std::string | Errorcode_Namespace, | ||
std::string | Recommendation | ||
) | [inline] |
report with manually set level for a errorcode and additional comments
Definition at line 140 of file Diagnostics.h.
void Diagnosics::ReportStatus | ( | int | Errorcode, |
std::string | Errorcode_Namespace | ||
) | [inline] |
automatic report of status by errorcode. Can be used for return values of library functions.
Definition at line 158 of file Diagnostics.h.
void Diagnosics::SetDefaultOKValue | ( | int | Default_Ok_Value | ) | [inline] |
sets a new default ok value
Definition at line 261 of file Diagnostics.h.
void Diagnosics::SetMaxStatusQueLength | ( | int | StatusQueLength | ) | [inline] |
Sets the maximal length of status history that can be read. Default is 5 elements.
Definition at line 235 of file Diagnostics.h.
int Diagnosics::m_Default_Ok_Value [private] |
Definition at line 270 of file Diagnostics.h.
std::deque<DiagnosticStatus>* Diagnosics::m_StatusList [private] |
Definition at line 267 of file Diagnostics.h.
int Diagnosics::m_StatusQueLength [private] |
Definition at line 269 of file Diagnostics.h.