Class HostSendSequencedData
java.lang.Object
uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
uk.ac.manchester.spinnaker.messages.eieio.HostSendSequencedData
- All Implemented Interfaces:
EIEIOMessage<EIEIOCommandMessage.Header>
,SerializableMessage
public class HostSendSequencedData extends EIEIOCommandMessage
Packet sent from the host to the SpiNNaker system in the context of buffering
input mechanism to identify packet which needs to be stored in memory for
future use.
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
EIEIOCommandMessage.Header
-
Field Summary
Fields Modifier and Type Field Description EIEIODataMessage
eieioDataMessage
The data.int
regionID
What region will be moved.int
sequenceNum
The message sequence number. -
Constructor Summary
Constructors Constructor Description HostSendSequencedData(byte regionID, byte sequenceNum, EIEIODataMessage eieioDataMessage)
Create a message. -
Method Summary
Modifier and Type Method Description void
addToBuffer(ByteBuffer buffer)
Writes this message into the given buffer as a contiguous range of bytes.int
minPacketLength()
Methods inherited from class uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
getHeader
-
Field Details
-
regionID
public final int regionIDWhat region will be moved. -
sequenceNum
public final int sequenceNumThe message sequence number. -
eieioDataMessage
The data.
-
-
Constructor Details
-
HostSendSequencedData
Create a message.- Parameters:
regionID
- The region IDsequenceNum
- The sequence numbereieioDataMessage
- The payload data.
-
-
Method Details
-
minPacketLength
public int minPacketLength()- Specified by:
minPacketLength
in interfaceEIEIOMessage<EIEIOCommandMessage.Header>
- Overrides:
minPacketLength
in classEIEIOCommandMessage
- Returns:
- the minimum length of a message instance in bytes.
-
addToBuffer
Description copied from interface:SerializableMessage
Writes this message into the given buffer as a contiguous range of bytes. This is so that a message can be sent. Implementors may assume that the buffer has been configured to be little-endian and that its position is at the point where they should begin writing. Once it has finished, the position should be immediately after the last byte written by this method.Calling this method should not update the internal state of the message. It should be possible to add the message to multiple buffers without special precautions by the caller.
- Specified by:
addToBuffer
in interfaceSerializableMessage
- Overrides:
addToBuffer
in classEIEIOCommandMessage
- Parameters:
buffer
- The buffer to write into.
-