org.robokind.impl.motion.dynamixel.enums
Enum Instruction

java.lang.Object
  extended by java.lang.Enum<Instruction>
      extended by org.robokind.impl.motion.dynamixel.enums.Instruction
All Implemented Interfaces:
Serializable, Comparable<Instruction>

public enum Instruction
extends Enum<Instruction>

Instructions expected by a DynamixelJoint.

Author:
Matthew Stevenson

Enum Constant Summary
Action
          Updates DynamixelJoint with new Register values set using the RegWrite Instruction.
Ping
          Pings a DynamixelJoint to ensure it is available.
ReadData
          Reads Register data from a DynamixelJoint.
RegWrite
          Write data to a Register for a DynamixelJoint, but delays updating the DynamixelJoint until an Action Instruction is sent.
Reset
          Resets the DynamixelJoint to the default factory settings.
SyncWrite
          Write data to a range of Registers for multiple DynamixelJoints simultaneously.
WriteData
          Writes data to a Register for a DynamixelJoint.
 
Method Summary
static Instruction get(Byte b)
          Returns the Instruction with the given byte value.
 byte getByte()
          Return the byte value for the given Instruction.
static Instruction valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Instruction[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Ping

public static final Instruction Ping
Pings a DynamixelJoint to ensure it is available. Does not change the DynamixelJoint's state.


ReadData

public static final Instruction ReadData
Reads Register data from a DynamixelJoint.


WriteData

public static final Instruction WriteData
Writes data to a Register for a DynamixelJoint.


RegWrite

public static final Instruction RegWrite
Write data to a Register for a DynamixelJoint, but delays updating the DynamixelJoint until an Action Instruction is sent.


Action

public static final Instruction Action
Updates DynamixelJoint with new Register values set using the RegWrite Instruction.


Reset

public static final Instruction Reset
Resets the DynamixelJoint to the default factory settings. WARNING! USE THIS INSTRUCTION WITH CAUTION. THIS WILL CAUSE THE JOINT'S PHYSICAL ID AND BAUD RATE TO CHANGE. This Instruction should NOT be used with robots from HansonRobokind as it will cause the Joint to stop functioning properly. This is included only to provide complete Dynamixel functionality for use in other applications.


SyncWrite

public static final Instruction SyncWrite
Write data to a range of Registers for multiple DynamixelJoints simultaneously.

Method Detail

values

public static Instruction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Instruction c : Instruction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Instruction valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getByte

public byte getByte()
Return the byte value for the given Instruction.

Returns:
byte value for the given Instruction

get

public static Instruction get(Byte b)
Returns the Instruction with the given byte value.

Parameters:
b - byte value of Instruction
Returns:
Instruction with the given byte value


Copyright © 2011-2013. All Rights Reserved.