[ros-users] Ros Communications

Piotr Trojanek piotr.trojanek at gmail.com
Tue Dec 7 00:05:44 UTC 2010


Yes, I have tested the archive with std::vector and it simply works.

I guess it works also for any collection, which is supported by
Boost::serialization framework.
The magic is in the <boost/serialization/vector.hpp> header, not in the
archive itself.

For any primitive type always the same xdr_* function is called, so (by the
design of XDR)
it does not matter if the caller is 32 or 64 bit (nor if little/big endian).

The only issue I have discovered so far is if you want to serialize
OS-dependent type, i.e. pthread_t,
which in case of Linux can be <int> and in case of another OS can be <void
*>. This is however
difficult to handle and at the same time easy to avoid.

On Mon, Dec 6, 2010 at 22:49, Troy Straszheim
<straszheim at willowgarage.com>wrote:

> On Mon, Dec 6, 2010 at 4:34 AM, Piotr Trojanek <piotr.trojanek at gmail.com>
> wrote:
> > The boost::archive compatible XDR (de)coder is here:
> >
> > https://github.com/ptroja/mrrocpp/tree/master/src/base/lib/xdr/
> >
>
> Neat.  You don't handle e.g. serialization::collection_size_type
> explicitly;  have you attempted to e.g. send a vector<int> from a 32
> bit machine to a 64 bit machine?
>
> -t
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
Piotr Trojanek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101207/28661b9c/attachment-0004.html>


More information about the ros-users mailing list