summaryrefslogtreecommitdiffstats
path: root/openxc.proto
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-03-03 15:36:35 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-03-03 17:18:41 -0500
commit37d7cb54624eaf3e674b700f706b53782489e764 (patch)
tree9698cf506f3e6a77d655296f5d261a8448c9956c /openxc.proto
parentfba381d2003787a719252400487d3e6b9f2d1fdb (diff)
Add a draft protobuf format for diagnostic requests.
Diffstat (limited to 'openxc.proto')
-rw-r--r--openxc.proto25
1 files changed, 23 insertions, 2 deletions
diff --git a/openxc.proto b/openxc.proto
index a562b49d..259bdfb4 100644
--- a/openxc.proto
+++ b/openxc.proto
@@ -9,7 +9,7 @@ message VehicleMessage {
optional Type type = 1;
optional RawMessage raw_message = 2;
optional TranslatedMessage translated_message = 3;
- optional DiagnosticMessage diagnostic_message = 4;
+ optional DiagnosticResponse diagnostic_response = 4;
}
message RawMessage {
@@ -18,7 +18,28 @@ message RawMessage {
optional bytes data = 3;
}
-message DiagnosticMessage {
+message ControlCommand {
+ enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; }
+
+ optional Type type = 1;
+ optional DiagnosticRequest diagnostic_request = 2;
+}
+
+message DiagnosticRequest {
+ optional int32 bus = 1;
+ optional uint32 message_id = 2;
+ optional uint32 mode = 3;
+ optional uint32 pid = 4;
+ // TODO we are capping this at 8 bytes for now - need to change when we
+ // support multi-frame responses
+ optional bytes payload = 5;
+ optional bool parse_payload = 6;
+ optional double factor = 7;
+ optional double offset = 8;
+ optional double frequency = 9;
+}
+
+message DiagnosticResponse {
optional int32 bus = 1;
optional uint32 message_id = 2;
optional uint32 mode = 3;