MercurySDK
Software development kit for Mercury digital servos
group_handler.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_GROUPHANDLER_H
23 #define MERCURY_SDK_INCLUDE_MERCURY_SDK_GROUPHANDLER_H
24 
25 
26 #include <map>
27 #include <vector>
28 #include "port_handler.h"
29 #include "packet_handler.h"
30 
31 namespace mercury
32 {
33 
34 class WINDECLSPEC GroupHandler
35 {
36 public:
38 
39  PortHandler *getPortHandler() { return port_; }
40  PacketHandler *getPacketHandler() { return ph_; }
41 
42 protected:
45 
46  std::vector<uint8_t> id_list_;
47  std::map<uint8_t, uint8_t *> data_list_; // <id, data>
48 
50 
51  uint8_t *param_;
52 };
53 
54 }
55 
56 
57 #endif // MERCURY_SDK_INCLUDE_MERCURY_SDK_GROUPHANDLER_H
PacketHandler * ph_
Definition: group_handler.h:44
std::vector< uint8_t > id_list_
Definition: group_handler.h:46
std::map< uint8_t, uint8_t * > data_list_
Definition: group_handler.h:47
PacketHandler * getPacketHandler()
Definition: group_handler.h:40
PortHandler * port_
Definition: group_handler.h:43
PortHandler * getPortHandler()
Definition: group_handler.h:39
The class that inherits Protocol1PacketHandler class or Protocol2PacketHandler class.
The class for port control that inherits PortHandlerLinux, PortHandlerWindows, PortHandlerMac,...
Definition: port_handler.h:56