Hi guys,
First great job with the library it is nice and easy to use.
Now to the issue, a few days ago I have noticed that one of the parsers in my code keeps getting some strange errors:
** (UndefinedFunctionError) function :core_power_state.__struct__/0 is undefined (module :core_power_state is not available)
:core_power_state.__struct__()
(exprotobuf) lib/exprotobuf/utils.ex:28: Protobuf.Utils.convert_from_record/2
(exprotobuf) lib/exprotobuf/decoder.ex:94: Protobuf.Decoder.convert_value/2
(exprotobuf) lib/exprotobuf/decoder.ex:71: Protobuf.Decoder.convert_field/3
(elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3
first, I just thought, there was something wrong with the encoding that I was, but as it turns out, I could encode the messages just fine, but when I try to decode same message I keep getting error above.
So I did a little bit of debugging and on line 39 in lib/exprotobuf/decoder.ex found the error:
calling module.defs(:field, :gps_course_present) the module is returning wrong field:
Is there something wrong with my syntax in the Protofile, or is this an issue in the builder of the Protofile?
PS: the file was created from the C++ side since I encode the messages on the device and decode them in the elixir app. On C++ side I can decode message.
Hi guys, First great job with the library it is nice and easy to use.
Now to the issue, a few days ago I have noticed that one of the parsers in my code keeps getting some strange errors:
first, I just thought, there was something wrong with the encoding that I was, but as it turns out, I could encode the messages just fine, but when I try to decode same message I keep getting error above.
So I did a little bit of debugging and on line 39 in
lib/exprotobuf/decoder.ex
found the error: callingmodule.defs(:field, :gps_course_present)
the module is returning wrong field:instead of:
Is there something wrong with my syntax in the Protofile, or is this an issue in the builder of the Protofile?
PS: the file was created from the C++ side since I encode the messages on the device and decode them in the elixir app. On C++ side I can decode message.