Пример #1
0
 def append_crc(self):
     #append a crc character to an existing response string
     buffer = array.array('B')
     buffer.fromstring(self.buffer)
     x = crc(buffer)
     buffer.append(x & 0xFF)
     buffer.append(x >> 8)
     self.crc = x
     self.buffer = buffer.tostring()
Пример #2
0
 def append_crc(self):
     #append a crc character to an existing response string
     buffer = array.array('B')
     buffer.fromstring(self.buffer)
     x = crc(buffer)
     buffer.append(x & 0xFF)
     buffer.append(x >> 8)
     self.crc = x
     self.buffer = buffer.tostring()
Пример #3
0
 def append_crc(self):
     b = self.buffer
     x = crc(b)
     b.append(x & 0xFF)
     b.append(x >> 8)
     self.crc = x
Пример #4
0
 def append_crc(self):
     b = self.buffer
     x = crc(b)
     b.append(x & 0xFF)
     b.append(x >> 8)
     self.crc = x