[kepler-dev] Token Types: resolving, setting etc

Edward A. Lee eal at eecs.berkeley.edu
Wed Oct 20 17:33:50 PDT 2010


Mystery solved...

The remaining question I can't answer. I mainly use Ptolemy II,
which doesn't have this issue because it doesn't use KAR files...

Maybe someone else can help?

Edward


On 10/20/10 4:46 PM, Panickos Neophytou wrote:
> Thank you all for your replies.
>
> I found out what went wrong.
>
> The problem is that I have saved this workflow for testing as well as
> the Actor I am working on in two different KAR files. The problem is
> that the XML inside (or outside?) the KAR file of the actor was
> declaring the port as type unknown. That was before I started
> declaring the type of the port as a RecordType.
>
> So now I re-instantiated the Actor through Tools->Instantiate
> Component and now it works. I guess I should resave it update the XML
> file. I don't know if this is how it supposed to work but I guess it
> creates some inconsistencies while you are still developing an Actor.
>
> Is there an easier way to keep things synchronized?
>
> Cheers,
> Panickos
>
> -------------------------------------
> Panickos Neophytou
> Advanced Data Management Technologies Lab
> Department of Computer Science, University of Pittsburgh
> http://www.cs.pitt.edu/~panickos
>
>
>
> On Wed, Oct 20, 2010 at 12:23 PM, Edward A. Lee<eal at eecs.berkeley.edu>  wrote:
>>
>> This is puzzling.
>> Looks like a bug to me.
>> If you send a small test case, I can take a look.
>>
>> Edward
>>
>>
>> On 10/20/10 3:25 AM, Panickos Neophytou wrote:
>>>
>>> Hi all,
>>>
>>> I'm trying to use a RecordType token that has just 2 fields: {long, Token}
>>>
>>> When I declare a port that outputs token of this record type (on an
>>> actor that I have implemented)
>>>
>>> outputPort.setTypeEquals(new RecordType(new
>>> String[]{EventRecordToken.TIMESTAMP_LABEL,
>>> EventRecordToken.VALUE_LABEL}, new Type[]{BaseType.LONG,
>>> BaseType.STRING}));
>>>
>>> and connect it to a port that accepts type generic I get this error:
>>>
>>> "Types resolved to unacceptable types in .workflowName due to the
>>> following inequalities:
>>> (ptolemy.actor.TypedIOPort {...output port info here...},unknown)<=
>>> (ptolemy.actor.TypedIOPort {...input port info here...}, general)"
>>>
>>> Why is the port type resolved as Unknown?
>>>
>>> I don't quite understand how the type framework works. Is there some
>>> documentation about the types?
>>> The input port is on a TextDisplay actor. Shouldn't it just display
>>> the contents of the records without any problems?
>>>
>>> I thought I'd ask for some directions before digging deeper.
>>>
>>> Thanks,
>>> Panickos
>>>
>>> -------------------------------------
>>> Panickos Neophytou
>>> Advanced Data Management Technologies Lab
>>> Department of Computer Science, University of Pittsburgh
>>> http://www.cs.pitt.edu/~panickos
>>> _______________________________________________
>>> Kepler-dev mailing list
>>> Kepler-dev at kepler-project.org
>>> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eal.vcf
Type: text/x-vcard
Size: 330 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20101020/482af281/attachment.vcf>


More information about the Kepler-dev mailing list