org.reprap.devices
Class SNAPExtruder.RequestIsEmptyResponse

java.lang.Object
  extended by org.reprap.comms.IncomingMessage
      extended by org.reprap.devices.SNAPExtruder.RequestIsEmptyResponse
Enclosing class:
SNAPExtruder

protected class SNAPExtruder.RequestIsEmptyResponse
extends IncomingMessage


Nested Class Summary
 
Nested classes/interfaces inherited from class org.reprap.comms.IncomingMessage
IncomingMessage.InvalidPayloadException
 
Constructor Summary
SNAPExtruder.RequestIsEmptyResponse(Device device, OutgoingMessage message, long timeout)
           
 
Method Summary
 byte getValue()
           
protected  boolean isExpectedPacketType(byte packetType)
          Implemented by subclasses to allow them to indicate if they understand or expect a given packetType.
 
Methods inherited from class org.reprap.comms.IncomingMessage
getPayload, receiveData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SNAPExtruder.RequestIsEmptyResponse

public SNAPExtruder.RequestIsEmptyResponse(Device device,
                                           OutgoingMessage message,
                                           long timeout)
                                    throws java.io.IOException
Parameters:
device -
message -
timeout -
Throws:
java.io.IOException
Method Detail

getValue

public byte getValue()
              throws IncomingMessage.InvalidPayloadException
Returns:
Throws:
IncomingMessage.InvalidPayloadException

isExpectedPacketType

protected boolean isExpectedPacketType(byte packetType)
Description copied from class: IncomingMessage
Implemented by subclasses to allow them to indicate if they understand or expect a given packetType. This is used to decide if a received packet should be accepted or possibly discarded.

Specified by:
isExpectedPacketType in class IncomingMessage
Parameters:
packetType - the type of packet to receive
Returns:
true if the packetType matches what is expected