[kepler-dev] list of connected ports on a given channel

Edward A. Lee eal at eecs.berkeley.edu
Tue Aug 1 19:05:03 PDT 2006


FSM is the only of the domains that might be a little odd...
Each state in an FSM model is an entity with two ports, one
for incoming transitions, and one for outgoing transitions.
The linked ports will be the states that can either transition
into a given state or from a given state.

Edward


At 10:39 AM 8/1/2006, Norbert Podhorszki wrote:

>Hi Edward,
>
>You are right, but the connectedPortList() gives back all ports in 
>one set while I need to sort them by channels. At this moment I am fine with
>the Port.linkedRelationList() - Relation.linkedSourcePortList() combo for
>outside channels and
>the Port.insideRelationList() - Relation.linkedSourcePortList() combo for
>inside channels.
>
>Those Port methods are used by the IOPort.getWidth() and 
>IOPort.getWidthInside() to determine the number of channels.
>
>The question is whether this is valid for all models in Ptolemy. I 
>do not know how FSM, CT and Wireless work for example.
>
>Norbert
>
>On Tue, 1 Aug 2006, Edward A. Lee wrote:
>
>>
>>I think that Port.connectedPortList() will return all the immediately
>>connected ports.  You can then filter this using IOPort.isInput() or
>>IOPort.isOutput().
>>
>>Edward
>k

------------
Edward A. Lee
Professor, Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
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-dev mailing list