2323#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_
2424
2525
26- #include < map>
27- #include < vector>
2826#include " port_handler.h"
2927#include " packet_handler.h"
28+ #include " group_handler.h"
3029
3130namespace dynamixel
3231{
3332
3433// //////////////////////////////////////////////////////////////////////////////
3534// / @brief The class for reading multiple Dynamixel data from different addresses with different lengths at once
3635// //////////////////////////////////////////////////////////////////////////////
37- class WINDECLSPEC GroupBulkRead
36+ class WINDECLSPEC GroupBulkRead : public GroupHandler
3837{
39- private:
40- PortHandler *port_;
41- PacketHandler *ph_;
38+ protected:
39+ std::map<uint8_t , uint16_t > address_list_; // <id, start_address>
40+ std::map<uint8_t , uint16_t > length_list_; // <id, data_length>
41+ std::map<uint8_t , uint8_t *> error_list_; // <id, error>
4242
43- std::vector<uint8_t > id_list_;
44- std::map<uint8_t , uint16_t > address_list_; // <id, start_address>
45- std::map<uint8_t , uint16_t > length_list_; // <id, data_length>
46- std::map<uint8_t , uint8_t *> data_list_; // <id, data>
47- std::map<uint8_t , uint8_t *> error_list_; // <id, error>
43+ bool last_result_;
4844
49- bool last_result_;
50- bool is_param_changed_;
45+ void makeParam ();
5146
52- uint8_t *param_;
53-
54- void makeParam ();
55-
56- public:
47+ public:
5748 // //////////////////////////////////////////////////////////////////////////////
5849 // / @brief The function that Initializes instance for Bulk Read
5950 // / @param port PortHandler instance
@@ -66,18 +57,6 @@ class WINDECLSPEC GroupBulkRead
6657 // //////////////////////////////////////////////////////////////////////////////
6758 ~GroupBulkRead () { clearParam (); }
6859
69- // //////////////////////////////////////////////////////////////////////////////
70- // / @brief The function that returns PortHandler instance
71- // / @return PortHandler instance
72- // //////////////////////////////////////////////////////////////////////////////
73- PortHandler *getPortHandler () { return port_; }
74-
75- // //////////////////////////////////////////////////////////////////////////////
76- // / @brief The function that returns PacketHandler instance
77- // / @return PacketHandler instance
78- // //////////////////////////////////////////////////////////////////////////////
79- PacketHandler *getPacketHandler () { return ph_; }
80-
8160 // //////////////////////////////////////////////////////////////////////////////
8261 // / @brief The function that adds id, start_address, data_length to the Bulk Read list
8362 // / @param id Dynamixel ID
0 commit comments