Main Page
Namespaces
Classes
Files
File List
File Members
src
dynamixel_sdk
packet_handler.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
################################################################################
5
# Copyright 2017 ROBOTIS CO., LTD.
6
#
7
# Licensed under the Apache License, Version 2.0 (the "License");
8
# you may not use this file except in compliance with the License.
9
# You may obtain a copy of the License at
10
#
11
# http://www.apache.org/licenses/LICENSE-2.0
12
#
13
# Unless required by applicable law or agreed to in writing, software
14
# distributed under the License is distributed on an "AS IS" BASIS,
15
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
# See the License for the specific language governing permissions and
17
# limitations under the License.
18
################################################################################
19
20
# Author: Ryu Woon Jung (Leon)
21
22
from
.protocol1_packet_handler
import
*
23
from
.protocol2_packet_handler
import
*
24
25
26
def
PacketHandler
(protocol_version):
27
# FIXME: float or int-to-float comparison can generate weird behaviour
28
if
protocol_version == 1.0:
29
return
Protocol1PacketHandler
()
30
elif
protocol_version == 2.0:
31
return
Protocol2PacketHandler
()
32
else
:
33
return
Protocol2PacketHandler
()
dynamixel_sdk.protocol2_packet_handler.Protocol2PacketHandler
Definition:
protocol2_packet_handler.py:51
dynamixel_sdk.packet_handler.PacketHandler
def PacketHandler(protocol_version)
Definition:
packet_handler.py:26
dynamixel_sdk.protocol1_packet_handler.Protocol1PacketHandler
Definition:
protocol1_packet_handler.py:46
dynamixel_sdk
Author(s): Gilbert
, Zerom
, Darby Lim
, Leon
autogenerated on Fri Apr 16 2021 02:25:55