From ab2066f086fa6cec7a29c019f51933023d4d5419 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 21:27:24 -0400 Subject: Move JSON spec to a separate file to keep the length down. --- JSON.mkd | 349 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 349 insertions(+) create mode 100644 JSON.mkd (limited to 'JSON.mkd') diff --git a/JSON.mkd b/JSON.mkd new file mode 100644 index 00000000..4704574c --- /dev/null +++ b/JSON.mkd @@ -0,0 +1,349 @@ +# OpenXC JSON Message Format + +Each JSON message published by a VI is delimited with a `\0 ` character. + +## Extra Values + +Any of the following JSON objects may optionally include an `extras` +field. The value may be any valid JSON object or array. The client libraries +will do their best to parse this information into a generic format and pass it +to your application. For example: + + {"name": "steering_wheel_angle", + "value": 45, + "extras": { + "calibrated": false + } + } + +## Single Valued + +There may not be a 1:1 relationship between input and output signals - i.e. raw +engine timing CAN signals may be summarized in an "engine performance" metric on +the abstract side of the interface. + +The expected format of a single valued message is: + + {"name": "steering_wheel_angle", "value": 45} + +## Evented + +The expected format of an event message is: + + {"name": "button_event", "value": "up", "event": "pressed"} + +This format is good for something like a button event, where there are two +discrete pieces of information in the measurement. + +## Raw CAN Message format + +The format for a raw CAN message: + + {"bus": 1, "id": 1234, "data": "0x12345678"} + +**bus** - the numerical identifier of the CAN bus where this message originated, + most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). + +**id** - the CAN message ID + +**data** - up to 8 bytes of data from the CAN message's payload, represented as + a hexidecimal number in a string. Many JSON parser cannot handle 64-bit + integers, which is why we are not using a numerical data type. Each byte in + the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the + complete string must have an even number of characters. The `0x` prefix is + optional. + +## Diagnostic Messages + +### Requests + +A diagnostic request is added or cancelled with a JSON object like this example: + + { "command": "diagnostic_request", + "action": "add", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "payload": "0x1234", + "multiple_responses": false, + "frequency": 1, + "name": "my_pid" + } + } + } + +* The `command` must be `diagnostic_request.` +* The `action` must be included, and must be one of: + * `add` - create a new one-off or recurring diagnostic request. + * `cancel` - cancel an existing request. +* The details of the request must be included in the `request` field, using + the sub-fields defined below. + +A diagnostic request's `bus`, `id`, `mode` and `pid` (or lack of a `pid`) +combine to create a unique key to identify a request. These four fields will be +referred to as the key of the diagnostic request. For example, to create a +simple one-time diagnostic request: + + { "command": "diagnostic_request", + "action": "add", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5 + } + } + } + +Requests are completed after any responses are received (unless +`multiple_responses` is set), or the request has timed out after a certain +number of seconds. After a request is completed, you can re-`create` the same +key to make another request. + +Requests with a `frequency` are added as *recurring* requests, e.g. to add the +previous example as a recurring request at 1Hz: + + { "command": "diagnostic_request", + "action": "add", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "frequency": 1 + } + } + } + +To cancel a recurring request, send a `cancel` action with the same key, e.g.: + + { "command": "diagnostic_request", + "action": "cancel", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5 + } + } + } + +Simultaneous recurring requests for the same key at different rates (e.g. 1Hz +*and* 2Hz) is not supported. However, non-recurring ("one-off") requests may +exist in parallel with a recurring request for the same key. + +**bus** - the numerical identifier of the CAN bus where this request should be + sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). + +**id** - the CAN arbitration ID for the request. + +**mode** - the OBD-II mode of the request - 0x1 through 0xff (1 through 9 are the + standardized modes and 0x22 is a common proprietary mode). + +**pid** - (optional) the PID for the request, if applicable. + +**payload** - (optional) up to 7 bytes of data for the request's payload + represented as a hexadecimal number in a string. Many JSON parser cannot + handle 64-bit integers, which is why we are not using a numerical data type. + Each byte in the string *must* be represented with 2 characters, e.g. `0x1` + is `0x01` - the complete string must have an even number of characters. The + `0x` prefix is optional. + +**name** - (optional, defaults to nothing) A human readable, string name for + this request. If provided, the response will have a `name` field (much like a + normal translated message) with this value in place of `bus`, `id`, `mode` and + `pid`. + +**multiple_responses** - (optional, false by default) if true, request will stay + active for a full 100ms, even after receiving a diagnostic response message. + This is useful for requests to the functional broadcast arbitration ID + (`0x7df`) when you need to get responses from multiple modules. It's possible + to set this to `true` for non-broadcast requests, but in practice you won't + see any additional responses after the first and it will just take up memory + in the VI for longer. + +**frequency** - (optional) Make this request a recurring request, at a this + frequency in Hz. To send a single non-recurring request, leave this field out. + +**decoded_type** - (optional, defaults to "obd2" if the request is a recognized +OBD-II mode 1 request, otherwise "none") If specified, the valid values are +`"none"` and `"obd2"`. If `obd2`, the payload will be decoded according to the +OBD-II specification and returned in the `value` field. Set this to `none` to +manually override the OBD-II decoding feature for a known PID. + +### Responses + +The response to a successful request: + + {"bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "success": true, + "payload": "0x1234", + "value": 4660} + +and to an unsuccessful request, with the `negative_response_code` and no `pid` +echo: + + {"bus": 1, + "id": 1234, + "mode": 1, + "success": false, + "negative_response_code": 17} + +**bus** - the numerical identifier of the CAN bus where this response was + received. + +**id** - the CAN arbitration ID for this response. + +**mode** - the OBD-II mode of the original diagnostic request. + +**pid** - (optional) the PID for the request, if applicable. + +**success** - true if the response received was a positive response. If this + field is false, the remote node returned an error and the + `negative_response_code` field should be populated. + +**negative_response_code** - (optional) If requested node returned an error, + `success` will be `false` and this field will contain the negative response + code (NRC). + +Finally, the `payload` and `value` fields are mutually exclusive: + +**payload** - (optional) up to 7 bytes of data returned in the response, + represented as a hexadecimal number in a string. Many JSON parser cannot + handle 64-bit integers, which is why we are not using a numerical data type. + +**value** - (optional) if the response had a payload, this may be the + payload interpreted as an integer. + +The response to a simple PID request would look like this: + + {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} + +## Commands + +In addition to the `diagnostic_request` command described earlier, there are +other possible values for the `command` field. + +### Version Query + +The `version` command triggers the VI to inject a firmware version identifier +response into the outgoing data stream. + +**Request** + + { "command": "version"} + +**Response** + + { "command_response": "version", "message": "v6.0-dev (default)"} + +### Device ID Query + +The `device_id` command triggers the VI to inject a unique device ID (e.g. the +MAC address of an included Bluetooth module) into into the outgoing data stream. + +**Request** + + { "command": "device_id"} + +**Response** + + { "command_response": "device_id", "message": "0012345678"} + +### Passthrough CAN Mode + +The `passthrough` command controls whether low-level CAN messages are passed +through from the CAN bus through the VI to the output stream. If the CAN +acceptance filter is in bypass mode and passthrough is enabled, the output +stream will include all received CAN messages. If the bypass filter is enabled, +only those CAN messages that have been pre-defined in the firmware are +forwarded. + +**Request** + + { "command": "passthrough", + "bus": 1, + "enabled": true + } + +**Response** + +If the bus in the request was valid and the passthrough mode was changed, the +`status` field in the response will be `true`. If `false`, the passthrough mode +was not changed. + + { "command_response": "passthrough", "status": true} + +### Acceptance Filter Bypass + +The `af_bypass` command controls whether the CAN message acceptance filter is +bypassed for each CAN controller. By default, hardware acceptance filter (AF) is +enabled in the VI - only previously defined CAN message IDs will be received. +Send this command with `bypass: true` to force the filters to bypassed. + +If `passthrough` mode is also enabled, when the AF is bypassed, the output will +include all CAN messages received. + +**Request** + + { "command": "af_bypass", + "bus": 1, + "bypass": true + } + +**Response** + +If the bus in the request was valid and the AF mode was changed, the `status` +field in the response will be `true`. If `false`, the passthrough mode was not +changed. + + { "command_response": "af_bypass", "status": true} + +### Payload Format Control + +The `payload_format` command determines the format for output data from the VI +and the expected format of commands sent to the VI. + +Valid formats are `json` and `protobuf`. + +**Request** + + { "command": "payload_format", + "format": "json" + } + +**Response** + +If the format was changed successfully, the `status` in the response will be +`true`. The response will be in the original message format, and all subsequent +messages will be in the new format. + + { "command_response": "payload_format", "status": true} + +### Automatic Pre-Defined OBD-II PID Requests + +The `predefined_obd2` command enables and disables the querying for and +translating of a set of pre-defined OBD-II PIDs from the attached vehicle. When +enabled, the VI will query the vehicle to see if these PIDs are claimed to be +supported and for those that are, it will set up recurring requests. The +responses will be output as simple vehicle messages, with the names defined in +the "Signals Defined from Diagnostic Messages" section below. + +**Request** + + { "command": "predefined_obd2", + "enabled": true + } + +**Response** + +f the predefined requests were enabled or disabled successfully, the `status` in +the response will be `true`. + + { "command_response": "predefined_obd2", "status": true} + -- cgit 1.2.3-korg 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. --- JSON.mkd | 4 + gen/cpp/openxc.pb | 10 +- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 20 ++- gen/java/com/openxc/BinaryMessages.java | 282 ++++++++++++++++++++++++++------ gen/python/openxc_pb2.py | 105 +++++++----- openxc.proto | 5 + 7 files changed, 329 insertions(+), 102 deletions(-) (limited to 'JSON.mkd') diff --git a/JSON.mkd b/JSON.mkd index 4704574c..804efa45 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -53,6 +53,10 @@ The format for a raw CAN message: complete string must have an even number of characters. The `0x` prefix is optional. +**format** - (optional) explicitly set the frame format for the CAN message, one + of `standard` or `extended`. If the `id` is greater than `0x7ff`, the extended + frame format will be selected automatically. + ## Diagnostic Messages ### Requests diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index eef93e61..66f214fe 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -² +Ž openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -15,13 +15,17 @@ TRANSLATED DIAGNOSTIC CONTROL_COMMAND -COMMAND_RESPONSE"; +COMMAND_RESPONSE"– RawMessage bus ( message_id (  -data ( "¸ +data ( . +format (2.openxc.RawMessage.FrameFormat") + FrameFormat +STANDARD +EXTENDED"¸ ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ac31b7ec..3a5ca0ff 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.1 at Mon Sep 29 21:53:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 21:30:25 2014. */ #include "openxc.pb.h" @@ -19,10 +19,11 @@ const pb_field_t openxc_VehicleMessage_fields[7] = { PB_LAST_FIELD }; -const pb_field_t openxc_RawMessage_fields[4] = { +const pb_field_t openxc_RawMessage_fields[5] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), + PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_RawMessage, format, data, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 4af15de9..5f11ec1b 100644 --- a/gen/cpp/openxc.pb.h +++ b/gen/cpp/openxc.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.1 at Mon Sep 29 21:53:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 21:30:25 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -22,6 +22,11 @@ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_COMMAND_RESPONSE = 5 } openxc_VehicleMessage_Type; +typedef enum _openxc_RawMessage_FrameFormat { + openxc_RawMessage_FrameFormat_STANDARD = 1, + openxc_RawMessage_FrameFormat_EXTENDED = 2 +} openxc_RawMessage_FrameFormat; + typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, openxc_ControlCommand_Type_DEVICE_ID = 2, @@ -160,6 +165,8 @@ typedef struct _openxc_RawMessage { uint32_t message_id; bool has_data; openxc_RawMessage_data_t data; + bool has_format; + openxc_RawMessage_FrameFormat format; } openxc_RawMessage; typedef struct _openxc_DiagnosticControlCommand { @@ -214,7 +221,7 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} -#define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} +#define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}, false, (openxc_RawMessage_FrameFormat)0} #define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default} #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} @@ -227,7 +234,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} #define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} -#define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} +#define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}, false, (openxc_RawMessage_FrameFormat)0} #define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero} #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} @@ -274,6 +281,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 +#define openxc_RawMessage_format_tag 4 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 #define openxc_TranslatedMessage_type_tag 1 @@ -295,7 +303,7 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; -extern const pb_field_t openxc_RawMessage_fields[4]; +extern const pb_field_t openxc_RawMessage_fields[5]; extern const pb_field_t openxc_ControlCommand_fields[7]; extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; @@ -309,8 +317,8 @@ extern const pb_field_t openxc_DynamicField_fields[5]; extern const pb_field_t openxc_TranslatedMessage_fields[5]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 716 -#define openxc_RawMessage_size 27 +#define openxc_VehicleMessage_size 722 +#define openxc_RawMessage_size 33 #define openxc_ControlCommand_size 126 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index b3d1be43..0937ef5d 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1514,6 +1514,16 @@ public final class BinaryMessages { * optional bytes data = 3; */ com.google.protobuf.ByteString getData(); + + // optional .openxc.RawMessage.FrameFormat format = 4; + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + boolean hasFormat(); + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat(); } /** * Protobuf type {@code openxc.RawMessage} @@ -1581,6 +1591,17 @@ public final class BinaryMessages { data_ = input.readBytes(); break; } + case 32: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.RawMessage.FrameFormat value = com.openxc.BinaryMessages.RawMessage.FrameFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + format_ = value; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -1620,6 +1641,88 @@ public final class BinaryMessages { return PARSER; } + /** + * Protobuf enum {@code openxc.RawMessage.FrameFormat} + */ + public enum FrameFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STANDARD = 1; + */ + STANDARD(0, 1), + /** + * EXTENDED = 2; + */ + EXTENDED(1, 2), + ; + + /** + * STANDARD = 1; + */ + public static final int STANDARD_VALUE = 1; + /** + * EXTENDED = 2; + */ + public static final int EXTENDED_VALUE = 2; + + + public final int getNumber() { return value; } + + public static FrameFormat valueOf(int value) { + switch (value) { + case 1: return STANDARD; + case 2: return EXTENDED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FrameFormat findValueByNumber(int number) { + return FrameFormat.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.RawMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final FrameFormat[] VALUES = values(); + + public static FrameFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private FrameFormat(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.RawMessage.FrameFormat) + } + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -1669,10 +1772,27 @@ public final class BinaryMessages { return data_; } + // optional .openxc.RawMessage.FrameFormat format = 4; + public static final int FORMAT_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat format_; + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public boolean hasFormat() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { + return format_; + } + private void initFields() { bus_ = 0; messageId_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; + format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1695,6 +1815,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, data_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, format_.getNumber()); + } getUnknownFields().writeTo(output); } @@ -1716,6 +1839,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, data_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, format_.getNumber()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -1838,6 +1965,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); + format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1878,6 +2007,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000004; } result.data_ = data_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.format_ = format_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1903,6 +2036,9 @@ public final class BinaryMessages { if (other.hasData()) { setData(other.getData()); } + if (other.hasFormat()) { + setFormat(other.getFormat()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2032,6 +2168,42 @@ public final class BinaryMessages { return this; } + // optional .openxc.RawMessage.FrameFormat format = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public boolean hasFormat() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { + return format_; + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public Builder setFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + format_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public Builder clearFormat() { + bitField0_ = (bitField0_ & ~0x00000008); + format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.RawMessage) } @@ -10913,59 +11085,61 @@ public final class BinaryMessages { "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" + "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" + "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", - "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + - "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "data\030\003 \001(\014\"\270\004\n\016ControlCommand\022)\n\004type\030\001 " + - "\001(\0162\033.openxc.ControlCommand.Type\022<\n\022diag" + - "nostic_request\030\002 \001(\0132 .openxc.Diagnostic" + - "ControlCommand\022G\n\030passthrough_mode_reque" + - "st\030\003 \001(\0132%.openxc.PassthroughModeControl" + - "Command\022O\n acceptance_filter_bypass_comm" + - "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + - "sCommand\022<\n\026payload_format_command\030\005 \001(\013", - "2\034.openxc.PayloadFormatCommand\022O\n predef" + - "ined_obd2_requests_command\030\006 \001(\0132%.openx" + - "c.PredefinedObd2RequestsCommand\"\223\001\n\004Type" + - "\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOST" + - "IC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILT" + - "ER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDE" + - "FINED_OBD2_REQUESTS\020\007\"\236\001\n\030DiagnosticCont" + - "rolCommand\022*\n\007request\030\001 \001(\0132\031.openxc.Dia" + - "gnosticRequest\0227\n\006action\030\002 \001(\0162\'.openxc." + - "DiagnosticControlCommand.Action\"\035\n\006Actio", - "n\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughMod" + - "eControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030" + - "\002 \001(\010\"<\n\035AcceptanceFilterBypassCommand\022\013" + - "\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadFo" + - "rmatCommand\022:\n\006format\030\001 \001(\0162*.openxc.Pay" + - "loadFormatCommand.PayloadFormat\"\'\n\rPaylo" + - "adFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035Pred" + - "efinedObd2RequestsCommand\022\017\n\007enabled\030\001 \001" + - "(\010\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.op" + - "enxc.ControlCommand.Type\022\017\n\007message\030\002 \001(", - "\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021DiagnosticRequest\022" + - "\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode" + - "\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030\005 \001(\014\022\032\n\022" + - "multiple_responses\030\006 \001(\010\022\021\n\tfrequency\030\007 " + - "\001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\0162" + - "%.openxc.DiagnosticRequest.DecodedType\"!" + - "\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Di" + - "agnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage" + - "_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007" + - "success\030\005 \001(\010\022\036\n\026negative_response_code\030", - "\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001" + - "\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dy" + - "namicField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n" + - "\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_value\030\004 " + - "\001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL" + - "\020\003\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162\036" + - ".openxc.TranslatedMessage.Type\022\014\n\004name\030\002" + - " \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicFiel" + - "d\022#\n\005event\030\004 \001(\0132\024.openxc.DynamicField\"\\" + - "\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n", - "\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EV" + - "ENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessag" + - "es" + "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\226\001\n\nRawMes" + + "sage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n" + + "\004data\030\003 \001(\014\022.\n\006format\030\004 \001(\0162\036.openxc.Raw" + + "Message.FrameFormat\")\n\013FrameFormat\022\014\n\010ST" + + "ANDARD\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016ControlComman" + + "d\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCommand." + + "Type\022<\n\022diagnostic_request\030\002 \001(\0132 .openx" + + "c.DiagnosticControlCommand\022G\n\030passthroug" + + "h_mode_request\030\003 \001(\0132%.openxc.Passthroug" + + "hModeControlCommand\022O\n acceptance_filter", + "_bypass_command\030\004 \001(\0132%.openxc.Acceptanc" + + "eFilterBypassCommand\022<\n\026payload_format_c" + + "ommand\030\005 \001(\0132\034.openxc.PayloadFormatComma" + + "nd\022O\n predefined_obd2_requests_command\030\006" + + " \001(\0132%.openxc.PredefinedObd2RequestsComm" + + "and\"\223\001\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002" + + "\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACC" + + "EPTANCE_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMA" + + "T\020\006\022\034\n\030PREDEFINED_OBD2_REQUESTS\020\007\"\236\001\n\030Di" + + "agnosticControlCommand\022*\n\007request\030\001 \001(\0132", + "\031.openxc.DiagnosticRequest\0227\n\006action\030\002 \001" + + "(\0162\'.openxc.DiagnosticControlCommand.Act" + + "ion\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Pa" + + "ssthroughModeControlCommand\022\013\n\003bus\030\001 \001(\005" + + "\022\017\n\007enabled\030\002 \001(\010\"<\n\035AcceptanceFilterByp" + + "assCommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"" + + "{\n\024PayloadFormatCommand\022:\n\006format\030\001 \001(\0162" + + "*.openxc.PayloadFormatCommand.PayloadFor" + + "mat\"\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOB" + + "UF\020\002\"0\n\035PredefinedObd2RequestsCommand\022\017\n", + "\007enabled\030\001 \001(\010\"]\n\017CommandResponse\022)\n\004typ" + + "e\030\001 \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007" + + "message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagno" + + "sticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002" + + " \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007paylo" + + "ad\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022\021\n\t" + + "frequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded" + + "_type\030\t \001(\0162%.openxc.DiagnosticRequest.D" + + "ecodedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004O" + + "BD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(", + "\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003p" + + "id\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_re" + + "sponse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005va" + + "lue\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\016" + + "2\031.openxc.DynamicField.Type\022\024\n\014string_va" + + "lue\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rbool" + + "ean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003N" + + "UM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004" + + "type\030\001 \001(\0162\036.openxc.TranslatedMessage.Ty" + + "pe\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc", + ".DynamicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dy" + + "namicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022" + + "\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED" + + "_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016" + + "BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10983,7 +11157,7 @@ public final class BinaryMessages { internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", }); + new java.lang.String[] { "Bus", "MessageId", "Data", "Format", }); internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_openxc_ControlCommand_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 140bc4b9..b2721d33 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -13,7 +13,7 @@ from google.protobuf import descriptor_pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\";\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xb8\x04\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12<\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32 .openxc.DiagnosticControlCommand\x12G\n\x18passthrough_mode_request\x18\x03 \x01(\x0b\x32%.openxc.PassthroughModeControlCommand\x12O\n acceptance_filter_bypass_command\x18\x04 \x01(\x0b\x32%.openxc.AcceptanceFilterBypassCommand\x12<\n\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x0f\n\x0bPASSTHROUGH\x10\x04\x12\x1c\n\x18\x41\x43\x43\x45PTANCE_FILTER_BYPASS\x10\x05\x12\x12\n\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\x9e\x01\n\x18\x44iagnosticControlCommand\x12*\n\x07request\x18\x01 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12\x37\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\'.openxc.DiagnosticControlCommand.Action\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"=\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"<\n\x1d\x41\x63\x63\x65ptanceFilterBypassCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0e\n\x06\x62ypass\x18\x02 \x01(\x08\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x96\x01\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12.\n\x06\x66ormat\x18\x04 \x01(\x0e\x32\x1e.openxc.RawMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12<\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32 .openxc.DiagnosticControlCommand\x12G\n\x18passthrough_mode_request\x18\x03 \x01(\x0b\x32%.openxc.PassthroughModeControlCommand\x12O\n acceptance_filter_bypass_command\x18\x04 \x01(\x0b\x32%.openxc.AcceptanceFilterBypassCommand\x12<\n\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x0f\n\x0bPASSTHROUGH\x10\x04\x12\x1c\n\x18\x41\x43\x43\x45PTANCE_FILTER_BYPASS\x10\x05\x12\x12\n\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\x9e\x01\n\x18\x44iagnosticControlCommand\x12*\n\x07request\x18\x01 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12\x37\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\'.openxc.DiagnosticControlCommand.Action\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"=\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"<\n\x1d\x41\x63\x63\x65ptanceFilterBypassCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0e\n\x06\x62ypass\x18\x02 \x01(\x08\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -50,6 +50,27 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( serialized_end=429, ) +_RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( + name='FrameFormat', + full_name='openxc.RawMessage.FrameFormat', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='STANDARD', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EXTENDED', index=1, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=541, + serialized_end=582, +) + _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='openxc.ControlCommand.Type', @@ -87,8 +108,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=914, - serialized_end=1061, + serialized_start=1006, + serialized_end=1153, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -108,8 +129,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1193, - serialized_end=1222, + serialized_start=1285, + serialized_end=1314, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -129,8 +150,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1433, - serialized_end=1472, + serialized_start=1525, + serialized_end=1564, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -150,8 +171,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1840, - serialized_end=1873, + serialized_start=1932, + serialized_end=1965, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +196,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2165, - serialized_end=2202, + serialized_start=2257, + serialized_end=2294, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -212,8 +233,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2360, - serialized_end=2452, + serialized_start=2452, + serialized_end=2544, ) @@ -309,17 +330,25 @@ _RAWMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='format', full_name='openxc.RawMessage.format', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=1, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], nested_types=[], enum_types=[ + _RAWMESSAGE_FRAMEFORMAT, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=431, - serialized_end=490, + serialized_start=432, + serialized_end=582, ) @@ -382,8 +411,8 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=493, - serialized_end=1061, + serialized_start=585, + serialized_end=1153, ) @@ -418,8 +447,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1064, - serialized_end=1222, + serialized_start=1156, + serialized_end=1314, ) @@ -453,8 +482,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1224, - serialized_end=1285, + serialized_start=1316, + serialized_end=1377, ) @@ -488,8 +517,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1287, - serialized_end=1347, + serialized_start=1379, + serialized_end=1439, ) @@ -517,8 +546,8 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1349, - serialized_end=1472, + serialized_start=1441, + serialized_end=1564, ) @@ -545,8 +574,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1474, - serialized_end=1522, + serialized_start=1566, + serialized_end=1614, ) @@ -587,8 +616,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1524, - serialized_end=1617, + serialized_start=1616, + serialized_end=1709, ) @@ -672,8 +701,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1620, - serialized_end=1873, + serialized_start=1712, + serialized_end=1965, ) @@ -749,8 +778,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1876, - serialized_end=2037, + serialized_start=1968, + serialized_end=2129, ) @@ -799,8 +828,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2040, - serialized_end=2202, + serialized_start=2132, + serialized_end=2294, ) @@ -849,8 +878,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2205, - serialized_end=2452, + serialized_start=2297, + serialized_end=2544, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -860,6 +889,8 @@ _VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTIC _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; +_RAWMESSAGE.fields_by_name['format'].enum_type = _RAWMESSAGE_FRAMEFORMAT +_RAWMESSAGE_FRAMEFORMAT.containing_type = _RAWMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND diff --git a/openxc.proto b/openxc.proto index c2b7f7c2..3b23be5c 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 1.2.3-korg From e47f58b38d86e6aefd1b8f2fba2fc9dba3eae702 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:14:03 -0400 Subject: Mention 'status' field in all command response JSON examples. Fixed #13. --- JSON.mkd | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'JSON.mkd') diff --git a/JSON.mkd b/JSON.mkd index 7bf0ce5a..71546bc9 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -179,7 +179,16 @@ manually override the OBD-II decoding feature for a known PID. ### Responses -The response to a successful request: +Requests to add or cancel a diagnostic request are first acknowledged by the VI, +before any responses to the request are returned. The response uses the standard +command response format: + + { "command_response": "diagnostic_request", "status": true} + +**status** - true if the request was successfully created or cancelled. + +When a node on the network response to the request and the result is published +by the VI, the result looks like: {"bus": 1, "id": 1234, @@ -233,6 +242,17 @@ The response to a simple PID request would look like this: In addition to the `diagnostic_request` command described earlier, there are other possible values for the `command` field. +All commands immediately return a `command_response`, e.g.: + + { "command_response": "version", "message": "v6.0-dev (default)", "status": true} + +**command_response** - an echo of the command this is a ACKing. + +**status** - true if the command was understood and performed succesfully. + +**message** - (optional) a string message from the VI, e.g. to return a version + descriptor or error message. + ### Version Query The `version` command triggers the VI to inject a firmware version identifier @@ -244,7 +264,7 @@ response into the outgoing data stream. **Response** - { "command_response": "version", "message": "v6.0-dev (default)"} + { "command_response": "version", "message": "v6.0-dev (default)", "status": true} ### Device ID Query @@ -257,7 +277,7 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. **Response** - { "command_response": "device_id", "message": "0012345678"} + { "command_response": "device_id", "message": "0012345678", "status": true} ### Passthrough CAN Mode -- cgit 1.2.3-korg From 58dfea8e7562588b3dfc71e07c3c8736187e29dc Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:20:36 -0400 Subject: Give diagnostic request field a more specific name. Fixed #18. --- JSON.mkd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'JSON.mkd') diff --git a/JSON.mkd b/JSON.mkd index 71546bc9..43f7ea9c 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -65,7 +65,7 @@ A diagnostic request is added or cancelled with a JSON object like this example: { "command": "diagnostic_request", "action": "add", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, @@ -92,7 +92,7 @@ simple one-time diagnostic request: { "command": "diagnostic_request", "action": "add", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, @@ -111,7 +111,7 @@ previous example as a recurring request at 1Hz: { "command": "diagnostic_request", "action": "add", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, @@ -125,7 +125,7 @@ To cancel a recurring request, send a `cancel` action with the same key, e.g.: { "command": "diagnostic_request", "action": "cancel", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, -- cgit 1.2.3-korg From 9682309b7d7450235bea95841f7442e6712db379 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:23:29 -0400 Subject: Use more specific 'message_id' in JSON, not just 'id'. There often isn't enough context to know if it's the message ID or a transaction ID or something else. Fixed #20. --- JSON.mkd | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'JSON.mkd') diff --git a/JSON.mkd b/JSON.mkd index 43f7ea9c..e07d0600 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -39,12 +39,12 @@ discrete pieces of information in the measurement. The format for a plain CAN message: - {"bus": 1, "id": 1234, "data": "0x12345678"} + {"bus": 1, "message_id": 1234, "data": "0x12345678"} **bus** - the numerical identifier of the CAN bus where this message originated, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). -**id** - the CAN message ID +**message_id** - the CAN message ID **data** - up to 8 bytes of data from the CAN message's payload, represented as a hexidecimal number in a string. Many JSON parser cannot handle 64-bit @@ -67,7 +67,7 @@ A diagnostic request is added or cancelled with a JSON object like this example: "action": "add", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5, "payload": "0x1234", @@ -94,7 +94,7 @@ simple one-time diagnostic request: "action": "add", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5 } @@ -113,7 +113,7 @@ previous example as a recurring request at 1Hz: "action": "add", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5, "frequency": 1 @@ -127,7 +127,7 @@ To cancel a recurring request, send a `cancel` action with the same key, e.g.: "action": "cancel", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5 } @@ -141,7 +141,7 @@ exist in parallel with a recurring request for the same key. **bus** - the numerical identifier of the CAN bus where this request should be sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). -**id** - the CAN arbitration ID for the request. +**message_id** - the CAN message ID for the request. **mode** - the OBD-II mode of the request - 0x1 through 0xff (1 through 9 are the standardized modes and 0x22 is a common proprietary mode). @@ -162,7 +162,7 @@ exist in parallel with a recurring request for the same key. **multiple_responses** - (optional, false by default) if true, request will stay active for a full 100ms, even after receiving a diagnostic response message. - This is useful for requests to the functional broadcast arbitration ID + This is useful for requests to the functional broadcast message ID (`0x7df`) when you need to get responses from multiple modules. It's possible to set this to `true` for non-broadcast requests, but in practice you won't see any additional responses after the first and it will just take up memory @@ -191,7 +191,7 @@ When a node on the network response to the request and the result is published by the VI, the result looks like: {"bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5, "success": true, @@ -202,7 +202,7 @@ and to an unsuccessful request, with the `negative_response_code` and no `pid` echo: {"bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "success": false, "negative_response_code": 17} @@ -210,7 +210,7 @@ echo: **bus** - the numerical identifier of the CAN bus where this response was received. -**id** - the CAN arbitration ID for this response. +**message_id** - the CAN message ID for this response. **mode** - the OBD-II mode of the original diagnostic request. @@ -235,7 +235,7 @@ Finally, the `payload` and `value` fields are mutually exclusive: The response to a simple PID request would look like this: - {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} + {"success": true, "bus": 1, "message_id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} ## Commands -- cgit 1.2.3-korg From 585f075459597ce481d75bafba7ea1fbe2ab2256 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 28 Oct 2014 22:36:07 -0400 Subject: Specify the response when no device ID is known. --- JSON.mkd | 2 ++ 1 file changed, 2 insertions(+) (limited to 'JSON.mkd') diff --git a/JSON.mkd b/JSON.mkd index e07d0600..298117b7 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -271,6 +271,8 @@ response into the outgoing data stream. The `device_id` command triggers the VI to inject a unique device ID (e.g. the MAC address of an included Bluetooth module) into into the outgoing data stream. +If no device ID is available, the response message will be "Unknown". + **Request** { "command": "device_id"} -- cgit 1.2.3-korg 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. --- CHANGELOG.md | 2 - JSON.mkd | 4 +- gen/cpp/openxc.pb | 8 +- gen/cpp/openxc.pb.c | 6 +- gen/cpp/openxc.pb.h | 8 +- gen/java/com/openxc/BinaryMessages.java | 821 ++++++++++++++------------------ gen/python/openxc_pb2.py | 261 ++++++---- openxc.proto | 2 +- 8 files changed, 539 insertions(+), 573 deletions(-) (limited to 'JSON.mkd') diff --git a/CHANGELOG.md b/CHANGELOG.md index 78db26e0..550b5b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,6 @@ * BREAKING: Require an 'action' to diagnostic request commands, e.g. cancel or add. * BREAKING: Rename "raw" messages to the more precise "CAN messages". * BREAKING: Rename "translated" messages to "simple messages". -* BREAKING: Rename CAN message ID field from just `id` to `message_id` to be - standard across all other types * BREAKING: Remove redundant `type` field from simple messages (formerly translated messages). The type can be inferred implicitly through the types of the value and event fields. diff --git a/JSON.mkd b/JSON.mkd index 298117b7..069f74b4 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -39,12 +39,12 @@ discrete pieces of information in the measurement. The format for a plain CAN message: - {"bus": 1, "message_id": 1234, "data": "0x12345678"} + {"bus": 1, "id": 1234, "data": "0x12345678"} **bus** - the numerical identifier of the CAN bus where this message originated, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). -**message_id** - the CAN message ID +**id** - the CAN message ID **data** - up to 8 bytes of data from the CAN message's payload, represented as a hexidecimal number in a string. Many JSON parser cannot handle 64-bit diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index a4716cee..3fc2f805 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -÷ +ï openxc.protoopenxc"ˆ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -15,12 +15,12 @@ DIAGNOSTIC CONTROL_COMMAND -COMMAND_RESPONSE"œ +COMMAND_RESPONSE"” CanMessage -bus ( +bus ( -message_id (  +id (  data ( 4 frame_format (2.openxc.CanMessage.FrameFormat") FrameFormat diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 6017fec4..6fc70703 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.1 at Tue Oct 14 14:03:21 2014. */ +/* Generated by nanopb-0.3.1 at Fri Nov 7 08:56:52 2014. */ #include "openxc.pb.h" @@ -21,8 +21,8 @@ const pb_field_t openxc_VehicleMessage_fields[7] = { const pb_field_t openxc_CanMessage_fields[5] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_CanMessage, bus, bus, 0), - PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_CanMessage, message_id, bus, 0), - PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_CanMessage, data, message_id, 0), + PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_CanMessage, id, bus, 0), + PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_CanMessage, data, id, 0), PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_CanMessage, frame_format, data, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 2e17a3de..a99a91fc 100644 --- a/gen/cpp/openxc.pb.h +++ b/gen/cpp/openxc.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.1 at Tue Oct 14 14:03:21 2014. */ +/* Generated by nanopb-0.3.1 at Fri Nov 7 08:56:52 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -71,8 +71,8 @@ typedef PB_BYTES_ARRAY_T(8) openxc_CanMessage_data_t; typedef struct _openxc_CanMessage { bool has_bus; int32_t bus; - bool has_message_id; - uint32_t message_id; + bool has_id; + uint32_t id; bool has_data; openxc_CanMessage_data_t data; bool has_frame_format; @@ -240,7 +240,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_AcceptanceFilterBypassCommand_bus_tag 1 #define openxc_AcceptanceFilterBypassCommand_bypass_tag 2 #define openxc_CanMessage_bus_tag 1 -#define openxc_CanMessage_message_id_tag 2 +#define openxc_CanMessage_id_tag 2 #define openxc_CanMessage_data_tag 3 #define openxc_CanMessage_frame_format_tag 4 #define openxc_CommandResponse_type_tag 1 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index c495c7a6..60dbfb8e 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -8,10 +8,10 @@ public final class BinaryMessages { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface VehicleMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface VehicleMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.VehicleMessage) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.VehicleMessage.Type type = 1; /** * optional .openxc.VehicleMessage.Type type = 1; */ @@ -21,7 +21,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.VehicleMessage.Type getType(); - // optional .openxc.CanMessage can_message = 2; /** * optional .openxc.CanMessage can_message = 2; */ @@ -35,7 +34,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder(); - // optional .openxc.SimpleMessage simple_message = 3; /** * optional .openxc.SimpleMessage simple_message = 3; */ @@ -49,7 +47,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder(); - // optional .openxc.DiagnosticResponse diagnostic_response = 4; /** * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ @@ -63,7 +60,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); - // optional .openxc.ControlCommand control_command = 5; /** * optional .openxc.ControlCommand control_command = 5; */ @@ -77,7 +73,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder(); - // optional .openxc.CommandResponse command_response = 6; /** * optional .openxc.CommandResponse command_response = 6; */ @@ -95,8 +90,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.VehicleMessage} */ public static final class VehicleMessage extends - com.google.protobuf.GeneratedMessage - implements VehicleMessageOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.VehicleMessage) + VehicleMessageOrBuilder { // Use VehicleMessage.newBuilder() to construct. private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -367,7 +363,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.VehicleMessage.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_; /** @@ -383,7 +378,6 @@ public final class BinaryMessages { return type_; } - // optional .openxc.CanMessage can_message = 2; public static final int CAN_MESSAGE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.CanMessage canMessage_; /** @@ -405,7 +399,6 @@ public final class BinaryMessages { return canMessage_; } - // optional .openxc.SimpleMessage simple_message = 3; public static final int SIMPLE_MESSAGE_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_; /** @@ -427,7 +420,6 @@ public final class BinaryMessages { return simpleMessage_; } - // optional .openxc.DiagnosticResponse diagnostic_response = 4; public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_; /** @@ -449,7 +441,6 @@ public final class BinaryMessages { return diagnosticResponse_; } - // optional .openxc.ControlCommand control_command = 5; public static final int CONTROL_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.ControlCommand controlCommand_; /** @@ -471,7 +462,6 @@ public final class BinaryMessages { return controlCommand_; } - // optional .openxc.CommandResponse command_response = 6; public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_; /** @@ -504,7 +494,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -646,8 +637,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.VehicleMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.VehicleMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.VehicleMessage) + com.openxc.BinaryMessages.VehicleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; @@ -850,7 +842,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.VehicleMessage.Type type = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; /** * optional .openxc.VehicleMessage.Type type = 1; @@ -886,7 +877,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.CanMessage can_message = 2; private com.openxc.BinaryMessages.CanMessage canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> canMessageBuilder_; @@ -995,7 +985,7 @@ public final class BinaryMessages { if (canMessageBuilder_ == null) { canMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder>( - canMessage_, + getCanMessage(), getParentForChildren(), isClean()); canMessage_ = null; @@ -1003,7 +993,6 @@ public final class BinaryMessages { return canMessageBuilder_; } - // optional .openxc.SimpleMessage simple_message = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> simpleMessageBuilder_; @@ -1112,7 +1101,7 @@ public final class BinaryMessages { if (simpleMessageBuilder_ == null) { simpleMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder>( - simpleMessage_, + getSimpleMessage(), getParentForChildren(), isClean()); simpleMessage_ = null; @@ -1120,7 +1109,6 @@ public final class BinaryMessages { return simpleMessageBuilder_; } - // optional .openxc.DiagnosticResponse diagnostic_response = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_; @@ -1229,7 +1217,7 @@ public final class BinaryMessages { if (diagnosticResponseBuilder_ == null) { diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>( - diagnosticResponse_, + getDiagnosticResponse(), getParentForChildren(), isClean()); diagnosticResponse_ = null; @@ -1237,7 +1225,6 @@ public final class BinaryMessages { return diagnosticResponseBuilder_; } - // optional .openxc.ControlCommand control_command = 5; private com.openxc.BinaryMessages.ControlCommand controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> controlCommandBuilder_; @@ -1346,7 +1333,7 @@ public final class BinaryMessages { if (controlCommandBuilder_ == null) { controlCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder>( - controlCommand_, + getControlCommand(), getParentForChildren(), isClean()); controlCommand_ = null; @@ -1354,7 +1341,6 @@ public final class BinaryMessages { return controlCommandBuilder_; } - // optional .openxc.CommandResponse command_response = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_; @@ -1463,7 +1449,7 @@ public final class BinaryMessages { if (commandResponseBuilder_ == null) { commandResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder>( - commandResponse_, + getCommandResponse(), getParentForChildren(), isClean()); commandResponse_ = null; @@ -1482,10 +1468,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - public interface CanMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CanMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.CanMessage) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -1495,17 +1481,15 @@ public final class BinaryMessages { */ int getBus(); - // optional uint32 message_id = 2; /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - boolean hasMessageId(); + boolean hasId(); /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - int getMessageId(); + int getId(); - // optional bytes data = 3; /** * optional bytes data = 3; */ @@ -1515,7 +1499,6 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getData(); - // optional .openxc.CanMessage.FrameFormat frame_format = 4; /** * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ @@ -1529,8 +1512,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CanMessage} */ public static final class CanMessage extends - com.google.protobuf.GeneratedMessage - implements CanMessageOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.CanMessage) + CanMessageOrBuilder { // Use CanMessage.newBuilder() to construct. private CanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -1583,7 +1567,7 @@ public final class BinaryMessages { } case 16: { bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); + id_ = input.readUInt32(); break; } case 26: { @@ -1724,7 +1708,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -1740,23 +1723,21 @@ public final class BinaryMessages { return bus_; } - // optional uint32 message_id = 2; - public static final int MESSAGE_ID_FIELD_NUMBER = 2; - private int messageId_; + public static final int ID_FIELD_NUMBER = 2; + private int id_; /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public boolean hasMessageId() { + public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public int getMessageId() { - return messageId_; + public int getId() { + return id_; } - // optional bytes data = 3; public static final int DATA_FIELD_NUMBER = 3; private com.google.protobuf.ByteString data_; /** @@ -1772,7 +1753,6 @@ public final class BinaryMessages { return data_; } - // optional .openxc.CanMessage.FrameFormat frame_format = 4; public static final int FRAME_FORMAT_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_; /** @@ -1790,14 +1770,15 @@ public final class BinaryMessages { private void initFields() { bus_ = 0; - messageId_ = 0; + id_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -1810,7 +1791,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, messageId_); + output.writeUInt32(2, id_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, data_); @@ -1833,7 +1814,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, messageId_); + .computeUInt32Size(2, id_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream @@ -1925,8 +1906,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CanMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.CanMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.CanMessage) + com.openxc.BinaryMessages.CanMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; @@ -1961,7 +1943,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - messageId_ = 0; + id_ = 0; bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); @@ -2002,7 +1984,7 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.messageId_ = messageId_; + result.id_ = id_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } @@ -2030,8 +2012,8 @@ public final class BinaryMessages { if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasMessageId()) { - setMessageId(other.getMessageId()); + if (other.hasId()) { + setId(other.getId()); } if (other.hasData()) { setData(other.getData()); @@ -2066,7 +2048,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -2099,40 +2080,38 @@ public final class BinaryMessages { return this; } - // optional uint32 message_id = 2; - private int messageId_ ; + private int id_ ; /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public boolean hasMessageId() { + public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public int getMessageId() { - return messageId_; + public int getId() { + return id_; } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public Builder setMessageId(int value) { + public Builder setId(int value) { bitField0_ |= 0x00000002; - messageId_ = value; + id_ = value; onChanged(); return this; } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public Builder clearMessageId() { + public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000002); - messageId_ = 0; + id_ = 0; onChanged(); return this; } - // optional bytes data = 3; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes data = 3; @@ -2168,7 +2147,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.CanMessage.FrameFormat frame_format = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; /** * optional .openxc.CanMessage.FrameFormat frame_format = 4; @@ -2215,10 +2193,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.CanMessage) } - public interface ControlCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface ControlCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.ControlCommand) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.ControlCommand.Type type = 1; /** * optional .openxc.ControlCommand.Type type = 1; */ @@ -2228,7 +2206,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; /** * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ @@ -2242,7 +2219,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder(); - // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; /** * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ @@ -2256,7 +2232,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); - // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; /** * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; */ @@ -2270,7 +2245,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); - // optional .openxc.PayloadFormatCommand payload_format_command = 5; /** * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ @@ -2284,7 +2258,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); - // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; /** * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; */ @@ -2302,8 +2275,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.ControlCommand} */ public static final class ControlCommand extends - com.google.protobuf.GeneratedMessage - implements ControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.ControlCommand) + ControlCommandOrBuilder { // Use ControlCommand.newBuilder() to construct. private ControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -2592,7 +2566,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; /** @@ -2608,7 +2581,6 @@ public final class BinaryMessages { return type_; } - // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_; /** @@ -2630,7 +2602,6 @@ public final class BinaryMessages { return diagnosticRequest_; } - // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; public static final int PASSTHROUGH_MODE_REQUEST_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_; /** @@ -2652,7 +2623,6 @@ public final class BinaryMessages { return passthroughModeRequest_; } - // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; public static final int ACCEPTANCE_FILTER_BYPASS_COMMAND_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_; /** @@ -2674,7 +2644,6 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } - // optional .openxc.PayloadFormatCommand payload_format_command = 5; public static final int PAYLOAD_FORMAT_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_; /** @@ -2696,7 +2665,6 @@ public final class BinaryMessages { return payloadFormatCommand_; } - // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; public static final int PREDEFINED_OBD2_REQUESTS_COMMAND_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_; /** @@ -2729,7 +2697,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -2871,8 +2840,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.ControlCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.ControlCommand) + com.openxc.BinaryMessages.ControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; @@ -3075,7 +3045,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; /** * optional .openxc.ControlCommand.Type type = 1; @@ -3111,7 +3080,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> diagnosticRequestBuilder_; @@ -3220,7 +3188,7 @@ public final class BinaryMessages { if (diagnosticRequestBuilder_ == null) { diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder>( - diagnosticRequest_, + getDiagnosticRequest(), getParentForChildren(), isClean()); diagnosticRequest_ = null; @@ -3228,7 +3196,6 @@ public final class BinaryMessages { return diagnosticRequestBuilder_; } - // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> passthroughModeRequestBuilder_; @@ -3337,7 +3304,7 @@ public final class BinaryMessages { if (passthroughModeRequestBuilder_ == null) { passthroughModeRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder>( - passthroughModeRequest_, + getPassthroughModeRequest(), getParentForChildren(), isClean()); passthroughModeRequest_ = null; @@ -3345,7 +3312,6 @@ public final class BinaryMessages { return passthroughModeRequestBuilder_; } - // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> acceptanceFilterBypassCommandBuilder_; @@ -3454,7 +3420,7 @@ public final class BinaryMessages { if (acceptanceFilterBypassCommandBuilder_ == null) { acceptanceFilterBypassCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder>( - acceptanceFilterBypassCommand_, + getAcceptanceFilterBypassCommand(), getParentForChildren(), isClean()); acceptanceFilterBypassCommand_ = null; @@ -3462,7 +3428,6 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_; } - // optional .openxc.PayloadFormatCommand payload_format_command = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> payloadFormatCommandBuilder_; @@ -3571,7 +3536,7 @@ public final class BinaryMessages { if (payloadFormatCommandBuilder_ == null) { payloadFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder>( - payloadFormatCommand_, + getPayloadFormatCommand(), getParentForChildren(), isClean()); payloadFormatCommand_ = null; @@ -3579,7 +3544,6 @@ public final class BinaryMessages { return payloadFormatCommandBuilder_; } - // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> predefinedObd2RequestsCommandBuilder_; @@ -3688,7 +3652,7 @@ public final class BinaryMessages { if (predefinedObd2RequestsCommandBuilder_ == null) { predefinedObd2RequestsCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder>( - predefinedObd2RequestsCommand_, + getPredefinedObd2RequestsCommand(), getParentForChildren(), isClean()); predefinedObd2RequestsCommand_ = null; @@ -3707,10 +3671,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.ControlCommand) } - public interface DiagnosticControlCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DiagnosticControlCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DiagnosticControlCommand) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.DiagnosticRequest request = 1; /** * optional .openxc.DiagnosticRequest request = 1; */ @@ -3724,7 +3688,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder(); - // optional .openxc.DiagnosticControlCommand.Action action = 2; /** * optional .openxc.DiagnosticControlCommand.Action action = 2; */ @@ -3738,8 +3701,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticControlCommand} */ public static final class DiagnosticControlCommand extends - com.google.protobuf.GeneratedMessage - implements DiagnosticControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DiagnosticControlCommand) + DiagnosticControlCommandOrBuilder { // Use DiagnosticControlCommand.newBuilder() to construct. private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -3931,7 +3895,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DiagnosticRequest request = 1; public static final int REQUEST_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_; /** @@ -3953,7 +3916,6 @@ public final class BinaryMessages { return request_; } - // optional .openxc.DiagnosticControlCommand.Action action = 2; public static final int ACTION_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_; /** @@ -3976,7 +3938,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -4090,8 +4053,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticControlCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DiagnosticControlCommand) + com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; @@ -4222,7 +4186,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DiagnosticRequest request = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; @@ -4331,7 +4294,7 @@ public final class BinaryMessages { if (requestBuilder_ == null) { requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - request_, + getRequest(), getParentForChildren(), isClean()); request_ = null; @@ -4339,7 +4302,6 @@ public final class BinaryMessages { return requestBuilder_; } - // optional .openxc.DiagnosticControlCommand.Action action = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; /** * optional .openxc.DiagnosticControlCommand.Action action = 2; @@ -4386,10 +4348,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) } - public interface PassthroughModeControlCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PassthroughModeControlCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.PassthroughModeControlCommand) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -4399,7 +4361,6 @@ public final class BinaryMessages { */ int getBus(); - // optional bool enabled = 2; /** * optional bool enabled = 2; */ @@ -4413,8 +4374,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PassthroughModeControlCommand} */ public static final class PassthroughModeControlCommand extends - com.google.protobuf.GeneratedMessage - implements PassthroughModeControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.PassthroughModeControlCommand) + PassthroughModeControlCommandOrBuilder { // Use PassthroughModeControlCommand.newBuilder() to construct. private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -4510,7 +4472,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -4526,7 +4487,6 @@ public final class BinaryMessages { return bus_; } - // optional bool enabled = 2; public static final int ENABLED_FIELD_NUMBER = 2; private boolean enabled_; /** @@ -4549,7 +4509,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -4663,8 +4624,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PassthroughModeControlCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.PassthroughModeControlCommand) + com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; @@ -4786,7 +4748,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -4819,7 +4780,6 @@ public final class BinaryMessages { return this; } - // optional bool enabled = 2; private boolean enabled_ ; /** * optional bool enabled = 2; @@ -4863,10 +4823,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } - public interface AcceptanceFilterBypassCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface AcceptanceFilterBypassCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.AcceptanceFilterBypassCommand) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -4876,7 +4836,6 @@ public final class BinaryMessages { */ int getBus(); - // optional bool bypass = 2; /** * optional bool bypass = 2; */ @@ -4890,8 +4849,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class AcceptanceFilterBypassCommand extends - com.google.protobuf.GeneratedMessage - implements AcceptanceFilterBypassCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.AcceptanceFilterBypassCommand) + AcceptanceFilterBypassCommandOrBuilder { // Use AcceptanceFilterBypassCommand.newBuilder() to construct. private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -4987,7 +4947,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -5003,7 +4962,6 @@ public final class BinaryMessages { return bus_; } - // optional bool bypass = 2; public static final int BYPASS_FIELD_NUMBER = 2; private boolean bypass_; /** @@ -5026,7 +4984,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -5140,8 +5099,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.AcceptanceFilterBypassCommand) + com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; @@ -5263,7 +5223,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -5296,7 +5255,6 @@ public final class BinaryMessages { return this; } - // optional bool bypass = 2; private boolean bypass_ ; /** * optional bool bypass = 2; @@ -5340,10 +5298,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - public interface PayloadFormatCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PayloadFormatCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.PayloadFormatCommand) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; /** * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ @@ -5357,8 +5315,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PayloadFormatCommand} */ public static final class PayloadFormatCommand extends - com.google.protobuf.GeneratedMessage - implements PayloadFormatCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.PayloadFormatCommand) + PayloadFormatCommandOrBuilder { // Use PayloadFormatCommand.newBuilder() to construct. private PayloadFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -5537,7 +5496,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; public static final int FORMAT_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_; /** @@ -5559,7 +5517,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -5666,8 +5625,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PayloadFormatCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.PayloadFormatCommand) + com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; @@ -5780,7 +5740,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; /** * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; @@ -5827,10 +5786,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } - public interface PredefinedObd2RequestsCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PredefinedObd2RequestsCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.PredefinedObd2RequestsCommand) + com.google.protobuf.MessageOrBuilder { - // optional bool enabled = 1; /** * optional bool enabled = 1; */ @@ -5844,8 +5803,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} */ public static final class PredefinedObd2RequestsCommand extends - com.google.protobuf.GeneratedMessage - implements PredefinedObd2RequestsCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.PredefinedObd2RequestsCommand) + PredefinedObd2RequestsCommandOrBuilder { // Use PredefinedObd2RequestsCommand.newBuilder() to construct. private PredefinedObd2RequestsCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -5936,7 +5896,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional bool enabled = 1; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_; /** @@ -5958,7 +5917,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -6065,8 +6025,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.PredefinedObd2RequestsCommand) + com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; @@ -6179,7 +6140,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional bool enabled = 1; private boolean enabled_ ; /** * optional bool enabled = 1; @@ -6223,10 +6183,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) } - public interface CommandResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CommandResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.CommandResponse) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.ControlCommand.Type type = 1; /** * optional .openxc.ControlCommand.Type type = 1; */ @@ -6236,7 +6196,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - // optional string message = 2; /** * optional string message = 2; */ @@ -6251,7 +6210,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getMessageBytes(); - // optional bool status = 3; /** * optional bool status = 3; */ @@ -6265,8 +6223,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CommandResponse} */ public static final class CommandResponse extends - com.google.protobuf.GeneratedMessage - implements CommandResponseOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.CommandResponse) + CommandResponseOrBuilder { // Use CommandResponse.newBuilder() to construct. private CommandResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -6324,8 +6283,9 @@ public final class BinaryMessages { break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - message_ = input.readBytes(); + message_ = bs; break; } case 24: { @@ -6373,7 +6333,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; /** @@ -6389,7 +6348,6 @@ public final class BinaryMessages { return type_; } - // optional string message = 2; public static final int MESSAGE_FIELD_NUMBER = 2; private java.lang.Object message_; /** @@ -6432,7 +6390,6 @@ public final class BinaryMessages { } } - // optional bool status = 3; public static final int STATUS_FIELD_NUMBER = 3; private boolean status_; /** @@ -6456,7 +6413,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -6577,8 +6535,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CommandResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.CommandResponseOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.CommandResponse) + com.openxc.BinaryMessages.CommandResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; @@ -6711,7 +6670,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; /** * optional .openxc.ControlCommand.Type type = 1; @@ -6747,7 +6705,6 @@ public final class BinaryMessages { return this; } - // optional string message = 2; private java.lang.Object message_ = ""; /** * optional string message = 2; @@ -6761,9 +6718,12 @@ public final class BinaryMessages { public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - message_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + message_ = s; + } return s; } else { return (java.lang.String) ref; @@ -6821,7 +6781,6 @@ public final class BinaryMessages { return this; } - // optional bool status = 3; private boolean status_ ; /** * optional bool status = 3; @@ -6865,10 +6824,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.CommandResponse) } - public interface DiagnosticRequestOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DiagnosticRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DiagnosticRequest) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -6878,7 +6837,6 @@ public final class BinaryMessages { */ int getBus(); - // optional uint32 message_id = 2; /** * optional uint32 message_id = 2; */ @@ -6888,7 +6846,6 @@ public final class BinaryMessages { */ int getMessageId(); - // optional uint32 mode = 3; /** * optional uint32 mode = 3; */ @@ -6898,7 +6855,6 @@ public final class BinaryMessages { */ int getMode(); - // optional uint32 pid = 4; /** * optional uint32 pid = 4; */ @@ -6908,7 +6864,6 @@ public final class BinaryMessages { */ int getPid(); - // optional bytes payload = 5; /** * optional bytes payload = 5; * @@ -6928,7 +6883,6 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getPayload(); - // optional bool multiple_responses = 6; /** * optional bool multiple_responses = 6; */ @@ -6938,7 +6892,6 @@ public final class BinaryMessages { */ boolean getMultipleResponses(); - // optional double frequency = 7; /** * optional double frequency = 7; */ @@ -6948,7 +6901,6 @@ public final class BinaryMessages { */ double getFrequency(); - // optional string name = 8; /** * optional string name = 8; */ @@ -6963,7 +6915,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getNameBytes(); - // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; /** * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; */ @@ -6977,8 +6928,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticRequest} */ public static final class DiagnosticRequest extends - com.google.protobuf.GeneratedMessage - implements DiagnosticRequestOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DiagnosticRequest) + DiagnosticRequestOrBuilder { // Use DiagnosticRequest.newBuilder() to construct. private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -7060,8 +7012,9 @@ public final class BinaryMessages { break; } case 66: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - name_ = input.readBytes(); + name_ = bs; break; } case 72: { @@ -7197,7 +7150,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -7213,7 +7165,6 @@ public final class BinaryMessages { return bus_; } - // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; /** @@ -7229,7 +7180,6 @@ public final class BinaryMessages { return messageId_; } - // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; /** @@ -7245,7 +7195,6 @@ public final class BinaryMessages { return mode_; } - // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; /** @@ -7261,7 +7210,6 @@ public final class BinaryMessages { return pid_; } - // optional bytes payload = 5; public static final int PAYLOAD_FIELD_NUMBER = 5; private com.google.protobuf.ByteString payload_; /** @@ -7287,7 +7235,6 @@ public final class BinaryMessages { return payload_; } - // optional bool multiple_responses = 6; public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6; private boolean multipleResponses_; /** @@ -7303,7 +7250,6 @@ public final class BinaryMessages { return multipleResponses_; } - // optional double frequency = 7; public static final int FREQUENCY_FIELD_NUMBER = 7; private double frequency_; /** @@ -7319,7 +7265,6 @@ public final class BinaryMessages { return frequency_; } - // optional string name = 8; public static final int NAME_FIELD_NUMBER = 8; private java.lang.Object name_; /** @@ -7362,7 +7307,6 @@ public final class BinaryMessages { } } - // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; public static final int DECODED_TYPE_FIELD_NUMBER = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_; /** @@ -7392,7 +7336,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -7555,8 +7500,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DiagnosticRequest) + com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; @@ -7743,7 +7689,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -7776,7 +7721,6 @@ public final class BinaryMessages { return this; } - // optional uint32 message_id = 2; private int messageId_ ; /** * optional uint32 message_id = 2; @@ -7809,7 +7753,6 @@ public final class BinaryMessages { return this; } - // optional uint32 mode = 3; private int mode_ ; /** * optional uint32 mode = 3; @@ -7842,7 +7785,6 @@ public final class BinaryMessages { return this; } - // optional uint32 pid = 4; private int pid_ ; /** * optional uint32 pid = 4; @@ -7875,7 +7817,6 @@ public final class BinaryMessages { return this; } - // optional bytes payload = 5; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes payload = 5; @@ -7931,7 +7872,6 @@ public final class BinaryMessages { return this; } - // optional bool multiple_responses = 6; private boolean multipleResponses_ ; /** * optional bool multiple_responses = 6; @@ -7964,7 +7904,6 @@ public final class BinaryMessages { return this; } - // optional double frequency = 7; private double frequency_ ; /** * optional double frequency = 7; @@ -7997,7 +7936,6 @@ public final class BinaryMessages { return this; } - // optional string name = 8; private java.lang.Object name_ = ""; /** * optional string name = 8; @@ -8011,9 +7949,12 @@ public final class BinaryMessages { public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } return s; } else { return (java.lang.String) ref; @@ -8071,7 +8012,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; /** * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; @@ -8118,10 +8058,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) } - public interface DiagnosticResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DiagnosticResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DiagnosticResponse) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -8131,7 +8071,6 @@ public final class BinaryMessages { */ int getBus(); - // optional uint32 message_id = 2; /** * optional uint32 message_id = 2; */ @@ -8141,7 +8080,6 @@ public final class BinaryMessages { */ int getMessageId(); - // optional uint32 mode = 3; /** * optional uint32 mode = 3; */ @@ -8151,7 +8089,6 @@ public final class BinaryMessages { */ int getMode(); - // optional uint32 pid = 4; /** * optional uint32 pid = 4; */ @@ -8161,7 +8098,6 @@ public final class BinaryMessages { */ int getPid(); - // optional bool success = 5; /** * optional bool success = 5; */ @@ -8171,7 +8107,6 @@ public final class BinaryMessages { */ boolean getSuccess(); - // optional uint32 negative_response_code = 6; /** * optional uint32 negative_response_code = 6; */ @@ -8181,7 +8116,6 @@ public final class BinaryMessages { */ int getNegativeResponseCode(); - // optional bytes payload = 7; /** * optional bytes payload = 7; * @@ -8201,7 +8135,6 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getPayload(); - // optional double value = 8; /** * optional double value = 8; */ @@ -8215,8 +8148,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticResponse} */ public static final class DiagnosticResponse extends - com.google.protobuf.GeneratedMessage - implements DiagnosticResponseOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DiagnosticResponse) + DiagnosticResponseOrBuilder { // Use DiagnosticResponse.newBuilder() to construct. private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -8342,7 +8276,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -8358,7 +8291,6 @@ public final class BinaryMessages { return bus_; } - // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; /** @@ -8374,7 +8306,6 @@ public final class BinaryMessages { return messageId_; } - // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; /** @@ -8390,7 +8321,6 @@ public final class BinaryMessages { return mode_; } - // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; /** @@ -8406,7 +8336,6 @@ public final class BinaryMessages { return pid_; } - // optional bool success = 5; public static final int SUCCESS_FIELD_NUMBER = 5; private boolean success_; /** @@ -8422,7 +8351,6 @@ public final class BinaryMessages { return success_; } - // optional uint32 negative_response_code = 6; public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6; private int negativeResponseCode_; /** @@ -8438,7 +8366,6 @@ public final class BinaryMessages { return negativeResponseCode_; } - // optional bytes payload = 7; public static final int PAYLOAD_FIELD_NUMBER = 7; private com.google.protobuf.ByteString payload_; /** @@ -8464,7 +8391,6 @@ public final class BinaryMessages { return payload_; } - // optional double value = 8; public static final int VALUE_FIELD_NUMBER = 8; private double value_; /** @@ -8493,7 +8419,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -8649,8 +8576,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DiagnosticResponse) + com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; @@ -8826,7 +8754,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -8859,7 +8786,6 @@ public final class BinaryMessages { return this; } - // optional uint32 message_id = 2; private int messageId_ ; /** * optional uint32 message_id = 2; @@ -8892,7 +8818,6 @@ public final class BinaryMessages { return this; } - // optional uint32 mode = 3; private int mode_ ; /** * optional uint32 mode = 3; @@ -8925,7 +8850,6 @@ public final class BinaryMessages { return this; } - // optional uint32 pid = 4; private int pid_ ; /** * optional uint32 pid = 4; @@ -8958,7 +8882,6 @@ public final class BinaryMessages { return this; } - // optional bool success = 5; private boolean success_ ; /** * optional bool success = 5; @@ -8991,7 +8914,6 @@ public final class BinaryMessages { return this; } - // optional uint32 negative_response_code = 6; private int negativeResponseCode_ ; /** * optional uint32 negative_response_code = 6; @@ -9024,7 +8946,6 @@ public final class BinaryMessages { return this; } - // optional bytes payload = 7; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes payload = 7; @@ -9080,7 +9001,6 @@ public final class BinaryMessages { return this; } - // optional double value = 8; private double value_ ; /** * optional double value = 8; @@ -9124,10 +9044,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) } - public interface DynamicFieldOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DynamicFieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DynamicField) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.DynamicField.Type type = 1; /** * optional .openxc.DynamicField.Type type = 1; */ @@ -9137,7 +9057,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DynamicField.Type getType(); - // optional string string_value = 2; /** * optional string string_value = 2; */ @@ -9152,7 +9071,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getStringValueBytes(); - // optional double numeric_value = 3; /** * optional double numeric_value = 3; */ @@ -9162,7 +9080,6 @@ public final class BinaryMessages { */ double getNumericValue(); - // optional bool boolean_value = 4; /** * optional bool boolean_value = 4; */ @@ -9176,8 +9093,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DynamicField} */ public static final class DynamicField extends - com.google.protobuf.GeneratedMessage - implements DynamicFieldOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DynamicField) + DynamicFieldOrBuilder { // Use DynamicField.newBuilder() to construct. private DynamicField(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -9235,8 +9153,9 @@ public final class BinaryMessages { break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - stringValue_ = input.readBytes(); + stringValue_ = bs; break; } case 25: { @@ -9380,7 +9299,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DynamicField.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DynamicField.Type type_; /** @@ -9396,7 +9314,6 @@ public final class BinaryMessages { return type_; } - // optional string string_value = 2; public static final int STRING_VALUE_FIELD_NUMBER = 2; private java.lang.Object stringValue_; /** @@ -9439,7 +9356,6 @@ public final class BinaryMessages { } } - // optional double numeric_value = 3; public static final int NUMERIC_VALUE_FIELD_NUMBER = 3; private double numericValue_; /** @@ -9455,7 +9371,6 @@ public final class BinaryMessages { return numericValue_; } - // optional bool boolean_value = 4; public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; private boolean booleanValue_; /** @@ -9480,7 +9395,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -9608,8 +9524,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DynamicField} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DynamicFieldOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DynamicField) + com.openxc.BinaryMessages.DynamicFieldOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; @@ -9751,7 +9668,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DynamicField.Type type = 1; private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; /** * optional .openxc.DynamicField.Type type = 1; @@ -9787,7 +9703,6 @@ public final class BinaryMessages { return this; } - // optional string string_value = 2; private java.lang.Object stringValue_ = ""; /** * optional string string_value = 2; @@ -9801,9 +9716,12 @@ public final class BinaryMessages { public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - stringValue_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringValue_ = s; + } return s; } else { return (java.lang.String) ref; @@ -9861,7 +9779,6 @@ public final class BinaryMessages { return this; } - // optional double numeric_value = 3; private double numericValue_ ; /** * optional double numeric_value = 3; @@ -9894,7 +9811,6 @@ public final class BinaryMessages { return this; } - // optional bool boolean_value = 4; private boolean booleanValue_ ; /** * optional bool boolean_value = 4; @@ -9938,10 +9854,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DynamicField) } - public interface SimpleMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface SimpleMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.SimpleMessage) + com.google.protobuf.MessageOrBuilder { - // optional string name = 1; /** * optional string name = 1; */ @@ -9956,7 +9872,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getNameBytes(); - // optional .openxc.DynamicField value = 2; /** * optional .openxc.DynamicField value = 2; */ @@ -9970,7 +9885,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - // optional .openxc.DynamicField event = 3; /** * optional .openxc.DynamicField event = 3; */ @@ -9988,8 +9902,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.SimpleMessage} */ public static final class SimpleMessage extends - com.google.protobuf.GeneratedMessage - implements SimpleMessageOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.SimpleMessage) + SimpleMessageOrBuilder { // Use SimpleMessage.newBuilder() to construct. private SimpleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -10036,8 +9951,9 @@ public final class BinaryMessages { break; } case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - name_ = input.readBytes(); + name_ = bs; break; } case 18: { @@ -10106,7 +10022,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional string name = 1; public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; /** @@ -10149,7 +10064,6 @@ public final class BinaryMessages { } } - // optional .openxc.DynamicField value = 2; public static final int VALUE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DynamicField value_; /** @@ -10171,7 +10085,6 @@ public final class BinaryMessages { return value_; } - // optional .openxc.DynamicField event = 3; public static final int EVENT_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.DynamicField event_; /** @@ -10201,7 +10114,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -10322,8 +10236,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.SimpleMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.SimpleMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.SimpleMessage) + com.openxc.BinaryMessages.SimpleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; @@ -10474,7 +10389,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional string name = 1; private java.lang.Object name_ = ""; /** * optional string name = 1; @@ -10488,9 +10402,12 @@ public final class BinaryMessages { public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } return s; } else { return (java.lang.String) ref; @@ -10548,7 +10465,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DynamicField value = 2; private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_; @@ -10657,7 +10573,7 @@ public final class BinaryMessages { if (valueBuilder_ == null) { valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( - value_, + getValue(), getParentForChildren(), isClean()); value_ = null; @@ -10665,7 +10581,6 @@ public final class BinaryMessages { return valueBuilder_; } - // optional .openxc.DynamicField event = 3; private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_; @@ -10774,7 +10689,7 @@ public final class BinaryMessages { if (eventBuilder_ == null) { eventBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( - event_, + getEvent(), getParentForChildren(), isClean()); event_ = null; @@ -10793,67 +10708,67 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.SimpleMessage) } - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_VehicleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_VehicleMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CanMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_CanMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_ControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_ControlCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PassthroughModeControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PayloadFormatCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_CommandResponse_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticRequest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticResponse_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DynamicField_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DynamicField_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_SimpleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -10877,148 +10792,148 @@ public final class BinaryMessages { "\n\020command_response\030\006 \001(\0132\027.openxc.Comman" + "dResponse\"V\n\004Type\022\007\n\003CAN\020\001\022\n\n\006SIMPLE\020\002\022\016" + "\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_COMMAND\020\004\022\024\n\020C", - "OMMAND_RESPONSE\020\005\"\234\001\n\nCanMessage\022\013\n\003bus\030" + - "\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\022" + - "4\n\014frame_format\030\004 \001(\0162\036.openxc.CanMessag" + - "e.FrameFormat\")\n\013FrameFormat\022\014\n\010STANDARD" + - "\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016ControlCommand\022)\n\004t" + - "ype\030\001 \001(\0162\033.openxc.ControlCommand.Type\022<" + - "\n\022diagnostic_request\030\002 \001(\0132 .openxc.Diag" + - "nosticControlCommand\022G\n\030passthrough_mode" + - "_request\030\003 \001(\0132%.openxc.PassthroughModeC" + - "ontrolCommand\022O\n acceptance_filter_bypas", - "s_command\030\004 \001(\0132%.openxc.AcceptanceFilte" + - "rBypassCommand\022<\n\026payload_format_command" + - "\030\005 \001(\0132\034.openxc.PayloadFormatCommand\022O\n " + - "predefined_obd2_requests_command\030\006 \001(\0132%" + - ".openxc.PredefinedObd2RequestsCommand\"\223\001" + - "\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDI" + - "AGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANC" + - "E_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n" + - "\030PREDEFINED_OBD2_REQUESTS\020\007\"\236\001\n\030Diagnost" + - "icControlCommand\022*\n\007request\030\001 \001(\0132\031.open", - "xc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'.o" + - "penxc.DiagnosticControlCommand.Action\"\035\n" + - "\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passthro" + - "ughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007en" + - "abled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassCom" + - "mand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024Pay" + - "loadFormatCommand\022:\n\006format\030\001 \001(\0162*.open" + - "xc.PayloadFormatCommand.PayloadFormat\"\'\n" + - "\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0" + - "\n\035PredefinedObd2RequestsCommand\022\017\n\007enabl", - "ed\030\001 \001(\010\"]\n\017CommandResponse\022)\n\004type\030\001 \001(" + - "\0162\033.openxc.ControlCommand.Type\022\017\n\007messag" + - "e\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021DiagnosticRe" + - "quest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014" + - "\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030\005 \001" + - "(\014\022\032\n\022multiple_responses\030\006 \001(\010\022\021\n\tfreque" + - "ncy\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030" + - "\t \001(\0162%.openxc.DiagnosticRequest.Decoded" + - "Type\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"" + - "\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nm", - "essage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001" + - "(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_response" + - "_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 " + - "\001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.ope" + - "nxc.DynamicField.Type\022\024\n\014string_value\030\002 " + - "\001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_va" + - "lue\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010" + - "\n\004BOOL\020\003\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022" + - "#\n\005value\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005" + - "event\030\003 \001(\0132\024.openxc.DynamicFieldB\034\n\ncom", - ".openxcB\016BinaryMessages" + "OMMAND_RESPONSE\020\005\"\224\001\n\nCanMessage\022\013\n\003bus\030" + + "\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\0224\n\014frame" + + "_format\030\004 \001(\0162\036.openxc.CanMessage.FrameF" + + "ormat\")\n\013FrameFormat\022\014\n\010STANDARD\020\001\022\014\n\010EX" + + "TENDED\020\002\"\270\004\n\016ControlCommand\022)\n\004type\030\001 \001(" + + "\0162\033.openxc.ControlCommand.Type\022<\n\022diagno" + + "stic_request\030\002 \001(\0132 .openxc.DiagnosticCo" + + "ntrolCommand\022G\n\030passthrough_mode_request" + + "\030\003 \001(\0132%.openxc.PassthroughModeControlCo" + + "mmand\022O\n acceptance_filter_bypass_comman", + "d\030\004 \001(\0132%.openxc.AcceptanceFilterBypassC" + + "ommand\022<\n\026payload_format_command\030\005 \001(\0132\034" + + ".openxc.PayloadFormatCommand\022O\n predefin" + + "ed_obd2_requests_command\030\006 \001(\0132%.openxc." + + "PredefinedObd2RequestsCommand\"\223\001\n\004Type\022\013" + + "\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC" + + "\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER" + + "_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFI" + + "NED_OBD2_REQUESTS\020\007\"\236\001\n\030DiagnosticContro" + + "lCommand\022*\n\007request\030\001 \001(\0132\031.openxc.Diagn", + "osticRequest\0227\n\006action\030\002 \001(\0162\'.openxc.Di" + + "agnosticControlCommand.Action\"\035\n\006Action\022" + + "\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughModeC" + + "ontrolCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 " + + "\001(\010\"<\n\035AcceptanceFilterBypassCommand\022\013\n\003" + + "bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadForm" + + "atCommand\022:\n\006format\030\001 \001(\0162*.openxc.Paylo" + + "adFormatCommand.PayloadFormat\"\'\n\rPayload" + + "Format\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035Predef" + + "inedObd2RequestsCommand\022\017\n\007enabled\030\001 \001(\010", + "\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.open" + + "xc.ControlCommand.Type\022\017\n\007message\030\002 \001(\t\022" + + "\016\n\006status\030\003 \001(\010\"\375\001\n\021DiagnosticRequest\022\013\n" + + "\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003" + + " \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030\005 \001(\014\022\032\n\022mu" + + "ltiple_responses\030\006 \001(\010\022\021\n\tfrequency\030\007 \001(" + + "\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\0162%." + + "openxc.DiagnosticRequest.DecodedType\"!\n\013" + + "DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diag" + + "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i", + "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" + + "ccess\030\005 \001(\010\022\036\n\026negative_response_code\030\006 " + + "\001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014" + + "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" + + "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" + + "umeric_value\030\003 \001(\001\022\025\n\rboolean_value\030\004 \001(" + + "\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003" + + "\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n\005value" + + "\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005event\030\003 " + + "\001(\0132\024.openxc.DynamicFieldB\034\n\ncom.openxcB", + "\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_openxc_VehicleMessage_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_openxc_VehicleMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_VehicleMessage_descriptor, - new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); - internal_static_openxc_CanMessage_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_openxc_CanMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_CanMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", "FrameFormat", }); - internal_static_openxc_ControlCommand_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_openxc_ControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", }); - internal_static_openxc_DiagnosticControlCommand_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticControlCommand_descriptor, - new java.lang.String[] { "Request", "Action", }); - internal_static_openxc_PassthroughModeControlCommand_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PassthroughModeControlCommand_descriptor, - new java.lang.String[] { "Bus", "Enabled", }); - internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, - new java.lang.String[] { "Bus", "Bypass", }); - internal_static_openxc_PayloadFormatCommand_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PayloadFormatCommand_descriptor, - new java.lang.String[] { "Format", }); - internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, - new java.lang.String[] { "Enabled", }); - internal_static_openxc_CommandResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_openxc_CommandResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_CommandResponse_descriptor, - new java.lang.String[] { "Type", "Message", "Status", }); - internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); - internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticResponse_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); - internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_openxc_DynamicField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DynamicField_descriptor, - new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); - internal_static_openxc_SimpleMessage_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_openxc_SimpleMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_SimpleMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); + internal_static_openxc_VehicleMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_openxc_VehicleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_VehicleMessage_descriptor, + new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); + internal_static_openxc_CanMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_openxc_CanMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_CanMessage_descriptor, + new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }); + internal_static_openxc_ControlCommand_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_openxc_ControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_ControlCommand_descriptor, + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", }); + internal_static_openxc_DiagnosticControlCommand_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticControlCommand_descriptor, + new java.lang.String[] { "Request", "Action", }); + internal_static_openxc_PassthroughModeControlCommand_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PassthroughModeControlCommand_descriptor, + new java.lang.String[] { "Bus", "Enabled", }); + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, + new java.lang.String[] { "Bus", "Bypass", }); + internal_static_openxc_PayloadFormatCommand_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PayloadFormatCommand_descriptor, + new java.lang.String[] { "Format", }); + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, + new java.lang.String[] { "Enabled", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_openxc_CommandResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_CommandResponse_descriptor, + new java.lang.String[] { "Type", "Message", "Status", }); + internal_static_openxc_DiagnosticRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticRequest_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); + internal_static_openxc_DiagnosticResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticResponse_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); + internal_static_openxc_DynamicField_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_openxc_DynamicField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DynamicField_descriptor, + new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); + internal_static_openxc_SimpleMessage_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_openxc_SimpleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_SimpleMessage_descriptor, + new java.lang.String[] { "Name", "Value", "Event", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 4c5ff5c8..21ec4bd8 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -1,19 +1,26 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: openxc.proto +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) +_sym_db = _symbol_database.Default() + DESCRIPTOR = _descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x9c\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12<\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32 .openxc.DiagnosticControlCommand\x12G\n\x18passthrough_mode_request\x18\x03 \x01(\x0b\x32%.openxc.PassthroughModeControlCommand\x12O\n acceptance_filter_bypass_command\x18\x04 \x01(\x0b\x32%.openxc.AcceptanceFilterBypassCommand\x12<\n\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x0f\n\x0bPASSTHROUGH\x10\x04\x12\x1c\n\x18\x41\x43\x43\x45PTANCE_FILTER_BYPASS\x10\x05\x12\x12\n\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\x9e\x01\n\x18\x44iagnosticControlCommand\x12*\n\x07request\x18\x01 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12\x37\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\'.openxc.DiagnosticControlCommand.Action\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"=\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"<\n\x1d\x41\x63\x63\x65ptanceFilterBypassCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0e\n\x06\x62ypass\x18\x02 \x01(\x08\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb=_b('\n\x0copenxc.proto\x12\x06openxc\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12<\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32 .openxc.DiagnosticControlCommand\x12G\n\x18passthrough_mode_request\x18\x03 \x01(\x0b\x32%.openxc.PassthroughModeControlCommand\x12O\n acceptance_filter_bypass_command\x18\x04 \x01(\x0b\x32%.openxc.AcceptanceFilterBypassCommand\x12<\n\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x0f\n\x0bPASSTHROUGH\x10\x04\x12\x1c\n\x18\x41\x43\x43\x45PTANCE_FILTER_BYPASS\x10\x05\x12\x12\n\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\x9e\x01\n\x18\x44iagnosticControlCommand\x12*\n\x07request\x18\x01 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12\x37\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\'.openxc.DiagnosticControlCommand.Action\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"=\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"<\n\x1d\x41\x63\x63\x65ptanceFilterBypassCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0e\n\x06\x62ypass\x18\x02 \x01(\x08\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') +) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -49,6 +56,7 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( serialized_start=331, serialized_end=417, ) +_sym_db.RegisterEnumDescriptor(_VEHICLEMESSAGE_TYPE) _CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( name='FrameFormat', @@ -67,9 +75,10 @@ _CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=535, - serialized_end=576, + serialized_start=527, + serialized_end=568, ) +_sym_db.RegisterEnumDescriptor(_CANMESSAGE_FRAMEFORMAT) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='Type', @@ -108,9 +117,10 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1000, - serialized_end=1147, + serialized_start=992, + serialized_end=1139, ) +_sym_db.RegisterEnumDescriptor(_CONTROLCOMMAND_TYPE) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( name='Action', @@ -129,9 +139,10 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1279, - serialized_end=1308, + serialized_start=1271, + serialized_end=1300, ) +_sym_db.RegisterEnumDescriptor(_DIAGNOSTICCONTROLCOMMAND_ACTION) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( name='PayloadFormat', @@ -150,9 +161,10 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1519, - serialized_end=1558, + serialized_start=1511, + serialized_end=1550, ) +_sym_db.RegisterEnumDescriptor(_PAYLOADFORMATCOMMAND_PAYLOADFORMAT) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( name='DecodedType', @@ -171,9 +183,10 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1926, - serialized_end=1959, + serialized_start=1918, + serialized_end=1951, ) +_sym_db.RegisterEnumDescriptor(_DIAGNOSTICREQUEST_DECODEDTYPE) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( name='Type', @@ -196,9 +209,10 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2251, - serialized_end=2288, + serialized_start=2243, + serialized_end=2280, ) +_sym_db.RegisterEnumDescriptor(_DYNAMICFIELD_TYPE) _VEHICLEMESSAGE = _descriptor.Descriptor( @@ -260,6 +274,8 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], + oneofs=[ + ], serialized_start=25, serialized_end=417, ) @@ -280,7 +296,7 @@ _CANMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='message_id', full_name='openxc.CanMessage.message_id', index=1, + name='id', full_name='openxc.CanMessage.id', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -289,7 +305,7 @@ _CANMESSAGE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='data', full_name='openxc.CanMessage.data', index=2, number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value="", + has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -310,8 +326,10 @@ _CANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], + oneofs=[ + ], serialized_start=420, - serialized_end=576, + serialized_end=568, ) @@ -374,8 +392,10 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=579, - serialized_end=1147, + oneofs=[ + ], + serialized_start=571, + serialized_end=1139, ) @@ -410,8 +430,10 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1150, - serialized_end=1308, + oneofs=[ + ], + serialized_start=1142, + serialized_end=1300, ) @@ -445,8 +467,10 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1310, - serialized_end=1371, + oneofs=[ + ], + serialized_start=1302, + serialized_end=1363, ) @@ -480,8 +504,10 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1373, - serialized_end=1433, + oneofs=[ + ], + serialized_start=1365, + serialized_end=1425, ) @@ -509,8 +535,10 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1435, - serialized_end=1558, + oneofs=[ + ], + serialized_start=1427, + serialized_end=1550, ) @@ -537,8 +565,10 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1560, - serialized_end=1608, + oneofs=[ + ], + serialized_start=1552, + serialized_end=1600, ) @@ -559,7 +589,7 @@ _COMMANDRESPONSE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='message', full_name='openxc.CommandResponse.message', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -579,8 +609,10 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1610, - serialized_end=1703, + oneofs=[ + ], + serialized_start=1602, + serialized_end=1695, ) @@ -622,7 +654,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticRequest.payload', index=4, number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value="", + has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -643,7 +675,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='name', full_name='openxc.DiagnosticRequest.name', index=7, number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -664,8 +696,10 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1706, - serialized_end=1959, + oneofs=[ + ], + serialized_start=1698, + serialized_end=1951, ) @@ -721,7 +755,7 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticResponse.payload', index=6, number=7, type=12, cpp_type=9, label=1, - has_default_value=False, default_value="", + has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -741,8 +775,10 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1962, - serialized_end=2123, + oneofs=[ + ], + serialized_start=1954, + serialized_end=2115, ) @@ -763,7 +799,7 @@ _DYNAMICFIELD = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='string_value', full_name='openxc.DynamicField.string_value', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -791,8 +827,10 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2126, - serialized_end=2288, + oneofs=[ + ], + serialized_start=2118, + serialized_end=2280, ) @@ -806,7 +844,7 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='name', full_name='openxc.SimpleMessage.name', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -833,8 +871,10 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2290, - serialized_end=2393, + oneofs=[ + ], + serialized_start=2282, + serialized_end=2385, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -843,26 +883,26 @@ _VEHICLEMESSAGE.fields_by_name['simple_message'].message_type = _SIMPLEMESSAGE _VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTICRESPONSE _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE -_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; +_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE _CANMESSAGE.fields_by_name['frame_format'].enum_type = _CANMESSAGE_FRAMEFORMAT -_CANMESSAGE_FRAMEFORMAT.containing_type = _CANMESSAGE; +_CANMESSAGE_FRAMEFORMAT.containing_type = _CANMESSAGE _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type = _ACCEPTANCEFILTERBYPASSCOMMAND _CONTROLCOMMAND.fields_by_name['payload_format_command'].message_type = _PAYLOADFORMATCOMMAND _CONTROLCOMMAND.fields_by_name['predefined_obd2_requests_command'].message_type = _PREDEFINEDOBD2REQUESTSCOMMAND -_CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; +_CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION -_DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND; +_DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND _PAYLOADFORMATCOMMAND.fields_by_name['format'].enum_type = _PAYLOADFORMATCOMMAND_PAYLOADFORMAT -_PAYLOADFORMATCOMMAND_PAYLOADFORMAT.containing_type = _PAYLOADFORMATCOMMAND; +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT.containing_type = _PAYLOADFORMATCOMMAND _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE -_DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; +_DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE -_DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; +_DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD _SIMPLEMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD _SIMPLEMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE @@ -879,85 +919,98 @@ DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['SimpleMessage'] = _SIMPLEMESSAGE -class VehicleMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _VEHICLEMESSAGE - +VehicleMessage = _reflection.GeneratedProtocolMessageType('VehicleMessage', (_message.Message,), dict( + DESCRIPTOR = _VEHICLEMESSAGE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) + )) +_sym_db.RegisterMessage(VehicleMessage) -class CanMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _CANMESSAGE - +CanMessage = _reflection.GeneratedProtocolMessageType('CanMessage', (_message.Message,), dict( + DESCRIPTOR = _CANMESSAGE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.CanMessage) + )) +_sym_db.RegisterMessage(CanMessage) -class ControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _CONTROLCOMMAND - +ControlCommand = _reflection.GeneratedProtocolMessageType('ControlCommand', (_message.Message,), dict( + DESCRIPTOR = _CONTROLCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.ControlCommand) + )) +_sym_db.RegisterMessage(ControlCommand) -class DiagnosticControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND - +DiagnosticControlCommand = _reflection.GeneratedProtocolMessageType('DiagnosticControlCommand', (_message.Message,), dict( + DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + )) +_sym_db.RegisterMessage(DiagnosticControlCommand) -class PassthroughModeControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND - +PassthroughModeControlCommand = _reflection.GeneratedProtocolMessageType('PassthroughModeControlCommand', (_message.Message,), dict( + DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + )) +_sym_db.RegisterMessage(PassthroughModeControlCommand) -class AcceptanceFilterBypassCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND - +AcceptanceFilterBypassCommand = _reflection.GeneratedProtocolMessageType('AcceptanceFilterBypassCommand', (_message.Message,), dict( + DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) + )) +_sym_db.RegisterMessage(AcceptanceFilterBypassCommand) -class PayloadFormatCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _PAYLOADFORMATCOMMAND - +PayloadFormatCommand = _reflection.GeneratedProtocolMessageType('PayloadFormatCommand', (_message.Message,), dict( + DESCRIPTOR = _PAYLOADFORMATCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) + )) +_sym_db.RegisterMessage(PayloadFormatCommand) -class PredefinedObd2RequestsCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND - +PredefinedObd2RequestsCommand = _reflection.GeneratedProtocolMessageType('PredefinedObd2RequestsCommand', (_message.Message,), dict( + DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) + )) +_sym_db.RegisterMessage(PredefinedObd2RequestsCommand) -class CommandResponse(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _COMMANDRESPONSE - +CommandResponse = _reflection.GeneratedProtocolMessageType('CommandResponse', (_message.Message,), dict( + DESCRIPTOR = _COMMANDRESPONSE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.CommandResponse) + )) +_sym_db.RegisterMessage(CommandResponse) -class DiagnosticRequest(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DIAGNOSTICREQUEST - +DiagnosticRequest = _reflection.GeneratedProtocolMessageType('DiagnosticRequest', (_message.Message,), dict( + DESCRIPTOR = _DIAGNOSTICREQUEST, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) + )) +_sym_db.RegisterMessage(DiagnosticRequest) -class DiagnosticResponse(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DIAGNOSTICRESPONSE - +DiagnosticResponse = _reflection.GeneratedProtocolMessageType('DiagnosticResponse', (_message.Message,), dict( + DESCRIPTOR = _DIAGNOSTICRESPONSE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) + )) +_sym_db.RegisterMessage(DiagnosticResponse) -class DynamicField(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DYNAMICFIELD - +DynamicField = _reflection.GeneratedProtocolMessageType('DynamicField', (_message.Message,), dict( + DESCRIPTOR = _DYNAMICFIELD, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DynamicField) + )) +_sym_db.RegisterMessage(DynamicField) -class SimpleMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _SIMPLEMESSAGE - +SimpleMessage = _reflection.GeneratedProtocolMessageType('SimpleMessage', (_message.Message,), dict( + DESCRIPTOR = _SIMPLEMESSAGE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.SimpleMessage) + )) +_sym_db.RegisterMessage(SimpleMessage) DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), '\n\ncom.openxcB\016BinaryMessages') +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\ncom.openxcB\016BinaryMessages')) # @@protoc_insertion_point(module_scope) diff --git a/openxc.proto b/openxc.proto index 252f214b..6bf15674 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 1.2.3-korg