Re: [ros-users] Ros Communications

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: Re: [ros-users] Ros Communications
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
<>wrote:

> On Mon, Dec 6, 2010 at 4:34 AM, Piotr Trojanek <>
> 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
>
> https://code.ros.org/mailman/listinfo/ros-users
>




--
Piotr Trojanek