|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
public class SensorBase
Base class for all sensors. Stores most recent status information as well as containing utility functions for checking channels and error processing.
Field Summary | |
---|---|
static int |
kAnalogChannels
Number of analog channels per module |
static int |
kAnalogModules
Number of analog modules |
static int |
kChassisSlots
Number of slots in the chassis |
static int |
kDigitalChannels
Number of digital channels per digital sidecar |
static int |
kPwmChannels
Number of PWM channels per sidecar |
static int |
kRelayChannels
Number of relay channels per sidecar |
static int |
kSolenoidChannels
Number of solenoid channels per moduel |
static int |
kSolenoidModules
Number of analog modules |
static int |
kSystemClockTicksPerMicrosecond
Ticks per microsecond |
Constructor Summary | |
---|---|
SensorBase()
Creates an instance of the sensor base and gets an FPGA handle |
Method Summary | |
---|---|
protected static void |
checkAnalogChannel(int channel)
Check that the analog channel number is value. |
protected static void |
checkAnalogModule(int slot)
Check that the analog module number is valid. |
protected static void |
checkDigitalChannel(int channel)
Check that the digital channel number is valid. |
protected static void |
checkDigitalModule(int slot)
Check that the digital module number is valid. |
protected static void |
checkPWMChannel(int channel)
Check that the digital channel number is valid. |
protected static void |
checkPWMModule(int slot)
Check that the digital module number is valid. |
protected static void |
checkRelayChannel(int channel)
Check that the digital channel number is valid. |
protected static void |
checkRelayModule(int slot)
Check that the digital module number is valid. |
protected static void |
checkSolenoidChannel(int channel)
Verify that the solenoid channel number is within limits. |
protected static void |
checkSolenoidModule(int slot)
Verify that the solenoid module is correct. |
protected void |
free()
Free the resources used by this object |
static int |
getDefaultAnalogModule()
Get the slot that contains the default analog module. |
static int |
getDefaultDigitalModule()
Get the slot that contains the default analog module. |
static int |
getDefaultSolenoidModule()
Get the slot that contains the default analog module. |
static void |
setDefaultAnalogModule(int slot)
Sets the default Analog module. |
static void |
setDefaultDigitalModule(int slot)
Sets the default Digital Module. |
static void |
setDefaultSolenoidModule(int slot)
Set the default location for the Solenoid (9472) module. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int kSystemClockTicksPerMicrosecond
public static final int kDigitalChannels
public static final int kAnalogChannels
public static final int kAnalogModules
public static final int kSolenoidChannels
public static final int kSolenoidModules
public static final int kPwmChannels
public static final int kRelayChannels
public static final int kChassisSlots
Constructor Detail |
---|
public SensorBase()
Method Detail |
---|
public static void setDefaultDigitalModule(int slot)
slot
- The cRIO slot containing the digital module.public static void setDefaultAnalogModule(int slot)
slot
- The cRIO slot containing the analog module.public static void setDefaultSolenoidModule(int slot)
slot
- The cRIO slot containing the analog module.protected static void checkDigitalModule(int slot)
slot
- The cRIO slot to check.protected static void checkRelayModule(int slot)
slot
- The cRIO slot to check.protected static void checkPWMModule(int slot)
slot
- The cRIO slot to check.protected static void checkAnalogModule(int slot)
slot
- The cRIO slot to check.protected static void checkSolenoidModule(int slot)
slot
- The cRIO slot to check.protected static void checkDigitalChannel(int channel)
channel
- The channel number to check.protected static void checkRelayChannel(int channel)
channel
- The channel number to check.protected static void checkPWMChannel(int channel)
channel
- The channel number to check.protected static void checkAnalogChannel(int channel)
channel
- The channel number to check.protected static void checkSolenoidChannel(int channel)
channel
- The channel number to check.public static int getDefaultAnalogModule()
public static int getDefaultDigitalModule()
public static int getDefaultSolenoidModule()
protected void free()
|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |