7#ifndef BATTERY_EQUIPPED_ENTITY_H
8#define BATTERY_EQUIPPED_ENTITY_H
15#include <argos3/core/utility/math/vector3.h>
16#include <argos3/core/simulator/entity/entity.h>
17#include <argos3/core/simulator/entity/embodied_entity.h>
44 const std::string& str_id,
46 Real f_start_charge = 1.0,
47 Real f_full_charge = 1.0);
50 const std::string& str_id,
51 const std::string& str_discharge_model,
52 Real f_start_charge = 1.0,
53 Real f_full_charge = 1.0);
133#define REGISTER_BATTERY_DISCHARGE_MODEL(CLASSNAME, LABEL) \
134 REGISTER_SYMBOL(CBatteryDischargeModel, \
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
CFactory< CBatteryDischargeModel > TFactoryBatteryDischargeModel
For dynamic loading of battery discharge models.
Basic class for an entity that contains other entities.
CEntity(CComposableEntity *pc_parent)
Class constructor.
An anchor related to the body of an entity.
This class is the base of all XML-configurable ARGoS interface.
Real GetFullCharge() const
Real m_fAvailableCharge
Available charge.
void SetAvailableCharge(Real f_available_charge)
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
Real m_fFullCharge
Full charge.
CBatteryEquippedEntity(CComposableEntity *pc_parent)
CBatteryDischargeModel * m_pcDischargeModel
Discharge model.
Real GetAvailableCharge() const
void SetDischargeModel(CBatteryDischargeModel *pc_model)
void SetFullCharge(Real f_full_charge)
virtual ~CBatteryEquippedEntity()
virtual void Update()
Updates the state of this entity.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
The discharge model dictates how the battery discharges over time.
virtual void Reset()
Resets the resource.
virtual void operator()()=0
CBatteryEquippedEntity * m_pcBattery
virtual void SetBattery(CBatteryEquippedEntity *pc_battery)
virtual ~CBatteryDischargeModel()
virtual void Destroy()
Undoes whatever was done by Init().
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
const SAnchor * m_psAnchor
void SetDelta(Real f_delta)
CBatteryDischargeModelTime()
virtual void operator()()
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
void SetOrientFactor(Real f_factor)
virtual void SetBattery(CBatteryEquippedEntity *pc_battery)
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
const SAnchor * m_psAnchor
CBatteryDischargeModelMotion()
virtual void operator()()
CQuaternion m_cOldOrientation
void SetPosFactor(Real f_factor)
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
CBatteryDischargeModelTimeMotion()
void SetOrientFactor(Real f_factor)
virtual void operator()()
const SAnchor * m_psAnchor
virtual void SetBattery(CBatteryEquippedEntity *pc_battery)
CQuaternion m_cOldOrientation
void SetDelta(Real f_delta)
void SetPosFactor(Real f_factor)