The class for writing multiple Dynamixel data from same address with same length at once. More...
#include <group_sync_write.h>
Public Member Functions | |
bool | addParam (uint8_t id, uint8_t *data) |
The function that adds id, start_address, data_length to the Sync Write list. | |
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. | |
void | clearParam () |
The function that clears the Sync Write list. | |
PacketHandler * | getPacketHandler () |
The function that returns PacketHandler instance. | |
PortHandler * | getPortHandler () |
The function that returns PortHandler instance. | |
GroupSyncWrite (PortHandler *port, PacketHandler *ph, uint16_t start_address, uint16_t data_length) | |
The function that Initializes instance for Sync Write. | |
void | removeParam (uint8_t id) |
The function that removes id from the Sync Write list. | |
int | txPacket () |
The function that transmits the Sync Write instruction packet which might be constructed by GroupSyncWrite::addParam function. | |
~GroupSyncWrite () | |
The function that calls clearParam function to clear the parameter list for Sync Write. | |
Private Member Functions | |
void | makeParam () |
Private Attributes | |
uint16_t | data_length_ |
std::map< uint8_t, uint8_t * > | data_list_ |
std::vector< uint8_t > | id_list_ |
bool | is_param_changed_ |
uint8_t * | param_ |
PacketHandler * | ph_ |
PortHandler * | port_ |
uint16_t | start_address_ |
The class for writing multiple Dynamixel data from same address with same length at once.
Definition at line 37 of file group_sync_write.h.
GroupSyncWrite::GroupSyncWrite | ( | PortHandler * | port, |
PacketHandler * | ph, | ||
uint16_t | start_address, | ||
uint16_t | data_length | ||
) |
The function that Initializes instance for Sync Write.
port | PortHandler instance |
ph | PacketHandler instance |
start_address | Address of the data for write |
data_length | Length of the data for write |
Definition at line 34 of file group_sync_write.cpp.
dynamixel::GroupSyncWrite::~GroupSyncWrite | ( | ) | [inline] |
The function that calls clearParam function to clear the parameter list for Sync Write.
Definition at line 67 of file group_sync_write.h.
bool GroupSyncWrite::addParam | ( | uint8_t | id, |
uint8_t * | data | ||
) |
The function that adds id, start_address, data_length to the Sync Write list.
id | Dynamixel ID |
data | Data for write |
Definition at line 68 of file group_sync_write.cpp.
bool GroupSyncWrite::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.
id | Dynamixel ID |
data | for replacement |
Definition at line 95 of file group_sync_write.cpp.
void GroupSyncWrite::clearParam | ( | ) |
The function that clears the Sync Write list.
Definition at line 110 of file group_sync_write.cpp.
PacketHandler* dynamixel::GroupSyncWrite::getPacketHandler | ( | ) | [inline] |
The function that returns PacketHandler instance.
Definition at line 79 of file group_sync_write.h.
PortHandler* dynamixel::GroupSyncWrite::getPortHandler | ( | ) | [inline] |
The function that returns PortHandler instance.
Definition at line 73 of file group_sync_write.h.
void GroupSyncWrite::makeParam | ( | ) | [private] |
Definition at line 45 of file group_sync_write.cpp.
void GroupSyncWrite::removeParam | ( | uint8_t | id | ) |
The function that removes id from the Sync Write list.
id | Dynamixel ID |
Definition at line 82 of file group_sync_write.cpp.
int GroupSyncWrite::txPacket | ( | ) |
The function that transmits the Sync Write instruction packet which might be constructed by GroupSyncWrite::addParam function.
Definition at line 125 of file group_sync_write.cpp.
uint16_t dynamixel::GroupSyncWrite::data_length_ [private] |
Definition at line 50 of file group_sync_write.h.
std::map<uint8_t, uint8_t* > dynamixel::GroupSyncWrite::data_list_ [private] |
Definition at line 44 of file group_sync_write.h.
std::vector<uint8_t> dynamixel::GroupSyncWrite::id_list_ [private] |
Definition at line 43 of file group_sync_write.h.
bool dynamixel::GroupSyncWrite::is_param_changed_ [private] |
Definition at line 46 of file group_sync_write.h.
uint8_t* dynamixel::GroupSyncWrite::param_ [private] |
Definition at line 48 of file group_sync_write.h.
PacketHandler* dynamixel::GroupSyncWrite::ph_ [private] |
Definition at line 41 of file group_sync_write.h.
PortHandler* dynamixel::GroupSyncWrite::port_ [private] |
Definition at line 40 of file group_sync_write.h.
uint16_t dynamixel::GroupSyncWrite::start_address_ [private] |
Definition at line 49 of file group_sync_write.h.