gz/common/Battery.hh
Forward declarations for the common classes.
STL class.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: gz/common/SuppressWarning.hh:65
void SetName(const std::string &_name) const
Set the name of the battery.
void ResetUpdateFunc()
Reset function to update voltage, upon destruction of current callback function.
bool RemoveConsumer(const uint32_t _consumerId)
Remove a consumer.
std::shared_ptr< Battery > BatteryPtr
Definition: gz/common/Battery.hh:175
STL class.
virtual void SetInitVoltage(const double _voltage)
Set the initial voltage.
bool SetPowerLoad(const uint32_t _consumerId, const double _powerLoad)
Set consumer power load in watts.
void Update()
Update the battery. This will in turn trigger the function set using the SetUpdateFunc function.
bool PowerLoad(const uint32_t _consumerId, double &_powerLoad) const
Get consumer power load in watts.
virtual void ResetVoltage()
Reset the battery voltage to the initial value. The initial value might have been loaded from an sdf ...
bool operator==(const Battery &_battery) const
Equal to operator.
const PowerLoad_M & PowerLoads() const
Get list of power loads in watts.
bool operator!=(const Battery &_battery) const
Inequality operator.
std::map< uint32_t, double > PowerLoad_M
Typedef the powerload map.
Definition: gz/common/Battery.hh:48
Battery & operator=(const Battery &_battery)
Assignment operator.
void SetUpdateFunc(std::function< double(Battery *)> _updateFunc)
Setup function to update voltage.
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68