org.reprap.comms
Class OutgoingMessage

java.lang.Object
  extended by org.reprap.comms.OutgoingMessage
Direct Known Subclasses:
OutgoingAddressMessage, OutgoingBlankMessage, OutgoingByteMessage, OutgoingIntMessage, SNAPExtruder.RequestSetHeat, SNAPStepperMotor.RequestDDAMaster, SNAPStepperMotor.RequestOneStep, SNAPStepperMotor.RequestQueue, SNAPStepperMotor.RequestSeekPosition, SNAPStepperMotor.RequestSetSpeed, VersionRequestMessage

public abstract class OutgoingMessage
extends java.lang.Object


Constructor Summary
OutgoingMessage()
           
 
Method Summary
abstract  byte[] getBinary()
          Fetch the binary payload corresponding to the completed message
 IncomingContext getReplyContext(Communicator communicator, Device device)
          Return an IncomingContext for a message in response to this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutgoingMessage

public OutgoingMessage()
Method Detail

getBinary

public abstract byte[] getBinary()
Fetch the binary payload corresponding to the completed message

Returns:
an array of bytes

getReplyContext

public IncomingContext getReplyContext(Communicator communicator,
                                       Device device)
Return an IncomingContext for a message in response to this message. If necessary this can be overridden to include sequence numbers or other disambiguating information.

Parameters:
communicator -
Returns:
An IncomingContext object that can be used to receive the reply to the message.