src
dynamixel_sdk
port_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 "
port_handler.h
"
21
#include "
port_handler_linux.h
"
22
#elif defined(__APPLE__)
23
#include "
port_handler.h
"
24
#include "
port_handler_mac.h
"
25
#elif defined(_WIN32) || defined(_WIN64)
26
#define WINDLLEXPORT
27
#include "
port_handler.h
"
28
#include "
port_handler_windows.h
"
29
#elif defined(ARDUINO) || defined(__OPENCR__) || defined(__OPENCM904__)
30
#include "../../include/dynamixel_sdk/port_handler.h"
31
#include "../../include/dynamixel_sdk/port_handler_arduino.h"
32
#endif
33
34
using namespace
dynamixel
;
35
36
PortHandler
*
PortHandler::getPortHandler
(
const
char
*port_name)
37
{
38
#if defined(__linux__)
39
return
(
PortHandler
*)(
new
PortHandlerLinux
(port_name));
40
#elif defined(__APPLE__)
41
return
(
PortHandler
*)(
new
PortHandlerMac
(port_name));
42
#elif defined(_WIN32) || defined(_WIN64)
43
return
(
PortHandler
*)(
new
PortHandlerWindows
(port_name));
44
#elif defined(ARDUINO) || defined(__OPENCR__) || defined(__OPENCM904__)
45
return
(
PortHandler
*)(
new
PortHandlerArduino
(port_name));
46
#endif
47
}
port_handler_linux.h
port_handler_windows.h
dynamixel::PortHandlerLinux
The class for control port in Linux.
Definition:
port_handler_linux.h:34
dynamixel
Definition:
group_bulk_read.h:31
dynamixel::PortHandler
The class for port control that inherits PortHandlerLinux, PortHandlerWindows, PortHandlerMac,...
Definition:
port_handler.h:56
port_handler_mac.h
dynamixel::PortHandler::getPortHandler
static PortHandler * getPortHandler(const char *port_name)
The function that gets PortHandler class inheritance @description The function gets class inheritance...
Definition:
port_handler.cpp:36
dynamixel::PortHandlerWindows
The class for control port in Windows.
Definition:
port_handler_windows.h:35
dynamixel::PortHandlerArduino
The class for control port in Arduino.
Definition:
port_handler_arduino.h:37
dynamixel::PortHandlerMac
The class for control port in Mac OS.
Definition:
port_handler_mac.h:34
port_handler.h
dynamixel_sdk
Author(s): Gilbert
, Zerom
, Darby Lim
, Leon
autogenerated on Wed Mar 2 2022 00:13:50