Potential bug when adding port to a component

I wrote this foolish code :

addPort("A",A)
addPort("A",B)

And 2 ports "A" are present in the task browser with the same name, but they
seems to be link only to the first one.

I think this should end in an error during deployment doesn't it ?

Potential bug when adding port to a component

On Sat, Nov 6, 2010 at 3:07 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
> I wrote this foolish code :
>
>     addPort("A",A)
>     addPort("A",B)
>
> And 2 ports "A" are present in the task browser with the same name, but they
> seems to be link only to the first one.
>
> I think this should end in an error during deployment doesn't it ?

The policy of all primitives is that you may override them with a new
instance, but a
warning may be given if you do so. So the expected output of your
experiment should
have been that there was only one port "A" and it pointed to "B", and a warning
should have been logged that "A" was being replaced by a new instance.

Thanks for reporting, we should fix this.

Peter
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

Potential bug when adding port to a component

On Sunday 07 November 2010 16:24:34 Peter Soetens wrote:
> On Sat, Nov 6, 2010 at 3:07 PM, Willy Lambert <lambert [dot] willy [..] ...>
wrote:
> > I wrote this foolish code :
> >
> > addPort("A",A)
> > addPort("A",B)
> >
> > And 2 ports "A" are present in the task browser with the same name, but
> > they seems to be link only to the first one.
> >
> > I think this should end in an error during deployment doesn't it ?
>
> The policy of all primitives is that you may override them with a new
> instance, but a
> warning may be given if you do so. So the expected output of your
> experiment should
> have been that there was only one port "A" and it pointed to "B", and a
> warning should have been logged that "A" was being replaced by a new
> instance.
>

The first port was not removed from the interface, but the calls to the port
should have gone to 'B' and not to 'A' (so link to the second one).

The warning was already printed, only the action was not taken :-]

Peter