Class GroupBulkWrite

Class Documentation

class GroupBulkWrite

The class for writing multiple Dynamixel data from different addresses with different lengths at once.

Public Functions

GroupBulkWrite(PortHandler *port, PacketHandler *ph)

The function that Initializes instance for Bulk Write.

Parameters:
inline ~GroupBulkWrite()

The function that calls clearParam function to clear the parameter list for Bulk 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, uint16_t start_address, uint16_t data_length, uint8_t *data)

The function that adds id, start_address, data_length to the Bulk Write list.

Parameters:
  • id – Dynamixel ID

  • start_address – Address of the data for write

  • data_length – Length of the 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 Bulk Write list.

Parameters:

id – Dynamixel ID

bool changeParam(uint8_t id, uint16_t start_address, uint16_t data_length, uint8_t *data)

The function that changes the data for write in id -> start_address -> data_length to the Bulk Write list.

Parameters:
  • id – Dynamixel ID

  • start_address – Address of the data for write

  • data_length – Length of the data for write

  • 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 Bulk Write list.

int txPacket()

The function that transmits the Bulk Write instruction packet which might be constructed by GroupBulkWrite::addParam function.

Returns:

COMM_NOT_AVAILABLE

Returns:

when the list for Bulk Write is empty

Returns:

when Protocol1.0 has been used

Returns:

or the other communication results which come from PacketHandler::bulkWriteTxOnly