56 #include "rnr/rnrconfig.h" 59 #include "rnr/units.h" 93 "Serial device error",
95 "Communication error",
96 "Transmit packet failure",
97 "Receive packet failure",
98 "Transmit packet error",
99 "Receive packet time out",
100 "Received corrupted packet",
101 "Servo errored condition",
102 "Resource not available",
103 "feature/function no supported",
104 "Linked servos error",
105 "Operation not permitted on slave servo",
106 "BotSense proxy error",
108 "Shell run-time error",
156 const char *sPreface,
165 if( sPreface && *sPreface )
167 fprintf(fp,
"%s", sPreface);
170 for(i=0; i<uCount; ++i)
172 if( (uNLFreq > 0) && ((i % uNLFreq) == 0) && (i != 0) )
174 fprintf(fp,
"\n%*s", uCol,
"");
176 fprintf(fp, sFmt, buf[i]);
188 fp = LOG_GET_LOGFP();
190 fprintf(fp,
"%sDiag%d: ", LOG_PREFACE, LOG_GET_THRESHOLD()-1);
191 fprintf(fp,
"Servo %d alarms: ", nServoId);
195 fprintf(fp,
"no alarms;\n");
202 fprintf(fp,
"%s\n", strAlarms.c_str());
214 fp = LOG_GET_LOGFP();
216 fprintf(fp,
"%sDiag%d: %s", LOG_PREFACE, LOG_GET_THRESHOLD()-1, sPreface);
217 for(i=0; i<uCount; ++i)
223 fprintf(fp, sFmt, buf[i]);
RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
int DynaMapDxlToEcode(int nDxlError)
Map DXL library error code to Dynamixel error code.
Modified dynamixel SDK interface.
void DynaLogServoAlarms(int nServoId, uint_t uAlarms)
Log servo alarms.
#define DXL_COMM_TXFAIL
transmit failure error
#define DYNA_ECODE_RX_TIMEOUT
dynamixel receive packet time out
#define DYNA_ALARM_NONE
no alarms
#define DXL_COMM_TXERROR
packed transmit packet format error
#define DYNA_ECODE_RX_BAD_PKT
dynamixel receive bad packet
const char * DynaStrError(int ecode)
Get the error string describing the Dynamixel error code.
#define DXL_COMM_RXTIMEOUT
receive timeout error
#define DYNA_ECODE_ECOMM
dynamixel communication error
#define DYNA_ECODE_TX_ERROR
dynamixel transmit packet error
The libDynamixel internal declarations.
void DynaLogBuf(const char *sPreface, byte_t buf[], size_t uCount, const char *sFmt)
Log integer data.
static const char * DynaEcodeStrTbl[]
Package Dynamixel Error Code String Table.
static std::string GetAlarmsString(const uint_t uAlarms, const std::string &strSep="; ")
Get a formatted servo alarms string associated with the alarms.
#define DXL_COMM_RXCORRUPT
receive corrupted packet
RoadNarrows Dynamixel Top-Level Package Header File.
#define DXL_COMM_RXFAIL
receive failure error
#define DYNA_ECODE_BADEC
bad error code
void DynaPrintBuf(FILE *fp, const char *sPreface, byte_t buf[], const char *sFmt, size_t uCount, size_t uNLFreq, uint_t uCol)
Pretty print a byte buffer to opened file stream.
#define DYNA_ECODE_TX_FAIL
dynamixel transmit packet failure
#define DYNA_ECODE_RX_FAIL
dynamixel receive packet failure
RoadNarrows Dynamixel Library Error and Logging Routines.