![]() |
WPILibC++ 2027.0.0-alpha-4
|
Module class for controlling a Cross The Road Electronics Pneumatics Control Module. More...
#include <wpi/hardware/pneumatic/PneumaticsControlModule.hpp>
Public Member Functions | |
| PneumaticsControlModule (int busId) | |
| Constructs a PneumaticsControlModule with the default ID (0). | |
| PneumaticsControlModule (int busId, int module) | |
| Constructs a PneumaticsControlModule. | |
| ~PneumaticsControlModule () override=default | |
| bool | GetCompressor () const override |
| Returns whether the compressor is active or not. | |
| void | DisableCompressor () override |
| Disables the compressor. | |
| void | EnableCompressorDigital () override |
| Enables the compressor in digital mode using the digital pressure switch. | |
| void | EnableCompressorAnalog (wpi::units::pounds_per_square_inch_t minPressure, wpi::units::pounds_per_square_inch_t maxPressure) override |
| Enables the compressor in digital mode. | |
| void | EnableCompressorHybrid (wpi::units::pounds_per_square_inch_t minPressure, wpi::units::pounds_per_square_inch_t maxPressure) override |
| Enables the compressor in digital mode. | |
| CompressorConfigType | GetCompressorConfigType () const override |
| Returns the active compressor configuration. | |
| bool | GetPressureSwitch () const override |
| Returns the state of the pressure switch. | |
| wpi::units::ampere_t | GetCompressorCurrent () const override |
| Returns the current drawn by the compressor. | |
| bool | GetCompressorCurrentTooHighFault () const |
| Return whether the compressor current is currently too high. | |
| bool | GetCompressorCurrentTooHighStickyFault () const |
| Returns whether the compressor current has been too high since sticky faults were last cleared. | |
| bool | GetCompressorShortedFault () const |
| Returns whether the compressor is currently shorted. | |
| bool | GetCompressorShortedStickyFault () const |
| Returns whether the compressor has been shorted since sticky faults were last cleared. | |
| bool | GetCompressorNotConnectedFault () const |
| Returns whether the compressor is currently disconnected. | |
| bool | GetCompressorNotConnectedStickyFault () const |
| Returns whether the compressor has been disconnected since sticky faults were last cleared. | |
| bool | GetSolenoidVoltageFault () const |
| Returns whether the solenoid is currently reporting a voltage fault. | |
| bool | GetSolenoidVoltageStickyFault () const |
| Returns whether the solenoid has reported a voltage fault since sticky faults were last cleared. | |
| void | ClearAllStickyFaults () |
| Clears all sticky faults on this device. | |
| void | SetSolenoids (int mask, int values) override |
| Sets solenoids on a pneumatics module. | |
| int | GetSolenoids () const override |
| Gets a bitmask of solenoid values. | |
| int | GetModuleNumber () const override |
| Get module number for this module. | |
| int | GetSolenoidDisabledList () const override |
| Get a bitmask of disabled solenoids. | |
| void | FireOneShot (int index) override |
| Fire a single solenoid shot. | |
| void | SetOneShotDuration (int index, wpi::units::second_t duration) override |
| Set the duration for a single solenoid shot. | |
| bool | CheckSolenoidChannel (int channel) const override |
| Check if a solenoid channel is valid. | |
| int | CheckAndReserveSolenoids (int mask) override |
| Check to see if the solenoids marked in the bitmask can be reserved, and if so, reserve them. | |
| void | UnreserveSolenoids (int mask) override |
| Unreserve the solenoids marked in the bitmask. | |
| bool | ReserveCompressor () override |
| Reserve the compressor. | |
| void | UnreserveCompressor () override |
| Unreserve the compressor. | |
| wpi::units::volt_t | GetAnalogVoltage (int channel) const override |
| Unsupported by the CTRE PCM. | |
| wpi::units::pounds_per_square_inch_t | GetPressure (int channel) const override |
| Unsupported by the CTRE PCM. | |
| Solenoid | MakeSolenoid (int channel) override |
| Create a solenoid object for the specified channel. | |
| DoubleSolenoid | MakeDoubleSolenoid (int forwardChannel, int reverseChannel) override |
| Create a double solenoid object for the specified channels. | |
| Compressor | MakeCompressor () override |
| Create a compressor object. | |
| void | ReportUsage (std::string_view device, std::string_view data) override |
| Report usage. | |
| Public Member Functions inherited from wpi::PneumaticsBase | |
| virtual | ~PneumaticsBase ()=default |
Friends | |
| class | DataStore |
| class | PneumaticsBase |
Additional Inherited Members | |
| Static Public Member Functions inherited from wpi::PneumaticsBase | |
| static std::shared_ptr< PneumaticsBase > | GetForType (int busId, int module, PneumaticsModuleType moduleType) |
| For internal use to get a module for a specific type. | |
| static int | GetDefaultForType (PneumaticsModuleType moduleType) |
| For internal use to get the default for a specific type. | |
Module class for controlling a Cross The Road Electronics Pneumatics Control Module.
|
explicit |
Constructs a PneumaticsControlModule with the default ID (0).
| busId | The bus ID. |
| wpi::PneumaticsControlModule::PneumaticsControlModule | ( | int | busId, |
| int | module ) |
Constructs a PneumaticsControlModule.
| busId | The bus ID. |
| module | module number to construct |
|
overridedefault |
|
overridevirtual |
Check to see if the solenoids marked in the bitmask can be reserved, and if so, reserve them.
| mask | The bitmask of solenoids to reserve. The LSB represents solenoid 0. |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Check if a solenoid channel is valid.
| channel | Channel to check |
Implements wpi::PneumaticsBase.
| void wpi::PneumaticsControlModule::ClearAllStickyFaults | ( | ) |
Clears all sticky faults on this device.
|
overridevirtual |
Disables the compressor.
The compressor will not turn on until EnableCompressorDigital() is called.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Enables the compressor in digital mode.
Analog mode is unsupported by the CTRE PCM.
| minPressure | Unsupported. |
| maxPressure | Unsupported. |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Enables the compressor in digital mode using the digital pressure switch.
The compressor will turn on when the pressure switch indicates that the system is not full, and will turn off when the pressure switch indicates that the system is full.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Enables the compressor in digital mode.
Hybrid mode is unsupported by the CTRE PCM.
| minPressure | Unsupported. |
| maxPressure | Unsupported. |
Implements wpi::PneumaticsBase.
|
overridevirtual |
|
overridevirtual |
Unsupported by the CTRE PCM.
| channel | Unsupported. |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Returns whether the compressor is active or not.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Returns the active compressor configuration.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Returns the current drawn by the compressor.
Implements wpi::PneumaticsBase.
| bool wpi::PneumaticsControlModule::GetCompressorCurrentTooHighFault | ( | ) | const |
Return whether the compressor current is currently too high.
| bool wpi::PneumaticsControlModule::GetCompressorCurrentTooHighStickyFault | ( | ) | const |
Returns whether the compressor current has been too high since sticky faults were last cleared.
This fault is persistent and can be cleared by ClearAllStickyFaults()
| bool wpi::PneumaticsControlModule::GetCompressorNotConnectedFault | ( | ) | const |
Returns whether the compressor is currently disconnected.
| bool wpi::PneumaticsControlModule::GetCompressorNotConnectedStickyFault | ( | ) | const |
Returns whether the compressor has been disconnected since sticky faults were last cleared.
This fault is persistent and can be cleared by ClearAllStickyFaults()
| bool wpi::PneumaticsControlModule::GetCompressorShortedFault | ( | ) | const |
Returns whether the compressor is currently shorted.
| bool wpi::PneumaticsControlModule::GetCompressorShortedStickyFault | ( | ) | const |
Returns whether the compressor has been shorted since sticky faults were last cleared.
This fault is persistent and can be cleared by ClearAllStickyFaults()
|
overridevirtual |
|
overridevirtual |
Unsupported by the CTRE PCM.
| channel | Unsupported. |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Returns the state of the pressure switch.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Get a bitmask of disabled solenoids.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Gets a bitmask of solenoid values.
Implements wpi::PneumaticsBase.
| bool wpi::PneumaticsControlModule::GetSolenoidVoltageFault | ( | ) | const |
Returns whether the solenoid is currently reporting a voltage fault.
| bool wpi::PneumaticsControlModule::GetSolenoidVoltageStickyFault | ( | ) | const |
Returns whether the solenoid has reported a voltage fault since sticky faults were last cleared.
This fault is persistent and can be cleared by ClearAllStickyFaults()
|
overridevirtual |
|
overridevirtual |
Create a double solenoid object for the specified channels.
| forwardChannel | solenoid channel for forward |
| reverseChannel | solenoid channel for reverse |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Create a solenoid object for the specified channel.
| channel | solenoid channel |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Report usage.
| device | device and channel as appropriate |
| data | arbitrary usage data |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Reserve the compressor.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Set the duration for a single solenoid shot.
| index | solenoid index |
| duration | shot duration |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Sets solenoids on a pneumatics module.
| mask | Bitmask indicating which solenoids to set. The LSB represents solenoid 0. |
| values | Bitmask indicating the desired states of the solenoids. The LSB represents solenoid 0. |
Implements wpi::PneumaticsBase.
|
overridevirtual |
Unreserve the compressor.
Implements wpi::PneumaticsBase.
|
overridevirtual |
Unreserve the solenoids marked in the bitmask.
| mask | The bitmask of solenoids to unreserve. The LSB represents solenoid 0. |
Implements wpi::PneumaticsBase.
|
friend |
|
friend |