COVESA / vss-tools

Software for working with VSS (https://github.com/COVESA/vehicle_signal_specification)
Mozilla Public License 2.0
54 stars 55 forks source link

StaticUID in protobuf export #374

Closed nwesem closed 2 months ago

nwesem commented 3 months ago

hello everyone, can somebody help me understand why the protobuf export divides a generated 4-byte hash by 8? I might be missing some knowledge on pb, but would be interested to find out..

https://github.com/COVESA/vss-tools/blob/e9fd21efff0a66dee1a48cb0c91e412ea9112aa8/src/vss_tools/vspec/vssexporters/vss2protobuf.py#L153

nwesem commented 3 months ago

ok according to https://protobuf.dev/programming-guides/proto3/

a field numbers range is 1 to 536,870,911, so this is desired behavior and now I also understand why there is an extra check if there are duplicated field numbers..