org.reprap.devices
Class SNAPStepperMotor.RequestSetSpeed

java.lang.Object
  extended by org.reprap.comms.OutgoingMessage
      extended by org.reprap.devices.SNAPStepperMotor.RequestSetSpeed
Enclosing class:
SNAPStepperMotor

protected class SNAPStepperMotor.RequestSetSpeed
extends OutgoingMessage


Field Summary
(package private)  byte[] message
           
 
Constructor Summary
SNAPStepperMotor.RequestSetSpeed()
          The empty constructor will create a message to idle the motor
SNAPStepperMotor.RequestSetSpeed(int speed)
          Create a message for setting the motor speed.
 
Method Summary
 byte[] getBinary()
          Fetch the binary payload corresponding to the completed message
 
Methods inherited from class org.reprap.comms.OutgoingMessage
getReplyContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

message

byte[] message
Constructor Detail

SNAPStepperMotor.RequestSetSpeed

SNAPStepperMotor.RequestSetSpeed()
The empty constructor will create a message to idle the motor


SNAPStepperMotor.RequestSetSpeed

SNAPStepperMotor.RequestSetSpeed(int speed)
Create a message for setting the motor speed.

Parameters:
speed - The speed to set the motor to. Note that specifying 0 will stop the motor and hold it at 0 and thus still draws high current. To idle the motor, use the message created by the empty constructor.
Method Detail

getBinary

public byte[] getBinary()
Description copied from class: OutgoingMessage
Fetch the binary payload corresponding to the completed message

Specified by:
getBinary in class OutgoingMessage
Returns:
an array of bytes