Package edu.wpi.first.wpilibj
Class SensorUtil
java.lang.Object
edu.wpi.first.wpilibj.SensorUtil
Stores most recent status information as well as containing utility functions for checking
channels and error processing.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Number of analog input channels per roboRIO.static final int
Number of analog output channels per roboRIO.static final int
Number of PCM Modules.static final int
Number of power distribution channels per PDP.static final int
Number of power distribution modules per PDP.static final int
Number of solenoid channels per module.static final int
Number of digital channels per roboRIO.static final int
Number of PWM channels per roboRIO.static final int
Number of relay channels per roboRIO.static final int
Number of power distribution channels per PH.static final int
Number of PH modules.static final int
Ticks per microsecond. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkAnalogInputChannel
(int channel) Check that the analog input number is value.static void
checkAnalogOutputChannel
(int channel) Check that the analog input number is value.static void
checkDigitalChannel
(int channel) Check that the digital channel number is valid.static void
checkPWMChannel
(int channel) Check that the digital channel number is valid.static void
checkRelayChannel
(int channel) Check that the digital channel number is valid.static int
Get the number of the default solenoid module.static int
Get the number of the default solenoid module.
-
Field Details
-
kSystemClockTicksPerMicrosecond
Ticks per microsecond. -
kDigitalChannels
Number of digital channels per roboRIO. -
kAnalogInputChannels
Number of analog input channels per roboRIO. -
kAnalogOutputChannels
Number of analog output channels per roboRIO. -
kCTRESolenoidChannels
Number of solenoid channels per module. -
kPwmChannels
Number of PWM channels per roboRIO. -
kRelayChannels
Number of relay channels per roboRIO. -
kCTREPDPChannels
Number of power distribution channels per PDP. -
kCTREPDPModules
Number of power distribution modules per PDP. -
kCTREPCMModules
Number of PCM Modules. -
kREVPHChannels
Number of power distribution channels per PH. -
kREVPHModules
Number of PH modules.
-
-
Method Details
-
checkDigitalChannel
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
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
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
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
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.
-
getDefaultCTREPCMModule
Get the number of the default solenoid module.- Returns:
- The number of the default solenoid module.
-
getDefaultREVPHModule
Get the number of the default solenoid module.- Returns:
- The number of the default solenoid module.
-