WPILibC++ 2024.3.2
|
#include <frc/simulation/PneumaticsBaseSim.h>
Public Member Functions | |
virtual | ~PneumaticsBaseSim ()=default |
virtual bool | GetInitialized () const =0 |
Check whether the PCM/PH has been initialized. More... | |
virtual void | SetInitialized (bool initialized)=0 |
Define whether the PCM/PH has been initialized. More... | |
virtual std::unique_ptr< CallbackStore > | RegisterInitializedCallback (NotifyCallback callback, bool initialNotify)=0 |
Register a callback to be run when the PCM/PH is initialized. More... | |
virtual bool | GetCompressorOn () const =0 |
Check if the compressor is on. More... | |
virtual void | SetCompressorOn (bool compressorOn)=0 |
Set whether the compressor is active. More... | |
virtual std::unique_ptr< CallbackStore > | RegisterCompressorOnCallback (NotifyCallback callback, bool initialNotify)=0 |
Register a callback to be run when the compressor activates. More... | |
virtual bool | GetSolenoidOutput (int channel) const =0 |
Check the solenoid output on a specific channel. More... | |
virtual void | SetSolenoidOutput (int channel, bool solenoidOutput)=0 |
Change the solenoid output on a specific channel. More... | |
virtual std::unique_ptr< CallbackStore > | RegisterSolenoidOutputCallback (int channel, NotifyCallback callback, bool initialNotify)=0 |
Register a callback to be run when the solenoid output on a channel changes. More... | |
virtual bool | GetPressureSwitch () const =0 |
Check the value of the pressure switch. More... | |
virtual void | SetPressureSwitch (bool pressureSwitch)=0 |
Set the value of the pressure switch. More... | |
virtual std::unique_ptr< CallbackStore > | RegisterPressureSwitchCallback (NotifyCallback callback, bool initialNotify)=0 |
Register a callback to be run whenever the pressure switch value changes. More... | |
virtual double | GetCompressorCurrent () const =0 |
Read the compressor current. More... | |
virtual void | SetCompressorCurrent (double compressorCurrent)=0 |
Set the compressor current. More... | |
virtual std::unique_ptr< CallbackStore > | RegisterCompressorCurrentCallback (NotifyCallback callback, bool initialNotify)=0 |
Register a callback to be run whenever the compressor current changes. More... | |
virtual uint8_t | GetAllSolenoidOutputs () const =0 |
Get the current value of all solenoid outputs. More... | |
virtual void | SetAllSolenoidOutputs (uint8_t outputs)=0 |
Change all of the solenoid outputs. More... | |
virtual void | ResetData ()=0 |
Reset all simulation data for this object. More... | |
Static Public Member Functions | |
static std::shared_ptr< PneumaticsBaseSim > | GetForType (int module, PneumaticsModuleType type) |
Protected Member Functions | |
PneumaticsBaseSim (const int index) | |
Constructs a PneumaticsBaseSim with the given index. More... | |
PneumaticsBaseSim (const PneumaticsBase &module) | |
Constructs a PneumaticsBaseSim for the given module. More... | |
Protected Attributes | |
const int | m_index |
PneumaticsBase index. More... | |
|
virtualdefault |
|
explicitprotected |
Constructs a PneumaticsBaseSim with the given index.
index | The index. |
|
explicitprotected |
Constructs a PneumaticsBaseSim for the given module.
module | The module. |
|
pure virtual |
Get the current value of all solenoid outputs.
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Read the compressor current.
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Check if the compressor is on.
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
static |
|
pure virtual |
Check whether the PCM/PH has been initialized.
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Check the value of the pressure switch.
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Check the solenoid output on a specific channel.
channel | the channel to check |
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Register a callback to be run whenever the compressor current changes.
callback | the callback |
initialNotify | whether to call the callback with the initial state |
CallbackStore
object associated with this callback. Save a reference to this object; it being deconstructed cancels the callback. Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Register a callback to be run when the compressor activates.
callback | the callback |
initialNotify | whether to run the callback with the initial state |
CallbackStore
object associated with this callback. Save a reference to this object; it being deconstructed cancels the callback. Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Register a callback to be run when the PCM/PH is initialized.
callback | the callback |
initialNotify | whether to run the callback with the initial state |
CallbackStore
object associated with this callback. Save a reference to this object; it being deconstructed cancels the callback. Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Register a callback to be run whenever the pressure switch value changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
CallbackStore
object associated with this callback. Save a reference to this object; it being deconstructed cancels the callback. Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Register a callback to be run when the solenoid output on a channel changes.
channel | the channel to monitor |
callback | the callback |
initialNotify | should the callback be run with the initial value |
CallbackStore
object associated with this callback. Save a reference to this object; it being deconstructed cancels the callback. Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Reset all simulation data for this object.
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Change all of the solenoid outputs.
outputs | the new solenoid outputs (1 bit per output) |
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Set the compressor current.
compressorCurrent | the new compressor current |
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Set whether the compressor is active.
compressorOn | the new value |
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Define whether the PCM/PH has been initialized.
initialized | true for initialized |
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Set the value of the pressure switch.
pressureSwitch | the new value |
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
pure virtual |
Change the solenoid output on a specific channel.
channel | the channel to check |
solenoidOutput | the new solenoid output |
Implemented in frc::sim::CTREPCMSim, and frc::sim::REVPHSim.
|
protected |
PneumaticsBase index.