new mmir.env.statemachine.engine.exec()
Factory for creating the state-machine's raise() function.
Creates implementation for the state-engine's
{
name: STRING // engine name / description
doc: STRING // the URL to the SCXML document that holds the engine's definition
evalScript: BOOLEAN // true
onraise: FUNCTION // default impl. for onraise: print debug output (depending on logging-level for DialogEngine / InputEngine)
onload: FUNCTION // default impl. handling initialization of state-engine after SCXML definition was loaded
raise: FUNCTION // default impl. for raise-function: use execution-queue for allowing raise-invocations from within SCXML scripts
}
Requires
- module:cordova.plugins.queuePlugin:
Members
-
_browserFactory
-
Factory for WebWorker-based implementation of raise function. Provide creator-functions:
createWorker(_engineInstance, genFunc) : WebWorkercreateRaise(_engineInstance) : Function -
_queuePluginFactory
-
Factory for CordovaPlugin-based implementation of raise function. Provide creator-functions:
createWorker(_engineInstance, genFunc) : WebWorkercreateRaise(_engineInstance) : Function -
_stubFactory
-
Factory for stub/dummy implementation of raise function. Provide creator-functions:
createWorker(_engineInstance, genFunc) : WebWorkercreateRaise(_engineInstance) : Function -
nolog
-
dummy logger that does nothing: the engine-creator should replace this with a "real" implementation e.g. something like this (see also init() in dialogManager): engine = require('mmirf/engineConfig')('some-url', 'some-mode'); engine._log = require('mmirf/logger').create('my-module-id');
Methods
-
_baseFactory(_engine, envFactory)
-
Factory for base / default implementation for state-engine, returns
{ name: STRING // engine name / description doc: STRING // the URL to the SCXML document that holds the engine's definition evalScript: BOOLEAN // true onraise: FUNCTION // default impl. for onraise: print debug output (depending on logging-level for DialogEngine / InputEngine) onload: FUNCTION // default impl. handling initialization of state-engine after SCXML definition was loaded raise: FUNCTION // raise-function created by envFactory(_instance) }Name Type Description _engineEngine the instance of the SCION state-machine envFactoryExecFactory the factory for creating the Worker/Thread and the raise() function Returns:
implementation with raise-function
-
always-false function for dummy logger
-
getScionEnvFactory()
-
Get factory for raise-impl. depending on the runtime environment. Currently there are 3 impl. available * WebWorker * Android QueuePlugin * STUB IMPLEMENTATION
-
no-op function for dummy logger
-
print-error function for dummy logger
-
printDebugStates(ctx)
-
HELPER logging for state-changes
Name Type Description ctxEngine the context for the state-machine, i.e. the DialogEngine or InputEngine instance