Ejemplo n.º 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()
Ejemplo n.º 2
0
 def append_crc(self):
     b = self.buffer
     x = crc(b)
     b.append(x & 0xFF)
     b.append(x >> 8)
     self.crc = x