Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Clarify how diagnostic requests are identified, updated and cancelled.
[apps/agl-service-can-low-level.git]
/
openxc.proto
diff --git
a/openxc.proto
b/openxc.proto
index
c6177de
..
5b7e78b
100644
(file)
--- a/
openxc.proto
+++ b/
openxc.proto
@@
-4,13
+4,15
@@
option java_package = "com.openxc";
option java_outer_classname = "BinaryMessages";
message VehicleMessage {
option java_outer_classname = "BinaryMessages";
message VehicleMessage {
- enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; }
+ enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4;
+ COMMAND_RESPONSE = 5; }
optional Type type = 1;
optional RawMessage raw_message = 2;
optional TranslatedMessage translated_message = 3;
optional DiagnosticResponse diagnostic_response = 4;
optional ControlCommand control_command = 5;
optional Type type = 1;
optional RawMessage raw_message = 2;
optional TranslatedMessage translated_message = 3;
optional DiagnosticResponse diagnostic_response = 4;
optional ControlCommand control_command = 5;
+ optional CommandResponse command_response = 6;
}
message RawMessage {
}
message RawMessage {
@@
-26,7
+28,14
@@
message ControlCommand {
optional DiagnosticRequest diagnostic_request = 2;
}
optional DiagnosticRequest diagnostic_request = 2;
}
+message CommandResponse {
+ optional ControlCommand.Type type = 1;
+ optional string message = 2;
+}
+
message DiagnosticRequest {
message DiagnosticRequest {
+ enum DecodedType { NONE = 1; OBD2 = 2; }
+
optional int32 bus = 1;
optional uint32 message_id = 2;
optional uint32 mode = 3;
optional int32 bus = 1;
optional uint32 message_id = 2;
optional uint32 mode = 3;
@@
-34,10
+43,10
@@
message DiagnosticRequest {
// TODO we are capping this at 8 bytes for now - need to change when we
// support multi-frame responses
optional bytes payload = 5;
// 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 f
actor
= 7;
- optional
double offset
= 8;
- optional
double frequency
= 9;
+ optional bool
multiple_responses
= 6;
+ optional double f
requency
= 7;
+ optional
string name
= 8;
+ optional
DecodedType decoded_type
= 9;
}
message DiagnosticResponse {
}
message DiagnosticResponse {
@@
-53,20
+62,23
@@
message DiagnosticResponse {
optional double value = 8;
}
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;
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
}
// TODO we should also consider having an enum type, having each specific