22 from .robotis_def
import *
26 def __init__(self, port, ph, start_address, data_length):
40 if self.ph.getProtocolVersion() == 1.0:
49 self.param.append(dxl_id)
52 if self.ph.getProtocolVersion() == 1.0:
64 if self.ph.getProtocolVersion() == 1.0:
75 if self.ph.getProtocolVersion() == 1.0:
78 self.data_dict.clear()
81 if self.ph.getProtocolVersion() == 1.0
or len(self.data_dict.keys()) == 0:
82 return COMM_NOT_AVAILABLE
88 len(self.data_dict.keys()) * 1)
93 if self.ph.getProtocolVersion() == 1.0:
94 return COMM_NOT_AVAILABLE
98 if len(self.data_dict.keys()) == 0:
99 return COMM_NOT_AVAILABLE
103 if result != COMM_SUCCESS:
106 if result == COMM_SUCCESS:
112 if self.ph.getProtocolVersion() == 1.0:
113 return COMM_NOT_AVAILABLE
116 if result != COMM_SUCCESS:
122 if self.ph.getProtocolVersion() == 1.0
or self.
last_result is False or dxl_id
not in self.
data_dict:
130 def getData(self, dxl_id, address, data_length):
131 if not self.
isAvailable(dxl_id, address, data_length):
136 elif data_length == 2:
139 elif data_length == 4:
#define DXL_MAKEDWORD(a, b)
def getData(self, dxl_id, address, data_length)
def addParam(self, dxl_id)
#define DXL_MAKEWORD(a, b)
def isAvailable(self, dxl_id, address, data_length)
def __init__(self, port, ph, start_address, data_length)
def removeParam(self, dxl_id)