Class PtinyOSDirector
- java.lang.Object
-
- ptolemy.component.ComponentDirector
-
- ptolemy.component.domains.ptinyos.PtinyOSDirector
-
- All Implemented Interfaces:
Component
public class PtinyOSDirector extends ComponentDirector
Stub for component implementation of the PtinyOS model of computation. Not currently used.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Yang Zhao and Edward A. Lee
- Pt.AcceptedRating:
- red (davisj)
- Pt.ProposedRating:
- yellow (ellen_zh)
-
-
Constructor Summary
Constructors Constructor Description PtinyOSDirector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize()
Initialize the component.void
letTimePass(double timeInterval, boolean atomic)
Call fireAtRelativeTime() with the specified time interval and then suspend the calling thread.void
preinitialize()
Preinitialize the component.void
reactAt(double time, Component component)
Request that the react() method of the specified component be invoked at the specified time.void
run()
Execute the component.void
wrapup()
Wrap up an execution.
-
-
-
Method Detail
-
initialize
public void initialize() throws IllegalActionException
Initialize the component. This is invoked once after preinitialize() and again whenever the component needs to be reinitialized.- Specified by:
initialize
in interfaceComponent
- Overrides:
initialize
in classComponentDirector
- Throws:
IllegalActionException
- If initialization cannot be completed.
-
letTimePass
public void letTimePass(double timeInterval, boolean atomic)
Call fireAtRelativeTime() with the specified time interval and then suspend the calling thread. Make a record so that when this director gets fired at the requested time, the suspended thread is reawakened. The second argument, if true, requests that during this time interval, this actor not react to input events.- Parameters:
timeInterval
- The time interval.atomic
- True to disable interrupts.
-
preinitialize
public void preinitialize() throws IllegalActionException
Preinitialize the component. This is invoked exactly once per execution of a model, before any other methods in this interface are invoked.- Specified by:
preinitialize
in interfaceComponent
- Overrides:
preinitialize
in classComponentDirector
- Throws:
IllegalActionException
- If preinitialization cannot be completed.
-
reactAt
public void reactAt(double time, Component component)
Request that the react() method of the specified component be invoked at the specified time. The react() method will be passed a null argument. This method calls fireAt() and records the requesting component so that when the firing occurs it calls react() on that component.- Parameters:
time
- The time at which to invoke react().component
- PtinyOSComponent The requesting component.
-
run
public void run() throws IllegalActionException
Execute the component. This is invoked after preinitialize() and initialize(), and may be invoked repeatedly.- Specified by:
run
in interfaceComponent
- Overrides:
run
in classComponentDirector
- Throws:
IllegalActionException
- If the run cannot be completed.
-
wrapup
public void wrapup() throws IllegalActionException
Wrap up an execution. This method is invoked exactly once per execution of a model. It finalizes an execution, typically closing files, displaying final results, etc. If any other method from this interface is invoked after this, it must begin with preinitialize().- Specified by:
wrapup
in interfaceComponent
- Overrides:
wrapup
in classComponentDirector
- Throws:
IllegalActionException
- If wrapup fails.
-
-