Hi,
I think this project might be useful for you
https://github.com/semlanik/qtprotobuf
четверг, 16 января 2020 г., 9:08:39 UTC+1 пользователь Burak Kirazli
написал:
>
> Hello,
>
> I am new to protobuf.
>
> I have a request message like that
>
> message CommandRequest
> {
> enum Code
> {
> RESET = 0;
> ERASE_APP = 2;
> ERASE_OTA = 3;
> }
>
> Code code = 1;
> }
>
> When I am trying to encode a request with zero value, i see that encoded
> size is zero. What will be exchanged?
>
> //Qt project
>
> CommandRequest req;
> req.set_code(CommandRequest_Code::CommandRequest_Code_RESET);
> qDebug() << req.ByteSizeLong() << endl;
>
> //Output of this code is:
> 0
>
>
> Thanks.
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/032c814c-01b0-422b-9179-c392261037dc%40googlegroups.com.