当前位置: 首页>>代码示例>>Python>>正文


Python RiCHeader.RiCHeader类代码示例

本文整理汇总了Python中BAL.Header.RiCHeader.RiCHeader的典型用法代码示例。如果您正苦于以下问题:Python RiCHeader类的具体用法?Python RiCHeader怎么用?Python RiCHeader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RiCHeader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, type, devId, pubHz):
     RiCHeader.__init__(self)
     self._id = 103
     self._des = 0x1001
     self._type = type
     self._devId = devId
     self._pubHz = pubHz
开发者ID:Itamare4,项目名称:robotican,代码行数:7,代码来源:ParamBuildResponse.py

示例2: buildRequest

 def buildRequest(self, data):
     RiCHeader.buildRequest(self, data)
     bytes = bytearray()
     while self.index < VER_PLACE:
         bytes.append(data[self.index])
         self.index += 1
     self._ver = struct.unpack("<f", bytes)[0]
开发者ID:nirlevi5,项目名称:bgumodo_ws,代码行数:7,代码来源:VersionResponds.py

示例3: buildRequest

    def buildRequest(self, data):
        RiCHeader.buildRequest(self, data)
        bytes = bytearray()

        while self.index < X:
            bytes.append(data[self.index])
            self.index += 1

        self._x = struct.unpack('<f', bytes)[0]

        bytes = bytearray()

        while self.index < Y:
            bytes.append(data[self.index])
            self.index += 1

        self._y = struct.unpack('<f', bytes)[0]

        bytes = bytearray()

        while self.index < Z:
            bytes.append(data[self.index])
            self.index += 1

        self._z = struct.unpack('<f', bytes)[0]
开发者ID:Itamare4,项目名称:robotican,代码行数:25,代码来源:imuCalibResponse.py

示例4: __init__

    def __init__(self, devId, devType, fieldNum, val):
        RiCHeader.__init__(self)

        self._id = PSET_REQ
        self._length = MSG_LEN
        self._des = 0x1001
        self._checkSum = 0

        self._devId = devId         # byte
        self._devType = devType     # byte
        self._fieldNum = fieldNum   # byte
        self._val = val             # float

        self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:14,代码来源:SetParamRequest.py

示例5: buildRequest

 def buildRequest(self, data):
     RiCHeader.buildRequest(self, data)
     bytes = bytearray()
     while self.index < CON_REQ_PLACE:
         bytes.append(data[self.index])
         self.index += 1
     self._requestForConnection = struct.unpack('<?', bytes)[0]
开发者ID:Itamare4,项目名称:robotican,代码行数:7,代码来源:ConnectionRequest.py

示例6: buildRequest

 def buildRequest(self, data):
     RiCHeader.buildRequest(self, data)
     bytes = bytearray()
     while self.index < BAT_STAT:
         bytes.append(data[self.index])
         self.index += 1
     self._status = struct.unpack('<f', bytes)[0]
开发者ID:Itamare4,项目名称:robotican,代码行数:7,代码来源:batteryPublishResponse.py

示例7: __init__

 def __init__(self):
     RiCHeader.__init__(self)
     self._id = ID_REQ
     self._length = LEN_REQ
     self._des = 0
     self._checkSum = 0
     self._finish = True
     self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:8,代码来源:finishBuildingRequest.py

示例8: __init__

 def __init__(self, toConnect):
     RiCHeader.__init__(self)
     self._id = RES_ID
     self._des = 0x1001
     self._length = 7
     self._checkSum = 0
     self._toConnect = toConnect
     self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:8,代码来源:ConnectionResponse.py

示例9: __init__

 def __init__(self, servoId, position):
     RiCHeader.__init__(self)
     self._id = REQ_ID
     self._des = 0x1001
     self._length = REQ_LEN
     self._servoId = servoId
     self._position = position
     self._checkSum = 0
     self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:9,代码来源:servoRequest.py

示例10: __init__

    def __init__(self, relayNum, status):
        RiCHeader.__init__(self)
        self._id = RELAY_REQ
        self._length = MSG_LEN
        self._des = 0x1001
        self._checkSum = 0
        self._relayNum = relayNum
        self._status = status

        self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:10,代码来源:relayRequest.py

示例11: __init__

    def __init__(self, motorNum, speed):
        RiCHeader.__init__(self)
        self._id = OPEN_LOOP_REQ
        self._length = MSG_LEN
        self._des = 0x1001
        self._checkSum = 0
        self._motorNum = motorNum
        self._speed = speed

        self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:10,代码来源:openLoopMotorRequest.py

示例12: __init__

    def __init__(self, status):
        RiCHeader.__init__(self)

        self._id = IMU_REQ
        self._length = MSG_LEN
        self._des = 0x1001
        self._checkSum = 0

        self.status = status

        self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:11,代码来源:imuRequest.py

示例13: buildRequest

 def buildRequest(self, data):
     RiCHeader.buildRequest(self, data)
     bytes = bytearray()
     while self.index < SERVO_NUM_PLACE:
         bytes.append(data[self.index])
         self.index += 1
     self._servoNum = struct.unpack('<B', bytes)[0]
     bytes = bytearray()
     while self.index < SERVO_POSITION_PLACE:
         bytes.append(data[self.index])
         self.index += 1
     self._position = struct.unpack('<f', bytes)[0]
开发者ID:Itamare4,项目名称:robotican,代码行数:12,代码来源:ServoPublishResponse.py

示例14: __init__

    def __init__(self, devType, devId, haveRight):
        RiCHeader.__init__(self)

        self._id = RIG_REQ
        self._length = MSG_LEN
        self._des = 0x1001
        self._checkSum = 0

        self._devType = devType
        self._devId = devId
        self._haveRight = haveRight

        self._checkSum = self.calCheckSum(self.dataTosend())
开发者ID:Itamare4,项目名称:robotican,代码行数:13,代码来源:PublishRequest.py

示例15: buildRequest

 def buildRequest(self, data):
     RiCHeader.buildRequest(self, data)
     bytes = bytearray()
     while self.index < ODOM_X:
         bytes.append(data[self.index])
         self.index += 1
     self._odomX = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < ODOM_Y:
         bytes.append(data[self.index])
         self.index += 1
     self._odomY = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < ODOM_THATE:
         bytes.append(data[self.index])
         self.index += 1
     self._odomTheta = struct.unpack('<f', bytes)[0]
     # bytes = bytearray()
     # while self.index < TRAN_X:
     #     bytes.append(data[self.index])
     #     self.index += 1
     # self._translationX = struct.unpack('<f', bytes)[0]
     # bytes = bytearray()
     # while self.index < TRAN_Y:
     #     bytes.append(data[self.index])
     #     self.index += 1
     # self._translationY = struct.unpack('<f', bytes)[0]
     # bytes = bytearray()
     # while self.index < TRAN_Z:
     #     bytes.append(data[self.index])
     #     self.index += 1
     # self._translationZ = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < TRAN_ROT_Z:
         bytes.append(data[self.index])
         self.index += 1
     self._translationRotationZ = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < TRAN_ROT_W:
         bytes.append(data[self.index])
         self.index += 1
     self._translationRotationW = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < LINEAR_VEL:
         bytes.append(data[self.index])
         self.index += 1
     self._linearVelocity = struct.unpack('<f', bytes)[0]
开发者ID:Itamare4,项目名称:robotican,代码行数:47,代码来源:closeDiffPublishResponse.py


注:本文中的BAL.Header.RiCHeader.RiCHeader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。