18 #ifndef __DIAGNOSTICS_H_ 19 #define __DIAGNOSTICS_H_ 59 std::chrono::time_point<std::chrono::system_clock>
Time;
62 DiagnosticStatus() : Level(0), Message(
""), Recommendation(
""), Time(
std::chrono::system_clock::now()){};
83 m_StatusQueLength = 5;
86 m_StatusList =
new std::deque<DiagnosticStatus>[m_StatusQueLength];
89 m_Default_Ok_Value = 0;
113 NewStatus.
Level = Level;
114 NewStatus.
Time = std::chrono::system_clock::now();
117 m_StatusList->push_front(NewStatus);
118 m_StatusList->pop_back();
128 NewStatus.
Level = Level;
129 NewStatus.
Time = std::chrono::system_clock::now();
131 NewStatus.
Message = Recommendation;
133 m_StatusList->push_front(NewStatus);
134 m_StatusList->pop_back();
144 NewStatus.
Level = Level;
145 NewStatus.
Time = std::chrono::system_clock::now();
149 NewStatus.
Message = Recommendation;
151 m_StatusList->push_front(NewStatus);
152 m_StatusList->pop_back();
164 NewStatus.
Time = std::chrono::system_clock::now();
166 m_StatusList->push_front(NewStatus);
167 m_StatusList->pop_back();
183 Recommendation->clear();
186 Level = (
short*)ActualStatus.
Level;
187 Message->append(ActualStatus.
Message);
197 return ActualStatus.
Level;
229 return m_StatusQueLength;
237 m_StatusQueLength = StatusQueLength;
245 return m_StatusQueLength;
255 return m_Default_Ok_Value = 0;
263 m_Default_Ok_Value = Default_Ok_Value;
ErrorcodeReport Errorcode_Report
std::string ReadActualStatusRecommendation()
Retuns the actual status recommendation.
int ReadActualStatusLevel()
Retuns the actual status level.
ErrorcodeReport (helper-)class for status reporting of common libraries.
std::string Errorcode_Namespace
void ReportStatus(int Errorcode, std::string Errorcode_Namespace)
automatic report of status by errorcode. Can be used for return values of library functions...
std::string Recommendation
DiagnosticStatus()
Constructor.
void ReadActualStatus(short *Level, std::string *Message, std::string *Recommendation)
Read the status.
int GetDefaultOKValue()
Default ok value read/write.
void ReportStatus(short Level, std::string Message)
Report a Status.
int GetMaxStatusQueLength()
Gets the maximal length of status history that can be read.
std::deque< DiagnosticStatus > * m_StatusList
DiagnosticStatus (helper-)class for status reporting of common libraries.
void SetDefaultOKValue(int Default_Ok_Value)
sets a new default ok value
Diagnostics class for status reporting of common libraries.
std::string ReadActualStatusMessage()
Retuns the actual status message.
std::chrono::time_point< std::chrono::system_clock > Time
ErrorcodeReport()
Constructor.
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
int GetActualStatusQueLength()
status que length
void SetMaxStatusQueLength(int StatusQueLength)
Sets the maximal length of status history that can be read. Default is 5 elements.