Thanks... You are right...
This appears to have already been fixed in our CVS tree...

Edward

At 11:27 AM 12/14/2005 +0000, Srivas Narasimhan Chennu wrote:
Hello all,

While using the domain-specific DE Merge actor in PtolemyII 5.0.1, I stumbled
across what looks like a bug in fire() method. Around line 133 in
$PTII/ptolemy/domains/de/lib/Merge.java, the while loop reads:

                    while (input.hasToken(i)) {
                        Token token = input.get(i);
                        output.send(0, firstAvailableToken);
                    }

The actor, after sending out the first available token from a channel of its
input multiport, reads additional tokens from the channel, but repeatedly sends
out the first token instead of the recently read ones. As a result, all
simultaenously available tokens at an input channel except the first are lost.

A straightforward fix for this bug would be to change line 133 to read:

                        output.send(0, token);

This would ensure that the token obtained from the input in the previous line is
then sent out.

Comments welcome,
Srivas Chennu.
=================
Graduate Student
Hamburg University of Technology (www.tuhh.de)

Student Researcher
Fraunhofer Institute for Telecommunications (www.hhi.de)
=================

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[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]

Reply via email to