我想用一个枚举字段定义一个固定大小的包头,如下所示。可以声明一个固定大小的枚举吗?还是我必须改用fixed32?
message MyEnums
{
enum PacketType
{
FKV_UNKNOWN = 0;
FKV_SETUP = 1;
}
}
message PacketHeader
{
fixed32 packet_len = 1;
MyEnums.PacketType packet_type = 2; // how to make this as fixed size?
fixed32 request_uid = 3;
}