Class FSMActor

    • Method Detail

      • generateInitializeCode

        public java.lang.String generateInitializeCode()
                                                throws IllegalActionException
        Generate the initialize code of the associated FSMActor. It generates code for initializing current state with initial state, and initializing current configuration of the container when it applies (i.e., when this FSMActor works as a modal controller for a MultirateFSMDirector).
        Overrides:
        generateInitializeCode in class FSMActor
        Returns:
        The initialize code of the associated FSMActor.
        Throws:
        IllegalActionException - If initial state cannot be found, configuration number cannot be updated or code cannot be processed.
      • generatePreinitializeCode

        public java.lang.String generatePreinitializeCode()
                                                   throws IllegalActionException
        Generate the preinitialize code of the associated FSMActor. It declares two variables for this actor: currentState and transitionFlag. currentState is an int representing this actor's current state. transitionFlag is an unsigned char to indicate if a preemptive transition is taken. It also defines a symbolic constant to each state.
        Overrides:
        generatePreinitializeCode in class FSMActor
        Returns:
        The preinitialize code of the associated FSMActor.
        Throws:
        IllegalActionException - If thrown when creating buffer size and offset map or processing code.
      • _generateStateConstantLabel

        protected java.lang.Object _generateStateConstantLabel​(State state)
        Generate a label for a state constant.
        Overrides:
        _generateStateConstantLabel in class FSMActor
        Parameters:
        state - The state.
        Returns:
        The label.