Class for getting voltage, current, temperature, power and energy from the CTRE Power Distribution Pa...
Definition PowerDistribution.hpp:21
double GetCurrent(int channel) const
Read the current in one of the PowerDistribution channels.
PowerDistributionSim(const PowerDistribution &pdp)
Constructs from a PowerDistribution object.
double GetVoltage() const
Check the PowerDistribution voltage.
double GetTemperature() const
Check the temperature of the PowerDistribution.
bool GetInitialized() const
Check whether the PowerDistribution has been initialized.
void SetTemperature(double temperature)
Define the PowerDistribution temperature.
void GetAllCurrents(double *currents, int length) const
Read the current of all of the PowerDistribution channels.
void SetVoltage(double voltage)
Set the PowerDistribution voltage.
void SetInitialized(bool initialized)
Define whether the PowerDistribution has been initialized.
PowerDistributionSim(int module=0)
Constructs from a PowerDistribution module number (CAN ID).
void ResetData()
Reset all PowerDistribution simulation data.
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PowerDistribution is initialized.
std::unique_ptr< CallbackStore > RegisterTemperatureCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the PowerDistribution temperature changes.
std::unique_ptr< CallbackStore > RegisterVoltageCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the PowerDistribution voltage changes.
void SetCurrent(int channel, double current)
Change the current in the given channel.
void SetAllCurrents(const double *currents, int length)
Change the current in all of the PowerDistribution channels.
std::unique_ptr< CallbackStore > RegisterCurrentCallback(int channel, NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the current of a specific channel changes.
Definition CTREPCMSim.hpp:13
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition CallbackStore.hpp:16
Definition CvSource.hpp:15