def getSerial(self): if int(self.raw.split()[1]) != 0x70: print 'Not in Family 0x70' return 'Family_Code_Error' serial = t.serialNum(self.raw) # cereal oats = t.reverse(serial) # reversed eggs = t.toHex(oats) # hex return eggs
def getUniqueIDs(rmList, slotList, verbose=0): print "Unique IDs" uniqueIDArray = [] # Iterate through RM 0, 1, 2, 3 (include desired RMs in list) for rm in rmList: print '--- RM ',rm, ' ---' t.openRM(rm) idList = [] # Iterate through Slot 0, 1, 2, 3 (run for all 4 slots by default) for slot in slotList[rm]: message = uniqueID(slot) # print checkCRC(message,7,10, verbose) final_message = t.serialNum(message) final_message = t.reverse(final_message) final_message = t.toHex(final_message) idList.append(message) print 'Slot ',slot,': ',message,'\t-> ',final_message uniqueIDArray.append(idList) return uniqueIDArray
def getUniqueIDs(rmList, slotList, verbose=0): print "Unique IDs" uniqueIDArray = [] # Iterate through RM 0, 1, 2, 3 (include desired RMs in list) for rm in rmList: print '--- RM ', rm, ' ---' t.openRM(rm) idList = [] # Iterate through Slot 0, 1, 2, 3 (run for all 4 slots by default) for slot in slotList[rm]: message = uniqueID(slot) # print checkCRC(message,7,10, verbose) final_message = t.serialNum(message) final_message = t.reverse(final_message) final_message = t.toHex(final_message) idList.append(message) print 'Slot ', slot, ': ', message, '\t-> ', final_message uniqueIDArray.append(idList) return uniqueIDArray