Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 BROADCAST_ID = 0xFE
00023 MAX_ID = 0xFC
00024
00025
00026 INST_PING = 1
00027 INST_READ = 2
00028 INST_WRITE = 3
00029 INST_REG_WRITE = 4
00030 INST_ACTION = 5
00031 INST_FACTORY_RESET = 6
00032 INST_SYNC_WRITE = 131
00033 INST_BULK_READ = 146
00034
00035 INST_REBOOT = 8
00036 INST_STATUS = 85
00037 INST_SYNC_READ = 130
00038 INST_BULK_WRITE = 147
00039
00040
00041 COMM_SUCCESS = 0
00042 COMM_PORT_BUSY = -1000
00043 COMM_TX_FAIL = -1001
00044 COMM_RX_FAIL = -1002
00045 COMM_TX_ERROR = -2000
00046 COMM_RX_WAITING = -3000
00047 COMM_RX_TIMEOUT = -3001
00048 COMM_RX_CORRUPT = -3002
00049 COMM_NOT_AVAILABLE = -9000
00050
00051
00052
00053 def DXL_MAKEWORD(a, b):
00054 return (a & 0xFF) | ((b & 0xFF) << 8)
00055
00056
00057 def DXL_MAKEDWORD(a, b):
00058 return (a & 0xFFFF) | (b & 0xFFFF) << 16
00059
00060
00061 def DXL_LOWORD(l):
00062 return l & 0xFFFF
00063
00064
00065 def DXL_HIWORD(l):
00066 return (l >> 16) & 0xFFFF
00067
00068
00069 def DXL_LOBYTE(w):
00070 return w & 0xFF
00071
00072
00073 def DXL_HIBYTE(w):
00074 return (w >> 8) & 0xFF