Class MultiplyDivide

    • Constructor Detail

      • MultiplyDivide

        public MultiplyDivide​(MultiplyDivide actor)
        Construct a TimeGap adapter.
        Parameters:
        actor - The given ptolemy.actor.lib.TimeGap actor.
    • Method Detail

      • _generateFireCode

        protected java.lang.String _generateFireCode()
                                              throws IllegalActionException
        Description copied from class: MultiplyDivide
        Generate fire code. The method generates code that loops through each input [multi-ports] and combines (add or subtract) them.
        Overrides:
        _generateFireCode in class MultiplyDivide
        Returns:
        The generated code.
        Throws:
        IllegalActionException - If the code stream encounters an error in processing the specified code block(s).
      • getSourceTimeString

        public java.lang.String getSourceTimeString​(java.lang.String timeVariable)
                                             throws IllegalActionException
        Return a string that represents the source time.
        Overrides:
        getSourceTimeString in class NamedProgramCodeGeneratorAdapter
        Parameters:
        timeVariable - The name of the time variable to be set.
        Returns:
        A string sets the timeVariable to the timestamp of the last input channel.
        Throws:
        IllegalActionException - If there is a problem getting the width of the divide or multiply ports.