Class SpinnakerRequestBuffers
java.lang.Object
uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
uk.ac.manchester.spinnaker.messages.eieio.SpinnakerRequestBuffers
- All Implemented Interfaces:
HasChipLocation
,HasCoreLocation
,EIEIOMessage<EIEIOCommandMessage.Header>
,SerializableMessage
public class SpinnakerRequestBuffers extends EIEIOCommandMessage implements HasCoreLocation
Message used in the context of the buffering input mechanism which is sent by
the SpiNNaker system to the host computer to ask for more data to inject
during the simulation.
-
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 HasCoreLocation
core
What core are we talking about.int
regionID
What region of the core's memory.int
sequenceNum
The message sequence number.int
spaceAvailable
How much space is available. -
Constructor Summary
Constructors Constructor Description SpinnakerRequestBuffers(HasCoreLocation core, byte regionID, byte sequenceNum, int spaceAvailable)
Create an instance. -
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
getP()
int
getX()
int
getY()
Methods inherited from class uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
getHeader, minPacketLength
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.manchester.spinnaker.machine.HasChipLocation
asChipLocation, getScampCore, onSameChipAs
Methods inherited from interface uk.ac.manchester.spinnaker.machine.HasCoreLocation
asCoreLocation, onSameCoreAs
-
Field Details
-
core
What core are we talking about. -
regionID
public final int regionIDWhat region of the core's memory. -
sequenceNum
public final int sequenceNumThe message sequence number. -
spaceAvailable
public final int spaceAvailableHow much space is available.
-
-
Constructor Details
-
SpinnakerRequestBuffers
public SpinnakerRequestBuffers(HasCoreLocation core, byte regionID, byte sequenceNum, int spaceAvailable)Create an instance.- Parameters:
core
- The core being talked about.regionID
- The memory region being talked about.sequenceNum
- The message sequence number.spaceAvailable
- The space available, in bytes.
-
-
Method Details
-
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.
-
getX
public int getX()- Specified by:
getX
in interfaceHasChipLocation
- Returns:
- The X coordinate of the chip.
-
getY
public int getY()- Specified by:
getY
in interfaceHasChipLocation
- Returns:
- The Y coordinate of the chip.
-
getP
public int getP()- Specified by:
getP
in interfaceHasCoreLocation
- Returns:
- The processor coordinate of the core on its chip.
-