001/* Director for the PtinyOS domain.
002
003 Copyright (c) 1997-2014 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 */
027package ptolemy.component.domains.ptinyos;
028
029import ptolemy.component.Component;
030import ptolemy.component.ComponentDirector;
031import ptolemy.kernel.util.IllegalActionException;
032
033///////////////////////////////////////////////////////////////////
034//// PtinyOSDirector
035
036/**
037 Stub for component implementation of the PtinyOS model of computation.
038
039 Not currently used.
040
041 @author Yang Zhao and Edward A. Lee
042 @version $Id$
043 @since Ptolemy II 11.0
044 @Pt.ProposedRating yellow (ellen_zh)
045 @Pt.AcceptedRating red (davisj)
046 */
047public class PtinyOSDirector extends ComponentDirector {
048    ///////////////////////////////////////////////////////////////////
049    ////                         public methods                    ////
050
051    /** Initialize the component.  This is invoked once after
052     *  preinitialize() and again whenever the component needs
053     *  to be reinitialized.
054     *  @exception IllegalActionException If initialization
055     *   cannot be completed.
056     */
057    @Override
058    public void initialize() throws IllegalActionException {
059        // FIXME
060    }
061
062    /** Call fireAtRelativeTime() with the specified time interval
063     *  and then suspend the calling thread. Make a record so that
064     *  when this director gets fired at the requested time, the
065     *  suspended thread is reawakened. The second argument, if
066     *  true, requests that during this time interval, this actor
067     *  not react to input events.
068     *  @param timeInterval The time interval.
069     *  @param atomic True to disable interrupts.
070     */
071    public void letTimePass(double timeInterval, boolean atomic) {
072        // FIXME
073    }
074
075    /** Preinitialize the component. This is invoked exactly
076     *  once per execution of a model, before any other methods
077     *  in this interface are invoked.
078     *  @exception IllegalActionException If preinitialization
079     *   cannot be completed.
080     */
081    @Override
082    public void preinitialize() throws IllegalActionException {
083        // FIXME
084    }
085
086    /** Request that the react() method of the specified component
087     *  be invoked at the specified time. The react() method will
088     *  be passed a null argument.  This method calls fireAt()
089     *  and records the requesting component so that when the
090     *  firing occurs it calls react() on that component.
091     *  @param time The time at which to invoke react().
092     *  @param component PtinyOSComponent The requesting component.
093     */
094    public void reactAt(double time, Component component) {
095        // FIXME
096    }
097
098    /** Execute the component. This is invoked after preinitialize()
099     *  and initialize(), and may be invoked repeatedly.
100     * @exception IllegalActionException If the run cannot be completed.
101     */
102    @Override
103    public void run() throws IllegalActionException {
104        // FIXME
105    }
106
107    /** Wrap up an execution. This method is invoked exactly once
108     *  per execution of a model. It finalizes an execution, typically
109     *  closing files, displaying final results, etc. If any other
110     *  method from this interface is invoked after this, it must
111     *  begin with preinitialize().
112     *  @exception IllegalActionException If wrapup fails.
113     */
114    @Override
115    public void wrapup() throws IllegalActionException {
116        // FIXME
117    }
118}