MercurySDK
Software development kit for Mercury digital servos
group_sync_write.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2017 ROBOTIS CO., LTD.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
21 
22 #ifndef MERCURY_SDK_INCLUDE_MERCURY_SDK_GROUPSYNCWRITE_H_
23 #define MERCURY_SDK_INCLUDE_MERCURY_SDK_GROUPSYNCWRITE_H_
24 
25 
26 #include "port_handler.h"
27 #include "packet_handler.h"
28 #include "group_handler.h"
29 
30 namespace mercury
31 {
32 
36 class WINDECLSPEC GroupSyncWrite : public GroupHandler
37 {
38 private:
39  uint16_t start_address_;
40  uint16_t data_length_;
41 
42  void makeParam();
43 
44 public:
52  GroupSyncWrite(PortHandler *port, PacketHandler *ph, uint16_t start_address, uint16_t data_length);
53 
57  ~GroupSyncWrite() { clearParam(); }
58 
67  bool addParam (uint8_t id, uint8_t *data);
68 
73  void removeParam (uint8_t id);
74 
83  bool changeParam (uint8_t id, uint8_t *data);
84 
88  void clearParam();
89 
96  int txPacket();
97 };
98 
99 }
100 
101 
102 #endif /* MERCURY_SDK_INCLUDE_MERCURY_SDK_GROUPSYNCWRITE_H_ */
The class for writing multiple Dynamixel data from same address with same length at once.
~GroupSyncWrite()
The function that calls clearParam function to clear the parameter list for Sync Write.
The class that inherits Protocol1PacketHandler class or Protocol2PacketHandler class.
The class for port control that inherits PortHandlerLinux, PortHandlerWindows, PortHandlerMac,...
Definition: port_handler.h:56