Class State

    • Constructor Detail

      • State

        public State​(State component)
        Construct the code generator adapter associated with the given state.
        Parameters:
        component - The associated ptolemy.domains.modal.kernel.State
    • Method Detail

      • generateTransferOutputsCode

        public void generateTransferOutputsCode​(IOPort outputPort,
                                                java.lang.StringBuffer code)
                                         throws IllegalActionException
        Generate code for transferring enough tokens to fulfill the output production rate.
        Parameters:
        outputPort - The port to transfer tokens.
        code - The string buffer that the generated code is appended to.
        Throws:
        IllegalActionException - If thrown while transferring tokens.
      • _updatePortOffset

        protected void _updatePortOffset​(IOPort port,
                                         java.lang.StringBuffer code,
                                         int rate)
                                  throws IllegalActionException
        Update the read offsets of the buffer associated with the given port.
        Parameters:
        port - The port whose read offset is to be updated.
        code - The string buffer that the generated code is appended to.
        rate - The rate, which must be greater than or equal to 0.
        Throws:
        IllegalActionException - If thrown while reading or writing offsets, or getting the buffer size, or if the rate is less than 0.