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

Geoffrey Biggs geoffrey.biggs @ aist.go.jp
2014年 7月 30日 (水) 16:08:33 JST


Hi Attila,

If you are not having any problems with the values that you put into and
get out of the byte streams differing, then there is no problem with the
byte streams themselves not being exactly identical. These contain
information other than the strings that you put in. Aside from information
used in packing and unpacking the data, the TimeString structure contains a
time member, which you are not setting anywhere and so will contain
uninitialised values when you put it into the byte string.

Geoff


On 25 July 2014 18:06, Attila Bernáth <attila.bernath @ sztaki.hu> wrote:

> 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 <geoffrey.biggs @ aist.go.jp>:
> > 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
> >
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users @ openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
>
>
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140730/8542ed9d/attachment.html>


More information about the openrtm-users mailing list