Simbody  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SimTK::Event::Cause Class Reference

These are all the possible causes for events. More...

Public Types

enum  Num {
  Initialization = 1,
  Triggered = 2,
  Scheduled = 3,
  TimeAdvanced = 4,
  Signaled = 5,
  Termination = 6,
  Invalid = -1
}
 

Public Member Functions

 Cause ()
 
 Cause (Num n)
 
 operator Num () const
 
Causeoperator= (Num n)
 
bool isValid () const
 

Detailed Description

These are all the possible causes for events.

Initialization
A Study has performed its own initialization and is about to start.
Triggered
An event trigger function underwent a monitored sign transition.
Scheduled
An integrator reached a previously-scheduled time for the Event to occur.
TimeAdvanced
An integrator completed an internal step, meaning that it has reached a point where time has advanced irreversibly.
Signaled
A flag in the State has been explicitly set, meaning that a particular Event has occurred. Anyone with write access to a State can set these, but typically they are set in event handlers associated with one of the other kinds of events.
Termination
The Study has finished. If a Termination event handler signals more Events, those signaled events are not processed by the Study; that is, the signals remain set in the final State.

In case several of these causes are detected in a single step, they are sequentialized in the order shown, like this: 1. The occurrence of triggered events is reported and the triggering state and a list of triggered events are passed to the event handler for processing (meaning the state, but not the time, is modified). [Note that simultaneity *within* the set of triggered events may also require special handling; we're not talking about that here, just simultaneity of *causes*.] 2. Next, using the state resulting from step 1, the time is checked to see if scheduled events have occurred. If so, a list of those events is passed to the event handler for processing. 3. Next, if this system has requested time-advanced events, the event handler is called with the state that resulted from step 2 and the "time advanced" cause noted. No event list is passed in that case. The state may be modified. 4. Last, if the final time has been reached or if any of the event handlers asked for termination, we pass the state to the event handler again noting that we have reached termination. The state may be modified and the result will be the final state of the simulation.

Member Enumeration Documentation

Enumerator
Initialization 
Triggered 
Scheduled 
TimeAdvanced 
Signaled 
Termination 
Invalid 

Constructor & Destructor Documentation

SimTK::Event::Cause::Cause ( )
inline
SimTK::Event::Cause::Cause ( Num  n)
inline

Member Function Documentation

SimTK::Event::Cause::operator Num ( ) const
inline
Cause& SimTK::Event::Cause::operator= ( Num  n)
inline
bool SimTK::Event::Cause::isValid ( ) const
inline

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