closeDiffRequest.py
Go to the documentation of this file.
00001 __author__ = 'tom1231'
00002 import struct
00003 from BAL.Header.RiCHeader import RiCHeader
00004 
00005 REQ_ID = 8
00006 REQ_LEN = 14
00007 
00008 
00009 class CloseDiffRequest(RiCHeader):
00010     def __init__(self, angular, linear):
00011         RiCHeader.__init__(self)
00012         self._id = REQ_ID
00013         self._length = REQ_LEN
00014         self._des = 0x1001
00015         self._checkSum = 0
00016         self._angular = angular
00017         self._linear = linear
00018         self._checkSum = self.calCheckSum(self.dataTosend())
00019 
00020     def dataTosend(self):
00021         return RiCHeader.dataTosend(self)\
00022                + struct.pack('<f', self._angular) \
00023                + struct.pack('<f', self._linear)
00024 
00025 


ric_board
Author(s): RoboTiCan
autogenerated on Fri Oct 27 2017 03:02:30