Simbody  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimTK::Subsystem Class Reference

The abstract parent of all Subsystems. More...

#include <Subsystem.h>

+ Inheritance diagram for SimTK::Subsystem:

Classes

class  Guts
 The abstract parent of all Subsystem "Guts" implementation classes. More...
 

Public Member Functions

 Subsystem ()
 
 Subsystem (const Subsystem &)
 
Subsystemoperator= (const Subsystem &)
 
 ~Subsystem ()
 
const StringgetName () const
 
const StringgetVersion () const
 
QIndex allocateQ (State &, const Vector &qInit) const
 
UIndex allocateU (State &, const Vector &uInit) const
 
ZIndex allocateZ (State &, const Vector &zInit) const
 
DiscreteVariableIndex allocateDiscreteVariable (State &, Stage invalidates, AbstractValue *v) const
 
DiscreteVariableIndex allocateAutoUpdateDiscreteVariable (State &, Stage invalidates, AbstractValue *v, Stage updateDependsOn) const
 
CacheEntryIndex allocateCacheEntry (const State &, Stage dependsOn, Stage computedBy, AbstractValue *v) const
 
CacheEntryIndex allocateCacheEntry (const State &state, Stage g, AbstractValue *v) const
 
CacheEntryIndex allocateLazyCacheEntry (const State &state, Stage earliest, AbstractValue *v) const
 
QErrIndex allocateQErr (const State &, int nqerr) const
 
UErrIndex allocateUErr (const State &, int nuerr) const
 
UDotErrIndex allocateUDotErr (const State &, int nudoterr) const
 
EventTriggerByStageIndex allocateEventTriggersByStage (const State &, Stage, int ntriggers) const
 
const VectorgetQ (const State &) const
 
const VectorgetU (const State &) const
 
const VectorgetZ (const State &) const
 
const VectorgetQDot (const State &) const
 
const VectorgetUDot (const State &) const
 
const VectorgetZDot (const State &) const
 
const VectorgetQDotDot (const State &) const
 
const VectorgetQErr (const State &) const
 
const VectorgetUErr (const State &) const
 
const VectorgetUDotErr (const State &) const
 
const VectorgetMultipliers (const State &) const
 
const VectorgetEventTriggersByStage (const State &, Stage) const
 
VectorupdQ (State &) const
 
VectorupdU (State &) const
 
VectorupdZ (State &) const
 
void setQ (State &s, const Vector &q) const
 
void setU (State &s, const Vector &u) const
 
void setZ (State &s, const Vector &z) const
 
VectorupdQDot (const State &) const
 
VectorupdUDot (const State &) const
 
VectorupdZDot (const State &) const
 
VectorupdQDotDot (const State &) const
 
VectorupdQErr (const State &) const
 
VectorupdUErr (const State &) const
 
VectorupdUDotErr (const State &) const
 
VectorupdMultipliers (const State &) const
 
VectorupdEventTriggersByStage (const State &, Stage) const
 
Stage getStage (const State &) const
 
const AbstractValuegetDiscreteVariable (const State &s, DiscreteVariableIndex dx) const
 
Real getDiscreteVarLastUpdateTime (const State &s, DiscreteVariableIndex dx) const
 
CacheEntryIndex getDiscreteVarUpdateIndex (const State &s, DiscreteVariableIndex dx) const
 
const AbstractValuegetDiscreteVarUpdateValue (const State &s, DiscreteVariableIndex dx) const
 
AbstractValueupdDiscreteVarUpdateValue (const State &s, DiscreteVariableIndex dx) const
 
bool isDiscreteVarUpdateValueRealized (const State &s, DiscreteVariableIndex dx) const
 
void markDiscreteVarUpdateValueRealized (const State &s, DiscreteVariableIndex dx) const
 
AbstractValueupdDiscreteVariable (State &, DiscreteVariableIndex) const
 
const AbstractValuegetCacheEntry (const State &, CacheEntryIndex) const
 
AbstractValueupdCacheEntry (const State &, CacheEntryIndex) const
 
bool isCacheValueRealized (const State &, CacheEntryIndex) const
 
void markCacheValueRealized (const State &, CacheEntryIndex) const
 
void markCacheValueNotRealized (const State &, CacheEntryIndex) const
 
SystemQIndex getQStart (const State &) const
 
int getNQ (const State &) const
 
SystemUIndex getUStart (const State &) const
 
int getNU (const State &) const
 
SystemZIndex getZStart (const State &) const
 
int getNZ (const State &) const
 
SystemQErrIndex getQErrStart (const State &) const
 
int getNQErr (const State &) const
 
SystemUErrIndex getUErrStart (const State &) const
 
int getNUErr (const State &) const
 
SystemUDotErrIndex getUDotErrStart (const State &) const
 
int getNUDotErr (const State &) const
 
SystemMultiplierIndex getMultipliersStart (const State &) const
 
int getNMultipliers (const State &) const
 
SystemEventTriggerByStageIndex getEventTriggerStartByStage (const State &, Stage) const
 
int getNEventTriggersByStage (const State &, Stage) const
 
bool isInSystem () const
 
bool isInSameSystem (const Subsystem &otherSubsystem) const
 
const SystemgetSystem () const
 
SystemupdSystem ()
 
SubsystemIndex getMySubsystemIndex () const
 
bool isOwnerHandle () const
 
bool isEmptyHandle () const
 
bool isSameSubsystem (const Subsystem &otherSubsystem) const
 
bool subsystemTopologyHasBeenRealized () const
 
void invalidateSubsystemTopologyCache () const
 
MeasureIndex adoptMeasure (AbstractMeasure &)
 
AbstractMeasure getMeasure (MeasureIndex) const
 
template<class T >
Measure_< T > getMeasure_ (MeasureIndex mx) const
 
const Subsystem::GutsgetSubsystemGuts () const
 
Subsystem::GutsupdSubsystemGuts ()
 
void adoptSubsystemGuts (Subsystem::Guts *g)
 
void setSystem (System &, SubsystemIndex)
 
 Subsystem (Subsystem::Guts *g)
 
bool hasGuts () const
 

Friends

class Guts
 

Detailed Description

The abstract parent of all Subsystems.

A Subsystem is expected to be part of a larger System and to have interdependencies with other subsystems of that same system. It must NOT have dependencies on objects which are outside the System. Consequently construction of any concrete subsystem requires specification of a system at that time. Subsystems go through an extended construction phase in which their contents and interdependencies are created. Thus all of a System's Subsystems generally need to be available simultaneously during construction, so that they can reference each other.

There are three distinct users of this class:

  • the System class
  • the concrete Subsystems derived from this class
  • the end user of a concrete Subsystem Only end user methods are public here. Methods intended for use by the concrete Subsystem class can be found in the Subsystem::Guts class which is defined in a separate header file. End users need not look over there – trust me, you'll find it disturbing if you do!

Constructor & Destructor Documentation

SimTK::Subsystem::Subsystem ( )
inline
SimTK::Subsystem::Subsystem ( const Subsystem )
SimTK::Subsystem::~Subsystem ( )
SimTK::Subsystem::Subsystem ( Subsystem::Guts g)
inlineexplicit

Member Function Documentation

Subsystem& SimTK::Subsystem::operator= ( const Subsystem )
const String& SimTK::Subsystem::getName ( ) const
const String& SimTK::Subsystem::getVersion ( ) const
QIndex SimTK::Subsystem::allocateQ ( State ,
const Vector qInit 
) const
UIndex SimTK::Subsystem::allocateU ( State ,
const Vector uInit 
) const
ZIndex SimTK::Subsystem::allocateZ ( State ,
const Vector zInit 
) const
DiscreteVariableIndex SimTK::Subsystem::allocateDiscreteVariable ( State ,
Stage  invalidates,
AbstractValue v 
) const
DiscreteVariableIndex SimTK::Subsystem::allocateAutoUpdateDiscreteVariable ( State ,
Stage  invalidates,
AbstractValue v,
Stage  updateDependsOn 
) const
CacheEntryIndex SimTK::Subsystem::allocateCacheEntry ( const State ,
Stage  dependsOn,
Stage  computedBy,
AbstractValue v 
) const
CacheEntryIndex SimTK::Subsystem::allocateCacheEntry ( const State state,
Stage  g,
AbstractValue v 
) const
inline
CacheEntryIndex SimTK::Subsystem::allocateLazyCacheEntry ( const State state,
Stage  earliest,
AbstractValue v 
) const
inline
QErrIndex SimTK::Subsystem::allocateQErr ( const State ,
int  nqerr 
) const
UErrIndex SimTK::Subsystem::allocateUErr ( const State ,
int  nuerr 
) const
UDotErrIndex SimTK::Subsystem::allocateUDotErr ( const State ,
int  nudoterr 
) const
EventTriggerByStageIndex SimTK::Subsystem::allocateEventTriggersByStage ( const State ,
Stage  ,
int  ntriggers 
) const
const Vector& SimTK::Subsystem::getQ ( const State ) const
const Vector& SimTK::Subsystem::getU ( const State ) const
const Vector& SimTK::Subsystem::getZ ( const State ) const
const Vector& SimTK::Subsystem::getQDot ( const State ) const
const Vector& SimTK::Subsystem::getUDot ( const State ) const
const Vector& SimTK::Subsystem::getZDot ( const State ) const
const Vector& SimTK::Subsystem::getQDotDot ( const State ) const
const Vector& SimTK::Subsystem::getQErr ( const State ) const
const Vector& SimTK::Subsystem::getUErr ( const State ) const
const Vector& SimTK::Subsystem::getUDotErr ( const State ) const
const Vector& SimTK::Subsystem::getMultipliers ( const State ) const
const Vector& SimTK::Subsystem::getEventTriggersByStage ( const State ,
Stage   
) const
Vector& SimTK::Subsystem::updQ ( State ) const
Vector& SimTK::Subsystem::updU ( State ) const
Vector& SimTK::Subsystem::updZ ( State ) const
void SimTK::Subsystem::setQ ( State s,
const Vector q 
) const
inline
void SimTK::Subsystem::setU ( State s,
const Vector u 
) const
inline
void SimTK::Subsystem::setZ ( State s,
const Vector z 
) const
inline
Vector& SimTK::Subsystem::updQDot ( const State ) const
Vector& SimTK::Subsystem::updUDot ( const State ) const
Vector& SimTK::Subsystem::updZDot ( const State ) const
Vector& SimTK::Subsystem::updQDotDot ( const State ) const
Vector& SimTK::Subsystem::updQErr ( const State ) const
Vector& SimTK::Subsystem::updUErr ( const State ) const
Vector& SimTK::Subsystem::updUDotErr ( const State ) const
Vector& SimTK::Subsystem::updMultipliers ( const State ) const
Vector& SimTK::Subsystem::updEventTriggersByStage ( const State ,
Stage   
) const
Stage SimTK::Subsystem::getStage ( const State ) const
const AbstractValue& SimTK::Subsystem::getDiscreteVariable ( const State s,
DiscreteVariableIndex  dx 
) const
Real SimTK::Subsystem::getDiscreteVarLastUpdateTime ( const State s,
DiscreteVariableIndex  dx 
) const
inline
CacheEntryIndex SimTK::Subsystem::getDiscreteVarUpdateIndex ( const State s,
DiscreteVariableIndex  dx 
) const
inline
const AbstractValue& SimTK::Subsystem::getDiscreteVarUpdateValue ( const State s,
DiscreteVariableIndex  dx 
) const
inline
AbstractValue& SimTK::Subsystem::updDiscreteVarUpdateValue ( const State s,
DiscreteVariableIndex  dx 
) const
inline
bool SimTK::Subsystem::isDiscreteVarUpdateValueRealized ( const State s,
DiscreteVariableIndex  dx 
) const
inline
void SimTK::Subsystem::markDiscreteVarUpdateValueRealized ( const State s,
DiscreteVariableIndex  dx 
) const
inline
AbstractValue& SimTK::Subsystem::updDiscreteVariable ( State ,
DiscreteVariableIndex   
) const
const AbstractValue& SimTK::Subsystem::getCacheEntry ( const State ,
CacheEntryIndex   
) const
AbstractValue& SimTK::Subsystem::updCacheEntry ( const State ,
CacheEntryIndex   
) const
bool SimTK::Subsystem::isCacheValueRealized ( const State ,
CacheEntryIndex   
) const
void SimTK::Subsystem::markCacheValueRealized ( const State ,
CacheEntryIndex   
) const
void SimTK::Subsystem::markCacheValueNotRealized ( const State ,
CacheEntryIndex   
) const
SystemQIndex SimTK::Subsystem::getQStart ( const State ) const
int SimTK::Subsystem::getNQ ( const State ) const
SystemUIndex SimTK::Subsystem::getUStart ( const State ) const
int SimTK::Subsystem::getNU ( const State ) const
SystemZIndex SimTK::Subsystem::getZStart ( const State ) const
int SimTK::Subsystem::getNZ ( const State ) const
SystemQErrIndex SimTK::Subsystem::getQErrStart ( const State ) const
int SimTK::Subsystem::getNQErr ( const State ) const
SystemUErrIndex SimTK::Subsystem::getUErrStart ( const State ) const
int SimTK::Subsystem::getNUErr ( const State ) const
SystemUDotErrIndex SimTK::Subsystem::getUDotErrStart ( const State ) const
int SimTK::Subsystem::getNUDotErr ( const State ) const
SystemMultiplierIndex SimTK::Subsystem::getMultipliersStart ( const State ) const
int SimTK::Subsystem::getNMultipliers ( const State ) const
SystemEventTriggerByStageIndex SimTK::Subsystem::getEventTriggerStartByStage ( const State ,
Stage   
) const
int SimTK::Subsystem::getNEventTriggersByStage ( const State ,
Stage   
) const
bool SimTK::Subsystem::isInSystem ( ) const
bool SimTK::Subsystem::isInSameSystem ( const Subsystem otherSubsystem) const
const System& SimTK::Subsystem::getSystem ( ) const
System& SimTK::Subsystem::updSystem ( )
SubsystemIndex SimTK::Subsystem::getMySubsystemIndex ( ) const
bool SimTK::Subsystem::isOwnerHandle ( ) const
bool SimTK::Subsystem::isEmptyHandle ( ) const
bool SimTK::Subsystem::isSameSubsystem ( const Subsystem otherSubsystem) const
bool SimTK::Subsystem::subsystemTopologyHasBeenRealized ( ) const
void SimTK::Subsystem::invalidateSubsystemTopologyCache ( ) const
MeasureIndex SimTK::Subsystem::adoptMeasure ( AbstractMeasure )
AbstractMeasure SimTK::Subsystem::getMeasure ( MeasureIndex  ) const
template<class T >
Measure_<T> SimTK::Subsystem::getMeasure_ ( MeasureIndex  mx) const
inline
const Subsystem::Guts& SimTK::Subsystem::getSubsystemGuts ( ) const
inline
Subsystem::Guts& SimTK::Subsystem::updSubsystemGuts ( )
inline
void SimTK::Subsystem::adoptSubsystemGuts ( Subsystem::Guts g)
void SimTK::Subsystem::setSystem ( System ,
SubsystemIndex   
)
bool SimTK::Subsystem::hasGuts ( ) const
inline

Friends And Related Function Documentation

friend class Guts
friend

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