7 #ifndef BATTERY_EQUIPPED_ENTITY_H
8 #define BATTERY_EQUIPPED_ENTITY_H
11 class CBatteryEquippedEntity;
12 class CBatteryDischargeModel;
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, \
virtual void Reset()
Resets the resource.
const SAnchor * m_psAnchor
void SetOrientFactor(Real f_factor)
CQuaternion m_cOldOrientation
void SetDelta(Real f_delta)
virtual void Destroy()
Undoes whatever was done by Init().
virtual void operator()()
CQuaternion m_cOldOrientation
virtual void operator()()=0
void SetPosFactor(Real f_factor)
float Real
Collects all ARGoS code.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
const SAnchor * m_psAnchor
virtual void SetBattery(CBatteryEquippedEntity *pc_battery)
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
virtual void SetBattery(CBatteryEquippedEntity *pc_battery)
CBatteryEquippedEntity * m_pcBattery
Real GetFullCharge() const
CBatteryDischargeModelTimeMotion()
void SetAvailableCharge(Real f_available_charge)
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
Basic class for an entity that contains other entities.
virtual void operator()()
An anchor related to the body of an entity.
A battery discharge model based only on time.
Real GetAvailableCharge() const
virtual void SetBattery(CBatteryEquippedEntity *pc_battery)
void SetFullCharge(Real f_full_charge)
virtual ~CBatteryDischargeModel()
CBatteryDischargeModel * m_pcDischargeModel
Discharge model.
Real m_fFullCharge
Full charge.
const SAnchor * m_psAnchor
void SetDischargeModel(CBatteryDischargeModel *pc_model)
virtual void Update()
Updates the state of this entity.
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
void SetPosFactor(Real f_factor)
void SetOrientFactor(Real f_factor)
void SetDelta(Real f_delta)
The discharge model dictates how the battery discharges over time.
The namespace containing all the ARGoS related code.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
CBatteryDischargeModelMotion()
A battery discharge model in which the charge decreases with both time and motion.
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
This class is the base of all XML-configurable ARGoS interface.
Real m_fAvailableCharge
Available charge.
CFactory< CBatteryDischargeModel > TFactoryBatteryDischargeModel
For dynamic loading of battery discharge models.
virtual void operator()()
CBatteryEquippedEntity(CComposableEntity *pc_parent)
CBatteryDischargeModelTime()
virtual ~CBatteryEquippedEntity()
A battery discharge model based only on motion.