Class GroupSyncWrite
- Defined in File group_sync_write.h 
Class Documentation
- 
class GroupSyncWrite
- The class for writing multiple Dynamixel data from same address with same length at once. - Public Functions - 
GroupSyncWrite(PortHandler *port, PacketHandler *ph, uint16_t start_address, uint16_t data_length)
- The function that Initializes instance for Sync Write. - Parameters:
- port – PortHandler instance 
- ph – PacketHandler instance 
- start_address – Address of the data for write 
- data_length – Length of the data for write 
 
 
 - 
inline ~GroupSyncWrite()
- The function that calls clearParam function to clear the parameter list for Sync Write. 
 - 
inline PortHandler *getPortHandler()
- The function that returns PortHandler instance. - Returns:
- PortHandler instance 
 
 - 
inline PacketHandler *getPacketHandler()
- The function that returns PacketHandler instance. - Returns:
- PacketHandler instance 
 
 - 
bool addParam(uint8_t id, uint8_t *data)
- The function that adds id, start_address, data_length to the Sync Write list. - Parameters:
- id – Dynamixel ID 
- data – Data for write 
 
- Returns:
- false 
- Returns:
- when the ID exists already in the list 
- Returns:
- or true 
 
 - 
void removeParam(uint8_t id)
- The function that removes id from the Sync Write list. - Parameters:
- id – Dynamixel ID 
 
 - 
bool changeParam(uint8_t id, uint8_t *data)
- The function that changes the data for write in id -> start_address -> data_length to the Sync Write list. - Parameters:
- id – Dynamixel ID 
- data – for replacement 
 
- Returns:
- false 
- Returns:
- when the ID doesn’t exist in the list 
- Returns:
- or true 
 
 - 
void clearParam()
- The function that clears the Sync Write list. 
 - 
int txPacket()
- The function that transmits the Sync Write instruction packet which might be constructed by GroupSyncWrite::addParam function. - Returns:
- COMM_NOT_AVAILABLE 
- Returns:
- when the list for Sync Write is empty 
- Returns:
- or the other communication results which come from PacketHandler::syncWriteTxOnly 
 
 
- 
GroupSyncWrite(PortHandler *port, PacketHandler *ph, uint16_t start_address, uint16_t data_length)