[kepler-users] Add port to an actor

Edward A. Lee eal at eecs.berkeley.edu
Mon Apr 3 11:57:18 PDT 2006


At 11:16 AM 4/3/2006, Ilkay Altintas wrote:
>On Mon, April 3, 2006 9:44 am, Dan Higgins wrote:
> >     Unfortunately, you can add ports to any actor although in most cases
> > the added port has no function since the actor code never looks for it.
> > This has caused confusion for several new Kepler users.
> >
>
>This sounds like a problem. I wonder if we can disable that functionality
>when it is not needed through global parameter or so... The actor can
>enable it when it uses that feature.
>
>Matthew, Edward: Any ideas?

It is easy to write actors that react to new ports when the are
added. For example, RecordAssembler works this way... I you don't
add ports, it has no useful function.  Same for Expression.
Also, note that any composite actor has user-added ports.

However, a general mechanism that works for all actors makes
no sense.  What should the actor do with data on the new port?

If you are suggesting that one should be able to add arbitrary
functionality to an actor without writing Java code, then I suggest
you use the Matlab or Python actors.  This is exactly what they
enable...  But any such actor will have to provide a programming
language so you can specify what the actor should do with new data.
You can think of composite actors, in fact, as being exactly this,
but where the "programming language" for specifying functionality
is Ptolemy II.

Edward




------------
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
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  



More information about the Kepler-users mailing list