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


Python RiCHeader.buildRequest方法代码示例

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


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

示例1: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
 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,代码行数:9,代码来源:VersionResponds.py

示例2: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
 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,代码行数:9,代码来源:ConnectionRequest.py

示例3: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
    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,代码行数:27,代码来源:imuCalibResponse.py

示例4: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
 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,代码行数:9,代码来源:batteryPublishResponse.py

示例5: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
 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,代码行数:14,代码来源:ServoPublishResponse.py

示例6: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
 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,代码行数:49,代码来源:closeDiffPublishResponse.py

示例7: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
 def buildRequest(self, data):
     RiCHeader.buildRequest(self, data)
     bytes = bytearray()
     while self.index < MOTOR_ID:
         bytes.append(data[self.index])
         self.index += 1
     self._devId = struct.unpack('<B', bytes)[0]
     bytes = bytearray()
     while self.index < MOTOR_RAD:
         bytes.append(data[self.index])
         self.index += 1
     self._rad = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < MOTOR_RAD_S:
         bytes.append(data[self.index])
         self.index += 1
     self._rad_s = struct.unpack('<f', bytes)[0]
开发者ID:Itamare4,项目名称:robotican,代码行数:19,代码来源:closeLoopPublishResponse.py

示例8: buildRequest

# 需要导入模块: from BAL.Header.RiCHeader import RiCHeader [as 别名]
# 或者: from BAL.Header.RiCHeader.RiCHeader import buildRequest [as 别名]
 def buildRequest(self, data):
     RiCHeader.buildRequest(self, data)
     bytes = bytearray()
     while self.index < V_X_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._velocityX = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < V_Y_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._velocityY = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < V_Z_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._velocityZ = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < A_X_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._accelerationX = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < A_Y_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._accelerationY = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < A_Z_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._accelerationZ = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < M_X_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._magnetometerX = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < M_Y_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._magnetometerY = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < M_Z_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._magnetometerZ = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < O_X_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._orientationX = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < O_Y_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._orientationY = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < O_Z_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._orientationZ = struct.unpack('<f', bytes)[0]
     bytes = bytearray()
     while self.index < O_W_LEN:
         bytes.append(data[self.index])
         self.index += 1
     self._orientationW = struct.unpack('<f', bytes)[0]
开发者ID:nirlevi5,项目名称:bgumodo_ws,代码行数:69,代码来源:IMUPublishResponse.py


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