# Source code for spinnman.connections.udp_packet_connections.eieio_connection

# 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/>.

import struct
from .udp_connection import UDPConnection
from spinnman.connections.abstract_classes import (
from spinnman.messages.eieio import (
from spinn_utilities.overrides import overrides

_ONE_SHORT = struct.Struct("<H")
_REPR_TEMPLATE = "EIEIOConnection(local_host={}, local_port={},"\
"remote_host={}, remote_port={})"

[docs]class EIEIOConnection(
""" A UDP connection for sending and receiving raw EIEIO messages.
"""
__slots__ = []

if header & 0xC000 == 0x4000:

[docs]    @overrides(EIEIOSender.send_eieio_message)
def send_eieio_message(self, eieio_message):
self.send(eieio_message.bytestring)

[docs]    def send_eieio_message_to(self, eieio_message, ip_address, port):