Generic base class for CDxlGeneric and CDxlGroup. More...
#include <CDxlCom.h>
Public Member Functions | |
CDxlCom () | |
int | getLastError () |
int | initPacketHandler () |
bool | isInitialized () |
int | setPacketHandler (CDxlPacketHandler *packetHandler) |
Set packet handler to something else than direct serial port. | |
Static Public Member Functions | |
static const char * | translateErrorCode (int errorCode) |
Protected Member Functions | |
int | receivePacketWait (CDxlStatusPacket *packet, int seconds=DXL_PKT_RECV_WAIT_TIME_SEC, int microseconds=DXL_PKT_RECV_WAIT_TIME_USEC) |
Packet commands. Synchronous (blocking) interface. | |
int | sendPacket (CDxlPacket *packet, bool replyExpected=true) |
Packet commands. Synchronous (blocking) interface. | |
Protected Attributes | |
bool | mInitialized |
int | mLastError |
CLog2 | mLog |
CDxlPacketHandler * | mPacketHandler |
LxSerial * | mSerialPort |
Generic base class for CDxlGeneric and CDxlGroup.
Both single dynamixels/3mxls and groups of dynamixels/3mxls have to send packets, use the serial port and do proper error handling.
CDxlCom::CDxlCom | ( | ) |
Definition at line 13 of file CDxlCom.cpp.
int CDxlCom::getLastError | ( | ) | [inline] |
int CDxlCom::initPacketHandler | ( | ) |
Definition at line 34 of file CDxlCom.cpp.
bool CDxlCom::isInitialized | ( | ) | [inline] |
int CDxlCom::receivePacketWait | ( | CDxlStatusPacket * | packet, |
int | seconds = DXL_PKT_RECV_WAIT_TIME_SEC , |
||
int | microseconds = DXL_PKT_RECV_WAIT_TIME_USEC |
||
) | [protected] |
Packet commands. Synchronous (blocking) interface.
Definition at line 116 of file CDxlCom.cpp.
int CDxlCom::sendPacket | ( | CDxlPacket * | packet, |
bool | replyExpected = true |
||
) | [protected] |
Packet commands. Synchronous (blocking) interface.
Definition at line 80 of file CDxlCom.cpp.
int CDxlCom::setPacketHandler | ( | CDxlPacketHandler * | packetHandler | ) |
Set packet handler to something else than direct serial port.
Becomes owner
Definition at line 23 of file CDxlCom.cpp.
const char * CDxlCom::translateErrorCode | ( | int | errorCode | ) | [static] |
Reimplemented in C3mxl.
Definition at line 42 of file CDxlCom.cpp.
bool CDxlCom::mInitialized [protected] |
int CDxlCom::mLastError [protected] |
CLog2 CDxlCom::mLog [protected] |
Reimplemented in C3mxl, CDxlGeneric, CDynamixel, and CDxlGroup.
CDxlPacketHandler* CDxlCom::mPacketHandler [protected] |
LxSerial* CDxlCom::mSerialPort [protected] |