Skip to content

Use an enum for known simple message types in Protobuf spec  #14

Open
@peplin

Description

@peplin

At the moment, the TranslatedMessage type in the Protocol Buffers spec has a string field for the name of the message. The binary format is supposed to be tiny - strings are huge!

Since we have a known set of official translated message names (now for both CAN signals and OBD-II responses, it would be more efficient to have a enum in the protobuf spec, one for each known type.

With that, the TranslateMessage could have 2 fields for the name, both optional:

  • One field is an optional enum, referring to an official signal name. That'll take just a byte or two in the serialized binary message.
  • The other field is the existing string name field, for messages outside the standard set. We retain the flexibility of arbitrary names, but pick up a big space savings for anything from the official set.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions