Guest User

Untitled

a guest
Jan 21st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. // LOCKED
  2. commandFlowMap
  3. .map.asCommandClass( EngageLockCmd )
  4. .toState( StateNames.LOCKED )
  5. .duringEnteredPhase();
  6.  
  7. commandFlowMap
  8. .map.asCommandClass( DisengageLockCmd )
  9. .toState( StateNames.LOCKED )
  10. .duringTearDownPhase();
  11.  
  12. commandFlowMap
  13. .map.asCommandClass( HandleIncorrectKeyMacroCmd )
  14. .toState( StateNames.LOCKED )
  15. .duringCancelledPhase();
  16.  
  17. // CLOSED
  18. commandFlowMap
  19. .map.asCommandClass( PushDoorToCmd )
  20. .withGuards( OnlyIfDoorAjar )
  21. .toState( StateNames.CLOSED )
  22. .duringEnteredPhase();
  23.  
  24. // OPENED
  25. commandFlowMap
  26. .map.asCommandClass( PullDoorAjarCmd )
  27. .withGuards( OnlyIfDoorPulledTo )
  28. .toState( StateNames.OPENED )
  29. .duringEnteredPhase();
  30.  
  31. // LATCHED
  32. commandFlowMap
  33. .map.asCommandClass( EngageLatchCmd )
  34. .toState( StateNames.LATCHED )
  35. .duringEnteredPhase();
  36.  
  37. commandFlowMap
  38. .map.asCommandClass( DisengageLatchCmd )
  39. .toState( StateNames.LATCHED )
  40. .duringTearDownPhase();
Add Comment
Please, Sign In to add comment