2#include "main-header.h"
6void proto_release(
void *buf) {
11int buf_to_struct(
void *buf,
int bufsize,
void *iter,
void *out) {
18 bool status = pb_decode(&
stream, iter, out);
21 printf(
"Proto decoding failed: %s\r\n", PB_GET_ERROR(&
stream));
26int struct_to_buf(
void *buf,
int bufsize,
void *iter,
void *in) {
27 printf(
"Buf: 0x%X, Iter: 0x%X\r\n", buf, iter);
29 bool status = pb_encode(&
stream, iter, in);
32 printf(
"Proto encoding failed: %s\r\n", PB_GET_ERROR(&
stream));
35 printf(
"Bytes encoded: %i\r\n",
stream.bytes_written);
36 return stream.bytes_written;