Class SpinnakerRequest

java.lang.Object
uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
All Implemented Interfaces:
SerializableMessage
Direct Known Subclasses:
SCPRequest, SDPMessage

public abstract class SpinnakerRequest extends Object implements SerializableMessage
Base class for sendable SDP-based messages. SDP-based messages are those messages that have an SDP header.
Author:
Donal Fellows
  • Field Details

    • sdpHeader

      public final SDPHeader sdpHeader
      The SDP header of the message.
  • Constructor Details

    • SpinnakerRequest

      protected SpinnakerRequest(SDPHeader sdpHeader)
      Parameters:
      sdpHeader - The SDP header of the message.
  • Method Details

    • getMessageData

      public final ByteBuffer getMessageData(HasChipLocation originatingChip)
      Get a buffer holding the actual bytes of the message, ready to send. This also prepares this message to be actually sent, which involves setting the tag and source of the header to special marker values. This can only be called once per connection!
      Parameters:
      originatingChip - Where the message notionally originates from.
      Returns:
      The byte buffer.
      Throws:
      IllegalStateException - If a message is prepared for sending a second time.