From 625dae730013a4c59a1bd0bacc1f743676274e24 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 20 Sep 2014 21:47:09 -0400 Subject: Add passthrough command and refactor commands in binary format. The ControlCommand is now more like a VehicleMessage - it has a 'type' and many optional fields pointing to the various types. If the type is diagnostic, the client should look at the diagnostic_request field. --- openxc.proto | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 937fe186..fd61b6c8 100644 --- a/openxc.proto +++ b/openxc.proto @@ -22,12 +22,34 @@ message RawMessage { } message ControlCommand { - enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; } - enum Action { ADD = 1; CANCEL = 2; } + enum Type { + VERSION = 1; + DEVICE_ID = 2; + DIAGNOSTIC = 3; + PASSTHROUGH = 4; + } optional Type type = 1; - optional DiagnosticRequest diagnostic_request = 2; - optional Action action = 3; + optional DiagnosticControlCommand diagnostic_request = 2; + optional PassthroughModeControlCommand passthrough_mode_request = 3; +} + +message DiagnosticControlCommand { + enum Action { ADD = 1; CANCEL = 2; } + + optional DiagnosticRequest request = 1; + optional Action action = 2; +} + +message PassthroughModeControlCommand { + enum PassthroughMode { + OFF = 1; + FILTERED = 2; + UNFILTERED = 3; + } + + optional int32 bus = 1; + optional PassthroughMode mode = 2; } message CommandResponse { -- cgit 1.2.3-korg