001/* A test scheduler for SDFScheduler
002
003 Copyright (c) 2007-2013 The Regents of the University of California.
004 All rights reserved.
005 Permission is hereby granted, without written agreement and without
006 license or royalty fees, to use, copy, modify, and distribute this
007 software and its documentation for any purpose, provided that the above
008 copyright notice and the following two paragraphs appear in all copies
009 of this software.
010
011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
015 SUCH DAMAGE.
016
017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
022 ENHANCEMENTS, OR MODIFICATIONS.
023
024 PT_COPYRIGHT_VERSION_2
025 COPYRIGHTENDKEY
026
027 */
028package ptolemy.actor.lib.string.test;
029
030import java.util.List;
031
032import ptolemy.actor.Director;
033import ptolemy.domains.sdf.kernel.SDFScheduler;
034import ptolemy.kernel.util.IllegalActionException;
035import ptolemy.kernel.util.NameDuplicationException;
036import ptolemy.kernel.util.Workspace;
037
038///////////////////////////////////////////////////////////////////
039//// SDFTestScheduler
040
041/**
042
043 A scheduler that exposes the rate variable of SDFScheduler.
044 @author Christopher Brooks
045 @version $Id$
046 @since Ptolemy II 6.1
047 @Pt.ProposedRating Red (cxh)
048 @Pt.AcceptedRating Red (cxh)
049 */
050public class SDFTestScheduler extends SDFScheduler {
051
052    /** Construct a scheduler with no container(director)
053     *  in the default workspace, the name of the scheduler is
054     *  "Scheduler".
055     */
056    public SDFTestScheduler() {
057        super();
058    }
059
060    /** Construct a scheduler in the given workspace with the name
061     *  "Scheduler".
062     *  If the workspace argument is null, use the default workspace.
063     *  The scheduler is added to the list of objects in the workspace.
064     *  Increment the version number of the workspace.
065     *
066     *  @param workspace Object for synchronization and version tracking.
067     */
068    public SDFTestScheduler(Workspace workspace) {
069        super(workspace);
070    }
071
072    /** Construct a scheduler in the given container with the given name.
073     *  The container argument must not be null, or a
074     *  NullPointerException will be thrown.  This attribute will use the
075     *  workspace of the container for synchronization and version counts.
076     *  If the name argument is null, then the name is set to the empty string.
077     *  Increment the version of the workspace.
078     *  @param container The container.
079     *  @param name The name of this attribute.
080     *  @exception IllegalActionException If the attribute is not of an
081     *   acceptable class for the container, or if the name contains a period.
082     *  @exception NameDuplicationException If the name coincides with
083     *   an attribute already in the container.
084     */
085    public SDFTestScheduler(Director container, String name)
086            throws IllegalActionException, NameDuplicationException {
087        super(container, name);
088    }
089
090    ///////////////////////////////////////////////////////////////////
091    ////                         public methods                    ////
092
093    /** Return the <i>_rateVariables</i> from the parent class.
094     *  @return the <i>_rateVariables</i> List.mk
095     */
096    public List getRateVariables() {
097        return _rateVariables;
098    }
099}