Creating multiple connections for the same input/output ports

Hey guys,

the current behaviour of RTT allows the same input and output port to be connected via multiple connections.
This leads to the effect, that when reading the input port in order to retrieve and test on new data on that port, I end up having N (number of connections) new samples on that input port - even though only one new sample has been written to the output port.

I was wondering what the rational behind this is (bug or feature) including use cases, since it occurs to me to be rather unintuitive.

Best
Thomas

Creating multiple connections for the same input/output ports

On Thursday 16 February 2012 12:14:34 Thomas Roehr wrote:
> Hey guys,
>
> the current behaviour of RTT allows the same input and output port to be
> connected via multiple connections. This leads to the effect, that when
> reading the input port in order to retrieve and test on new data on that
> port, I end up having N (number of connections) new samples on that input
> port - even though only one new sample has been written to the output port.

That seems very logical to me. Every connection contains a new sample so you
get all of them on the input port.
>
> I was wondering what the rational behind this is (bug or feature) including
> use cases, since it occurs to me to be rather unintuitive.
It seems intuitive to me.
Can you explain what you actually want to achieve? And then why you decided to
make multiple connections?

Tinne

Creating multiple connections for the same input/output ports

My two cents.

>From a conceptual point of view, I don't see ANY reason to have multiple
connections between 2 given ports, as described by Thomas.
It looks more as a bug rather than a feature.

Davide

On Thu, Feb 16, 2012 at 3:16 PM, Tinne De Laet <
tinne [dot] delaet [..] ...> wrote:

> On Thursday 16 February 2012 12:14:34 Thomas Roehr wrote:
> > Hey guys,
> >
> > the current behaviour of RTT allows the same input and output port to be
> > connected via multiple connections. This leads to the effect, that when
> > reading the input port in order to retrieve and test on new data on that
> > port, I end up having N (number of connections) new samples on that input
> > port - even though only one new sample has been written to the output
> port.
>
> That seems very logical to me. Every connection contains a new sample so
> you
> get all of them on the input port.
> >
> > I was wondering what the rational behind this is (bug or feature)
> including
> > use cases, since it occurs to me to be rather unintuitive.
> It seems intuitive to me.
> Can you explain what you actually want to achieve? And then why you
> decided to
> make multiple connections?
>
> Tinne
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

Creating multiple connections for the same input/output ports

On Thu, Feb 16, 2012 at 15:36, Davide Faconti
<faconti [..] ...>wrote:

> My two cents.
>
> From a conceptual point of view, I don't see ANY reason to have multiple
> connections between 2 given ports, as described by Thomas.
> It looks more as a bug rather than a feature.
>

The only reason I see for this is when you want to reuse some code, which
test availability of a new data
and you can not or do not want to modify it.

Piotr.

>
> Davide
>
>
> On Thu, Feb 16, 2012 at 3:16 PM, Tinne De Laet <
> tinne [dot] delaet [..] ...> wrote:
>
>> On Thursday 16 February 2012 12:14:34 Thomas Roehr wrote:
>> > Hey guys,
>> >
>> > the current behaviour of RTT allows the same input and output port to be
>> > connected via multiple connections. This leads to the effect, that when
>> > reading the input port in order to retrieve and test on new data on that
>> > port, I end up having N (number of connections) new samples on that
>> input
>> > port - even though only one new sample has been written to the output
>> port.
>>
>> That seems very logical to me. Every connection contains a new sample so
>> you
>> get all of them on the input port.
>> >
>> > I was wondering what the rational behind this is (bug or feature)
>> including
>> > use cases, since it occurs to me to be rather unintuitive.
>> It seems intuitive to me.
>> Can you explain what you actually want to achieve? And then why you
>> decided to
>> make multiple connections?
>>
>> Tinne
>> --
>> Orocos-Dev mailing list
>> Orocos-Dev [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>>
>
>
>
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>
>

Creating multiple connections for the same input/output ports

On 16.02.2012 16:05, Piotr Trojanek wrote:
> On Thu, Feb 16, 2012 at 15:36, Davide Faconti
> <faconti [..] ... faconti [..] ...>>
> wrote:
>
> My two cents.
>
> From a conceptual point of view, I don't see ANY reason to
> have multiple connections between 2 given ports, as described by
> Thomas.
> It looks more as a bug rather than a feature.
>
>
> The only reason I see for this is when you want to reuse some code,
> which test availability of a new data
> and you can not or do not want to modify it.
I actually don't have a use case for this, but ran into this situation
by accident. Therefore I was wondering, if there is a use case at all,
and why not restricting to one connection per input/output pair.

Best
Thomas
>
> Piotr.
>
>
> Davide
>
>
> On Thu, Feb 16, 2012 at 3:16 PM, Tinne De Laet
> <tinne [dot] delaet [..] ...
> <mailto:tinne [dot] delaet [..] ...>> wrote:
>
> On Thursday 16 February 2012 12:14:34 Thomas Roehr wrote:
> > Hey guys,
> >
> > the current behaviour of RTT allows the same input and
> output port to be
> > connected via multiple connections. This leads to the
> effect, that when
> > reading the input port in order to retrieve and test on new
> data on that
> > port, I end up having N (number of connections) new samples
> on that input
> > port - even though only one new sample has been written to
> the output port.
>
> That seems very logical to me. Every connection contains a new
> sample so you
> get all of them on the input port.
> >
> > I was wondering what the rational behind this is (bug or
> feature) including
> > use cases, since it occurs to me to be rather unintuitive.
> It seems intuitive to me.
> Can you explain what you actually want to achieve? And then
> why you decided to
> make multiple connections?
>
> Tinne
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> <mailto:Orocos-Dev [..] ...>
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>
>
>
>
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> <mailto:Orocos-Dev [..] ...>
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>
>
>
>

Creating multiple connections for the same input/output ports

On Thu, Feb 16, 2012 at 6:04 PM, Thomas Roehr <thomas [dot] roehr [..] ...> wrote:
> On 16.02.2012 16:05, Piotr Trojanek wrote:
>
> On Thu, Feb 16, 2012 at 15:36, Davide Faconti <faconti [..] ...>
> wrote:
>>
>> My two cents.
>>
>> From a conceptual point of view, I don't see ANY reason to have multiple
>> connections between 2 given ports, as described by Thomas.
>> It looks more as a bug rather than a feature.
>
>
> The only reason I see for this is when you want to reuse some code, which
> test availability of a new data
> and you can not or do not want to modify it.
>
> I actually don't have a use case for this, but ran into this situation by
> accident. Therefore I was wondering, if there is a use case at all, and why
> not restricting to one connection per input/output pair.

I wonder if we can detect it properly in all cases. For in-process
connections, we can compare pointers, but for between-process
connections (CORBA, ROS,...) there is no guaranteed way to 'compare'
ports,unless you first compare the owning components/services
(assuming identity can be determined) and then their ports.

The rtt_dot_service would show this double-connection immediately, btw.

Peter

Creating multiple connections for the same input/output ports

On Thursday 16 February 2012 15:36:03 Davide Faconti wrote:
> My two cents.
>
> From a conceptual point of view, I don't see ANY reason to have multiple
> connections between 2 given ports, as described by Thomas.
> It looks more as a bug rather than a feature.

I also don't see any reason why you should have multiple connections between
two given ports.
I understand however the behaviour he gets after constructing this multiple
connections.
Do you think RTT should check if the user is creating multiple connections
between given ports?

Tinne

>
> Davide
>
> On Thu, Feb 16, 2012 at 3:16 PM, Tinne De Laet <
>
> tinne [dot] delaet [..] ...> wrote:
> > On Thursday 16 February 2012 12:14:34 Thomas Roehr wrote:
> > > Hey guys,
> > >
> > > the current behaviour of RTT allows the same input and output port
> > > to be connected via multiple connections. This leads to the effect,
> > > that when reading the input port in order to retrieve and test on
> > > new data on that port, I end up having N (number of connections)
> > > new samples on that input port - even though only one new sample
> > > has been written to the output>
> > port.
> >
> > That seems very logical to me. Every connection contains a new sample so
> > you
> > get all of them on the input port.
> >
> > > I was wondering what the rational behind this is (bug or feature)
> >
> > including
> >
> > > use cases, since it occurs to me to be rather unintuitive.
> >
> > It seems intuitive to me.
> > Can you explain what you actually want to achieve? And then why you
> > decided to
> > make multiple connections?
> >
> > Tinne
> > --
> > Orocos-Dev mailing list
> > Orocos-Dev [..] ...
> > http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev