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;
16 optional uint32 uptime = 7;
24 optional int32 bus = 1;
25 optional uint32 id = 2;
26 optional bytes data = 3;
27 optional FrameFormat frame_format = 4;
30 message ControlCommand {
36 ACCEPTANCE_FILTER_BYPASS = 5;
38 PREDEFINED_OBD2_REQUESTS = 7;
39 MODEM_CONFIGURATION = 8;
42 optional Type type = 1;
43 optional DiagnosticControlCommand diagnostic_request = 2;
44 optional PassthroughModeControlCommand passthrough_mode_request = 3;
45 optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4;
46 optional PayloadFormatCommand payload_format_command = 5;
47 optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6;
48 optional ModemConfigurationCommand modem_configuration_command = 7;
51 message DiagnosticControlCommand {
52 enum Action { ADD = 1; CANCEL = 2; }
54 optional DiagnosticRequest request = 1;
55 optional Action action = 2;
58 message PassthroughModeControlCommand {
59 optional int32 bus = 1;
60 optional bool enabled = 2;
63 message AcceptanceFilterBypassCommand {
64 optional int32 bus = 1;
65 optional bool bypass = 2;
68 message PayloadFormatCommand {
75 optional PayloadFormat format = 1;
78 message PredefinedObd2RequestsCommand {
79 optional bool enabled = 1;
82 message NetworkOperatorSettings {
83 enum OperatorSelectMode {
90 message NetworkDescriptor {
95 optional uint32 PLMN = 1;
96 optional NetworkType networkType = 2;
98 optional bool allowDataRoaming = 1;
99 optional OperatorSelectMode operatorSelectMode = 2;
100 optional NetworkDescriptor networkDescriptor = 3;
103 message NetworkDataSettings {
104 optional string APN = 1;
107 message ServerConnectSettings {
108 optional string host = 1;
109 optional uint32 port = 2;
112 message ModemConfigurationCommand {
113 optional NetworkOperatorSettings networkOperatorSettings = 1;
114 optional NetworkDataSettings networkDataSettings = 2;
115 optional ServerConnectSettings serverConnectSettings = 3;
118 message CommandResponse {
119 optional ControlCommand.Type type = 1;
120 optional string message = 2;
121 optional bool status = 3;
124 message DiagnosticRequest {
125 enum DecodedType { NONE = 1; OBD2 = 2; }
127 optional int32 bus = 1;
128 optional uint32 message_id = 2;
129 optional uint32 mode = 3;
130 optional uint32 pid = 4;
131 // TODO we are capping this at 8 bytes for now - need to change when we
132 // support multi-frame responses
133 optional bytes payload = 5;
134 optional bool multiple_responses = 6;
135 optional double frequency = 7;
136 optional string name = 8;
137 optional DecodedType decoded_type = 9;
140 message DiagnosticResponse {
141 optional int32 bus = 1;
142 optional uint32 message_id = 2;
143 optional uint32 mode = 3;
144 optional uint32 pid = 4;
145 optional bool success = 5;
146 optional uint32 negative_response_code = 6;
147 // TODO we are capping this at 8 bytes for now - need to change when we
148 // support multi-frame responses
149 optional bytes payload = 7;
150 optional double value = 8;
153 message DynamicField {
154 enum Type { STRING = 1; NUM = 2; BOOL = 3; }
156 optional Type type = 1;
157 optional string string_value = 2;
158 optional double numeric_value = 3;
159 optional bool boolean_value = 4;
162 message SimpleMessage {
163 optional string name = 1;
164 optional DynamicField value = 2;
165 optional DynamicField event = 3;