-
Notifications
You must be signed in to change notification settings - Fork 145
machina.utils.getDefaultClientMeta
Jim Cowart edited this page Feb 2, 2015
·
1 revision
description: used internally to provide default values for machina.Fsm instances and also for clients of machina.BehavioralFsm instances.
returns: an object containing the following properties:
-
inputQueue- an array which is used to hold deferred input (populated whendeferUntilTransitionis called). -
targetReplayState- Used while processing theinputQueue. It holds the string state name of the state whichinputQueueitems should be replayed in. -
state- The string value of the current state of the FSM. -
priorState- The string value of the previous state of the FSM. -
priorAction- The name of the input which was last handled. -
currentAction- The name of the input which is currently being handled. -
currentActionArgs- The args provided to the current input being handled. -
inExitHandler- Boolean which is set to true if the FSM is in the process of transitioning and is currently executing an_onExithandler.
Overriding getDefaultClientMeta is not recommended, as you will likely break machina's core behavior. However, extending it with additional properties you need on each FSM should be fine as long as the above values are left intact.