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 SummaryFields Modifier and Type Field Description static intkAnalogInputChannelsNumber of analog input channels per roboRIO.static intkAnalogOutputChannelsNumber of analog output channels per roboRIO.static intkCTREPCMModulesNumber of PCM Modules.static intkCTREPDPChannelsNumber of power distribution channels per PDP.static intkCTREPDPModulesNumber of power distribution modules per PDP.static intkCTRESolenoidChannelsNumber of solenoid channels per module.static intkDigitalChannelsNumber of digital channels per roboRIO.static intkPwmChannelsNumber of PWM channels per roboRIO.static intkRelayChannelsNumber of relay channels per roboRIO.static intkREVPHChannelsstatic intkREVPHModulesstatic intkSystemClockTicksPerMicrosecondTicks per microsecond.
- 
Method SummaryModifier 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 voidcheckPWMChannel(int channel)Check that the digital channel number is valid.static voidcheckRelayChannel(int channel)Check that the digital channel number is valid.static intgetDefaultCTREPCMModule()Get the number of the default solenoid module.static intgetDefaultREVPHModule()Get the number of the default solenoid module.
- 
Field Details- 
kSystemClockTicksPerMicrosecondTicks per microsecond.
- 
kDigitalChannelsNumber of digital channels per roboRIO.
- 
kAnalogInputChannelsNumber of analog input channels per roboRIO.
- 
kAnalogOutputChannelsNumber of analog output channels per roboRIO.
- 
kCTRESolenoidChannelsNumber of solenoid channels per module.
- 
kPwmChannelsNumber of PWM channels per roboRIO.
- 
kRelayChannelsNumber of relay channels per roboRIO.
- 
kCTREPDPChannelsNumber of power distribution channels per PDP.
- 
kCTREPDPModulesNumber of power distribution modules per PDP.
- 
kCTREPCMModulesNumber of PCM Modules.
- 
kREVPHChannels
- 
kREVPHModules
 
- 
- 
Method Details- 
checkDigitalChannelCheck 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.
 
- 
checkRelayChannelCheck 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.
 
- 
checkPWMChannelCheck 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.
 
- 
checkAnalogInputChannelCheck 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.
 
- 
checkAnalogOutputChannelCheck 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.
 
- 
getDefaultCTREPCMModuleGet the number of the default solenoid module.- Returns:
- The number of the default solenoid module.
 
- 
getDefaultREVPHModuleGet the number of the default solenoid module.- Returns:
- The number of the default solenoid module.
 
 
-