Very interesting... Did you look at DEThreadActor? It has some of what you do, but not all... In particular, it doesn't have the (nice) feature that the director waits for active actors to allow time to pass. This is similar to what we've done in timed CSP and timed PN...
As for these specific questions:
At 06:12 PM 11/20/2003 -0600, Charles Liu wrote:
The work around I have requires the insertion of a method call into the _dequeueEvents method, which can't be overriden easily due to access to private member variables in DEDirector. Here lies the question (or rather feature request): How can I request a change to the DEDirector for the next release to support what I'm attempting to do? For now, I've just modified my local copy of DEDirector. With the changes, my simulation seems to be running correctly.
Please do request the change. It sounds like what you are doing is using the "strategy pattern," which is often a good idea. I.e., have _dequeueEvents call a protected method where a simple default implementation is provided in the DEDirector, but your director subclasses this... If you send me your version of the DEDirector, I'll take a look.
Note that any contributed code has to bear our copyright or something equivalent (e.g., you can change the name of the copyright holder if you contribute a new file). But in particular, we can't include GPL'd code in the main body of Ptolemy II, because then all of Ptolemy II will become GPL'd (this is a sort of "copyright virus").
Also, contributed code needs to follow our coding style in order to be included in the main code base. You can find this at:
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/coding/style.htm
Another (easier) question: I would like to identify tag an IOPort for special processing while creating it in the constructor of an Actor. How can I do this without adding a Parameter to it or subclassing it? All I need is something that lets me add a property (perhaps Attribute?) to the IOPort.
You can simply add an attribute to a port. To do this in vergil, right click on the port, select "Configure" and then do "add". The added property will be persistent.
The attribute can also be added by Java code. The right way to do this is queue a change request, so that the attribute is added at a time when it is safe to do that. See the SDF domain director for an example... It adds attributes to ports and actors for use with scheduling.
Note that in the latest release, the only way to add a non-persistent attribute was to use one of the Attribute subclasses that are not persistent, such as TransientConfigurableAttribute. In the latest version (on the CVS tree), any attribute can be made non-persistent by calling setPersistent(false). This prevents the attribute from cluttering the MoML file.
Edward
------------ Edward A. Lee, Professor 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 phone: 510-642-0455, fax: 510-642-2739 [EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]