Enumeration#
Enumeration.py#
from itala import itala
def enumeration():
# Initialize the system instance to enables the usage of the entire API
system = itala.create_system()
# Look for available devices across all network interfaces on the host and
# retrieve a list of DeviceInfo objects, with a limit of 700ms to show up.
devices = system.enumerate_devices(300)
if(devices.size() == 0):
print("No devices found. Aborted.")
exit(1)
print(f"{devices.size()} devices found.")
# For every device found some information is printed
for device in devices:
print(f"Device is {device.serial_number}")
print(f"\t\tDisplay name: {device.display_name}")
print(f"\t\tMAC Address: {device.mac_address_as_string}")
print(f"\t\tIP Address: {device.ip_address_as_string}")
print(f"\t\tModel: {device.model}")
print(f"\t\tAccess status: {device.access_status}")
# Never forget to dispose the system when done!
system.dispose()
if __name__ == "__main__":
try:
enumeration()
except Exception as e:
print(str(e))
exit(1)
exit(0)