Source code for spinnman.messages.scp.impl.dpri_exit
from spinnman.messages.scp import SCPRequestHeader
from spinnman.messages.scp.abstract_messages import AbstractSCPRequest
from spinnman.messages.scp.enums import SCPCommand, DPRICommand
from spinnman.messages.sdp import SDPFlag, SDPHeader
from .check_ok_response import CheckOKResponse
[docs]class DPRIExit(AbstractSCPRequest):
""" An SCP Request to exit the dropped packet reinjection
"""
def __init__(self, x, y, p):
"""
:param x: The x-coordinate of a chip, between 0 and 255
:type x: int
:param y: The y-coordinate of a chip, between 0 and 255
:type y: int
:param p: The processor running the dropped packet reinjector, between\
0 and 17
:type p: int
"""
AbstractSCPRequest.__init__(
self,
SDPHeader(
flags=SDPFlag.REPLY_EXPECTED, destination_port=0,
destination_cpu=p, destination_chip_x=x,
destination_chip_y=y),
SCPRequestHeader(command=SCPCommand.CMD_DPRI),
argument_1=DPRICommand.EXIT.value)
[docs] def get_scp_response(self):
return CheckOKResponse(
"Exit dropped packet reinjection", SCPCommand.CMD_DPRI)