Classes | Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
Stg::PowerPack Class Reference

#include <stage.hh>

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
 

Friends

class Canvas
 
class WorldGui
 

Detailed Description

Definition at line 1628 of file stage.hh.

Constructor & Destructor Documentation

PowerPack::PowerPack ( Model mod)

Definition at line 18 of file powerpack.cc.

PowerPack::~PowerPack ( )

Definition at line 43 of file powerpack.cc.

Member Function Documentation

void PowerPack::Add ( joules_t  j)

Add to the energy store

Definition at line 162 of file powerpack.cc.

void Stg::PowerPack::ChargeStart ( )
inline

Definition at line 1730 of file stage.hh.

void Stg::PowerPack::ChargeStop ( )
inline

Definition at line 1731 of file stage.hh.

void PowerPack::Dissipate ( joules_t  j)

Lose energy as work or heat

Definition at line 244 of file powerpack.cc.

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

Lose energy as work or heat, and record the event

Definition at line 256 of file powerpack.cc.

joules_t PowerPack::GetCapacity ( ) const

Definition at line 222 of file powerpack.cc.

bool Stg::PowerPack::GetCharging ( ) const
inline

Returns true iff the device received energy at the last timestep

Definition at line 1728 of file stage.hh.

joules_t PowerPack::GetDissipated ( ) const

Definition at line 232 of file powerpack.cc.

joules_t PowerPack::GetStored ( ) const

Definition at line 227 of file powerpack.cc.

void Stg::PowerPack::Print ( const char *  prefix) const
inline

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

Definition at line 1713 of file stage.hh.

double Stg::PowerPack::ProportionRemaining ( ) const
inline

Definition at line 1708 of file stage.hh.

joules_t PowerPack::RemainingCapacity ( ) const

Returns the energy capacity minus the current amount stored

Definition at line 157 of file powerpack.cc.

void PowerPack::SetCapacity ( joules_t  j)

Definition at line 208 of file powerpack.cc.

void PowerPack::SetStored ( joules_t  j)

Definition at line 237 of file powerpack.cc.

void PowerPack::Subtract ( joules_t  j)

Subtract from the energy store

Definition at line 171 of file powerpack.cc.

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

Transfer some stored energy to another power pack

Definition at line 185 of file powerpack.cc.

void PowerPack::Visualize ( Camera cam)

OpenGL visualization of the powerpack state

Definition at line 52 of file powerpack.cc.

Friends And Related Function Documentation

friend class Canvas
friend

Definition at line 1631 of file stage.hh.

friend class WorldGui
friend

Definition at line 1630 of file stage.hh.

Member Data Documentation

joules_t Stg::PowerPack::capacity
protected

Energy capacity

Definition at line 1670 of file stage.hh.

bool Stg::PowerPack::charging
protected

TRUE iff the device is receiving energy

Definition at line 1673 of file stage.hh.

joules_t Stg::PowerPack::dissipated
protected

Energy dissipated

Definition at line 1676 of file stage.hh.

Stg::PowerPack::DissipationVis Stg::PowerPack::event_vis
protected
joules_t PowerPack::global_capacity = 0.0
static

Definition at line 1685 of file stage.hh.

joules_t PowerPack::global_dissipated = 0.0
static

Definition at line 1686 of file stage.hh.

joules_t PowerPack::global_input = 0.0
static

Definition at line 1687 of file stage.hh.

joules_t PowerPack::global_stored = 0.0
static

Definition at line 1684 of file stage.hh.

joules_t Stg::PowerPack::last_joules
protected

Definition at line 1680 of file stage.hh.

usec_t Stg::PowerPack::last_time
protected

Definition at line 1679 of file stage.hh.

watts_t Stg::PowerPack::last_watts
protected

Definition at line 1681 of file stage.hh.

Model* Stg::PowerPack::mod
protected

The model that owns this object

Definition at line 1664 of file stage.hh.

StripPlotVis Stg::PowerPack::output_vis
protected

Definition at line 1660 of file stage.hh.

joules_t Stg::PowerPack::stored
protected

Energy stored

Definition at line 1667 of file stage.hh.

StripPlotVis Stg::PowerPack::stored_vis
protected

Definition at line 1661 of file stage.hh.


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


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Jun 10 2019 15:06:12