Esempio n. 1
0
 def __str__(self):
     result = array.array('c')
     result.fromstring('slave_address:    0x%02X\nfunction:   0x%02X\n' %
                       (self.slave_address, self.function))
     result.fromstring('byte_count: 0x%02X\n' % self.byte_count)
     if self.data:
         result.fromstring(dump_ints_tostring(self.data, 'data:       '))
     result.fromstring('crc:        0x%04X\n' % self.crc)
     return result.tostring()
Esempio n. 2
0
 def __str__(self):
     result = array.array('c')
     result.fromstring('slave_address:    0x%02X\nfunction:   0x%02X\n' %
                       (self.slave_address, self.function))
     result.fromstring('byte_count: 0x%02X\n' % self.byte_count)
     if self.data:
         result.fromstring(dump_ints_tostring(self.data, 'data:       '))
     result.fromstring('crc:        0x%04X\n' % self.crc)
     return result.tostring()
Esempio n. 3
0
 def __str__(self):
     result = array.array('c')
     if self.data:
         result.fromstring(dump_ints_tostring(self.data, 'data:       '))
     return result.tostring()