diff --git a/fec_integration_tests/interface/interface_functions/test_database_interface.py b/fec_integration_tests/interface/interface_functions/test_database_interface.py index 237f892315..d5a7a0f3f5 100644 --- a/fec_integration_tests/interface/interface_functions/test_database_interface.py +++ b/fec_integration_tests/interface/interface_functions/test_database_interface.py @@ -131,7 +131,8 @@ def test_database_interface(): _make_m_vertices(app_vertex_1, 10, 10) _make_m_vertices(app_vertex_2, 20, 20) - params = LivePacketGatherParameters(label="LiveSpikeReceiver") + params = LivePacketGatherParameters( + label="LiveSpikeReceiver", port=10000, hostname="localhost") lpg_vertex = LivePacketGather(params, label="LiveSpikeReceiver") writer.add_vertex(lpg_vertex) writer.add_edge(ApplicationEdge(app_vertex_1, lpg_vertex), "Test") diff --git a/fec_integration_tests/interface/interface_functions/test_front_end_common_insert_lpgs.py b/fec_integration_tests/interface/interface_functions/test_front_end_common_insert_lpgs.py index b02809ff17..ee63f37f9a 100644 --- a/fec_integration_tests/interface/interface_functions/test_front_end_common_insert_lpgs.py +++ b/fec_integration_tests/interface/interface_functions/test_front_end_common_insert_lpgs.py @@ -57,8 +57,8 @@ def test_that_3_lpgs_are_generated_on_3_board_app_graph(self): 'payload_prefix': None, 'payload_right_shift': 0, 'number_of_packets_sent_per_time_step': 0, - 'hostname': None, - 'port': None, + 'hostname': 'localhost', + 'port': 1000, 'strip_sdp': None, 'tag': None, 'label': "Test"} diff --git a/spinn_front_end_common/utilities/utility_objs/live_packet_gather_parameters.py b/spinn_front_end_common/utilities/utility_objs/live_packet_gather_parameters.py index 327e9c6bdd..3b786c941f 100644 --- a/spinn_front_end_common/utilities/utility_objs/live_packet_gather_parameters.py +++ b/spinn_front_end_common/utilities/utility_objs/live_packet_gather_parameters.py @@ -36,8 +36,7 @@ class LivePacketGatherParameters(object): "_received_key_mask", "_translate_keys", "_translated_key_right_shift") def __init__( - self, port: Optional[int] = None, hostname: Optional[str] = None, - tag=None, strip_sdp=True, + self, port: int, hostname: str, tag=None, strip_sdp=True, use_prefix=False, key_prefix=None, prefix_type=None, message_type=EIEIOType.KEY_32_BIT, right_shift=0, payload_as_time_stamps=True, use_payload_prefix=True, @@ -89,7 +88,7 @@ def __init__( self._translated_key_right_shift = translated_key_right_shift @property - def port(self) -> Optional[int]: + def port(self) -> int: """ Where to send data from SpiNNaker: the port of the listening UDP socket. @@ -99,7 +98,7 @@ def port(self) -> Optional[int]: return self._port @property - def hostname(self) -> Optional[str]: + def hostname(self) -> str: """ Where to send data from SpiNNaker: the host name of the listening UDP socket. diff --git a/unittests/data/test_simulator_data.py b/unittests/data/test_simulator_data.py index 6a0e2b74aa..76eee4fc13 100644 --- a/unittests/data/test_simulator_data.py +++ b/unittests/data/test_simulator_data.py @@ -454,8 +454,8 @@ def test_live_packet_recorder_params(self): self.assertFalse(FecDataView.has_live_packet_recorder_params()) with self.assertRaises(DataNotYetAvialable): FecDataView.get_live_packet_recorder_params() - lpg1 = LivePacketGatherParameters(1) - lpg2 = LivePacketGatherParameters(2) + lpg1 = LivePacketGatherParameters(1, hostname="localhost") + lpg2 = LivePacketGatherParameters(2, hostname="localhost") vertex1 = SimpleTestVertex(1, "1") vertex2 = SimpleTestVertex(2, "2") vertex3 = SimpleTestVertex(3, "3")