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


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