diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2013-10-04 19:31:51 -0400 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-07 13:18:09 -0500 |
commit | 0dbcea457cb624a60ecffe59c163d775ea2fc490 (patch) | |
tree | b2be7da642e6be4a5f1447c39475d550eb0f644b /openxc.proto | |
parent | 11ca9d9f43e7e741b3138a06a6c6ab34be436dd8 (diff) |
Merge all sub-types into a single TranslatedMessage type.
Diffstat (limited to 'openxc.proto')
-rw-r--r-- | openxc.proto | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/openxc.proto b/openxc.proto index 39130831..0748e75f 100644 --- a/openxc.proto +++ b/openxc.proto @@ -1,14 +1,12 @@ package openxc; message VehicleMessage { - enum Type { RAW = 1; STRING = 2; NUM = 3; BOOL = 4; } + enum Type { RAW = 1; TRANSLATED = 2; } optional Type type = 1; optional RawMessage raw_message = 2; - optional TranslatedStringMessage string_message = 3; - optional TranslatedNumericMessage numerical_message = 4; - optional TranslatedBooleanMessage boolean_message = 5; + optional TranslatedMessage translated_message = 3; } message RawMessage { @@ -17,20 +15,17 @@ message RawMessage { optional sint64 data = 3; } -message TranslatedStringMessage { +message TranslatedMessage { optional string name = 1; - optional string value = 2; -} -message TranslatedNumericMessage { - optional string name = 1; - optional double value = 2; -} + optional string string_value = 2; + optional double numerical_value = 3; + optional bool boolean_value = 4; -message TranslatedBooleanMessage { - optional string name = 1; - optional bool value = 2; + optional string string_event = 5; + optional double numerical_event = 6; + optional bool boolean_event = 7; } -// TODO we should also consider having an enum type, h aving each specific +// TODO we should also consider having an enum type, having each specific // message defined as a protobuf |