protocol-buffers

Integrate Google Protocol Buffers .proto files to Visual C++ 2010

独自空忆成欢 提交于 2020-12-24 16:18:36
问题 I've added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from the .proto input files. But I've been wondering if it's possible to start a compile only if the content of the proto files has changed? Is there a way to tell VisualStudio from a custom build step exactly that? What is the optimal way to integrate proto files into a visual studio build solution? At the moment, at every build the .proto file is updated which then also updates

Integrate Google Protocol Buffers .proto files to Visual C++ 2010

梦想与她 提交于 2020-12-24 16:16:12
问题 I've added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from the .proto input files. But I've been wondering if it's possible to start a compile only if the content of the proto files has changed? Is there a way to tell VisualStudio from a custom build step exactly that? What is the optimal way to integrate proto files into a visual studio build solution? At the moment, at every build the .proto file is updated which then also updates

Integrate Google Protocol Buffers .proto files to Visual C++ 2010

冷暖自知 提交于 2020-12-24 16:15:45
问题 I've added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from the .proto input files. But I've been wondering if it's possible to start a compile only if the content of the proto files has changed? Is there a way to tell VisualStudio from a custom build step exactly that? What is the optimal way to integrate proto files into a visual studio build solution? At the moment, at every build the .proto file is updated which then also updates

Integrate Google Protocol Buffers .proto files to Visual C++ 2010

一个人想着一个人 提交于 2020-12-24 16:11:32
问题 I've added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from the .proto input files. But I've been wondering if it's possible to start a compile only if the content of the proto files has changed? Is there a way to tell VisualStudio from a custom build step exactly that? What is the optimal way to integrate proto files into a visual studio build solution? At the moment, at every build the .proto file is updated which then also updates

Get message from FieldDescriptor in protobuf

无人久伴 提交于 2020-12-15 05:37:31
问题 In protobuf (C#) I want to print all fields inside different messages and submessages. How can I get message type and send to function again (recursive walking to lowest child)? More specific: What I must do, that fieldDescriptor is send like a message? I search solution, which is change "???". private void PrintAllReportableFieldsinMessage(Google.Protobuf.IMessage message) { foreach (var fieldDescriptor in message.Descriptor.Fields.InFieldNumberOrder()) { if (fieldDescriptor.FieldType ==

Get message from FieldDescriptor in protobuf

和自甴很熟 提交于 2020-12-15 05:37:00
问题 In protobuf (C#) I want to print all fields inside different messages and submessages. How can I get message type and send to function again (recursive walking to lowest child)? More specific: What I must do, that fieldDescriptor is send like a message? I search solution, which is change "???". private void PrintAllReportableFieldsinMessage(Google.Protobuf.IMessage message) { foreach (var fieldDescriptor in message.Descriptor.Fields.InFieldNumberOrder()) { if (fieldDescriptor.FieldType ==

compilation issue in protobuf with nanopb

♀尐吖头ヾ 提交于 2020-12-15 03:45:49
问题 I am using nanopb library I seek your suggestion to resolve build issue - I am using protobuf 3.12,nanopb 0.4.2, puython3,gcc . I compiled protoc both c and python but still faced issue while building. make protoc -osimple.pb simple.proto - step done nanopb/examples/simple $ python ../../generator/nanopb_generator.py simple.pb -> following error $ python3 ../../generator/nanopb_generator.py simple.pb Traceback (most recent call last): File "../../generator/nanopb_generator.py", line 50, in

Serialize and deserialize protobufs through CLI?

旧时模样 提交于 2020-12-15 03:37:16
问题 I am trying to deserialize a file saved as a protobuf through the CLI (seems like the easiest thing to do). I would prefer not to use protoc to compile, import it into a programming language and then read the result. My use case: A TensorFlow lite tool has output some data in a protobuf format. I've found the protobuf message definition in the TensorFlow repo too. I just want to read the output quickly. Specifically, I am getting back a tflite::evaluation::EvaluationStageMetrics message from

Serialize and deserialize protobufs through CLI?

亡梦爱人 提交于 2020-12-15 03:36:45
问题 I am trying to deserialize a file saved as a protobuf through the CLI (seems like the easiest thing to do). I would prefer not to use protoc to compile, import it into a programming language and then read the result. My use case: A TensorFlow lite tool has output some data in a protobuf format. I've found the protobuf message definition in the TensorFlow repo too. I just want to read the output quickly. Specifically, I am getting back a tflite::evaluation::EvaluationStageMetrics message from

Protobuf-3: How to resolve missing method “getIdCase()” ? Classes generated with '--experimental_allow_proto3_optional '

北战南征 提交于 2020-12-13 03:04:53
问题 I used the proto3_optional, and getting this xxCase() method missing on field that are 'optional'. Is there a workaround for this? Generated message class "muni.model.Model$Person" missing method "getId Case " NoSuchMethodException: muni.model.Model$Person.getId Case() Note: I need to retain hasXX() method working for validating objects, and JsonFormat.printer(myproto) for deserializing. Proto object message Person{ //Output only optional string id = 3; // "muni.model.Model$Person" missing