rad  3.0.0
Public Member Functions | Public Attributes | List of all members
scxml4py.executor.Executor Class Reference
Inheritance diagram for scxml4py.executor.Executor:

Public Member Functions

def __init__ (self, theStateMachine, theContext, externalEventQueue=None, internalEventQueue=None)
 
def getStatus (self)
 
def getModel (self)
 
def getContext (self)
 
def getEventHandlingPolicy (self)
 
def isRunning (self)
 
def isFinal (self)
 
def isEventProcessable (self, e)
 
def start (self)
 
def stop (self)
 
def postEvent (self, theEvent)
 
def processEvent (self, theEvent)
 
def processEvents (self)
 
def processInternalEvents (self)
 
def exitInterpreter (self)
 
def selectEventlessTransitions (self)
 
def selectTransitions (self, e)
 
def microstep (self, enabledTransitions)
 
def exitStates (self, enabledTransitions)
 Create an empty statesToExit set. More...
 
def executeTransitionContent (self, enabledTransitions)
 
def enterStates (self, enabledTransitions)
 
def addStatesToEnter (self, s, root, statesToEnter, statesForDefaultEntry)
 
def setModel (self, theStateMachine)
 
def setContext (self, theContext)
 
def setEventHandlingPolicy (self, policy)
 
def addEventListener (self, eventListener)
 
def removeEventListener (self, eventListener)
 
def removeAllEventListener (self)
 
def notifyEventListeners (self, theEvent)
 
def addStatusListener (self, statusListener)
 
def removeStatusListener (self, statusListener)
 
def removeAllStatusListener (self)
 
def notifyStatusListeners (self, theStatus)
 
def __init__ (self, theStateMachine, theContext, externalEventQueue=None, internalEventQueue=None)
 
def getStatus (self)
 
def getModel (self)
 
def getContext (self)
 
def getEventHandlingPolicy (self)
 
def isRunning (self)
 
def isFinal (self)
 
def isEventProcessable (self, e)
 
def start (self)
 
def stop (self)
 
def postEvent (self, theEvent)
 
def processEvent (self, theEvent)
 
def processEvents (self)
 
def processInternalEvents (self)
 
def exitInterpreter (self)
 
def selectEventlessTransitions (self)
 
def selectTransitions (self, e)
 
def microstep (self, enabledTransitions)
 
def exitStates (self, enabledTransitions)
 Create an empty statesToExit set. More...
 
def executeTransitionContent (self, enabledTransitions)
 
def enterStates (self, enabledTransitions)
 
def addStatesToEnter (self, s, root, statesToEnter, statesForDefaultEntry)
 
def setModel (self, theStateMachine)
 
def setContext (self, theContext)
 
def setEventHandlingPolicy (self, policy)
 
def addEventListener (self, eventListener)
 
def removeEventListener (self, eventListener)
 
def removeAllEventListener (self)
 
def notifyEventListeners (self, theEvent)
 
def addStatusListener (self, statusListener)
 
def removeStatusListener (self, statusListener)
 
def removeAllStatusListener (self)
 
def notifyStatusListeners (self, theStatus)
 

Public Attributes

 mStateMachine
 
 mContext
 
 mEventHandlingPolicy
 
 mEventListeners
 
 mStatusListeners
 
 mCurrentStatus
 
 mPreviousStatus
 
 mStatesToInvoke
 
 mInternalEvents
 
 mExternalEvents
 
 mContinue
 
 mFinal
 

Constructor & Destructor Documentation

◆ __init__() [1/2]

def scxml4py.executor.Executor.__init__ (   self,
  theStateMachine,
  theContext,
  externalEventQueue = None,
  internalEventQueue = None 
)

◆ __init__() [2/2]

def scxml4py.executor.Executor.__init__ (   self,
  theStateMachine,
  theContext,
  externalEventQueue = None,
  internalEventQueue = None 
)

Member Function Documentation

◆ addEventListener() [1/2]

def scxml4py.executor.Executor.addEventListener (   self,
  eventListener 
)

◆ addEventListener() [2/2]

def scxml4py.executor.Executor.addEventListener (   self,
  eventListener 
)

◆ addStatesToEnter() [1/2]

def scxml4py.executor.Executor.addStatesToEnter (   self,
  s,
  root,
  statesToEnter,
  statesForDefaultEntry 
)

◆ addStatesToEnter() [2/2]

def scxml4py.executor.Executor.addStatesToEnter (   self,
  s,
  root,
  statesToEnter,
  statesForDefaultEntry 
)

◆ addStatusListener() [1/2]

def scxml4py.executor.Executor.addStatusListener (   self,
  statusListener 
)

◆ addStatusListener() [2/2]

def scxml4py.executor.Executor.addStatusListener (   self,
  statusListener 
)

◆ enterStates() [1/2]

def scxml4py.executor.Executor.enterStates (   self,
  enabledTransitions 
)

◆ enterStates() [2/2]

def scxml4py.executor.Executor.enterStates (   self,
  enabledTransitions 
)

◆ executeTransitionContent() [1/2]

def scxml4py.executor.Executor.executeTransitionContent (   self,
  enabledTransitions 
)

◆ executeTransitionContent() [2/2]

def scxml4py.executor.Executor.executeTransitionContent (   self,
  enabledTransitions 
)

◆ exitInterpreter() [1/2]

def scxml4py.executor.Executor.exitInterpreter (   self)

◆ exitInterpreter() [2/2]

def scxml4py.executor.Executor.exitInterpreter (   self)

◆ exitStates() [1/2]

def scxml4py.executor.Executor.exitStates (   self,
  enabledTransitions 
)

Create an empty statesToExit set.

   For each transition t in enabledTransitions, if t is targetLess then do nothing,
   else let LCA be the least common ancestor state of the source state and target states of t.
   Add to the statesToExit set all states in the configuration that are descendants of LCA.
   Convert the statesToExit set to a list and sort it in exitOrder.

   For each state s in the list, if s has a deep history state h, set the history value
   of h to be the list of all atomic descendants of s that are members in the current
   configuration, else set its value to be the list of all immediate children of s that
   are members of the current configuration.

   Again for each state s in the list, first execute any onExit handlers, then cancel any
   ongoing invocations, and finally remove s from the current configuration.

   procedure exitStates(enabledTransitions):
       statesToExit = new Set()
       for t in enabledTransitions:
          if (t.attribute('target') != null):
             LCA = findLCA([t.parent()].append(getTargetStates(t)))
             for s in configuration.toList():
                if (isDescendant(s,LCA)):
                   statesToExit.add(s)
       statesToExit = statesToExit.toList().sort(exitOrder)
       for s in statesToExit:
          for h in s.history:
             f = (h.attribute('type') == "deep") ?

lambda isAtomicState(s0) && isDescendant(s0,s) : lambda s0.parent() == s historyValue[h.attribute('id')] = configuration.toList().filter(f) for s in statesToExit: for content in s.onexit: executeContent(content) for inv in s.invoke: cancelInvoke(inv) configuration.delete(s)

◆ exitStates() [2/2]

def scxml4py.executor.Executor.exitStates (   self,
  enabledTransitions 
)

Create an empty statesToExit set.

   For each transition t in enabledTransitions, if t is targetLess then do nothing,
   else let LCA be the least common ancestor state of the source state and target states of t.
   Add to the statesToExit set all states in the configuration that are descendants of LCA.
   Convert the statesToExit set to a list and sort it in exitOrder.

   For each state s in the list, if s has a deep history state h, set the history value
   of h to be the list of all atomic descendants of s that are members in the current
   configuration, else set its value to be the list of all immediate children of s that
   are members of the current configuration.

   Again for each state s in the list, first execute any onExit handlers, then cancel any
   ongoing invocations, and finally remove s from the current configuration.

   procedure exitStates(enabledTransitions):
       statesToExit = new Set()
       for t in enabledTransitions:
          if (t.attribute('target') != null):
             LCA = findLCA([t.parent()].append(getTargetStates(t)))
             for s in configuration.toList():
                if (isDescendant(s,LCA)):
                   statesToExit.add(s)
       statesToExit = statesToExit.toList().sort(exitOrder)
       for s in statesToExit:
          for h in s.history:
             f = (h.attribute('type') == "deep") ?

lambda isAtomicState(s0) && isDescendant(s0,s) : lambda s0.parent() == s historyValue[h.attribute('id')] = configuration.toList().filter(f) for s in statesToExit: for content in s.onexit: executeContent(content) for inv in s.invoke: cancelInvoke(inv) configuration.delete(s)

◆ getContext() [1/2]

def scxml4py.executor.Executor.getContext (   self)

◆ getContext() [2/2]

def scxml4py.executor.Executor.getContext (   self)

◆ getEventHandlingPolicy() [1/2]

def scxml4py.executor.Executor.getEventHandlingPolicy (   self)

◆ getEventHandlingPolicy() [2/2]

def scxml4py.executor.Executor.getEventHandlingPolicy (   self)

◆ getModel() [1/2]

def scxml4py.executor.Executor.getModel (   self)

◆ getModel() [2/2]

def scxml4py.executor.Executor.getModel (   self)

◆ getStatus() [1/2]

def scxml4py.executor.Executor.getStatus (   self)

◆ getStatus() [2/2]

def scxml4py.executor.Executor.getStatus (   self)

◆ isEventProcessable() [1/2]

def scxml4py.executor.Executor.isEventProcessable (   self,
  e 
)

◆ isEventProcessable() [2/2]

def scxml4py.executor.Executor.isEventProcessable (   self,
  e 
)

◆ isFinal() [1/2]

def scxml4py.executor.Executor.isFinal (   self)

◆ isFinal() [2/2]

def scxml4py.executor.Executor.isFinal (   self)

◆ isRunning() [1/2]

def scxml4py.executor.Executor.isRunning (   self)

◆ isRunning() [2/2]

def scxml4py.executor.Executor.isRunning (   self)

◆ microstep() [1/2]

def scxml4py.executor.Executor.microstep (   self,
  enabledTransitions 
)

◆ microstep() [2/2]

def scxml4py.executor.Executor.microstep (   self,
  enabledTransitions 
)

◆ notifyEventListeners() [1/2]

def scxml4py.executor.Executor.notifyEventListeners (   self,
  theEvent 
)

◆ notifyEventListeners() [2/2]

def scxml4py.executor.Executor.notifyEventListeners (   self,
  theEvent 
)

◆ notifyStatusListeners() [1/2]

def scxml4py.executor.Executor.notifyStatusListeners (   self,
  theStatus 
)

◆ notifyStatusListeners() [2/2]

def scxml4py.executor.Executor.notifyStatusListeners (   self,
  theStatus 
)

◆ postEvent() [1/2]

def scxml4py.executor.Executor.postEvent (   self,
  theEvent 
)

◆ postEvent() [2/2]

def scxml4py.executor.Executor.postEvent (   self,
  theEvent 
)

◆ processEvent() [1/2]

def scxml4py.executor.Executor.processEvent (   self,
  theEvent 
)

◆ processEvent() [2/2]

def scxml4py.executor.Executor.processEvent (   self,
  theEvent 
)

◆ processEvents() [1/2]

def scxml4py.executor.Executor.processEvents (   self)

◆ processEvents() [2/2]

def scxml4py.executor.Executor.processEvents (   self)

◆ processInternalEvents() [1/2]

def scxml4py.executor.Executor.processInternalEvents (   self)

◆ processInternalEvents() [2/2]

def scxml4py.executor.Executor.processInternalEvents (   self)

◆ removeAllEventListener() [1/2]

def scxml4py.executor.Executor.removeAllEventListener (   self)

◆ removeAllEventListener() [2/2]

def scxml4py.executor.Executor.removeAllEventListener (   self)

◆ removeAllStatusListener() [1/2]

def scxml4py.executor.Executor.removeAllStatusListener (   self)

◆ removeAllStatusListener() [2/2]

def scxml4py.executor.Executor.removeAllStatusListener (   self)

◆ removeEventListener() [1/2]

def scxml4py.executor.Executor.removeEventListener (   self,
  eventListener 
)

◆ removeEventListener() [2/2]

def scxml4py.executor.Executor.removeEventListener (   self,
  eventListener 
)

◆ removeStatusListener() [1/2]

def scxml4py.executor.Executor.removeStatusListener (   self,
  statusListener 
)

◆ removeStatusListener() [2/2]

def scxml4py.executor.Executor.removeStatusListener (   self,
  statusListener 
)

◆ selectEventlessTransitions() [1/2]

def scxml4py.executor.Executor.selectEventlessTransitions (   self)

◆ selectEventlessTransitions() [2/2]

def scxml4py.executor.Executor.selectEventlessTransitions (   self)

◆ selectTransitions() [1/2]

def scxml4py.executor.Executor.selectTransitions (   self,
  e 
)

◆ selectTransitions() [2/2]

def scxml4py.executor.Executor.selectTransitions (   self,
  e 
)

◆ setContext() [1/2]

def scxml4py.executor.Executor.setContext (   self,
  theContext 
)

◆ setContext() [2/2]

def scxml4py.executor.Executor.setContext (   self,
  theContext 
)

◆ setEventHandlingPolicy() [1/2]

def scxml4py.executor.Executor.setEventHandlingPolicy (   self,
  policy 
)

◆ setEventHandlingPolicy() [2/2]

def scxml4py.executor.Executor.setEventHandlingPolicy (   self,
  policy 
)

◆ setModel() [1/2]

def scxml4py.executor.Executor.setModel (   self,
  theStateMachine 
)

◆ setModel() [2/2]

def scxml4py.executor.Executor.setModel (   self,
  theStateMachine 
)

◆ start() [1/2]

def scxml4py.executor.Executor.start (   self)

◆ start() [2/2]

def scxml4py.executor.Executor.start (   self)

◆ stop() [1/2]

def scxml4py.executor.Executor.stop (   self)

◆ stop() [2/2]

def scxml4py.executor.Executor.stop (   self)

Member Data Documentation

◆ mContext

scxml4py.executor.Executor.mContext

◆ mContinue

scxml4py.executor.Executor.mContinue

◆ mCurrentStatus

scxml4py.executor.Executor.mCurrentStatus

◆ mEventHandlingPolicy

scxml4py.executor.Executor.mEventHandlingPolicy

◆ mEventListeners

scxml4py.executor.Executor.mEventListeners

◆ mExternalEvents

scxml4py.executor.Executor.mExternalEvents

◆ mFinal

scxml4py.executor.Executor.mFinal

◆ mInternalEvents

scxml4py.executor.Executor.mInternalEvents

◆ mPreviousStatus

scxml4py.executor.Executor.mPreviousStatus

◆ mStateMachine

scxml4py.executor.Executor.mStateMachine

◆ mStatesToInvoke

scxml4py.executor.Executor.mStatesToInvoke

◆ mStatusListeners

scxml4py.executor.Executor.mStatusListeners

The documentation for this class was generated from the following file: