relayParamResponse.py
Go to the documentation of this file.
00001 __author__ = 'tom1231'
00002 import struct
00003 from BAL.Header.Response.ParamBuildResponse import ParamBuildResponse, Rely
00004 
00005 MSG_LEN = 18
00006 
00007 class RelayParamResponse(ParamBuildResponse):
00008 
00009     def __init__(self, devId , param):
00010         ParamBuildResponse.__init__(self, Rely, devId, 0)
00011         self._length = MSG_LEN
00012         self._checkSum = 0
00013 
00014         self._port = param.getRelayPort(devId)
00015 
00016         self._checkSum = self.calCheckSum(self.dataTosend())
00017 
00018     def dataTosend(self):
00019         return ParamBuildResponse.dataTosend(self) + struct.pack('<i', self._port)
00020 
00021 


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