Class EIEIOCommandMessage
java.lang.Object
uk.ac.manchester.spinnaker.messages.eieio.EIEIOCommandMessage
- All Implemented Interfaces:
EIEIOMessage<EIEIOCommandMessage.Header>,SerializableMessage
- Direct Known Subclasses:
EventStopRequest,HostDataRead,HostDataReadAck,HostSendSequencedData,PaddingRequest,SpinnakerRequestBuffers,SpinnakerRequestReadData,StartRequests,StopRequests
An EIEIO message containing a command.
- Author:
- Sergio Davies, Donal Fellows
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEIEIO header for command packets. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToBuffer(ByteBuffer buffer) Writes this message into the given buffer as a contiguous range of bytes.int
-
Constructor Details
-
EIEIOCommandMessage
- Parameters:
command- The command in the message.
-
-
Method Details
-
addToBuffer
Description copied from interface:SerializableMessageWrites 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:
addToBufferin interfaceSerializableMessage- Parameters:
buffer- The buffer to write into.
-
minPacketLength
public int minPacketLength()- Specified by:
minPacketLengthin interfaceEIEIOMessage<EIEIOCommandMessage.Header>- Returns:
- the minimum length of a message instance in bytes.
-
getHeader
- Specified by:
getHeaderin interfaceEIEIOMessage<EIEIOCommandMessage.Header>- Returns:
- the header of this message.
-