Class HostDataRead
java.lang.Object
uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
uk.ac.manchester.spinnaker.messages.eieio.HostDataRead
- All Implemented Interfaces:
EIEIOMessage<EIEIOCommandMessage.Header>
,SerializableMessage
public class HostDataRead extends EIEIOCommandMessage
Packet sent by the host computer to the SpiNNaker system in the context of
the buffering output technique to signal that the host has completed reading
data from the output buffer, and that such space can be considered free to
use again.
- See Also:
HostDataReadAck
-
Constructor Summary
Constructors Constructor Description HostDataRead(byte numRequests, byte sequenceNum, byte[] channel, byte[] regionID, int[] spaceRead)
Create.HostDataRead(byte sequenceNum, byte channel, byte regionID, int spaceRead)
Create. -
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
getChannel(int ackID)
Get the channel in a particular acknowledgement.int
getNumRequests()
int
getRegionID(int ackID)
Get the region in a particular acknowledgement.int
getSequenceNumber()
int
getSpaceRead(int ackID)
Get the space in a particular acknowledgement.Methods inherited from class uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
getHeader, minPacketLength
-
Constructor Details
-
HostDataRead
public HostDataRead(byte numRequests, byte sequenceNum, byte[] channel, byte[] regionID, int[] spaceRead)Create.- Parameters:
numRequests
- The number of requests we are talking about. This is used to check the validity of other arguments.sequenceNum
- The message sequence number.channel
- What channels are we talking about.regionID
- What regions are we talking about.spaceRead
- How much space has been read from each region.
-
HostDataRead
public HostDataRead(byte sequenceNum, byte channel, byte regionID, int spaceRead)Create.- Parameters:
sequenceNum
- The message sequence number.channel
- What channel are we talking about.regionID
- What region are we talking about.spaceRead
- How much space has been read.
-
-
Method Details
-
getNumRequests
public int getNumRequests()- Returns:
- The number of requests.
-
getSequenceNumber
public int getSequenceNumber()- Returns:
- The message sequence number.
-
getChannel
public int getChannel(int ackID)Get the channel in a particular acknowledgement.- Parameters:
ackID
- Which ack?- Returns:
- Which channel?
-
getRegionID
public int getRegionID(int ackID)Get the region in a particular acknowledgement.- Parameters:
ackID
- Which ack?- Returns:
- What region?
-
getSpaceRead
public int getSpaceRead(int ackID)Get the space in a particular acknowledgement.- Parameters:
ackID
- Which ack?- Returns:
- How much space is there?
-
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.
-