summaryrefslogtreecommitdiffstats
path: root/openxc.proto
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-03-04 15:28:14 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-03-04 15:28:14 -0500
commit3e91f2023d1161432605aff4af6616a589e63b5c (patch)
tree94cf505364e5697b00ddc6827bd56ef0cf6e252c /openxc.proto
parentd12a24040584f3202ee9428bce56e5915954ffaf (diff)
Condense string/number/bool trio into a field.
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 c6177de0..27ea931f 100644
--- a/openxc.proto
+++ b/openxc.proto
@@ -53,20 +53,23 @@ message DiagnosticResponse {
optional double value = 8;
}
+message DynamicField {
+ enum Type { STRING = 1; NUM = 2; BOOL = 3; }
+
+ optional Type type = 1;
+ optional string string_value = 2;
+ optional double numeric_value = 3;
+ optional bool boolean_value = 4;
+}
+
message TranslatedMessage {
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 = 3;
- optional double numeric_value = 4;
- optional bool boolean_value = 5;
-
- optional string string_event = 6;
- optional double numeric_event = 7;
- optional bool boolean_event = 8;
+ optional DynamicField value = 3;
+ optional DynamicField event = 4;
}
// TODO we should also consider having an enum type, having each specific