def get_serial_number(device): """Decode (if needed) and return the ICS device serial string :param device: ics device :return: ics device serial string :rtype: str """ a0000 = 604661760 if device.SerialNumber >= a0000: return ics.base36enc(device.SerialNumber) return str(device.SerialNumber)
def get_serial_number(device): """Decode (if needed) and return the ICS device serial string :param device: ics device :return: ics device serial string :rtype: str """ if int("AA0000", 36) < device.SerialNumber < int("ZZZZZZ", 36): return ics.base36enc(device.SerialNumber) else: return str(device.SerialNumber)
def dev_name(device): # Return a friendly name of the device (ie. neoVI FIRE2 CY1234) if int("AA0000", 36) <= device.SerialNumber <= int("ZZZZZZ", 36): return device.Name + " " + ics.base36enc(device.SerialNumber) else: return device.Name + " " + str(device.SerialNumber)
def dev_name(device): if int("AA0000", 36) < device.SerialNumber < int("ZZZZZZ", 36): return device.Name + " " + ics.base36enc(device.SerialNumber) else: return device.Name + " " + str(device.SerialNumber)