From aa4a2cd92afecf5ce6e3faba441d3b8758b5c372 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 4 Aug 2014 22:04:57 -0400 Subject: Require an 'action' in diagnostic requests. It wasn't very clean to try and infer a delete/create/update based on the value of the frequency field - this will require a little more code, but as they say in Python, explicit is better than implicit. Fixed https://github.com/openxc/openxc-message-format/issues/12 --- openxc.proto | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 5b7e78b..aa7f734 100644 --- a/openxc.proto +++ b/openxc.proto @@ -35,6 +35,7 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } + enum Action { CREATE = 1; UPDATE = 2; DELETE = 3; } optional int32 bus = 1; optional uint32 message_id = 2; @@ -47,6 +48,7 @@ message DiagnosticRequest { optional double frequency = 7; optional string name = 8; optional DecodedType decoded_type = 9; + optional Action action = 10; } message DiagnosticResponse { -- cgit From 3cd516b8f2925e82cff666a5c98ff30de507ca39 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 10 Aug 2014 21:51:13 -0400 Subject: Remove 'update' feature of diag request commands. --- openxc.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index aa7f734..1f03b43 100644 --- a/openxc.proto +++ b/openxc.proto @@ -35,7 +35,7 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } - enum Action { CREATE = 1; UPDATE = 2; DELETE = 3; } + enum Action { ADD = 1; CANCEL = 3; } optional int32 bus = 1; optional uint32 message_id = 2; -- cgit From fcb217ef4140319ee8557f849bbaf01ecfe92e6f Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 10 Aug 2014 22:05:11 -0400 Subject: Add a 'status' field to command responses. --- openxc.proto | 1 + 1 file changed, 1 insertion(+) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 1f03b43..071f2f2 100644 --- a/openxc.proto +++ b/openxc.proto @@ -31,6 +31,7 @@ message ControlCommand { message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; + optional bool status = 3; } message DiagnosticRequest { -- cgit From 1430a2a202e37be476b7290c2018a1c0d64833d8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 11 Aug 2014 23:36:39 -0400 Subject: Move action field to ControlCommand in binary format. --- openxc.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 071f2f2..937fe18 100644 --- a/openxc.proto +++ b/openxc.proto @@ -23,9 +23,11 @@ message RawMessage { message ControlCommand { enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; } + enum Action { ADD = 1; CANCEL = 2; } optional Type type = 1; optional DiagnosticRequest diagnostic_request = 2; + optional Action action = 3; } message CommandResponse { @@ -36,7 +38,6 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } - enum Action { ADD = 1; CANCEL = 3; } optional int32 bus = 1; optional uint32 message_id = 2; @@ -49,7 +50,6 @@ message DiagnosticRequest { optional double frequency = 7; optional string name = 8; optional DecodedType decoded_type = 9; - optional Action action = 10; } message DiagnosticResponse { -- cgit 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 937fe18..fd61b6c 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 From ef7c7dc0afab46f0e2e5eb8b051e769fb7a1a6b5 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 20 Sep 2014 22:56:37 -0400 Subject: Simplify passthrough command to just a boolean. --- openxc.proto | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index fd61b6c..1be1df8 100644 --- a/openxc.proto +++ b/openxc.proto @@ -42,14 +42,8 @@ message DiagnosticControlCommand { } message PassthroughModeControlCommand { - enum PassthroughMode { - OFF = 1; - FILTERED = 2; - UNFILTERED = 3; - } - optional int32 bus = 1; - optional PassthroughMode mode = 2; + optional bool enabled = 2; } message CommandResponse { -- cgit From 31c5f5de1980a68159b116090cee0072c47365da Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 18:41:24 -0400 Subject: Add a control command to control AF bypass status. See openxc/vi-firmware#301. --- openxc.proto | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 1be1df8..c7f7591 100644 --- a/openxc.proto +++ b/openxc.proto @@ -27,11 +27,13 @@ message ControlCommand { DEVICE_ID = 2; DIAGNOSTIC = 3; PASSTHROUGH = 4; + ACCEPTANCE_FILTER_BYPASS = 5; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; + optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; } message DiagnosticControlCommand { @@ -46,6 +48,11 @@ message PassthroughModeControlCommand { optional bool enabled = 2; } +message AcceptanceFilterBypassCommand { + optional int32 bus = 1; + optional bool bypass = 2; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit From e3162f7da4b6b5ad422bccdb9b2a4e1b144ab9c9 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 19:56:21 -0400 Subject: Add a command to change message format while running. --- openxc.proto | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index c7f7591..97a6ebb 100644 --- a/openxc.proto +++ b/openxc.proto @@ -28,12 +28,14 @@ message ControlCommand { DIAGNOSTIC = 3; PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; + MESSAGE_FORMAT = 6; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + optional MessageFormatCommand message_format_command = 5; } message DiagnosticControlCommand { @@ -53,6 +55,16 @@ message AcceptanceFilterBypassCommand { optional bool bypass = 2; } +message MessageFormatCommand { + enum MessageFormat { + JSON = 1; + BINARY = 2; + } + + optional int32 bus = 1; + optional MessageFormat format = 2; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit From d383e4cbc0bc89cd3bc3b69b0aa3ffc1862e9607 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 20:17:48 -0400 Subject: Remove unnecessary 'bus' field from message format command. --- openxc.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 97a6ebb..e0264c6 100644 --- a/openxc.proto +++ b/openxc.proto @@ -61,8 +61,7 @@ message MessageFormatCommand { BINARY = 2; } - optional int32 bus = 1; - optional MessageFormat format = 2; + optional MessageFormat format = 1; } message CommandResponse { -- cgit From 1e8b40f719ac43ea53e414e311d9387757630de6 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 20:40:22 -0400 Subject: Standardize names for payload format. --- openxc.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index e0264c6..f54c090 100644 --- a/openxc.proto +++ b/openxc.proto @@ -28,14 +28,14 @@ message ControlCommand { DIAGNOSTIC = 3; PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; - MESSAGE_FORMAT = 6; + PAYLOAD_FORMAT = 6; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - optional MessageFormatCommand message_format_command = 5; + optional PayloadFormatCommand payload_format_command = 5; } message DiagnosticControlCommand { @@ -55,13 +55,13 @@ message AcceptanceFilterBypassCommand { optional bool bypass = 2; } -message MessageFormatCommand { - enum MessageFormat { +message PayloadFormatCommand { + enum PayloadFormat { JSON = 1; - BINARY = 2; + PROTOBUF = 2; } - optional MessageFormat format = 1; + optional PayloadFormat format = 1; } message CommandResponse { -- cgit From 68ce7c57c76496efb28c385428b0e2d797d8df74 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 29 Sep 2014 21:52:34 -0400 Subject: Add a command to enable/disable pre-defined OBD-II requests. See openxc/vi-firmware#303. --- openxc.proto | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index f54c090..c2b7f7c 100644 --- a/openxc.proto +++ b/openxc.proto @@ -29,6 +29,7 @@ message ControlCommand { PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; PAYLOAD_FORMAT = 6; + PREDEFINED_OBD2_REQUESTS = 7; } optional Type type = 1; @@ -36,6 +37,7 @@ message ControlCommand { optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; optional PayloadFormatCommand payload_format_command = 5; + optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; } message DiagnosticControlCommand { @@ -64,6 +66,10 @@ message PayloadFormatCommand { optional PayloadFormat format = 1; } +message PredefinedObd2RequestsCommand { + optional bool enabled = 1; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit From f340bc6909f84a83dbb8a4d7ca3ba1002b31b110 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 21:30:28 -0400 Subject: Add a field to CAN messages to explicitly set the frame format. See openxc/vi-firmware:230. --- openxc.proto | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index c2b7f7c..3b23be5 100644 --- a/openxc.proto +++ b/openxc.proto @@ -16,9 +16,14 @@ message VehicleMessage { } message RawMessage { + enum FrameFormat { + STANDARD = 1; + EXTENDED = 2; + } optional int32 bus = 1; optional uint32 message_id = 2; optional bytes data = 3; + optional FrameFormat format = 4; } message ControlCommand { -- cgit From 28c895ef2fc4e152c506b0965d8f1830f848870e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 22:07:13 -0400 Subject: Give frame format field a more specific name. --- openxc.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 3b23be5..3c0a51d 100644 --- a/openxc.proto +++ b/openxc.proto @@ -23,7 +23,7 @@ message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; optional bytes data = 3; - optional FrameFormat format = 4; + optional FrameFormat frame_format = 4; } message ControlCommand { -- cgit From 9e84f7713ab25ddb69e6f46cf34285a09ee9e28b Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:12:02 -0400 Subject: Deprecate "translated" and "raw" names in binary format. Fixed #16. --- openxc.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 3c0a51d..3becaa5 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,18 +4,18 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; + enum Type { CAN = 1; SIMPLE = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; COMMAND_RESPONSE = 5; } optional Type type = 1; - optional RawMessage raw_message = 2; - optional TranslatedMessage translated_message = 3; + optional CanMessage can_message = 2; + optional SimpleMessage simple_message = 3; optional DiagnosticResponse diagnostic_response = 4; optional ControlCommand control_command = 5; optional CommandResponse command_response = 6; } -message RawMessage { +message CanMessage { enum FrameFormat { STANDARD = 1; EXTENDED = 2; @@ -119,7 +119,7 @@ message DynamicField { optional bool boolean_value = 4; } -message TranslatedMessage { +message SimpleMessage { enum Type { STRING = 1; NUM = 2; BOOL = 3; EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} -- cgit From d17a9c7988b05e70607d1eb823fbe160d0a4c506 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:25:13 -0400 Subject: Remove redundant 'type' field from binary SimpleVehicleMessage. You can figure out the type based on the value and event DynamicFields. Fixed #19. --- openxc.proto | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 3becaa5..252f214 100644 --- a/openxc.proto +++ b/openxc.proto @@ -120,13 +120,9 @@ message DynamicField { } message SimpleMessage { - 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 DynamicField value = 3; - optional DynamicField event = 4; + optional string name = 1; + optional DynamicField value = 2; + optional DynamicField event = 3; } // TODO we should also consider having an enum type, having each specific -- cgit From 75bc6db24e48f4b577f68a4e27cace82ff8e442c Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 7 Nov 2014 08:57:03 -0500 Subject: Back off change to CAN message ID for backwards compatibility. I don't think this change is worth breaking compatibility with exiting trace files. The meaning of an ID is much more clean when inside a CAN message object, so that's why I think it make sense to be different than the "id" inside a diagnostic request. --- openxc.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openxc.proto') diff --git a/openxc.proto b/openxc.proto index 252f214..6bf1567 100644 --- a/openxc.proto +++ b/openxc.proto @@ -21,7 +21,7 @@ message CanMessage { EXTENDED = 2; } optional int32 bus = 1; - optional uint32 message_id = 2; + optional uint32 id = 2; optional bytes data = 3; optional FrameFormat frame_format = 4; } -- cgit