Line data Source code
1 : #include "unaligned_uint64.pb.h" 2 : #include <pb_encode.h> 3 : 4 1 : int main() 5 : { 6 : uint8_t buf[128]; 7 1 : pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); 8 1 : MainMessage msg = MainMessage_init_zero; 9 1 : msg.bar[0] = 'A'; 10 1 : pb_encode(&stream, MainMessage_fields, &msg); 11 : 12 1 : return 0; 13 : } 14 :