Interface InputRegister<InputType extends FSMInput>

  • Type Parameters:
    InputEnum - The Input enum class generated in the FSM class
    All Superinterfaces:
    InputScheduler<InputType>

    public interface InputRegister<InputType extends FSMInput>
    extends InputScheduler<InputType>
    InputRegister is used in generated FSM classes to represent the scheduled and execution state of the FSM.
    • Method Detail

      • setInputs

        void setInputs​(FSMInputName[] inputs)
        Setter injector method
        Parameters:
        inputs -
      • setInputPersistence

        void setInputPersistence​(com.opencloud.sce.fsmtool.impl.FSMPersistence inputPersistence)
        Setter injector method
        Parameters:
        inputPersistence -
      • preExecution

        void preExecution()
        Perform any pre execution cycle processing. Used by generated FSM classes.
      • postExecution

        void postExecution()
        Perform any post execution cycle processing. Used by generated FSM classes.
      • changesScheduled

        boolean changesScheduled()
        Returns:
        true if changes to the scheduled view of the InputRegister have been made
      • isRaised

        boolean isRaised​(FSMInputName input)
        Parameters:
        input -
        Returns:
        true if input is raised otherwise false
      • getAssociatedObject

        Object getAssociatedObject​(InputType input)
        Returns the object associated with the input
        Parameters:
        input -
        Returns:
        object associated with the input
      • loadMemento

        void loadMemento​(byte[] encodedMemento,
                         int offset)
        Load the memento from the array from offset position
        Parameters:
        encodedMemento - memento creating using encodeMemento(), or {@link #encodeMemento(byte[], int)}
        offset - offset position in the encodedMemento where memento starts
      • encodeMemento

        byte[] encodeMemento()
        Encode the input register memento into a new array which is returned
        Returns:
        memento containing the state of the InputRegister
      • encodedSize

        int encodedSize()
        Returns:
        size of the memento
      • encodeMemento

        byte[] encodeMemento​(byte[] encoded)
        Encodes the input register into the array passed at offset 0
        Parameters:
        encoded - byte[] to write the memento to
        Returns:
        byte[] passed in the encoded argument
      • encodeMemento

        byte[] encodeMemento​(byte[] encoded,
                             int offset)
        Encodes the input register into the array passed.
        Parameters:
        encoded - byte[] to write the memento to
        Returns:
        byte[] passed in the encoded argument