DETI-Dynamixel Interface  1
DxMsgHandler.h
00001 #ifndef DX_MSG_HANDLER_H_
00002 #define DX_MSG_HANDLER_H_
00003 
00008 class DxMsgHandler {
00009 public:
00010     DxMsgHandler();
00011 
00012     void dxl_reset(int series, int id);
00013     void dxl_ping(int series, int id);
00014     void dxl_action(int series);
00015     int dxl_read_byte(int series, int id, int address);
00016     void dxl_write_byte(int series, int id, int address, int value);
00017     int dxl_read_word(int series, int id, int address);
00018     void dxl_write_word(int series, int id, int address, int value);
00019     void dxl_syncWrite_byte(int series, int nServos, int bytesPerServo, int initialAddress, int *idArray, int *valuesArray);
00020     void dxl_syncWrite_word(int series, int nServos, int wordsPerServo, int initialAddress, int *idArray, int *valuesArray);
00021     void dxl_regWrite_byte(int series, int id, int address, int value);
00022     void dxl_regWrite_word(int series, int id, int address, int value);
00023 
00024     void gotoPosition();
00025     void writePosition();
00026     int readPosition();
00027 
00028 private:
00029     char txPacket[512];
00030     char rxPacket[256];
00031 
00032 
00033 };
00034 
00035 #endif /* DX_MSG_HANDLER_H_ */