org.reprap.devices
Class SNAPStepperMotor.RequestRangeResponse

java.lang.Object
  extended by org.reprap.comms.IncomingMessage
      extended by org.reprap.comms.messages.IncomingIntMessage
          extended by org.reprap.devices.SNAPStepperMotor.RequestRangeResponse
Enclosing class:
SNAPStepperMotor

protected class SNAPStepperMotor.RequestRangeResponse
extends IncomingIntMessage


Nested Class Summary
 
Nested classes/interfaces inherited from class org.reprap.comms.IncomingMessage
IncomingMessage.InvalidPayloadException
 
Constructor Summary
SNAPStepperMotor.RequestRangeResponse(IncomingContext incomingContext)
           
 
Method Summary
 AxisMotor.Range getRange()
           
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.messages.IncomingIntMessage
ConvertBytesToInt, getValue
 
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

SNAPStepperMotor.RequestRangeResponse

public SNAPStepperMotor.RequestRangeResponse(IncomingContext incomingContext)
                                      throws java.io.IOException
Parameters:
incomingContext -
Throws:
java.io.IOException
Method Detail

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 IncomingIntMessage
Parameters:
packetType - the type of packet to receive
Returns:
true if the packetType matches what is expected

getRange

public AxisMotor.Range getRange()
                         throws IncomingMessage.InvalidPayloadException
Returns:
Throws:
IncomingMessage.InvalidPayloadException