Working with hexadecimal numbers

Hi,

As I am working on my Can driver, I face the problem of
Hexadecimal<->Decimal conversion.
1/ Does anyone ever tried to log in Hexadecimal ? I used to play with
std::hex, but the logger doesn't accept it silently ("<< std::hex <<
nodeIDOfBootedDevice")
2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?
3/ Is it a way enter hexadecimal numbers in scripts or when calling
operations in the taskBrowser ?

Working with hexadecimal numbers

On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> Hi,
>
> As I am working on my Can driver, I face the problem of
> Hexadecimal<->Decimal conversion.
> 1/ Does anyone ever tried to log in Hexadecimal ? I used to play with
> std::hex, but the logger doesn't accept it silently ("<< std::hex <<
> nodeIDOfBootedDevice")

I have fixed this in the patch in attachment. Can't apply it to 2.3 since it
breaks ABI. But you could do this yourselve

If using git:

git am .../0001-logging-rewrite-streaming-to-allow-formatting.patch

or

patch -p1 < 0001-logging-rewrite-streaming-to-allow-formatting.patch

> 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?

See the attachment for the TaskBrowser. Same restriction as with logging...
Use '.hex' or '.nohex' to turn it on or off. The problem with this is that
every integer number is printed as hex, without the 0x prefix, so it will lead
to confusion, if you forgot that you turned it on... someone should come up
with a better idea.

> 3/ Is it a way enter hexadecimal numbers in scripts or when calling
> operations in the taskBrowser ?

Added this on the toolchain-2.3 branch. you can use 0xabc or 0XABC.

Peter

Working with hexadecimal numbers

2011/3/7 Peter Soetens <peter [..] ...>

> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> > Hi,
> >
> > As I am working on my Can driver, I face the problem of
> > Hexadecimal<->Decimal conversion.
> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to play with
> > std::hex, but the logger doesn't accept it silently ("<< std::hex <<
> > nodeIDOfBootedDevice")
>
> I have fixed this in the patch in attachment. Can't apply it to 2.3 since
> it
> breaks ABI. But you could do this yourselve
>
> If using git:
>
> git am .../0001-logging-rewrite-streaming-to-allow-formatting.patch
>
> or
>
> patch -p1 < 0001-logging-rewrite-streaming-to-allow-formatting.patch
>
> > 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?
>
> See the attachment for the TaskBrowser. Same restriction as with logging...
> Use '.hex' or '.nohex' to turn it on or off. The problem with this is that
> every integer number is printed as hex, without the 0x prefix, so it will
> lead
> to confusion, if you forgot that you turned it on... someone should come up
> with a better idea.
>
> > 3/ Is it a way enter hexadecimal numbers in scripts or when calling
> > operations in the taskBrowser ?
>
> Added this on the toolchain-2.3 branch. you can use 0xabc or 0XABC.
>
>
Thanks so much for all this

> Peter
>

Working with hexadecimal numbers

2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>

>
>
> 2011/3/7 Peter Soetens <peter [..] ...>
>
>> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
>> > Hi,
>> >
>> > As I am working on my Can driver, I face the problem of
>> > Hexadecimal<->Decimal conversion.
>> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to play with
>> > std::hex, but the logger doesn't accept it silently ("<< std::hex <<
>> > nodeIDOfBootedDevice")
>>
>> I have fixed this in the patch in attachment. Can't apply it to 2.3 since
>> it
>> breaks ABI. But you could do this yourselve
>>
>> If using git:
>>
>> git am .../0001-logging-rewrite-streaming-to-allow-formatting.patch
>>
>> or
>>
>> patch -p1 < 0001-logging-rewrite-streaming-to-allow-formatting.patch
>>
>> > 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?
>>
>> See the attachment for the TaskBrowser. Same restriction as with
>> logging...
>> Use '.hex' or '.nohex' to turn it on or off. The problem with this is that
>> every integer number is printed as hex, without the 0x prefix, so it will
>> lead
>> to confusion, if you forgot that you turned it on... someone should come
>> up
>> with a better idea.
>>
>> > 3/ Is it a way enter hexadecimal numbers in scripts or when calling
>> > operations in the taskBrowser ?
>>
>> Added this on the toolchain-2.3 branch. you can use 0xabc or 0XABC.
>>
>

the patches seems to have some issues, the deployer end in segfault :

Starting program:
/media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulinux

Starting program:
/media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulinux

[Thread debugging using libthread_db enabled]
[New Thread 0xb6cd4b70 (LWP 9387)]
[New Thread 0xb64d3b70 (LWP 9388)]
[New Thread 0xb5746b70 (LWP 9389)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
tc=0xbfffecdc, store=true)
at /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
#2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
at /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
#3 0x0805337a in main (argc=<value optimized out>, argv=0xbfffefe4)
at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
(gdb)

>
>>
> Thanks so much for all this
>
>
>
>> Peter
>>
>
>

Working with hexadecimal numbers

On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
>
> > 2011/3/7 Peter Soetens <peter [..] ...>
> >
> >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> >> > Hi,
> >> >
> >> > As I am working on my Can driver, I face the problem of
> >> > Hexadecimal<->Decimal conversion.
> >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to play with
> >> > std::hex, but the logger doesn't accept it silently ("<< std::hex <<
> >> > nodeIDOfBootedDevice")
> >>
> >> I have fixed this in the patch in attachment. Can't apply it to 2.3
> >> since it
> >> breaks ABI. But you could do this yourselve
> >>
> >> If using git:
> >>
> >> git am .../0001-logging-rewrite-streaming-to-allow-formatting.patch
> >>
> >> or
> >>
> >> patch -p1 < 0001-logging-rewrite-streaming-to-allow-formatting.patch
> >>
> >> > 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?
> >>
> >> See the attachment for the TaskBrowser. Same restriction as with
> >> logging...
> >> Use '.hex' or '.nohex' to turn it on or off. The problem with this is
> >> that every integer number is printed as hex, without the 0x prefix, so
> >> it will lead
> >> to confusion, if you forgot that you turned it on... someone should come
> >> up
> >> with a better idea.
> >>
> >> > 3/ Is it a way enter hexadecimal numbers in scripts or when calling
> >> > operations in the taskBrowser ?
> >>
> >> Added this on the toolchain-2.3 branch. you can use 0xabc or 0XABC.
>
> the patches seems to have some issues, the deployer end in segfault :
>
> Starting program:
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulin
> ux
>
> Starting program:
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulin
> ux
>
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb6cd4b70 (LWP 9387)]
> [New Thread 0xb64d3b70 (LWP 9388)]
> [New Thread 0xb5746b70 (LWP 9389)]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000 in ?? ()
> (gdb) bt
> #0 0x00000000 in ?? ()
> #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
> tc=0xbfffecdc, store=true)
> at /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
> at /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> #3 0x0805337a in main (argc=<value optimized out>, argv=0xbfffefe4)
> at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> (gdb)
>

It's not the patches fault. As I wrote, they cause ABI changes, such that you
must make sure that every component and application in the system is
recompiled using the new headers. Since this is a segfault in a part we didn't
change, *and* the this pointer is suddenly 'null', this is such a case.

Also check for components, plugins, typekits etc which are loaded at startup
time, these must be recompiled as well.

Peter

Working with hexadecimal numbers

2011/3/28 Willy Lambert <lambert [dot] willy [..] ...>

>
>
> 2011/3/26 Peter Soetens <peter [..] ...>
>
>> On Fri, Mar 25, 2011 at 11:16 PM, Willy Lambert <lambert [dot] willy [..] ...>
>> wrote:
>> >
>> >
>> > 2011/3/15 Willy Lambert <lambert [dot] willy [..] ...>
>> >>
>> >>
>> >> 2011/3/15 Peter Soetens <peter [..] ...>
>> >>>
>> >>> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
>> >>> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
>> >>> >
>> >>> > > 2011/3/7 Peter Soetens <peter [..] ...>
>> >>> > >
>> >>> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
>> >>> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
>> >>> > >> >
>> >>> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
>> >>> > >> > >
>> >>> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
>> >>> > >> > >> > Hi,
>> >>> > >> > >> >
>> >>> > >> > >> > As I am working on my Can driver, I face the problem of
>> >>> > >> > >> > Hexadecimal<->Decimal conversion.
>> >>> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used
>> to
>> >>> > >> > >> > play
>> >>> > >>
>> >>> > >> with
>> >>> > >>
>> >>> > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
>> >>> > >> > >> > std::hex
>> >>> > >>
>> >>> > >> <<
>> >>> > >>
>> >>> > >> > >> > nodeIDOfBootedDevice")
>> >>> > >> > >>
>> >>> > >> > >> I have fixed this in the patch in attachment. Can't apply it
>> to
>> >>> > >> > >> 2.3
>> >>> > >> > >> since it
>> >>> > >> > >> breaks ABI. But you could do this yourselve
>> >>> > >> > >>
>> >>> > >> > >> If using git:
>> >>> > >> > >>
>> >>> > >> > >> git am
>> >>> > >> > >> .../0001-logging-rewrite-streaming-to-allow-formatting.patch
>> >>> > >> > >>
>> >>> > >> > >> or
>> >>> > >> > >>
>> >>> > >> > >> patch -p1 <
>> >>> > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
>> >>> > >> > >>
>> >>> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
>> >>> > >> > >> > taskBrowser
>> >>> > >> > >> > ?
>> >>> > >> > >>
>> >>> > >> > >> See the attachment for the TaskBrowser. Same restriction as
>> >>> > >> > >> with
>> >>> > >> > >> logging...
>> >>> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem
>> with
>> >>> > >> > >> this
>> >>> > >> > >> is that every integer number is printed as hex, without the
>> 0x
>> >>> > >> > >> prefix,
>> >>> > >>
>> >>> > >> so
>> >>> > >>
>> >>> > >> > >> it will lead
>> >>> > >> > >> to confusion, if you forgot that you turned it on... someone
>> >>> > >> > >> should
>> >>> > >>
>> >>> > >> come
>> >>> > >>
>> >>> > >> > >> up
>> >>> > >> > >> with a better idea.
>> >>> > >> > >>
>> >>> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or
>> when
>> >>> > >> > >> > calling operations in the taskBrowser ?
>> >>> > >> > >>
>> >>> > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or
>> >>> > >> > >> 0XABC.
>> >>> > >> >
>> >>> > >> > the patches seems to have some issues, the deployer end in
>> >>> > >> > segfault :
>> >>> > >>
>> >>> > >> > Starting program:
>> >>> > >>
>> >>> > >>
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>> >>> > >> lin
>> >>> > >>
>> >>> > >> > ux
>> >>> > >>
>> >>> > >> > Starting program:
>> >>> > >>
>> >>> > >>
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>> >>> > >> lin
>> >>> > >>
>> >>> > >> > ux
>> >>> > >> >
>> >>> > >> > [Thread debugging using libthread_db enabled]
>> >>> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
>> >>> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
>> >>> > >> > [New Thread 0xb5746b70 (LWP 9389)]
>> >>> > >> >
>> >>> > >> > Program received signal SIGSEGV, Segmentation fault.
>> >>> > >> > 0x00000000 in ?? ()
>> >>> > >> > (gdb) bt
>> >>> > >> > #0 0x00000000 in ?? ()
>> >>> > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext
>> (this=0x0,
>> >>> > >> > tc=0xbfffecdc, store=true)
>> >>> > >> >
>> >>> > >> > at
>> >>> > >>
>> >>> > >>
>> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
>> >>> > >>
>> >>> > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
>> >>> > >> >
>> >>> > >> > at
>> >>> > >> >
>> >>> > >> >
>> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
>> >>> > >> >
>> >>> > >> > #3 0x0805337a in main (argc=<value optimized out>,
>> >>> > >> > argv=0xbfffefe4)
>> >>> > >> >
>> >>> > >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
>> >>> > >> >
>> >>> > >> > (gdb)
>> >>> > >>
>> >>> > >> It's not the patches fault. As I wrote, they cause ABI changes,
>> such
>> >>> > >> that you
>> >>> > >> must make sure that every component and application in the system
>> is
>> >>> > >> recompiled using the new headers. Since this is a segfault in a
>> part
>> >>> > >> we
>> >>> > >> didn't
>> >>> > >> change, *and* the this pointer is suddenly 'null', this is such a
>> >>> > >> case.
>> >>> > >>
>> >>> > >> Also check for components, plugins, typekits etc which are loaded
>> at
>> >>> > >> startup
>> >>> > >> time, these must be recompiled as well.
>> >>> > >
>> >>> > > Ok I didn'nt think about thoses, now I recompiled every thnig it
>> is
>> >>> > > fine.
>> >>> > > I just tested .hex at the moment.
>> >>> >
>> >>> > What's about properties ? May I also write "0x" in property files ?
>> >>>
>> >>> We could hack this into the demarshallers easily, but there is
>> currently
>> >>> no
>> >>> way to write it out like that, for a specific property. The
>> fundamental
>> >>> problem
>> >>> is that we store it in a 'text' format, instead of an unambiguous
>> >>> 'binary'
>> >>> format.
>> >>>
>> >>> This problem is of the same as the precision questions regarding
>> doubles.
>> >>> We
>> >>> have no way to specify formatting of a property object. Since
>> formatting
>> >>> in
>> >>> C++ is already handled by the ios_base::fmtflags classes, it's maybe
>> >>> sufficient
>> >>> to store such formatting instructions and then to apply them when the
>> >>> property
>> >>> is written out or read in from text (or printed in the taskbrowser)
>> >>>
>> >>> It's probably worthwhile to create a ticket for this and see how far
>> we
>> >>> get.
>> >>
>> >> I'll do it tonigth. BTW, it seems that the .nohex doesn't always work
>> to
>> >> switch off the hex format
>> >
>> > I have some problems with logging after thoses patches :
>> >
>> > 0.292 [ Warning][ScriptingService]
>> >
>> 413010915811038408301.30109e+0917232204800305841240000003050019696000/media/DD_data/opt/ros/ard/arp_core/lib/orocos/gnulinux/types/media/DD_data/opt/ros/ard/arp_hml/lib/orocos/gnulinux/plugins====================
>> > 0.294 [ Warning][ScriptingService] début déploiment HML
>> > 0.378 [ Warning][ScriptingService]
>> >
>> 03030797168000030224044640000301401176000003005619056000.0503030797168000.0503022404464000.05Fin
>> > déploiment HML
>> >
>> >
>> > It seems something is not reinitialized correctly. It happens randomly.
>>
>> Could you run the app with valgrind and post the output ? We should be
>> able to find this with that info.
>>
>
> arg, I needed to correct my application before sending the log :p, it is
> done (and I still have the problem, the contrary would have been stranged)
> see attached the orocos.log with -lDebug, the valgrind logfile with this
> command launch :
> valgrind --log-file=valgrind.log
> /opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulinux -s
> script/deployment/deploy_hml.ops
>
> What is interesting is that the problem disapear when I use the -lDebug
> option !
>

I messed up, I first sended the -lDebug log files (but is currently blocked
because too heavy 80kb)
Here is the log files without the -lDebug option

>
> P.S. : I don't know if you have seen in the mails before : ".nohex" doesn't
> seems to work porperly
>
>
>
>
>
>>
>> Peter
>>
>
>

Working with hexadecimal numbers

On Monday 28 March 2011 02:11:26 Willy Lambert wrote:
> 2011/3/28 Willy Lambert <lambert [dot] willy [..] ...>
>
> > 2011/3/26 Peter Soetens <peter [..] ...>
> >
> >> On Fri, Mar 25, 2011 at 11:16 PM, Willy Lambert
> >> <lambert [dot] willy [..] ...>
> >>
> >> wrote:
> >> > 2011/3/15 Willy Lambert <lambert [dot] willy [..] ...>
> >> >
> >> >> 2011/3/15 Peter Soetens <peter [..] ...>
> >> >>
> >> >>> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
> >> >>> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
> >> >>> >
> >> >>> > > 2011/3/7 Peter Soetens <peter [..] ...>
> >> >>> > >
> >> >>> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> >> >>> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> >> >>> > >> >
> >> >>> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
> >> >>> > >> > >
> >> >>> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> >> >>> > >> > >> > Hi,
> >> >>> > >> > >> >
> >> >>> > >> > >> > As I am working on my Can driver, I face the problem of
> >> >>> > >> > >> > Hexadecimal<->Decimal conversion.
> >> >>> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used
> >>
> >> to
> >>
> >> >>> > >> > >> > play
> >> >>> > >>
> >> >>> > >> with
> >> >>> > >>
> >> >>> > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
> >> >>> > >> > >> > std::hex
> >> >>> > >>
> >> >>> > >> <<
> >> >>> > >>
> >> >>> > >> > >> > nodeIDOfBootedDevice")
> >> >>> > >> > >>
> >> >>> > >> > >> I have fixed this in the patch in attachment. Can't apply
> >> >>> > >> > >> it
> >>
> >> to
> >>
> >> >>> > >> > >> 2.3
> >> >>> > >> > >> since it
> >> >>> > >> > >> breaks ABI. But you could do this yourselve
> >> >>> > >> > >>
> >> >>> > >> > >> If using git:
> >> >>> > >> > >>
> >> >>> > >> > >> git am
> >> >>> > >> > >> .../0001-logging-rewrite-streaming-to-allow-formatting.pat
> >> >>> > >> > >> ch
> >> >>> > >> > >>
> >> >>> > >> > >> or
> >> >>> > >> > >>
> >> >>> > >> > >> patch -p1 <
> >> >>> > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
> >> >>> > >> > >>
> >> >>> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
> >> >>> > >> > >> > taskBrowser
> >> >>> > >> > >> > ?
> >> >>> > >> > >>
> >> >>> > >> > >> See the attachment for the TaskBrowser. Same restriction
> >> >>> > >> > >> as with
> >> >>> > >> > >> logging...
> >> >>> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem
> >>
> >> with
> >>
> >> >>> > >> > >> this
> >> >>> > >> > >> is that every integer number is printed as hex, without
> >> >>> > >> > >> the
> >>
> >> 0x
> >>
> >> >>> > >> > >> prefix,
> >> >>> > >>
> >> >>> > >> so
> >> >>> > >>
> >> >>> > >> > >> it will lead
> >> >>> > >> > >> to confusion, if you forgot that you turned it on...
> >> >>> > >> > >> someone should
> >> >>> > >>
> >> >>> > >> come
> >> >>> > >>
> >> >>> > >> > >> up
> >> >>> > >> > >> with a better idea.
> >> >>> > >> > >>
> >> >>> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or
> >>
> >> when
> >>
> >> >>> > >> > >> > calling operations in the taskBrowser ?
> >> >>> > >> > >>
> >> >>> > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc
> >> >>> > >> > >> or 0XABC.
> >> >>> > >> >
> >> >>> > >> > the patches seems to have some issues, the deployer end in
> >> >>> > >> > segfault :
> >>
> >> >>> > >> > Starting program:
> >> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >>
> >> >>> > >> lin
> >> >>> > >>
> >> >>> > >> > ux
> >>
> >> >>> > >> > Starting program:
> >> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >>
> >> >>> > >> lin
> >> >>> > >>
> >> >>> > >> > ux
> >> >>> > >> >
> >> >>> > >> > [Thread debugging using libthread_db enabled]
> >> >>> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
> >> >>> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
> >> >>> > >> > [New Thread 0xb5746b70 (LWP 9389)]
> >> >>> > >> >
> >> >>> > >> > Program received signal SIGSEGV, Segmentation fault.
> >> >>> > >> > 0x00000000 in ?? ()
> >> >>> > >> > (gdb) bt
> >> >>> > >> > #0 0x00000000 in ?? ()
> >> >>> > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext
> >>
> >> (this=0x0,
> >>
> >> >>> > >> > tc=0xbfffecdc, store=true)
> >> >>> > >> >
> >> >>> > >> > at
> >>
> >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> >>
> >> >>> > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04,
> >> >>> > >> > _c=0xbfffecdc)
> >> >>> > >> >
> >> >>> > >> > at
> >>
> >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> >>
> >> >>> > >> > #3 0x0805337a in main (argc=<value optimized out>,
> >> >>> > >> > argv=0xbfffefe4)
> >> >>> > >> >
> >> >>> > >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> >> >>> > >> >
> >> >>> > >> > (gdb)
> >> >>> > >>
> >> >>> > >> It's not the patches fault. As I wrote, they cause ABI changes,
> >>
> >> such
> >>
> >> >>> > >> that you
> >> >>> > >> must make sure that every component and application in the
> >> >>> > >> system
> >>
> >> is
> >>
> >> >>> > >> recompiled using the new headers. Since this is a segfault in a
> >>
> >> part
> >>
> >> >>> > >> we
> >> >>> > >> didn't
> >> >>> > >> change, *and* the this pointer is suddenly 'null', this is such
> >> >>> > >> a case.
> >> >>> > >>
> >> >>> > >> Also check for components, plugins, typekits etc which are
> >> >>> > >> loaded
> >>
> >> at
> >>
> >> >>> > >> startup
> >> >>> > >> time, these must be recompiled as well.
> >> >>> > >
> >> >>> > > Ok I didn'nt think about thoses, now I recompiled every thnig it
> >>
> >> is
> >>
> >> >>> > > fine.
> >> >>> > > I just tested .hex at the moment.
> >> >>> >
> >> >>> > What's about properties ? May I also write "0x" in property files
> >> >>> > ?
> >> >>>
> >> >>> We could hack this into the demarshallers easily, but there is
> >>
> >> currently
> >>
> >> >>> no
> >> >>> way to write it out like that, for a specific property. The
> >>
> >> fundamental
> >>
> >> >>> problem
> >> >>> is that we store it in a 'text' format, instead of an unambiguous
> >> >>> 'binary'
> >> >>> format.
> >> >>>
> >> >>> This problem is of the same as the precision questions regarding
> >>
> >> doubles.
> >>
> >> >>> We
> >> >>> have no way to specify formatting of a property object. Since
> >>
> >> formatting
> >>
> >> >>> in
> >> >>> C++ is already handled by the ios_base::fmtflags classes, it's maybe
> >> >>> sufficient
> >> >>> to store such formatting instructions and then to apply them when
> >> >>> the property
> >> >>> is written out or read in from text (or printed in the taskbrowser)
> >> >>>
> >> >>> It's probably worthwhile to create a ticket for this and see how far
> >>
> >> we
> >>
> >> >>> get.
> >> >>
> >> >> I'll do it tonigth. BTW, it seems that the .nohex doesn't always work
> >>
> >> to
> >>
> >> >> switch off the hex format
> >> >
> >> > I have some problems with logging after thoses patches :
> >> >
> >> > 0.292 [ Warning][ScriptingService]
> >>
> >> 413010915811038408301.30109e+0917232204800305841240000003050019696000/me
> >> dia/DD_data/opt/ros/ard/arp_core/lib/orocos/gnulinux/types/media/DD_data
> >> /opt/ros/ard/arp_hml/lib/orocos/gnulinux/plugins====================
> >>
> >> > 0.294 [ Warning][ScriptingService] début déploiment HML
> >> > 0.378 [ Warning][ScriptingService]
> >>
> >> 03030797168000030224044640000301401176000003005619056000.050303079716800
> >> 0.0503022404464000.05Fin
> >>
> >> > déploiment HML
> >> >
> >> >
> >> > It seems something is not reinitialized correctly. It happens
> >> > randomly.
> >>
> >> Could you run the app with valgrind and post the output ? We should be
> >> able to find this with that info.
> >
> > arg, I needed to correct my application before sending the log :p, it is
> > done (and I still have the problem, the contrary would have been
> > stranged) see attached the orocos.log with -lDebug, the valgrind logfile
> > with this command launch :
> > valgrind --log-file=valgrind.log
> > /opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulinux -s
> > script/deployment/deploy_hml.ops
> >
> > What is interesting is that the problem disapear when I use the -lDebug
> > option !
>
> I messed up, I first sended the -lDebug log files (but is currently blocked
> because too heavy 80kb)
> Here is the log files without the -lDebug option
>

I can't find any proof yet, but it still looks like you have inconsistent
ABI's, ie did not recompile everything after you applied the patch. The patch
itself looks clean to me. Both patches look fine btw...

> > P.S. : I don't know if you have seen in the mails before : ".nohex"
> > doesn't seems to work porperly
> >
> >> Peter

Peter

Working with hexadecimal numbers

2011/3/28 Peter Soetens <peter [..] ...>

> On Monday 28 March 2011 02:11:26 Willy Lambert wrote:
> > 2011/3/28 Willy Lambert <lambert [dot] willy [..] ...>
> >
> > > 2011/3/26 Peter Soetens <peter [..] ...>
> > >
> > >> On Fri, Mar 25, 2011 at 11:16 PM, Willy Lambert
> > >> <lambert [dot] willy [..] ...>
> > >>
> > >> wrote:
> > >> > 2011/3/15 Willy Lambert <lambert [dot] willy [..] ...>
> > >> >
> > >> >> 2011/3/15 Peter Soetens <peter [..] ...>
> > >> >>
> > >> >>> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
> > >> >>> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
> > >> >>> >
> > >> >>> > > 2011/3/7 Peter Soetens <peter [..] ...>
> > >> >>> > >
> > >> >>> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> > >> >>> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> > >> >>> > >> >
> > >> >>> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
> > >> >>> > >> > >
> > >> >>> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> > >> >>> > >> > >> > Hi,
> > >> >>> > >> > >> >
> > >> >>> > >> > >> > As I am working on my Can driver, I face the problem
> of
> > >> >>> > >> > >> > Hexadecimal<->Decimal conversion.
> > >> >>> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I
> used
> > >>
> > >> to
> > >>
> > >> >>> > >> > >> > play
> > >> >>> > >>
> > >> >>> > >> with
> > >> >>> > >>
> > >> >>> > >> > >> > std::hex, but the logger doesn't accept it silently
> ("<<
> > >> >>> > >> > >> > std::hex
> > >> >>> > >>
> > >> >>> > >> <<
> > >> >>> > >>
> > >> >>> > >> > >> > nodeIDOfBootedDevice")
> > >> >>> > >> > >>
> > >> >>> > >> > >> I have fixed this in the patch in attachment. Can't
> apply
> > >> >>> > >> > >> it
> > >>
> > >> to
> > >>
> > >> >>> > >> > >> 2.3
> > >> >>> > >> > >> since it
> > >> >>> > >> > >> breaks ABI. But you could do this yourselve
> > >> >>> > >> > >>
> > >> >>> > >> > >> If using git:
> > >> >>> > >> > >>
> > >> >>> > >> > >> git am
> > >> >>> > >> > >>
> .../0001-logging-rewrite-streaming-to-allow-formatting.pat
> > >> >>> > >> > >> ch
> > >> >>> > >> > >>
> > >> >>> > >> > >> or
> > >> >>> > >> > >>
> > >> >>> > >> > >> patch -p1 <
> > >> >>> > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
> > >> >>> > >> > >>
> > >> >>> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
> > >> >>> > >> > >> > taskBrowser
> > >> >>> > >> > >> > ?
> > >> >>> > >> > >>
> > >> >>> > >> > >> See the attachment for the TaskBrowser. Same restriction
> > >> >>> > >> > >> as with
> > >> >>> > >> > >> logging...
> > >> >>> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem
> > >>
> > >> with
> > >>
> > >> >>> > >> > >> this
> > >> >>> > >> > >> is that every integer number is printed as hex, without
> > >> >>> > >> > >> the
> > >>
> > >> 0x
> > >>
> > >> >>> > >> > >> prefix,
> > >> >>> > >>
> > >> >>> > >> so
> > >> >>> > >>
> > >> >>> > >> > >> it will lead
> > >> >>> > >> > >> to confusion, if you forgot that you turned it on...
> > >> >>> > >> > >> someone should
> > >> >>> > >>
> > >> >>> > >> come
> > >> >>> > >>
> > >> >>> > >> > >> up
> > >> >>> > >> > >> with a better idea.
> > >> >>> > >> > >>
> > >> >>> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or
> > >>
> > >> when
> > >>
> > >> >>> > >> > >> > calling operations in the taskBrowser ?
> > >> >>> > >> > >>
> > >> >>> > >> > >> Added this on the toolchain-2.3 branch. you can use
> 0xabc
> > >> >>> > >> > >> or 0XABC.
> > >> >>> > >> >
> > >> >>> > >> > the patches seems to have some issues, the deployer end in
> > >> >>> > >> > segfault :
> > >>
> > >> >>> > >> > Starting program:
> > >>
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> > >>
> > >> >>> > >> lin
> > >> >>> > >>
> > >> >>> > >> > ux
> > >>
> > >> >>> > >> > Starting program:
> > >>
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> > >>
> > >> >>> > >> lin
> > >> >>> > >>
> > >> >>> > >> > ux
> > >> >>> > >> >
> > >> >>> > >> > [Thread debugging using libthread_db enabled]
> > >> >>> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
> > >> >>> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
> > >> >>> > >> > [New Thread 0xb5746b70 (LWP 9389)]
> > >> >>> > >> >
> > >> >>> > >> > Program received signal SIGSEGV, Segmentation fault.
> > >> >>> > >> > 0x00000000 in ?? ()
> > >> >>> > >> > (gdb) bt
> > >> >>> > >> > #0 0x00000000 in ?? ()
> > >> >>> > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext
> > >>
> > >> (this=0x0,
> > >>
> > >> >>> > >> > tc=0xbfffecdc, store=true)
> > >> >>> > >> >
> > >> >>> > >> > at
> > >>
> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> > >>
> > >> >>> > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04,
> > >> >>> > >> > _c=0xbfffecdc)
> > >> >>> > >> >
> > >> >>> > >> > at
> > >>
> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> > >>
> > >> >>> > >> > #3 0x0805337a in main (argc=<value optimized out>,
> > >> >>> > >> > argv=0xbfffefe4)
> > >> >>> > >> >
> > >> >>> > >> > at
> /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> > >> >>> > >> >
> > >> >>> > >> > (gdb)
> > >> >>> > >>
> > >> >>> > >> It's not the patches fault. As I wrote, they cause ABI
> changes,
> > >>
> > >> such
> > >>
> > >> >>> > >> that you
> > >> >>> > >> must make sure that every component and application in the
> > >> >>> > >> system
> > >>
> > >> is
> > >>
> > >> >>> > >> recompiled using the new headers. Since this is a segfault in
> a
> > >>
> > >> part
> > >>
> > >> >>> > >> we
> > >> >>> > >> didn't
> > >> >>> > >> change, *and* the this pointer is suddenly 'null', this is
> such
> > >> >>> > >> a case.
> > >> >>> > >>
> > >> >>> > >> Also check for components, plugins, typekits etc which are
> > >> >>> > >> loaded
> > >>
> > >> at
> > >>
> > >> >>> > >> startup
> > >> >>> > >> time, these must be recompiled as well.
> > >> >>> > >
> > >> >>> > > Ok I didn'nt think about thoses, now I recompiled every thnig
> it
> > >>
> > >> is
> > >>
> > >> >>> > > fine.
> > >> >>> > > I just tested .hex at the moment.
> > >> >>> >
> > >> >>> > What's about properties ? May I also write "0x" in property
> files
> > >> >>> > ?
> > >> >>>
> > >> >>> We could hack this into the demarshallers easily, but there is
> > >>
> > >> currently
> > >>
> > >> >>> no
> > >> >>> way to write it out like that, for a specific property. The
> > >>
> > >> fundamental
> > >>
> > >> >>> problem
> > >> >>> is that we store it in a 'text' format, instead of an unambiguous
> > >> >>> 'binary'
> > >> >>> format.
> > >> >>>
> > >> >>> This problem is of the same as the precision questions regarding
> > >>
> > >> doubles.
> > >>
> > >> >>> We
> > >> >>> have no way to specify formatting of a property object. Since
> > >>
> > >> formatting
> > >>
> > >> >>> in
> > >> >>> C++ is already handled by the ios_base::fmtflags classes, it's
> maybe
> > >> >>> sufficient
> > >> >>> to store such formatting instructions and then to apply them when
> > >> >>> the property
> > >> >>> is written out or read in from text (or printed in the
> taskbrowser)
> > >> >>>
> > >> >>> It's probably worthwhile to create a ticket for this and see how
> far
> > >>
> > >> we
> > >>
> > >> >>> get.
> > >> >>
> > >> >> I'll do it tonigth. BTW, it seems that the .nohex doesn't always
> work
> > >>
> > >> to
> > >>
> > >> >> switch off the hex format
> > >> >
> > >> > I have some problems with logging after thoses patches :
> > >> >
> > >> > 0.292 [ Warning][ScriptingService]
> > >>
> > >>
> 413010915811038408301.30109e+0917232204800305841240000003050019696000/me
> > >>
> dia/DD_data/opt/ros/ard/arp_core/lib/orocos/gnulinux/types/media/DD_data
> > >> /opt/ros/ard/arp_hml/lib/orocos/gnulinux/plugins====================
> > >>
> > >> > 0.294 [ Warning][ScriptingService] début déploiment HML
> > >> > 0.378 [ Warning][ScriptingService]
> > >>
> > >>
> 03030797168000030224044640000301401176000003005619056000.050303079716800
> > >> 0.0503022404464000.05Fin
> > >>
> > >> > déploiment HML
> > >> >
> > >> >
> > >> > It seems something is not reinitialized correctly. It happens
> > >> > randomly.
> > >>
> > >> Could you run the app with valgrind and post the output ? We should be
> > >> able to find this with that info.
> > >
> > > arg, I needed to correct my application before sending the log :p, it
> is
> > > done (and I still have the problem, the contrary would have been
> > > stranged) see attached the orocos.log with -lDebug, the valgrind
> logfile
> > > with this command launch :
> > > valgrind --log-file=valgrind.log
> > > /opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulinux -s
> > > script/deployment/deploy_hml.ops
> > >
> > > What is interesting is that the problem disapear when I use the -lDebug
> > > option !
> >
> > I messed up, I first sended the -lDebug log files (but is currently
> blocked
> > because too heavy 80kb)
> > Here is the log files without the -lDebug option
> >
>
> I can't find any proof yet, but it still looks like you have inconsistent
> ABI's, ie did not recompile everything after you applied the patch. The
> patch
> itself looks clean to me. Both patches look fine btw...
>

Ok, so I'll do the test

>
> > > P.S. : I don't know if you have seen in the mails before : ".nohex"
> > > doesn't seems to work porperly
> > >
> > >> Peter
>
> Peter
>

Working with hexadecimal numbers

2011/3/28 Willy Lambert <lambert [dot] willy [..] ...>

>
>
> 2011/3/28 Peter Soetens <peter [..] ...>
>
>> On Monday 28 March 2011 02:11:26 Willy Lambert wrote:
>> > 2011/3/28 Willy Lambert <lambert [dot] willy [..] ...>
>> >
>> > > 2011/3/26 Peter Soetens <peter [..] ...>
>> > >
>> > >> On Fri, Mar 25, 2011 at 11:16 PM, Willy Lambert
>> > >> <lambert [dot] willy [..] ...>
>> > >>
>> > >> wrote:
>> > >> > 2011/3/15 Willy Lambert <lambert [dot] willy [..] ...>
>> > >> >
>> > >> >> 2011/3/15 Peter Soetens <peter [..] ...>
>> > >> >>
>> > >> >>> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
>> > >> >>> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
>> > >> >>> >
>> > >> >>> > > 2011/3/7 Peter Soetens <peter [..] ...>
>> > >> >>> > >
>> > >> >>> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
>> > >> >>> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
>> > >> >>> > >> >
>> > >> >>> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
>> > >> >>> > >> > >
>> > >> >>> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
>> > >> >>> > >> > >> > Hi,
>> > >> >>> > >> > >> >
>> > >> >>> > >> > >> > As I am working on my Can driver, I face the problem
>> of
>> > >> >>> > >> > >> > Hexadecimal<->Decimal conversion.
>> > >> >>> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I
>> used
>> > >>
>> > >> to
>> > >>
>> > >> >>> > >> > >> > play
>> > >> >>> > >>
>> > >> >>> > >> with
>> > >> >>> > >>
>> > >> >>> > >> > >> > std::hex, but the logger doesn't accept it silently
>> ("<<
>> > >> >>> > >> > >> > std::hex
>> > >> >>> > >>
>> > >> >>> > >> <<
>> > >> >>> > >>
>> > >> >>> > >> > >> > nodeIDOfBootedDevice")
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> I have fixed this in the patch in attachment. Can't
>> apply
>> > >> >>> > >> > >> it
>> > >>
>> > >> to
>> > >>
>> > >> >>> > >> > >> 2.3
>> > >> >>> > >> > >> since it
>> > >> >>> > >> > >> breaks ABI. But you could do this yourselve
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> If using git:
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> git am
>> > >> >>> > >> > >>
>> .../0001-logging-rewrite-streaming-to-allow-formatting.pat
>> > >> >>> > >> > >> ch
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> or
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> patch -p1 <
>> > >> >>> > >> > >>
>> 0001-logging-rewrite-streaming-to-allow-formatting.patch
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
>> > >> >>> > >> > >> > taskBrowser
>> > >> >>> > >> > >> > ?
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> See the attachment for the TaskBrowser. Same
>> restriction
>> > >> >>> > >> > >> as with
>> > >> >>> > >> > >> logging...
>> > >> >>> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The
>> problem
>> > >>
>> > >> with
>> > >>
>> > >> >>> > >> > >> this
>> > >> >>> > >> > >> is that every integer number is printed as hex, without
>> > >> >>> > >> > >> the
>> > >>
>> > >> 0x
>> > >>
>> > >> >>> > >> > >> prefix,
>> > >> >>> > >>
>> > >> >>> > >> so
>> > >> >>> > >>
>> > >> >>> > >> > >> it will lead
>> > >> >>> > >> > >> to confusion, if you forgot that you turned it on...
>> > >> >>> > >> > >> someone should
>> > >> >>> > >>
>> > >> >>> > >> come
>> > >> >>> > >>
>> > >> >>> > >> > >> up
>> > >> >>> > >> > >> with a better idea.
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts
>> or
>> > >>
>> > >> when
>> > >>
>> > >> >>> > >> > >> > calling operations in the taskBrowser ?
>> > >> >>> > >> > >>
>> > >> >>> > >> > >> Added this on the toolchain-2.3 branch. you can use
>> 0xabc
>> > >> >>> > >> > >> or 0XABC.
>> > >> >>> > >> >
>> > >> >>> > >> > the patches seems to have some issues, the deployer end in
>> > >> >>> > >> > segfault :
>> > >>
>> > >> >>> > >> > Starting program:
>> > >>
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>> > >>
>> > >> >>> > >> lin
>> > >> >>> > >>
>> > >> >>> > >> > ux
>> > >>
>> > >> >>> > >> > Starting program:
>> > >>
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>> > >>
>> > >> >>> > >> lin
>> > >> >>> > >>
>> > >> >>> > >> > ux
>> > >> >>> > >> >
>> > >> >>> > >> > [Thread debugging using libthread_db enabled]
>> > >> >>> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
>> > >> >>> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
>> > >> >>> > >> > [New Thread 0xb5746b70 (LWP 9389)]
>> > >> >>> > >> >
>> > >> >>> > >> > Program received signal SIGSEGV, Segmentation fault.
>> > >> >>> > >> > 0x00000000 in ?? ()
>> > >> >>> > >> > (gdb) bt
>> > >> >>> > >> > #0 0x00000000 in ?? ()
>> > >> >>> > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext
>> > >>
>> > >> (this=0x0,
>> > >>
>> > >> >>> > >> > tc=0xbfffecdc, store=true)
>> > >> >>> > >> >
>> > >> >>> > >> > at
>> > >>
>> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
>> > >>
>> > >> >>> > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04,
>> > >> >>> > >> > _c=0xbfffecdc)
>> > >> >>> > >> >
>> > >> >>> > >> > at
>> > >>
>> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
>> > >>
>> > >> >>> > >> > #3 0x0805337a in main (argc=<value optimized out>,
>> > >> >>> > >> > argv=0xbfffefe4)
>> > >> >>> > >> >
>> > >> >>> > >> > at
>> /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
>> > >> >>> > >> >
>> > >> >>> > >> > (gdb)
>> > >> >>> > >>
>> > >> >>> > >> It's not the patches fault. As I wrote, they cause ABI
>> changes,
>> > >>
>> > >> such
>> > >>
>> > >> >>> > >> that you
>> > >> >>> > >> must make sure that every component and application in the
>> > >> >>> > >> system
>> > >>
>> > >> is
>> > >>
>> > >> >>> > >> recompiled using the new headers. Since this is a segfault
>> in a
>> > >>
>> > >> part
>> > >>
>> > >> >>> > >> we
>> > >> >>> > >> didn't
>> > >> >>> > >> change, *and* the this pointer is suddenly 'null', this is
>> such
>> > >> >>> > >> a case.
>> > >> >>> > >>
>> > >> >>> > >> Also check for components, plugins, typekits etc which are
>> > >> >>> > >> loaded
>> > >>
>> > >> at
>> > >>
>> > >> >>> > >> startup
>> > >> >>> > >> time, these must be recompiled as well.
>> > >> >>> > >
>> > >> >>> > > Ok I didn'nt think about thoses, now I recompiled every thnig
>> it
>> > >>
>> > >> is
>> > >>
>> > >> >>> > > fine.
>> > >> >>> > > I just tested .hex at the moment.
>> > >> >>> >
>> > >> >>> > What's about properties ? May I also write "0x" in property
>> files
>> > >> >>> > ?
>> > >> >>>
>> > >> >>> We could hack this into the demarshallers easily, but there is
>> > >>
>> > >> currently
>> > >>
>> > >> >>> no
>> > >> >>> way to write it out like that, for a specific property. The
>> > >>
>> > >> fundamental
>> > >>
>> > >> >>> problem
>> > >> >>> is that we store it in a 'text' format, instead of an unambiguous
>> > >> >>> 'binary'
>> > >> >>> format.
>> > >> >>>
>> > >> >>> This problem is of the same as the precision questions regarding
>> > >>
>> > >> doubles.
>> > >>
>> > >> >>> We
>> > >> >>> have no way to specify formatting of a property object. Since
>> > >>
>> > >> formatting
>> > >>
>> > >> >>> in
>> > >> >>> C++ is already handled by the ios_base::fmtflags classes, it's
>> maybe
>> > >> >>> sufficient
>> > >> >>> to store such formatting instructions and then to apply them when
>> > >> >>> the property
>> > >> >>> is written out or read in from text (or printed in the
>> taskbrowser)
>> > >> >>>
>> > >> >>> It's probably worthwhile to create a ticket for this and see how
>> far
>> > >>
>> > >> we
>> > >>
>> > >> >>> get.
>> > >> >>
>> > >> >> I'll do it tonigth. BTW, it seems that the .nohex doesn't always
>> work
>> > >>
>> > >> to
>> > >>
>> > >> >> switch off the hex format
>> > >> >
>> > >> > I have some problems with logging after thoses patches :
>> > >> >
>> > >> > 0.292 [ Warning][ScriptingService]
>> > >>
>> > >>
>> 413010915811038408301.30109e+0917232204800305841240000003050019696000/me
>> > >>
>> dia/DD_data/opt/ros/ard/arp_core/lib/orocos/gnulinux/types/media/DD_data
>> > >> /opt/ros/ard/arp_hml/lib/orocos/gnulinux/plugins====================
>> > >>
>> > >> > 0.294 [ Warning][ScriptingService] début déploiment HML
>> > >> > 0.378 [ Warning][ScriptingService]
>> > >>
>> > >>
>> 03030797168000030224044640000301401176000003005619056000.050303079716800
>> > >> 0.0503022404464000.05Fin
>> > >>
>> > >> > déploiment HML
>> > >> >
>> > >> >
>> > >> > It seems something is not reinitialized correctly. It happens
>> > >> > randomly.
>> > >>
>> > >> Could you run the app with valgrind and post the output ? We should
>> be
>> > >> able to find this with that info.
>> > >
>> > > arg, I needed to correct my application before sending the log :p, it
>> is
>> > > done (and I still have the problem, the contrary would have been
>> > > stranged) see attached the orocos.log with -lDebug, the valgrind
>> logfile
>> > > with this command launch :
>> > > valgrind --log-file=valgrind.log
>> > > /opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulinux -s
>> > > script/deployment/deploy_hml.ops
>> > >
>> > > What is interesting is that the problem disapear when I use the
>> -lDebug
>> > > option !
>> >
>> > I messed up, I first sended the -lDebug log files (but is currently
>> blocked
>> > because too heavy 80kb)
>> > Here is the log files without the -lDebug option
>> >
>>
>> I can't find any proof yet, but it still looks like you have inconsistent
>> ABI's, ie did not recompile everything after you applied the patch. The
>> patch
>> itself looks clean to me. Both patches look fine btw...
>>
>
> Ok, so I'll do the test
>
>

I deleted my orocos_toolchain_ros and personnal application stack. Get all
from svn and git. Switch branches to toolchain-2.3 for
rtt/ocl/utilmm/utilrb/log4cpp/orogen/typelib
apply ocl and rtt patches
compile all this (something like 2 or 3 hours :( )
and run the app again and I still have the problem with this kind of error :

0.195 [ ERROR ][ScriptingService]
03032066928000030236742240000301528152000003006888816000.0503032066928000.0503023674224000.1[Can1]
failed to configure : canOpen(can1,250K) failed.

I use log(Someting) << "[" << getName() << "]" mytext" << endlog(); for
logging, it don't think it may harm.

>
>> > > P.S. : I don't know if you have seen in the mails before : ".nohex"
>> > > doesn't seems to work porperly
>> > >
>> > >> Peter
>>
>> Peter
>>
>
>

Working with hexadecimal numbers

2011/3/7 Peter Soetens <peter [..] ...>

> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> >
> > > 2011/3/7 Peter Soetens <peter [..] ...>
> > >
> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> > >> > Hi,
> > >> >
> > >> > As I am working on my Can driver, I face the problem of
> > >> > Hexadecimal<->Decimal conversion.
> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to play
> with
> > >> > std::hex, but the logger doesn't accept it silently ("<< std::hex <<
> > >> > nodeIDOfBootedDevice")
> > >>
> > >> I have fixed this in the patch in attachment. Can't apply it to 2.3
> > >> since it
> > >> breaks ABI. But you could do this yourselve
> > >>
> > >> If using git:
> > >>
> > >> git am .../0001-logging-rewrite-streaming-to-allow-formatting.patch
> > >>
> > >> or
> > >>
> > >> patch -p1 < 0001-logging-rewrite-streaming-to-allow-formatting.patch
> > >>
> > >> > 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?
> > >>
> > >> See the attachment for the TaskBrowser. Same restriction as with
> > >> logging...
> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with this is
> > >> that every integer number is printed as hex, without the 0x prefix, so
> > >> it will lead
> > >> to confusion, if you forgot that you turned it on... someone should
> come
> > >> up
> > >> with a better idea.
> > >>
> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when calling
> > >> > operations in the taskBrowser ?
> > >>
> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or 0XABC.
> >
> > the patches seems to have some issues, the deployer end in segfault :
> >
> > Starting program:
> >
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulin
> > ux
> >
> > Starting program:
> >
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulin
> > ux
> >
> > [Thread debugging using libthread_db enabled]
> > [New Thread 0xb6cd4b70 (LWP 9387)]
> > [New Thread 0xb64d3b70 (LWP 9388)]
> > [New Thread 0xb5746b70 (LWP 9389)]
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00000000 in ?? ()
> > (gdb) bt
> > #0 0x00000000 in ?? ()
> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
> > tc=0xbfffecdc, store=true)
> > at /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
> > at /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> > #3 0x0805337a in main (argc=<value optimized out>, argv=0xbfffefe4)
> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> > (gdb)
> >
>
> It's not the patches fault. As I wrote, they cause ABI changes, such that
> you
> must make sure that every component and application in the system is
> recompiled using the new headers. Since this is a segfault in a part we
> didn't
> change, *and* the this pointer is suddenly 'null', this is such a case.
>
> Also check for components, plugins, typekits etc which are loaded at
> startup
> time, these must be recompiled as well.
>

Ok I didn'nt think about thoses, now I recompiled every thnig it is fine. I
just tested .hex at the moment.

>
> Peter
>

Working with hexadecimal numbers

2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>

>
>
> 2011/3/7 Peter Soetens <peter [..] ...>
>
>> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
>> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
>> >
>> > > 2011/3/7 Peter Soetens <peter [..] ...>
>> > >
>> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
>> > >> > Hi,
>> > >> >
>> > >> > As I am working on my Can driver, I face the problem of
>> > >> > Hexadecimal<->Decimal conversion.
>> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to play
>> with
>> > >> > std::hex, but the logger doesn't accept it silently ("<< std::hex
>> <<
>> > >> > nodeIDOfBootedDevice")
>> > >>
>> > >> I have fixed this in the patch in attachment. Can't apply it to 2.3
>> > >> since it
>> > >> breaks ABI. But you could do this yourselve
>> > >>
>> > >> If using git:
>> > >>
>> > >> git am .../0001-logging-rewrite-streaming-to-allow-formatting.patch
>> > >>
>> > >> or
>> > >>
>> > >> patch -p1 < 0001-logging-rewrite-streaming-to-allow-formatting.patch
>> > >>
>> > >> > 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?
>> > >>
>> > >> See the attachment for the TaskBrowser. Same restriction as with
>> > >> logging...
>> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with this is
>> > >> that every integer number is printed as hex, without the 0x prefix,
>> so
>> > >> it will lead
>> > >> to confusion, if you forgot that you turned it on... someone should
>> come
>> > >> up
>> > >> with a better idea.
>> > >>
>> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when calling
>> > >> > operations in the taskBrowser ?
>> > >>
>> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or 0XABC.
>> >
>> > the patches seems to have some issues, the deployer end in segfault :
>> >
>> > Starting program:
>> >
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulin
>> > ux
>> >
>> > Starting program:
>> >
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulin
>> > ux
>> >
>> > [Thread debugging using libthread_db enabled]
>> > [New Thread 0xb6cd4b70 (LWP 9387)]
>> > [New Thread 0xb64d3b70 (LWP 9388)]
>> > [New Thread 0xb5746b70 (LWP 9389)]
>> >
>> > Program received signal SIGSEGV, Segmentation fault.
>> > 0x00000000 in ?? ()
>> > (gdb) bt
>> > #0 0x00000000 in ?? ()
>> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
>> > tc=0xbfffecdc, store=true)
>> > at
>> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
>> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
>> > at /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
>> > #3 0x0805337a in main (argc=<value optimized out>, argv=0xbfffefe4)
>> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
>> > (gdb)
>> >
>>
>> It's not the patches fault. As I wrote, they cause ABI changes, such that
>> you
>> must make sure that every component and application in the system is
>> recompiled using the new headers. Since this is a segfault in a part we
>> didn't
>> change, *and* the this pointer is suddenly 'null', this is such a case.
>>
>> Also check for components, plugins, typekits etc which are loaded at
>> startup
>> time, these must be recompiled as well.
>>
>
> Ok I didn'nt think about thoses, now I recompiled every thnig it is fine. I
> just tested .hex at the moment.
>
>

What's about properties ? May I also write "0x" in property files ?

>
>> Peter
>>
>
>

Working with hexadecimal numbers

On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
> 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
>
> > 2011/3/7 Peter Soetens <peter [..] ...>
> >
> >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> >> >
> >> > > 2011/3/7 Peter Soetens <peter [..] ...>
> >> > >
> >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> >> > >> > Hi,
> >> > >> >
> >> > >> > As I am working on my Can driver, I face the problem of
> >> > >> > Hexadecimal<->Decimal conversion.
> >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to play
> >>
> >> with
> >>
> >> > >> > std::hex, but the logger doesn't accept it silently ("<< std::hex
> >>
> >> <<
> >>
> >> > >> > nodeIDOfBootedDevice")
> >> > >>
> >> > >> I have fixed this in the patch in attachment. Can't apply it to 2.3
> >> > >> since it
> >> > >> breaks ABI. But you could do this yourselve
> >> > >>
> >> > >> If using git:
> >> > >>
> >> > >> git am .../0001-logging-rewrite-streaming-to-allow-formatting.patch
> >> > >>
> >> > >> or
> >> > >>
> >> > >> patch -p1 <
> >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
> >> > >>
> >> > >> > 2/ Is it a way to show numbers in hexadecimal in the taskBrowser
> >> > >> > ?
> >> > >>
> >> > >> See the attachment for the TaskBrowser. Same restriction as with
> >> > >> logging...
> >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with this
> >> > >> is that every integer number is printed as hex, without the 0x
> >> > >> prefix,
> >>
> >> so
> >>
> >> > >> it will lead
> >> > >> to confusion, if you forgot that you turned it on... someone should
> >>
> >> come
> >>
> >> > >> up
> >> > >> with a better idea.
> >> > >>
> >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when
> >> > >> > calling operations in the taskBrowser ?
> >> > >>
> >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or 0XABC.
> >> >
> >> > the patches seems to have some issues, the deployer end in segfault :
> >>
> >> > Starting program:
> >> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >> lin
> >>
> >> > ux
> >>
> >> > Starting program:
> >> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >> lin
> >>
> >> > ux
> >> >
> >> > [Thread debugging using libthread_db enabled]
> >> > [New Thread 0xb6cd4b70 (LWP 9387)]
> >> > [New Thread 0xb64d3b70 (LWP 9388)]
> >> > [New Thread 0xb5746b70 (LWP 9389)]
> >> >
> >> > Program received signal SIGSEGV, Segmentation fault.
> >> > 0x00000000 in ?? ()
> >> > (gdb) bt
> >> > #0 0x00000000 in ?? ()
> >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
> >> > tc=0xbfffecdc, store=true)
> >> >
> >> > at
> >>
> >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> >>
> >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
> >> >
> >> > at
> >> > /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> >> >
> >> > #3 0x0805337a in main (argc=<value optimized out>, argv=0xbfffefe4)
> >> >
> >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> >> >
> >> > (gdb)
> >>
> >> It's not the patches fault. As I wrote, they cause ABI changes, such
> >> that you
> >> must make sure that every component and application in the system is
> >> recompiled using the new headers. Since this is a segfault in a part we
> >> didn't
> >> change, *and* the this pointer is suddenly 'null', this is such a case.
> >>
> >> Also check for components, plugins, typekits etc which are loaded at
> >> startup
> >> time, these must be recompiled as well.
> >
> > Ok I didn'nt think about thoses, now I recompiled every thnig it is fine.
> > I just tested .hex at the moment.
>
> What's about properties ? May I also write "0x" in property files ?

We could hack this into the demarshallers easily, but there is currently no
way to write it out like that, for a specific property. The fundamental problem
is that we store it in a 'text' format, instead of an unambiguous 'binary'
format.

This problem is of the same as the precision questions regarding doubles. We
have no way to specify formatting of a property object. Since formatting in
C++ is already handled by the ios_base::fmtflags classes, it's maybe sufficient
to store such formatting instructions and then to apply them when the property
is written out or read in from text (or printed in the taskbrowser)

It's probably worthwhile to create a ticket for this and see how far we get.

Peter

Working with hexadecimal numbers

2011/3/15 Peter Soetens <peter [..] ...>

> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
> >
> > > 2011/3/7 Peter Soetens <peter [..] ...>
> > >
> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> > >> >
> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
> > >> > >
> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> > >> > >> > Hi,
> > >> > >> >
> > >> > >> > As I am working on my Can driver, I face the problem of
> > >> > >> > Hexadecimal<->Decimal conversion.
> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to
> play
> > >>
> > >> with
> > >>
> > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
> std::hex
> > >>
> > >> <<
> > >>
> > >> > >> > nodeIDOfBootedDevice")
> > >> > >>
> > >> > >> I have fixed this in the patch in attachment. Can't apply it to
> 2.3
> > >> > >> since it
> > >> > >> breaks ABI. But you could do this yourselve
> > >> > >>
> > >> > >> If using git:
> > >> > >>
> > >> > >> git am
> .../0001-logging-rewrite-streaming-to-allow-formatting.patch
> > >> > >>
> > >> > >> or
> > >> > >>
> > >> > >> patch -p1 <
> > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
> > >> > >>
> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
> taskBrowser
> > >> > >> > ?
> > >> > >>
> > >> > >> See the attachment for the TaskBrowser. Same restriction as with
> > >> > >> logging...
> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with
> this
> > >> > >> is that every integer number is printed as hex, without the 0x
> > >> > >> prefix,
> > >>
> > >> so
> > >>
> > >> > >> it will lead
> > >> > >> to confusion, if you forgot that you turned it on... someone
> should
> > >>
> > >> come
> > >>
> > >> > >> up
> > >> > >> with a better idea.
> > >> > >>
> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when
> > >> > >> > calling operations in the taskBrowser ?
> > >> > >>
> > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or
> 0XABC.
> > >> >
> > >> > the patches seems to have some issues, the deployer end in segfault
> :
> > >>
> > >> > Starting program:
> > >>
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> > >> lin
> > >>
> > >> > ux
> > >>
> > >> > Starting program:
> > >>
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> > >> lin
> > >>
> > >> > ux
> > >> >
> > >> > [Thread debugging using libthread_db enabled]
> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
> > >> > [New Thread 0xb5746b70 (LWP 9389)]
> > >> >
> > >> > Program received signal SIGSEGV, Segmentation fault.
> > >> > 0x00000000 in ?? ()
> > >> > (gdb) bt
> > >> > #0 0x00000000 in ?? ()
> > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
> > >> > tc=0xbfffecdc, store=true)
> > >> >
> > >> > at
> > >>
> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> > >>
> > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
> > >> >
> > >> > at
> > >> >
> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> > >> >
> > >> > #3 0x0805337a in main (argc=<value optimized out>, argv=0xbfffefe4)
> > >> >
> > >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> > >> >
> > >> > (gdb)
> > >>
> > >> It's not the patches fault. As I wrote, they cause ABI changes, such
> > >> that you
> > >> must make sure that every component and application in the system is
> > >> recompiled using the new headers. Since this is a segfault in a part
> we
> > >> didn't
> > >> change, *and* the this pointer is suddenly 'null', this is such a
> case.
> > >>
> > >> Also check for components, plugins, typekits etc which are loaded at
> > >> startup
> > >> time, these must be recompiled as well.
> > >
> > > Ok I didn'nt think about thoses, now I recompiled every thnig it is
> fine.
> > > I just tested .hex at the moment.
> >
> > What's about properties ? May I also write "0x" in property files ?
>
> We could hack this into the demarshallers easily, but there is currently no
> way to write it out like that, for a specific property. The fundamental
> problem
> is that we store it in a 'text' format, instead of an unambiguous 'binary'
> format.
>
> This problem is of the same as the precision questions regarding doubles.
> We
> have no way to specify formatting of a property object. Since formatting in
> C++ is already handled by the ios_base::fmtflags classes, it's maybe
> sufficient
> to store such formatting instructions and then to apply them when the
> property
> is written out or read in from text (or printed in the taskbrowser)
>
> It's probably worthwhile to create a ticket for this and see how far we
> get.
>

I'll do it tonigth. BTW, it seems that the .nohex doesn't always work to
switch off the hex format

>
> Peter
>

Working with hexadecimal numbers

On Tuesday 15 March 2011 14:45:13 Willy Lambert wrote:
> 2011/3/15 Peter Soetens <peter [..] ...>
>
> > On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
> > > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
> > >
> > > > 2011/3/7 Peter Soetens <peter [..] ...>
> > > >
> > > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> > > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> > > >> >
> > > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
> > > >> > >
> > > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> > > >> > >> > Hi,
> > > >> > >> >
> > > >> > >> > As I am working on my Can driver, I face the problem of
> > > >> > >> > Hexadecimal<->Decimal conversion.
> > > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to
> >
> > play
> >
> > > >> with
> > > >>
> > > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
> >
> > std::hex
> >
> > > >> <<
> > > >>
> > > >> > >> > nodeIDOfBootedDevice")
> > > >> > >>
> > > >> > >> I have fixed this in the patch in attachment. Can't apply it to
> >
> > 2.3
> >
> > > >> > >> since it
> > > >> > >> breaks ABI. But you could do this yourselve
> > > >> > >>
> > > >> > >> If using git:
> > > >> > >>
> > > >> > >> git am
> >
> > .../0001-logging-rewrite-streaming-to-allow-formatting.patch
> >
> > > >> > >> or
> > > >> > >>
> > > >> > >> patch -p1 <
> > > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
> > > >> > >>
> > > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
> >
> > taskBrowser
> >
> > > >> > >> > ?
> > > >> > >>
> > > >> > >> See the attachment for the TaskBrowser. Same restriction as
> > > >> > >> with logging...
> > > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with
> >
> > this
> >
> > > >> > >> is that every integer number is printed as hex, without the 0x
> > > >> > >> prefix,
> > > >>
> > > >> so
> > > >>
> > > >> > >> it will lead
> > > >> > >> to confusion, if you forgot that you turned it on... someone
> >
> > should
> >
> > > >> come
> > > >>
> > > >> > >> up
> > > >> > >> with a better idea.
> > > >> > >>
> > > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when
> > > >> > >> > calling operations in the taskBrowser ?
> > > >> > >>
> > > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or
> >
> > 0XABC.
> >
> > > >> > the patches seems to have some issues, the deployer end in
> > > >> > segfault
> >
> > > >> > Starting program:
> > /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >
> > > >> lin
> > > >>
> > > >> > ux
> >
> > > >> > Starting program:
> > /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >
> > > >> lin
> > > >>
> > > >> > ux
> > > >> >
> > > >> > [Thread debugging using libthread_db enabled]
> > > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
> > > >> > [New Thread 0xb64d3b70 (LWP 9388)]
> > > >> > [New Thread 0xb5746b70 (LWP 9389)]
> > > >> >
> > > >> > Program received signal SIGSEGV, Segmentation fault.
> > > >> > 0x00000000 in ?? ()
> > > >> > (gdb) bt
> > > >> > #0 0x00000000 in ?? ()
> > > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
> > > >> > tc=0xbfffecdc, store=true)
> > > >> >
> > > >> > at
> > > >>
> > > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> > > >>
> > > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
> > > >> >
> > > >> > at
> >
> > /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> >
> > > >> > #3 0x0805337a in main (argc=<value optimized out>,
> > > >> > argv=0xbfffefe4)
> > > >> >
> > > >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> > > >> >
> > > >> > (gdb)
> > > >>
> > > >> It's not the patches fault. As I wrote, they cause ABI changes, such
> > > >> that you
> > > >> must make sure that every component and application in the system is
> > > >> recompiled using the new headers. Since this is a segfault in a part
> >
> > we
> >
> > > >> didn't
> > > >> change, *and* the this pointer is suddenly 'null', this is such a
> >
> > case.
> >
> > > >> Also check for components, plugins, typekits etc which are loaded at
> > > >> startup
> > > >> time, these must be recompiled as well.
> > > >
> > > > Ok I didn'nt think about thoses, now I recompiled every thnig it is
> >
> > fine.
> >
> > > > I just tested .hex at the moment.
> > >
> > > What's about properties ? May I also write "0x" in property files ?
> >
> > We could hack this into the demarshallers easily, but there is currently
> > no way to write it out like that, for a specific property. The
> > fundamental problem
> > is that we store it in a 'text' format, instead of an unambiguous
> > 'binary' format.
> >
> > This problem is of the same as the precision questions regarding doubles.
> > We
> > have no way to specify formatting of a property object. Since formatting
> > in C++ is already handled by the ios_base::fmtflags classes, it's maybe
> > sufficient
> > to store such formatting instructions and then to apply them when the
> > property
> > is written out or read in from text (or printed in the taskbrowser)
> >
> > It's probably worthwhile to create a ticket for this and see how far we
> > get.
>
> I'll do it tonigth. BTW, it seems that the .nohex doesn't always work to
> switch off the hex format

What happens exactly ? Does it print "Turning off hex notation for output." but
it still prints hex numbers or doesn't it print this message at all ?

Peter

Working with hexadecimal numbers

2011/3/28 Peter Soetens <peter [..] ...>

> On Tuesday 15 March 2011 14:45:13 Willy Lambert wrote:
> > 2011/3/15 Peter Soetens <peter [..] ...>
> >
> > > On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
> > > > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
> > > >
> > > > > 2011/3/7 Peter Soetens <peter [..] ...>
> > > > >
> > > > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> > > > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> > > > >> >
> > > > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
> > > > >> > >
> > > > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> > > > >> > >> > Hi,
> > > > >> > >> >
> > > > >> > >> > As I am working on my Can driver, I face the problem of
> > > > >> > >> > Hexadecimal<->Decimal conversion.
> > > > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to
> > >
> > > play
> > >
> > > > >> with
> > > > >>
> > > > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
> > >
> > > std::hex
> > >
> > > > >> <<
> > > > >>
> > > > >> > >> > nodeIDOfBootedDevice")
> > > > >> > >>
> > > > >> > >> I have fixed this in the patch in attachment. Can't apply it
> to
> > >
> > > 2.3
> > >
> > > > >> > >> since it
> > > > >> > >> breaks ABI. But you could do this yourselve
> > > > >> > >>
> > > > >> > >> If using git:
> > > > >> > >>
> > > > >> > >> git am
> > >
> > > .../0001-logging-rewrite-streaming-to-allow-formatting.patch
> > >
> > > > >> > >> or
> > > > >> > >>
> > > > >> > >> patch -p1 <
> > > > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
> > > > >> > >>
> > > > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
> > >
> > > taskBrowser
> > >
> > > > >> > >> > ?
> > > > >> > >>
> > > > >> > >> See the attachment for the TaskBrowser. Same restriction as
> > > > >> > >> with logging...
> > > > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with
> > >
> > > this
> > >
> > > > >> > >> is that every integer number is printed as hex, without the
> 0x
> > > > >> > >> prefix,
> > > > >>
> > > > >> so
> > > > >>
> > > > >> > >> it will lead
> > > > >> > >> to confusion, if you forgot that you turned it on... someone
> > >
> > > should
> > >
> > > > >> come
> > > > >>
> > > > >> > >> up
> > > > >> > >> with a better idea.
> > > > >> > >>
> > > > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when
> > > > >> > >> > calling operations in the taskBrowser ?
> > > > >> > >>
> > > > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or
> > >
> > > 0XABC.
> > >
> > > > >> > the patches seems to have some issues, the deployer end in
> > > > >> > segfault
> > >
> > > > >> > Starting program:
> > >
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> > >
> > > > >> lin
> > > > >>
> > > > >> > ux
> > >
> > > > >> > Starting program:
> > >
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> > >
> > > > >> lin
> > > > >>
> > > > >> > ux
> > > > >> >
> > > > >> > [Thread debugging using libthread_db enabled]
> > > > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
> > > > >> > [New Thread 0xb64d3b70 (LWP 9388)]
> > > > >> > [New Thread 0xb5746b70 (LWP 9389)]
> > > > >> >
> > > > >> > Program received signal SIGSEGV, Segmentation fault.
> > > > >> > 0x00000000 in ?? ()
> > > > >> > (gdb) bt
> > > > >> > #0 0x00000000 in ?? ()
> > > > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
> > > > >> > tc=0xbfffecdc, store=true)
> > > > >> >
> > > > >> > at
> > > > >>
> > > > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> > > > >>
> > > > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
> > > > >> >
> > > > >> > at
> > >
> > > /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> > >
> > > > >> > #3 0x0805337a in main (argc=<value optimized out>,
> > > > >> > argv=0xbfffefe4)
> > > > >> >
> > > > >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> > > > >> >
> > > > >> > (gdb)
> > > > >>
> > > > >> It's not the patches fault. As I wrote, they cause ABI changes,
> such
> > > > >> that you
> > > > >> must make sure that every component and application in the system
> is
> > > > >> recompiled using the new headers. Since this is a segfault in a
> part
> > >
> > > we
> > >
> > > > >> didn't
> > > > >> change, *and* the this pointer is suddenly 'null', this is such a
> > >
> > > case.
> > >
> > > > >> Also check for components, plugins, typekits etc which are loaded
> at
> > > > >> startup
> > > > >> time, these must be recompiled as well.
> > > > >
> > > > > Ok I didn'nt think about thoses, now I recompiled every thnig it is
> > >
> > > fine.
> > >
> > > > > I just tested .hex at the moment.
> > > >
> > > > What's about properties ? May I also write "0x" in property files ?
> > >
> > > We could hack this into the demarshallers easily, but there is
> currently
> > > no way to write it out like that, for a specific property. The
> > > fundamental problem
> > > is that we store it in a 'text' format, instead of an unambiguous
> > > 'binary' format.
> > >
> > > This problem is of the same as the precision questions regarding
> doubles.
> > > We
> > > have no way to specify formatting of a property object. Since
> formatting
> > > in C++ is already handled by the ios_base::fmtflags classes, it's maybe
> > > sufficient
> > > to store such formatting instructions and then to apply them when the
> > > property
> > > is written out or read in from text (or printed in the taskbrowser)
> > >
> > > It's probably worthwhile to create a ticket for this and see how far we
> > > get.
> >
> > I'll do it tonigth. BTW, it seems that the .nohex doesn't always work to
> > switch off the hex format
>
> What happens exactly ? Does it print "Turning off hex notation for output."
> but
> it still prints hex numbers or doesn't it print this message at all ?
>

Yes it prints it, but nothing change :

This console reader allows you to browse and manipulate TaskContexts.
You can type in an operation, expression, create or change variables.
(type 'help' for instructions and 'ls' for context info)

TAB completion and HISTORY is available ('bash' like)

Deployer [S]> ls

Listing TaskContext Deployer[S] :

Configuration Properties:
string RTT_COMPONENT_PATH =
/opt/ros/orocos_toolchain_ros/ocl/lib/orocos/gnulinux (Locations to look for
components. Use a colon or semi-colon separated list of paths. Defaults to
the environment variable with the same name.)
bool AutoUnload = true (Stop, cleanup and unload
all components loaded by the DeploymentComponent when it is destroyed.)

Provided Interface:
Attributes :
string Target = gnulinux
bool Valid = false
int ORO_SCHED_RT = 1
int ORO_SCHED_OTHER = 0
int LowestPriority = 1
int HighestPriority = 99

Operations : activate addPeer cleanup cleanupComponents
clearConfiguration configure configureComponents connect connectPeers
connectPorts connectServices connectTwoPorts createStream
displayComponentTypes error getComponentTypes getPeriod import inFatalError
inRunTimeError isActive isConfigured isRunning kickOut kickOutAll
kickOutComponent kickStart loadComponent loadComponents loadConfiguration
loadConfigurationString loadLibrary loadService path removePeer runScript
setActivity setMasterSlaveActivity setPeriod setPeriodicActivity
setSequentialActivity setSlaveActivity start startComponents stop
stopComponents stream trigger unloadComponent unloadComponents update

Data Flow Ports: (none)

Services:
scripting ( Orocos Scripting service. Use this service in order to
load or query programs or state machines. )

Requires Operations : (none)
Requests Services : (none)

Peers : Can1[R] Joystick[R] Motor[U]
Deployer [S]> .hex
Switching to hex notation for output (use .nohex to revert).
Deployer [S]> ls

Listing TaskContext Deployer[S] :

Configuration Properties:
string RTT_COMPONENT_PATH =
/opt/ros/orocos_toolchain_ros/ocl/lib/orocos/gnulinux (Locations to look for
components. Use a colon or semi-colon separated list of paths. Defaults to
the environment variable with the same name.)
bool AutoUnload = true (Stop, cleanup and unload
all components loaded by the DeploymentComponent when it is destroyed.)

Provided Interface:
Attributes :
string Target = gnulinux
bool Valid = false
int ORO_SCHED_RT = 1
int ORO_SCHED_OTHER = 0
int LowestPriority = 1
int HighestPriority = 63

Operations : activate addPeer cleanup cleanupComponents
clearConfiguration configure configureComponents connect connectPeers
connectPorts connectServices connectTwoPorts createStream
displayComponentTypes error getComponentTypes getPeriod import inFatalError
inRunTimeError isActive isConfigured isRunning kickOut kickOutAll
kickOutComponent kickStart loadComponent loadComponents loadConfiguration
loadConfigurationString loadLibrary loadService path removePeer runScript
setActivity setMasterSlaveActivity setPeriod setPeriodicActivity
setSequentialActivity setSlaveActivity start startComponents stop
stopComponents stream trigger unloadComponent unloadComponents update

Data Flow Ports: (none)

Services:
scripting ( Orocos Scripting service. Use this service in order to
load or query programs or state machines. )

Requires Operations : (none)
Requests Services : (none)

Peers : Can1[R] Joystick[R] Motor[U]
Deployer [S]> .nohex
Turning off hex notation for output.
Deployer [S]> ls

Listing TaskContext Deployer[S] :

Configuration Properties:
string RTT_COMPONENT_PATH =
/opt/ros/orocos_toolchain_ros/ocl/lib/orocos/gnulinux (Locations to look for
components. Use a colon or semi-colon separated list of paths. Defaults to
the environment variable with the same name.)
bool AutoUnload = true (Stop, cleanup and unload
all components loaded by the DeploymentComponent when it is destroyed.)

Provided Interface:
Attributes :
string Target = gnulinux
bool Valid = false
int ORO_SCHED_RT = 1
int ORO_SCHED_OTHER = 0
int LowestPriority = 1
int HighestPriority = 63

Operations : activate addPeer cleanup cleanupComponents
clearConfiguration configure configureComponents connect connectPeers
connectPorts connectServices connectTwoPorts createStream
displayComponentTypes error getComponentTypes getPeriod import inFatalError
inRunTimeError isActive isConfigured isRunning kickOut kickOutAll
kickOutComponent kickStart loadComponent loadComponents loadConfiguration
loadConfigurationString loadLibrary loadService path removePeer runScript
setActivity setMasterSlaveActivity setPeriod setPeriodicActivity
setSequentialActivity setSlaveActivity start startComponents stop
stopComponents stream trigger unloadComponent unloadComponents update

Data Flow Ports: (none)

Services:
scripting ( Orocos Scripting service. Use this service in order to
load or query programs or state machines. )

Requires Operations : (none)
Requests Services : (none)

Peers : Can1[R] Joystick[R] Motor[U]
Deployer [S]>

>
> Peter
>
>

Working with hexadecimal numbers

On Mon, Mar 28, 2011 at 8:10 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>
>
> 2011/3/28 Peter Soetens <peter [..] ...>
>>
>> On Tuesday 15 March 2011 14:45:13 Willy Lambert wrote:
...
>> > I'll do it tonigth. BTW, it seems that the .nohex doesn't always work to
>> > switch off the hex format
>>
>> What happens exactly ? Does it print "Turning off hex notation for
>> output." but
>> it still prints hex numbers or doesn't it print this message at all ?
>
> Yes it prints it, but nothing change :
>
>   This console reader allows you to browse and manipulate TaskContexts.
>   You can type in an operation, expression, create or change variables.
>   (type 'help' for instructions and 'ls' for context info)
>
>     TAB completion and HISTORY is available ('bash' like)
>
> Deployer [S]> ls
>
>  Listing TaskContext Deployer[S] :
>
>  Configuration Properties:
>      string RTT_COMPONENT_PATH =
> /opt/ros/orocos_toolchain_ros/ocl/lib/orocos/gnulinux (Locations to look for
> components. Use a colon or semi-colon separated list of paths. Defaults to
> the environment variable with the same name.)
>        bool AutoUnload     = true                 (Stop, cleanup and unload
> all components loaded by the DeploymentComponent when it is destroyed.)
>
>  Provided Interface:
>   Attributes   :
>      string Target         = gnulinux
>        bool Valid          = false
>         int ORO_SCHED_RT   = 1
>         int ORO_SCHED_OTHER = 0
>         int LowestPriority = 1
>         int HighestPriority = 99
>
>   Operations      : activate addPeer cleanup cleanupComponents
> clearConfiguration configure configureComponents connect connectPeers
> connectPorts connectServices connectTwoPorts createStream
> displayComponentTypes error getComponentTypes getPeriod import inFatalError
> inRunTimeError isActive isConfigured isRunning kickOut kickOutAll
> kickOutComponent kickStart loadComponent loadComponents loadConfiguration
> loadConfigurationString loadLibrary loadService path removePeer runScript
> setActivity setMasterSlaveActivity setPeriod setPeriodicActivity
> setSequentialActivity setSlaveActivity start startComponents stop
> stopComponents stream trigger unloadComponent unloadComponents update
>
>  Data Flow Ports: (none)
>
>  Services:
>        scripting ( Orocos Scripting service. Use this service in order to
> load or query programs or state machines. )
>
>  Requires Operations :  (none)
>  Requests Services   :  (none)
>
>  Peers        : Can1[R] Joystick[R] Motor[U]
> Deployer [S]> .hex
> Switching to hex notation for output (use .nohex to revert).
> Deployer [S]> ls
>
>  Listing TaskContext Deployer[S] :
>
>  Configuration Properties:
>      string RTT_COMPONENT_PATH =
> /opt/ros/orocos_toolchain_ros/ocl/lib/orocos/gnulinux (Locations to look for
> components. Use a colon or semi-colon separated list of paths. Defaults to
> the environment variable with the same name.)
>        bool AutoUnload     = true                 (Stop, cleanup and unload
> all components loaded by the DeploymentComponent when it is destroyed.)
>
>  Provided Interface:
>   Attributes   :
>      string Target         = gnulinux
>        bool Valid          = false
>         int ORO_SCHED_RT   = 1
>         int ORO_SCHED_OTHER = 0
>         int LowestPriority = 1
>         int HighestPriority = 63
>
>   Operations      : activate addPeer cleanup cleanupComponents
> clearConfiguration configure configureComponents connect connectPeers
> connectPorts connectServices connectTwoPorts createStream
> displayComponentTypes error getComponentTypes getPeriod import inFatalError
> inRunTimeError isActive isConfigured isRunning kickOut kickOutAll
> kickOutComponent kickStart loadComponent loadComponents loadConfiguration
> loadConfigurationString loadLibrary loadService path removePeer runScript
> setActivity setMasterSlaveActivity setPeriod setPeriodicActivity
> setSequentialActivity setSlaveActivity start startComponents stop
> stopComponents stream trigger unloadComponent unloadComponents update
>
>  Data Flow Ports: (none)
>
>  Services:
>        scripting ( Orocos Scripting service. Use this service in order to
> load or query programs or state machines. )
>
>  Requires Operations :  (none)
>  Requests Services   :  (none)
>
>  Peers        : Can1[R] Joystick[R] Motor[U]
> Deployer [S]> .nohex
> Turning off hex notation for output.
> Deployer [S]> ls
>
>  Listing TaskContext Deployer[S] :
>
>  Configuration Properties:
>      string RTT_COMPONENT_PATH =
> /opt/ros/orocos_toolchain_ros/ocl/lib/orocos/gnulinux (Locations to look for
> components. Use a colon or semi-colon separated list of paths. Defaults to
> the environment variable with the same name.)
>        bool AutoUnload     = true                 (Stop, cleanup and unload
> all components loaded by the DeploymentComponent when it is destroyed.)
>
>  Provided Interface:
>   Attributes   :
>      string Target         = gnulinux
>        bool Valid          = false
>         int ORO_SCHED_RT   = 1
>         int ORO_SCHED_OTHER = 0
>         int LowestPriority = 1
>         int HighestPriority = 63

Now I understand. There the bug is that we need to turn it off in the
stream too. I thought that the hex would only apply on the next
number, but it seems it persists. I'll fix it on wednesday.

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

Working with hexadecimal numbers

2011/3/15 Willy Lambert <lambert [dot] willy [..] ...>

>
>
> 2011/3/15 Peter Soetens <peter [..] ...>
>
>> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
>> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
>> >
>> > > 2011/3/7 Peter Soetens <peter [..] ...>
>> > >
>> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
>> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
>> > >> >
>> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
>> > >> > >
>> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
>> > >> > >> > Hi,
>> > >> > >> >
>> > >> > >> > As I am working on my Can driver, I face the problem of
>> > >> > >> > Hexadecimal<->Decimal conversion.
>> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to
>> play
>> > >>
>> > >> with
>> > >>
>> > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
>> std::hex
>> > >>
>> > >> <<
>> > >>
>> > >> > >> > nodeIDOfBootedDevice")
>> > >> > >>
>> > >> > >> I have fixed this in the patch in attachment. Can't apply it to
>> 2.3
>> > >> > >> since it
>> > >> > >> breaks ABI. But you could do this yourselve
>> > >> > >>
>> > >> > >> If using git:
>> > >> > >>
>> > >> > >> git am
>> .../0001-logging-rewrite-streaming-to-allow-formatting.patch
>> > >> > >>
>> > >> > >> or
>> > >> > >>
>> > >> > >> patch -p1 <
>> > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
>> > >> > >>
>> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
>> taskBrowser
>> > >> > >> > ?
>> > >> > >>
>> > >> > >> See the attachment for the TaskBrowser. Same restriction as with
>> > >> > >> logging...
>> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with
>> this
>> > >> > >> is that every integer number is printed as hex, without the 0x
>> > >> > >> prefix,
>> > >>
>> > >> so
>> > >>
>> > >> > >> it will lead
>> > >> > >> to confusion, if you forgot that you turned it on... someone
>> should
>> > >>
>> > >> come
>> > >>
>> > >> > >> up
>> > >> > >> with a better idea.
>> > >> > >>
>> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when
>> > >> > >> > calling operations in the taskBrowser ?
>> > >> > >>
>> > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or
>> 0XABC.
>> > >> >
>> > >> > the patches seems to have some issues, the deployer end in segfault
>> :
>> > >>
>> > >> > Starting program:
>> > >>
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>> > >> lin
>> > >>
>> > >> > ux
>> > >>
>> > >> > Starting program:
>> > >>
>> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>> > >> lin
>> > >>
>> > >> > ux
>> > >> >
>> > >> > [Thread debugging using libthread_db enabled]
>> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
>> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
>> > >> > [New Thread 0xb5746b70 (LWP 9389)]
>> > >> >
>> > >> > Program received signal SIGSEGV, Segmentation fault.
>> > >> > 0x00000000 in ?? ()
>> > >> > (gdb) bt
>> > >> > #0 0x00000000 in ?? ()
>> > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
>> > >> > tc=0xbfffecdc, store=true)
>> > >> >
>> > >> > at
>> > >>
>> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
>> > >>
>> > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
>> > >> >
>> > >> > at
>> > >> >
>> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
>> > >> >
>> > >> > #3 0x0805337a in main (argc=<value optimized out>,
>> argv=0xbfffefe4)
>> > >> >
>> > >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
>> > >> >
>> > >> > (gdb)
>> > >>
>> > >> It's not the patches fault. As I wrote, they cause ABI changes, such
>> > >> that you
>> > >> must make sure that every component and application in the system is
>> > >> recompiled using the new headers. Since this is a segfault in a part
>> we
>> > >> didn't
>> > >> change, *and* the this pointer is suddenly 'null', this is such a
>> case.
>> > >>
>> > >> Also check for components, plugins, typekits etc which are loaded at
>> > >> startup
>> > >> time, these must be recompiled as well.
>> > >
>> > > Ok I didn'nt think about thoses, now I recompiled every thnig it is
>> fine.
>> > > I just tested .hex at the moment.
>> >
>> > What's about properties ? May I also write "0x" in property files ?
>>
>> We could hack this into the demarshallers easily, but there is currently
>> no
>> way to write it out like that, for a specific property. The fundamental
>> problem
>> is that we store it in a 'text' format, instead of an unambiguous 'binary'
>> format.
>>
>> This problem is of the same as the precision questions regarding doubles.
>> We
>> have no way to specify formatting of a property object. Since formatting
>> in
>> C++ is already handled by the ios_base::fmtflags classes, it's maybe
>> sufficient
>> to store such formatting instructions and then to apply them when the
>> property
>> is written out or read in from text (or printed in the taskbrowser)
>>
>> It's probably worthwhile to create a ticket for this and see how far we
>> get.
>>
>
> I'll do it tonigth. BTW, it seems that the .nohex doesn't always work to
> switch off the hex format
>

I have some problems with logging after thoses patches :

0.292 [ Warning][ScriptingService]
413010915811038408301.30109e+0917232204800305841240000003050019696000/media/DD_data/opt/ros/ard/arp_core/lib/orocos/gnulinux/types/media/DD_data/opt/ros/ard/arp_hml/lib/orocos/gnulinux/plugins====================
0.294 [ Warning][ScriptingService] début déploiment HML
0.378 [ Warning][ScriptingService]
03030797168000030224044640000301401176000003005619056000.0503030797168000.0503022404464000.05Fin
déploiment HML

It seems something is not reinitialized correctly. It happens randomly.

>
>
>
>>
>> Peter
>>
>
>

Working with hexadecimal numbers

On Fri, Mar 25, 2011 at 11:16 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>
>
> 2011/3/15 Willy Lambert <lambert [dot] willy [..] ...>
>>
>>
>> 2011/3/15 Peter Soetens <peter [..] ...>
>>>
>>> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
>>> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
>>> >
>>> > > 2011/3/7 Peter Soetens <peter [..] ...>
>>> > >
>>> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
>>> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
>>> > >> >
>>> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
>>> > >> > >
>>> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
>>> > >> > >> > Hi,
>>> > >> > >> >
>>> > >> > >> > As I am working on my Can driver, I face the problem of
>>> > >> > >> > Hexadecimal<->Decimal conversion.
>>> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to
>>> > >> > >> > play
>>> > >>
>>> > >> with
>>> > >>
>>> > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
>>> > >> > >> > std::hex
>>> > >>
>>> > >> <<
>>> > >>
>>> > >> > >> > nodeIDOfBootedDevice")
>>> > >> > >>
>>> > >> > >> I have fixed this in the patch in attachment. Can't apply it to
>>> > >> > >> 2.3
>>> > >> > >> since it
>>> > >> > >> breaks ABI. But you could do this yourselve
>>> > >> > >>
>>> > >> > >> If using git:
>>> > >> > >>
>>> > >> > >> git am
>>> > >> > >> .../0001-logging-rewrite-streaming-to-allow-formatting.patch
>>> > >> > >>
>>> > >> > >> or
>>> > >> > >>
>>> > >> > >> patch -p1 <
>>> > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
>>> > >> > >>
>>> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
>>> > >> > >> > taskBrowser
>>> > >> > >> > ?
>>> > >> > >>
>>> > >> > >> See the attachment for the TaskBrowser. Same restriction as
>>> > >> > >> with
>>> > >> > >> logging...
>>> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with
>>> > >> > >> this
>>> > >> > >> is that every integer number is printed as hex, without the 0x
>>> > >> > >> prefix,
>>> > >>
>>> > >> so
>>> > >>
>>> > >> > >> it will lead
>>> > >> > >> to confusion, if you forgot that you turned it on... someone
>>> > >> > >> should
>>> > >>
>>> > >> come
>>> > >>
>>> > >> > >> up
>>> > >> > >> with a better idea.
>>> > >> > >>
>>> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when
>>> > >> > >> > calling operations in the taskBrowser ?
>>> > >> > >>
>>> > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or
>>> > >> > >> 0XABC.
>>> > >> >
>>> > >> > the patches seems to have some issues, the deployer end in
>>> > >> > segfault :
>>> > >>
>>> > >> > Starting program:
>>> > >>
>>> > >> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>>> > >> lin
>>> > >>
>>> > >> > ux
>>> > >>
>>> > >> > Starting program:
>>> > >>
>>> > >> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
>>> > >> lin
>>> > >>
>>> > >> > ux
>>> > >> >
>>> > >> > [Thread debugging using libthread_db enabled]
>>> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
>>> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
>>> > >> > [New Thread 0xb5746b70 (LWP 9389)]
>>> > >> >
>>> > >> > Program received signal SIGSEGV, Segmentation fault.
>>> > >> > 0x00000000 in ?? ()
>>> > >> > (gdb) bt
>>> > >> > #0  0x00000000 in ?? ()
>>> > >> > #1  0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
>>> > >> > tc=0xbfffecdc, store=true)
>>> > >> >
>>> > >> >     at
>>> > >>
>>> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
>>> > >>
>>> > >> > #2  0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
>>> > >> >
>>> > >> >     at
>>> > >> >
>>> > >> > /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
>>> > >> >
>>> > >> > #3  0x0805337a in main (argc=<value optimized out>,
>>> > >> > argv=0xbfffefe4)
>>> > >> >
>>> > >> >     at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
>>> > >> >
>>> > >> > (gdb)
>>> > >>
>>> > >> It's not the patches fault. As I wrote, they cause ABI changes, such
>>> > >> that you
>>> > >> must make sure that every component and application in the system is
>>> > >> recompiled using the new headers. Since this is a segfault in a part
>>> > >> we
>>> > >> didn't
>>> > >> change, *and* the this pointer is suddenly 'null', this is such a
>>> > >> case.
>>> > >>
>>> > >> Also check for components, plugins, typekits etc which are loaded at
>>> > >> startup
>>> > >> time, these must be recompiled as well.
>>> > >
>>> > > Ok I didn'nt think about thoses, now I recompiled every thnig it is
>>> > > fine.
>>> > > I just tested .hex at the moment.
>>> >
>>> > What's about properties ? May I also write "0x" in property files ?
>>>
>>> We could hack this into the demarshallers easily, but there is currently
>>> no
>>> way to write it out like that, for a specific property. The fundamental
>>> problem
>>> is that we store it in a 'text' format, instead of an unambiguous
>>> 'binary'
>>> format.
>>>
>>> This problem is of the same as the precision questions regarding doubles.
>>> We
>>> have no way to specify formatting of a property object. Since formatting
>>> in
>>> C++ is already handled by the ios_base::fmtflags classes, it's maybe
>>> sufficient
>>> to store such formatting instructions and then to apply them when the
>>> property
>>> is written out or read in from text (or printed in the taskbrowser)
>>>
>>> It's probably worthwhile to create a ticket for this and see how far we
>>> get.
>>
>> I'll do it tonigth. BTW, it seems that the .nohex doesn't always work to
>> switch off the hex format
>
> I have some problems with logging after thoses patches :
>
> 0.292 [ Warning][ScriptingService]
> 413010915811038408301.30109e+0917232204800305841240000003050019696000/media/DD_data/opt/ros/ard/arp_core/lib/orocos/gnulinux/types/media/DD_data/opt/ros/ard/arp_hml/lib/orocos/gnulinux/plugins====================
> 0.294 [ Warning][ScriptingService] début déploiment HML
> 0.378 [ Warning][ScriptingService]
> 03030797168000030224044640000301401176000003005619056000.0503030797168000.0503022404464000.05Fin
> déploiment HML
>
>
> It seems something is not reinitialized correctly. It happens randomly.

Could you run the app with valgrind and post the output ? We should be
able to find this with that info.

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

Working with hexadecimal numbers

2011/3/26 Peter Soetens <peter [..] ...>

> On Fri, Mar 25, 2011 at 11:16 PM, Willy Lambert <lambert [dot] willy [..] ...>
> wrote:
> >
> >
> > 2011/3/15 Willy Lambert <lambert [dot] willy [..] ...>
> >>
> >>
> >> 2011/3/15 Peter Soetens <peter [..] ...>
> >>>
> >>> On Thursday 10 March 2011 17:48:02 Willy Lambert wrote:
> >>> > 2011/3/8 Willy Lambert <lambert [dot] willy [..] ...>
> >>> >
> >>> > > 2011/3/7 Peter Soetens <peter [..] ...>
> >>> > >
> >>> > >> On Monday 07 March 2011 23:36:13 Willy Lambert wrote:
> >>> > >> > 2011/3/7 Willy Lambert <lambert [dot] willy [..] ...>
> >>> > >> >
> >>> > >> > > 2011/3/7 Peter Soetens <peter [..] ...>
> >>> > >> > >
> >>> > >> > >> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> >>> > >> > >> > Hi,
> >>> > >> > >> >
> >>> > >> > >> > As I am working on my Can driver, I face the problem of
> >>> > >> > >> > Hexadecimal<->Decimal conversion.
> >>> > >> > >> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to
> >>> > >> > >> > play
> >>> > >>
> >>> > >> with
> >>> > >>
> >>> > >> > >> > std::hex, but the logger doesn't accept it silently ("<<
> >>> > >> > >> > std::hex
> >>> > >>
> >>> > >> <<
> >>> > >>
> >>> > >> > >> > nodeIDOfBootedDevice")
> >>> > >> > >>
> >>> > >> > >> I have fixed this in the patch in attachment. Can't apply it
> to
> >>> > >> > >> 2.3
> >>> > >> > >> since it
> >>> > >> > >> breaks ABI. But you could do this yourselve
> >>> > >> > >>
> >>> > >> > >> If using git:
> >>> > >> > >>
> >>> > >> > >> git am
> >>> > >> > >> .../0001-logging-rewrite-streaming-to-allow-formatting.patch
> >>> > >> > >>
> >>> > >> > >> or
> >>> > >> > >>
> >>> > >> > >> patch -p1 <
> >>> > >> > >> 0001-logging-rewrite-streaming-to-allow-formatting.patch
> >>> > >> > >>
> >>> > >> > >> > 2/ Is it a way to show numbers in hexadecimal in the
> >>> > >> > >> > taskBrowser
> >>> > >> > >> > ?
> >>> > >> > >>
> >>> > >> > >> See the attachment for the TaskBrowser. Same restriction as
> >>> > >> > >> with
> >>> > >> > >> logging...
> >>> > >> > >> Use '.hex' or '.nohex' to turn it on or off. The problem with
> >>> > >> > >> this
> >>> > >> > >> is that every integer number is printed as hex, without the
> 0x
> >>> > >> > >> prefix,
> >>> > >>
> >>> > >> so
> >>> > >>
> >>> > >> > >> it will lead
> >>> > >> > >> to confusion, if you forgot that you turned it on... someone
> >>> > >> > >> should
> >>> > >>
> >>> > >> come
> >>> > >>
> >>> > >> > >> up
> >>> > >> > >> with a better idea.
> >>> > >> > >>
> >>> > >> > >> > 3/ Is it a way enter hexadecimal numbers in scripts or when
> >>> > >> > >> > calling operations in the taskBrowser ?
> >>> > >> > >>
> >>> > >> > >> Added this on the toolchain-2.3 branch. you can use 0xabc or
> >>> > >> > >> 0XABC.
> >>> > >> >
> >>> > >> > the patches seems to have some issues, the deployer end in
> >>> > >> > segfault :
> >>> > >>
> >>> > >> > Starting program:
> >>> > >>
> >>> > >>
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >>> > >> lin
> >>> > >>
> >>> > >> > ux
> >>> > >>
> >>> > >> > Starting program:
> >>> > >>
> >>> > >>
> /media/DD_data/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnu
> >>> > >> lin
> >>> > >>
> >>> > >> > ux
> >>> > >> >
> >>> > >> > [Thread debugging using libthread_db enabled]
> >>> > >> > [New Thread 0xb6cd4b70 (LWP 9387)]
> >>> > >> > [New Thread 0xb64d3b70 (LWP 9388)]
> >>> > >> > [New Thread 0xb5746b70 (LWP 9389)]
> >>> > >> >
> >>> > >> > Program received signal SIGSEGV, Segmentation fault.
> >>> > >> > 0x00000000 in ?? ()
> >>> > >> > (gdb) bt
> >>> > >> > #0 0x00000000 in ?? ()
> >>> > >> > #1 0xb7d6570e in OCL::TaskBrowser::switchTaskContext (this=0x0,
> >>> > >> > tc=0xbfffecdc, store=true)
> >>> > >> >
> >>> > >> > at
> >>> > >>
> >>> > >> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:1071
> >>> > >>
> >>> > >> > #2 0xb7d70e14 in TaskBrowser (this=0xbfffeb04, _c=0xbfffecdc)
> >>> > >> >
> >>> > >> > at
> >>> > >> >
> >>> > >> >
> /opt/ros/orocos_toolchain_ros/ocl/taskbrowser/TaskBrowser.cpp:654
> >>> > >> >
> >>> > >> > #3 0x0805337a in main (argc=<value optimized out>,
> >>> > >> > argv=0xbfffefe4)
> >>> > >> >
> >>> > >> > at /opt/ros/orocos_toolchain_ros/ocl/bin/deployer.cpp:160
> >>> > >> >
> >>> > >> > (gdb)
> >>> > >>
> >>> > >> It's not the patches fault. As I wrote, they cause ABI changes,
> such
> >>> > >> that you
> >>> > >> must make sure that every component and application in the system
> is
> >>> > >> recompiled using the new headers. Since this is a segfault in a
> part
> >>> > >> we
> >>> > >> didn't
> >>> > >> change, *and* the this pointer is suddenly 'null', this is such a
> >>> > >> case.
> >>> > >>
> >>> > >> Also check for components, plugins, typekits etc which are loaded
> at
> >>> > >> startup
> >>> > >> time, these must be recompiled as well.
> >>> > >
> >>> > > Ok I didn'nt think about thoses, now I recompiled every thnig it is
> >>> > > fine.
> >>> > > I just tested .hex at the moment.
> >>> >
> >>> > What's about properties ? May I also write "0x" in property files ?
> >>>
> >>> We could hack this into the demarshallers easily, but there is
> currently
> >>> no
> >>> way to write it out like that, for a specific property. The fundamental
> >>> problem
> >>> is that we store it in a 'text' format, instead of an unambiguous
> >>> 'binary'
> >>> format.
> >>>
> >>> This problem is of the same as the precision questions regarding
> doubles.
> >>> We
> >>> have no way to specify formatting of a property object. Since
> formatting
> >>> in
> >>> C++ is already handled by the ios_base::fmtflags classes, it's maybe
> >>> sufficient
> >>> to store such formatting instructions and then to apply them when the
> >>> property
> >>> is written out or read in from text (or printed in the taskbrowser)
> >>>
> >>> It's probably worthwhile to create a ticket for this and see how far we
> >>> get.
> >>
> >> I'll do it tonigth. BTW, it seems that the .nohex doesn't always work to
> >> switch off the hex format
> >
> > I have some problems with logging after thoses patches :
> >
> > 0.292 [ Warning][ScriptingService]
> >
> 413010915811038408301.30109e+0917232204800305841240000003050019696000/media/DD_data/opt/ros/ard/arp_core/lib/orocos/gnulinux/types/media/DD_data/opt/ros/ard/arp_hml/lib/orocos/gnulinux/plugins====================
> > 0.294 [ Warning][ScriptingService] début déploiment HML
> > 0.378 [ Warning][ScriptingService]
> >
> 03030797168000030224044640000301401176000003005619056000.0503030797168000.0503022404464000.05Fin
> > déploiment HML
> >
> >
> > It seems something is not reinitialized correctly. It happens randomly.
>
> Could you run the app with valgrind and post the output ? We should be
> able to find this with that info.
>

arg, I needed to correct my application before sending the log :p, it is
done (and I still have the problem, the contrary would have been stranged)
see attached the orocos.log with -lDebug, the valgrind logfile with this
command launch :
valgrind --log-file=valgrind.log
/opt/ros/orocos_toolchain_ros/ocl/install/bin/deployer-gnulinux -s
script/deployment/deploy_hml.ops

What is interesting is that the problem disapear when I use the -lDebug
option !

P.S. : I don't know if you have seen in the mails before : ".nohex" doesn't
seems to work porperly

>
> Peter
>

Working with hexadecimal numbers

On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> Hi,
>
> As I am working on my Can driver, I face the problem of
> Hexadecimal<->Decimal conversion.
> 1/ Does anyone ever tried to log in Hexadecimal ? I used to play with
> std::hex, but the logger doesn't accept it silently ("<< std::hex <<
> nodeIDOfBootedDevice")

This is something we should be able to fix. It's not working because we use an
intermediary stringstream to stream your number to, and then write that string
to the logger's internals. The internals are hidden behind a 'd' pointer. A
simple patch could expose a reference to the internal stream in the Logger
class and use that one in Logger.inl file instead. We'll have to expose d's
inpguard mutex, logline and fileline, all by reference. You'll have an 'if (d)
{... } statement to check if logging was active. I can do this.

> 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?

In the TB implementation, we let the typekit stream the number through the
DataSource pointer, ie: result << dsb_ptr;
Which allows formatting the stream prior to the << dsb_ptr. We could add a
'.hex' taskbrowser command that inserts that formatting token to output hex
whenever possible. If you want it on a case-by-case basis, this requires a new
type and typekit, which is overkill imo.

> 3/ Is it a way enter hexadecimal numbers in scripts or when calling
> operations in the taskBrowser ?

It should be trivial to add a 'hex' notation to the scripting parser
(ValueParser). I would also like this feature, the question pops up from time
to time.

Peter

Working with hexadecimal numbers

2011/3/7 Peter Soetens <peter [..] ...>

> On Sunday 06 March 2011 17:50:21 Willy Lambert wrote:
> > Hi,
> >
> > As I am working on my Can driver, I face the problem of
> > Hexadecimal<->Decimal conversion.
> > 1/ Does anyone ever tried to log in Hexadecimal ? I used to play with
> > std::hex, but the logger doesn't accept it silently ("<< std::hex <<
> > nodeIDOfBootedDevice")
>
> This is something we should be able to fix. It's not working because we use
> an
> intermediary stringstream to stream your number to, and then write that
> string
> to the logger's internals. The internals are hidden behind a 'd' pointer. A
> simple patch could expose a reference to the internal stream in the Logger
> class and use that one in Logger.inl file instead. We'll have to expose d's
> inpguard mutex, logline and fileline, all by reference. You'll have an 'if
> (d)
> {... } statement to check if logging was active. I can do this.
>

This would be great. They are plenty of other std::conversion that will work
thanks to this. Do you need any bug ticket ?

>
> > 2/ Is it a way to show numbers in hexadecimal in the taskBrowser ?
>
> In the TB implementation, we let the typekit stream the number through the
> DataSource pointer, ie: result << dsb_ptr;
> Which allows formatting the stream prior to the << dsb_ptr. We could add a
> '.hex' taskbrowser command that inserts that formatting token to output hex
> whenever possible. If you want it on a case-by-case basis, this requires a
> new
> type and typekit, which is overkill imo.
>

When you speak about ".hex" you mean something that will change all the
outputs (that implements it) to an other "<<" for the next "ls" ? It would
be great

like :
operator << (os , my type)
{
if( "hex")
return os << std::hex << value;
else
return os << value
}

This mean I must not use the "int" type in this case but a personnal
"int_hex" type ?

>
> > 3/ Is it a way enter hexadecimal numbers in scripts or when calling
> > operations in the taskBrowser ?
>
> It should be trivial to add a 'hex' notation to the scripting parser
> (ValueParser). I would also like this feature, the question pops up from
> time
> to time.
>

I'll have a look at this to try a patch if it is also trivial to me :)

>
> Peter
>