|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
public abstract 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 |
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 module |
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 moduleNumber)
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 moduleNumber)
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 moduleNumber)
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 moduleNumber)
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 moduleNumber)
Verify that the solenoid module is correct. |
void |
free()
Free the resources used by this object |
static int |
getDefaultAnalogModule()
Get the number of the default analog module. |
static int |
getDefaultDigitalModule()
Get the number of the default analog module. |
static int |
getDefaultSolenoidModule()
Get the number of the default analog module. |
static void |
setDefaultAnalogModule(int moduleNumber)
Sets the default Analog module. |
static void |
setDefaultDigitalModule(int moduleNumber)
Sets the default Digital Module. |
static void |
setDefaultSolenoidModule(int moduleNumber)
Set the default location for the Solenoid (9472) module. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, 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
Constructor Detail |
---|
public SensorBase()
Method Detail |
---|
public static void setDefaultDigitalModule(int moduleNumber)
moduleNumber
- The number of the digital module to use.public static void setDefaultAnalogModule(int moduleNumber)
moduleNumber
- The number of the analog module to use.public static void setDefaultSolenoidModule(int moduleNumber)
moduleNumber
- The number of the solenoid module to use.protected static void checkDigitalModule(int moduleNumber)
moduleNumber
- The digital module module number to check.protected static void checkRelayModule(int moduleNumber)
moduleNumber
- The digital module module number to check.protected static void checkPWMModule(int moduleNumber)
moduleNumber
- The digital module module number to check.protected static void checkAnalogModule(int moduleNumber)
moduleNumber
- The analog module module number to check.protected static void checkSolenoidModule(int moduleNumber)
moduleNumber
- The solenoid module module number 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()
public void free()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |