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 protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/376341b9-b429-4abe-b9ea-aeb2834c6f58%40googlegroups.com.

Reply via email to