From fc67836b7583839e5fc441a3924d205314871a5b Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 31 Jul 2023 14:04:52 +0100 Subject: [PATCH] remove number_of_boards param --- spinnman/extended/extended_transceiver.py | 8 ++------ spinnman/transceiver.py | 8 ++------ spinnman/utilities/utility_functions.py | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/spinnman/extended/extended_transceiver.py b/spinnman/extended/extended_transceiver.py index f2120267f..2420ee796 100644 --- a/spinnman/extended/extended_transceiver.py +++ b/spinnman/extended/extended_transceiver.py @@ -50,8 +50,7 @@ def create_transceiver_from_hostname( - hostname, version, bmp_connection_data=None, number_of_boards=None, - auto_detect_bmp=False): + hostname, version, bmp_connection_data=None, auto_detect_bmp=False): """ Create a Transceiver by creating a :py:class:`~.UDPConnection` to the given hostname on port 17893 (the default SCAMP port), and a @@ -63,9 +62,6 @@ def create_transceiver_from_hostname( :param hostname: The hostname or IP address of the board or `None` if only the BMP connections are of interest :type hostname: str or None - :param number_of_boards: a number of boards expected to be supported, or - ``None``, which defaults to a single board - :type number_of_boards: int or None :param int version: the type of SpiNNaker board used within the SpiNNaker machine being used. If a Spinn-5 board, then the version will be 5, Spinn-3 would equal 3 and so on. @@ -97,7 +93,7 @@ def create_transceiver_from_hostname( if (version >= 4 and auto_detect_bmp is True and (bmp_connection_data is None or not bmp_connection_data)): bmp_connection_data = [ - work_out_bmp_from_machine_details(hostname, number_of_boards)] + work_out_bmp_from_machine_details(hostname)] # handle BMP connections if bmp_connection_data is not None: diff --git a/spinnman/transceiver.py b/spinnman/transceiver.py index 394f36877..2cbc10f09 100644 --- a/spinnman/transceiver.py +++ b/spinnman/transceiver.py @@ -90,8 +90,7 @@ def create_transceiver_from_hostname( - hostname, version, bmp_connection_data=None, number_of_boards=None, - auto_detect_bmp=False): + hostname, version, bmp_connection_data=None, auto_detect_bmp=False): """ Create a Transceiver by creating a :py:class:`~.UDPConnection` to the given hostname on port 17893 (the default SCAMP port), and a @@ -103,9 +102,6 @@ def create_transceiver_from_hostname( :param hostname: The hostname or IP address of the board or `None` if only the BMP connections are of interest :type hostname: str or None - :param number_of_boards: a number of boards expected to be supported, or - ``None``, which defaults to a single board - :type number_of_boards: int or None :param int version: the type of SpiNNaker board used within the SpiNNaker machine being used. If a Spinn-5 board, then the version will be 5, Spinn-3 would equal 3 and so on. @@ -137,7 +133,7 @@ def create_transceiver_from_hostname( if (version >= 4 and auto_detect_bmp is True and (bmp_connection_data is None or not bmp_connection_data)): bmp_connection_data = [ - work_out_bmp_from_machine_details(hostname, number_of_boards)] + work_out_bmp_from_machine_details(hostname)] # handle BMP connections if bmp_connection_data is not None: diff --git a/spinnman/utilities/utility_functions.py b/spinnman/utilities/utility_functions.py index 31320dcbc..4cf00287d 100644 --- a/spinnman/utilities/utility_functions.py +++ b/spinnman/utilities/utility_functions.py @@ -24,7 +24,7 @@ from spinnman.exceptions import SpinnmanTimeoutException -def work_out_bmp_from_machine_details(hostname, number_of_boards): +def work_out_bmp_from_machine_details(hostname): """ Work out the BMP connection IP address given the machine details. This is assumed to be the IP address of the machine, with 1 subtracted @@ -32,7 +32,6 @@ def work_out_bmp_from_machine_details(hostname, number_of_boards): BMP IP address is assumed to be 192.168.0.4 :param str hostname: the SpiNNaker machine main hostname or IP address - :param int number_of_boards: the number of boards in the machine :return: The BMP connection data :rtype: BMPConnectionData """ @@ -44,10 +43,7 @@ def work_out_bmp_from_machine_details(hostname, number_of_boards): # add board scope for each split # if None, the end user didn't enter anything, so assume one board # starting at position 0 - if number_of_boards == 0 or number_of_boards is None: - board_range = [0] - else: - board_range = range(number_of_boards) + board_range = [0] # Assume a single board with no cabinet or frame specified return BMPConnectionData(cabinet=0, frame=0, ip_address=bmp_ip_address,