22 #ifndef SKIN_DIAGNOSTIC_DEFINITIONS
23 #define SKIN_DIAGNOSTIC_DEFINITIONS
32 namespace diagnostics {
106 std::string errortype_str;
108 uint8_t error_type = code & 0x000f;
109 uint16_t outofrange_error = (code & 0xfff0)>>4;
120 errortype_str+=
"no ack";
125 errortype_str+=
"not connected";
130 errortype_str+=
"unknown error";
135 std::stringstream ss;
136 int numoftaxel_in_error = 0;
137 for(
int i=0; i<12; i++)
139 if(outofrange_error & (1<<i))
141 numoftaxel_in_error++;
146 std::stringstream outs;
147 if(numoftaxel_in_error>0)
149 outs << numoftaxel_in_error <<
" taxels are out of range:"<< ss.str();
153 outs <<
"None taxels are out of range";
157 outs <<
". Triangle error is "<< errortype_str;
159 outs <<
". Triangle has not error ";
std::string printErrorCode(int code)
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.
Enum to provide intelligible error codes for the skin.
SkinErrorCode(ErrorCode t)