North State Framework in C#
V3.0.0
An object-oriented framework for implementing UML state machines.
|
Represents an event which can trigger a transition or be handled by an event handler. More...
Public Member Functions | |
NSFEvent (NSFString name, INSFEventHandler parent) | |
Creates an event. More... | |
NSFEvent (NSFString name, INSFNamedObject source, INSFEventHandler destination) | |
Creates an event. More... | |
NSFEvent (NSFEvent nsfEvent) | |
Creates an event. More... | |
virtual NSFEvent | copy () |
Creates a deep copy. More... | |
NSFEvent | copy (NSFString name) |
Creates a deep copy. More... | |
NSFEvent | copy (INSFNamedObject source, INSFEventHandler destination) |
Creates a deep copy, replacing the specified parameters. More... | |
NSFEvent | copy (NSFString name, INSFNamedObject source, INSFEventHandler destination) |
Creates a deep copy, replacing the specified parameters. More... | |
void | queueEvent () |
Queues the event to its destination. More... | |
void | queueEvent (NSFStateMachineContext context) |
Queues the event to its destination. More... | |
void | schedule (INSFNamedObject source, INSFEventHandler destination, NSFTime delayTime, NSFTime repeatTime) |
Schedules the event to execute. More... | |
void | setRouting (INSFNamedObject source, INSFEventHandler destination) |
Sets the source and destination of the event. More... | |
Public Member Functions inherited from NSFTimerAction | |
bool | isScheduled () |
Checks if the action is already scheduled. More... | |
void | schedule () |
Schedules the action to execute at the previously designated delay and repeat times. More... | |
void | schedule (NSFTime delayTime) |
Schedules the action to execute after the specified delay time with zero repeat time. More... | |
void | schedule (NSFTime delayTime, NSFTime repeatTime) |
Schedules the action to execute at the specified times. More... | |
void | scheduleAbsoluteExecution () |
Schedules the action to execute at its designated execution time. More... | |
void | scheduleAbsoluteExecution (NSFTime executionTime) |
Schedules the action to execute at the specified execution time. More... | |
void | scheduleAbsoluteExecution (NSFTime executionTime, NSFTime repeatTime) |
Schedules the action to execute at the specified execution time. More... | |
void | unschedule () |
Unschedules the action. More... | |
Properties | |
INSFEventHandler | Destination [get, set] |
Gets or sets the event destination. More... | |
NSFId | Id [get, set] |
Gets or sets the event id. More... | |
INSFNamedObject | Source [get, set] |
Gets or sets the event source. More... | |
Properties inherited from NSFTimerAction | |
NSFTime | DelayTime [get, set] |
Gets or sets the delay time of the action. More... | |
NSFTime | ExecutionTime [get, set] |
Gets or sets the execution time of the action. More... | |
NSFString | Name [get, set] |
Gets or sets the name of the action. More... | |
NSFTime | RepeatTime [get, set] |
Gets or sets the repeat time for periodic actions, 0 if non-periodic. More... | |
Properties inherited from INSFNamedObject | |
NSFString | Name [get] |
Gets the name of the object. More... | |
Properties inherited from INSFIdObject | |
NSFId | Id [get] |
Gets or sets the id number of the object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from NSFTimerAction | |
NSFTimerAction (NSFString name) | |
Creates a timer action. More... | |
Represents an event which can trigger a transition or be handled by an event handler.
NSFEvent | ( | NSFString | name, |
INSFEventHandler | parent | ||
) |
Creates an event.
name | The name of the event. |
parent | The parent of the event. |
The event source and destination will be set to the parent.
NSFEvent | ( | NSFString | name, |
INSFNamedObject | source, | ||
INSFEventHandler | destination | ||
) |
Creates an event.
name | The name of the event. |
source | The source of the event. |
destination | The destination of the event. |
|
virtual |
Creates a deep copy.
A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.
Reimplemented in NSFDataEvent< DataType >.
Creates a deep copy.
name | The new name for the copy. |
A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.
NSFEvent copy | ( | INSFNamedObject | source, |
INSFEventHandler | destination | ||
) |
Creates a deep copy, replacing the specified parameters.
source | The new source for the copy. |
destination | The new destination for the copy. |
A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.
NSFEvent copy | ( | NSFString | name, |
INSFNamedObject | source, | ||
INSFEventHandler | destination | ||
) |
Creates a deep copy, replacing the specified parameters.
name | The new name for the copy. |
source | The new source for the copy. |
destination | The new destination for the copy. |
A common design pattern is to queue data event copies, each with its own unique data payload, to state machines for handling.
void queueEvent | ( | ) |
Queues the event to its destination.
void queueEvent | ( | NSFStateMachineContext | context | ) |
Queues the event to its destination.
This method is provided to allow event queuing to be registered as an entry, exit, or transition action. The event source will be changed to the context source for logging purposes during execution of this method. This method is not thread safe from a logging perspective, so that two threads calling this method on the same event can result in indeterminate logging of the source.
void schedule | ( | INSFNamedObject | source, |
INSFEventHandler | destination, | ||
NSFTime | delayTime, | ||
NSFTime | repeatTime | ||
) |
Schedules the event to execute.
source | Source of the event. |
destination | Destination of the event. |
delayTime | Delay time before executing the event. |
repeatTime | Repeat time, if desired. Zero if one-shot. |
void setRouting | ( | INSFNamedObject | source, |
INSFEventHandler | destination | ||
) |
Sets the source and destination of the event.
source | Source of the event. |
destination | Destination of the event. |
|
getset |
Gets or sets the event destination.
|
getset |
Gets or sets the event id.
Transitions use the event id to match the trigger event. In other words, mulitple event objects with the same id can trigger a transition. Use the copy() method to create a new event object with the same id as an existing object.
|
getset |
Gets or sets the event source.