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

Norbert Podhorszki pnorbert at cs.ucdavis.edu
Tue Aug 1 10:39:03 PDT 2006


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


More information about the Kepler-dev mailing list