batteryPublishResponse.py
Go to the documentation of this file.
00001 __author__ = 'tom1231'
00002 import struct
00003 from BAL.Header.RiCHeader import RiCHeader
00004 
00005 BAT_STAT = 10
00006 
00007 
00008 class BatteryPublishResponse(RiCHeader):
00009     def __init__(self):
00010         RiCHeader.__init__(self)
00011         self._status = 0.0
00012 
00013     def getStatus(self):
00014         return self._status
00015 
00016     def buildRequest(self, data):
00017         RiCHeader.buildRequest(self, data)
00018         bytes = bytearray()
00019         while self.index < BAT_STAT:
00020             bytes.append(data[self.index])
00021             self.index += 1
00022         self._status = struct.unpack('<f', bytes)[0]
00023 


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