diff --git a/spinnman/processes/get_routes_process.py b/spinnman/processes/get_routes_process.py index ce30b8fde..97bf3703b 100644 --- a/spinnman/processes/get_routes_process.py +++ b/spinnman/processes/get_routes_process.py @@ -16,7 +16,7 @@ from functools import partial from typing import List, Optional -from spinn_machine import MulticastRoutingEntry, Router +from spinn_machine import MulticastRoutingEntry from spinnman.messages.scp.impl.read_memory import ReadMemory, Response from spinnman.constants import UDP_MESSAGE_MAX_SIZE @@ -64,13 +64,8 @@ def _add_routing_entry( if self._app_id is not None and self._app_id != app_id: return - # Convert bit-set into list of (set) IDs - processor_ids, link_ids = \ - Router.convert_spinnaker_route_to_routing_ids(route) - self._entries[route_no + offset] = MulticastRoutingEntry( - key, mask, processor_ids=processor_ids, link_ids=link_ids, - defaultable=False) + key, mask, defaultable=False, spinnaker_route=route) def __handle_response(self, offset: int, response: Response): for route_no in range(_ENTRIES_PER_READ): diff --git a/spinnman/processes/load_fixed_route_routing_entry_process.py b/spinnman/processes/load_fixed_route_routing_entry_process.py index 42f7f2c15..b40a1f1af 100644 --- a/spinnman/processes/load_fixed_route_routing_entry_process.py +++ b/spinnman/processes/load_fixed_route_routing_entry_process.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from spinn_machine import FixedRouteEntry, Router +from spinn_machine import FixedRouteEntry from spinnman.messages.scp.impl import FixedRouteInit from spinnman.processes import AbstractMultiConnectionProcess @@ -36,7 +36,6 @@ def load_fixed_route( :param int app_id: The ID of the application with which to associate the routes. If not specified, defaults to 0. """ - route_entry = Router.convert_routing_table_entry_to_spinnaker_route( - fixed_route) with self._collect_responses(): - self._send_request(FixedRouteInit(x, y, route_entry, app_id)) + self._send_request(FixedRouteInit( + x, y, fixed_route.spinnaker_route, app_id)) diff --git a/spinnman/processes/load_routes_process.py b/spinnman/processes/load_routes_process.py index 3985e6a46..a884348e6 100644 --- a/spinnman/processes/load_routes_process.py +++ b/spinnman/processes/load_routes_process.py @@ -15,7 +15,6 @@ import struct from typing import Collection -from spinn_machine import Router from spinn_machine.multicast_routing_entry import MulticastRoutingEntry from spinnman.exceptions import SpinnmanInvalidParameterException @@ -62,12 +61,9 @@ def load_routes( routing_data = bytearray(16 * (len(routes) + 1)) n_entries = 0 for route in routes: - route_entry = \ - Router.convert_routing_table_entry_to_spinnaker_route(route) - _ROUTE_PATTERN.pack_into( routing_data, n_entries * 16, n_entries, - route_entry, route.routing_entry_key, route.mask) + route.spinnaker_route, route.routing_entry_key, route.mask) n_entries += 1 # Add an entry to mark the end