Interface Guard

All Known Implementing Classes:
Guard.Base

public interface Guard
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(FSM fsm, Input in)
    Called by the state engine to determine whether a transition is enabled, deferred, or disabled.
  • Method Details

    • evaluate

      Guard.Result evaluate(FSM fsm, Input in)
      Called by the state engine to determine whether a transition is enabled, deferred, or disabled. The result is interpreted as follows:
      • ENABLED if the transition is ready to proceed
      • DISABLED if the transition is not ready to proceed
      • DEFERED if the action associated with the transition is to be deferred. This means that the input will not be acted upon, but rather it will be saved for later execution. Typically this is implemented using a CondVar wait, and the blocked thread represents the deferred input. The deferred input is retried when the thread runs again.
      Parameters:
      fsm - is the state machine causing this action.
      in - is the input that caused the transition.