spinnman.utilities package¶
Subpackages¶
Submodules¶
spinnman.utilities.appid_tracker module¶
-
class
spinnman.utilities.appid_tracker.
AppIdTracker
(app_ids_in_use=None, min_app_id=17, max_app_id=254)[source]¶ Bases:
object
A tracker of application IDs to make it easier to allocate new IDs.
Parameters: - app_ids_in_use (list[int] or None) – The IDs that are already in use
- min_app_id (int) – The smallest application ID to use
- max_app_id (int) – The largest application ID to use
-
allocate_id
(allocated_id)[source]¶ Allocate a given ID.
Parameters: allocated_id – The ID to allocate Raises: KeyError – If the ID is not present
spinnman.utilities.locate_connected_machine_ip_address module¶
-
spinnman.utilities.locate_connected_machine_ip_address.
locate_connected_machine
(handler)[source]¶ Locates any SpiNNaker machines IP addresses from the auto-transmitted packets from non-booted SpiNNaker machines.
Parameters: handler ((ipaddr, float) --> bool) – A callback that decides whether to stop searching. The callback is given two arguments: the IP address found and the current time.
spinnman.utilities.reports module¶
-
spinnman.utilities.reports.
generate_machine_report
(report_directory, machine, connections)[source]¶ Generate report on the physical structure of the target SpiNNaker machine.
Parameters: - report_directory (str) – the directory to which reports are stored
- machine (
spinn_machine.Machine
) – the machine python object - connections (iterable(
spinnman.connections.abstract_classes.AbstractConnection
)) – the list of connections to the machine
Return type: None
Raises: IOError – when a file cannot be opened for some reason
spinnman.utilities.utility_functions module¶
-
spinnman.utilities.utility_functions.
get_vcpu_address
(p)[source]¶ Get the address of the vcpu_t structure for the given core
Parameters: p (int) – The core
-
spinnman.utilities.utility_functions.
reprogram_tag
(connection, tag, strip=True)[source]¶ Reprogram an IP Tag to send responses to a given SCAMPConnection
Parameters: - connection – The connection to target the tag at
- tag – The id of the tag to set
- strip – True if
-
spinnman.utilities.utility_functions.
send_port_trigger_message
(connection, board_address)[source]¶ Sends a port trigger message using a connection to (hopefully) open a port in a NAT and/or firewall to allow incoming packets to be received.
Parameters: - connection – The UDP connection down which the trigger message should be sent
- board_address – The address of the SpiNNaker board to which the message should be sent
-
spinnman.utilities.utility_functions.
work_out_bmp_from_machine_details
(hostname, number_of_boards)[source]¶ 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 from the final part e.g. if the machine IP address is 192.168.0.5, the BMP IP address is assumed to be 192.168.0.4
Parameters: - hostname – the SpiNNaker machine main hostname or IP address
- number_of_boards – the number of boards in the machine
Returns: The BMP connection data