Click or drag to resize

Demo3D.EventQueue Namespace

The Demo3D.EventQueue namespace contains functionality for scheduling asynchronous or future actions and coroutines.
Classes
  ClassDescription
Public classDispatcher
A class for manging asynchronous/future actions/coroutines in simulation time.
Public classEvent
EventQueue storage for an event action, sortable on time.
Public classFixedMath
Math class methods for Fixed values.
Public classModelTimeMath
Mathematical methods for ModelTime.
Public classRealTimeMath
Mathematical methods for RealTime.
Public classRealTimeStopwatch
A stopwatch.
Public classCode exampleResult
Container for values returned from Wait methods.
Structures
  StructureDescription
Public structureCancelableEvent
Allow event to be canceled by assigning a new event to Value or null.
Public structureFixed
A fixed floating point number with 7 decimal places. Using this instead of floats or double ensures deterministic event dispatching.
Public structureModelTime
Represents Model Time. Implemented internally as Fixed, ie in 100ns steps.
Public structureRealTime
Represents Real (Wall-Clock) Time. Implemented internally as ticks from QueryPerformanceCounter(Int64).
Interfaces
  InterfaceDescription
Public interfaceIChannelT
A channel is a communication pipe with fixed capacity. Attempts to read from an empty channel will block, as will attempting to write to a full channel.
Public interfaceIContinuable
Public interfaceITask
ITask represents an internal task. This is often a suspended C# coroutine (IEnumerable method) which is waiting for a particular time or event. It can also be a task waiting for IO or a .NET Task to complete. Once complete the ITask will be resumed automatically. Instances of ITask objects should not be created in scripting but it's useful to understand what the ITask represents when seen in the context of another method call.
Public interfaceITaskActions
Implement this interface when the class handles both OnCompleted and OnCancelled together. Use this in preference to wiring up new actions for OnCompleted and OnCanelled.
Public interfaceITaskCreator
This object can be waited on and returns an ITask if needed.
Public interfaceITaskNotifier
If an ITask is an ITaskNotifier then OnCompletedOrCancelled can be used in place of OnCompleted and OnCancelled. This stores a pointer to an interface of type ITaskActions instead of creating two actions for OnCompleted and OnCancelled.
Enumerations
  EnumerationDescription
Public enumerationDispatcherPriority
Explicit priorities for the execution of actions at a point in time.
Remarks
All classes and methods documented here are intended for use in user scripting.