Class FSMDirector

    • Field Detail

      • _sanitizedDirectorName

        protected java.lang.String _sanitizedDirectorName
        The sanitized name of the director.
    • Constructor Detail

      • FSMDirector

        public FSMDirector​(FSMDirector component)
        Construct the code generator helper associated with the given modal controller.
        Parameters:
        component - The associated component.
    • Method Detail

      • generateConstructorCode

        public java.lang.String generateConstructorCode()
                                                 throws IllegalActionException
        Generate the constructor code for the specified director. In this class we initialize the director with its internal parameters and fields as well as with the depths of the actors
        Overrides:
        generateConstructorCode in class Director
        Returns:
        The generated constructor code
        Throws:
        IllegalActionException - Not thrown in this base class.
      • generateFunctionsDeclaration

        public java.lang.String generateFunctionsDeclaration()
                                                      throws IllegalActionException
        Generate The functions' declaration code for this director.
        Returns:
        The functions' declaration function code.
        Throws:
        IllegalActionException - If thrown while generating code.
      • generateInitializeFunctionCode

        public java.lang.String generateInitializeFunctionCode()
                                                        throws IllegalActionException
        Generate the initialize function code for the associated FSM director.
        Returns:
        The generated initialize code.
        Throws:
        IllegalActionException - If the adapter associated with an actor throws it while generating initialize code for the actor.
      • generatePostfireCode

        public java.lang.String generatePostfireCode()
                                              throws IllegalActionException
        Generate the postfire code of the associated composite actor.
        Overrides:
        generatePostfireCode in class Director
        Returns:
        The postfire code of the associated composite actor.
        Throws:
        IllegalActionException - If the adapter associated with an actor throws it while generating postfire code for the actor
      • generatePreinitializeCode

        public java.lang.String generatePreinitializeCode()
                                                   throws IllegalActionException
        Generate the preinitialize code for this director. The preinitialize code for the director is generated by appending the preinitialize code for each actor.
        Overrides:
        generatePreinitializeCode in class Director
        Returns:
        The generated preinitialize code.
        Throws:
        IllegalActionException - If getting the adapter fails, or if generating the preinitialize code for a adapter fails, or if there is a problem getting the buffer size of a port.
      • generatePreinitializeMethodBodyCode

        public java.lang.String generatePreinitializeMethodBodyCode()
                                                             throws IllegalActionException
        Generate the preinitialize code for this director. The preinitialize code for the director is generated by appending the preinitialize code for each actor.
        Overrides:
        generatePreinitializeMethodBodyCode in class Director
        Returns:
        The generated preinitialize code.
        Throws:
        IllegalActionException - If getting the adapter fails, or if generating the preinitialize code for a adapter fails, or if there is a problem getting the buffer size of a port.
      • generateTransferInputCode

        public java.lang.String generateTransferInputCode()
                                                   throws IllegalActionException
        Generate the code for the transfer of input values inside the modal model.
        Returns:
        The generated code.
        Throws:
        IllegalActionException - If the adapter associated with an actor throws it while generating code for the actor.
      • generateTransferOutputCode

        public java.lang.String generateTransferOutputCode()
                                                    throws IllegalActionException
        Generate the code for the transfer of output values inside the modal model.
        Returns:
        The generated code.
        Throws:
        IllegalActionException - If the adapter associated with an actor throws it while generating code for the actor.
      • generateVariableDeclaration

        public java.lang.String generateVariableDeclaration()
                                                     throws IllegalActionException
        We override the super method, because the declaration of the variables are in the actor's files.
        Overrides:
        generateVariableDeclaration in class Director
        Returns:
        code The generated code.
        Throws:
        IllegalActionException - If the adapter class for the model director cannot be found.
      • getSanitizedDirectorName

        public java.lang.String getSanitizedDirectorName()
        Returns the sanitized name of this director adapter.
        Returns:
        The sanitized name of the director