Interface OutputState

Defines a type of state that can produce as output events.

Type Param: E

The type of events the FSM processes.

interface OutputState {
    fsm: FSM;
    name: string;
    transitions: readonly Transition<Event>[];
    acceptVisitor(visitor): void;
    addTransition(tr): void;
    checkStartingState(): void;
    exit(): void;
    process(event): boolean;
    uninstall(): void;
}

Hierarchy

Implemented by

Properties

fsm: FSM

The FSM that contains the state.

name: string

The name of the state.

transitions: readonly Transition<Event>[]

The list of outgoing transitions of the state.

Methods

  • Adds the given transitions to the list of outgoing transitions of the state.

    Parameters

    Returns void

  • Checks whether the starting state of the fsm is this state. In this case, the fsm is notified about the starting of the FSM.

    Returns void

    Throws

    CancelFSMException

  • Actions done when a transition of the state is executed so that this state is left.

    Returns void

    Throws

    CancelFSMException If leaving the state leads to a cancelling of the FSM execution.

  • Asks to the state to process of the given event.

    Parameters

    • event: Event

      The event to process. Can be null.

    Returns boolean

  • Uninstall (ie flushes) the state. Useful to clear data. The state must not be used after that.

    Returns void

Generated using TypeDoc