17 #ifndef _GAZEBO_BATTERY_HH_ 18 #define _GAZEBO_BATTERY_HH_ 50 public std::enable_shared_from_this<Battery>
64 public:
virtual void Load(sdf::ElementPtr _sdf);
67 public:
virtual void Init();
72 public:
virtual void ResetVoltage();
76 public:
virtual void UpdateParameters(
const sdf::ElementPtr _sdf);
80 public: std::string Name()
const;
84 public: uint32_t AddConsumer();
90 public:
bool RemoveConsumer(
const uint32_t _consumerId);
96 public:
bool SetPowerLoad(
const uint32_t _consumerId,
97 const double _powerLoad);
103 public:
bool PowerLoad(
const uint32_t _consumerId,
104 double &_powerLoad)
const;
108 public:
const PowerLoad_M &PowerLoads()
const;
112 public:
double Voltage()
const;
121 public:
void SetUpdateFunc(
122 std::function<
double (
const BatteryPtr &)> _updateFunc);
127 public:
void Update();
130 protected:
void InitConsumers();
135 private:
double UpdateDefault(
const BatteryPtr &_battery);
139 private: BatteryPrivate *dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
std::map< uint32_t, double > PowerLoad_M
Typedef the powerload map.
Definition: Battery.hh:54
A battery abstraction.
Definition: Battery.hh:49
std::shared_ptr< Battery > BatteryPtr
Definition: CommonTypes.hh:125
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
common
Definition: FuelModelDatabase.hh:37