# Source code for spinnman.messages.scp.impl.router_init

# Copyright (c) 2017-2019 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from spinn_utilities.overrides import overrides
from spinnman.exceptions import SpinnmanInvalidParameterException
from spinnman.messages.scp.abstract_messages import AbstractSCPRequest
from spinnman.messages.scp.enums import SCPCommand
from .check_ok_response import CheckOKResponse

[docs]class RouterInit(AbstractSCPRequest):
""" A request to initialize the router on a chip
"""
__slots__ = []

"""
:param int x: The x-coordinate of the chip, between 0 and 255
:param int y: The y-coordinate of the chip, between 0 and 255
:param int n_entries: The number of entries in the table, more than 0
:param int app_id:
The ID of the application with which to associate the
routes.  If not specified, defaults to 0.
:raise SpinnmanInvalidParameterException:
* If x is out of range
* If y is out of range
* If n_entries is 0 or less
* If table_address is not positive
* If base_address is not positive
"""
# pylint: disable=too-many-arguments
if n_entries < 1:
raise SpinnmanInvalidParameterException(
"n_entries", str(n_entries), "Must be more than 0")
raise SpinnmanInvalidParameterException(
"Must be a positive integer")
raise SpinnmanInvalidParameterException(
"Must be a positive integer")

super().__init__(