|
| NSFStateMachine (NSFString name, NSFEventThread thread) |
| Creates a state machine More...
|
|
| NSFStateMachine (NSFString name, NSFRegion parentRegion) |
| Creates a state machine. More...
|
|
| NSFStateMachine (NSFString name, NSFCompositeState parentState) |
| Creates a state machine. More...
|
|
bool | Never (NSFStateMachineContext context) |
| Provides a syntactical method for specifying "Never" as a transition guard, effectively blocking the transition from ever occuring. More...
|
|
void | forceStateMachineEvaluation () |
| Forces the state machine to evaluate transitions. More...
|
|
NSFEventStatus | handleEvent (NSFEvent nsfEvent) |
| Handles an event. More...
|
|
void | queueEvent (NSFEvent nsfEvent) |
| Queues an event for the handler. More...
|
|
void | queueEvent (NSFEvent nsfEvent, INSFNamedObject source) |
| Queues an event for the handler. More...
|
|
void | resetStateMachine () |
| Resets the state machine back to its initial default state. More...
|
|
void | startEventHandler () |
| Starts event processing. More...
|
|
void | stopEventHandler () |
| Stops event processing. More...
|
|
void | startStateMachine () |
|
void | stopStateMachine () |
|
void | terminate (bool waitForTerminated) |
| Terminates the event handler, so that it can be garbage collected. More...
|
|
| NSFCompositeState (NSFString name, NSFRegion parentRegion, NSFVoidAction< NSFStateMachineContext > entryAction, NSFVoidAction< NSFStateMachineContext > exitAction) |
| Creates a composite state. More...
|
|
| NSFCompositeState (NSFString name, NSFCompositeState parentState, NSFVoidAction< NSFStateMachineContext > entryAction, NSFVoidAction< NSFStateMachineContext > exitAction) |
| Creates a composite state. More...
|
|
override bool | isInState (NSFState state) |
| Indicates if the specified state is active, i.e. is "in" the specified state. More...
|
|
override bool | isInState (NSFString stateName) |
| Indicates if the specified state is active, i.e. is "in" the specified state. More...
|
|
| NSFState (NSFString name, NSFRegion parentRegion, NSFVoidAction< NSFStateMachineContext > entryAction, NSFVoidAction< NSFStateMachineContext > exitAction) |
| Creates a state. More...
|
|
| NSFState (NSFString name, NSFCompositeState parentState, NSFVoidAction< NSFStateMachineContext > entryAction, NSFVoidAction< NSFStateMachineContext > exitAction) |
| Creates a state. More...
|
|
bool | isActive () |
| Indicates if the state is currently active. More...
|
|
| NSFTaggedObject (NSFString name) |
| Creates an object with a unique id and a name. More...
|
|
| NSFUniquelyNumberedObject () |
| Creates a uniquely numbered object. More...
|
|
bool | isSameObject (NSFUniquelyNumberedObject other) |
| Checks if this object is the same as another object. More...
|
|
|
bool | ConsecutiveLoopDetectionEnabled [get, set] |
| Gets or sets the flag indicating if consecutive loop detection is enabled. More...
|
|
int | ConsecutiveLoopLimit [get, set] |
| Gets or sets the maximum number of transitions without a pause allowed by consecutive loop detection. More...
|
|
bool | EventLimitDetectionEnabled [get, set] |
| Gets or sets the flag indicating if event limit detection is enabled. More...
|
|
int | EventLimit [get, set] |
| Gets or sets the maximum number of transitions without a pause allowed by consecutive loop detection. More...
|
|
NSFBoolGuard
< NSFStateMachineContext > | Else [get] |
| Provides a syntactical method for specifying "Else" as a transition guard. More...
|
|
NSFEventThread | EventThread [get, set] |
| Gets or sets the state machine's event thread. More...
|
|
Int32 | QueuedEvents [get, set] |
| Gets or sets the number of events currently queued in state machine's event thread. More...
|
|
bool | LoggingEnabled [get, set] |
| Gets or sets the flag indicating if state machine event logging is enabled. More...
|
|
NSFEventHandlerRunStatus | RunStatus [get, set] |
|
NSFEventHandlerTerminationStatus | TerminationStatus [get, set] |
|
static uint | TerminationSleepTime [get, set] |
| Gets the amount of time (mS) the terminate method sleeps between checks for state machine termination. More...
|
|
static int | TerminationTimeout [get, set] |
| The amount of time the terminate method will wait for event processing to complete. More...
|
|
override NSFStateMachine | TopStateMachine [get] |
|
bool | LogEntry [get, set] |
| Gets or sets the flag indicating if trace logging is enabled or disabled for the state. More...
|
|
virtual NSFStateMachine | TopStateMachine [get] |
| Gets the top state machine encompassing the state. More...
|
|
NSFString | Name [get, set] |
|
NSFId | UniqueId [get] |
| Gets or sets the unique id of the object. More...
|
|
NSFString | Name [get] |
| Gets the name of the object. More...
|
|
Properties inherited from INSFEventHandler |
NSFEventHandlerRunStatus | RunStatus [get] |
| Gets the run status of the event handler. More...
|
|
NSFEventHandlerTerminationStatus | TerminationStatus [get] |
| Gets the termination status of the event handler. More...
|
|
Represents a state machine.
void resetStateMachine |
( |
| ) |
|
Resets the state machine back to its initial default state.
If the state machine is currently running (started), it will process all events currently in its queue before resetting and it will continue running after the reset. If the state machine is currently stopped, it will continue to be stopped after the reset. While a state machine is stopped, all events are dropped from its queue.
void terminate |
( |
bool |
waitForTerminated | ) |
|
Terminates the event handler, so that it can be garbage collected.
- Parameters
-
waitForTerminated | Flag indicating if the method should wait until the event handler is terminated (true), or if it should return immediately (false). |
This method terminates the event handler in a coordinated fashion, making sure all remaining events are cleared, so that it can be garbage collected. After calling this method, the event handler cannot be restarted. This method should only be called if the event handler should be garbage collected. If the waitForTerminated flag is set true, this method must not be called from the event handler's thread of execution.
Implements INSFEventHandler.
Actions to execute if consecutive loop limit is reached.
State machines have the ability to detect if they are ill-formed by way of consecutive loop detection. This mechanism looks for repeated transitions without a pause (as defined by the condition when there are no more events queued to the state machine, and the final run-to-completion step has occurred). If more than the specified number of transitions occur without a pause, the state machine will remove its queued events, call the consecutive loop limit actions, and stop after executing any events queued by the limit actions.
bool ConsecutiveLoopDetectionEnabled |
|
getset |
Gets or sets the flag indicating if consecutive loop detection is enabled.
State machines have the ability to detect if they are ill-formed by way of consecutive loop detection. This mechanism looks for repeated transitions without a pause (as defined by the condition when there are no more events queued to the state machine, and the final run-to-completion step has occurred). If more than the specified number of transitions occur without a pause, the state machine will remove its queued events, call the consecutive loop limit actions, and stop after executing any events queued by the actions.
Gets or sets the maximum number of transitions without a pause allowed by consecutive loop detection.
State machines have the ability to detect if they are ill-formed by way of consecutive loop detection. This mechanism looks for repeated transitions without a pause (as defined by the condition when there are no more events queued to the state machine, and the final run-to-completion step has occurred). If more than the specified number of transitions occur without a pause, the state machine will remove its queued events, call the consecutive loop limit actions, and stop after executing any events queued by the actions.
Gets or sets the maximum number of transitions without a pause allowed by consecutive loop detection.
State machines have the ability to detect if they are not processing messages in a timely fashion by way of event limit detection. This mechanism looks at the number of events in the state machine's event queue. If the more than the specified number of events are queued, the state machine will remove its queued events, call the event limit actions, and stop after executing any events queued by the limit actions.
bool EventLimitDetectionEnabled |
|
getset |
Gets or sets the flag indicating if event limit detection is enabled.
State machines have the ability to detect if they are not processing messages in a timely fashion by way of event limit detection. This mechanism looks at the number of events in the state machine's event queue. If the more than the specified number of events are queued, the state machine will remove its queued events, call the event limit actions, and stop after executing any events queued by the limit actions.