summaryrefslogtreecommitdiffstats
path: root/openxc.proto
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2013-10-24 10:09:30 -0400
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-07 13:18:10 -0500
commitf8ea5374f584310fbd7521b41385a71eb7c613d3 (patch)
treef8584d229fcbf76d16c665e5151af2e796fec4cb /openxc.proto
parent25dcef2e59fed31f0bba291a9a08f5021e371cf8 (diff)
Minimize the number of separate protobuf types.
Diffstat (limited to 'openxc.proto')
-rw-r--r--openxc.proto19
1 files changed, 11 insertions, 8 deletions
diff --git a/openxc.proto b/openxc.proto
index 9f9046eb..6b79c36f 100644
--- a/openxc.proto
+++ b/openxc.proto
@@ -7,7 +7,6 @@ message VehicleMessage {
enum Type { RAW = 1; TRANSLATED = 2; }
optional Type type = 1;
-
optional RawMessage raw_message = 2;
optional TranslatedMessage translated_message = 3;
}
@@ -19,15 +18,19 @@ message RawMessage {
}
message TranslatedMessage {
- optional string name = 1;
+ enum Type { STRING = 1; NUM = 2; BOOL = 3;
+ EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;}
+
+ optional Type type = 1;
+ optional string name = 2;
- optional string string_value = 2;
- optional double numerical_value = 3;
- optional bool boolean_value = 4;
+ optional string string_value = 3;
+ optional double numeric_value = 4;
+ optional bool boolean_value = 5;
- optional string string_event = 5;
- optional double numerical_event = 6;
- optional bool boolean_event = 7;
+ optional string string_event = 6;
+ optional double numeric_event = 7;
+ optional bool boolean_event = 8;
}
// TODO we should also consider having an enum type, having each specific