Exemplo n.º 1
0
 def createValue(self):
     addr = self.absolute_address
     a = self.stream.readBits(addr, 32, self.endian)
     b = self.stream.readBits(addr + 32, 16, self.endian)
     c = self.stream.readBits(addr + 48, 16, self.endian)
     d = self.stream.readBytes(addr + 64, 2)
     e = self.stream.readBytes(addr + 80, 6)
     return "%08X-%04X-%04X-%s-%s" % (a, b, c, str2hex(d), str2hex(e))
Exemplo n.º 2
0
 def createValue(self):
     bytes = self.stream.readBytes(self.absolute_address, 6)
     return str2hex(bytes, format="%02x:")[:-1]
Exemplo n.º 3
0
 def createDisplay(self):
     text = str2hex(self['uuid'].value, format=r"%02x")
     return "%s-%s-%s-%s-%s" % (
         text[:8], text[8:12], text[12:16], text[16:20], text[20:])
Exemplo n.º 4
0
 def createRawDisplay(self):
     value = self.stream.readBytes(self.absolute_address, 16)
     return str2hex(value, format=r"\x%02x")