Stg::PowerPack Class Reference

#include <stage.hh>

List of all members.

Classes

class  DissipationVis

Public Member Functions

void Add (joules_t j)
void ChargeStart ()
void ChargeStop ()
void Dissipate (joules_t j)
void Dissipate (joules_t j, const Pose &p)
joules_t GetCapacity () const
bool GetCharging () const
joules_t GetDissipated () const
joules_t GetStored () const
 PowerPack (Model *mod)
void Print (const char *prefix) const
double ProportionRemaining () const
joules_t RemainingCapacity () const
void SetCapacity (joules_t j)
void SetStored (joules_t j)
void Subtract (joules_t j)
void TransferTo (PowerPack *dest, joules_t amount)
void Visualize (Camera *cam)
 ~PowerPack ()

Static Public Attributes

static joules_t global_capacity = 0.0
static joules_t global_dissipated = 0.0
static joules_t global_input = 0.0
static joules_t global_stored = 0.0

Protected Attributes

joules_t capacity
bool charging
joules_t dissipated
Stg::PowerPack::DissipationVis event_vis
joules_t last_joules
usec_t last_time
watts_t last_watts
Modelmod
StripPlotVis output_vis
joules_t stored
StripPlotVis stored_vis

Constructor & Destructor Documentation

PowerPack::PowerPack ( Model mod)
PowerPack::~PowerPack ( )

Member Function Documentation

void PowerPack::Add ( joules_t  j)

Add to the energy store

void Stg::PowerPack::ChargeStart ( ) [inline]
void Stg::PowerPack::ChargeStop ( ) [inline]
void PowerPack::Dissipate ( joules_t  j)

Lose energy as work or heat

void PowerPack::Dissipate ( joules_t  j,
const Pose p 
)

Lose energy as work or heat, and record the event

joules_t PowerPack::GetCapacity ( ) const
bool Stg::PowerPack::GetCharging ( ) const [inline]

Returns true iff the device received energy at the last timestep

joules_t PowerPack::GetDissipated ( ) const
joules_t PowerPack::GetStored ( ) const
void Stg::PowerPack::Print ( const char *  prefix) const [inline]

Print human-readable status on stdout, prefixed with the argument string, or NULL

double Stg::PowerPack::ProportionRemaining ( ) const [inline]
joules_t PowerPack::RemainingCapacity ( ) const

Returns the energy capacity minus the current amount stored

void PowerPack::SetCapacity ( joules_t  j)
void PowerPack::SetStored ( joules_t  j)
void PowerPack::Subtract ( joules_t  j)

Subtract from the energy store

void PowerPack::TransferTo ( PowerPack dest,
joules_t  amount 
)

Transfer some stored energy to another power pack

void PowerPack::Visualize ( Camera cam)

OpenGL visualization of the powerpack state


Member Data Documentation

Energy capacity

bool Stg::PowerPack::charging [protected]

TRUE iff the device is receiving energy

Energy dissipated

Model* Stg::PowerPack::mod [protected]

The model that owns this object

Energy stored


The documentation for this class was generated from the following files: