summaryrefslogtreecommitdiffstats
path: root/openxc.proto
diff options
context:
space:
mode:
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;