Public Member Functions | Private Member Functions | Private Attributes
dynamixel::GroupSyncWrite Class Reference

The class for writing multiple Dynamixel data from same address with same length at once. More...

#include <group_sync_write.h>

List of all members.

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.
PacketHandlergetPacketHandler ()
 The function that returns PacketHandler instance.
PortHandlergetPortHandler ()
 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_
PacketHandlerph_
PortHandlerport_
uint16_t start_address_

Detailed Description

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.


Constructor & Destructor Documentation

GroupSyncWrite::GroupSyncWrite ( PortHandler port,
PacketHandler ph,
uint16_t  start_address,
uint16_t  data_length 
)

The function that Initializes instance for Sync Write.

Parameters:
portPortHandler instance
phPacketHandler instance
start_addressAddress of the data for write
data_lengthLength of the data for write

Definition at line 34 of file group_sync_write.cpp.

The function that calls clearParam function to clear the parameter list for Sync Write.

Definition at line 67 of file group_sync_write.h.


Member Function Documentation

bool GroupSyncWrite::addParam ( uint8_t  id,
uint8_t *  data 
)

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

Parameters:
idDynamixel ID
dataData for write
Returns:
false
when the ID exists already in the list
or true

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.

Parameters:
idDynamixel ID
datafor replacement
Returns:
false
when the ID doesn't exist in the list
or true

Definition at line 95 of file group_sync_write.cpp.

The function that clears the Sync Write list.

Definition at line 110 of file group_sync_write.cpp.

The function that returns PacketHandler instance.

Returns:
PacketHandler instance

Definition at line 79 of file group_sync_write.h.

The function that returns PortHandler instance.

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.

Parameters:
idDynamixel ID

Definition at line 82 of file group_sync_write.cpp.

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

Returns:
COMM_NOT_AVAILABLE
when the list for Sync Write is empty
or the other communication results which come from PacketHandler::syncWriteTxOnly

Definition at line 125 of file group_sync_write.cpp.


Member Data Documentation

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.

Definition at line 46 of file group_sync_write.h.

Definition at line 48 of file group_sync_write.h.

Definition at line 41 of file group_sync_write.h.

Definition at line 40 of file group_sync_write.h.

Definition at line 49 of file group_sync_write.h.


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


ros
Author(s): Pyo , Zerom , Leon
autogenerated on Sat Jun 8 2019 18:32:12