def __init__(self, start_callback_function=None, local_host=None,
                 local_port=19999):
        """

        :param start_callback_function: A function to be called when the start\
                    message has been received.  This function should not take\
                    any parameters or return anything.
        :type start_callback_function: function() -> None
        :param local_host: Optional specification of the local hostname or\
                    ip address of the interface to listen on
        :type local_host: str
        :param local_port: Optional specification of the local port to listen\
                    on.  Must match the port that the toolchain will send the\
                    notification on (19999 by default)
        :type local_port: int
        """
        UDPConnection.__init__(
            self, local_host=local_host, local_port=local_port,
            remote_host=None, remote_port=None)
        Thread.__init__(self,
                        name="spynnaker database connection for {}:{}"
                        .format(local_host, local_port))
        self._database_callback_functions = list()
        self._start_callback_function = start_callback_function
        self._running = False
        self.daemon = True
        self.start()
Exemplo n.º 2
0
 def __init__(self, local_host=None, local_port=None, remote_host=None,
              remote_port=constants.UDP_BOOT_CONNECTION_DEFAULT_PORT):
     """
     :param local_host: The local host name or ip address to bind to.\
                 If not specified defaults to bind to all interfaces,\
                 unless remote_host is specified, in which case binding is\
                 _done to the ip address that will be used to send packets
     :type local_host: str
     :param local_port: The local port to bind to, between 1025 and 65535.\
                 If not specified, defaults to a random unused local port
     :type local_port: int
     :param remote_host: The remote host name or ip address to send packets\
                 to.  If not specified, the socket will be available for\
                 listening only, and will throw and exception if used for\
                 sending
     :type remote_host: str
     :param remote_port: The remote port to send packets to.  If\
                 remote_host is None, this is ignored.
     :raise spinnman.exceptions.SpinnmanIOException: If there is an error\
                 setting up the communication channel
     """
     UDPConnection.__init__(
         self, local_host, local_port, remote_host, remote_port)
     AbstractSpinnakerBootReceiver.__init__(self)
     AbstractSpinnakerBootSender.__init__(self)
Exemplo n.º 3
0
 def __init__(self, cabinet, frame, boards, local_host=None,
              local_port=None, remote_host=None,
              remote_port=constants.SCP_SCAMP_PORT):
     """
     :param cabinet: The cabinet number of the connection
     :type cabinet: int
     :param frame: The frame number of the connection
     :type frame: int
     :param boards: The boards that the connection can control on the same\
             backplane
     :type boards: iterable of int
     :param local_host: The optional ip address or host name of the local\
             interface to listen on
     :type local_host: str
     :param local_port: The optional local port to listen on
     :type local_port: int
     :param remote_host: The optional remote host name or ip address to\
             send messages to.  If not specified, sending will not be\
             possible using this connection
     :type remote_host: str
     :param remote_port: The optional remote port number to send messages\
             to.  If not specified, sending will not be possible using this\
             connection
     """
     UDPConnection.__init__(
         self, local_host, local_port, remote_host, remote_port)
     AbstractSCPReceiver.__init__(self)
     AbstractSCPSender.__init__(self)
     self._cabinet = cabinet
     self._frame = frame
     self._boards = boards
Exemplo n.º 4
0
 def __init__(self, chip_x=None, chip_y=None, local_host=None,
              local_port=None, remote_host=None, remote_port=None):
     """
     :param chip_x: The optional x-coordinate of the chip at the remote\
             end of the connection.  If not specified, it will not be\
             possible to send sdp messages that require a response with\
             this connection.
     :type chip_x: int
     :param chip_y: The optional y-coordinate of the chip at the remote\
             end of the connection.  If not specified, it will not be\
             possible to send sdp messages that require a response with\
             this connection.
     :type chip_y: int
     :param local_host: The optional ip address or host name of the local\
             interface to listen on
     :type local_host: str
     :param local_port: The optional local port to listen on
     :type local_port: int
     :param remote_host: The optional remote host name or ip address to\
             send messages to.  If not specified, sending will not be\
             possible using this connection
     :type remote_host: str
     :param remote_port: The optional remote port number to send messages\
             to.  If not specified, sending will not be possible using this\
             connection
     """
     UDPConnection.__init__(
         self, local_host, local_port, remote_host, remote_port)
     AbstractSDPReceiver.__init__(self)
     AbstractSDPSender.__init__(self)
     AbstractListenable.__init__(self)
     self._chip_x = chip_x
     self._chip_y = chip_y
    def __init__(self, local_host=None, local_port=None, remote_host=None,
                 remote_port=None):
        """

        :param local_host: The optional ip address or host name of the local\
                interface to listen on
        :type local_host: str
        :param local_port: The optional local port to listen on
        :type local_port: int
        :param remote_host: The optional remote host name or ip address to\
                send messages to.  If not specified, sending will not be\
                possible using this connection
        :type remote_host: str
        :param remote_port: The optional remote port number to send messages\
                to.  If not specified, sending will not be possible using this\
                connection
        """
        UDPConnection.__init__(
            self, local_host, local_port, remote_host, remote_port)
        AbstractEIEIOReceiver.__init__(self)
        AbstractEIEIOSender.__init__(self)
        AbstractListenable.__init__(self)
Exemplo n.º 6
0
 def __init__(self,
              chip_x=None,
              chip_y=None,
              local_host=None,
              local_port=None,
              remote_host=None,
              remote_port=None):
     """
     :param chip_x: The optional x-coordinate of the chip at the remote\
             end of the connection.  If not specified, it will not be\
             possible to send sdp messages that require a response with\
             this connection.
     :type chip_x: int
     :param chip_y: The optional y-coordinate of the chip at the remote\
             end of the connection.  If not specified, it will not be\
             possible to send sdp messages that require a response with\
             this connection.
     :type chip_y: int
     :param local_host: The optional ip address or host name of the local\
             interface to listen on
     :type local_host: str
     :param local_port: The optional local port to listen on
     :type local_port: int
     :param remote_host: The optional remote host name or ip address to\
             send messages to.  If not specified, sending will not be\
             possible using this connection
     :type remote_host: str
     :param remote_port: The optional remote port number to send messages\
             to.  If not specified, sending will not be possible using this\
             connection
     """
     UDPConnection.__init__(self, local_host, local_port, remote_host,
                            remote_port)
     AbstractSDPReceiver.__init__(self)
     AbstractSDPSender.__init__(self)
     AbstractListenable.__init__(self)
     self._chip_x = chip_x
     self._chip_y = chip_y
 def __init__(self,
              cabinet,
              frame,
              boards,
              local_host=None,
              local_port=None,
              remote_host=None,
              remote_port=None):
     """
     :param cabinet: The cabinet number of the connection
     :type cabinet: int
     :param frame: The frame number of the connection
     :type frame: int
     :param boards: The boards that the connection can control on the same\
             backplane
     :type boards: iterable of int
     :param local_host: The optional ip address or host name of the local\
             interface to listen on
     :type local_host: str
     :param local_port: The optional local port to listen on
     :type local_port: int
     :param remote_host: The optional remote host name or ip address to\
             send messages to.  If not specified, sending will not be\
             possible using this connection
     :type remote_host: str
     :param remote_port: The optional remote port number to send messages\
             to.  If not specified, sending will not be possible using this\
             connection
     """
     if remote_port is None:
         remote_port = constants.SCP_SCAMP_PORT
     UDPConnection.__init__(self, local_host, local_port, remote_host,
                            remote_port)
     AbstractSCPReceiver.__init__(self)
     AbstractSCPSender.__init__(self)
     self._cabinet = cabinet
     self._frame = frame
     self._boards = boards
 def close(self):
     self._running = False
     UDPConnection.close(self)
 def __init__(self,
              local_host=None,
              local_port=constants.UDP_BOOT_CONNECTION_DEFAULT_PORT):
     UDPConnection.__init__(self,
                            local_host=local_host,
                            local_port=local_port)
Exemplo n.º 10
0
 def __init__(self, local_host=None,
              local_port=constants.UDP_BOOT_CONNECTION_DEFAULT_PORT):
     UDPConnection.__init__(self, local_host=local_host,
                            local_port=local_port)