StateModel SM /* The State model. */ { SMid StateModelId c8 1 /* the primary key */ Abbrev AbbreviatedName c4 0 /* the short version of the name */ Name StateModelName t80 0 /* it's name */ } ActiveClass AC /* The Active Class. */ { ACid ActiveClassId c8 1 /* the primary key */ SMid ActiveClassesStateModel c8 1 /* the state model for this class */ Name ActiveClassName t80 0 /* the name of the Active Class */ } /* */ /* The States themselves */ /* */ /* The state has an C pointer to an action routine. As long as the */ /* image for the simulator doesn't change, the function pointer can */ /* be stored in the schema database. However, any relink will invalidate */ /* these pointers requiring that they be reloaded. */ /* */ State ST /* states */ { STid StateId c8 1 /* the primary key */ SMid StateAStateOfThisStateMachine c8 1 /* The state machine */ /* containing the state */ ActName StatesActionRoutineName t32 0 /* Action Routine Name */ ActFunc StatesActionRoutinePointer i4 0 /* C pointer to function */ Name StatesName t80 0 /* The name of the state */ } /* */ /* The Active Instance. A member of an Active Classs */ /* */ ActiveInstance AI /* Active Instance */ { AIid ActiveInstanceId c8 1 /* the primary key */ ACid ActiveInstanceInThisClass c8 1 /* the active class of which */ /* we are a member */ State ActiveInstancesCurrentState t80 0 /* key of current state */ Name ActiveInstanceName t80 0 /* probably boring like Pump1 */ /* useful for debugging */ } Transition TR /* Transition */ { TRid TransitionId c8 1 /* The primary key */ STid1 TransitionFromThisState c8 1 /* Transition from this state */ STid2 TransitionToThisState c8 1 /* Transition to this state */ } EventType ET /* EventType */ { ETid EventTypeId c8 1 /* the primary key */ SMid EventTypesReceiver c8 1 /* the state machine which */ /* receives this event */ Label EventTypesLabel t8 0 /* the label for the event */ Descrip EventTypesDescription t80 0 /* a fuller description */ } Enable EN /* Enable */ { ENid EnableId c8 1 /* The primary key */ ETid EnableWithThisEventType c8 1 /* Event type enabling transition */ TRid EnableThisTransition c8 1 /* The transition enabled */ } EventInstance EI /* An EventInstance */ { EIid EventInstanceId c8 1 /* the primary key */ AIid1 EventInstanceGenerater c8 1 /* the active instance which */ /* generated this event */ AIid2 EventInstanceReceiver c8 1 /* the active instance which */ /* will receive this event */ ETid EventInstancesType c8 1 /* the type of this event */ Int1 EventInstanceDataInt1 i4 0 /* the first piece of int data */ Int2 EventInstanceDataInt2 i4 0 /* the second piece of int data */ Flt1 EventInstanceDataDbl1 f8 0 /* the first piece of float data */ Flt2 EventInstanceDataDbl2 f8 0 /* the second piece of float data */ Text EventInstanceDataText t80 0 /* textual data */ } ToggleFlipFlop TF /* A two-state machine with one event type */ { TFid fflop_id c8 1 /* pkey for flipflop */ AIid ai c8 1 /* FlipFlop active instance */ AIid1_source ai1 c8 1 /* source of events to this AI */ AIid2_reply ai2 c8 1 /* where to send reply events */ replyETLabel e1 c8 0 /* name of reply event type */ bitPosition bitPosition i4 0 /* Most-signif. bit=3, lssbit=1 */ } /*********************************************************************/ /* Timer Table revised by Cheng-Lu Yeng 5/17/94 */ /*********************************************************************/ Timer TI /* Timer */ { TIid timer_id c8 1 /* pkey for timer */ AIid1 activeinstance1 c8 1 /* Timer active instance */ AIid2 activeinstance2 c8 1 /* from this active instance */ AIid3 activeinstance3 c8 1 /* fire to this active instance */ ETid eventtype1 c8 1 /* send this reply event type */ ttg timetogo i4 0 /* time to go */ } /*********************************************************************/ /* Periodic Clock Table */ /*********************************************************************/ PeriodicClock CK /* Periodic Clock */ { CKid periodicclock_id c8 1 /* pkey for Periodic Clock */ AIid1 activeinstance1 c8 1 /* Clock active instance */ AIid2 activeinstance2 c8 1 /* from this active instance */ AIid3 activeinstance3 c8 1 /* fire to this active instance */ ETid eventtype1 c8 1 /* send this reply event type */ period period i4 0 /* period of Clock events */ }