CPP GroupSyncRead
-
Description
Base class for simultaneous dynamixel control on reading.
-
Members
None
-
Methods
Methods | Description |
---|---|
GroupSyncRead | Initializes groupSyncRead instance |
~GroupSyncRead | Clears parameter storage |
getPortHandler | Returns PortHandler instance |
getPacketHandler | Returns PacketHandler instance |
addParam | Adds parameter storage for read |
removeParam | Removes parameter on the storage |
clearParam | Clears parameter storage |
txPacket | Transmits packet to the number of DYNAMIXEL’s |
rxPacket | receives packet from the number of DYNAMIXEL’s |
txRxPacket | Transmits and receives packet on the number of DYNAMIXEL’s |
isAvailable | Checks whether there is available data in the data storage |
getData | Gets data from received packet |
-
Enumerator
None
Method References
addParam
- Syntax
bool addParam(UINT8_T id)
- Parameters
Parameters | Description |
---|---|
id | DYNAMIXEL ID |
-
Detailed Description
This function pushes id to the DYNAMIXEL ID list, and initializes the parameter storage. It returns false when the class uses Protocol 1.0 or target ID exists already in the ID list, or returns true.
removeParam
- Syntax
void removeParam(UINT8_T id)
- Parameters
Parameters | Description |
---|---|
id | DYNAMIXEL ID |
-
Detailed Description
This function removes target id in the DYNAMIXEL ID list. It returns false when the class uses Protocol 1.0 or target ID does not exists in the ID list, or returns true.
clearParam
- Syntax
void clearParam()
-
Parameters
None
-
Detailed Description
This function clears the DYNAMIXEL ID list. It returns false when the class uses Protocol 1.0, or returns true.
txPacket
- Syntax
int txPacket()
-
Parameters
None
-
Detailed Description
This function transmits the packet by using
syncReadTx()
function. It returnsCOMM_NOT_AVAILABLE
when the class uses Protocol 1.0, or returns communication result.
rxPacket
- Syntax
int rxPacket()
-
Parameters
None
-
Detailed Description
This function receives the packet by using
readRx()
function. It returnsCOMM_NOT_AVAILABLE
when the class uses Protocol 1.0 or there is no packet that had been received, or returns communication result.
txRxPacket
- Syntax
int txRxPacket()
-
Parameters
None
-
Detailed Description
This function transmits and receives the packet by using
txPacket()
function andrxPacket()
function. It returnsCOMM_NOT_AVAILABLE
when the class uses Protocol 1.0 or the packet transmission had not succeeded, or returns communication result.
isAvailable
- Syntax
bool isAvailable(uint8_t id, uint16_t address, uint16_t data_length)
- Parameters
Parameters | Description |
---|---|
id | DYNAMIXEL ID |
address | Address on the control table of DYNAMIXEL |
data | Packet data |
-
Detailed Description
This function checks whether there is available data in the data storage. It returns false when used Protocol is 1.0 version or there is no data from target address, or returns true.
getData
- Syntax
uint32_t getData(UINT8_T id, UINT16_T address, UINT16_T data_length)
- Parameters
Parameters | Description |
---|---|
id | DYNAMIXEL ID |
address | Address on the control table of DYNAMIXEL |
data length | Data length |
-
Detailed Description
This function gets specific data from received packet. It returns value.