2012 FRC Java API


Package edu.wpi.first.wpilibj

The WPI Robotics library (WPILibJ) is a set of Java classes that interfaces to the hardware in the FRC control system and your robot.

See:
          Description

Interface Summary
CounterBase Interface for counting the number of ticks on a digital input channel.
IDashboard Represents a Dashboard which can provide data to be sent by the DriverStation class.
MotorSafety  
PIDOutput This interface allows PIDController to write it's results to its output.
PIDSource This interface allows for PIDController to automatically read from this object
SpeedController Interface for speed controlling devices.
 

Class Summary
Accelerometer Handle operation of the accelerometer.
AccumulatorResult Structure for holding the values stored in an accumulator
ADXL345_I2C  
ADXL345_I2C.AllAxes  
ADXL345_I2C.Axes  
ADXL345_I2C.DataFormat_Range  
AnalogChannel Analog channel class.
AnalogModule Analog Module class.
AnalogTrigger Class for creating and configuring Analog Triggers
AnalogTriggerOutput Class to represent a specific output from an analog trigger.
AnalogTriggerOutput.Type Type determines under what state the analog trigger evaluates to true or false
CANJaguar  
CANJaguar.ControlMode Mode determines how the Jaguar is controlled
CANJaguar.Faults Faults reported by the Jaguar
CANJaguar.LimitMode Determines which sensor to use for position reference.
CANJaguar.Limits Limit switch masks
CANJaguar.NeutralMode Determines how the Jaguar behaves when sending a zero signal.
CANJaguar.PositionReference Determines which sensor to use for position reference.
CANJaguar.SpeedReference Determines which sensor to use for speed reference.
Compressor Compressor object.
Counter Class for counting the number of ticks on a digital input channel.
Counter.Mode Mode determines how and what the counter counts
CounterBase.EncodingType The number of edges for the counterbase to increment or decrement on
Dashboard Pack data into the "user data" field that gets sent to the dashboard laptop via the driver station.
DigitalInput Class to read a digital input.
DigitalModule Class representing a digital module
DigitalOutput Class to write digital outputs.
DigitalSource DigitalSource Interface.
DoubleSolenoid DoubleSolenoid class for running 2 channels of high voltage Digital Output (9472 module).
DoubleSolenoid.Value Possible values for a DoubleSolenoid
DriverStation Provide access to the network communication data to / from the Driver Station.
DriverStation.Alliance The robot alliance that the robot is a part of
DriverStationEnhancedIO  
DriverStationEnhancedIO.tAccelChannel Accelerometer channel for enhanced IO
DriverStationEnhancedIO.tDigitalConfig Digital configuration for enhanced IO
DriverStationEnhancedIO.tPWMPeriodChannels PWM period channels for enhanced IO
DriverStationLCD Provide access to LCD on the Driver Station.
DriverStationLCD.Line The line number on the Driver Station LCD
Encoder Class to read quad encoders.
Encoder.PIDSourceParameter  
GearTooth Alias for counter class.
GenericHID GenericHID Interface
GenericHID.Hand Which hand the Human Interface Device is associated with.
Gyro Use a rate gyro to return the robots heading relative to a starting position.
HiTechnicCompass HiTechnic NXT Compass.
I2C I2C bus interface class.
InterruptableSensorBase Base for sensors to be used with interrupts
IterativeRobot IterativeRobot implements a specific type of Robot Program framework, extending the RobotBase class.
Jaguar Luminary Micro Jaguar Speed Control
Joystick Handle input from standard Joysticks connected to the Driver Station.
Joystick.AxisType Represents an analog axis on a joystick.
Joystick.ButtonType Represents a digital button on the JoyStick
Kinect  
KinectStick  
Module Base class for AnalogModule and DigitalModule.
MotorSafetyHelper The MotorSafetyHelper object is constructed for every object that wants to implement the Motor Safety protocol.
PIDController Class implements a PID Control Loop.
Preferences The preferences class provides a relatively simple way to save important values to the cRIO to access the next time the cRIO is booted.
PWM Class implements the PWM generation in the FPGA.
PWM.PeriodMultiplier Represents the amount to multiply the minimum servo-pulse pwm period by.
Relay Class for Spike style relay outputs.
Relay.Direction The Direction(s) that a relay is configured to operate in.
Relay.Value The state to drive a Relay to.
Resource Track resources in the program.
RobotBase Implement a Robot Program framework.
RobotDrive Utility class for handling Robot drive based on a definition of the motor configuration.
RobotDrive.MotorType The location of a motor on the robot for the purpose of driving
SafePWM  
SensorBase Base class for all sensors.
SerialPort Driver for the RS-232 serial port on the cRIO.
SerialPort.FlowControl Represents what type of flow control to use for serial communication
SerialPort.Parity Represents the parity to use for serial communications
SerialPort.StopBits Represents the number of stop bits to use for Serial Communication
SerialPort.WriteBufferMode Represents which type of buffer mode to use when writing to a serial port
Servo Standard hobby style servo.
SimpleRobot A simple robot base class that knows the standard FRC competition states (disabled, autonomous, or operator controlled).
Skeleton A Skeleton object to be used with Kinect data from the FRC Kinect server on the DriverStation
Skeleton.tJointTrackingState The Joint TrackingState
Skeleton.tJointTypes Helper class used to index the joints in a (@link Skeleton)
Skeleton.tTrackState The TrackState of the skeleton
Solenoid Solenoid class for running high voltage Digital Output (9472 module).
SolenoidBase SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.
Timer Timer objects measure accumulated time in milliseconds.
Ultrasonic Ultrasonic rangefinder class.
Ultrasonic.Unit The units to return when PIDGet is called
Utility Contains global utility functions
Victor IFI Victor Speed Controller
Watchdog Watchdog timer class.
 

Exception Summary
DriverStationEnhancedIO.EnhancedIOException  
Preferences.ImproperPreferenceKeyException Should be thrown if a string can not be used as a key in the preferences file.
Preferences.IncompatibleTypeException This exception is thrown if the a value requested cannot be converted to the requested type.
 

Package edu.wpi.first.wpilibj Description

The WPI Robotics library (WPILibJ) is a set of Java classes that interfaces to the hardware in the FRC control system and your robot. There are classes to handle sensors, motors, the driver station, and a number of other utility functions like timing and field management. The library is designed to:


2012 FRC Java API


For updated information see the Java FRC site