proto文件如下:
message Testata
{
uint64 timestamp = 1; //时戳
repeated sint32 testData = 2; //数据
}
nanopb生成的头文件如下:
/* Struct definitions /
typedef struct _TestData {
uint64_t timestamp;
pb_callback_t testData;
/ @@protoc_insertion_point(struct:TestData) */
} TestData;
如上的简单的protobuf整数数组,使用nanopb在发送前编码如何对testData如何复制?