You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I'm relatively inexperienced with protobufs, and also with Julia, so forgive me if my diagnosis here is wrong!)
I'm trying to use ProtoBuf.jl to send commands from Julia to OLA, which has a protobuf (2) RPC interface. I was able to successfully generate .jl files from their two .proto files, and encode messages with them, but my messages aren't being received correctly for some reason.
I tried running netcat (as a server) to capture the network traffic that the official OLA tools generate, and what my program generates, to compare them.
When sending a single command with a single DmxData message, eventually I narrowed it down to one difference. In the syntax of Protoscope, the official OLA client sends a DmxData which looks like:
{
1: 0
2: {`010203`}
3: 100
}
while my program which uses ProtoBuf.jl-generated encode(io, DmxData) sends:
{
2: {`010203`}
3: 100
}
when the first field is 0. Field 1 is required int32 universe = 1, and by my reading of the protobuf reference, that means it should always be included on the wire.
The generated line of Julia which encodes this particular field looks like:
which comes from print_field_encode_expr(io, f::FieldType, ctx::Context), which checks encode_condition -- but nothing there seems to check if the field is required.
Thanks!
The text was updated successfully, but these errors were encountered:
and my program was able to send the number 0 to OLA without any problems! Of course, this is just a sloppy proof-of-concept that happens to work in one case. I'm certain this isn't the correct solution to this problem.
(I'm relatively inexperienced with protobufs, and also with Julia, so forgive me if my diagnosis here is wrong!)
I'm trying to use ProtoBuf.jl to send commands from Julia to OLA, which has a protobuf (2) RPC interface. I was able to successfully generate .jl files from their two .proto files, and encode messages with them, but my messages aren't being received correctly for some reason.
I tried running netcat (as a server) to capture the network traffic that the official OLA tools generate, and what my program generates, to compare them.
When sending a single command with a single
DmxData
message, eventually I narrowed it down to one difference. In the syntax of Protoscope, the official OLA client sends aDmxData
which looks like:while my program which uses ProtoBuf.jl-generated
encode(io, DmxData)
sends:when the first field is 0. Field 1 is
required int32 universe = 1
, and by my reading of the protobuf reference, that means it should always be included on the wire.The generated line of Julia which encodes this particular field looks like:
which comes from
print_field_encode_expr(io, f::FieldType, ctx::Context)
, which checksencode_condition
-- but nothing there seems to check if the field isrequired
.Thanks!
The text was updated successfully, but these errors were encountered: