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

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

public enum DynamixelBaudRate
extends Enum<DynamixelBaudRate>

BaudRates for use with DynamixelControllers and DynamixelJoints. This enum contains the byte values the Dynamixels use to specify baud rates.

Author:
Matthew Stevenson

Enum Constant Summary
Baud1000000
          1000000 baud
Baud115200
          115200 baud
Baud19200
          19200 baud
Baud200000
          200000 baud
Baud250000
          250000 baud
Baud400000
          400000 baud
Baud500000
          500000 baud
Baud57600
          57600 baud
Baud9600
          9600 baud
 
Method Summary
static DynamixelBaudRate get(Byte b)
          Returns the DynamixelBaudRate with the given byte value.
 Byte getByte()
          Returns the byte value corresponding to the given baud rate.
 org.robokind.impl.motion.serial.BaudRate getRate()
          Returns the BaudRate expected by a SerialPort which corresponds to the given DynamixelBaudRate.
static DynamixelBaudRate valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DynamixelBaudRate[] 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

Baud1000000

public static final DynamixelBaudRate Baud1000000
1000000 baud


Baud500000

public static final DynamixelBaudRate Baud500000
500000 baud


Baud400000

public static final DynamixelBaudRate Baud400000
400000 baud


Baud250000

public static final DynamixelBaudRate Baud250000
250000 baud


Baud200000

public static final DynamixelBaudRate Baud200000
200000 baud


Baud115200

public static final DynamixelBaudRate Baud115200
115200 baud


Baud57600

public static final DynamixelBaudRate Baud57600
57600 baud


Baud19200

public static final DynamixelBaudRate Baud19200
19200 baud


Baud9600

public static final DynamixelBaudRate Baud9600
9600 baud

Method Detail

values

public static DynamixelBaudRate[] 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 (DynamixelBaudRate c : DynamixelBaudRate.values())
    System.out.println(c);

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

valueOf

public static DynamixelBaudRate 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()
Returns the byte value corresponding to the given baud rate.

Returns:
byte value corresponding to the given baud rate

getRate

public org.robokind.impl.motion.serial.BaudRate getRate()
Returns the BaudRate expected by a SerialPort which corresponds to the given DynamixelBaudRate.

Returns:
BaudRate expected by a SerialPort which corresponds to the given DynamixelBaudRate

get

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

Parameters:
b - byte value for a DynamixelBaudRate
Returns:
DynamixelBaudRate with the given byte value


Copyright © 2011-2013. All Rights Reserved.