iCub-main
Loading...
Searching...
No Matches
diagnosticInfo.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2006-2018 Istituto Italiano di Tecnologia (IIT)
3 * All rights reserved.
4 *
5 * This software may be modified and distributed under the terms of the
6 * BSD-3-Clause license. See the accompanying LICENSE file for details.
7 */
8
9
10#ifndef __diagnosticInfo_h__
11#define __diagnosticInfo_h__
12
13#include <cstdint>
14#include <string>
15
16
17namespace Diagnostic {
18 enum class SeverityOfError {info=0, debug =1, warning =2, error=3, fatal=4}; //TBD
19 class EmbeddedInfo;
20 class TimeOfInfo;
21}
22
24{
25public:
26 uint32_t sec;
27 uint32_t msec;
28 uint32_t usec;
29
30 void toString(std::string &str_toi);
31
32};
33
34
36{
37public:
38 std::string sourceBoardIpAddrStr; // is the ipv4 address, in string, of the board that sends the diagnostic information
39 std::string sourceBoardName; // is the name of the board that sends the diagnostic information
40 std::string sourceCANPortStr; // if the diagnostic info si sent by a board on CAN, this field contains the CAN port expressed in string
41 uint8_t sourceCANBoardAddr; // if the diagnostic info is sent by a board on CAN, this field contains the CAN address of the board
42 std::string finalMessage; // contains the final diagostic message after the parsering
43 Diagnostic::SeverityOfError severity; // is the severity of the message
44 Diagnostic::TimeOfInfo timeOfInfo; //it is the time of the board when it sent the message
45 std::string axisName; //if the error contains the joint number, then axisName contain its name.
46
47public:
48 void printMessage();
49};
50
51
52
53#endif //__diagnosticInfo_h__
Diagnostic::TimeOfInfo timeOfInfo
Diagnostic::SeverityOfError severity
void toString(std::string &str_toi)