Public Member Functions | Protected Member Functions | Protected Attributes
CDxlGroup Class Reference

#include <CDxlGroup.h>

Inheritance diagram for CDxlGroup:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int addNewDynamixel (CDxlConfig *config)
 CDxlGroup ()
virtual bool deinit ()
int enableTorqueAll (int state)
CDxlGenericgetDynamixel (const int index)
std::string & getName ()
int getNumDynamixels ()
int getPosAll ()
int getPosAndSpeedAll ()
int getPosSpeedTorqueAll ()
int getStateAll ()
int getStatusAll ()
int getTempAll ()
virtual bool init ()
int sendSyncWritePacket ()
int setConfig (CDxlGroupConfig *config)
int setEndlessTurnModeAll (bool enabled)
void setName (const std::string &name)
void setSerialPort (LxSerial *serialport)
void setSyncWriteType (const BYTE instruction=INST_SYNC_WRITE)
int setupSyncReadChain ()
int syncRead (int startingAddress, int dataLength)
int writeData (int ID, int startingAddress, int dataLength, BYTE *data)
virtual ~CDxlGroup ()

Protected Member Functions

int action ()
int initAll ()

Protected Attributes

CDxlGenericmDynamixels [MAX_NUM_DYNAMIXELS]
CLog2 mLog
std::string mName
int mNumDynamixels
CDxlStatusPacketmStatusPackets [MAX_NUM_DYNAMIXELS]
CDxlSyncWritePacketmSyncPacket
bool mSyncRead

Detailed Description

Definition at line 21 of file CDxlGroup.h.


Constructor & Destructor Documentation

Definition at line 16 of file CDxlGroup.cpp.

CDxlGroup::~CDxlGroup ( ) [virtual]

Definition at line 26 of file CDxlGroup.cpp.


Member Function Documentation

int CDxlGroup::action ( ) [protected]

Definition at line 82 of file CDxlGroup.cpp.

Definition at line 89 of file CDxlGroup.cpp.

bool CDxlGroup::deinit ( ) [virtual]

Definition at line 62 of file CDxlGroup.cpp.

int CDxlGroup::enableTorqueAll ( int  state)

Definition at line 376 of file CDxlGroup.cpp.

CDxlGeneric * CDxlGroup::getDynamixel ( const int  index)

Definition at line 398 of file CDxlGroup.cpp.

std::string & CDxlGroup::getName ( )

Definition at line 52 of file CDxlGroup.cpp.

Definition at line 393 of file CDxlGroup.cpp.

Definition at line 290 of file CDxlGroup.cpp.

Definition at line 307 of file CDxlGroup.cpp.

Definition at line 325 of file CDxlGroup.cpp.

Definition at line 249 of file CDxlGroup.cpp.

Definition at line 273 of file CDxlGroup.cpp.

Definition at line 342 of file CDxlGroup.cpp.

bool CDxlGroup::init ( ) [virtual]

Definition at line 57 of file CDxlGroup.cpp.

int CDxlGroup::initAll ( ) [protected]

Definition at line 226 of file CDxlGroup.cpp.

Groups can write command to servo's in a group message. To do this the individual servo's write their data to a group packet with the writeData function below. With the sendSyncWrite function you can send the packet.

Documentation from Robotis RX28 about the syncwrite packect: This command is used to control several RX-28s simultaneously with one Instruction Function Packet transmission. When this command is used, several commands are transmitted at once, so that the communication time is reduced when multiple RX-28s are controlled. However, the SYNC WRITE command can be used only if both of the address and length of the Control Table to write is identical. Besides, ID should be transmitted as Broadcasting ID. Make sure that the length of packet does not to exceed 143 bytes since the volume of receiving buffer of RX-28 is 143 bytes.

This function sends the group packed that has been filled by the dynamixels/3mxls after sending it resets the group message

Definition at line 133 of file CDxlGroup.cpp.

Definition at line 404 of file CDxlGroup.cpp.

int CDxlGroup::setEndlessTurnModeAll ( bool  enabled)

Definition at line 359 of file CDxlGroup.cpp.

void CDxlGroup::setName ( const std::string &  name)

Definition at line 47 of file CDxlGroup.cpp.

void CDxlGroup::setSerialPort ( LxSerial serialport)

Definition at line 41 of file CDxlGroup.cpp.

void CDxlGroup::setSyncWriteType ( const BYTE  instruction = INST_SYNC_WRITE)

enable group to set instruction type for syncwrite

Definition at line 221 of file CDxlGroup.cpp.

Definition at line 109 of file CDxlGroup.cpp.

int CDxlGroup::syncRead ( int  startingAddress,
int  dataLength 
)

Definition at line 185 of file CDxlGroup.cpp.

int CDxlGroup::writeData ( int  ID,
int  startingAddress,
int  dataLength,
BYTE *  data 
)

This function is used by the CDxlGeneric type classes to write their data to a Group packet in stead of directly to the serial port. If the Servo was added to a group it will have been given a pointer to this group so it can write its data to the group. You can then send the group packet with sendSyncWritePacket().

Definition at line 161 of file CDxlGroup.cpp.


Member Data Documentation

Definition at line 25 of file CDxlGroup.h.

CLog2 CDxlGroup::mLog [protected]

Reimplemented from CDxlCom.

Definition at line 30 of file CDxlGroup.h.

std::string CDxlGroup::mName [protected]

Definition at line 24 of file CDxlGroup.h.

int CDxlGroup::mNumDynamixels [protected]

Definition at line 26 of file CDxlGroup.h.

Definition at line 32 of file CDxlGroup.h.

Definition at line 27 of file CDxlGroup.h.

bool CDxlGroup::mSyncRead [protected]

Definition at line 31 of file CDxlGroup.h.


The documentation for this class was generated from the following files:


threemxl
Author(s):
autogenerated on Fri Aug 28 2015 13:21:08