WPILibC++ 2024.3.2
frc::SensorUtil Class Referencefinal

Stores most recent status information as well as containing utility functions for checking channels and error processing. More...

#include <frc/SensorUtil.h>

Public Member Functions

 SensorUtil ()=delete
 

Static Public Member Functions

static int GetDefaultCTREPCMModule ()
 Get the number of the default solenoid module. More...
 
static int GetDefaultREVPHModule ()
 Get the number of the default solenoid module. More...
 
static bool CheckDigitalChannel (int channel)
 Check that the digital channel number is valid. More...
 
static bool CheckRelayChannel (int channel)
 Check that the relay channel number is valid. More...
 
static bool CheckPWMChannel (int channel)
 Check that the digital channel number is valid. More...
 
static bool CheckAnalogInputChannel (int channel)
 Check that the analog input number is value. More...
 
static bool CheckAnalogOutputChannel (int channel)
 Check that the analog output number is valid. More...
 

Static Public Attributes

static const int kDigitalChannels
 
static const int kAnalogInputs
 
static const int kAnalogOutputs
 
static const int kPwmChannels
 
static const int kRelayChannels
 

Detailed Description

Stores most recent status information as well as containing utility functions for checking channels and error processing.

Constructor & Destructor Documentation

◆ SensorUtil()

frc::SensorUtil::SensorUtil ( )
delete

Member Function Documentation

◆ CheckAnalogInputChannel()

static bool frc::SensorUtil::CheckAnalogInputChannel ( int  channel)
static

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.

Returns
Analog channel is valid

◆ CheckAnalogOutputChannel()

static bool frc::SensorUtil::CheckAnalogOutputChannel ( int  channel)
static

Check that the analog output number is valid.

Verify that the analog output number is one of the legal channel numbers. Channel numbers are 0-based.

Returns
Analog channel is valid

◆ CheckDigitalChannel()

static bool frc::SensorUtil::CheckDigitalChannel ( int  channel)
static

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.

Returns
Digital channel is valid

◆ CheckPWMChannel()

static bool frc::SensorUtil::CheckPWMChannel ( int  channel)
static

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.

Returns
PWM channel is valid

◆ CheckRelayChannel()

static bool frc::SensorUtil::CheckRelayChannel ( int  channel)
static

Check that the relay channel number is valid.

Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based.

Returns
Relay channel is valid

◆ GetDefaultCTREPCMModule()

static int frc::SensorUtil::GetDefaultCTREPCMModule ( )
static

Get the number of the default solenoid module.

Returns
The number of the default solenoid module.

◆ GetDefaultREVPHModule()

static int frc::SensorUtil::GetDefaultREVPHModule ( )
static

Get the number of the default solenoid module.

Returns
The number of the default solenoid module.

Member Data Documentation

◆ kAnalogInputs

const int frc::SensorUtil::kAnalogInputs
static

◆ kAnalogOutputs

const int frc::SensorUtil::kAnalogOutputs
static

◆ kDigitalChannels

const int frc::SensorUtil::kDigitalChannels
static

◆ kPwmChannels

const int frc::SensorUtil::kPwmChannels
static

◆ kRelayChannels

const int frc::SensorUtil::kRelayChannels
static

The documentation for this class was generated from the following file: