3 option java_package = "com.openxc";
4 option java_outer_classname = "BinaryMessages";
6 message VehicleMessage {
7 enum Type { CAN = 1; SIMPLE = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4;
8 COMMAND_RESPONSE = 5; }
10 optional Type type = 1;
11 optional CanMessage can_message = 2;
12 optional SimpleMessage simple_message = 3;
13 optional DiagnosticResponse diagnostic_response = 4;
14 optional ControlCommand control_command = 5;
15 optional CommandResponse command_response = 6;
23 optional int32 bus = 1;
24 optional uint32 id = 2;
25 optional bytes data = 3;
26 optional FrameFormat frame_format = 4;
29 message ControlCommand {
35 ACCEPTANCE_FILTER_BYPASS = 5;
37 PREDEFINED_OBD2_REQUESTS = 7;
40 optional Type type = 1;
41 optional DiagnosticControlCommand diagnostic_request = 2;
42 optional PassthroughModeControlCommand passthrough_mode_request = 3;
43 optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4;
44 optional PayloadFormatCommand payload_format_command = 5;
45 optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6;
48 message DiagnosticControlCommand {
49 enum Action { ADD = 1; CANCEL = 2; }
51 optional DiagnosticRequest request = 1;
52 optional Action action = 2;
55 message PassthroughModeControlCommand {
56 optional int32 bus = 1;
57 optional bool enabled = 2;
60 message AcceptanceFilterBypassCommand {
61 optional int32 bus = 1;
62 optional bool bypass = 2;
65 message PayloadFormatCommand {
71 optional PayloadFormat format = 1;
74 message PredefinedObd2RequestsCommand {
75 optional bool enabled = 1;
78 message CommandResponse {
79 optional ControlCommand.Type type = 1;
80 optional string message = 2;
81 optional bool status = 3;
84 message DiagnosticRequest {
85 enum DecodedType { NONE = 1; OBD2 = 2; }
87 optional int32 bus = 1;
88 optional uint32 message_id = 2;
89 optional uint32 mode = 3;
90 optional uint32 pid = 4;
91 // TODO we are capping this at 8 bytes for now - need to change when we
92 // support multi-frame responses
93 optional bytes payload = 5;
94 optional bool multiple_responses = 6;
95 optional double frequency = 7;
96 optional string name = 8;
97 optional DecodedType decoded_type = 9;
100 message DiagnosticResponse {
101 optional int32 bus = 1;
102 optional uint32 message_id = 2;
103 optional uint32 mode = 3;
104 optional uint32 pid = 4;
105 optional bool success = 5;
106 optional uint32 negative_response_code = 6;
107 // TODO we are capping this at 8 bytes for now - need to change when we
108 // support multi-frame responses
109 optional bytes payload = 7;
110 optional double value = 8;
113 message DynamicField {
114 enum Type { STRING = 1; NUM = 2; BOOL = 3; }
116 optional Type type = 1;
117 optional string string_value = 2;
118 optional double numeric_value = 3;
119 optional bool boolean_value = 4;
122 message SimpleMessage {
123 optional string name = 1;
124 optional DynamicField value = 2;
125 optional DynamicField event = 3;