[kepler-dev] Ports

Edward A. Lee eal at eecs.berkeley.edu
Sat Jul 31 04:23:24 PDT 2010


The type system is explained in Chapter 5 here:

http://www.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-29.html

Edward


On 7/30/10 8:01 AM, Ivens wrote:
> Hi (again),
>
> I read Kepler User Manual to discover how Port Constraints work but i
> could not understand.
> I looked some actors in Kepler and I noticed that Parameters are passed
> to setTypeAtLeast(...) method...
> so... i dont know how these Constrainst work...
>
> can you please explain me?
>
> thanks
>
> On Fri, Jul 30, 2010 at 10:32 AM, Ivens <ivensportugal at gmail.com
> <mailto:ivensportugal at gmail.com>> wrote:
>
>     When i tried to link an UNKNOWN port to a GENERAL port, i got error
>     messages...
>     why?
>
>
>     help.JPG
>
>
>     error.JPG
>
>     On Fri, Jul 30, 2010 at 10:00 AM, Ivens <ivensportugal at gmail.com
>     <mailto:ivensportugal at gmail.com>> wrote:
>
>         Hi ilkay,
>
>         yes i can add the actor do Display, and it works well.
>         But Display Actor has a port from General Type and accepts every
>         type of Token.
>
>         The problem is... my actor must send the Token he received...
>         but i dont know the type of that Token.
>
>         For instance:
>         suppose i have (SDF Director) a String Constant --- myActor ---
>         String to Int --- Display
>
>         my actor must get a String from String Constant (which is easy
>         using an input Port from GENERAL type) and send this String
>         Token through a STRING type Port, because String to Int must
>         receive a StringToken.
>
>         But..
>         Suppose (SDF Director)   Const --- myActor --- AddOrSubtract ---
>         Display
>
>         my actor must get a Integer and send it through a INTEGER type
>         Port, because AddOrSubtract expects that.
>
>         In other words, the output Port may be generic...
>         but if i declare it as GENERAL, it won't work
>
>         and i cannot use output.setTypeAtLeast(input), because my input
>         port is GENERAL.
>
>         did you understand?
>
>         On Wed, Jul 28, 2010 at 4:42 PM, Ilkay Altintas
>         <altintas at sdsc.edu <mailto:altintas at sdsc.edu>> wrote:
>
>             Hi,
>
>             The general data type is the most inclusive of the types.
>               Can you link your actor to display?
>
>             There's some more information on the type system conversions
>             in the ptolemy documentation  (section 4.5.4: Conversions)
>             at:
>             http://www.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-28.html
>
>             -ilkay
>
>
>             --
>             Ilkay ALTINTAS
>             Deputy Coordinator for Research, San Diego Supercomputer
>             Center (SDSC)
>             Lab Director, Scientific Workflow Automation Technologies
>             (SWAT @ SDSC)
>
>             University of California, San Diego
>             9500 Gilman Drive, MC: 0505  La Jolla, CA  92093-0505
>             Phone: (858) 210-5877                     Fax: (858) 534-8303
>             Web: http://users.sdsc.edu/~altintas
>             Skype: ilkay.altintas
>
>
>
>
>
>
>
>
>             On Jul 28, 2010, at 10:32 AM, Ivens wrote:
>
>                 Hi,
>
>                 I wrote an Actor in Java that has 2 ports: one is input
>                 and the other one is output.
>                 Both are from GENERAL type. (deal with GENERAL tokens)
>
>                 The output port sends the same data the input port receives.
>                 And then, i connect the output port to any other Kepler
>                 Actor (for instance, String to Int.string)
>
>                 When i click 'play' to start the execution, i get an
>                 error message.
>                 i think that is because my output port is from GENERAL
>                 type... and it is connected to a port from STRING type
>
>                 So, i changed that type to UNKNOWN... but the error
>                 persists...
>                 Can you help me?
>
>                 Thanks
>                 _______________________________________________
>                 Kepler-dev mailing list
>                 Kepler-dev at kepler-project.org
>                 <mailto:Kepler-dev at kepler-project.org>
>                 http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>
>
>
>
>
>
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eal.vcf
Type: text/x-vcard
Size: 342 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20100731/402f2e8c/attachment.vcf>


More information about the Kepler-dev mailing list