WPILibC++  2020.3.2
SensorUtil.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 namespace frc {
11 
16 class SensorUtil final {
17  public:
18  SensorUtil() = delete;
19 
25  static int GetDefaultSolenoidModule();
26 
32  static bool CheckSolenoidModule(int moduleNumber);
33 
42  static bool CheckDigitalChannel(int channel);
43 
52  static bool CheckRelayChannel(int channel);
53 
62  static bool CheckPWMChannel(int channel);
63 
72  static bool CheckAnalogInputChannel(int channel);
73 
82  static bool CheckAnalogOutputChannel(int channel);
83 
89  static bool CheckSolenoidChannel(int channel);
90 
96  static bool CheckPDPChannel(int channel);
97 
104  static bool CheckPDPModule(int module);
105 
106  static const int kDigitalChannels;
107  static const int kAnalogInputs;
108  static const int kAnalogOutputs;
109  static const int kSolenoidChannels;
110  static const int kSolenoidModules;
111  static const int kPwmChannels;
112  static const int kRelayChannels;
113  static const int kPDPChannels;
114 };
115 
116 } // namespace frc
frc::SensorUtil
Stores most recent status information as well as containing utility functions for checking channels a...
Definition: SensorUtil.h:16
frc::SensorUtil::GetDefaultSolenoidModule
static int GetDefaultSolenoidModule()
Get the number of the default solenoid module.
frc::SensorUtil::CheckPDPChannel
static bool CheckPDPChannel(int channel)
Verify that the power distribution channel number is within limits.
frc::SensorUtil::CheckAnalogOutputChannel
static bool CheckAnalogOutputChannel(int channel)
Check that the analog output number is valid.
frc::SensorUtil::CheckSolenoidModule
static bool CheckSolenoidModule(int moduleNumber)
Check that the solenoid module number is valid.
frc::SensorUtil::CheckPWMChannel
static bool CheckPWMChannel(int channel)
Check that the digital channel number is valid.
frc::SensorUtil::CheckSolenoidChannel
static bool CheckSolenoidChannel(int channel)
Verify that the solenoid channel number is within limits.
frc::SensorUtil::CheckRelayChannel
static bool CheckRelayChannel(int channel)
Check that the relay channel number is valid.
frc::SensorUtil::CheckDigitalChannel
static bool CheckDigitalChannel(int channel)
Check that the digital channel number is valid.
frc
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
frc::SensorUtil::CheckPDPModule
static bool CheckPDPModule(int module)
Verify that the PDP module number is within limits.
frc::SensorUtil::CheckAnalogInputChannel
static bool CheckAnalogInputChannel(int channel)
Check that the analog input number is value.