Package edu.wpi.first.wpilibj
Class SensorUtil
- java.lang.Object
-
- edu.wpi.first.wpilibj.SensorUtil
-
public final class SensorUtil extends Object
Stores most recent status information as well as containing utility functions for checking channels and error processing.
-
-
Field Summary
Fields Modifier and Type Field Description static intkAnalogInputChannelsNumber of analog input channels per roboRIO.static intkAnalogOutputChannelsNumber of analog output channels per roboRIO.static intkDigitalChannelsNumber of digital channels per roboRIO.static intkPCMModulesNumber of PCM Modules.static intkPDPChannelsNumber of power distribution channels per PDP.static intkPDPModulesNumber of power distribution modules per PDP.static intkPwmChannelsNumber of PWM channels per roboRIO.static intkRelayChannelsNumber of relay channels per roboRIO.static intkSolenoidChannelsNumber of solenoid channels per module.static intkSystemClockTicksPerMicrosecondTicks per microsecond.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckAnalogInputChannel(int channel)Check that the analog input number is value.static voidcheckAnalogOutputChannel(int channel)Check that the analog input number is value.static voidcheckDigitalChannel(int channel)Check that the digital channel number is valid.static voidcheckPDPChannel(int channel)Verify that the power distribution channel number is within limits.static voidcheckPDPModule(int module)Verify that the PDP module number is within limits.static voidcheckPWMChannel(int channel)Check that the digital channel number is valid.static voidcheckRelayChannel(int channel)Check that the digital channel number is valid.static voidcheckSolenoidChannel(int channel)Verify that the solenoid channel number is within limits.static voidcheckSolenoidModule(int moduleNumber)Verify that the solenoid module is correct.static intgetDefaultSolenoidModule()Get the number of the default solenoid module.
-
-
-
Field Detail
-
kSystemClockTicksPerMicrosecond
public static final int kSystemClockTicksPerMicrosecond
Ticks per microsecond.
-
kDigitalChannels
public static final int kDigitalChannels
Number of digital channels per roboRIO.
-
kAnalogInputChannels
public static final int kAnalogInputChannels
Number of analog input channels per roboRIO.
-
kAnalogOutputChannels
public static final int kAnalogOutputChannels
Number of analog output channels per roboRIO.
-
kSolenoidChannels
public static final int kSolenoidChannels
Number of solenoid channels per module.
-
kPwmChannels
public static final int kPwmChannels
Number of PWM channels per roboRIO.
-
kRelayChannels
public static final int kRelayChannels
Number of relay channels per roboRIO.
-
kPDPChannels
public static final int kPDPChannels
Number of power distribution channels per PDP.
-
kPDPModules
public static final int kPDPModules
Number of power distribution modules per PDP.
-
kPCMModules
public static final int kPCMModules
Number of PCM Modules.
-
-
Method Detail
-
checkSolenoidModule
public static void checkSolenoidModule(int moduleNumber)
Verify that the solenoid module is correct.- Parameters:
moduleNumber- The solenoid module module number to check.
-
checkDigitalChannel
public static void checkDigitalChannel(int channel)
Check that the digital channel number is valid. Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based.- Parameters:
channel- The channel number to check.
-
checkRelayChannel
public static void checkRelayChannel(int channel)
Check that the digital channel number is valid. Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based.- Parameters:
channel- The channel number to check.
-
checkPWMChannel
public static void checkPWMChannel(int channel)
Check that the digital channel number is valid. Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based.- Parameters:
channel- The channel number to check.
-
checkAnalogInputChannel
public static void checkAnalogInputChannel(int channel)
Check that the analog input number is value. Verify that the analog input number is one of the legal channel numbers. Channel numbers are 0-based.- Parameters:
channel- The channel number to check.
-
checkAnalogOutputChannel
public static void checkAnalogOutputChannel(int channel)
Check that the analog input number is value. Verify that the analog input number is one of the legal channel numbers. Channel numbers are 0-based.- Parameters:
channel- The channel number to check.
-
checkSolenoidChannel
public static void checkSolenoidChannel(int channel)
Verify that the solenoid channel number is within limits. Channel numbers are 0-based.- Parameters:
channel- The channel number to check.
-
checkPDPChannel
public static void checkPDPChannel(int channel)
Verify that the power distribution channel number is within limits. Channel numbers are 0-based.- Parameters:
channel- The channel number to check.
-
checkPDPModule
public static void checkPDPModule(int module)
Verify that the PDP module number is within limits. module numbers are 0-based.- Parameters:
module- The module number to check.
-
getDefaultSolenoidModule
public static int getDefaultSolenoidModule()
Get the number of the default solenoid module.- Returns:
- The number of the default solenoid module.
-
-