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 1548 of file stage.hh.

Constructor & Destructor Documentation

◆ PowerPack()

PowerPack::PowerPack ( Model mod)
explicit

Definition at line 17 of file powerpack.cc.

◆ ~PowerPack()

PowerPack::~PowerPack ( )

Definition at line 38 of file powerpack.cc.

Member Function Documentation

◆ Add()

void PowerPack::Add ( joules_t  j)

Add to the energy store

Definition at line 153 of file powerpack.cc.

◆ ChargeStart()

void Stg::PowerPack::ChargeStart ( )
inline

Definition at line 1641 of file stage.hh.

◆ ChargeStop()

void Stg::PowerPack::ChargeStop ( )
inline

Definition at line 1642 of file stage.hh.

◆ Dissipate() [1/2]

void PowerPack::Dissipate ( joules_t  j)

Lose energy as work or heat

Definition at line 234 of file powerpack.cc.

◆ Dissipate() [2/2]

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

Lose energy as work or heat, and record the event

Definition at line 246 of file powerpack.cc.

◆ GetCapacity()

joules_t PowerPack::GetCapacity ( ) const

Definition at line 212 of file powerpack.cc.

◆ GetCharging()

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

Returns true iff the device received energy at the last timestep

Definition at line 1640 of file stage.hh.

◆ GetDissipated()

joules_t PowerPack::GetDissipated ( ) const

Definition at line 222 of file powerpack.cc.

◆ GetStored()

joules_t PowerPack::GetStored ( ) const

Definition at line 217 of file powerpack.cc.

◆ Print()

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 1625 of file stage.hh.

◆ ProportionRemaining()

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

Definition at line 1622 of file stage.hh.

◆ RemainingCapacity()

joules_t PowerPack::RemainingCapacity ( ) const

Returns the energy capacity minus the current amount stored

Definition at line 148 of file powerpack.cc.

◆ SetCapacity()

void PowerPack::SetCapacity ( joules_t  j)

Definition at line 199 of file powerpack.cc.

◆ SetStored()

void PowerPack::SetStored ( joules_t  j)

Definition at line 227 of file powerpack.cc.

◆ Subtract()

void PowerPack::Subtract ( joules_t  j)

Subtract from the energy store

Definition at line 163 of file powerpack.cc.

◆ TransferTo()

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

Transfer some stored energy to another power pack

Definition at line 177 of file powerpack.cc.

◆ Visualize()

void PowerPack::Visualize ( Camera cam)

OpenGL visualization of the powerpack state

Definition at line 47 of file powerpack.cc.

Friends And Related Function Documentation

◆ Canvas

friend class Canvas
friend

Definition at line 1550 of file stage.hh.

◆ WorldGui

friend class WorldGui
friend

Definition at line 1549 of file stage.hh.

Member Data Documentation

◆ capacity

joules_t Stg::PowerPack::capacity
protected

Energy capacity

Definition at line 1584 of file stage.hh.

◆ charging

bool Stg::PowerPack::charging
protected

TRUE iff the device is receiving energy

Definition at line 1587 of file stage.hh.

◆ dissipated

joules_t Stg::PowerPack::dissipated
protected

Energy dissipated

Definition at line 1590 of file stage.hh.

◆ event_vis

Stg::PowerPack::DissipationVis Stg::PowerPack::event_vis
protected

◆ global_capacity

joules_t PowerPack::global_capacity = 0.0
static

Definition at line 1599 of file stage.hh.

◆ global_dissipated

joules_t PowerPack::global_dissipated = 0.0
static

Definition at line 1600 of file stage.hh.

◆ global_input

joules_t PowerPack::global_input = 0.0
static

Definition at line 1601 of file stage.hh.

◆ global_stored

joules_t PowerPack::global_stored = 0.0
static

Definition at line 1598 of file stage.hh.

◆ last_joules

joules_t Stg::PowerPack::last_joules
protected

Definition at line 1594 of file stage.hh.

◆ last_time

usec_t Stg::PowerPack::last_time
protected

Definition at line 1593 of file stage.hh.

◆ last_watts

watts_t Stg::PowerPack::last_watts
protected

Definition at line 1595 of file stage.hh.

◆ mod

Model* Stg::PowerPack::mod
protected

The model that owns this object

Definition at line 1578 of file stage.hh.

◆ output_vis

StripPlotVis Stg::PowerPack::output_vis
protected

Definition at line 1574 of file stage.hh.

◆ stored

joules_t Stg::PowerPack::stored
protected

Energy stored

Definition at line 1581 of file stage.hh.

◆ stored_vis

StripPlotVis Stg::PowerPack::stored_vis
protected

Definition at line 1575 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 Feb 28 2022 23:48:56