diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2013-09-30 21:19:06 -0400 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-07 13:18:09 -0500 |
commit | b9a96fe63416583519d860c206cf27e408bcccab (patch) | |
tree | 5a9e0b49041edd49a5e85a062d95cdc7518d0b80 /openxc.proto | |
parent | 1820baf320d5831815de35dddbbfc5818a0e004b (diff) |
Move proto definition to top level.
Diffstat (limited to 'openxc.proto')
-rw-r--r-- | openxc.proto | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/openxc.proto b/openxc.proto new file mode 100644 index 00000000..1917b0bd --- /dev/null +++ b/openxc.proto @@ -0,0 +1,35 @@ +package openxc; + +message VehicleMessage { + enum Type { RAW = 1; STRING = 2; NUM = 3; BOOL = 4; } + + optional Type type = 1; + + optional RawMessage raw_message = 2; + optional TranslatedStringMessage string_message = 3; + optional TranslatedNumericMessage numerical_message = 4; + optional TranslatedBooleanMessage boolean_message = 5; +} + +message RawMessage { + optional uint32 message_id = 1; + optional double data = 2; +} + +message TranslatedStringMessage { + optional string name = 1; + optional string value = 2; +} + +message TranslatedNumericMessage { + optional string name = 1; + optional double value = 2; +} + +message TranslatedBooleanMessage { + optional string name = 1; + optional bool value = 2; +} + +// TODO we should also consider having an enum type, h aving each specific +// message defined as a protobuf |