argos::CBatteryDischargeModelTime Class Reference

A battery discharge model based only on time. More...

#include <battery_equipped_entity.h>

Inheritance diagram for argos::CBatteryDischargeModelTime:
Collaboration diagram for argos::CBatteryDischargeModelTime:

Public Member Functions

 CBatteryDischargeModelTime ()
 
virtual void Init (TConfigurationNode &t_tree)
 Initializes the resource. More...
 
void SetDelta (Real f_delta)
 
virtual void operator() ()
 
- Public Member Functions inherited from argos::CBatteryDischargeModel
 CBatteryDischargeModel ()
 
virtual ~CBatteryDischargeModel ()
 
virtual void Reset ()
 Resets the resource. More...
 
virtual void Destroy ()
 Undoes whatever was done by Init(). More...
 
virtual void SetBattery (CBatteryEquippedEntity *pc_battery)
 
- Public Member Functions inherited from argos::CBaseConfigurableResource
virtual ~CBaseConfigurableResource ()
 Class destructor. More...
 

Protected Attributes

const SAnchorm_psAnchor
 
CVector3 m_cOldPosition
 
Real m_fDelta
 
- Protected Attributes inherited from argos::CBatteryDischargeModel
CBatteryEquippedEntitym_pcBattery
 

Detailed Description

A battery discharge model based only on time.

In this model, the charge is calculated as follows:

new charge = old charge - delta

Definition at line 153 of file battery_equipped_entity.h.

Constructor & Destructor Documentation

◆ CBatteryDischargeModelTime()

argos::CBatteryDischargeModelTime::CBatteryDischargeModelTime ( )
inline

Definition at line 157 of file battery_equipped_entity.h.

Member Function Documentation

◆ Init()

void argos::CBatteryDischargeModelTime::Init ( TConfigurationNode t_tree)
virtual

Initializes the resource.

Parameters
t_treethe base of the XML configuration tree to parse
Exceptions
CARGoSExceptionif an error occurs

Reimplemented from argos::CBatteryDischargeModel.

Definition at line 141 of file battery_equipped_entity.cpp.

◆ operator()()

void argos::CBatteryDischargeModelTime::operator() ( )
virtual

Implements argos::CBatteryDischargeModel.

Definition at line 148 of file battery_equipped_entity.cpp.

◆ SetDelta()

void argos::CBatteryDischargeModelTime::SetDelta ( Real  f_delta)
inline

Definition at line 162 of file battery_equipped_entity.h.

Member Data Documentation

◆ m_cOldPosition

CVector3 argos::CBatteryDischargeModelTime::m_cOldPosition
protected

Definition at line 171 of file battery_equipped_entity.h.

◆ m_fDelta

Real argos::CBatteryDischargeModelTime::m_fDelta
protected

Definition at line 172 of file battery_equipped_entity.h.

◆ m_psAnchor

const SAnchor* argos::CBatteryDischargeModelTime::m_psAnchor
protected

Definition at line 170 of file battery_equipped_entity.h.