Correcting the 2.5 Taskbrowser (was : Problems using the TaskBrowser)

Hi,

I reopen a thread on the dev ML because I think it'll trun into a dev
thread. I am open to write a patch to correct this, but I am not good
enougth at RTT internal development to do it alone.

The problem is that the TaskBrowser is no more working in 2.5. Symptoms are
miss printing of attributes (except those ot type string) and port content
(at least). The problem is not existing with the port.getLastWrittenValue().
I think the problem is line 1963 in ocl/taskbrowser/taskbrowser.cpp :
"oport->getDataSource()" is not returning something correct :

OutputPortInterface* oport =
dynamic_cast<OutputPortInterface*>(port);
if (oport) {
if ( oport->keepsLastWrittenValue())
sresult << " => " << oport->getDataSource();

I need help to understand what are DataObjectDataSource, DataSourceBase,
DataObjectInterface, etc, ... I read the APIs :
http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
but it's a bit tricky for me. As far as I understand it is related to the
internal data sharing beetween threads.

I tried to play with them without great success. Could someone explain me
how this is suppose to work ?

Correcting the 2.5 Taskbrowser (was : Problems using the TaskBr

Hi Willy,

On Sun, Feb 5, 2012 at 2:02 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
> Hi,
>
> I reopen a thread on the dev ML because I think it'll trun into a dev
> thread. I am open to write a patch to correct this, but I am not good
> enougth at RTT internal development to do it alone.
>
> The problem is that the TaskBrowser is no more working in 2.5. Symptoms are
> miss printing of attributes (except those ot type string) and port content
> (at least). The problem is not existing with the port.getLastWrittenValue().
> I think the problem is line 1963 in ocl/taskbrowser/taskbrowser.cpp :
> "oport->getDataSource()" is not returning something correct :
>
>                 OutputPortInterface* oport =
> dynamic_cast<OutputPortInterface*>(port);
>                 if (oport) {
>                     if ( oport->keepsLastWrittenValue())
>                         sresult << " => " << oport->getDataSource();
>
> I need help to understand what are DataObjectDataSource, DataSourceBase,
> DataObjectInterface, etc, ... I read the APIs :
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
> but it's a bit tricky for me. As far as I understand it is related to the
> internal data sharing beetween threads.
>
> I tried to play with them without great success. Could someone explain me
> how this is suppose to work ?

The main issue with datasources is that you are only supposed to read
them out once they are 'evaluate()'ed. The taskbrowser did not do
this, and passed the datasource on to the printing functions, which
don't evaluate either, and just print the (cached) value.

Could you try the patch below ?

Peter

Correcting the 2.5 Taskbrowser (was : Problems using the TaskBr

2012/2/5 Peter Soetens <peter [..] ...>

> Hi Willy,
>
> On Sun, Feb 5, 2012 at 2:02 PM, Willy Lambert <lambert [dot] willy [..] ...>
> wrote:
> > Hi,
> >
> > I reopen a thread on the dev ML because I think it'll trun into a dev
> > thread. I am open to write a patch to correct this, but I am not good
> > enougth at RTT internal development to do it alone.
> >
> > The problem is that the TaskBrowser is no more working in 2.5. Symptoms
> are
> > miss printing of attributes (except those ot type string) and port
> content
> > (at least). The problem is not existing with the
> port.getLastWrittenValue().
> > I think the problem is line 1963 in ocl/taskbrowser/taskbrowser.cpp :
> > "oport->getDataSource()" is not returning something correct :
> >
> > OutputPortInterface* oport =
> > dynamic_cast<OutputPortInterface*>(port);
> > if (oport) {
> > if ( oport->keepsLastWrittenValue())
> > sresult << " => " << oport->getDataSource();
> >
> > I need help to understand what are DataObjectDataSource, DataSourceBase,
> > DataObjectInterface, etc, ... I read the APIs :
> >
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
> >
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
> >
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
> > but it's a bit tricky for me. As far as I understand it is related to the
> > internal data sharing beetween threads.
> >
> > I tried to play with them without great success. Could someone explain me
> > how this is suppose to work ?
>
> The main issue with datasources is that you are only supposed to read
> them out once they are 'evaluate()'ed. The taskbrowser did not do
> this, and passed the datasource on to the printing functions, which
> don't evaluate either, and just print the (cached) value.
>
> Could you try the patch below ?
>

It's ok for both port and attributes. THANKS A LOT ! My beloved Taskbrowser
is back :D
Please let me know on which version you'll push it.

>
> Peter
>

Correcting the 2.5 Taskbrowser (was : Problems using the TaskBr

On Mon, Feb 6, 2012 at 2:08 AM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>
>
> 2012/2/5 Peter Soetens <peter [..] ...>
>>
>> Hi Willy,
>>
>> On Sun, Feb 5, 2012 at 2:02 PM, Willy Lambert <lambert [dot] willy [..] ...>
>> wrote:
>> > Hi,
>> >
>> > I reopen a thread on the dev ML because I think it'll trun into a dev
>> > thread. I am open to write a patch to correct this, but I am not good
>> > enougth at RTT internal development to do it alone.
>> >
>> > The problem is that the TaskBrowser is no more working in 2.5. Symptoms
>> > are
>> > miss printing of attributes (except those ot type string) and port
>> > content
>> > (at least). The problem is not existing with the
>> > port.getLastWrittenValue().
>> > I think the problem is line 1963 in ocl/taskbrowser/taskbrowser.cpp :
>> > "oport->getDataSource()" is not returning something correct :
>> >
>> >                 OutputPortInterface* oport =
>> > dynamic_cast<OutputPortInterface*>(port);
>> >                 if (oport) {
>> >                     if ( oport->keepsLastWrittenValue())
>> >                         sresult << " => " << oport->getDataSource();
>> >
>> > I need help to understand what are DataObjectDataSource, DataSourceBase,
>> > DataObjectInterface, etc, ... I read the APIs :
>> >
>> > http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>> >
>> > http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>> >
>> > http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>> > but it's a bit tricky for me. As far as I understand it is related to
>> > the
>> > internal data sharing beetween threads.
>> >
>> > I tried to play with them without great success. Could someone explain
>> > me
>> > how this is suppose to work ?
>>
>> The main issue with datasources is that you are only supposed to read
>> them out once they are 'evaluate()'ed. The taskbrowser did not do
>> this, and passed the datasource on to the printing functions, which
>> don't evaluate either, and just print the (cached) value.
>>
>> Could you try the patch below ?
>
>
> It's ok for both port and attributes. THANKS A LOT ! My beloved Taskbrowser
> is back :D
> Please let me know on which version you'll push it.

toolchain-2.5. I already pushed it to gitorious.

Peter

Correcting the 2.5 Taskbrowser (was : Problems using the TaskBr

2012/2/6 Peter Soetens <peter [..] ...>:
> On Mon, Feb 6, 2012 at 2:08 AM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>>
>>
>> 2012/2/5 Peter Soetens <peter [..] ...>
>>>
>>> Hi Willy,
>>>
>>> On Sun, Feb 5, 2012 at 2:02 PM, Willy Lambert <lambert [dot] willy [..] ...>
>>> wrote:
>>> > Hi,
>>> >
>>> > I reopen a thread on the dev ML because I think it'll trun into a dev
>>> > thread. I am open to write a patch to correct this, but I am not good
>>> > enougth at RTT internal development to do it alone.
>>> >
>>> > The problem is that the TaskBrowser is no more working in 2.5. Symptoms
>>> > are
>>> > miss printing of attributes (except those ot type string) and port
>>> > content
>>> > (at least). The problem is not existing with the
>>> > port.getLastWrittenValue().
>>> > I think the problem is line 1963 in ocl/taskbrowser/taskbrowser.cpp :
>>> > "oport->getDataSource()" is not returning something correct :
>>> >
>>> >                 OutputPortInterface* oport =
>>> > dynamic_cast<OutputPortInterface*>(port);
>>> >                 if (oport) {
>>> >                     if ( oport->keepsLastWrittenValue())
>>> >                         sresult << " => " << oport->getDataSource();
>>> >
>>> > I need help to understand what are DataObjectDataSource, DataSourceBase,
>>> > DataObjectInterface, etc, ... I read the APIs :
>>> >
>>> > http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>>> >
>>> > http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>>> >
>>> > http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>>> > but it's a bit tricky for me. As far as I understand it is related to
>>> > the
>>> > internal data sharing beetween threads.
>>> >
>>> > I tried to play with them without great success. Could someone explain
>>> > me
>>> > how this is suppose to work ?
>>>
>>> The main issue with datasources is that you are only supposed to read
>>> them out once they are 'evaluate()'ed. The taskbrowser did not do
>>> this, and passed the datasource on to the printing functions, which
>>> don't evaluate either, and just print the (cached) value.
>>>
>>> Could you try the patch below ?
>>
>>
>> It's ok for both port and attributes. THANKS A LOT ! My beloved Taskbrowser
>> is back :D
>> Please let me know on which version you'll push it.
>
> toolchain-2.5. I already pushed it to gitorious.
>
> Peter

Hi,

I tried to update the branch but I am not at ease with git.
I used to only call :
git clone http://git.gitorious.org/orocos-toolchain/orocos_toolchain.git
git submodule init
git submodule update

But I can't succed getting the toolchain-2.5 branch. I tried "git
clone -b toolchain-2.5
http://git.gitorious.org/orocos-toolchain/orocos_toolchain.git" but I
think this can't work because only submodules seems to have such a
branch.
Is the only solution to go in each folder to swtich branch ?

Correcting the 2.5 Taskbrowser (was : Problems using the TaskBr

Hi Willy,

Just in case this is still relevant:

On Mon, Mar 26, 2012 at 1:23 AM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
> Hi,
>
> I tried to update the branch but I am not at ease with git.
> I used to only call :
> git clone http://git.gitorious.org/orocos-toolchain/orocos_toolchain.git
> git submodule init
> git submodule update
>
> But I can't succed getting the toolchain-2.5 branch. I tried "git
> clone -b toolchain-2.5
> http://git.gitorious.org/orocos-toolchain/orocos_toolchain.git" but I
> think this can't work because only submodules seems to have such a
> branch.
> Is the only solution to go in each folder to swtich branch ?

cd ocl
git checkout toolchain-2.5

Peter

Correcting the 2.5 Taskbrowser (was : Problems using the TaskBr

2012/4/10 Peter Soetens <peter [..] ...>:
> Hi Willy,
>
> Just in case this is still relevant:
>
> On Mon, Mar 26, 2012 at 1:23 AM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>> Hi,
>>
>> I tried to update the branch but I am not at ease with git.
>> I used to only call :
>> git clone http://git.gitorious.org/orocos-toolchain/orocos_toolchain.git
>> git submodule init
>> git submodule update
>>
>> But I can't succed getting the toolchain-2.5 branch. I tried "git
>> clone -b toolchain-2.5
>> http://git.gitorious.org/orocos-toolchain/orocos_toolchain.git" but I
>> think this can't work because only submodules seems to have such a
>> branch.
>> Is the only solution to go in each folder to swtich branch ?
>
> cd ocl
> git checkout toolchain-2.5
>
> Peter

It will be a day, thanks