def format(self, rec, prefix=""): off = rec["offset"] addr = rec["addr"].toString() dev = getDevByAddr(addr).getName() if getDevByAddr(addr) else addr cr = ctrlToString(rec["type"]) out(prefix + format(off, '04x') + " " + format(dev, '30s') + " " + format(addr, '8s') + " " + cr + " " + '{0:08b}'.format(rec["type"]) + " group: " + format(rec["group"], '02x') + " " + self.dataToString(rec["data"]))
def dumpRecord(rec, prefix=""): off = rec["offset"] addr = rec["addr"].toString() dev = getDevByAddr(addr).getName() if getDevByAddr(addr) else addr cr = ctrlToString(rec["type"]) out(prefix + format(off, '04x') + " " + format(dev, '30s') + " " + format(addr, '8s') + " " + cr + " " + '{0:08b}'.format(rec["type"]) + " group: " + format(rec["group"], '02x') + " data: " + ' '.join([format(x & 0xFF, '02x') for x in rec["data"]]))
def format(self, rec, prefix = ""): off = rec["offset"] addr = rec["addr"].toString() dev = getDevByAddr(addr).getName() if getDevByAddr(addr) else addr cr = ctrlToString(rec["type"]) out(prefix + format(off, '04x') + " " + format(dev, '30s') + " " + format(addr, '8s') + " " + cr + " " + '{0:08b}'.format(rec["type"]) + " group: " + format(rec["group"], '02x') + " " + self.dataToString(rec["data"]))
def dumpRecord(rec, prefix = ""): off = rec["offset"] addr = rec["addr"].toString() dev = getDevByAddr(addr).getName() if getDevByAddr(addr) else addr cr = ctrlToString(rec["type"]) out(prefix + format(off, '04x') + " " + format(dev, '30s') + " " + format(addr, '8s') + " " + cr + " " + '{0:08b}'.format(rec["type"]) + " group: " + format(rec["group"], '02x') + " data: " + ' '.join([format(x & 0xFF, '02x') for x in rec["data"]]))