packet_handler.cpp
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 
17 /* Author: zerom, Ryu Woon Jung (Leon) */
18 
19 #if defined(__linux__)
20 #include "packet_handler.h"
23 #elif defined(__APPLE__)
24 #include "packet_handler.h"
27 #elif defined(_WIN32) || defined(_WIN64)
28 #define WINDLLEXPORT
29 #include "packet_handler.h"
32 #elif defined(ARDUINO) || defined(__OPENCR__) || defined(__OPENCM904__)
33 #include "../../include/dynamixel_sdk/packet_handler.h"
34 #include "../../include/dynamixel_sdk/protocol1_packet_handler.h"
35 #include "../../include/dynamixel_sdk/protocol2_packet_handler.h"
36 #endif
37 
38 using namespace dynamixel;
39 
41 {
42  if (protocol_version == 1.0)
43  {
45  }
46  else if (protocol_version == 2.0)
47  {
49  }
50 
52 }
The class that inherits Protocol1PacketHandler class or Protocol2PacketHandler class.
static Protocol1PacketHandler * getInstance()
The function that returns Protocol1PacketHandler instance.
static PacketHandler * getPacketHandler(float protocol_version=2.0)
The function that returns PacketHandler instance.
static Protocol2PacketHandler * getInstance()
The function that returns Protocol2PacketHandler instance.


dynamixel_sdk
Author(s): Gilbert , Zerom , Darby Lim , Leon
autogenerated on Fri Apr 16 2021 02:25:55