Skip to content

Commit

Permalink
Merge pull request #379 from SpiNNakerManchester/create_transceiver
Browse files Browse the repository at this point in the history
Create Transceiver always returns a Transceiver
  • Loading branch information
rowleya authored Nov 3, 2023
2 parents f50bb65 + 467565c commit d323ebd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion spinnman/get_cores_in_run_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
from spinnman.board_test_configuration import BoardTestConfiguration
from spinnman.config_setup import unittest_setup
from spinnman.model.enums import CPUState
from spinnman.transceiver import Transceiver

SCAMP_ID = 0
IGNORED_IDS = {SCAMP_ID, 16} # WHY 16?

Expand Down Expand Up @@ -67,7 +69,7 @@ def get_cores_in_run_state(txrx, app_id, print_all_chips):
print(f'watchdog core: {x} {y} {p}')


def _make_transceiver(host, version, bmp_names):
def _make_transceiver(host, version, bmp_names) -> Transceiver:
"""
:param host:
Host to use or `None` to use test configuration for all parameters
Expand Down
5 changes: 3 additions & 2 deletions spinnman/transceiver/transceiver_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
work_out_bmp_from_machine_details)
from spinnman.connections.udp_packet_connections import (
BMPConnection, BootConnection, SCAMPConnection)
from spinnman.transceiver import Transceiver
from spinnman.transceiver.version3transceiver import Version3Transceiver
from spinnman.transceiver.version5transceiver import Version5Transceiver
from spinnman.transceiver.virtual5Transceiver import Virtual5Transceiver
Expand All @@ -38,7 +39,7 @@ def create_transceiver_from_hostname(
hostname: Optional[str], *,
bmp_connection_data: Optional[BMPConnectionData] = None,
auto_detect_bmp: bool = False, power_cycle: bool = False,
extended: bool = False):
extended: bool = False) -> Transceiver:
"""
Create a Transceiver by creating a :py:class:`~.UDPConnection` to the
given hostname on port 17893 (the default SCAMP port), and a
Expand Down Expand Up @@ -110,7 +111,7 @@ def create_transceiver_from_hostname(

def create_transceiver_from_connections(
connections: List[Connection], virtual: bool = False,
power_cycle: bool = False, extended: bool = False):
power_cycle: bool = False, extended: bool = False) -> Transceiver:
"""
Create a Transceiver with these connections
Expand Down

0 comments on commit d323ebd

Please sign in to comment.