Class SharedBufferTransformer

    • Constructor Detail

      • SharedBufferTransformer

        public SharedBufferTransformer​(CompositeEntity container,
                                       java.lang.String name)
                                throws NameDuplicationException,
                                       IllegalActionException
        Construct an instance of a SharedBufferTransformer. Should not be used because this in an abstract class. TODO Is there a way to avoid defining a constructor for this abstract class?
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the actor cannot be contained by the proposed container.
        NameDuplicationException - If the container already has an actor with this name.
    • Method Detail

      • sharedBuffers

        public int sharedBuffers()
        Default value for number of frame buffers required for shared firing.
        Specified by:
        sharedBuffers in interface BufferingProfile
        Returns:
        the number of buffers required for a shared buffer firing
      • exclusiveBuffers

        public int exclusiveBuffers()
        Default value for number of frame buffers required for exclusive firing.
        Specified by:
        exclusiveBuffers in interface BufferingProfile
        Returns:
        the number of buffers required for an exclusive buffer firing
      • sharedExecutionTime

        public int sharedExecutionTime()
        Default value for execution time for shared firing.
        Specified by:
        sharedExecutionTime in interface BufferingProfile
        Returns:
        execution time of a shared buffer firing
      • exclusiveExecutionTime

        public int exclusiveExecutionTime()
        Default value for execution time for exclusive firing.
        Specified by:
        exclusiveExecutionTime in interface BufferingProfile
        Returns:
        execution time of an exclusive buffer firing
      • iterate

        public int iterate​(int iterationCount,
                           boolean fireExclusive)
                    throws IllegalActionException
        Invoke a specified number of iterations of the actor in either shared or exclusive mode as indicated by the fireExclusive argument.
        Specified by:
        iterate in interface BufferingProfile
        Parameters:
        iterationCount - The number of iterations to perform.
        fireExclusive - whether to fire exclusive or not.
        Returns:
        NOT_READY, STOP_ITERATING, or COMPLETED.
        Throws:
        IllegalActionException - If iterating is not permitted, or if prefire(), fire(), or postfire() throw it.
      • _fireCopying

        protected abstract void _fireCopying()
                                      throws IllegalActionException
        Fire the actor in shared firing mode. Shared firing method to be implemented in subclasses.
        Throws:
        IllegalActionException - If thrown while writing to the port.
      • _fireExclusive

        protected abstract void _fireExclusive()
                                        throws IllegalActionException
        Fire the actor in exclusive firing mode. Exclusive firing method to be implemented in subclasses.
        Throws:
        IllegalActionException - If thrown while writing to the port.