Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj.communication
Class FRCCommonControlData

    java.lang.Object
      com.sun.cldc.jna.Structure
          edu.wpi.first.wpilibj.communication.FRCCommonControlData

    public final class FRCCommonControlData

extends Structure

Structure for data exchanged between the robot and the driver station.

Field Summary
`short` | `analog1` Driver Station analog input
`short` | `analog2` Driver Station analog input
`short` | `analog3` Driver Station analog input
`short` | `analog4` Driver Station analog input
`static short` | `AUTONOMOUS_BIT`
`static short` | `CHECK_VERSIONS_BIT`
`short` | `control` The control mode e.g.
`short` | `dsDigitalIn` The state of the digital inputs on the ds
`char` | `dsID_Alliance` Which alliance the robot is on
`char` | `dsID_Position` The position of the controls on the alliance station wall.
`static short` | `ENABLED_BIT`
`static short` | `ESTOP_BIT`
`static short` | `FMS_ATTATCHED`
`int` | `packetIndex` The index of the packet
`static short` | `RESET_BIT`
`static short` | `RESYNCH`
`byte[]` | `stick0Axes` Position of the axes of the first js
`short` | `stick0Buttons` Button state of the first js
`byte[]` | `stick1Axes` Position of the axes of the second js
`short` | `stick1Buttons` Button state of the second js
`byte[]` | `stick2Axes` Position of the axes of the third js
`short` | `stick2Buttons` Button state of the third js
`byte[]` | `stick3Axes` Position of the axes of the fourth js
`short` | `stick3Buttons` Button state of the fourth js
`int` | `teamID` The team number from the ds
`static short` | `TEST_MODE_BIT`

Fields inherited from class com.sun.cldc.jna.Structure
`backingNativeMemory, NULL`

Constructor Summary
`FRCCommonControlData()` Create a new FRCControlData structure

Method Summary
`boolean` | `autonomous()` Determine if the robot should be in autonomous
`boolean` | `enabled()` Determine if the robot should be enabled
`protected void` | `free()` Method to free the memory used by this structure
`void` | `read()` Read new data in the structure
`int` | `size()` Get the size of the structure
`boolean` | `testMode()` Determine if the robot is in test mode
`void` | `write()` Write new data in the structure

Methods inherited from class com.sun.cldc.jna.Structure
`allocateMemory, allocateMemory, clear, freeMemory, getPointer, release, toString, useMemory`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### RESET_BIT

    public static final short RESET_BIT

See Also:
  Constant Field Values

### ESTOP_BIT

    public static final short ESTOP_BIT

See Also:
  Constant Field Values

### ENABLED_BIT

    public static final short ENABLED_BIT

See Also:
  Constant Field Values

### AUTONOMOUS_BIT

    public static final short AUTONOMOUS_BIT

See Also:
  Constant Field Values

### FMS_ATTATCHED

    public static final short FMS_ATTATCHED

See Also:
  Constant Field Values

### RESYNCH

    public static final short RESYNCH

See Also:
  Constant Field Values

### TEST_MODE_BIT

    public static final short TEST_MODE_BIT

See Also:
  Constant Field Values

### CHECK_VERSIONS_BIT

    public static final short CHECK_VERSIONS_BIT

See Also:
  Constant Field Values

### packetIndex

    public int packetIndex

  The index of the packet

### control

    public short control

  The control mode e.g. Autonomous, E-stop, enabled ...

### dsDigitalIn

    public short dsDigitalIn

  The state of the digital inputs on the ds

### teamID

    public int teamID

  The team number from the ds

### dsID_Alliance

    public char dsID_Alliance

  Which alliance the robot is on

### dsID_Position

    public char dsID_Position

  The position of the controls on the alliance station wall.

### stick0Axes

    public byte[] stick0Axes

  Position of the axes of the first js

### stick0Buttons

    public short stick0Buttons

  Button state of the first js

### stick1Axes

    public byte[] stick1Axes

  Position of the axes of the second js

### stick1Buttons

    public short stick1Buttons

  Button state of the second js

### stick2Axes

    public byte[] stick2Axes

  Position of the axes of the third js

### stick2Buttons

    public short stick2Buttons

  Button state of the third js

### stick3Axes

    public byte[] stick3Axes

  Position of the axes of the fourth js

### stick3Buttons

    public short stick3Buttons

  Button state of the fourth js

### analog1

    public short analog1

  Driver Station analog input

### analog2

    public short analog2

  Driver Station analog input

### analog3

    public short analog3

  Driver Station analog input

### analog4

    public short analog4

  Driver Station analog input

Constructor Detail

### FRCCommonControlData

    public FRCCommonControlData()

  Create a new FRCControlData structure

Method Detail

### enabled

    public boolean enabled()

  Determine if the robot should be enabled

  Returns:
    true if the robot is enabled

### testMode

    public boolean testMode()

  Determine if the robot is in test mode

  Returns:
    true if the robot is in test mode

### autonomous

    public boolean autonomous()

  Determine if the robot should be in autonomous

  Returns:
    true if the robot is in autonomous

### free

    protected void free()

  Method to free the memory used by this structure

### read

    public void read()

  Read new data in the structure

  Specified by:
    `read` in class `Structure`

### write

    public void write()

  Write new data in the structure

  Specified by:
    `write` in class `Structure`

### size

    public int size()

  Get the size of the structure

  Specified by:
    `size` in class `Structure`
  Returns:
    size of the structure

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"