def __init__(self, x, y, p, region_id, sequence_no, n_requests,
                 channel, start_address, space_to_be_read):
        if not isinstance(channel, list):
            channel = [channel]

        if not isinstance(region_id, list):
            region_id = [region_id]

        if not isinstance(start_address, list):
            start_address = [start_address]

        if not isinstance(space_to_be_read, list):
            space_to_be_read = [space_to_be_read]

        if len(start_address) != n_requests or \
                len(space_to_be_read) != n_requests or \
                len(channel) != n_requests or \
                len(region_id) != n_requests:
            raise SpinnmanInvalidPacketException(
                "SpinnakerRequestReadData",
                "The format for a SpinnakerRequestReadData packet is "
                "invalid: {0:d} request(s), {1:d} start address(es) "
                "defined, {2:d} space(s) to be read defined, {3:d} region(s) "
                "defined, {4:d} channel(s) defined".format(
                    n_requests, len(start_address), len(space_to_be_read),
                    len(region_id), len(channel)))
        EIEIOCommandMessage.__init__(
            self, EIEIOCommandHeader(
                constants.EIEIO_COMMAND_IDS.SPINNAKER_REQUEST_READ_DATA.value))
        self._header = _SpinnakerRequestReadDataHeader(
            x, y, p, n_requests, sequence_no)
        self._requests = _SpinnakerRequestReadDataRequest(
            channel, region_id, start_address, space_to_be_read)
Esempio n. 2
0
 def __init__(self, region_id, sequence_no, space_read):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.NEW_BUFFERS.value))
     self._region_id = region_id
     self._sequence_no = sequence_no
     self._space_read = space_read
 def __init__(self, region_id, sequence_no, eieio_data_message):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.HOST_SEND_SEQUENCED_DATA.value))
     self._region_id = region_id
     self._sequence_no = sequence_no
     self._eieio_data_message = eieio_data_message
Esempio n. 4
0
    def __init__(
            self, n_requests, sequence_no, channel, region_id, space_read):
        if not isinstance(channel, list):
            channel = [channel]

        if not isinstance(region_id, list):
            region_id = [region_id]

        if not isinstance(space_read, list):
            space_read = [space_read]

        if len(channel) != n_requests or \
                len(region_id) != n_requests or \
                len(space_read) != n_requests:
            raise SpinnmanInvalidPacketException(
                "SpinnakerRequestReadData",
                "The format for a SpinnakerRequestReadData packet is "
                "invalid: {0:d} request(s), {1:d} space(s) read "
                "defined, {2:d} region(s) defined, {3:d} channel(s) "
                "defined".format(
                    n_requests, len(space_read), len(region_id), len(channel)))
        cmd_header = EIEIOCommandHeader(
            constants.EIEIO_COMMAND_IDS.HOST_DATA_READ.value)
        EIEIOCommandMessage.__init__(self, cmd_header)
        self._header = _HostDataReadHeader(n_requests, sequence_no)
        self._acks = _HostDataReadAck(channel, region_id, space_read)
 def __init__(self, region_id, sequence_no, eieio_data_message):
     EIEIOCommandMessage.__init__(
         self,
         EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.HOST_SEND_SEQUENCED_DATA.value))
     self._region_id = region_id
     self._sequence_no = sequence_no
     self._eieio_data_message = eieio_data_message
 def __init__(self, x, y, p, region_id, sequence_no, space_available):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.SPINNAKER_REQUEST_BUFFERS.value))
     self._x = x
     self._y = y
     self._p = p
     self._region_id = region_id
     self._sequence_no = sequence_no
     self._space_available = space_available
 def __init__(self, x, y, p, region_id, sequence_no, space_available):
     EIEIOCommandMessage.__init__(
         self,
         EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.SPINNAKER_REQUEST_BUFFERS.value))
     self._x = x
     self._y = y
     self._p = p
     self._region_id = region_id
     self._sequence_no = sequence_no
     self._space_available = space_available
Esempio n. 8
0
 def __init__(self):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.STOP_SENDING_REQUESTS.value))
 def __init__(self, database_path=None):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.DATABASE_CONFIRMATION.value))
     self._database_path = database_path
Esempio n. 10
0
 def __init__(self):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.EVENT_STOP.value))
Esempio n. 11
0
 def __init__(self):
     EIEIOCommandMessage.__init__(
         self,
         EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.STOP_SENDING_REQUESTS.value))
Esempio n. 12
0
 def __init__(self):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.EVENT_STOP.value))
Esempio n. 13
0
 def __init__(self, database_path=None):
     EIEIOCommandMessage.__init__(
         self, EIEIOCommandHeader(
             constants.EIEIO_COMMAND_IDS.DATABASE_CONFIRMATION.value))
     self._database_path = database_path