【发布时间】:2016-05-19 11:41:38
【问题描述】:
我有以下结构(以及许多其他结构),我想通过套接字发送它。
struct Position
{
float x; // position selon x
float y; // position selon y
float theta; // orientation % z
Position (float x_, float y_, float theta_): x(x_), y(y_), theta(theta_){}
Position(){}
};
但首先,出于解码目的,我考虑使用msgpack 库进行编码和解码,因为它可以大大简化我的任务。
唯一的问题是我不知道我该怎么做!
那么,可以做到吗?如何做到?
PS : 结构示例被简化了,我得到了一些非常复杂的。
谢谢。
【问题讨论】:
标签: c++ sockets data-structures msgpack