46 int channel,
NotifyCallback callback,
bool initialNotify)
override;
Base class for pneumatics devices.
Definition: PneumaticsBase.h:25
Class to control a simulated Pneumatic Control Module (PCM).
Definition: CTREPCMSim.h:18
std::unique_ptr< CallbackStore > RegisterSolenoidOutputCallback(int channel, NotifyCallback callback, bool initialNotify) override
Register a callback to be run when the solenoid output on a channel changes.
uint8_t GetAllSolenoidOutputs() const override
Get the current value of all solenoid outputs.
void SetSolenoidOutput(int channel, bool solenoidOutput) override
Change the solenoid output on a specific channel.
double GetCompressorCurrent() const override
Read the compressor current.
void SetClosedLoopEnabled(bool closedLoopEnabled)
Turn on/off the closed loop control of the compressor.
void SetAllSolenoidOutputs(uint8_t outputs) override
Change all of the solenoid outputs.
void SetCompressorOn(bool compressorOn) override
Set whether the compressor is active.
std::unique_ptr< CallbackStore > RegisterPressureSwitchCallback(NotifyCallback callback, bool initialNotify) override
Register a callback to be run whenever the pressure switch value changes.
~CTREPCMSim() override=default
bool GetClosedLoopEnabled() const
Check whether the closed loop compressor control is active.
CTREPCMSim(const PneumaticsBase &pneumatics)
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify) override
Register a callback to be run when the PCM/PH is initialized.
void SetPressureSwitch(bool pressureSwitch) override
Set the value of the pressure switch.
std::unique_ptr< CallbackStore > RegisterCompressorCurrentCallback(NotifyCallback callback, bool initialNotify) override
Register a callback to be run whenever the compressor current changes.
bool GetInitialized() const override
Check whether the PCM/PH has been initialized.
bool GetPressureSwitch() const override
Check the value of the pressure switch.
std::unique_ptr< CallbackStore > RegisterCompressorOnCallback(NotifyCallback callback, bool initialNotify) override
Register a callback to be run when the compressor activates.
CTREPCMSim(int module)
Constructs from a PCM module number (CAN ID).
void SetInitialized(bool initialized) override
Define whether the PCM/PH has been initialized.
bool GetSolenoidOutput(int channel) const override
Check the solenoid output on a specific channel.
void SetCompressorCurrent(double compressorCurrent) override
Set the compressor current.
CTREPCMSim()
Constructs with the default PCM module number (CAN ID).
bool GetCompressorOn() const override
Check if the compressor is on.
void ResetData() override
Reset all simulation data for this object.
std::unique_ptr< CallbackStore > RegisterClosedLoopEnabledCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the closed loop state changes.
Definition: PneumaticsBaseSim.h:15
Definition: XboxControllerSim.h:13
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition: CallbackStore.h:14