[openrtm-users 03072] Is RTC::TimedStringSequence to bytestream conversion a well defined function?

2 posts / 0 new
Last post
athos
Offline
Last seen: 9 years 9 months ago
Joined: 2014-07-10 17:28
[openrtm-users 03072] Is RTC::TimedStringSequence to bytestream conversion a well defined function?

Dear All,

I have the following problem. I generate some RTC::TimedStringSequence
data (say a1), then I serialize it into a byte stream (say b1) using
the cdrMemoryStream API. Then I convert this bytestream b1 back to a
RTC::TimedStringSequence variable (say a2): all is fine, the content
of a1 and that of b1 is the same as far as I can judge. But if I
convert a2 into a bytestream b2 again, then b1 and b2 differ
sometimes. Is this possible?

Valgrind says that some uninitialized memory area is copied into the
bytestreams: is this OK?

I can put together some minimal example, if needed.

Attila
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

Undefined
gbiggs
Offline
Last seen: 6 years 9 months ago
Joined: 2010-08-02 07:51
[openrtm-users 03073] Is RTC::TimedStringSequence to bytestream

Hi Attila,

It will be easier to investigate the behaviour you are seeing if you can
provide an example.

Geoff

On Wed, 23 Jul 2014 13:53:37 Attila Bern

athos
Offline
Last seen: 9 years 9 months ago
Joined: 2014-07-10 17:28
[openrtm-users 03074] Is RTC::TimedStringSequence to bytestream

Dear Geoffrey (and those who read this),

I worked quite a bit to make up a self-contained example that shows the anomaly.

I have not completely succeeded.
The attached code, when compiled, does not show the phenomenon. However:
- the code I started with does not always show the phenomenon either
(it seems that it depends on the contents of the memory),
- if you compile and run the attached code with valgrind, it shows
that some uninitialized values are copied into the byte arrays at some
point.

One more remark: the byte array that I start with in the attached code
is obtained from a valid RTC::TimedStringSeq data.

I have linux 12.04, and g++ of version 4.6.3

Attila

2014-07-23 15:05 GMT+02:00 Geoffrey Biggs :
> Hi Attila,
>
> It will be easier to investigate the behaviour you are seeing if you can
> provide an example.
>
> Geoff
>
> On Wed, 23 Jul 2014 13:53:37 Attila Bern㙈﹀h wrote:
>> Dear All,
>>
>>
>> I have the following problem. I generate some RTC::TimedStringSequence
>> data (say a1), then I serialize it into a byte stream (say b1) using
>> the cdrMemoryStream API. Then I convert this bytestream b1 back to a
>> RTC::TimedStringSequence variable (say a2): all is fine, the content
>> of a1 and that of b1 is the same as far as I can judge. But if I
>> convert a2 into a bytestream b2 again, then b1 and b2 differ
>> sometimes. Is this possible?
>>
>> Valgrind says that some uninitialized memory area is copied into the
>> bytestreams: is this OK?
>>
>> I can put together some minimal example, if needed.
>>
>> Attila
>> _______________________________________________
>> openrtm-users mailing list
>> openrtm-users@openrtm.org
>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users@openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users@openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
>

Log in or register to post comments

Download

latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK