#include <SubsystemGuts.h>
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:
Public Member Functions | |
Guts (const Guts &) | |
Guts & | operator= (const Guts &) |
Guts (const String &name="<NONAME>", const String &version="0.0.0") | |
virtual | ~Guts () |
const String & | getName () const |
const String & | getVersion () const |
const Vector & | getQ (const State &) const |
const Vector & | getU (const State &) const |
const Vector & | getZ (const State &) const |
const Vector & | getQDot (const State &) const |
const Vector & | getUDot (const State &) const |
const Vector & | getZDot (const State &) const |
const Vector & | getQDotDot (const State &) const |
const Vector & | getQErr (const State &) const |
const Vector & | getUErr (const State &) const |
const Vector & | getUDotErr (const State &) const |
const Vector & | getMultipliers (const State &) const |
Vector & | updQ (State &) const |
Vector & | updU (State &) const |
Vector & | updZ (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 |
Vector & | updQDot (const State &) const |
Vector & | updUDot (const State &) const |
Vector & | updZDot (const State &) const |
Vector & | updQDotDot (const State &) const |
Vector & | updQErr (const State &) const |
Vector & | updUErr (const State &) const |
Vector & | updUDotErr (const State &) const |
Vector & | updMultipliers (const State &) const |
Stage | getStage (const State &) const |
const AbstractValue & | getDiscreteVariable (const State &, int index) const |
AbstractValue & | updDiscreteVariable (State &, int index) const |
const AbstractValue & | getCacheEntry (const State &, int index) const |
AbstractValue & | updCacheEntry (const State &, int index) const |
int | getQStart (const State &) const |
int | getNQ (const State &) const |
int | getUStart (const State &) const |
int | getNU (const State &) const |
int | getZStart (const State &) const |
int | getNZ (const State &) const |
int | getQErrStart (const State &) const |
int | getNQErr (const State &) const |
int | getUErrStart (const State &) const |
int | getNUErr (const State &) const |
int | getUDotErrStart (const State &) const |
int | getNUDotErr (const State &) const |
int | getMultipliersStart (const State &) const |
int | getNMultipliers (const State &) const |
bool | isInSystem () const |
bool | isInSameSystem (const Subsystem &otherSubsystem) const |
const System & | getSystem () const |
System & | updSystem () |
SubsystemIndex | getMySubsystemIndex () const |
const Subsystem & | getOwnerSubsystemHandle () const |
Subsystem & | updOwnerSubsystemHandle () |
void | setOwnerSubsystemHandle (Subsystem &) |
bool | hasOwnerSubsystemHandle () const |
void | setSystem (System &, SubsystemIndex) |
Guts (class GutsRep *r) | |
bool | hasRep () const |
const GutsRep & | getRep () const |
GutsRep & | updRep () const |
void | setRep (GutsRep &r) |
bool | subsystemTopologyHasBeenRealized () const |
void | invalidateSubsystemTopologyCache () const |
Subsystem::Guts * | clone () const |
void | realizeSubsystemTopology (State &) const |
void | realizeSubsystemModel (State &) const |
void | realizeSubsystemInstance (const State &) const |
void | realizeSubsystemTime (const State &) const |
void | realizeSubsystemPosition (const State &) const |
void | realizeSubsystemVelocity (const State &) const |
void | realizeSubsystemDynamics (const State &) const |
void | realizeSubsystemAcceleration (const State &) const |
void | realizeSubsystemReport (const State &) const |
void | calcQUnitWeights (const State &, Vector &weights) const |
void | calcUUnitWeights (const State &, Vector &weights) const |
void | calcZUnitWeights (const State &, Vector &weights) const |
void | calcQErrUnitTolerances (const State &, Vector &tolerances) const |
void | calcUErrUnitTolerances (const State &, Vector &tolerances) const |
void | calcDecorativeGeometryAndAppend (const State &, Stage, std::vector< DecorativeGeometry > &) const |
void | createScheduledEvent (State &state, EventId &eventId) const |
void | createTriggeredEvent (State &state, EventId &eventId, int &triggerFunctionIndex, Stage stage) const |
virtual void | calcEventTriggerInfo (const State &, std::vector< System::EventTriggerInfo > &) const |
virtual void | calcTimeOfNextScheduledEvent (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) const |
virtual void | calcTimeOfNextScheduledReport (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) const |
virtual void | handleEvents (State &, System::EventCause, const std::vector< EventId > &eventIds, Real accuracy, const Vector &yWeights, const Vector &ooConstraintTols, Stage &lowestModified, bool &shouldTerminate) const |
virtual void | reportEvents (const State &, System::EventCause, const std::vector< EventId > &eventIds) const |
Static Public Member Functions | |
static void | destruct (Subsystem::Guts *) |
Protected Member Functions | |
virtual Subsystem::Guts * | cloneImpl () const =0 |
virtual int | realizeSubsystemTopologyImpl (State &s) const |
virtual int | realizeSubsystemModelImpl (State &s) const |
virtual int | realizeSubsystemInstanceImpl (const State &s) const |
virtual int | realizeSubsystemTimeImpl (const State &s) const |
virtual int | realizeSubsystemPositionImpl (const State &s) const |
virtual int | realizeSubsystemVelocityImpl (const State &s) const |
virtual int | realizeSubsystemDynamicsImpl (const State &s) const |
virtual int | realizeSubsystemAccelerationImpl (const State &s) const |
virtual int | realizeSubsystemReportImpl (const State &s) const |
virtual int | calcQUnitWeightsImpl (const State &s, Vector &weights) const |
virtual int | calcUUnitWeightsImpl (const State &s, Vector &weights) const |
virtual int | calcZUnitWeightsImpl (const State &s, Vector &weights) const |
virtual int | calcQErrUnitTolerancesImpl (const State &s, Vector &tolerances) const |
virtual int | calcUErrUnitTolerancesImpl (const State &s, Vector &tolerances) const |
virtual int | calcDecorativeGeometryAndAppendImpl (const State &, Stage, std::vector< DecorativeGeometry > &) const |
int | allocateQ (State &s, const Vector &qInit) const |
int | allocateU (State &s, const Vector &uInit) const |
int | allocateZ (State &s, const Vector &zInit) const |
int | allocateQErr (State &s, int nqerr) const |
int | allocateUErr (State &s, int nuerr) const |
int | allocateUDotErr (State &s, int nudoterr) const |
int | allocateDiscreteVariable (State &s, Stage g, AbstractValue *v) const |
int | allocateCacheEntry (State &s, Stage g, AbstractValue *v) const |
void | advanceToStage (const State &s, Stage g) const |
Friends | |
class | GutsRep |
void | subsystemDestructImplLocator (Subsystem::Guts *) |
Subsystem::Guts * | subsystemCloneImplLocator (const Subsystem::Guts &) |
int | subsystemRealizeTopologyImplLocator (const Subsystem::Guts &, State &) |
int | subsystemRealizeModelImplLocator (const Subsystem::Guts &, State &) |
int | subsystemRealizeInstanceImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeTimeImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizePositionImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeVelocityImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeDynamicsImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeAccelerationImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeReportImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemCalcQUnitWeightsImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcUUnitWeightsImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcZUnitWeightsImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcQErrUnitTolerancesImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcUErrUnitTolerancesImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcDecorativeGeometryAndAppendImplLocator (const Subsystem::Guts &, const State &, Stage, std::vector< DecorativeGeometry > &) |
virtual ~Guts | ( | ) | [inline, virtual] |
Guts | ( | class GutsRep * | r | ) | [inline, explicit] |
int allocateCacheEntry | ( | State & | s, | |
Stage | g, | |||
AbstractValue * | v | |||
) | const [protected] |
int allocateDiscreteVariable | ( | State & | s, | |
Stage | g, | |||
AbstractValue * | v | |||
) | const [protected] |
int allocateQErr | ( | State & | s, | |
int | nqerr | |||
) | const [protected] |
int allocateUDotErr | ( | State & | s, | |
int | nudoterr | |||
) | const [protected] |
int allocateUErr | ( | State & | s, | |
int | nuerr | |||
) | const [protected] |
void calcDecorativeGeometryAndAppend | ( | const State & | , | |
Stage | , | |||
std::vector< DecorativeGeometry > & | ||||
) | const |
virtual int calcDecorativeGeometryAndAppendImpl | ( | const State & | , | |
Stage | , | |||
std::vector< DecorativeGeometry > & | ||||
) | const [protected, virtual] |
virtual void calcEventTriggerInfo | ( | const State & | , | |
std::vector< System::EventTriggerInfo > & | ||||
) | const [virtual] |
virtual int calcQErrUnitTolerancesImpl | ( | const State & | s, | |
Vector & | tolerances | |||
) | const [protected, virtual] |
virtual void calcTimeOfNextScheduledEvent | ( | const State & | , | |
Real & | tNextEvent, | |||
std::vector< EventId > & | eventIds, | |||
bool | includeCurrentTime | |||
) | const [virtual] |
virtual void calcTimeOfNextScheduledReport | ( | const State & | , | |
Real & | tNextEvent, | |||
std::vector< EventId > & | eventIds, | |||
bool | includeCurrentTime | |||
) | const [virtual] |
virtual int calcUErrUnitTolerancesImpl | ( | const State & | s, | |
Vector & | tolerances | |||
) | const [protected, virtual] |
Subsystem::Guts* clone | ( | ) | const |
virtual Subsystem::Guts* cloneImpl | ( | ) | const [protected, pure virtual] |
void createScheduledEvent | ( | State & | state, | |
EventId & | eventId | |||
) | const |
void createTriggeredEvent | ( | State & | state, | |
EventId & | eventId, | |||
int & | triggerFunctionIndex, | |||
Stage | stage | |||
) | const |
static void destruct | ( | Subsystem::Guts * | ) | [static] |
const AbstractValue& getCacheEntry | ( | const State & | , | |
int | index | |||
) | const |
const AbstractValue& getDiscreteVariable | ( | const State & | , | |
int | index | |||
) | const |
int getMultipliersStart | ( | const State & | ) | const |
SubsystemIndex getMySubsystemIndex | ( | ) | const |
const String& getName | ( | ) | const |
int getNMultipliers | ( | const State & | ) | const |
int getNQ | ( | const State & | ) | const |
int getNQErr | ( | const State & | ) | const |
int getNU | ( | const State & | ) | const |
int getNUDotErr | ( | const State & | ) | const |
int getNUErr | ( | const State & | ) | const |
int getNZ | ( | const State & | ) | const |
const Subsystem& getOwnerSubsystemHandle | ( | ) | const |
int getQErrStart | ( | const State & | ) | const |
int getQStart | ( | const State & | ) | const |
const GutsRep& getRep | ( | ) | const [inline] |
const System& getSystem | ( | ) | const |
int getUDotErrStart | ( | const State & | ) | const |
int getUErrStart | ( | const State & | ) | const |
int getUStart | ( | const State & | ) | const |
const String& getVersion | ( | ) | const |
int getZStart | ( | const State & | ) | const |
virtual void handleEvents | ( | State & | , | |
System::EventCause | , | |||
const std::vector< EventId > & | eventIds, | |||
Real | accuracy, | |||
const Vector & | yWeights, | |||
const Vector & | ooConstraintTols, | |||
Stage & | lowestModified, | |||
bool & | shouldTerminate | |||
) | const [virtual] |
bool hasOwnerSubsystemHandle | ( | ) | const |
bool hasRep | ( | ) | const [inline] |
void invalidateSubsystemTopologyCache | ( | ) | const |
bool isInSameSystem | ( | const Subsystem & | otherSubsystem | ) | const |
bool isInSystem | ( | ) | const |
void realizeSubsystemAcceleration | ( | const State & | ) | const |
virtual int realizeSubsystemAccelerationImpl | ( | const State & | s | ) | const [protected, virtual] |
void realizeSubsystemDynamics | ( | const State & | ) | const |
virtual int realizeSubsystemDynamicsImpl | ( | const State & | s | ) | const [protected, virtual] |
void realizeSubsystemInstance | ( | const State & | ) | const |
virtual int realizeSubsystemInstanceImpl | ( | const State & | s | ) | const [protected, virtual] |
void realizeSubsystemModel | ( | State & | ) | const |
virtual int realizeSubsystemModelImpl | ( | State & | s | ) | const [protected, virtual] |
void realizeSubsystemPosition | ( | const State & | ) | const |
virtual int realizeSubsystemPositionImpl | ( | const State & | s | ) | const [protected, virtual] |
void realizeSubsystemReport | ( | const State & | ) | const |
virtual int realizeSubsystemReportImpl | ( | const State & | s | ) | const [protected, virtual] |
void realizeSubsystemTime | ( | const State & | ) | const |
virtual int realizeSubsystemTimeImpl | ( | const State & | s | ) | const [protected, virtual] |
void realizeSubsystemTopology | ( | State & | ) | const |
virtual int realizeSubsystemTopologyImpl | ( | State & | s | ) | const [protected, virtual] |
void realizeSubsystemVelocity | ( | const State & | ) | const |
virtual int realizeSubsystemVelocityImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual void reportEvents | ( | const State & | , | |
System::EventCause | , | |||
const std::vector< EventId > & | eventIds | |||
) | const [virtual] |
void setOwnerSubsystemHandle | ( | Subsystem & | ) |
void setRep | ( | GutsRep & | r | ) | [inline] |
void setSystem | ( | System & | , | |
SubsystemIndex | ||||
) |
bool subsystemTopologyHasBeenRealized | ( | ) | const |
AbstractValue& updCacheEntry | ( | const State & | , | |
int | index | |||
) | const |
AbstractValue& updDiscreteVariable | ( | State & | , | |
int | index | |||
) | const |
Subsystem& updOwnerSubsystemHandle | ( | ) |
GutsRep& updRep | ( | ) | const [inline] |
System& updSystem | ( | ) |
friend class GutsRep [friend] |
int subsystemCalcDecorativeGeometryAndAppendImplLocator | ( | const Subsystem::Guts & | , | |
const State & | , | |||
Stage | , | |||
std::vector< DecorativeGeometry > & | ||||
) | [friend] |
int subsystemCalcQErrUnitTolerancesImplLocator | ( | const Subsystem::Guts & | , | |
const State & | , | |||
Vector & | ||||
) | [friend] |
int subsystemCalcQUnitWeightsImplLocator | ( | const Subsystem::Guts & | , | |
const State & | , | |||
Vector & | ||||
) | [friend] |
int subsystemCalcUErrUnitTolerancesImplLocator | ( | const Subsystem::Guts & | , | |
const State & | , | |||
Vector & | ||||
) | [friend] |
int subsystemCalcUUnitWeightsImplLocator | ( | const Subsystem::Guts & | , | |
const State & | , | |||
Vector & | ||||
) | [friend] |
int subsystemCalcZUnitWeightsImplLocator | ( | const Subsystem::Guts & | , | |
const State & | , | |||
Vector & | ||||
) | [friend] |
Subsystem::Guts* subsystemCloneImplLocator | ( | const Subsystem::Guts & | ) | [friend] |
void subsystemDestructImplLocator | ( | Subsystem::Guts * | ) | [friend] |
int subsystemRealizeAccelerationImplLocator | ( | const Subsystem::Guts & | , | |
const State & | ||||
) | [friend] |
int subsystemRealizeDynamicsImplLocator | ( | const Subsystem::Guts & | , | |
const State & | ||||
) | [friend] |
int subsystemRealizeInstanceImplLocator | ( | const Subsystem::Guts & | , | |
const State & | ||||
) | [friend] |
int subsystemRealizeModelImplLocator | ( | const Subsystem::Guts & | , | |
State & | ||||
) | [friend] |
int subsystemRealizePositionImplLocator | ( | const Subsystem::Guts & | , | |
const State & | ||||
) | [friend] |
int subsystemRealizeReportImplLocator | ( | const Subsystem::Guts & | , | |
const State & | ||||
) | [friend] |
int subsystemRealizeTimeImplLocator | ( | const Subsystem::Guts & | , | |
const State & | ||||
) | [friend] |
int subsystemRealizeTopologyImplLocator | ( | const Subsystem::Guts & | , | |
State & | ||||
) | [friend] |
int subsystemRealizeVelocityImplLocator | ( | const Subsystem::Guts & | , | |
const State & | ||||
) | [friend] |