brbrain
Class AXS1Register

java.lang.Object
  extended by brbrain.AXRegister
      extended by brbrain.AXS1Register

public class AXS1Register
extends AXRegister

Represents the Dynamixel AX-S1 registers in a high-level way.

Copyright (C) 2008 Marsette A. Vona, III

Author:
Marsette (Marty) A. Vona, III

Field Summary
static AXS1Register AXS1_BAUD_RATE
          Dynamixel Baud Rate (RW), natural units [kbits/sec].
static AXS1Register AXS1_BUZZER_INDEX
          Buzzer note (RW).
static AXS1Register AXS1_BUZZER_TIME
          Buzzer duration, natural units [s] (RW).
static AXS1Register AXS1_CENTER_IR_SENSOR_DATA
          Center IR distance reading (RO).
static AXS1Register AXS1_CENTER_LUMINOSITY
          Center IR luminosity reading (RO).
static AXS1Register AXS1_ERROR
          Virtual register containing the error status of the dynamixel (RO).
static AXS1Register AXS1_FIRMWARE_VERSION
          dynamixel firmware version (RO)
static AXS1Register AXS1_HIGHEST_LIMIT_TEMPERATURE
          limit temp (RW), natural units [deg Celcius]
static AXS1Register AXS1_HIGHEST_LIMIT_VOLTAGE
          high limit voltage (RW), natural units [Volts]
static AXS1Register AXS1_ID
          dynamixel ID (RW)
static AXS1Register AXS1_IR_REMOCON_ARRIVED
          Remocon data is ready when value is 2 (RO).
static AXS1Register AXS1_IR_REMOCON_RX_DATA
          Value of received remocon data (RO).
static AXS1Register AXS1_IR_REMOCON_TX_DATA
          Remocon data to send (RW).
static AXS1Register AXS1_LEFT_IR_SENSOR_DATA
          Left IR distance reading (RO).
static AXS1Register AXS1_LEFT_LUMINOSITY
          Left IR luminosity reading (RO).
static AXS1Register AXS1_LIGHT_DETECTED_COMPARE
          IR detection threshold (RW).
static AXS1Register AXS1_LIGHT_DETECTED_COMPARE_VALUE
          Default for AXS1_LIGHT_DETECTED_COMPARE (RW).
static AXS1Register AXS1_LOCK
          This appears to be an AX-12 vestige.
static AXS1Register AXS1_LOWEST_LIMIT_VOLTAGE
          low limit voltage (RW), natural units [Volts]
static AXS1Register AXS1_LUMINOSITY_DETECTION_FLAG
          IR luminosity detection bitmask, see F_RIGHT, F_CENTER, F_LEFT (RO).
static AXS1Register AXS1_MODEL_NUMBER
          dynamixel model number (RO)
static AXS1Register AXS1_OBSTACLE_DETECTED_COMPARE
          IR obstacle detection threshold (RW).
static AXS1Register AXS1_OBSTACLE_DETECTED_COMPARE_VALUE
          Default for AXS1_OBSTACLE_DETECTED_COMPARE (RW).
static AXS1Register AXS1_OBSTACLE_DETECTION_FLAG
          IR obstacle detection bitmask, see F_RIGHT, F_CENTER, F_LEFT (RO).
static AXS1Register AXS1_PRESENT_TEMPERATURE
          Current temperature (RO), natural units [degrees Celcius]
static AXS1Register AXS1_PRESENT_VOLTAGE
          Current voltage (RO), natural units [Volts]
static AXS1Register AXS1_REGISTERED_INSTRUCTION
          Whether there is a registered instruction pending (RW), boolean
static AXS1Register AXS1_RETURN_DELAY_TIME
          Dynamixel return delay time (RW), natural units [usec].
static AXS1Register AXS1_RIGHT_IR_SENSOR_DATA
          Right IR distance reading (RO).
static AXS1Register AXS1_RIGHT_LUMINOSITY
          Right IR luminosity reading (RO).
static AXS1Register AXS1_SOUND_DATA
          Sound pressure (RW).
static AXS1Register AXS1_SOUND_DATA_MAX_HOLD
          Loudest sound pressure heard (RW).
static AXS1Register AXS1_SOUND_DETECTED_COUNT
          Recent count of loud sounds (RW).
static AXS1Register AXS1_SOUND_DETECTED_TIME
          Timestamp of most recent loud sound detection (RW), natrual units [ms].
static AXS1Register AXS1_STATUS_RETURN_LEVEL
          Dynamixel status return level (RW).
static int BUZZER_MAX_DURATION
          max duration for timed AXS1_BUZZER_TIME in units of 0.1s
static int BUZZER_MELODY
          special value for AXS1_BUZZER_TIME
static int BUZZER_MIN_DURATION
          min duration for timed AXS1_BUZZER_TIME in units of 0.1s
static int BUZZER_START
          special value for AXS1_BUZZER_TIME
static int BUZZER_STOP
          special value for AXS1_BUZZER_TIME
static java.lang.String DYNAMIXEL_TYPE
          the Dynamixel type identifier
static int F_CENTER
          obstacle or luminosity detection flag
static int F_LEFT
          obstacle or luminosity detection flag
static int F_RIGHT
          obstacle or luminosity detection flag
static AXRegister FIRST_RAM_REGISTER
          first register in RAM
static AXRegister FIRST_REGISTER
          first register in RAM
protected static int nextOrdinal
          next register ordinal during class init
static int NUM_REGISTERS
          total number of registers
protected static AXS1Register[] registers
          the array of AXS1Registers, indexed by ordinal
private static java.lang.String svnid
           
 
Fields inherited from class brbrain.AXRegister
E_ANGLE_LIMIT, E_CHECKSUM, E_INPUT_VOLTAGE, E_INSTRUCTION, E_OVERHEATING, E_OVERLOAD, E_RANGE, max, MAX_DYNAMIXEL_ID, min, naturalUnitsLabel, naturalUnitsPerCount, ordinal, prettyName, RAM_START_ADDRESS, signMagnitude11Bit, startAddr, useNaturalUnitsByDefault, width, writeable
 
Constructor Summary
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr)
          read-only unsigned 1-byte reg, natural units are counts
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, float naturalUnitsPerCount, java.lang.String naturalUnitsLabel, boolean useNaturalUnitsByDefault)
          read-only unsigned 1-byte reg
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int width)
          read-only unsigned reg, natural units are counts
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int width, boolean signMagnitude11Bit, float naturalUnitsPerCount, java.lang.String naturalUnitsLabel, boolean useNaturalUnitsByDefault)
          read-only reg with all options
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int width, float naturalUnitsPerCount, java.lang.String naturalUnitsLabel, boolean useNaturalUnitsByDefault)
          Read-only unsigned reg (be careful of confusion with AXS1Register(int, String, int, int, int, String, boolean)).
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int min, int max)
          writeable unsigned 1-byte reg, natural units are coutns
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int min, int max, float naturalUnitsPerCount, java.lang.String naturalUnitsLabel, boolean useNaturalUnitsByDefault)
          writeable unsigned 1-byte reg
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int width, int min, int max)
          writeable unsigned reg, natural units are counts
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int width, int min, int max, boolean signMagnitude11Bit, float naturalUnitsPerCount, java.lang.String naturalUnitsLabel, boolean useNaturalUnitsByDefault)
          writeable reg with all options
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int width, int min, int max, float naturalUnitsPerCount, java.lang.String naturalUnitsLabel, boolean useNaturalUnitsByDefault)
          writeable unsigned reg
protected AXS1Register(int ordinal, java.lang.String prettyName, int startAddr, int min, int max, java.lang.String naturalUnitsLabel, boolean useNaturalUnitsByDefault)
          writeable unsigned 1-byte reg, natural units are counts
 
Method Summary
static AXS1Register[] getAllRegisters()
          covers getAllRegisters(AXS1Register[], int), always conses
static AXS1Register[] getAllRegisters(AXS1Register[] regs)
          covers getAllRegisters(AXS1Register[], int), starts at 0
static AXS1Register[] getAllRegisters(AXS1Register[] regs, int start)
          get a copy of the ordered array of AXS1Registers
protected  java.lang.String getDynamixelType()
          returns DYNAMIXEL_TYPE
static AXRegister getFirstRAMRegister()
          get the FIRST_RAM_REGISTER
static AXRegister getFirstRegister()
          get the FIRST_REGISTER
 int getNumRegisters()
          get the total number of AXS1Registers
static AXRegister getRegister(int ordinal)
          get the AXS1Register at the specified ordinal
 AXRegister getRelativeRegister(int offset)
          get the register with the given relative ordinal
 
Methods inherited from class brbrain.AXRegister
check, check, checkSpan, clamp, clamp, containsReadOnlyRegs, decode, dup, dup, encode, ensureCapacity, errorsToString, errorsToString, fromNaturalUnits, interp, isBoolean, isRAM, nextRegister, prevRegister, span, span, span, span, toIdentifierString, toNaturalUnits, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DYNAMIXEL_TYPE

public static final java.lang.String DYNAMIXEL_TYPE
the Dynamixel type identifier

See Also:
Constant Field Values

F_RIGHT

public static final int F_RIGHT
obstacle or luminosity detection flag

See Also:
Constant Field Values

F_CENTER

public static final int F_CENTER
obstacle or luminosity detection flag

See Also:
Constant Field Values

F_LEFT

public static final int F_LEFT
obstacle or luminosity detection flag

See Also:
Constant Field Values

BUZZER_START

public static final int BUZZER_START
special value for AXS1_BUZZER_TIME

See Also:
Constant Field Values

BUZZER_STOP

public static final int BUZZER_STOP
special value for AXS1_BUZZER_TIME

See Also:
Constant Field Values

BUZZER_MELODY

public static final int BUZZER_MELODY
special value for AXS1_BUZZER_TIME

See Also:
Constant Field Values

BUZZER_MIN_DURATION

public static final int BUZZER_MIN_DURATION
min duration for timed AXS1_BUZZER_TIME in units of 0.1s

See Also:
Constant Field Values

BUZZER_MAX_DURATION

public static final int BUZZER_MAX_DURATION
max duration for timed AXS1_BUZZER_TIME in units of 0.1s

See Also:
Constant Field Values

nextOrdinal

protected static int nextOrdinal
next register ordinal during class init


AXS1_MODEL_NUMBER

public static final AXS1Register AXS1_MODEL_NUMBER
dynamixel model number (RO)


AXS1_FIRMWARE_VERSION

public static final AXS1Register AXS1_FIRMWARE_VERSION
dynamixel firmware version (RO)


AXS1_ID

public static final AXS1Register AXS1_ID
dynamixel ID (RW)


AXS1_BAUD_RATE

public static final AXS1Register AXS1_BAUD_RATE

Dynamixel Baud Rate (RW), natural units [kbits/sec].

See table in dynamixel docs for standard rates.

Changing this will probably make the CM-5 firmware unhappy.


AXS1_RETURN_DELAY_TIME

public static final AXS1Register AXS1_RETURN_DELAY_TIME

Dynamixel return delay time (RW), natural units [usec].

Changing this will probably make the CM-5 firmware unhappy.


AXS1_HIGHEST_LIMIT_TEMPERATURE

public static final AXS1Register AXS1_HIGHEST_LIMIT_TEMPERATURE
limit temp (RW), natural units [deg Celcius]


AXS1_LOWEST_LIMIT_VOLTAGE

public static final AXS1Register AXS1_LOWEST_LIMIT_VOLTAGE
low limit voltage (RW), natural units [Volts]


AXS1_HIGHEST_LIMIT_VOLTAGE

public static final AXS1Register AXS1_HIGHEST_LIMIT_VOLTAGE
high limit voltage (RW), natural units [Volts]


AXS1_STATUS_RETURN_LEVEL

public static final AXS1Register AXS1_STATUS_RETURN_LEVEL

Dynamixel status return level (RW).

0 means no return packets, 1 means return packets only for READ_DATA, 2 means return packets always.

Changing this will probably make the CM-5 firmware unhappy.


AXS1_OBSTACLE_DETECTED_COMPARE_VALUE

public static final AXS1Register AXS1_OBSTACLE_DETECTED_COMPARE_VALUE

Default for AXS1_OBSTACLE_DETECTED_COMPARE (RW).


AXS1_LIGHT_DETECTED_COMPARE_VALUE

public static final AXS1Register AXS1_LIGHT_DETECTED_COMPARE_VALUE

Default for AXS1_LIGHT_DETECTED_COMPARE (RW).


AXS1_LEFT_IR_SENSOR_DATA

public static final AXS1Register AXS1_LEFT_IR_SENSOR_DATA

Left IR distance reading (RO).


AXS1_CENTER_IR_SENSOR_DATA

public static final AXS1Register AXS1_CENTER_IR_SENSOR_DATA

Center IR distance reading (RO).


AXS1_RIGHT_IR_SENSOR_DATA

public static final AXS1Register AXS1_RIGHT_IR_SENSOR_DATA

Right IR distance reading (RO).


AXS1_LEFT_LUMINOSITY

public static final AXS1Register AXS1_LEFT_LUMINOSITY

Left IR luminosity reading (RO).


AXS1_CENTER_LUMINOSITY

public static final AXS1Register AXS1_CENTER_LUMINOSITY

Center IR luminosity reading (RO).


AXS1_RIGHT_LUMINOSITY

public static final AXS1Register AXS1_RIGHT_LUMINOSITY

Right IR luminosity reading (RO).


AXS1_OBSTACLE_DETECTION_FLAG

public static final AXS1Register AXS1_OBSTACLE_DETECTION_FLAG

IR obstacle detection bitmask, see F_RIGHT, F_CENTER, F_LEFT (RO).


AXS1_LUMINOSITY_DETECTION_FLAG

public static final AXS1Register AXS1_LUMINOSITY_DETECTION_FLAG

IR luminosity detection bitmask, see F_RIGHT, F_CENTER, F_LEFT (RO).


AXS1_SOUND_DATA

public static final AXS1Register AXS1_SOUND_DATA

Sound pressure (RW).

~127-128 is quiet.


AXS1_SOUND_DATA_MAX_HOLD

public static final AXS1Register AXS1_SOUND_DATA_MAX_HOLD

Loudest sound pressure heard (RW).

Write to 0 to force update.


AXS1_SOUND_DETECTED_COUNT

public static final AXS1Register AXS1_SOUND_DETECTED_COUNT

Recent count of loud sounds (RW).


AXS1_SOUND_DETECTED_TIME

public static final AXS1Register AXS1_SOUND_DETECTED_TIME

Timestamp of most recent loud sound detection (RW), natrual units [ms].


AXS1_BUZZER_INDEX

public static final AXS1Register AXS1_BUZZER_INDEX

Buzzer note (RW).


AXS1_BUZZER_TIME

public static final AXS1Register AXS1_BUZZER_TIME

Buzzer duration, natural units [s] (RW).

BUZZER_START, BUZZER_STOP, BUZZER_MELODY, BUZZER_MIN_DURATION, BUZZER_MAX_DURATION are special values.


AXS1_PRESENT_VOLTAGE

public static final AXS1Register AXS1_PRESENT_VOLTAGE
Current voltage (RO), natural units [Volts]


AXS1_PRESENT_TEMPERATURE

public static final AXS1Register AXS1_PRESENT_TEMPERATURE
Current temperature (RO), natural units [degrees Celcius]


AXS1_REGISTERED_INSTRUCTION

public static final AXS1Register AXS1_REGISTERED_INSTRUCTION
Whether there is a registered instruction pending (RW), boolean


AXS1_IR_REMOCON_ARRIVED

public static final AXS1Register AXS1_IR_REMOCON_ARRIVED
Remocon data is ready when value is 2 (RO).


AXS1_LOCK

public static final AXS1Register AXS1_LOCK

This appears to be an AX-12 vestige.


AXS1_IR_REMOCON_RX_DATA

public static final AXS1Register AXS1_IR_REMOCON_RX_DATA

Value of received remocon data (RO).

AXS1_IR_REMOCON_ARRIVED == 2 indicates that data is ready.

This will reset to 0 once read.


AXS1_IR_REMOCON_TX_DATA

public static final AXS1Register AXS1_IR_REMOCON_TX_DATA

Remocon data to send (RW).

Transmission is triggered on register write.


AXS1_OBSTACLE_DETECTED_COMPARE

public static final AXS1Register AXS1_OBSTACLE_DETECTED_COMPARE

IR obstacle detection threshold (RW).

Initialized from AXS1_OBSTACLE_DETECTED_COMPARE_VALUE.


AXS1_LIGHT_DETECTED_COMPARE

public static final AXS1Register AXS1_LIGHT_DETECTED_COMPARE

IR detection threshold (RW).

Initialized from AXS1_LIGHT_DETECTED_COMPARE_VALUE.


AXS1_ERROR

public static final AXS1Register AXS1_ERROR

Virtual register containing the error status of the dynamixel (RO).

The error status is a bitfield of the E_* bits.


svnid

private static final java.lang.String svnid
See Also:
Constant Field Values

registers

protected static AXS1Register[] registers
the array of AXS1Registers, indexed by ordinal


NUM_REGISTERS

public static final int NUM_REGISTERS
total number of registers


FIRST_REGISTER

public static final AXRegister FIRST_REGISTER
first register in RAM


FIRST_RAM_REGISTER

public static final AXRegister FIRST_RAM_REGISTER
first register in RAM

Constructor Detail

AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int width,
                       int min,
                       int max,
                       boolean signMagnitude11Bit,
                       float naturalUnitsPerCount,
                       java.lang.String naturalUnitsLabel,
                       boolean useNaturalUnitsByDefault)
writeable reg with all options


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int width,
                       boolean signMagnitude11Bit,
                       float naturalUnitsPerCount,
                       java.lang.String naturalUnitsLabel,
                       boolean useNaturalUnitsByDefault)
read-only reg with all options


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int width,
                       int min,
                       int max,
                       float naturalUnitsPerCount,
                       java.lang.String naturalUnitsLabel,
                       boolean useNaturalUnitsByDefault)
writeable unsigned reg


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int width,
                       int min,
                       int max)
writeable unsigned reg, natural units are counts


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int min,
                       int max,
                       java.lang.String naturalUnitsLabel,
                       boolean useNaturalUnitsByDefault)
writeable unsigned 1-byte reg, natural units are counts


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int width,
                       float naturalUnitsPerCount,
                       java.lang.String naturalUnitsLabel,
                       boolean useNaturalUnitsByDefault)

Read-only unsigned reg (be careful of confusion with AXS1Register(int, String, int, int, int, String, boolean)).


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int width)
read-only unsigned reg, natural units are counts


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int min,
                       int max,
                       float naturalUnitsPerCount,
                       java.lang.String naturalUnitsLabel,
                       boolean useNaturalUnitsByDefault)
writeable unsigned 1-byte reg


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       int min,
                       int max)
writeable unsigned 1-byte reg, natural units are coutns


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr,
                       float naturalUnitsPerCount,
                       java.lang.String naturalUnitsLabel,
                       boolean useNaturalUnitsByDefault)
read-only unsigned 1-byte reg


AXS1Register

protected AXS1Register(int ordinal,
                       java.lang.String prettyName,
                       int startAddr)
read-only unsigned 1-byte reg, natural units are counts

Method Detail

getRelativeRegister

public AXRegister getRelativeRegister(int offset)
get the register with the given relative ordinal

Specified by:
getRelativeRegister in class AXRegister

getNumRegisters

public int getNumRegisters()
get the total number of AXS1Registers

Specified by:
getNumRegisters in class AXRegister

getDynamixelType

protected java.lang.String getDynamixelType()
returns DYNAMIXEL_TYPE

Specified by:
getDynamixelType in class AXRegister

getFirstRegister

public static AXRegister getFirstRegister()
get the FIRST_REGISTER


getFirstRAMRegister

public static AXRegister getFirstRAMRegister()
get the FIRST_RAM_REGISTER


getRegister

public static AXRegister getRegister(int ordinal)
get the AXS1Register at the specified ordinal


getAllRegisters

public static AXS1Register[] getAllRegisters(AXS1Register[] regs,
                                             int start)
get a copy of the ordered array of AXS1Registers


getAllRegisters

public static AXS1Register[] getAllRegisters(AXS1Register[] regs)
covers getAllRegisters(AXS1Register[], int), starts at 0


getAllRegisters

public static AXS1Register[] getAllRegisters()
covers getAllRegisters(AXS1Register[], int), always conses