def METHOD_NAME():
    scanner_params = parse_inputs()
    can_socket = init_socket(scanner_params)
    try:
        scanner = XCPOnCANScanner(can_socket,
                                  id_range=scanner_params.id_range,
                                  sniff_time=scanner_params.sniff_time,
                                  verbose=scanner_params.verbose)
        signal.signal(signal.SIGINT, signal_handler)
        results = scanner.scan_with_get_slave_id() \
            if scanner_params.broadcast \
            else scanner.scan_with_connect()  # Blocking
        if isinstance(results, list) and len(results) > 0:
            for r in results:
                print(r)
        else:
            print("Detected no XCP slave.")
    except Exception as err:
        sys.stderr.write(str(err) + "\n")
        sys.exit(1)
    finally:
        can_socket.close()