Class KeyPayloadDataElement
java.lang.Object
uk.ac.manchester.spinnaker.messages.eieio.KeyPayloadDataElement
- All Implemented Interfaces:
AbstractDataElement
A data element that contains a key and a payload.
-
Constructor Summary
ConstructorsConstructorDescriptionKeyPayloadDataElement
(int key, int payload, boolean isTimestamp) Create a data element. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addToBuffer
(ByteBuffer buffer, EIEIOType eieioType) Writes this message chunk into the given buffer.boolean
-
Constructor Details
-
KeyPayloadDataElement
public KeyPayloadDataElement(int key, int payload, boolean isTimestamp) Create a data element.- Parameters:
key
- The key in the element.payload
- The payload in the element.isTimestamp
- Whether this is a timestamp.
-
-
Method Details
-
isTimestamp
public boolean isTimestamp()- Returns:
- Whether this represents a timestamp.
-
addToBuffer
Description copied from interface:AbstractDataElement
Writes this message chunk into the given buffer. This is so that a message can be sent.- Specified by:
addToBuffer
in interfaceAbstractDataElement
- Parameters:
buffer
- The buffer to write into.eieioType
- The type of message this is being written into.
-