You are on page 1of 1

RunLowerSM

switch Current State


case W2START
CurrentEvent=DuringW2Start
If Current Event is ES_START, make Next State to Unloading, post ES_START to all services, perform Exit
function for current state and entry function for next state
If Current Event is ES_GAMEOVER, make Next State to GAMEOVER, perform Exit function for current state and
entry function for next state

case Unloading
CurrentEvent=DuringUnloading
If Current Event is ES_TIMEOUT, make Next State to UnloadingTrash, perform Exit function for current state and
entry function for next state
If Current Event is ES_GAMEOVER, make Next State to GAMEOVER, perform Exit function for current state and
entry function for next state

case UnloadingTrash
CurrentEvent=DuringUnloadingTrash
If Current Event is ES_CLOSE, make Next State to Unloading, perform Exit function for current state and
entry function for next state
If Current Event is ES_GAMEOVER, make Next State to GAMEOVER, perform Exit function for current state and
entry function for next state

case GameOver
CurrentEvent=DuringGameOver

Trigger a Response timer for triggering Events in each service.

StartLowerSM
CurrentState to be made as W2Start if its not an Entry with History
RunLowerSMto be run with CurrentEvent

DuringW2Start
-------

DuringUnloading
As Entry action, Run StartUnloadSM
Else, Return Event=RunUnloadingSM

DuringUnloadingTrash
As Entry action, Run StartUnloadTrashSM and post the location of bot as Near or Far to service.
Else, Return Event=RunUnloadingSM

DuringGameOver
PostAll ES_GAMEOVER as an Entry action.

You might also like