From aa4a2cd92afecf5ce6e3faba441d3b8758b5c372 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 4 Aug 2014 22:04:57 -0400 Subject: Require an 'action' in diagnostic requests. It wasn't very clean to try and infer a delete/create/update based on the value of the frequency field - this will require a little more code, but as they say in Python, explicit is better than implicit. Fixed https://github.com/openxc/openxc-message-format/issues/12 --- gen/java/com/openxc/BinaryMessages.java | 223 +++++++++++++++++++++++++++++--- 1 file changed, 203 insertions(+), 20 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 777acd03..dbec8701 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3399,6 +3399,16 @@ public final class BinaryMessages { * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); + + // optional .openxc.DiagnosticRequest.Action action = 10; + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + boolean hasAction(); + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + com.openxc.BinaryMessages.DiagnosticRequest.Action getAction(); } /** * Protobuf type {@code openxc.DiagnosticRequest} @@ -3502,6 +3512,17 @@ public final class BinaryMessages { } break; } + case 80: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticRequest.Action value = com.openxc.BinaryMessages.DiagnosticRequest.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(10, rawValue); + } else { + bitField0_ |= 0x00000200; + action_ = value; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3623,6 +3644,97 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) } + /** + * Protobuf enum {@code openxc.DiagnosticRequest.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CREATE = 1; + */ + CREATE(0, 1), + /** + * UPDATE = 2; + */ + UPDATE(1, 2), + /** + * DELETE = 3; + */ + DELETE(2, 3), + ; + + /** + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * UPDATE = 2; + */ + public static final int UPDATE_VALUE = 2; + /** + * DELETE = 3; + */ + public static final int DELETE_VALUE = 3; + + + public final int getNumber() { return value; } + + public static Action valueOf(int value) { + switch (value) { + case 1: return CREATE; + case 2: return UPDATE; + case 3: return DELETE; + 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 Action findValueByNumber(int number) { + return Action.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.DiagnosticRequest.getDescriptor().getEnumTypes().get(1); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.Action) + } + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -3805,6 +3917,22 @@ public final class BinaryMessages { return decodedType_; } + // optional .openxc.DiagnosticRequest.Action action = 10; + public static final int ACTION_FIELD_NUMBER = 10; + private com.openxc.BinaryMessages.DiagnosticRequest.Action action_; + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { + return action_; + } + private void initFields() { bus_ = 0; messageId_ = 0; @@ -3815,6 +3943,7 @@ public final class BinaryMessages { frequency_ = 0D; name_ = ""; decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3855,6 +3984,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeEnum(9, decodedType_.getNumber()); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeEnum(10, action_.getNumber()); + } getUnknownFields().writeTo(output); } @@ -3900,6 +4032,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeEnumSize(9, decodedType_.getNumber()); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, action_.getNumber()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -4034,6 +4170,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; bitField0_ = (bitField0_ & ~0x00000100); + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4098,6 +4236,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000100; } result.decodedType_ = decodedType_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.action_ = action_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4143,6 +4285,9 @@ public final class BinaryMessages { if (other.hasDecodedType()) { setDecodedType(other.getDecodedType()); } + if (other.hasAction()) { + setAction(other.getAction()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4534,6 +4679,42 @@ public final class BinaryMessages { return this; } + // optional .openxc.DiagnosticRequest.Action action = 10; + private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { + return action_; + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public Builder setAction(com.openxc.BinaryMessages.DiagnosticRequest.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000200); + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } @@ -7495,29 +7676,31 @@ public final class BinaryMessages { "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" + "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" + - "e\022\017\n\007message\030\002 \001(\t\"\375\001\n\021DiagnosticRequest" + + "e\022\017\n\007message\030\002 \001(\t\"\335\002\n\021DiagnosticRequest" + "\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mod", "e\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\tfrequency\030\007" + " \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\016" + - "2%.openxc.DiagnosticRequest.DecodedType\"" + - "!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022D" + - "iagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_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.openxc.D", - "ynamicField.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\004BOO" + - "L\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.DynamicFie" + - "ld\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\014E" + - "VENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessa", - "ges" + "2%.openxc.DiagnosticRequest.DecodedType\022" + + "0\n\006action\030\n \001(\0162 .openxc.DiagnosticReque" + + "st.Action\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OB" + + "D2\020\002\",\n\006Action\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n" + + "\n\006DELETE\020\003\"\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\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negati", + "ve_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.DynamicField.Type\022\024\n\014stri" + + "ng_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\021TranslatedMessag" + + "e\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMessa" + + "ge.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.o" + + "penxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.open" + + "xc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003N", + "UM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EV" + + "ENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.ope" + + "nxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7553,7 +7736,7 @@ public final class BinaryMessages { 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", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", "Action", }); internal_static_openxc_DiagnosticResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new -- cgit 1.2.3-korg From 3cd516b8f2925e82cff666a5c98ff30de507ca39 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 10 Aug 2014 21:51:13 -0400 Subject: Remove 'update' feature of diag request commands. --- README.md | 32 ++++----------- gen/cpp/openxc.pb | 15 +++---- gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 7 ++-- gen/java/com/openxc/BinaryMessages.java | 73 +++++++++++++++------------------ gen/python/openxc_pb2.py | 34 +++++++-------- openxc.proto | 2 +- 7 files changed, 65 insertions(+), 100 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index ca401363..50c166b1 100644 --- a/README.md +++ b/README.md @@ -80,11 +80,10 @@ The format for a raw CAN message: #### Requests -A diagnostic request is created, update and deleted with a JSON object like this -example: +A diagnostic request is added or cancelled with a JSON object like this example: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -100,9 +99,8 @@ example: * The `command` must be `diagnostic_request.` * The `action` must be included, and must be one of: - * `create` - create a new one-off or recurring diagnostic request. - * `update` - update an existing request. - * `delete` - delete an existing request. + * `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. @@ -112,7 +110,7 @@ referred to as the key of the diagnostic request. For example, to create a simple one-time diagnostic request: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -131,7 +129,7 @@ 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": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -145,7 +143,7 @@ previous example as a recurring request at 1Hz: To cancel a recurring request, send a `cancel` action with the same key, e.g.: { "command": "diagnostic_request", - "action": "delete", + "action": "cancel", "request": { "bus": 1, "id": 1234, @@ -155,22 +153,6 @@ To cancel a recurring request, send a `cancel` action with the same key, e.g.: } } -To update one of the fields of a recurring request, send an `update` action with -the same key, plus the field to update. For example, to change the frequency of -the example request to 2Hz: - - { "command": "diagnostic_request", - "action": "update", - "request": { - "bus": 1, - "id": 1234, - "mode": 1, - "pid": 5, - "frequency": 2 - } - } - } - 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. diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 282e5818..719c9397 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -£ +” openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -32,7 +32,7 @@ message_id (  DIAGNOSTIC"M CommandResponse) type (2.openxc.ControlCommand.Type -message ( "Ý +message ( "Î DiagnosticRequest bus ( @@ -48,14 +48,11 @@ message_id (  (2 .openxc.DiagnosticRequest.Action"! DecodedType NONE -OBD2", -Action +OBD2" +Action +ADD -CREATE - -UPDATE - -DELETE"¡ +CANCEL"¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 24f4b3c6..ae44728e 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.2.5 at Mon Aug 4 23:15:59 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 21:51:35 2014. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index d0c7da49..7cceffa2 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.2.5 at Mon Aug 4 23:15:59 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 21:51:35 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -30,9 +30,8 @@ typedef enum _openxc_DiagnosticRequest_DecodedType { } openxc_DiagnosticRequest_DecodedType; typedef enum _openxc_DiagnosticRequest_Action { - openxc_DiagnosticRequest_Action_CREATE = 1, - openxc_DiagnosticRequest_Action_UPDATE = 2, - openxc_DiagnosticRequest_Action_DELETE = 3 + openxc_DiagnosticRequest_Action_ADD = 1, + openxc_DiagnosticRequest_Action_CANCEL = 3 } openxc_DiagnosticRequest_Action; typedef enum _openxc_DynamicField_Type { diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index dbec8701..a30e70f4 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3650,40 +3650,31 @@ public final class BinaryMessages { public enum Action implements com.google.protobuf.ProtocolMessageEnum { /** - * CREATE = 1; + * ADD = 1; */ - CREATE(0, 1), + ADD(0, 1), /** - * UPDATE = 2; + * CANCEL = 3; */ - UPDATE(1, 2), - /** - * DELETE = 3; - */ - DELETE(2, 3), + CANCEL(1, 3), ; /** - * CREATE = 1; - */ - public static final int CREATE_VALUE = 1; - /** - * UPDATE = 2; + * ADD = 1; */ - public static final int UPDATE_VALUE = 2; + public static final int ADD_VALUE = 1; /** - * DELETE = 3; + * CANCEL = 3; */ - public static final int DELETE_VALUE = 3; + public static final int CANCEL_VALUE = 3; public final int getNumber() { return value; } public static Action valueOf(int value) { switch (value) { - case 1: return CREATE; - case 2: return UPDATE; - case 3: return DELETE; + case 1: return ADD; + case 3: return CANCEL; default: return null; } } @@ -3943,7 +3934,7 @@ public final class BinaryMessages { frequency_ = 0D; name_ = ""; decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4170,7 +4161,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; bitField0_ = (bitField0_ & ~0x00000100); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4680,7 +4671,7 @@ public final class BinaryMessages { } // optional .openxc.DiagnosticRequest.Action action = 10; - private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; /** * optional .openxc.DiagnosticRequest.Action action = 10; */ @@ -4710,7 +4701,7 @@ public final class BinaryMessages { */ public Builder clearAction() { bitField0_ = (bitField0_ & ~0x00000200); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; onChanged(); return this; } @@ -7676,7 +7667,7 @@ public final class BinaryMessages { "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" + "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" + - "e\022\017\n\007message\030\002 \001(\t\"\335\002\n\021DiagnosticRequest" + + "e\022\017\n\007message\030\002 \001(\t\"\316\002\n\021DiagnosticRequest" + "\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mod", "e\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\tfrequency\030\007" + @@ -7684,23 +7675,23 @@ public final class BinaryMessages { "2%.openxc.DiagnosticRequest.DecodedType\022" + "0\n\006action\030\n \001(\0162 .openxc.DiagnosticReque" + "st.Action\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OB" + - "D2\020\002\",\n\006Action\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n" + - "\n\006DELETE\020\003\"\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\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negati", - "ve_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.DynamicField.Type\022\024\n\014stri" + - "ng_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\021TranslatedMessag" + - "e\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMessa" + - "ge.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.o" + - "penxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.open" + - "xc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003N", - "UM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EV" + - "ENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.ope" + - "nxcB\016BinaryMessages" + "D2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\003\"\241\001\n\022" + + "DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessa" + + "ge_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_cod", + "e\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." + + "DynamicField.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\004BO" + + "OL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\016" + + "2\036.openxc.TranslatedMessage.Type\022\014\n\004name" + + "\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicFi" + + "eld\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\014" + + "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" + + "ages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index cf6e0145..81a56c60 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\"\xa6\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"M\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xdd\x02\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\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\",\n\x06\x41\x63tion\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\"\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\";\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\"\xa6\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"M\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xce\x02\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\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\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') @@ -103,22 +103,18 @@ _DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='CREATE', index=0, number=1, + name='ADD', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='UPDATE', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DELETE', index=2, number=3, + name='CANCEL', index=1, number=3, options=None, type=None), ], containing_type=None, options=None, serialized_start=1046, - serialized_end=1090, + serialized_end=1075, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -142,8 +138,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1382, - serialized_end=1419, + serialized_start=1367, + serialized_end=1404, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -179,8 +175,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1577, - serialized_end=1669, + serialized_start=1562, + serialized_end=1654, ) @@ -450,7 +446,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=741, - serialized_end=1090, + serialized_end=1075, ) @@ -526,8 +522,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1093, - serialized_end=1254, + serialized_start=1078, + serialized_end=1239, ) @@ -576,8 +572,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1257, - serialized_end=1419, + serialized_start=1242, + serialized_end=1404, ) @@ -626,8 +622,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1422, - serialized_end=1669, + serialized_start=1407, + serialized_end=1654, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index aa7f7344..1f03b439 100644 --- a/openxc.proto +++ b/openxc.proto @@ -35,7 +35,7 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } - enum Action { CREATE = 1; UPDATE = 2; DELETE = 3; } + enum Action { ADD = 1; CANCEL = 3; } optional int32 bus = 1; optional uint32 message_id = 2; -- cgit 1.2.3-korg From fcb217ef4140319ee8557f849bbaf01ecfe92e6f Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 10 Aug 2014 22:05:11 -0400 Subject: Add a 'status' field to command responses. --- gen/cpp/openxc.pb | 7 +- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 11 ++- gen/java/com/openxc/BinaryMessages.java | 135 +++++++++++++++++++++++++------- gen/python/openxc_pb2.py | 43 +++++----- openxc.proto | 1 + 6 files changed, 148 insertions(+), 54 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 719c9397..e74bf809 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -” +¤ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -29,10 +29,11 @@ message_id (  VERSION DEVICE_ID -DIAGNOSTIC"M +DIAGNOSTIC"] CommandResponse) type (2.openxc.ControlCommand.Type -message ( "Î +message (  +status ("Î DiagnosticRequest bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ae44728e..e7fac5b5 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.2.5 at Sun Aug 10 21:51:35 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 22:03:53 2014. */ #include "openxc.pb.h" @@ -28,9 +28,10 @@ const pb_field_t openxc_ControlCommand_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_CommandResponse_fields[3] = { +const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), + PB_FIELD2( 3, BOOL , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, status, message, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 7cceffa2..40993335 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.2.5 at Sun Aug 10 21:51:35 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 22:03:53 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -55,6 +55,8 @@ typedef struct _openxc_CommandResponse { openxc_ControlCommand_Type type; bool has_message; char message[128]; + bool has_status; + bool status; } openxc_CommandResponse; typedef struct { @@ -172,6 +174,7 @@ typedef struct _openxc_VehicleMessage { /* Field tags (for use in manual encoding/decoding) */ #define openxc_CommandResponse_type_tag 1 #define openxc_CommandResponse_message_tag 2 +#define openxc_CommandResponse_status_tag 3 #define openxc_DiagnosticRequest_bus_tag 1 #define openxc_DiagnosticRequest_message_id_tag 2 #define openxc_DiagnosticRequest_mode_tag 3 @@ -214,17 +217,17 @@ typedef struct _openxc_VehicleMessage { extern const pb_field_t openxc_VehicleMessage_fields[7]; extern const pb_field_t openxc_RawMessage_fields[4]; extern const pb_field_t openxc_ControlCommand_fields[3]; -extern const pb_field_t openxc_CommandResponse_fields[3]; +extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[11]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; 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 670 +#define openxc_VehicleMessage_size 672 #define openxc_RawMessage_size 27 #define openxc_ControlCommand_size 82 -#define openxc_CommandResponse_size 137 +#define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 74 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index a30e70f4..1465301e 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2758,6 +2758,16 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getMessageBytes(); + + // optional bool status = 3; + /** + * optional bool status = 3; + */ + boolean hasStatus(); + /** + * optional bool status = 3; + */ + boolean getStatus(); } /** * Protobuf type {@code openxc.CommandResponse} @@ -2826,6 +2836,11 @@ public final class BinaryMessages { message_ = input.readBytes(); break; } + case 24: { + bitField0_ |= 0x00000004; + status_ = input.readBool(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2925,9 +2940,26 @@ public final class BinaryMessages { } } + // optional bool status = 3; + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + * optional bool status = 3; + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool status = 3; + */ + public boolean getStatus() { + return status_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; message_ = ""; + status_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2947,6 +2979,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getMessageBytes()); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, status_); + } getUnknownFields().writeTo(output); } @@ -2964,6 +2999,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getMessageBytes()); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -3084,6 +3123,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); message_ = ""; bitField0_ = (bitField0_ & ~0x00000002); + status_ = false; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -3120,6 +3161,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000002; } result.message_ = message_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.status_ = status_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3144,6 +3189,9 @@ public final class BinaryMessages { message_ = other.message_; onChanged(); } + if (other.hasStatus()) { + setStatus(other.getStatus()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -3281,6 +3329,39 @@ public final class BinaryMessages { return this; } + // optional bool status = 3; + private boolean status_ ; + /** + * optional bool status = 3; + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + * optional bool status = 3; + */ + public Builder setStatus(boolean value) { + bitField0_ |= 0x00000004; + status_ = value; + onChanged(); + return this; + } + /** + * optional bool status = 3; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + status_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.CommandResponse) } @@ -7665,33 +7746,33 @@ public final class BinaryMessages { "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" + "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" + "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + - "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" + + "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"]\n\017CommandResponse\022)" + "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" + - "e\022\017\n\007message\030\002 \001(\t\"\316\002\n\021DiagnosticRequest" + - "\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mod", - "e\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\tfrequency\030\007" + - " \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\016" + - "2%.openxc.DiagnosticRequest.DecodedType\022" + - "0\n\006action\030\n \001(\0162 .openxc.DiagnosticReque" + - "st.Action\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OB" + - "D2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\003\"\241\001\n\022" + - "DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessa" + - "ge_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_cod", - "e\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." + - "DynamicField.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\004BO" + - "OL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\016" + - "2\036.openxc.TranslatedMessage.Type\022\014\n\004name" + - "\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicFi" + - "eld\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\014" + - "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" + - "ages" + "e\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\316\002\n\021D" + + "iagnosticRequest\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" + + "payload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(" + + "\010\022\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014de" + + "coded_type\030\t \001(\0162%.openxc.DiagnosticRequ" + + "est.DecodedType\0220\n\006action\030\n \001(\0162 .openxc" + + ".DiagnosticRequest.Action\"!\n\013DecodedType" + + "\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022" + + "\n\n\006CANCEL\020\003\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + + "s\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\007success\030\005 \001(\010\022\036\n\026negat", + "ive_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.DynamicField.Type\022\024\n\014str" + + "ing_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\021TranslatedMessa" + + "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + + "age.Type\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.ope" + + "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003", + "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + + "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + + "enxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7721,7 +7802,7 @@ public final class BinaryMessages { internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, - new java.lang.String[] { "Type", "Message", }); + new java.lang.String[] { "Type", "Message", "Status", }); internal_static_openxc_DiagnosticRequest_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 81a56c60..15a6486a 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\"\xa6\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"M\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xce\x02\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\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\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\";\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\"\xa6\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"]\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\"\xce\x02\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\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\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') @@ -92,8 +92,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1011, - serialized_end=1044, + serialized_start=1027, + serialized_end=1060, ) _DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( @@ -113,8 +113,8 @@ _DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1046, - serialized_end=1075, + serialized_start=1062, + serialized_end=1091, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -138,8 +138,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1367, - serialized_end=1404, + serialized_start=1383, + serialized_end=1420, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +175,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1562, - serialized_end=1654, + serialized_start=1578, + serialized_end=1670, ) @@ -343,6 +343,13 @@ _COMMANDRESPONSE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='status', full_name='openxc.CommandResponse.status', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -353,7 +360,7 @@ _COMMANDRESPONSE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=661, - serialized_end=738, + serialized_end=754, ) @@ -445,8 +452,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=741, - serialized_end=1075, + serialized_start=757, + serialized_end=1091, ) @@ -522,8 +529,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1078, - serialized_end=1239, + serialized_start=1094, + serialized_end=1255, ) @@ -572,8 +579,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1242, - serialized_end=1404, + serialized_start=1258, + serialized_end=1420, ) @@ -622,8 +629,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1407, - serialized_end=1654, + serialized_start=1423, + serialized_end=1670, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 1f03b439..071f2f25 100644 --- a/openxc.proto +++ b/openxc.proto @@ -31,6 +31,7 @@ message ControlCommand { message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; + optional bool status = 3; } message DiagnosticRequest { -- cgit 1.2.3-korg From 1430a2a202e37be476b7290c2018a1c0d64833d8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 11 Aug 2014 23:36:39 -0400 Subject: Move action field to ControlCommand in binary format. --- gen/cpp/openxc.pb | 25 +- gen/cpp/openxc.pb.c | 8 +- gen/cpp/openxc.pb.h | 24 +- gen/java/com/openxc/BinaryMessages.java | 406 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 84 +++---- openxc.proto | 4 +- 6 files changed, 275 insertions(+), 276 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index e74bf809..e2d67115 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -¤ +¡ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,19 +21,24 @@ RawMessage bus ( message_id (  -data ( "¦ +data ( "ô ControlCommand) type (2.openxc.ControlCommand.Type5 -diagnostic_request ( 2.openxc.DiagnosticRequest"2 +diagnostic_request ( 2.openxc.DiagnosticRequest- +action (2.openxc.ControlCommand.Action"2 Type VERSION DEVICE_ID -DIAGNOSTIC"] +DIAGNOSTIC" +Action +ADD + +CANCEL"] CommandResponse) type (2.openxc.ControlCommand.Type message (  -status ("Î +status ("ý DiagnosticRequest bus ( @@ -44,16 +49,10 @@ message_id (  multiple_responses ( frequency ( name ( ; - decoded_type (2%.openxc.DiagnosticRequest.DecodedType0 -action - (2 .openxc.DiagnosticRequest.Action"! + decoded_type (2%.openxc.DiagnosticRequest.DecodedType"! DecodedType NONE -OBD2" -Action -ADD - -CANCEL"¡ +OBD2"¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index e7fac5b5..5895ffc1 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.2.5 at Sun Aug 10 22:03:53 2014. */ +/* Generated by nanopb-0.2.5 at Mon Aug 11 23:26:24 2014. */ #include "openxc.pb.h" @@ -22,9 +22,10 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[3] = { +const pb_field_t openxc_ControlCommand_fields[4] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticRequest_fields), + PB_FIELD2( 3, ENUM , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, action, diagnostic_request, 0), PB_LAST_FIELD }; @@ -35,7 +36,7 @@ const pb_field_t openxc_CommandResponse_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticRequest_fields[11] = { +const pb_field_t openxc_DiagnosticRequest_fields[10] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticRequest, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, message_id, bus, 0), PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, mode, message_id, 0), @@ -45,7 +46,6 @@ const pb_field_t openxc_DiagnosticRequest_fields[11] = { PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, multiple_responses, 0), PB_FIELD2( 8, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), PB_FIELD2( 9, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, decoded_type, name, 0), - PB_FIELD2( 10, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, action, decoded_type, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 40993335..b8b60574 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.2.5 at Sun Aug 10 22:03:53 2014. */ +/* Generated by nanopb-0.2.5 at Mon Aug 11 23:26:24 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -24,16 +24,16 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3 } openxc_ControlCommand_Type; +typedef enum _openxc_ControlCommand_Action { + openxc_ControlCommand_Action_ADD = 1, + openxc_ControlCommand_Action_CANCEL = 2 +} openxc_ControlCommand_Action; + typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, openxc_DiagnosticRequest_DecodedType_OBD2 = 2 } openxc_DiagnosticRequest_DecodedType; -typedef enum _openxc_DiagnosticRequest_Action { - openxc_DiagnosticRequest_Action_ADD = 1, - openxc_DiagnosticRequest_Action_CANCEL = 3 -} openxc_DiagnosticRequest_Action; - typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_STRING = 1, openxc_DynamicField_Type_NUM = 2, @@ -83,8 +83,6 @@ typedef struct _openxc_DiagnosticRequest { char name[10]; bool has_decoded_type; openxc_DiagnosticRequest_DecodedType decoded_type; - bool has_action; - openxc_DiagnosticRequest_Action action; } openxc_DiagnosticRequest; typedef struct { @@ -141,6 +139,8 @@ typedef struct _openxc_ControlCommand { openxc_ControlCommand_Type type; bool has_diagnostic_request; openxc_DiagnosticRequest diagnostic_request; + bool has_action; + openxc_ControlCommand_Action action; } openxc_ControlCommand; typedef struct _openxc_TranslatedMessage { @@ -184,7 +184,6 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_frequency_tag 7 #define openxc_DiagnosticRequest_name_tag 8 #define openxc_DiagnosticRequest_decoded_type_tag 9 -#define openxc_DiagnosticRequest_action_tag 10 #define openxc_DiagnosticResponse_bus_tag 1 #define openxc_DiagnosticResponse_message_id_tag 2 #define openxc_DiagnosticResponse_mode_tag 3 @@ -202,6 +201,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_data_tag 3 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 +#define openxc_ControlCommand_action_tag 3 #define openxc_TranslatedMessage_type_tag 1 #define openxc_TranslatedMessage_name_tag 2 #define openxc_TranslatedMessage_value_tag 3 @@ -216,9 +216,9 @@ 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_ControlCommand_fields[3]; +extern const pb_field_t openxc_ControlCommand_fields[4]; extern const pb_field_t openxc_CommandResponse_fields[4]; -extern const pb_field_t openxc_DiagnosticRequest_fields[11]; +extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; extern const pb_field_t openxc_DynamicField_fields[5]; extern const pb_field_t openxc_TranslatedMessage_fields[5]; @@ -228,7 +228,7 @@ extern const pb_field_t openxc_TranslatedMessage_fields[5]; #define openxc_RawMessage_size 27 #define openxc_ControlCommand_size 82 #define openxc_CommandResponse_size 139 -#define openxc_DiagnosticRequest_size 74 +#define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 #define openxc_TranslatedMessage_size 350 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 1465301e..e331fcce 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2069,6 +2069,16 @@ public final class BinaryMessages { * optional .openxc.DiagnosticRequest diagnostic_request = 2; */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder(); + + // optional .openxc.ControlCommand.Action action = 3; + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + boolean hasAction(); + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + com.openxc.BinaryMessages.ControlCommand.Action getAction(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2145,6 +2155,17 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; break; } + case 24: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Action value = com.openxc.BinaryMessages.ControlCommand.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + action_ = value; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2275,6 +2296,88 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) } + /** + * Protobuf enum {@code openxc.ControlCommand.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ADD = 1; + */ + ADD(0, 1), + /** + * CANCEL = 2; + */ + CANCEL(1, 2), + ; + + /** + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + /** + * CANCEL = 2; + */ + public static final int CANCEL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static Action valueOf(int value) { + switch (value) { + case 1: return ADD; + case 2: return CANCEL; + 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 Action findValueByNumber(int number) { + return Action.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.ControlCommand.getDescriptor().getEnumTypes().get(1); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Action) + } + private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; @@ -2314,9 +2417,26 @@ public final class BinaryMessages { return diagnosticRequest_; } + // optional .openxc.ControlCommand.Action action = 3; + public static final int ACTION_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.ControlCommand.Action action_; + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public com.openxc.BinaryMessages.ControlCommand.Action getAction() { + return action_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2336,6 +2456,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, diagnosticRequest_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, action_.getNumber()); + } getUnknownFields().writeTo(output); } @@ -2353,6 +2476,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, diagnosticRequest_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, action_.getNumber()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2478,6 +2605,8 @@ public final class BinaryMessages { diagnosticRequestBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -2518,6 +2647,10 @@ public final class BinaryMessages { } else { result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.action_ = action_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2540,6 +2673,9 @@ public final class BinaryMessages { if (other.hasDiagnosticRequest()) { mergeDiagnosticRequest(other.getDiagnosticRequest()); } + if (other.hasAction()) { + setAction(other.getAction()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2720,6 +2856,42 @@ public final class BinaryMessages { return diagnosticRequestBuilder_; } + // optional .openxc.ControlCommand.Action action = 3; + private com.openxc.BinaryMessages.ControlCommand.Action action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public com.openxc.BinaryMessages.ControlCommand.Action getAction() { + return action_; + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public Builder setAction(com.openxc.BinaryMessages.ControlCommand.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000004); + action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -3480,16 +3652,6 @@ public final class BinaryMessages { * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); - - // optional .openxc.DiagnosticRequest.Action action = 10; - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - boolean hasAction(); - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - com.openxc.BinaryMessages.DiagnosticRequest.Action getAction(); } /** * Protobuf type {@code openxc.DiagnosticRequest} @@ -3593,17 +3755,6 @@ public final class BinaryMessages { } break; } - case 80: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticRequest.Action value = com.openxc.BinaryMessages.DiagnosticRequest.Action.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(10, rawValue); - } else { - bitField0_ |= 0x00000200; - action_ = value; - } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3725,88 +3876,6 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) } - /** - * Protobuf enum {@code openxc.DiagnosticRequest.Action} - */ - public enum Action - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ADD = 1; - */ - ADD(0, 1), - /** - * CANCEL = 3; - */ - CANCEL(1, 3), - ; - - /** - * ADD = 1; - */ - public static final int ADD_VALUE = 1; - /** - * CANCEL = 3; - */ - public static final int CANCEL_VALUE = 3; - - - public final int getNumber() { return value; } - - public static Action valueOf(int value) { - switch (value) { - case 1: return ADD; - case 3: return CANCEL; - 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 Action findValueByNumber(int number) { - return Action.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.DiagnosticRequest.getDescriptor().getEnumTypes().get(1); - } - - private static final Action[] VALUES = values(); - - public static Action 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 Action(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.Action) - } - private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -3989,22 +4058,6 @@ public final class BinaryMessages { return decodedType_; } - // optional .openxc.DiagnosticRequest.Action action = 10; - public static final int ACTION_FIELD_NUMBER = 10; - private com.openxc.BinaryMessages.DiagnosticRequest.Action action_; - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { - return action_; - } - private void initFields() { bus_ = 0; messageId_ = 0; @@ -4015,7 +4068,6 @@ public final class BinaryMessages { frequency_ = 0D; name_ = ""; decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4056,9 +4108,6 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeEnum(9, decodedType_.getNumber()); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeEnum(10, action_.getNumber()); - } getUnknownFields().writeTo(output); } @@ -4104,10 +4153,6 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeEnumSize(9, decodedType_.getNumber()); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, action_.getNumber()); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -4242,8 +4287,6 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; bitField0_ = (bitField0_ & ~0x00000100); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; - bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4308,10 +4351,6 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000100; } result.decodedType_ = decodedType_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.action_ = action_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4357,9 +4396,6 @@ public final class BinaryMessages { if (other.hasDecodedType()) { setDecodedType(other.getDecodedType()); } - if (other.hasAction()) { - setAction(other.getAction()); - } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4751,42 +4787,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DiagnosticRequest.Action action = 10; - private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { - return action_; - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public Builder setAction(com.openxc.BinaryMessages.DiagnosticRequest.Action value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - action_ = value; - onChanged(); - return this; - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public Builder clearAction() { - bitField0_ = (bitField0_ & ~0x00000200); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; - onChanged(); - return this; - } - // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } @@ -7742,37 +7742,37 @@ public final class BinaryMessages { "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\"\246\001\n\016ControlCommand\022)\n\004type\030\001 " + + "data\030\003 \001(\014\"\364\001\n\016ControlCommand\022)\n\004type\030\001 " + "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" + "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" + - "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + - "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"]\n\017CommandResponse\022)" + - "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" + - "e\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\316\002\n\021D" + - "iagnosticRequest\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" + - "payload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(" + - "\010\022\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014de" + - "coded_type\030\t \001(\0162%.openxc.DiagnosticRequ" + - "est.DecodedType\0220\n\006action\030\n \001(\0162 .openxc" + - ".DiagnosticRequest.Action\"!\n\013DecodedType" + - "\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022" + - "\n\n\006CANCEL\020\003\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + - "s\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\007success\030\005 \001(\010\022\036\n\026negat", - "ive_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.DynamicField.Type\022\024\n\014str" + - "ing_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\021TranslatedMessa" + - "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + - "age.Type\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.ope" + - "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003", - "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + - "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + - "enxcB\016BinaryMessages" + "Request\022-\n\006action\030\003 \001(\0162\035.openxc.Control" + + "Command.Action\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tD" + + "EVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\035\n\006Action\022\007\n\003" + + "ADD\020\001\022\n\n\006CANCEL\020\002\"]\n\017CommandResponse\022)\n\004" + + "type\030\001 \001(\0162\033.openxc.ControlCommand.Type\022", + "\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Dia" + + "gnosticRequest\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\007pa" + + "yload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022" + + "\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014deco" + + "ded_type\030\t \001(\0162%.openxc.DiagnosticReques" + + "t.DecodedType\"!\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\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\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.openxc.DynamicField.Type\022\024\n\014string" + + "_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rb" + + "oolean_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.ope" + + "nxc.DynamicField\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\013EVEN" + + "TED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openx" + + "cB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7796,7 +7796,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "Action", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_CommandResponse_fieldAccessorTable = new @@ -7808,7 +7808,7 @@ public final class BinaryMessages { 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", "Action", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 15a6486a..8d0a7975 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\"\xa6\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"]\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\"\xce\x02\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\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\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\";\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\"\xf4\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12-\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1d.openxc.ControlCommand.Action\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"]\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') @@ -71,50 +71,50 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=609, - serialized_end=659, + serialized_start=656, + serialized_end=706, ) -_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( - name='DecodedType', - full_name='openxc.DiagnosticRequest.DecodedType', +_CONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( + name='Action', + full_name='openxc.ControlCommand.Action', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='NONE', index=0, number=1, + name='ADD', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='OBD2', index=1, number=2, + name='CANCEL', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1027, - serialized_end=1060, + serialized_start=708, + serialized_end=737, ) -_DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( - name='Action', - full_name='openxc.DiagnosticRequest.Action', +_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( + name='DecodedType', + full_name='openxc.DiagnosticRequest.DecodedType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='ADD', index=0, number=1, + name='NONE', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='CANCEL', index=1, number=3, + name='OBD2', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1062, - serialized_end=1091, + serialized_start=1055, + serialized_end=1088, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -138,8 +138,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1383, - serialized_end=1420, + serialized_start=1380, + serialized_end=1417, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +175,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1578, - serialized_end=1670, + serialized_start=1575, + serialized_end=1667, ) @@ -307,18 +307,26 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='action', full_name='openxc.ControlCommand.action', index=2, + number=3, 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=[ _CONTROLCOMMAND_TYPE, + _CONTROLCOMMAND_ACTION, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=659, + serialized_end=737, ) @@ -359,8 +367,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=661, - serialized_end=754, + serialized_start=739, + serialized_end=832, ) @@ -434,26 +442,18 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( - name='action', full_name='openxc.DiagnosticRequest.action', index=9, - number=10, 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=[ _DIAGNOSTICREQUEST_DECODEDTYPE, - _DIAGNOSTICREQUEST_ACTION, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=757, - serialized_end=1091, + serialized_start=835, + serialized_end=1088, ) @@ -529,8 +529,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1094, - serialized_end=1255, + serialized_start=1091, + serialized_end=1252, ) @@ -579,8 +579,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1258, - serialized_end=1420, + serialized_start=1255, + serialized_end=1417, ) @@ -629,8 +629,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1423, - serialized_end=1670, + serialized_start=1420, + serialized_end=1667, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -642,12 +642,12 @@ _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPON _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST +_CONTROLCOMMAND.fields_by_name['action'].enum_type = _CONTROLCOMMAND_ACTION _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; +_CONTROLCOMMAND_ACTION.containing_type = _CONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE -_DIAGNOSTICREQUEST.fields_by_name['action'].enum_type = _DIAGNOSTICREQUEST_ACTION _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; -_DIAGNOSTICREQUEST_ACTION.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 071f2f25..937fe186 100644 --- a/openxc.proto +++ b/openxc.proto @@ -23,9 +23,11 @@ message RawMessage { message ControlCommand { enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; } + enum Action { ADD = 1; CANCEL = 2; } optional Type type = 1; optional DiagnosticRequest diagnostic_request = 2; + optional Action action = 3; } message CommandResponse { @@ -36,7 +38,6 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } - enum Action { ADD = 1; CANCEL = 3; } optional int32 bus = 1; optional uint32 message_id = 2; @@ -49,7 +50,6 @@ message DiagnosticRequest { optional double frequency = 7; optional string name = 8; optional DecodedType decoded_type = 9; - optional Action action = 10; } message DiagnosticResponse { -- cgit 1.2.3-korg From 625dae730013a4c59a1bd0bacc1f743676274e24 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 20 Sep 2014 21:47:09 -0400 Subject: Add passthrough command and refactor commands in binary format. The ControlCommand is now more like a VehicleMessage - it has a 'type' and many optional fields pointing to the various types. If the type is diagnostic, the client should look at the diagnostic_request field. --- README.md | 27 + gen/cpp/openxc.pb | 26 +- gen/cpp/openxc.pb.c | 22 +- gen/cpp/openxc.pb.h | 65 +- gen/java/com/openxc/BinaryMessages.java | 2074 +++++++++++++++++++++++++------ gen/python/openxc_pb2.py | 180 ++- openxc.proto | 30 +- 7 files changed, 1980 insertions(+), 444 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index dd5651ed..feb40c44 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,33 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. { "command_response": "device_id", "message": "0012345678"} +#### Passthrough CAN Mode + +The `passthrough` command controls the passthrough mode for each of the CAN +buses. There are three passthrough modes: + +* `off` - Only the specified simple vehicle messages are processed and output + from the VI. +* `filtered` - If the CAN acceptance filter is not otherwise disabled, only the + pre-defined CAN messages (i.e. those compiled with the firmware) will be + output in the low-level CAN format from VI. +* `unfiltered` - All received CAN messages will be passed through from the bus + to the VI's output. + +**Request** + + { "command": "passthrough" + "bus": 1, + "mode": + } + +**Response** + +If the bus and mode in the request were recognized, the `status` field in the +response will be `true`. If `false`, the passthrough mode was not changed. + + { "command_response": "passthrough", "status": true} + ### Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index e2d67115..aa302360 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -¡ +ƒ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,20 +21,32 @@ RawMessage bus ( message_id (  -data ( "ô +data ( "‡ ControlCommand) -type (2.openxc.ControlCommand.Type5 -diagnostic_request ( 2.openxc.DiagnosticRequest- -action (2.openxc.ControlCommand.Action"2 +type (2.openxc.ControlCommand.Type< +diagnostic_request ( 2 .openxc.DiagnosticControlCommandG +passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommand"C Type VERSION DEVICE_ID -DIAGNOSTIC" +DIAGNOSTIC + PASSTHROUGH"ž +DiagnosticControlCommand* +request ( 2.openxc.DiagnosticRequest7 +action (2'.openxc.DiagnosticControlCommand.Action" Action ADD -CANCEL"] +CANCEL"« +PassthroughModeControlCommand +bus (C +mode (25.openxc.PassthroughModeControlCommand.PassthroughMode"8 +PassthroughMode +OFF +FILTERED + +UNFILTERED"] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 5895ffc1..8f9fc19c 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.2.5 at Mon Aug 11 23:26:24 2014. */ +/* Generated by nanopb-0.2.5 at Sat Sep 20 21:48:43 2014. */ #include "openxc.pb.h" @@ -24,8 +24,20 @@ const pb_field_t openxc_RawMessage_fields[4] = { const pb_field_t openxc_ControlCommand_fields[4] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), - PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticRequest_fields), - PB_FIELD2( 3, ENUM , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, action, diagnostic_request, 0), + PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), + PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), + PB_LAST_FIELD +}; + +const pb_field_t openxc_DiagnosticControlCommand_fields[3] = { + PB_FIELD2( 1, MESSAGE , OPTIONAL, STATIC , FIRST, openxc_DiagnosticControlCommand, request, request, &openxc_DiagnosticRequest_fields), + PB_FIELD2( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticControlCommand, action, request, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_PassthroughModeControlCommand_fields[3] = { + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_PassthroughModeControlCommand, bus, bus, 0), + PB_FIELD2( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_PassthroughModeControlCommand, mode, bus, 0), PB_LAST_FIELD }; @@ -80,11 +92,11 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { /* Check that field information fits in pb_field_t */ #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif /* On some platforms (such as AVR), double is really float. diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index b8b60574..48002b14 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.2.5 at Mon Aug 11 23:26:24 2014. */ +/* Generated by nanopb-0.2.5 at Sat Sep 20 21:48:43 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -21,13 +21,20 @@ typedef enum _openxc_VehicleMessage_Type { typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, openxc_ControlCommand_Type_DEVICE_ID = 2, - openxc_ControlCommand_Type_DIAGNOSTIC = 3 + openxc_ControlCommand_Type_DIAGNOSTIC = 3, + openxc_ControlCommand_Type_PASSTHROUGH = 4 } openxc_ControlCommand_Type; -typedef enum _openxc_ControlCommand_Action { - openxc_ControlCommand_Action_ADD = 1, - openxc_ControlCommand_Action_CANCEL = 2 -} openxc_ControlCommand_Action; +typedef enum _openxc_DiagnosticControlCommand_Action { + openxc_DiagnosticControlCommand_Action_ADD = 1, + openxc_DiagnosticControlCommand_Action_CANCEL = 2 +} openxc_DiagnosticControlCommand_Action; + +typedef enum _openxc_PassthroughModeControlCommand_PassthroughMode { + openxc_PassthroughModeControlCommand_PassthroughMode_OFF = 1, + openxc_PassthroughModeControlCommand_PassthroughMode_FILTERED = 2, + openxc_PassthroughModeControlCommand_PassthroughMode_UNFILTERED = 3 +} openxc_PassthroughModeControlCommand_PassthroughMode; typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, @@ -120,6 +127,13 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; +typedef struct _openxc_PassthroughModeControlCommand { + bool has_bus; + int32_t bus; + bool has_mode; + openxc_PassthroughModeControlCommand_PassthroughMode mode; +} openxc_PassthroughModeControlCommand; + typedef struct { size_t size; uint8_t bytes[8]; @@ -134,14 +148,12 @@ typedef struct _openxc_RawMessage { openxc_RawMessage_data_t data; } openxc_RawMessage; -typedef struct _openxc_ControlCommand { - bool has_type; - openxc_ControlCommand_Type type; - bool has_diagnostic_request; - openxc_DiagnosticRequest diagnostic_request; +typedef struct _openxc_DiagnosticControlCommand { + bool has_request; + openxc_DiagnosticRequest request; bool has_action; - openxc_ControlCommand_Action action; -} openxc_ControlCommand; + openxc_DiagnosticControlCommand_Action action; +} openxc_DiagnosticControlCommand; typedef struct _openxc_TranslatedMessage { bool has_type; @@ -154,6 +166,15 @@ typedef struct _openxc_TranslatedMessage { openxc_DynamicField event; } openxc_TranslatedMessage; +typedef struct _openxc_ControlCommand { + bool has_type; + openxc_ControlCommand_Type type; + bool has_diagnostic_request; + openxc_DiagnosticControlCommand diagnostic_request; + bool has_passthrough_mode_request; + openxc_PassthroughModeControlCommand passthrough_mode_request; +} openxc_ControlCommand; + typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; @@ -196,16 +217,20 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_string_value_tag 2 #define openxc_DynamicField_numeric_value_tag 3 #define openxc_DynamicField_boolean_value_tag 4 +#define openxc_PassthroughModeControlCommand_bus_tag 1 +#define openxc_PassthroughModeControlCommand_mode_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 -#define openxc_ControlCommand_type_tag 1 -#define openxc_ControlCommand_diagnostic_request_tag 2 -#define openxc_ControlCommand_action_tag 3 +#define openxc_DiagnosticControlCommand_request_tag 1 +#define openxc_DiagnosticControlCommand_action_tag 2 #define openxc_TranslatedMessage_type_tag 1 #define openxc_TranslatedMessage_name_tag 2 #define openxc_TranslatedMessage_value_tag 3 #define openxc_TranslatedMessage_event_tag 4 +#define openxc_ControlCommand_type_tag 1 +#define openxc_ControlCommand_diagnostic_request_tag 2 +#define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -217,6 +242,8 @@ typedef struct _openxc_VehicleMessage { extern const pb_field_t openxc_VehicleMessage_fields[7]; extern const pb_field_t openxc_RawMessage_fields[4]; extern const pb_field_t openxc_ControlCommand_fields[4]; +extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; +extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -224,9 +251,11 @@ 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 672 +#define openxc_VehicleMessage_size 693 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 82 +#define openxc_ControlCommand_size 103 +#define openxc_DiagnosticControlCommand_size 76 +#define openxc_PassthroughModeControlCommand_size 17 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index e331fcce..31e3249f 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2056,29 +2056,33 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - // optional .openxc.DiagnosticRequest diagnostic_request = 2; + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ boolean hasDiagnosticRequest(); /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ - com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest(); + com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest(); /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ - com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder(); + com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder(); - // optional .openxc.ControlCommand.Action action = 3; + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ - boolean hasAction(); + boolean hasPassthroughModeRequest(); + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest(); /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ - com.openxc.BinaryMessages.ControlCommand.Action getAction(); + com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2143,11 +2147,11 @@ public final class BinaryMessages { break; } case 18: { - com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = diagnosticRequest_.toBuilder(); } - diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); + diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticControlCommand.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(diagnosticRequest_); diagnosticRequest_ = subBuilder.buildPartial(); @@ -2155,15 +2159,17 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; break; } - case 24: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Action value = com.openxc.BinaryMessages.ControlCommand.Action.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - action_ = value; + case 26: { + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = passthroughModeRequest_.toBuilder(); + } + passthroughModeRequest_ = input.readMessage(com.openxc.BinaryMessages.PassthroughModeControlCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(passthroughModeRequest_); + passthroughModeRequest_ = subBuilder.buildPartial(); } + bitField0_ |= 0x00000004; break; } } @@ -2222,6 +2228,10 @@ public final class BinaryMessages { * DIAGNOSTIC = 3; */ DIAGNOSTIC(2, 3), + /** + * PASSTHROUGH = 4; + */ + PASSTHROUGH(3, 4), ; /** @@ -2236,6 +2246,10 @@ public final class BinaryMessages { * DIAGNOSTIC = 3; */ public static final int DIAGNOSTIC_VALUE = 3; + /** + * PASSTHROUGH = 4; + */ + public static final int PASSTHROUGH_VALUE = 4; public final int getNumber() { return value; } @@ -2245,6 +2259,7 @@ public final class BinaryMessages { case 1: return VERSION; case 2: return DEVICE_ID; case 3: return DIAGNOSTIC; + case 4: return PASSTHROUGH; default: return null; } } @@ -2296,88 +2311,6 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) } - /** - * Protobuf enum {@code openxc.ControlCommand.Action} - */ - public enum Action - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ADD = 1; - */ - ADD(0, 1), - /** - * CANCEL = 2; - */ - CANCEL(1, 2), - ; - - /** - * ADD = 1; - */ - public static final int ADD_VALUE = 1; - /** - * CANCEL = 2; - */ - public static final int CANCEL_VALUE = 2; - - - public final int getNumber() { return value; } - - public static Action valueOf(int value) { - switch (value) { - case 1: return ADD; - case 2: return CANCEL; - 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 Action findValueByNumber(int number) { - return Action.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.ControlCommand.getDescriptor().getEnumTypes().get(1); - } - - private static final Action[] VALUES = values(); - - public static Action 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 Action(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Action) - } - private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; @@ -2395,48 +2328,1545 @@ public final class BinaryMessages { return type_; } - // optional .openxc.DiagnosticRequest diagnostic_request = 2; + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; - private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_; + private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { + return diagnosticRequest_; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { + 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_; + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public boolean hasPassthroughModeRequest() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { + return passthroughModeRequest_; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { + return passthroughModeRequest_; + } + + private void initFields() { + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, diagnosticRequest_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, passthroughModeRequest_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, diagnosticRequest_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, passthroughModeRequest_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.ControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDiagnosticRequestFieldBuilder(); + getPassthroughModeRequestFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bitField0_ = (bitField0_ & ~0x00000001); + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } else { + passthroughModeRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.ControlCommand build() { + com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.ControlCommand buildPartial() { + com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (diagnosticRequestBuilder_ == null) { + result.diagnosticRequest_ = diagnosticRequest_; + } else { + result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (passthroughModeRequestBuilder_ == null) { + result.passthroughModeRequest_ = passthroughModeRequest_; + } else { + result.passthroughModeRequest_ = passthroughModeRequestBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.ControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { + if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasDiagnosticRequest()) { + mergeDiagnosticRequest(other.getDiagnosticRequest()); + } + if (other.hasPassthroughModeRequest()) { + mergePassthroughModeRequest(other.getPassthroughModeRequest()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + 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; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public com.openxc.BinaryMessages.ControlCommand.Type getType() { + return type_; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + onChanged(); + 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_; + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public boolean hasDiagnosticRequest() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + return diagnosticRequest_; + } else { + return diagnosticRequestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { + if (diagnosticRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diagnosticRequest_ = value; + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder setDiagnosticRequest( + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder builderForValue) { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = builderForValue.build(); + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { + if (diagnosticRequestBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) { + diagnosticRequest_ = + com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); + } else { + diagnosticRequest_ = value; + } + onChanged(); + } else { + diagnosticRequestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder clearDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + onChanged(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Builder getDiagnosticRequestBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDiagnosticRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { + if (diagnosticRequestBuilder_ != null) { + return diagnosticRequestBuilder_.getMessageOrBuilder(); + } else { + return diagnosticRequest_; + } + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> + getDiagnosticRequestFieldBuilder() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder>( + diagnosticRequest_, + getParentForChildren(), + isClean()); + diagnosticRequest_ = null; + } + 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_; + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public boolean hasPassthroughModeRequest() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { + if (passthroughModeRequestBuilder_ == null) { + return passthroughModeRequest_; + } else { + return passthroughModeRequestBuilder_.getMessage(); + } + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder setPassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { + if (passthroughModeRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + passthroughModeRequest_ = value; + onChanged(); + } else { + passthroughModeRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder setPassthroughModeRequest( + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder builderForValue) { + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequest_ = builderForValue.build(); + onChanged(); + } else { + passthroughModeRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder mergePassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { + if (passthroughModeRequestBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + passthroughModeRequest_ != com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) { + passthroughModeRequest_ = + com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder(passthroughModeRequest_).mergeFrom(value).buildPartial(); + } else { + passthroughModeRequest_ = value; + } + onChanged(); + } else { + passthroughModeRequestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder clearPassthroughModeRequest() { + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + onChanged(); + } else { + passthroughModeRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder getPassthroughModeRequestBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPassthroughModeRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { + if (passthroughModeRequestBuilder_ != null) { + return passthroughModeRequestBuilder_.getMessageOrBuilder(); + } else { + return passthroughModeRequest_; + } + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> + getPassthroughModeRequestFieldBuilder() { + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder>( + passthroughModeRequest_, + getParentForChildren(), + isClean()); + passthroughModeRequest_ = null; + } + return passthroughModeRequestBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) + } + + static { + defaultInstance = new ControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.ControlCommand) + } + + public interface DiagnosticControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.DiagnosticRequest request = 1; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + boolean hasRequest(); + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + com.openxc.BinaryMessages.DiagnosticRequest getRequest(); + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder(); + + // optional .openxc.DiagnosticControlCommand.Action action = 2; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + boolean hasAction(); + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction(); + } + /** + * Protobuf type {@code openxc.DiagnosticControlCommand} + */ + public static final class DiagnosticControlCommand extends + com.google.protobuf.GeneratedMessage + implements DiagnosticControlCommandOrBuilder { + // Use DiagnosticControlCommand.newBuilder() to construct. + private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private DiagnosticControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final DiagnosticControlCommand defaultInstance; + public static DiagnosticControlCommand getDefaultInstance() { + return defaultInstance; + } + + public DiagnosticControlCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DiagnosticControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = request_.toBuilder(); + } + request_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + action_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiagnosticControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.DiagnosticControlCommand.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ADD = 1; + */ + ADD(0, 1), + /** + * CANCEL = 2; + */ + CANCEL(1, 2), + ; + + /** + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + /** + * CANCEL = 2; + */ + public static final int CANCEL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static Action valueOf(int value) { + switch (value) { + case 1: return ADD; + case 2: return CANCEL; + 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 Action findValueByNumber(int number) { + return Action.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.DiagnosticControlCommand.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticControlCommand.Action) + } + + private int bitField0_; + // optional .openxc.DiagnosticRequest request = 1; + public static final int REQUEST_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.DiagnosticRequest request_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { + return request_; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { + return request_; + } + + // optional .openxc.DiagnosticControlCommand.Action action = 2; + public static final int ACTION_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { + return action_; + } + + private void initFields() { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, request_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, action_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, request_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, action_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.DiagnosticControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRequestFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (requestBuilder_ == null) { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + } else { + requestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.DiagnosticControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.DiagnosticControlCommand build() { + com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.DiagnosticControlCommand buildPartial() { + com.openxc.BinaryMessages.DiagnosticControlCommand result = new com.openxc.BinaryMessages.DiagnosticControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.action_ = action_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.DiagnosticControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.DiagnosticControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticControlCommand other) { + if (other == com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) return this; + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.hasAction()) { + setAction(other.getAction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + 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_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { + if (requestBuilder_ == null) { + return request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest( + com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + request_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { + request_ = + com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(request_).mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + onChanged(); + } else { + requestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_; + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + 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; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { + return action_; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000002); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) + } + + static { + defaultInstance = new DiagnosticControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + } + + public interface PassthroughModeControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + /** + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + */ + boolean hasMode(); + /** + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + */ + com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode(); + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class PassthroughModeControlCommand extends + com.google.protobuf.GeneratedMessage + implements PassthroughModeControlCommandOrBuilder { + // Use PassthroughModeControlCommand.newBuilder() to construct. + private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final PassthroughModeControlCommand defaultInstance; + public static PassthroughModeControlCommand getDefaultInstance() { + return defaultInstance; + } + + public PassthroughModeControlCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PassthroughModeControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + mode_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PassthroughModeControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PassthroughModeControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.PassthroughModeControlCommand.PassthroughMode} + */ + public enum PassthroughMode + implements com.google.protobuf.ProtocolMessageEnum { + /** + * OFF = 1; + */ + OFF(0, 1), + /** + * FILTERED = 2; + */ + FILTERED(1, 2), + /** + * UNFILTERED = 3; + */ + UNFILTERED(2, 3), + ; + + /** + * OFF = 1; + */ + public static final int OFF_VALUE = 1; + /** + * FILTERED = 2; + */ + public static final int FILTERED_VALUE = 2; + /** + * UNFILTERED = 3; + */ + public static final int UNFILTERED_VALUE = 3; + + + public final int getNumber() { return value; } + + public static PassthroughMode valueOf(int value) { + switch (value) { + case 1: return OFF; + case 2: return FILTERED; + case 3: return UNFILTERED; + 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 PassthroughMode findValueByNumber(int number) { + return PassthroughMode.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.PassthroughModeControlCommand.getDescriptor().getEnumTypes().get(0); + } + + private static final PassthroughMode[] VALUES = values(); + + public static PassthroughMode 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 PassthroughMode(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.PassthroughModeControlCommand.PassthroughMode) + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; */ - public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { - return diagnosticRequest_; + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional int32 bus = 1; */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { - return diagnosticRequest_; + public int getBus() { + return bus_; } - // optional .openxc.ControlCommand.Action action = 3; - public static final int ACTION_FIELD_NUMBER = 3; - private com.openxc.BinaryMessages.ControlCommand.Action action_; + // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + public static final int MODE_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_; /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public boolean hasAction() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public boolean hasMode() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public com.openxc.BinaryMessages.ControlCommand.Action getAction() { - return action_; + public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { + return mode_; } private void initFields() { - type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + bus_ = 0; + mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2451,13 +3881,10 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); + output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, diagnosticRequest_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, action_.getNumber()); + output.writeEnum(2, mode_.getNumber()); } getUnknownFields().writeTo(output); } @@ -2470,15 +3897,11 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); + .computeInt32Size(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, diagnosticRequest_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, action_.getNumber()); + .computeEnumSize(2, mode_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2492,53 +3915,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2547,7 +3970,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2559,24 +3982,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.ControlCommand} + * Protobuf type {@code openxc.PassthroughModeControlCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2588,7 +4011,6 @@ public final class BinaryMessages { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDiagnosticRequestFieldBuilder(); } } private static Builder create() { @@ -2597,16 +4019,10 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - } else { - diagnosticRequestBuilder_.clear(); - } + mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; bitField0_ = (bitField0_ & ~0x00000002); - action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -2616,65 +4032,54 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.ControlCommand build() { - com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.ControlCommand buildPartial() { - com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.type_ = type_; + result.bus_ = bus_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (diagnosticRequestBuilder_ == null) { - result.diagnosticRequest_ = diagnosticRequest_; - } else { - result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.action_ = action_; + result.mode_ = mode_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.ControlCommand) { - return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); + if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { - if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasDiagnosticRequest()) { - mergeDiagnosticRequest(other.getDiagnosticRequest()); + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { + if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); } - if (other.hasAction()) { - setAction(other.getAction()); + if (other.hasMode()) { + setMode(other.getMode()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2688,11 +4093,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2703,204 +4108,84 @@ 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 int32 bus = 1; + private int bus_ ; /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public boolean hasType() { + public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public com.openxc.BinaryMessages.ControlCommand.Type getType() { - return type_; + public int getBus() { + return bus_; } /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setBus(int value) { bitField0_ |= 0x00000001; - type_ = value; + bus_ = value; onChanged(); return this; } /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public Builder clearType() { + public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bus_ = 0; onChanged(); return this; } - // optional .openxc.DiagnosticRequest diagnostic_request = 2; - private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_; + // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public boolean hasDiagnosticRequest() { + public boolean hasMode() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { - if (diagnosticRequestBuilder_ == null) { - return diagnosticRequest_; - } else { - return diagnosticRequestBuilder_.getMessage(); - } - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (diagnosticRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - diagnosticRequest_ = value; - onChanged(); - } else { - diagnosticRequestBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder setDiagnosticRequest( - com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = builderForValue.build(); - onChanged(); - } else { - diagnosticRequestBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (diagnosticRequestBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { - diagnosticRequest_ = - com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); - } else { - diagnosticRequest_ = value; - } - onChanged(); - } else { - diagnosticRequestBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder clearDiagnosticRequest() { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - onChanged(); - } else { - diagnosticRequestBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDiagnosticRequestFieldBuilder().getBuilder(); - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { - if (diagnosticRequestBuilder_ != null) { - return diagnosticRequestBuilder_.getMessageOrBuilder(); - } else { - return diagnosticRequest_; - } - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> - getDiagnosticRequestFieldBuilder() { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - diagnosticRequest_, - getParentForChildren(), - isClean()); - diagnosticRequest_ = null; - } - return diagnosticRequestBuilder_; - } - - // optional .openxc.ControlCommand.Action action = 3; - private com.openxc.BinaryMessages.ControlCommand.Action action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; - /** - * optional .openxc.ControlCommand.Action action = 3; - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public com.openxc.BinaryMessages.ControlCommand.Action getAction() { - return action_; + public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { + return mode_; } /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public Builder setAction(com.openxc.BinaryMessages.ControlCommand.Action value) { + public Builder setMode(com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - action_ = value; + bitField0_ |= 0x00000002; + mode_ = value; onChanged(); return this; } /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public Builder clearAction() { - bitField0_ = (bitField0_ & ~0x00000004); - action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000002); + mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) } static { - defaultInstance = new ControlCommand(true); + defaultInstance = new PassthroughModeControlCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.ControlCommand) + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } public interface CommandResponseOrBuilder @@ -7696,6 +8981,16 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_ControlCommand_fieldAccessorTable; + private static 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 + internal_static_openxc_PassthroughModeControlCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -7742,37 +9037,46 @@ public final class BinaryMessages { "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\"\364\001\n\016ControlCommand\022)\n\004type\030\001 " + - "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" + - "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" + - "Request\022-\n\006action\030\003 \001(\0162\035.openxc.Control" + - "Command.Action\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tD" + - "EVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\035\n\006Action\022\007\n\003" + - "ADD\020\001\022\n\n\006CANCEL\020\002\"]\n\017CommandResponse\022)\n\004" + - "type\030\001 \001(\0162\033.openxc.ControlCommand.Type\022", - "\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Dia" + - "gnosticRequest\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\007pa" + - "yload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022" + - "\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014deco" + - "ded_type\030\t \001(\0162%.openxc.DiagnosticReques" + - "t.DecodedType\"!\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\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\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.openxc.DynamicField.Type\022\024\n\014string" + - "_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rb" + - "oolean_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.ope" + - "nxc.DynamicField\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\013EVEN" + - "TED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openx" + - "cB\016BinaryMessages" + "data\030\003 \001(\014\"\207\002\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\"C\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + + "D\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\"\236\001\n" + + "\030DiagnosticControlCommand\022*\n\007request\030\001 \001", + "(\0132\031.openxc.DiagnosticRequest\0227\n\006action\030" + + "\002 \001(\0162\'.openxc.DiagnosticControlCommand." + + "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"\253\001" + + "\n\035PassthroughModeControlCommand\022\013\n\003bus\030\001" + + " \001(\005\022C\n\004mode\030\002 \001(\01625.openxc.PassthroughM" + + "odeControlCommand.PassthroughMode\"8\n\017Pas" + + "sthroughMode\022\007\n\003OFF\020\001\022\014\n\010FILTERED\020\002\022\016\n\nU" + + "NFILTERED\020\003\"]\n\017CommandResponse\022)\n\004type\030\001" + + " \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007mes" + + "sage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagnosti", + "cRequest\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\tfre" + + "quency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_ty" + + "pe\030\t \001(\0162%.openxc.DiagnosticRequest.Deco" + + "dedType\"!\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\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\007success\030\005 \001(\010\022\036\n\026negative_respo" + + "nse_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.DynamicField.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\004typ" + + "e\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.Dy" + + "namicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dynam" + + "icField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004" + + "BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NU", + "M\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bin" + + "aryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7796,33 +9100,45 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "Action", }); - internal_static_openxc_CommandResponse_descriptor = + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", }); + 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", "Mode", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(5); 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(4); + getDescriptor().getMessageTypes().get(6); 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(5); + getDescriptor().getMessageTypes().get(7); 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(6); + getDescriptor().getMessageTypes().get(8); 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_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 8d0a7975..38be6b4a 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\"\xf4\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12-\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1d.openxc.ControlCommand.Action\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"]\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\";\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\"\x87\x02\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\"C\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\"\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\"\xab\x01\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.openxc.PassthroughModeControlCommand.PassthroughMode\"8\n\x0fPassthroughMode\x12\x07\n\x03OFF\x10\x01\x12\x0c\n\x08\x46ILTERED\x10\x02\x12\x0e\n\nUNFILTERED\x10\x03\"]\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') @@ -68,16 +68,20 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='PASSTHROUGH', index=3, number=4, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=656, - serialized_end=706, + serialized_start=689, + serialized_end=756, ) -_CONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( +_DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( name='Action', - full_name='openxc.ControlCommand.Action', + full_name='openxc.DiagnosticControlCommand.Action', filename=None, file=DESCRIPTOR, values=[ @@ -92,8 +96,33 @@ _CONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=708, - serialized_end=737, + serialized_start=888, + serialized_end=917, +) + +_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE = _descriptor.EnumDescriptor( + name='PassthroughMode', + full_name='openxc.PassthroughModeControlCommand.PassthroughMode', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='OFF', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FILTERED', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UNFILTERED', index=2, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1035, + serialized_end=1091, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -113,8 +142,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1055, - serialized_end=1088, + serialized_start=1409, + serialized_end=1442, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -138,8 +167,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1380, - serialized_end=1417, + serialized_start=1734, + serialized_end=1771, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +204,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1575, - serialized_end=1667, + serialized_start=1929, + serialized_end=2021, ) @@ -308,9 +337,9 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='action', full_name='openxc.ControlCommand.action', index=2, - number=3, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=1, + name='passthrough_mode_request', full_name='openxc.ControlCommand.passthrough_mode_request', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -320,13 +349,84 @@ _CONTROLCOMMAND = _descriptor.Descriptor( nested_types=[], enum_types=[ _CONTROLCOMMAND_TYPE, - _CONTROLCOMMAND_ACTION, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=737, + serialized_end=756, +) + + +_DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( + name='DiagnosticControlCommand', + full_name='openxc.DiagnosticControlCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='request', full_name='openxc.DiagnosticControlCommand.request', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='action', full_name='openxc.DiagnosticControlCommand.action', index=1, + number=2, 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=[ + _DIAGNOSTICCONTROLCOMMAND_ACTION, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=759, + serialized_end=917, +) + + +_PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( + name='PassthroughModeControlCommand', + full_name='openxc.PassthroughModeControlCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.PassthroughModeControlCommand.bus', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='mode', full_name='openxc.PassthroughModeControlCommand.mode', index=1, + number=2, 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=[ + _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=920, + serialized_end=1091, ) @@ -367,8 +467,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=739, - serialized_end=832, + serialized_start=1093, + serialized_end=1186, ) @@ -452,8 +552,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=835, - serialized_end=1088, + serialized_start=1189, + serialized_end=1442, ) @@ -529,8 +629,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1091, - serialized_end=1252, + serialized_start=1445, + serialized_end=1606, ) @@ -579,8 +679,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1255, - serialized_end=1417, + serialized_start=1609, + serialized_end=1771, ) @@ -629,8 +729,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1420, - serialized_end=1667, + serialized_start=1774, + serialized_end=2021, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -641,10 +741,14 @@ _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE -_CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST -_CONTROLCOMMAND.fields_by_name['action'].enum_type = _CONTROLCOMMAND_ACTION +_CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND +_CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; -_CONTROLCOMMAND_ACTION.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; +_PASSTHROUGHMODECONTROLCOMMAND.fields_by_name['mode'].enum_type = _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE +_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE.containing_type = _PASSTHROUGHMODECONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; @@ -657,6 +761,8 @@ _TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND +DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND +DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -681,6 +787,18 @@ class ControlCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.ControlCommand) +class DiagnosticControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + +class PassthroughModeControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index 937fe186..fd61b6c8 100644 --- a/openxc.proto +++ b/openxc.proto @@ -22,12 +22,34 @@ message RawMessage { } message ControlCommand { - enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; } - enum Action { ADD = 1; CANCEL = 2; } + enum Type { + VERSION = 1; + DEVICE_ID = 2; + DIAGNOSTIC = 3; + PASSTHROUGH = 4; + } optional Type type = 1; - optional DiagnosticRequest diagnostic_request = 2; - optional Action action = 3; + optional DiagnosticControlCommand diagnostic_request = 2; + optional PassthroughModeControlCommand passthrough_mode_request = 3; +} + +message DiagnosticControlCommand { + enum Action { ADD = 1; CANCEL = 2; } + + optional DiagnosticRequest request = 1; + optional Action action = 2; +} + +message PassthroughModeControlCommand { + enum PassthroughMode { + OFF = 1; + FILTERED = 2; + UNFILTERED = 3; + } + + optional int32 bus = 1; + optional PassthroughMode mode = 2; } message CommandResponse { -- cgit 1.2.3-korg From ef7c7dc0afab46f0e2e5eb8b051e769fb7a1a6b5 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 20 Sep 2014 22:56:37 -0400 Subject: Simplify passthrough command to just a boolean. --- README.md | 18 +-- gen/cpp/openxc.pb | 13 +- gen/cpp/openxc.pb.c | 4 +- gen/cpp/openxc.pb.h | 24 ++-- gen/java/com/openxc/BinaryMessages.java | 229 +++++++++----------------------- gen/python/openxc_pb2.py | 72 +++------- openxc.proto | 8 +- 7 files changed, 108 insertions(+), 260 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index feb40c44..258fb532 100644 --- a/README.md +++ b/README.md @@ -281,22 +281,18 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. #### Passthrough CAN Mode -The `passthrough` command controls the passthrough mode for each of the CAN -buses. There are three passthrough modes: - -* `off` - Only the specified simple vehicle messages are processed and output - from the VI. -* `filtered` - If the CAN acceptance filter is not otherwise disabled, only the - pre-defined CAN messages (i.e. those compiled with the firmware) will be - output in the low-level CAN format from VI. -* `unfiltered` - All received CAN messages will be passed through from the bus - to the VI's output. +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, - "mode": + "enabled": true } **Response** diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index aa302360..90fe8778 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -ƒ +” openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -38,15 +38,10 @@ DIAGNOSTIC Action ADD -CANCEL"« +CANCEL"= PassthroughModeControlCommand -bus (C -mode (25.openxc.PassthroughModeControlCommand.PassthroughMode"8 -PassthroughMode -OFF -FILTERED - -UNFILTERED"] +bus ( +enabled ("] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 2ca5768c..f11ad592 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 Sat Sep 20 21:59:09 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 20 22:56:34 2014. */ #include "openxc.pb.h" @@ -41,7 +41,7 @@ const pb_field_t openxc_DiagnosticControlCommand_fields[3] = { const pb_field_t openxc_PassthroughModeControlCommand_fields[3] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_PassthroughModeControlCommand, bus, bus, 0), - PB_FIELD( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_PassthroughModeControlCommand, mode, bus, 0), + PB_FIELD( 2, BOOL , OPTIONAL, STATIC , OTHER, openxc_PassthroughModeControlCommand, enabled, bus, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 555a672e..4c86b880 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 Sat Sep 20 21:59:09 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 20 22:56:34 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -34,12 +34,6 @@ typedef enum _openxc_DiagnosticControlCommand_Action { openxc_DiagnosticControlCommand_Action_CANCEL = 2 } openxc_DiagnosticControlCommand_Action; -typedef enum _openxc_PassthroughModeControlCommand_PassthroughMode { - openxc_PassthroughModeControlCommand_PassthroughMode_OFF = 1, - openxc_PassthroughModeControlCommand_PassthroughMode_FILTERED = 2, - openxc_PassthroughModeControlCommand_PassthroughMode_UNFILTERED = 3 -} openxc_PassthroughModeControlCommand_PassthroughMode; - typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, openxc_DiagnosticRequest_DecodedType_OBD2 = 2 @@ -128,8 +122,8 @@ typedef struct _openxc_DynamicField { typedef struct _openxc_PassthroughModeControlCommand { bool has_bus; int32_t bus; - bool has_mode; - openxc_PassthroughModeControlCommand_PassthroughMode mode; + bool has_enabled; + bool enabled; } openxc_PassthroughModeControlCommand; typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; @@ -192,7 +186,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} #define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_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, (openxc_PassthroughModeControlCommand_PassthroughMode)0} +#define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} #define openxc_CommandResponse_init_default {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -202,7 +196,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} #define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_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, (openxc_PassthroughModeControlCommand_PassthroughMode)0} +#define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} #define openxc_CommandResponse_init_zero {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -235,7 +229,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_numeric_value_tag 3 #define openxc_DynamicField_boolean_value_tag 4 #define openxc_PassthroughModeControlCommand_bus_tag 1 -#define openxc_PassthroughModeControlCommand_mode_tag 2 +#define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -268,11 +262,11 @@ 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 693 +#define openxc_VehicleMessage_size 689 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 103 +#define openxc_ControlCommand_size 99 #define openxc_DiagnosticControlCommand_size 76 -#define openxc_PassthroughModeControlCommand_size 17 +#define openxc_PassthroughModeControlCommand_size 13 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 31e3249f..4d83a4d9 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3624,15 +3624,15 @@ public final class BinaryMessages { */ int getBus(); - // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + // optional bool enabled = 2; /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - boolean hasMode(); + boolean hasEnabled(); /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode(); + boolean getEnabled(); } /** * Protobuf type {@code openxc.PassthroughModeControlCommand} @@ -3691,14 +3691,8 @@ public final class BinaryMessages { break; } case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - mode_ = value; - } + bitField0_ |= 0x00000002; + enabled_ = input.readBool(); break; } } @@ -3740,97 +3734,6 @@ public final class BinaryMessages { return PARSER; } - /** - * Protobuf enum {@code openxc.PassthroughModeControlCommand.PassthroughMode} - */ - public enum PassthroughMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - * OFF = 1; - */ - OFF(0, 1), - /** - * FILTERED = 2; - */ - FILTERED(1, 2), - /** - * UNFILTERED = 3; - */ - UNFILTERED(2, 3), - ; - - /** - * OFF = 1; - */ - public static final int OFF_VALUE = 1; - /** - * FILTERED = 2; - */ - public static final int FILTERED_VALUE = 2; - /** - * UNFILTERED = 3; - */ - public static final int UNFILTERED_VALUE = 3; - - - public final int getNumber() { return value; } - - public static PassthroughMode valueOf(int value) { - switch (value) { - case 1: return OFF; - case 2: return FILTERED; - case 3: return UNFILTERED; - 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 PassthroughMode findValueByNumber(int number) { - return PassthroughMode.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.PassthroughModeControlCommand.getDescriptor().getEnumTypes().get(0); - } - - private static final PassthroughMode[] VALUES = values(); - - public static PassthroughMode 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 PassthroughMode(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.PassthroughModeControlCommand.PassthroughMode) - } - private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -3848,25 +3751,25 @@ public final class BinaryMessages { return bus_; } - // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; - public static final int MODE_FIELD_NUMBER = 2; - private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_; + // optional bool enabled = 2; + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_; /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public boolean hasMode() { + public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { - return mode_; + public boolean getEnabled() { + return enabled_; } private void initFields() { bus_ = 0; - mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + enabled_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3884,7 +3787,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, mode_.getNumber()); + output.writeBool(2, enabled_); } getUnknownFields().writeTo(output); } @@ -3901,7 +3804,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, mode_.getNumber()); + .computeBoolSize(2, enabled_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4021,7 +3924,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + enabled_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4058,7 +3961,7 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.mode_ = mode_; + result.enabled_ = enabled_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4078,8 +3981,8 @@ public final class BinaryMessages { if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasMode()) { - setMode(other.getMode()); + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4141,38 +4044,35 @@ public final class BinaryMessages { return this; } - // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; - private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + // optional bool enabled = 2; + private boolean enabled_ ; /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public boolean hasMode() { + public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { - return mode_; + public boolean getEnabled() { + return enabled_; } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public Builder setMode(com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setEnabled(boolean value) { bitField0_ |= 0x00000002; - mode_ = value; + enabled_ = value; onChanged(); return this; } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public Builder clearMode() { + public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000002); - mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + enabled_ = false; onChanged(); return this; } @@ -9047,36 +8947,33 @@ public final class BinaryMessages { "\030DiagnosticControlCommand\022*\n\007request\030\001 \001", "(\0132\031.openxc.DiagnosticRequest\0227\n\006action\030" + "\002 \001(\0162\'.openxc.DiagnosticControlCommand." + - "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"\253\001" + - "\n\035PassthroughModeControlCommand\022\013\n\003bus\030\001" + - " \001(\005\022C\n\004mode\030\002 \001(\01625.openxc.PassthroughM" + - "odeControlCommand.PassthroughMode\"8\n\017Pas" + - "sthroughMode\022\007\n\003OFF\020\001\022\014\n\010FILTERED\020\002\022\016\n\nU" + - "NFILTERED\020\003\"]\n\017CommandResponse\022)\n\004type\030\001" + - " \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007mes" + - "sage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagnosti", - "cRequest\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\tfre" + - "quency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_ty" + - "pe\030\t \001(\0162%.openxc.DiagnosticRequest.Deco" + - "dedType\"!\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\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\007success\030\005 \001(\010\022\036\n\026negative_respo" + - "nse_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.DynamicField.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\004typ" + - "e\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.Dy" + - "namicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dynam" + - "icField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004" + - "BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NU", - "M\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bin" + - "aryMessages" + "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n" + + "\035PassthroughModeControlCommand\022\013\n\003bus\030\001 " + + "\001(\005\022\017\n\007enabled\030\002 \001(\010\"]\n\017CommandResponse\022" + + ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + + "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + + "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + + "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + + "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + + "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + + "s\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\007success\030\005 \001(\010\022\036\n\026negat" + + "ive_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.DynamicField.Type\022\024\n\014str" + + "ing_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\021TranslatedMessa" + + "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + + "age.Type\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.ope" + + "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + + "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + + "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + + "enxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -9112,7 +9009,7 @@ public final class BinaryMessages { internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PassthroughModeControlCommand_descriptor, - new java.lang.String[] { "Bus", "Mode", }); + new java.lang.String[] { "Bus", "Enabled", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_CommandResponse_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 38be6b4a..d5f50ad2 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\"\x87\x02\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\"C\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\"\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\"\xab\x01\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.openxc.PassthroughModeControlCommand.PassthroughMode\"8\n\x0fPassthroughMode\x12\x07\n\x03OFF\x10\x01\x12\x0c\n\x08\x46ILTERED\x10\x02\x12\x0e\n\nUNFILTERED\x10\x03\"]\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\";\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\"\x87\x02\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\"C\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\"\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\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') @@ -100,31 +100,6 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( serialized_end=917, ) -_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE = _descriptor.EnumDescriptor( - name='PassthroughMode', - full_name='openxc.PassthroughModeControlCommand.PassthroughMode', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='OFF', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='FILTERED', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='UNFILTERED', index=2, number=3, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1035, - serialized_end=1091, -) - _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( name='DecodedType', full_name='openxc.DiagnosticRequest.DecodedType', @@ -142,8 +117,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1409, - serialized_end=1442, + serialized_start=1298, + serialized_end=1331, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -167,8 +142,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1734, - serialized_end=1771, + serialized_start=1623, + serialized_end=1660, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -204,8 +179,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1929, - serialized_end=2021, + serialized_start=1818, + serialized_end=1910, ) @@ -409,9 +384,9 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='mode', full_name='openxc.PassthroughModeControlCommand.mode', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=1, + name='enabled', full_name='openxc.PassthroughModeControlCommand.enabled', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -420,13 +395,12 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=920, - serialized_end=1091, + serialized_start=919, + serialized_end=980, ) @@ -467,8 +441,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1093, - serialized_end=1186, + serialized_start=982, + serialized_end=1075, ) @@ -552,8 +526,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1189, - serialized_end=1442, + serialized_start=1078, + serialized_end=1331, ) @@ -629,8 +603,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1445, - serialized_end=1606, + serialized_start=1334, + serialized_end=1495, ) @@ -679,8 +653,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1609, - serialized_end=1771, + serialized_start=1498, + serialized_end=1660, ) @@ -729,8 +703,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1774, - serialized_end=2021, + serialized_start=1663, + serialized_end=1910, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -747,8 +721,6 @@ _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; -_PASSTHROUGHMODECONTROLCOMMAND.fields_by_name['mode'].enum_type = _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE -_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE.containing_type = _PASSTHROUGHMODECONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; diff --git a/openxc.proto b/openxc.proto index fd61b6c8..1be1df8a 100644 --- a/openxc.proto +++ b/openxc.proto @@ -42,14 +42,8 @@ message DiagnosticControlCommand { } message PassthroughModeControlCommand { - enum PassthroughMode { - OFF = 1; - FILTERED = 2; - UNFILTERED = 3; - } - optional int32 bus = 1; - optional PassthroughMode mode = 2; + optional bool enabled = 2; } message CommandResponse { -- cgit 1.2.3-korg From 31c5f5de1980a68159b116090cee0072c47365da Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 18:41:24 -0400 Subject: Add a control command to control AF bypass status. See openxc/vi-firmware#301. --- README.md | 30 +- gen/cpp/openxc.pb | 15 +- gen/cpp/openxc.pb.c | 15 +- gen/cpp/openxc.pb.h | 31 +- gen/java/com/openxc/BinaryMessages.java | 1183 ++++++++++++++++++++++++------- gen/python/openxc_pb2.py | 106 ++- openxc.proto | 7 + 7 files changed, 1098 insertions(+), 289 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index e1523ab4..daed2935 100644 --- a/README.md +++ b/README.md @@ -297,11 +297,37 @@ forwarded. **Response** -If the bus and mode in the request were recognized, the `status` field in the -response will be `true`. If `false`, the passthrough mode was not changed. +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} + ### Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 90fe8778..c4000c36 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -” +Á openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,17 +21,19 @@ RawMessage bus ( message_id (  -data ( "‡ +data ( "ö ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG -passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommand"C +passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO + acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand"a Type VERSION DEVICE_ID DIAGNOSTIC - PASSTHROUGH"ž + PASSTHROUGH +ACCEPTANCE_FILTER_BYPASS"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -41,7 +43,10 @@ DIAGNOSTIC CANCEL"= PassthroughModeControlCommand bus ( -enabled ("] +enabled ("< +AcceptanceFilterBypassCommand +bus ( +bypass ("] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index f11ad592..6799e99b 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 Sat Sep 20 22:56:34 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:18:56 2014. */ #include "openxc.pb.h" @@ -26,10 +26,11 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[4] = { +const pb_field_t openxc_ControlCommand_fields[5] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), PB_LAST_FIELD }; @@ -45,6 +46,12 @@ const pb_field_t openxc_PassthroughModeControlCommand_fields[3] = { PB_LAST_FIELD }; +const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3] = { + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_AcceptanceFilterBypassCommand, bus, bus, 0), + PB_FIELD( 2, BOOL , OPTIONAL, STATIC , OTHER, openxc_AcceptanceFilterBypassCommand, bypass, bus, 0), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -103,7 +110,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -114,7 +121,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 4c86b880..f3efb782 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 Sat Sep 20 22:56:34 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:18:56 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -26,7 +26,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, openxc_ControlCommand_Type_DEVICE_ID = 2, openxc_ControlCommand_Type_DIAGNOSTIC = 3, - openxc_ControlCommand_Type_PASSTHROUGH = 4 + openxc_ControlCommand_Type_PASSTHROUGH = 4, + openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -55,6 +56,13 @@ typedef enum _openxc_TranslatedMessage_Type { } openxc_TranslatedMessage_Type; /* Struct definitions */ +typedef struct _openxc_AcceptanceFilterBypassCommand { + bool has_bus; + int32_t bus; + bool has_bypass; + bool bypass; +} openxc_AcceptanceFilterBypassCommand; + typedef struct _openxc_CommandResponse { bool has_type; openxc_ControlCommand_Type type; @@ -162,6 +170,8 @@ typedef struct _openxc_ControlCommand { openxc_DiagnosticControlCommand diagnostic_request; bool has_passthrough_mode_request; openxc_PassthroughModeControlCommand passthrough_mode_request; + bool has_acceptance_filter_bypass_command; + openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -184,9 +194,10 @@ 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_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default} +#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} #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} +#define openxc_AcceptanceFilterBypassCommand_init_default {false, 0, false, 0} #define openxc_CommandResponse_init_default {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -194,9 +205,10 @@ typedef struct _openxc_VehicleMessage { #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_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero} +#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} #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} +#define openxc_AcceptanceFilterBypassCommand_init_zero {false, 0, false, 0} #define openxc_CommandResponse_init_zero {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -204,6 +216,8 @@ typedef struct _openxc_VehicleMessage { #define openxc_TranslatedMessage_init_zero {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ +#define openxc_AcceptanceFilterBypassCommand_bus_tag 1 +#define openxc_AcceptanceFilterBypassCommand_bypass_tag 2 #define openxc_CommandResponse_type_tag 1 #define openxc_CommandResponse_message_tag 2 #define openxc_CommandResponse_status_tag 3 @@ -242,6 +256,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 +#define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -252,9 +267,10 @@ 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_ControlCommand_fields[4]; +extern const pb_field_t openxc_ControlCommand_fields[5]; extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; +extern const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3]; extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -262,11 +278,12 @@ 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 689 +#define openxc_VehicleMessage_size 704 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 99 +#define openxc_ControlCommand_size 114 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 +#define openxc_AcceptanceFilterBypassCommand_size 13 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 4d83a4d9..e46cab69 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2083,6 +2083,20 @@ public final class BinaryMessages { * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); + + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + boolean hasAcceptanceFilterBypassCommand(); + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand(); + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2172,6 +2186,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; break; } + case 34: { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = acceptanceFilterBypassCommand_.toBuilder(); + } + acceptanceFilterBypassCommand_ = input.readMessage(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acceptanceFilterBypassCommand_); + acceptanceFilterBypassCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2232,6 +2259,10 @@ public final class BinaryMessages { * PASSTHROUGH = 4; */ PASSTHROUGH(3, 4), + /** + * ACCEPTANCE_FILTER_BYPASS = 5; + */ + ACCEPTANCE_FILTER_BYPASS(4, 5), ; /** @@ -2250,6 +2281,10 @@ public final class BinaryMessages { * PASSTHROUGH = 4; */ public static final int PASSTHROUGH_VALUE = 4; + /** + * ACCEPTANCE_FILTER_BYPASS = 5; + */ + public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; public final int getNumber() { return value; } @@ -2260,6 +2295,7 @@ public final class BinaryMessages { case 2: return DEVICE_ID; case 3: return DIAGNOSTIC; case 4: return PASSTHROUGH; + case 5: return ACCEPTANCE_FILTER_BYPASS; default: return null; } } @@ -2372,10 +2408,33 @@ 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_; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public boolean hasAcceptanceFilterBypassCommand() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { + return acceptanceFilterBypassCommand_; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { + return acceptanceFilterBypassCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2398,6 +2457,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, passthroughModeRequest_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, acceptanceFilterBypassCommand_); + } getUnknownFields().writeTo(output); } @@ -2419,6 +2481,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, passthroughModeRequest_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, acceptanceFilterBypassCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2529,6 +2595,7 @@ public final class BinaryMessages { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getDiagnosticRequestFieldBuilder(); getPassthroughModeRequestFieldBuilder(); + getAcceptanceFilterBypassCommandFieldBuilder(); } } private static Builder create() { @@ -2551,6 +2618,12 @@ public final class BinaryMessages { passthroughModeRequestBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + } else { + acceptanceFilterBypassCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -2599,6 +2672,14 @@ public final class BinaryMessages { } else { result.passthroughModeRequest_ = passthroughModeRequestBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (acceptanceFilterBypassCommandBuilder_ == null) { + result.acceptanceFilterBypassCommand_ = acceptanceFilterBypassCommand_; + } else { + result.acceptanceFilterBypassCommand_ = acceptanceFilterBypassCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2624,6 +2705,9 @@ public final class BinaryMessages { if (other.hasPassthroughModeRequest()) { mergePassthroughModeRequest(other.getPassthroughModeRequest()); } + if (other.hasAcceptanceFilterBypassCommand()) { + mergeAcceptanceFilterBypassCommand(other.getAcceptanceFilterBypassCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2921,6 +3005,123 @@ 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_; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public boolean hasAcceptanceFilterBypassCommand() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { + if (acceptanceFilterBypassCommandBuilder_ == null) { + return acceptanceFilterBypassCommand_; + } else { + return acceptanceFilterBypassCommandBuilder_.getMessage(); + } + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder setAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { + if (acceptanceFilterBypassCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceptanceFilterBypassCommand_ = value; + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder setAcceptanceFilterBypassCommand( + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder builderForValue) { + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommand_ = builderForValue.build(); + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder mergeAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { + if (acceptanceFilterBypassCommandBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + acceptanceFilterBypassCommand_ != com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) { + acceptanceFilterBypassCommand_ = + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder(acceptanceFilterBypassCommand_).mergeFrom(value).buildPartial(); + } else { + acceptanceFilterBypassCommand_ = value; + } + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder clearAcceptanceFilterBypassCommand() { + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder getAcceptanceFilterBypassCommandBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getAcceptanceFilterBypassCommandFieldBuilder().getBuilder(); + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { + if (acceptanceFilterBypassCommandBuilder_ != null) { + return acceptanceFilterBypassCommandBuilder_.getMessageOrBuilder(); + } else { + return acceptanceFilterBypassCommand_; + } + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> + getAcceptanceFilterBypassCommandFieldBuilder() { + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder>( + acceptanceFilterBypassCommand_, + getParentForChildren(), + isClean()); + acceptanceFilterBypassCommand_ = null; + } + return acceptanceFilterBypassCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -3432,11 +3633,575 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; + com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + 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_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { + if (requestBuilder_ == null) { + return request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest( + com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + request_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { + request_ = + com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(request_).mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + onChanged(); + } else { + requestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_; + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + 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; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { + return action_; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000002); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) + } + + static { + defaultInstance = new DiagnosticControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + } + + public interface PassthroughModeControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional bool enabled = 2; + /** + * optional bool enabled = 2; + */ + boolean hasEnabled(); + /** + * optional bool enabled = 2; + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class PassthroughModeControlCommand extends + com.google.protobuf.GeneratedMessage + implements PassthroughModeControlCommandOrBuilder { + // Use PassthroughModeControlCommand.newBuilder() to construct. + private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final PassthroughModeControlCommand defaultInstance; + public static PassthroughModeControlCommand getDefaultInstance() { + return defaultInstance; + } + + public PassthroughModeControlCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PassthroughModeControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + enabled_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PassthroughModeControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PassthroughModeControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional bool enabled = 2; + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_; + /** + * optional bool enabled = 2; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool enabled = 2; + */ + public boolean getEnabled() { + return enabled_; + } + + private void initFields() { + bus_ = 0; + enabled_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, enabled_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.enabled_ = enabled_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { + if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -3447,171 +4212,84 @@ 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_; + // optional int32 bus = 1; + private int bus_ ; /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public boolean hasRequest() { + public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { - if (requestBuilder_ == null) { - return request_; - } else { - return requestBuilder_.getMessage(); - } - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (requestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - request_ = value; - onChanged(); - } else { - requestBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public Builder setRequest( - com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { - if (requestBuilder_ == null) { - request_ = builderForValue.build(); - onChanged(); - } else { - requestBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; + public int getBus() { + return bus_; } /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (requestBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - request_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { - request_ = - com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(request_).mergeFrom(value).buildPartial(); - } else { - request_ = value; - } - onChanged(); - } else { - requestBuilder_.mergeFrom(value); - } + public Builder setBus(int value) { bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); return this; } /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public Builder clearRequest() { - if (requestBuilder_ == null) { - request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - onChanged(); - } else { - requestBuilder_.clear(); - } + public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { - bitField0_ |= 0x00000001; + bus_ = 0; onChanged(); - return getRequestFieldBuilder().getBuilder(); - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { - if (requestBuilder_ != null) { - return requestBuilder_.getMessageOrBuilder(); - } else { - return request_; - } - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> - getRequestFieldBuilder() { - if (requestBuilder_ == null) { - requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - request_, - getParentForChildren(), - isClean()); - request_ = null; - } - return requestBuilder_; + return this; } - // optional .openxc.DiagnosticControlCommand.Action action = 2; - private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + // optional bool enabled = 2; + private boolean enabled_ ; /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public boolean hasAction() { + public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { - return action_; + public boolean getEnabled() { + return enabled_; } /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setEnabled(boolean value) { bitField0_ |= 0x00000002; - action_ = value; + enabled_ = value; onChanged(); return this; } /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public Builder clearAction() { + public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000002); - action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + enabled_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) } static { - defaultInstance = new DiagnosticControlCommand(true); + defaultInstance = new PassthroughModeControlCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } - public interface PassthroughModeControlCommandOrBuilder + public interface AcceptanceFilterBypassCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 bus = 1; @@ -3624,35 +4302,35 @@ public final class BinaryMessages { */ int getBus(); - // optional bool enabled = 2; + // optional bool bypass = 2; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - boolean hasEnabled(); + boolean hasBypass(); /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - boolean getEnabled(); + boolean getBypass(); } /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ - public static final class PassthroughModeControlCommand extends + public static final class AcceptanceFilterBypassCommand extends com.google.protobuf.GeneratedMessage - implements PassthroughModeControlCommandOrBuilder { - // Use PassthroughModeControlCommand.newBuilder() to construct. - private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + implements AcceptanceFilterBypassCommandOrBuilder { + // Use AcceptanceFilterBypassCommand.newBuilder() to construct. + private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final PassthroughModeControlCommand defaultInstance; - public static PassthroughModeControlCommand getDefaultInstance() { + private static final AcceptanceFilterBypassCommand defaultInstance; + public static AcceptanceFilterBypassCommand getDefaultInstance() { return defaultInstance; } - public PassthroughModeControlCommand getDefaultInstanceForType() { + public AcceptanceFilterBypassCommand getDefaultInstanceForType() { return defaultInstance; } @@ -3662,7 +4340,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private PassthroughModeControlCommand( + private AcceptanceFilterBypassCommand( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3692,7 +4370,7 @@ public final class BinaryMessages { } case 16: { bitField0_ |= 0x00000002; - enabled_ = input.readBool(); + bypass_ = input.readBool(); break; } } @@ -3709,28 +4387,28 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PassthroughModeControlCommand parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AcceptanceFilterBypassCommand parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PassthroughModeControlCommand(input, extensionRegistry); + return new AcceptanceFilterBypassCommand(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @@ -3751,25 +4429,25 @@ public final class BinaryMessages { return bus_; } - // optional bool enabled = 2; - public static final int ENABLED_FIELD_NUMBER = 2; - private boolean enabled_; + // optional bool bypass = 2; + public static final int BYPASS_FIELD_NUMBER = 2; + private boolean bypass_; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean hasEnabled() { + public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean getEnabled() { - return enabled_; + public boolean getBypass() { + return bypass_; } private void initFields() { bus_ = 0; - enabled_ = false; + bypass_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3787,7 +4465,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, enabled_); + output.writeBool(2, bypass_); } getUnknownFields().writeTo(output); } @@ -3804,7 +4482,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, enabled_); + .computeBoolSize(2, bypass_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3818,53 +4496,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3873,7 +4551,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -3885,24 +4563,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3924,7 +4602,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - enabled_ = false; + bypass_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -3935,23 +4613,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -3961,28 +4639,28 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.enabled_ = enabled_; + result.bypass_ = bypass_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { - return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { + return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { - if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { + if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasEnabled()) { - setEnabled(other.getEnabled()); + if (other.hasBypass()) { + setBypass(other.getBypass()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -3996,11 +4674,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -4044,48 +4722,48 @@ public final class BinaryMessages { return this; } - // optional bool enabled = 2; - private boolean enabled_ ; + // optional bool bypass = 2; + private boolean bypass_ ; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean hasEnabled() { + public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean getEnabled() { - return enabled_; + public boolean getBypass() { + return bypass_; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder setEnabled(boolean value) { + public Builder setBypass(boolean value) { bitField0_ |= 0x00000002; - enabled_ = value; + bypass_ = value; onChanged(); return this; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder clearEnabled() { + public Builder clearBypass() { bitField0_ = (bitField0_ & ~0x00000002); - enabled_ = false; + bypass_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) } static { - defaultInstance = new PassthroughModeControlCommand(true); + defaultInstance = new AcceptanceFilterBypassCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } public interface CommandResponseOrBuilder @@ -8891,6 +9569,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; + private static 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 internal_static_openxc_CommandResponse_descriptor; private static @@ -8937,43 +9620,47 @@ public final class BinaryMessages { "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\"\207\002\n\016ControlCommand\022)\n\004type\030\001 " + + "data\030\003 \001(\014\"\366\002\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\"C\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + - "D\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\"\236\001\n" + - "\030DiagnosticControlCommand\022*\n\007request\030\001 \001", - "(\0132\031.openxc.DiagnosticRequest\0227\n\006action\030" + - "\002 \001(\0162\'.openxc.DiagnosticControlCommand." + - "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n" + - "\035PassthroughModeControlCommand\022\013\n\003bus\030\001 " + - "\001(\005\022\017\n\007enabled\030\002 \001(\010\"]\n\017CommandResponse\022" + - ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + - "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + - "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + - "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + - "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + - "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + - "s\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\007success\030\005 \001(\010\022\036\n\026negat" + - "ive_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.DynamicField.Type\022\024\n\014str" + - "ing_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\021TranslatedMessa" + - "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + - "age.Type\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.ope" + - "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + - "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + - "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + - "enxcB\016BinaryMessages" + "Command\022O\n acceptance_filter_bypass_comm" + + "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + + "sCommand\"a\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\"\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\017Com" + + "mandResponse\022)\n\004type\030\001 \001(\0162\033.openxc.Cont", + "rolCommand.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006stat" + + "us\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\022multiple_" + + "responses\030\006 \001(\010\022\021\n\tfrequency\030\007 \001(\001\022\014\n\004na" + + "me\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\0162%.openxc." + + "DiagnosticRequest.DecodedType\"!\n\013Decoded" + + "Type\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticR" + + "esponse\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\007success\030\005", + " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + + "payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014Dynamic" + + "Field\022\'\n\004type\030\001 \001(\0162\031.openxc.DynamicFiel" + + "d.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\004Ty" + + "pe\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021Tr" + + "anslatedMessage\022,\n\004type\030\001 \001(\0162\036.openxc.T" + + "ranslatedMessage.Type\022\014\n\004name\030\002 \001(\t\022#\n\005v" + + "alue\030\003 \001(\0132\024.openxc.DynamicField\022#\n\005even" + + "t\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\014EVENTED_BOO" + + "L\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -8997,7 +9684,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new @@ -9010,32 +9697,38 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PassthroughModeControlCommand_descriptor, new java.lang.String[] { "Bus", "Enabled", }); - internal_static_openxc_CommandResponse_descriptor = + 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_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(6); 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(6); + getDescriptor().getMessageTypes().get(7); 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(7); + getDescriptor().getMessageTypes().get(8); 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(8); + getDescriptor().getMessageTypes().get(9); 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_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index d5f50ad2..63f7a650 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\"\x87\x02\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\"C\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\"\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\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\";\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\"\xf6\x02\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\"a\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\"\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\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') @@ -72,11 +72,15 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='PASSTHROUGH', index=3, number=4, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='ACCEPTANCE_FILTER_BYPASS', index=4, number=5, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=689, - serialized_end=756, + serialized_start=770, + serialized_end=867, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -96,8 +100,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=888, - serialized_end=917, + serialized_start=999, + serialized_end=1028, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -117,8 +121,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1298, - serialized_end=1331, + serialized_start=1471, + serialized_end=1504, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -142,8 +146,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1623, - serialized_end=1660, + serialized_start=1796, + serialized_end=1833, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -179,8 +183,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1818, - serialized_end=1910, + serialized_start=1991, + serialized_end=2083, ) @@ -318,6 +322,13 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='acceptance_filter_bypass_command', full_name='openxc.ControlCommand.acceptance_filter_bypass_command', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -329,7 +340,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=756, + serialized_end=867, ) @@ -364,8 +375,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=759, - serialized_end=917, + serialized_start=870, + serialized_end=1028, ) @@ -399,8 +410,43 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=919, - serialized_end=980, + serialized_start=1030, + serialized_end=1091, +) + + +_ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( + name='AcceptanceFilterBypassCommand', + full_name='openxc.AcceptanceFilterBypassCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.AcceptanceFilterBypassCommand.bus', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='bypass', full_name='openxc.AcceptanceFilterBypassCommand.bypass', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1093, + serialized_end=1153, ) @@ -441,8 +487,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=982, - serialized_end=1075, + serialized_start=1155, + serialized_end=1248, ) @@ -526,8 +572,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1078, - serialized_end=1331, + serialized_start=1251, + serialized_end=1504, ) @@ -603,8 +649,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1334, - serialized_end=1495, + serialized_start=1507, + serialized_end=1668, ) @@ -653,8 +699,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1498, - serialized_end=1660, + serialized_start=1671, + serialized_end=1833, ) @@ -703,8 +749,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1663, - serialized_end=1910, + serialized_start=1836, + serialized_end=2083, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -717,6 +763,7 @@ _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _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_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION @@ -735,6 +782,7 @@ DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND +DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -771,6 +819,12 @@ class PassthroughModeControlCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) +class AcceptanceFilterBypassCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index 1be1df8a..c7f75913 100644 --- a/openxc.proto +++ b/openxc.proto @@ -27,11 +27,13 @@ message ControlCommand { DEVICE_ID = 2; DIAGNOSTIC = 3; PASSTHROUGH = 4; + ACCEPTANCE_FILTER_BYPASS = 5; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; + optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; } message DiagnosticControlCommand { @@ -46,6 +48,11 @@ message PassthroughModeControlCommand { optional bool enabled = 2; } +message AcceptanceFilterBypassCommand { + optional int32 bus = 1; + optional bool bypass = 2; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 1.2.3-korg From e3162f7da4b6b5ad422bccdb9b2a4e1b144ab9c9 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 19:56:21 -0400 Subject: Add a command to change message format while running. --- README.md | 22 + gen/cpp/openxc.pb | 19 +- gen/cpp/openxc.pb.c | 15 +- gen/cpp/openxc.pb.h | 36 +- gen/java/com/openxc/BinaryMessages.java | 1128 ++++++++++++++++++++++++++----- gen/python/openxc_pb2.py | 134 +++- openxc.proto | 12 + 7 files changed, 1151 insertions(+), 215 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index daed2935..719fb0e8 100644 --- a/README.md +++ b/README.md @@ -328,6 +328,28 @@ changed. { "command_response": "af_bypass", "status": true} +#### Message Format Control + +The `message_format` command determines the format for output data from the VI +and also the expected format of commands sent to the VI. + +Valid formats are `json` and `binary`. + +**Request** + + { "command": "message_format", + "bus": 1, + "format": "json" + } + +**Response** + +If the format was changed successfully, the `status` in the response will be +`true`. The response will be in the new message format. + + { "command_response": "message_format", "status": true} + + ### Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index c4000c36..dfad822b 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Á +œ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,19 +21,21 @@ RawMessage bus ( message_id (  -data ( "ö +data ( "È ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO - acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand"a + acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand< +message_format_command ( 2.openxc.MessageFormatCommand"u Type VERSION DEVICE_ID DIAGNOSTIC PASSTHROUGH -ACCEPTANCE_FILTER_BYPASS"ž +ACCEPTANCE_FILTER_BYPASS +MESSAGE_FORMAT"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -46,7 +48,14 @@ DIAGNOSTIC enabled ("< AcceptanceFilterBypassCommand bus ( -bypass ("] +bypass ("† +MessageFormatCommand +bus (: +format (2*.openxc.MessageFormatCommand.MessageFormat"% + MessageFormat +JSON + +BINARY"] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 39c6a348..3fd1b4ab 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 Sat Sep 27 19:43:38 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:56:19 2014. */ #include "openxc.pb.h" @@ -26,11 +26,12 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[5] = { +const pb_field_t openxc_ControlCommand_fields[6] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), + PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, message_format_command, acceptance_filter_bypass_command, &openxc_MessageFormatCommand_fields), PB_LAST_FIELD }; @@ -52,6 +53,12 @@ const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3] = { PB_LAST_FIELD }; +const pb_field_t openxc_MessageFormatCommand_fields[3] = { + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_MessageFormatCommand, bus, bus, 0), + PB_FIELD( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_MessageFormatCommand, format, bus, 0), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -110,7 +117,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, message_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -121,7 +128,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, message_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 85b711d5..792aa935 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 Sat Sep 27 19:43:38 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:56:19 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -27,7 +27,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DEVICE_ID = 2, openxc_ControlCommand_Type_DIAGNOSTIC = 3, openxc_ControlCommand_Type_PASSTHROUGH = 4, - openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5 + openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, + openxc_ControlCommand_Type_MESSAGE_FORMAT = 6 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -35,6 +36,11 @@ typedef enum _openxc_DiagnosticControlCommand_Action { openxc_DiagnosticControlCommand_Action_CANCEL = 2 } openxc_DiagnosticControlCommand_Action; +typedef enum _openxc_MessageFormatCommand_MessageFormat { + openxc_MessageFormatCommand_MessageFormat_JSON = 1, + openxc_MessageFormatCommand_MessageFormat_BINARY = 2 +} openxc_MessageFormatCommand_MessageFormat; + typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, openxc_DiagnosticRequest_DecodedType_OBD2 = 2 @@ -127,6 +133,13 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; +typedef struct _openxc_MessageFormatCommand { + bool has_bus; + int32_t bus; + bool has_format; + openxc_MessageFormatCommand_MessageFormat format; +} openxc_MessageFormatCommand; + typedef struct _openxc_PassthroughModeControlCommand { bool has_bus; int32_t bus; @@ -172,6 +185,8 @@ typedef struct _openxc_ControlCommand { openxc_PassthroughModeControlCommand passthrough_mode_request; bool has_acceptance_filter_bypass_command; openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; + bool has_message_format_command; + openxc_MessageFormatCommand message_format_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -194,10 +209,11 @@ 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_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default} +#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_MessageFormatCommand_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} #define openxc_AcceptanceFilterBypassCommand_init_default {false, 0, false, 0} +#define openxc_MessageFormatCommand_init_default {false, 0, false, (openxc_MessageFormatCommand_MessageFormat)0} #define openxc_CommandResponse_init_default {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -205,10 +221,11 @@ typedef struct _openxc_VehicleMessage { #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_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero} +#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_MessageFormatCommand_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} #define openxc_AcceptanceFilterBypassCommand_init_zero {false, 0, false, 0} +#define openxc_MessageFormatCommand_init_zero {false, 0, false, (openxc_MessageFormatCommand_MessageFormat)0} #define openxc_CommandResponse_init_zero {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -242,6 +259,8 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_string_value_tag 2 #define openxc_DynamicField_numeric_value_tag 3 #define openxc_DynamicField_boolean_value_tag 4 +#define openxc_MessageFormatCommand_bus_tag 1 +#define openxc_MessageFormatCommand_format_tag 2 #define openxc_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_RawMessage_bus_tag 1 @@ -257,6 +276,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 +#define openxc_ControlCommand_message_format_command_tag 5 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -267,10 +287,11 @@ 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_ControlCommand_fields[5]; +extern const pb_field_t openxc_ControlCommand_fields[6]; extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; extern const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3]; +extern const pb_field_t openxc_MessageFormatCommand_fields[3]; extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -278,12 +299,13 @@ 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 704 +#define openxc_VehicleMessage_size 724 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 114 +#define openxc_ControlCommand_size 133 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 +#define openxc_MessageFormatCommand_size 17 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index e46cab69..7a745c5c 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2097,6 +2097,20 @@ public final class BinaryMessages { * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); + + // optional .openxc.MessageFormatCommand message_format_command = 5; + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + boolean hasMessageFormatCommand(); + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand(); + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2199,6 +2213,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; break; } + case 42: { + com.openxc.BinaryMessages.MessageFormatCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = messageFormatCommand_.toBuilder(); + } + messageFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.MessageFormatCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(messageFormatCommand_); + messageFormatCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2263,6 +2290,10 @@ public final class BinaryMessages { * ACCEPTANCE_FILTER_BYPASS = 5; */ ACCEPTANCE_FILTER_BYPASS(4, 5), + /** + * MESSAGE_FORMAT = 6; + */ + MESSAGE_FORMAT(5, 6), ; /** @@ -2285,6 +2316,10 @@ public final class BinaryMessages { * ACCEPTANCE_FILTER_BYPASS = 5; */ public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; + /** + * MESSAGE_FORMAT = 6; + */ + public static final int MESSAGE_FORMAT_VALUE = 6; public final int getNumber() { return value; } @@ -2296,6 +2331,7 @@ public final class BinaryMessages { case 3: return DIAGNOSTIC; case 4: return PASSTHROUGH; case 5: return ACCEPTANCE_FILTER_BYPASS; + case 6: return MESSAGE_FORMAT; default: return null; } } @@ -2430,11 +2466,34 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } + // optional .openxc.MessageFormatCommand message_format_command = 5; + public static final int MESSAGE_FORMAT_COMMAND_FIELD_NUMBER = 5; + private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_; + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public boolean hasMessageFormatCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { + return messageFormatCommand_; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { + return messageFormatCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2460,6 +2519,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(4, acceptanceFilterBypassCommand_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, messageFormatCommand_); + } getUnknownFields().writeTo(output); } @@ -2485,6 +2547,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, acceptanceFilterBypassCommand_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, messageFormatCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2596,6 +2662,7 @@ public final class BinaryMessages { getDiagnosticRequestFieldBuilder(); getPassthroughModeRequestFieldBuilder(); getAcceptanceFilterBypassCommandFieldBuilder(); + getMessageFormatCommandFieldBuilder(); } } private static Builder create() { @@ -2624,6 +2691,12 @@ public final class BinaryMessages { acceptanceFilterBypassCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + if (messageFormatCommandBuilder_ == null) { + messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + } else { + messageFormatCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -2680,6 +2753,14 @@ public final class BinaryMessages { } else { result.acceptanceFilterBypassCommand_ = acceptanceFilterBypassCommandBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (messageFormatCommandBuilder_ == null) { + result.messageFormatCommand_ = messageFormatCommand_; + } else { + result.messageFormatCommand_ = messageFormatCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2708,6 +2789,9 @@ public final class BinaryMessages { if (other.hasAcceptanceFilterBypassCommand()) { mergeAcceptanceFilterBypassCommand(other.getAcceptanceFilterBypassCommand()); } + if (other.hasMessageFormatCommand()) { + mergeMessageFormatCommand(other.getMessageFormatCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -3122,6 +3206,123 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_; } + // optional .openxc.MessageFormatCommand message_format_command = 5; + private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> messageFormatCommandBuilder_; + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public boolean hasMessageFormatCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { + if (messageFormatCommandBuilder_ == null) { + return messageFormatCommand_; + } else { + return messageFormatCommandBuilder_.getMessage(); + } + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder setMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { + if (messageFormatCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + messageFormatCommand_ = value; + onChanged(); + } else { + messageFormatCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder setMessageFormatCommand( + com.openxc.BinaryMessages.MessageFormatCommand.Builder builderForValue) { + if (messageFormatCommandBuilder_ == null) { + messageFormatCommand_ = builderForValue.build(); + onChanged(); + } else { + messageFormatCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder mergeMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { + if (messageFormatCommandBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + messageFormatCommand_ != com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) { + messageFormatCommand_ = + com.openxc.BinaryMessages.MessageFormatCommand.newBuilder(messageFormatCommand_).mergeFrom(value).buildPartial(); + } else { + messageFormatCommand_ = value; + } + onChanged(); + } else { + messageFormatCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder clearMessageFormatCommand() { + if (messageFormatCommandBuilder_ == null) { + messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + onChanged(); + } else { + messageFormatCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommand.Builder getMessageFormatCommandBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMessageFormatCommandFieldBuilder().getBuilder(); + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { + if (messageFormatCommandBuilder_ != null) { + return messageFormatCommandBuilder_.getMessageOrBuilder(); + } else { + return messageFormatCommand_; + } + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> + getMessageFormatCommandFieldBuilder() { + if (messageFormatCommandBuilder_ == null) { + messageFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder>( + messageFormatCommand_, + getParentForChildren(), + isClean()); + messageFormatCommand_ = null; + } + return messageFormatCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -4054,18 +4255,495 @@ public final class BinaryMessages { throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.enabled_ = enabled_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { + if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 bus = 1; + private int bus_ ; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + /** + * optional int32 bus = 1; + */ + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); + return this; + } + /** + * optional int32 bus = 1; + */ + public Builder clearBus() { + bitField0_ = (bitField0_ & ~0x00000001); + bus_ = 0; + onChanged(); + return this; + } + + // optional bool enabled = 2; + private boolean enabled_ ; + /** + * optional bool enabled = 2; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool enabled = 2; + */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 2; + */ + public Builder setEnabled(boolean value) { + bitField0_ |= 0x00000002; + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 2; + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) + } + + static { + defaultInstance = new PassthroughModeControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + } + + public interface AcceptanceFilterBypassCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional bool bypass = 2; + /** + * optional bool bypass = 2; + */ + boolean hasBypass(); + /** + * optional bool bypass = 2; + */ + boolean getBypass(); + } + /** + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + */ + public static final class AcceptanceFilterBypassCommand extends + com.google.protobuf.GeneratedMessage + implements AcceptanceFilterBypassCommandOrBuilder { + // Use AcceptanceFilterBypassCommand.newBuilder() to construct. + private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AcceptanceFilterBypassCommand defaultInstance; + public static AcceptanceFilterBypassCommand getDefaultInstance() { + return defaultInstance; + } + + public AcceptanceFilterBypassCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AcceptanceFilterBypassCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + bypass_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AcceptanceFilterBypassCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcceptanceFilterBypassCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional bool bypass = 2; + public static final int BYPASS_FIELD_NUMBER = 2; + private boolean bypass_; + /** + * optional bool bypass = 2; + */ + public boolean hasBypass() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool bypass = 2; + */ + public boolean getBypass() { + return bypass_; + } + + private void initFields() { + bus_ = 0; + bypass_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, bypass_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, bypass_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4074,7 +4752,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -4086,24 +4764,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4125,7 +4803,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - enabled_ = false; + bypass_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4136,23 +4814,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -4162,28 +4840,28 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.enabled_ = enabled_; + result.bypass_ = bypass_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { - return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { + return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { - if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { + if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasEnabled()) { - setEnabled(other.getEnabled()); + if (other.hasBypass()) { + setBypass(other.getBypass()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4197,11 +4875,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -4245,51 +4923,51 @@ public final class BinaryMessages { return this; } - // optional bool enabled = 2; - private boolean enabled_ ; + // optional bool bypass = 2; + private boolean bypass_ ; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean hasEnabled() { + public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean getEnabled() { - return enabled_; + public boolean getBypass() { + return bypass_; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder setEnabled(boolean value) { + public Builder setBypass(boolean value) { bitField0_ |= 0x00000002; - enabled_ = value; + bypass_ = value; onChanged(); return this; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder clearEnabled() { + public Builder clearBypass() { bitField0_ = (bitField0_ & ~0x00000002); - enabled_ = false; + bypass_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) } static { - defaultInstance = new PassthroughModeControlCommand(true); + defaultInstance = new AcceptanceFilterBypassCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - public interface AcceptanceFilterBypassCommandOrBuilder + public interface MessageFormatCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 bus = 1; @@ -4302,35 +4980,35 @@ public final class BinaryMessages { */ int getBus(); - // optional bool bypass = 2; + // optional .openxc.MessageFormatCommand.MessageFormat format = 2; /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - boolean hasBypass(); + boolean hasFormat(); /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - boolean getBypass(); + com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat(); } /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + * Protobuf type {@code openxc.MessageFormatCommand} */ - public static final class AcceptanceFilterBypassCommand extends + public static final class MessageFormatCommand extends com.google.protobuf.GeneratedMessage - implements AcceptanceFilterBypassCommandOrBuilder { - // Use AcceptanceFilterBypassCommand.newBuilder() to construct. - private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + implements MessageFormatCommandOrBuilder { + // Use MessageFormatCommand.newBuilder() to construct. + private MessageFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private MessageFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final AcceptanceFilterBypassCommand defaultInstance; - public static AcceptanceFilterBypassCommand getDefaultInstance() { + private static final MessageFormatCommand defaultInstance; + public static MessageFormatCommand getDefaultInstance() { return defaultInstance; } - public AcceptanceFilterBypassCommand getDefaultInstanceForType() { + public MessageFormatCommand getDefaultInstanceForType() { return defaultInstance; } @@ -4340,7 +5018,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private AcceptanceFilterBypassCommand( + private MessageFormatCommand( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4369,8 +5047,14 @@ public final class BinaryMessages { break; } case 16: { - bitField0_ |= 0x00000002; - bypass_ = input.readBool(); + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + format_ = value; + } break; } } @@ -4387,31 +5071,113 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public AcceptanceFilterBypassCommand parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public MessageFormatCommand parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceptanceFilterBypassCommand(input, extensionRegistry); + return new MessageFormatCommand(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } + /** + * Protobuf enum {@code openxc.MessageFormatCommand.MessageFormat} + */ + public enum MessageFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + * JSON = 1; + */ + JSON(0, 1), + /** + * BINARY = 2; + */ + BINARY(1, 2), + ; + + /** + * JSON = 1; + */ + public static final int JSON_VALUE = 1; + /** + * BINARY = 2; + */ + public static final int BINARY_VALUE = 2; + + + public final int getNumber() { return value; } + + public static MessageFormat valueOf(int value) { + switch (value) { + case 1: return JSON; + case 2: return BINARY; + 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 MessageFormat findValueByNumber(int number) { + return MessageFormat.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.MessageFormatCommand.getDescriptor().getEnumTypes().get(0); + } + + private static final MessageFormat[] VALUES = values(); + + public static MessageFormat 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 MessageFormat(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.MessageFormatCommand.MessageFormat) + } + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -4429,25 +5195,25 @@ public final class BinaryMessages { return bus_; } - // optional bool bypass = 2; - public static final int BYPASS_FIELD_NUMBER = 2; - private boolean bypass_; + // optional .openxc.MessageFormatCommand.MessageFormat format = 2; + public static final int FORMAT_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_; /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean hasBypass() { + public boolean hasFormat() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean getBypass() { - return bypass_; + public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + return format_; } private void initFields() { bus_ = 0; - bypass_ = false; + format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4465,7 +5231,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, bypass_); + output.writeEnum(2, format_.getNumber()); } getUnknownFields().writeTo(output); } @@ -4482,7 +5248,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, bypass_); + .computeEnumSize(2, format_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4496,53 +5262,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4551,7 +5317,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.MessageFormatCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -4563,24 +5329,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + * Protobuf type {@code openxc.MessageFormatCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { + implements com.openxc.BinaryMessages.MessageFormatCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.MessageFormatCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4602,7 +5368,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - bypass_ = false; + format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4613,23 +5379,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; } - public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.MessageFormatCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); + public com.openxc.BinaryMessages.MessageFormatCommand build() { + com.openxc.BinaryMessages.MessageFormatCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); + public com.openxc.BinaryMessages.MessageFormatCommand buildPartial() { + com.openxc.BinaryMessages.MessageFormatCommand result = new com.openxc.BinaryMessages.MessageFormatCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -4639,28 +5405,28 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.bypass_ = bypass_; + result.format_ = format_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { - return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); + if (other instanceof com.openxc.BinaryMessages.MessageFormatCommand) { + return mergeFrom((com.openxc.BinaryMessages.MessageFormatCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { - if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.MessageFormatCommand other) { + if (other == com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasBypass()) { - setBypass(other.getBypass()); + if (other.hasFormat()) { + setFormat(other.getFormat()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4674,11 +5440,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; + com.openxc.BinaryMessages.MessageFormatCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.MessageFormatCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -4722,48 +5488,51 @@ public final class BinaryMessages { return this; } - // optional bool bypass = 2; - private boolean bypass_ ; + // optional .openxc.MessageFormatCommand.MessageFormat format = 2; + private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean hasBypass() { + public boolean hasFormat() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean getBypass() { - return bypass_; + public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + return format_; } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public Builder setBypass(boolean value) { + public Builder setFormat(com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value) { + if (value == null) { + throw new NullPointerException(); + } bitField0_ |= 0x00000002; - bypass_ = value; + format_ = value; onChanged(); return this; } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public Builder clearBypass() { + public Builder clearFormat() { bitField0_ = (bitField0_ & ~0x00000002); - bypass_ = false; + format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) + // @@protoc_insertion_point(builder_scope:openxc.MessageFormatCommand) } static { - defaultInstance = new AcceptanceFilterBypassCommand(true); + defaultInstance = new MessageFormatCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) + // @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) } public interface CommandResponseOrBuilder @@ -9574,6 +10343,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_MessageFormatCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_MessageFormatCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -9620,47 +10394,53 @@ public final class BinaryMessages { "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\"\366\002\n\016ControlCommand\022)\n\004type\030\001 " + + "data\030\003 \001(\014\"\310\003\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\"a\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\"\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\017Com" + - "mandResponse\022)\n\004type\030\001 \001(\0162\033.openxc.Cont", - "rolCommand.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006stat" + - "us\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\022multiple_" + - "responses\030\006 \001(\010\022\021\n\tfrequency\030\007 \001(\001\022\014\n\004na" + - "me\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\0162%.openxc." + - "DiagnosticRequest.DecodedType\"!\n\013Decoded" + - "Type\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticR" + - "esponse\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\007success\030\005", - " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + - "payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014Dynamic" + - "Field\022\'\n\004type\030\001 \001(\0162\031.openxc.DynamicFiel" + - "d.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\004Ty" + - "pe\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021Tr" + - "anslatedMessage\022,\n\004type\030\001 \001(\0162\036.openxc.T" + - "ranslatedMessage.Type\022\014\n\004name\030\002 \001(\t\022#\n\005v" + - "alue\030\003 \001(\0132\024.openxc.DynamicField\022#\n\005even" + - "t\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\014EVENTED_BOO" + - "L\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "sCommand\022<\n\026message_format_command\030\005 \001(\013", + "2\034.openxc.MessageFormatCommand\"u\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\016MESSAGE_FORMAT\020\006\"\236\001\n\030Diagno" + + "sticControlCommand\022*\n\007request\030\001 \001(\0132\031.op" + + "enxc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'" + + ".openxc.DiagnosticControlCommand.Action\"" + + "\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passth" + + "roughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007" + + "enabled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassC", + "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"\206\001\n\024" + + "MessageFormatCommand\022\013\n\003bus\030\001 \001(\005\022:\n\006for" + + "mat\030\002 \001(\0162*.openxc.MessageFormatCommand." + + "MessageFormat\"%\n\rMessageFormat\022\010\n\004JSON\020\001" + + "\022\n\n\006BINARY\020\002\"]\n\017CommandResponse\022)\n\004type\030" + + "\001 \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007me" + + "ssage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagnost" + + "icRequest\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\tfr", + "equency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_t" + + "ype\030\t \001(\0162%.openxc.DiagnosticRequest.Dec" + + "odedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD" + + "2\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\003pid" + + "\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_resp" + + "onse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005valu" + + "e\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031" + + ".openxc.DynamicField.Type\022\024\n\014string_valu" + + "e\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolea", + "n_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\004ty" + + "pe\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.D" + + "ynamicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dyna" + + "micField\"\\\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_N" + + "UM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bi" + + "naryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -9684,7 +10464,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "MessageFormatCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new @@ -9703,32 +10483,38 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, new java.lang.String[] { "Bus", "Bypass", }); - internal_static_openxc_CommandResponse_descriptor = + internal_static_openxc_MessageFormatCommand_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_openxc_MessageFormatCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_MessageFormatCommand_descriptor, + new java.lang.String[] { "Bus", "Format", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(7); 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(7); + getDescriptor().getMessageTypes().get(8); 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(8); + getDescriptor().getMessageTypes().get(9); 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(9); + getDescriptor().getMessageTypes().get(10); 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_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 63f7a650..5488b5bb 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\"\xf6\x02\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\"a\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\"\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\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\";\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\"\xc8\x03\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\x16message_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.MessageFormatCommand\"u\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\x0eMESSAGE_FORMAT\x10\x06\"\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\"\x86\x01\n\x14MessageFormatCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12:\n\x06\x66ormat\x18\x02 \x01(\x0e\x32*.openxc.MessageFormatCommand.MessageFormat\"%\n\rMessageFormat\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06\x42INARY\x10\x02\"]\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') @@ -76,11 +76,15 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='ACCEPTANCE_FILTER_BYPASS', index=4, number=5, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='MESSAGE_FORMAT', index=5, number=6, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=770, - serialized_end=867, + serialized_start=832, + serialized_end=949, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -100,8 +104,29 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=999, - serialized_end=1028, + serialized_start=1081, + serialized_end=1110, +) + +_MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor( + name='MessageFormat', + full_name='openxc.MessageFormatCommand.MessageFormat', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='JSON', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BINARY', index=1, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1335, + serialized_end=1372, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -121,8 +146,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1471, - serialized_end=1504, + serialized_start=1690, + serialized_end=1723, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -146,8 +171,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1796, - serialized_end=1833, + serialized_start=2015, + serialized_end=2052, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -183,8 +208,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1991, - serialized_end=2083, + serialized_start=2210, + serialized_end=2302, ) @@ -329,6 +354,13 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='message_format_command', full_name='openxc.ControlCommand.message_format_command', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -340,7 +372,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=867, + serialized_end=949, ) @@ -375,8 +407,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=870, - serialized_end=1028, + serialized_start=952, + serialized_end=1110, ) @@ -410,8 +442,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1030, - serialized_end=1091, + serialized_start=1112, + serialized_end=1173, ) @@ -445,8 +477,44 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1093, - serialized_end=1153, + serialized_start=1175, + serialized_end=1235, +) + + +_MESSAGEFORMATCOMMAND = _descriptor.Descriptor( + name='MessageFormatCommand', + full_name='openxc.MessageFormatCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.MessageFormatCommand.bus', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='format', full_name='openxc.MessageFormatCommand.format', index=1, + number=2, 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=[ + _MESSAGEFORMATCOMMAND_MESSAGEFORMAT, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1238, + serialized_end=1372, ) @@ -487,8 +555,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1155, - serialized_end=1248, + serialized_start=1374, + serialized_end=1467, ) @@ -572,8 +640,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1251, - serialized_end=1504, + serialized_start=1470, + serialized_end=1723, ) @@ -649,8 +717,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1507, - serialized_end=1668, + serialized_start=1726, + serialized_end=1887, ) @@ -699,8 +767,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1671, - serialized_end=1833, + serialized_start=1890, + serialized_end=2052, ) @@ -749,8 +817,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1836, - serialized_end=2083, + serialized_start=2055, + serialized_end=2302, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -764,10 +832,13 @@ _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['message_format_command'].message_type = _MESSAGEFORMATCOMMAND _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; +_MESSAGEFORMATCOMMAND.fields_by_name['format'].enum_type = _MESSAGEFORMATCOMMAND_MESSAGEFORMAT +_MESSAGEFORMATCOMMAND_MESSAGEFORMAT.containing_type = _MESSAGEFORMATCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; @@ -783,6 +854,7 @@ DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND +DESCRIPTOR.message_types_by_name['MessageFormatCommand'] = _MESSAGEFORMATCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -825,6 +897,12 @@ class AcceptanceFilterBypassCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) +class MessageFormatCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _MESSAGEFORMATCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index c7f75913..97a6ebb6 100644 --- a/openxc.proto +++ b/openxc.proto @@ -28,12 +28,14 @@ message ControlCommand { DIAGNOSTIC = 3; PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; + MESSAGE_FORMAT = 6; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + optional MessageFormatCommand message_format_command = 5; } message DiagnosticControlCommand { @@ -53,6 +55,16 @@ message AcceptanceFilterBypassCommand { optional bool bypass = 2; } +message MessageFormatCommand { + enum MessageFormat { + JSON = 1; + BINARY = 2; + } + + optional int32 bus = 1; + optional MessageFormat format = 2; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 1.2.3-korg From d383e4cbc0bc89cd3bc3b69b0aa3ffc1862e9607 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 20:17:48 -0400 Subject: Remove unnecessary 'bus' field from message format command. --- README.md | 1 - gen/cpp/openxc.pb | 9 +- gen/cpp/openxc.pb.c | 7 +- gen/cpp/openxc.pb.h | 19 ++-- gen/java/com/openxc/BinaryMessages.java | 182 +++++++++----------------------- gen/python/openxc_pb2.py | 53 ++++------ openxc.proto | 3 +- 7 files changed, 89 insertions(+), 185 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index 350cd24e..2cde1305 100644 --- a/README.md +++ b/README.md @@ -338,7 +338,6 @@ Valid formats are `json` and `binary`. **Request** { "command": "message_format", - "bus": 1, "format": "json" } diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index dfad822b..5b90df96 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -œ +Ž openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -48,10 +48,9 @@ DIAGNOSTIC enabled ("< AcceptanceFilterBypassCommand bus ( -bypass ("† -MessageFormatCommand -bus (: -format (2*.openxc.MessageFormatCommand.MessageFormat"% +bypass ("y +MessageFormatCommand: +format (2*.openxc.MessageFormatCommand.MessageFormat"% MessageFormat JSON diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 3fd1b4ab..0c04bc4f 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 Sat Sep 27 19:56:19 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 20:17:56 2014. */ #include "openxc.pb.h" @@ -53,9 +53,8 @@ const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_MessageFormatCommand_fields[3] = { - PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_MessageFormatCommand, bus, bus, 0), - PB_FIELD( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_MessageFormatCommand, format, bus, 0), +const pb_field_t openxc_MessageFormatCommand_fields[2] = { + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_MessageFormatCommand, format, format, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 792aa935..2091dfaf 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 Sat Sep 27 19:56:19 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 20:17:56 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -134,8 +134,6 @@ typedef struct _openxc_DynamicField { } openxc_DynamicField; typedef struct _openxc_MessageFormatCommand { - bool has_bus; - int32_t bus; bool has_format; openxc_MessageFormatCommand_MessageFormat format; } openxc_MessageFormatCommand; @@ -213,7 +211,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} #define openxc_AcceptanceFilterBypassCommand_init_default {false, 0, false, 0} -#define openxc_MessageFormatCommand_init_default {false, 0, false, (openxc_MessageFormatCommand_MessageFormat)0} +#define openxc_MessageFormatCommand_init_default {false, (openxc_MessageFormatCommand_MessageFormat)0} #define openxc_CommandResponse_init_default {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -225,7 +223,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} #define openxc_AcceptanceFilterBypassCommand_init_zero {false, 0, false, 0} -#define openxc_MessageFormatCommand_init_zero {false, 0, false, (openxc_MessageFormatCommand_MessageFormat)0} +#define openxc_MessageFormatCommand_init_zero {false, (openxc_MessageFormatCommand_MessageFormat)0} #define openxc_CommandResponse_init_zero {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -259,8 +257,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_string_value_tag 2 #define openxc_DynamicField_numeric_value_tag 3 #define openxc_DynamicField_boolean_value_tag 4 -#define openxc_MessageFormatCommand_bus_tag 1 -#define openxc_MessageFormatCommand_format_tag 2 +#define openxc_MessageFormatCommand_format_tag 1 #define openxc_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_RawMessage_bus_tag 1 @@ -291,7 +288,7 @@ extern const pb_field_t openxc_ControlCommand_fields[6]; extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; extern const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3]; -extern const pb_field_t openxc_MessageFormatCommand_fields[3]; +extern const pb_field_t openxc_MessageFormatCommand_fields[2]; extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -299,13 +296,13 @@ 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 724 +#define openxc_VehicleMessage_size 712 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 133 +#define openxc_ControlCommand_size 122 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 -#define openxc_MessageFormatCommand_size 17 +#define openxc_MessageFormatCommand_size 6 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 7a745c5c..902b0c30 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -4970,23 +4970,13 @@ public final class BinaryMessages { public interface MessageFormatCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ - boolean hasBus(); - /** - * optional int32 bus = 1; - */ - int getBus(); - - // optional .openxc.MessageFormatCommand.MessageFormat format = 2; + // optional .openxc.MessageFormatCommand.MessageFormat format = 1; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ boolean hasFormat(); /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat(); } @@ -5042,17 +5032,12 @@ public final class BinaryMessages { break; } case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { int rawValue = input.readEnum(); com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.valueOf(rawValue); if (value == null) { - unknownFields.mergeVarintField(2, rawValue); + unknownFields.mergeVarintField(1, rawValue); } else { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; format_ = value; } break; @@ -5179,40 +5164,23 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; - public static final int BUS_FIELD_NUMBER = 1; - private int bus_; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - public int getBus() { - return bus_; - } - - // optional .openxc.MessageFormatCommand.MessageFormat format = 2; - public static final int FORMAT_FIELD_NUMBER = 2; + // optional .openxc.MessageFormatCommand.MessageFormat format = 1; + public static final int FORMAT_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public boolean hasFormat() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { return format_; } private void initFields() { - bus_ = 0; format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; } private byte memoizedIsInitialized = -1; @@ -5228,10 +5196,7 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, bus_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, format_.getNumber()); + output.writeEnum(1, format_.getNumber()); } getUnknownFields().writeTo(output); } @@ -5244,11 +5209,7 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, bus_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, format_.getNumber()); + .computeEnumSize(1, format_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -5366,10 +5327,8 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - bus_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -5401,10 +5360,6 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.bus_ = bus_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } result.format_ = format_; result.bitField0_ = to_bitField0_; onBuilt(); @@ -5422,9 +5377,6 @@ public final class BinaryMessages { public Builder mergeFrom(com.openxc.BinaryMessages.MessageFormatCommand other) { if (other == com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) return this; - if (other.hasBus()) { - setBus(other.getBus()); - } if (other.hasFormat()) { setFormat(other.getFormat()); } @@ -5455,70 +5407,37 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; - private int bus_ ; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - public int getBus() { - return bus_; - } - /** - * optional int32 bus = 1; - */ - public Builder setBus(int value) { - bitField0_ |= 0x00000001; - bus_ = value; - onChanged(); - return this; - } - /** - * optional int32 bus = 1; - */ - public Builder clearBus() { - bitField0_ = (bitField0_ & ~0x00000001); - bus_ = 0; - onChanged(); - return this; - } - - // optional .openxc.MessageFormatCommand.MessageFormat format = 2; + // optional .openxc.MessageFormatCommand.MessageFormat format = 1; private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public boolean hasFormat() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { return format_; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public Builder setFormat(com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; format_ = value; onChanged(); return this; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public Builder clearFormat() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; onChanged(); return this; @@ -10412,35 +10331,34 @@ public final class BinaryMessages { "\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passth" + "roughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007" + "enabled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassC", - "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"\206\001\n\024" + - "MessageFormatCommand\022\013\n\003bus\030\001 \001(\005\022:\n\006for" + - "mat\030\002 \001(\0162*.openxc.MessageFormatCommand." + - "MessageFormat\"%\n\rMessageFormat\022\010\n\004JSON\020\001" + - "\022\n\n\006BINARY\020\002\"]\n\017CommandResponse\022)\n\004type\030" + - "\001 \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007me" + - "ssage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagnost" + - "icRequest\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\tfr", - "equency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_t" + - "ype\030\t \001(\0162%.openxc.DiagnosticRequest.Dec" + - "odedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD" + - "2\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\003pid" + - "\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_resp" + - "onse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005valu" + - "e\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031" + - ".openxc.DynamicField.Type\022\024\n\014string_valu" + - "e\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolea", - "n_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\004ty" + - "pe\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.D" + - "ynamicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dyna" + - "micField\"\\\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_N" + - "UM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bi" + - "naryMessages" + "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"y\n\024M" + + "essageFormatCommand\022:\n\006format\030\001 \001(\0162*.op" + + "enxc.MessageFormatCommand.MessageFormat\"" + + "%\n\rMessageFormat\022\010\n\004JSON\020\001\022\n\n\006BINARY\020\002\"]" + + "\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.openxc" + + ".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\003b" + + "us\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\022mult" + + "iple_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%.op" + + "enxc.DiagnosticRequest.DecodedType\"!\n\013De" + + "codedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diagno" + + "sticResponse\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\007succ" + + "ess\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\014Dy" + + "namicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dynami" + + "cField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rnum" + + "eric_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.ope" + + "nxc.TranslatedMessage.Type\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.DynamicField\"\\\n\004Ty" + + "pe\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVE" + + "NTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVENTE" + + "D_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10488,7 +10406,7 @@ public final class BinaryMessages { internal_static_openxc_MessageFormatCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_MessageFormatCommand_descriptor, - new java.lang.String[] { "Bus", "Format", }); + new java.lang.String[] { "Format", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_openxc_CommandResponse_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 5488b5bb..c5d42154 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\"\xc8\x03\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\x16message_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.MessageFormatCommand\"u\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\x0eMESSAGE_FORMAT\x10\x06\"\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\"\x86\x01\n\x14MessageFormatCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12:\n\x06\x66ormat\x18\x02 \x01(\x0e\x32*.openxc.MessageFormatCommand.MessageFormat\"%\n\rMessageFormat\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06\x42INARY\x10\x02\"]\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\";\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\"\xc8\x03\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\x16message_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.MessageFormatCommand\"u\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\x0eMESSAGE_FORMAT\x10\x06\"\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\"y\n\x14MessageFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.MessageFormatCommand.MessageFormat\"%\n\rMessageFormat\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06\x42INARY\x10\x02\"]\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') @@ -125,8 +125,8 @@ _MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1335, - serialized_end=1372, + serialized_start=1321, + serialized_end=1358, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -146,8 +146,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1690, - serialized_end=1723, + serialized_start=1676, + serialized_end=1709, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -171,8 +171,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2015, - serialized_end=2052, + serialized_start=2001, + serialized_end=2038, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -208,8 +208,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2210, - serialized_end=2302, + serialized_start=2196, + serialized_end=2288, ) @@ -490,15 +490,8 @@ _MESSAGEFORMATCOMMAND = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='bus', full_name='openxc.MessageFormatCommand.bus', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='format', full_name='openxc.MessageFormatCommand.format', index=1, - number=2, type=14, cpp_type=8, label=1, + name='format', full_name='openxc.MessageFormatCommand.format', index=0, + number=1, 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, @@ -513,8 +506,8 @@ _MESSAGEFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1238, - serialized_end=1372, + serialized_start=1237, + serialized_end=1358, ) @@ -555,8 +548,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1374, - serialized_end=1467, + serialized_start=1360, + serialized_end=1453, ) @@ -640,8 +633,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1470, - serialized_end=1723, + serialized_start=1456, + serialized_end=1709, ) @@ -717,8 +710,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1726, - serialized_end=1887, + serialized_start=1712, + serialized_end=1873, ) @@ -767,8 +760,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1890, - serialized_end=2052, + serialized_start=1876, + serialized_end=2038, ) @@ -817,8 +810,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2055, - serialized_end=2302, + serialized_start=2041, + serialized_end=2288, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 97a6ebb6..e0264c6b 100644 --- a/openxc.proto +++ b/openxc.proto @@ -61,8 +61,7 @@ message MessageFormatCommand { BINARY = 2; } - optional int32 bus = 1; - optional MessageFormat format = 2; + optional MessageFormat format = 1; } message CommandResponse { -- cgit 1.2.3-korg From 1e8b40f719ac43ea53e414e311d9387757630de6 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 20:40:22 -0400 Subject: Standardize names for payload format. --- README.md | 12 +- gen/cpp/openxc.pb | 19 +- gen/cpp/openxc.pb.c | 12 +- gen/cpp/openxc.pb.h | 42 +-- gen/java/com/openxc/BinaryMessages.java | 438 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 74 +++--- openxc.proto | 12 +- 7 files changed, 304 insertions(+), 305 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index 2cde1305..e127543f 100644 --- a/README.md +++ b/README.md @@ -328,16 +328,16 @@ changed. { "command_response": "af_bypass", "status": true} -#### Message Format Control +#### Payload Format Control -The `message_format` command determines the format for output data from the VI -and also the expected format of commands sent to the VI. +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 `binary`. +Valid formats are `json` and `protobuf`. **Request** - { "command": "message_format", + { "command": "payload_format", "format": "json" } @@ -347,7 +347,7 @@ 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": "message_format", "status": true} + { "command_response": "payload_format", "status": true} ### Trace File Format diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 5b90df96..716d2689 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Ž + openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -27,7 +27,7 @@ message_id (  diagnostic_request ( 2 .openxc.DiagnosticControlCommandG passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand< -message_format_command ( 2.openxc.MessageFormatCommand"u +payload_format_command ( 2.openxc.PayloadFormatCommand"u Type VERSION DEVICE_ID @@ -35,7 +35,7 @@ message_id (  DIAGNOSTIC PASSTHROUGH ACCEPTANCE_FILTER_BYPASS -MESSAGE_FORMAT"ž +PAYLOAD_FORMAT"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -48,13 +48,12 @@ DIAGNOSTIC enabled ("< AcceptanceFilterBypassCommand bus ( -bypass ("y -MessageFormatCommand: -format (2*.openxc.MessageFormatCommand.MessageFormat"% - MessageFormat -JSON - -BINARY"] +bypass ("{ +PayloadFormatCommand: +format (2*.openxc.PayloadFormatCommand.PayloadFormat"' + PayloadFormat +JSON +PROTOBUF"] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 0c04bc4f..ffc0ec66 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 Sat Sep 27 20:17:56 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 21:46:00 2014. */ #include "openxc.pb.h" @@ -31,7 +31,7 @@ const pb_field_t openxc_ControlCommand_fields[6] = { PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), - PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, message_format_command, acceptance_filter_bypass_command, &openxc_MessageFormatCommand_fields), + PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, payload_format_command, acceptance_filter_bypass_command, &openxc_PayloadFormatCommand_fields), PB_LAST_FIELD }; @@ -53,8 +53,8 @@ const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_MessageFormatCommand_fields[2] = { - PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_MessageFormatCommand, format, format, 0), +const pb_field_t openxc_PayloadFormatCommand_fields[2] = { + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_PayloadFormatCommand, format, format, 0), PB_LAST_FIELD }; @@ -116,7 +116,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, message_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -127,7 +127,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, message_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 2091dfaf..2df9a94b 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 Sat Sep 27 20:17:56 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 21:46:00 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -28,7 +28,7 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3, openxc_ControlCommand_Type_PASSTHROUGH = 4, openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, - openxc_ControlCommand_Type_MESSAGE_FORMAT = 6 + openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -36,10 +36,10 @@ typedef enum _openxc_DiagnosticControlCommand_Action { openxc_DiagnosticControlCommand_Action_CANCEL = 2 } openxc_DiagnosticControlCommand_Action; -typedef enum _openxc_MessageFormatCommand_MessageFormat { - openxc_MessageFormatCommand_MessageFormat_JSON = 1, - openxc_MessageFormatCommand_MessageFormat_BINARY = 2 -} openxc_MessageFormatCommand_MessageFormat; +typedef enum _openxc_PayloadFormatCommand_PayloadFormat { + openxc_PayloadFormatCommand_PayloadFormat_JSON = 1, + openxc_PayloadFormatCommand_PayloadFormat_PROTOBUF = 2 +} openxc_PayloadFormatCommand_PayloadFormat; typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, @@ -133,11 +133,6 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; -typedef struct _openxc_MessageFormatCommand { - bool has_format; - openxc_MessageFormatCommand_MessageFormat format; -} openxc_MessageFormatCommand; - typedef struct _openxc_PassthroughModeControlCommand { bool has_bus; int32_t bus; @@ -145,6 +140,11 @@ typedef struct _openxc_PassthroughModeControlCommand { bool enabled; } openxc_PassthroughModeControlCommand; +typedef struct _openxc_PayloadFormatCommand { + bool has_format; + openxc_PayloadFormatCommand_PayloadFormat format; +} openxc_PayloadFormatCommand; + typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; typedef struct _openxc_RawMessage { @@ -183,8 +183,8 @@ typedef struct _openxc_ControlCommand { openxc_PassthroughModeControlCommand passthrough_mode_request; bool has_acceptance_filter_bypass_command; openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; - bool has_message_format_command; - openxc_MessageFormatCommand message_format_command; + bool has_payload_format_command; + openxc_PayloadFormatCommand payload_format_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -207,11 +207,11 @@ 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_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_MessageFormatCommand_init_default} +#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} #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} #define openxc_AcceptanceFilterBypassCommand_init_default {false, 0, false, 0} -#define openxc_MessageFormatCommand_init_default {false, (openxc_MessageFormatCommand_MessageFormat)0} +#define openxc_PayloadFormatCommand_init_default {false, (openxc_PayloadFormatCommand_PayloadFormat)0} #define openxc_CommandResponse_init_default {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -219,11 +219,11 @@ typedef struct _openxc_VehicleMessage { #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_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_MessageFormatCommand_init_zero} +#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} #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} #define openxc_AcceptanceFilterBypassCommand_init_zero {false, 0, false, 0} -#define openxc_MessageFormatCommand_init_zero {false, (openxc_MessageFormatCommand_MessageFormat)0} +#define openxc_PayloadFormatCommand_init_zero {false, (openxc_PayloadFormatCommand_PayloadFormat)0} #define openxc_CommandResponse_init_zero {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -257,9 +257,9 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_string_value_tag 2 #define openxc_DynamicField_numeric_value_tag 3 #define openxc_DynamicField_boolean_value_tag 4 -#define openxc_MessageFormatCommand_format_tag 1 #define openxc_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 +#define openxc_PayloadFormatCommand_format_tag 1 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -273,7 +273,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 -#define openxc_ControlCommand_message_format_command_tag 5 +#define openxc_ControlCommand_payload_format_command_tag 5 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -288,7 +288,7 @@ extern const pb_field_t openxc_ControlCommand_fields[6]; extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; extern const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3]; -extern const pb_field_t openxc_MessageFormatCommand_fields[2]; +extern const pb_field_t openxc_PayloadFormatCommand_fields[2]; extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -302,7 +302,7 @@ extern const pb_field_t openxc_TranslatedMessage_fields[5]; #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 -#define openxc_MessageFormatCommand_size 6 +#define openxc_PayloadFormatCommand_size 6 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 902b0c30..bf424fbc 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2098,19 +2098,19 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); - // optional .openxc.MessageFormatCommand message_format_command = 5; + // optional .openxc.PayloadFormatCommand payload_format_command = 5; /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - boolean hasMessageFormatCommand(); + boolean hasPayloadFormatCommand(); /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand(); + com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand(); /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder(); + com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2214,14 +2214,14 @@ public final class BinaryMessages { break; } case 42: { - com.openxc.BinaryMessages.MessageFormatCommand.Builder subBuilder = null; + com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = null; if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = messageFormatCommand_.toBuilder(); + subBuilder = payloadFormatCommand_.toBuilder(); } - messageFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.MessageFormatCommand.PARSER, extensionRegistry); + payloadFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.PayloadFormatCommand.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(messageFormatCommand_); - messageFormatCommand_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(payloadFormatCommand_); + payloadFormatCommand_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000010; break; @@ -2291,9 +2291,9 @@ public final class BinaryMessages { */ ACCEPTANCE_FILTER_BYPASS(4, 5), /** - * MESSAGE_FORMAT = 6; + * PAYLOAD_FORMAT = 6; */ - MESSAGE_FORMAT(5, 6), + PAYLOAD_FORMAT(5, 6), ; /** @@ -2317,9 +2317,9 @@ public final class BinaryMessages { */ public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; /** - * MESSAGE_FORMAT = 6; + * PAYLOAD_FORMAT = 6; */ - public static final int MESSAGE_FORMAT_VALUE = 6; + public static final int PAYLOAD_FORMAT_VALUE = 6; public final int getNumber() { return value; } @@ -2331,7 +2331,7 @@ public final class BinaryMessages { case 3: return DIAGNOSTIC; case 4: return PASSTHROUGH; case 5: return ACCEPTANCE_FILTER_BYPASS; - case 6: return MESSAGE_FORMAT; + case 6: return PAYLOAD_FORMAT; default: return null; } } @@ -2466,26 +2466,26 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } - // optional .openxc.MessageFormatCommand message_format_command = 5; - public static final int MESSAGE_FORMAT_COMMAND_FIELD_NUMBER = 5; - private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_; + // optional .openxc.PayloadFormatCommand payload_format_command = 5; + public static final int PAYLOAD_FORMAT_COMMAND_FIELD_NUMBER = 5; + private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_; /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public boolean hasMessageFormatCommand() { + public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { - return messageFormatCommand_; + public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { + return payloadFormatCommand_; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { - return messageFormatCommand_; + public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { + return payloadFormatCommand_; } private void initFields() { @@ -2493,7 +2493,7 @@ public final class BinaryMessages { diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); - messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2520,7 +2520,7 @@ public final class BinaryMessages { output.writeMessage(4, acceptanceFilterBypassCommand_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(5, messageFormatCommand_); + output.writeMessage(5, payloadFormatCommand_); } getUnknownFields().writeTo(output); } @@ -2549,7 +2549,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, messageFormatCommand_); + .computeMessageSize(5, payloadFormatCommand_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2662,7 +2662,7 @@ public final class BinaryMessages { getDiagnosticRequestFieldBuilder(); getPassthroughModeRequestFieldBuilder(); getAcceptanceFilterBypassCommandFieldBuilder(); - getMessageFormatCommandFieldBuilder(); + getPayloadFormatCommandFieldBuilder(); } } private static Builder create() { @@ -2691,10 +2691,10 @@ public final class BinaryMessages { acceptanceFilterBypassCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); - if (messageFormatCommandBuilder_ == null) { - messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } else { - messageFormatCommandBuilder_.clear(); + payloadFormatCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; @@ -2756,10 +2756,10 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } - if (messageFormatCommandBuilder_ == null) { - result.messageFormatCommand_ = messageFormatCommand_; + if (payloadFormatCommandBuilder_ == null) { + result.payloadFormatCommand_ = payloadFormatCommand_; } else { - result.messageFormatCommand_ = messageFormatCommandBuilder_.build(); + result.payloadFormatCommand_ = payloadFormatCommandBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -2789,8 +2789,8 @@ public final class BinaryMessages { if (other.hasAcceptanceFilterBypassCommand()) { mergeAcceptanceFilterBypassCommand(other.getAcceptanceFilterBypassCommand()); } - if (other.hasMessageFormatCommand()) { - mergeMessageFormatCommand(other.getMessageFormatCommand()); + if (other.hasPayloadFormatCommand()) { + mergePayloadFormatCommand(other.getPayloadFormatCommand()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -3206,121 +3206,121 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_; } - // optional .openxc.MessageFormatCommand message_format_command = 5; - private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + // 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.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> messageFormatCommandBuilder_; + com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> payloadFormatCommandBuilder_; /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public boolean hasMessageFormatCommand() { + public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { - if (messageFormatCommandBuilder_ == null) { - return messageFormatCommand_; + public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { + if (payloadFormatCommandBuilder_ == null) { + return payloadFormatCommand_; } else { - return messageFormatCommandBuilder_.getMessage(); + return payloadFormatCommandBuilder_.getMessage(); } } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder setMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { - if (messageFormatCommandBuilder_ == null) { + public Builder setPayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { + if (payloadFormatCommandBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - messageFormatCommand_ = value; + payloadFormatCommand_ = value; onChanged(); } else { - messageFormatCommandBuilder_.setMessage(value); + payloadFormatCommandBuilder_.setMessage(value); } bitField0_ |= 0x00000010; return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder setMessageFormatCommand( - com.openxc.BinaryMessages.MessageFormatCommand.Builder builderForValue) { - if (messageFormatCommandBuilder_ == null) { - messageFormatCommand_ = builderForValue.build(); + public Builder setPayloadFormatCommand( + com.openxc.BinaryMessages.PayloadFormatCommand.Builder builderForValue) { + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommand_ = builderForValue.build(); onChanged(); } else { - messageFormatCommandBuilder_.setMessage(builderForValue.build()); + payloadFormatCommandBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder mergeMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { - if (messageFormatCommandBuilder_ == null) { + public Builder mergePayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { + if (payloadFormatCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && - messageFormatCommand_ != com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) { - messageFormatCommand_ = - com.openxc.BinaryMessages.MessageFormatCommand.newBuilder(messageFormatCommand_).mergeFrom(value).buildPartial(); + payloadFormatCommand_ != com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance()) { + payloadFormatCommand_ = + com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder(payloadFormatCommand_).mergeFrom(value).buildPartial(); } else { - messageFormatCommand_ = value; + payloadFormatCommand_ = value; } onChanged(); } else { - messageFormatCommandBuilder_.mergeFrom(value); + payloadFormatCommandBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder clearMessageFormatCommand() { - if (messageFormatCommandBuilder_ == null) { - messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + public Builder clearPayloadFormatCommand() { + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); onChanged(); } else { - messageFormatCommandBuilder_.clear(); + payloadFormatCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommand.Builder getMessageFormatCommandBuilder() { + public com.openxc.BinaryMessages.PayloadFormatCommand.Builder getPayloadFormatCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getMessageFormatCommandFieldBuilder().getBuilder(); + return getPayloadFormatCommandFieldBuilder().getBuilder(); } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { - if (messageFormatCommandBuilder_ != null) { - return messageFormatCommandBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { + if (payloadFormatCommandBuilder_ != null) { + return payloadFormatCommandBuilder_.getMessageOrBuilder(); } else { - return messageFormatCommand_; + return payloadFormatCommand_; } } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> - getMessageFormatCommandFieldBuilder() { - if (messageFormatCommandBuilder_ == null) { - messageFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder>( - messageFormatCommand_, + com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> + getPayloadFormatCommandFieldBuilder() { + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder>( + payloadFormatCommand_, getParentForChildren(), isClean()); - messageFormatCommand_ = null; + payloadFormatCommand_ = null; } - return messageFormatCommandBuilder_; + return payloadFormatCommandBuilder_; } // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) @@ -4967,38 +4967,38 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - public interface MessageFormatCommandOrBuilder + public interface PayloadFormatCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .openxc.MessageFormatCommand.MessageFormat format = 1; + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ boolean hasFormat(); /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat(); + com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat(); } /** - * Protobuf type {@code openxc.MessageFormatCommand} + * Protobuf type {@code openxc.PayloadFormatCommand} */ - public static final class MessageFormatCommand extends + public static final class PayloadFormatCommand extends com.google.protobuf.GeneratedMessage - implements MessageFormatCommandOrBuilder { - // Use MessageFormatCommand.newBuilder() to construct. - private MessageFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + implements PayloadFormatCommandOrBuilder { + // Use PayloadFormatCommand.newBuilder() to construct. + private PayloadFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private MessageFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private PayloadFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final MessageFormatCommand defaultInstance; - public static MessageFormatCommand getDefaultInstance() { + private static final PayloadFormatCommand defaultInstance; + public static PayloadFormatCommand getDefaultInstance() { return defaultInstance; } - public MessageFormatCommand getDefaultInstanceForType() { + public PayloadFormatCommand getDefaultInstanceForType() { return defaultInstance; } @@ -5008,7 +5008,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private MessageFormatCommand( + private PayloadFormatCommand( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5033,7 +5033,7 @@ public final class BinaryMessages { } case 8: { int rawValue = input.readEnum(); - com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.valueOf(rawValue); + com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { @@ -5056,44 +5056,44 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); + com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public MessageFormatCommand parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PayloadFormatCommand parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MessageFormatCommand(input, extensionRegistry); + return new PayloadFormatCommand(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } /** - * Protobuf enum {@code openxc.MessageFormatCommand.MessageFormat} + * Protobuf enum {@code openxc.PayloadFormatCommand.PayloadFormat} */ - public enum MessageFormat + public enum PayloadFormat implements com.google.protobuf.ProtocolMessageEnum { /** * JSON = 1; */ JSON(0, 1), /** - * BINARY = 2; + * PROTOBUF = 2; */ - BINARY(1, 2), + PROTOBUF(1, 2), ; /** @@ -5101,30 +5101,30 @@ public final class BinaryMessages { */ public static final int JSON_VALUE = 1; /** - * BINARY = 2; + * PROTOBUF = 2; */ - public static final int BINARY_VALUE = 2; + public static final int PROTOBUF_VALUE = 2; public final int getNumber() { return value; } - public static MessageFormat valueOf(int value) { + public static PayloadFormat valueOf(int value) { switch (value) { case 1: return JSON; - case 2: return BINARY; + case 2: return PROTOBUF; default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap + private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MessageFormat findValueByNumber(int number) { - return MessageFormat.valueOf(number); + new com.google.protobuf.Internal.EnumLiteMap() { + public PayloadFormat findValueByNumber(int number) { + return PayloadFormat.valueOf(number); } }; @@ -5138,12 +5138,12 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.openxc.BinaryMessages.MessageFormatCommand.getDescriptor().getEnumTypes().get(0); + return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor().getEnumTypes().get(0); } - private static final MessageFormat[] VALUES = values(); + private static final PayloadFormat[] VALUES = values(); - public static MessageFormat valueOf( + public static PayloadFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( @@ -5155,33 +5155,33 @@ public final class BinaryMessages { private final int index; private final int value; - private MessageFormat(int index, int value) { + private PayloadFormat(int index, int value) { this.index = index; this.value = value; } - // @@protoc_insertion_point(enum_scope:openxc.MessageFormatCommand.MessageFormat) + // @@protoc_insertion_point(enum_scope:openxc.PayloadFormatCommand.PayloadFormat) } private int bitField0_; - // optional .openxc.MessageFormatCommand.MessageFormat format = 1; + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; public static final int FORMAT_FIELD_NUMBER = 1; - private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_; + private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } private void initFields() { - format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -5223,53 +5223,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5278,7 +5278,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.MessageFormatCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.PayloadFormatCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -5290,24 +5290,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.MessageFormatCommand} + * Protobuf type {@code openxc.PayloadFormatCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.MessageFormatCommandOrBuilder { + implements com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); + com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.MessageFormatCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5327,7 +5327,7 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -5338,23 +5338,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - public com.openxc.BinaryMessages.MessageFormatCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.PayloadFormatCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.MessageFormatCommand build() { - com.openxc.BinaryMessages.MessageFormatCommand result = buildPartial(); + public com.openxc.BinaryMessages.PayloadFormatCommand build() { + com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.MessageFormatCommand buildPartial() { - com.openxc.BinaryMessages.MessageFormatCommand result = new com.openxc.BinaryMessages.MessageFormatCommand(this); + public com.openxc.BinaryMessages.PayloadFormatCommand buildPartial() { + com.openxc.BinaryMessages.PayloadFormatCommand result = new com.openxc.BinaryMessages.PayloadFormatCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -5367,16 +5367,16 @@ public final class BinaryMessages { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.MessageFormatCommand) { - return mergeFrom((com.openxc.BinaryMessages.MessageFormatCommand)other); + if (other instanceof com.openxc.BinaryMessages.PayloadFormatCommand) { + return mergeFrom((com.openxc.BinaryMessages.PayloadFormatCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.MessageFormatCommand other) { - if (other == com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.PayloadFormatCommand other) { + if (other == com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance()) return this; if (other.hasFormat()) { setFormat(other.getFormat()); } @@ -5392,11 +5392,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.MessageFormatCommand parsedMessage = null; + com.openxc.BinaryMessages.PayloadFormatCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.MessageFormatCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.PayloadFormatCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -5407,24 +5407,24 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.MessageFormatCommand.MessageFormat format = 1; - private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - public Builder setFormat(com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value) { + public Builder setFormat(com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value) { if (value == null) { throw new NullPointerException(); } @@ -5434,24 +5434,24 @@ public final class BinaryMessages { return this; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ public Builder clearFormat() { bitField0_ = (bitField0_ & ~0x00000001); - format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.MessageFormatCommand) + // @@protoc_insertion_point(builder_scope:openxc.PayloadFormatCommand) } static { - defaultInstance = new MessageFormatCommand(true); + defaultInstance = new PayloadFormatCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) + // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } public interface CommandResponseOrBuilder @@ -10263,10 +10263,10 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_MessageFormatCommand_descriptor; + internal_static_openxc_PayloadFormatCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_MessageFormatCommand_fieldAccessorTable; + internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -10320,45 +10320,45 @@ public final class BinaryMessages { "st\030\003 \001(\0132%.openxc.PassthroughModeControl" + "Command\022O\n acceptance_filter_bypass_comm" + "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + - "sCommand\022<\n\026message_format_command\030\005 \001(\013", - "2\034.openxc.MessageFormatCommand\"u\n\004Type\022\013" + + "sCommand\022<\n\026payload_format_command\030\005 \001(\013", + "2\034.openxc.PayloadFormatCommand\"u\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\016MESSAGE_FORMAT\020\006\"\236\001\n\030Diagno" + + "_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\"\236\001\n\030Diagno" + "sticControlCommand\022*\n\007request\030\001 \001(\0132\031.op" + "enxc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'" + ".openxc.DiagnosticControlCommand.Action\"" + "\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passth" + "roughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007" + "enabled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassC", - "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"y\n\024M" + - "essageFormatCommand\022:\n\006format\030\001 \001(\0162*.op" + - "enxc.MessageFormatCommand.MessageFormat\"" + - "%\n\rMessageFormat\022\010\n\004JSON\020\001\022\n\n\006BINARY\020\002\"]" + - "\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.openxc" + - ".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\003b" + - "us\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\022mult" + - "iple_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%.op" + - "enxc.DiagnosticRequest.DecodedType\"!\n\013De" + - "codedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diagno" + - "sticResponse\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\007succ" + - "ess\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\014Dy" + - "namicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dynami" + - "cField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rnum" + - "eric_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.ope" + - "nxc.TranslatedMessage.Type\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.DynamicField\"\\\n\004Ty" + - "pe\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVE" + - "NTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVENTE" + - "D_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024P" + + "ayloadFormatCommand\022:\n\006format\030\001 \001(\0162*.op" + + "enxc.PayloadFormatCommand.PayloadFormat\"" + + "\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002" + + "\"]\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" + + "\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162\036.o" + + "penxc.TranslatedMessage.Type\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.DynamicField\"\\\n\004" + + "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + + "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + + "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10382,7 +10382,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "MessageFormatCommand", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new @@ -10401,11 +10401,11 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, new java.lang.String[] { "Bus", "Bypass", }); - internal_static_openxc_MessageFormatCommand_descriptor = + internal_static_openxc_PayloadFormatCommand_descriptor = getDescriptor().getMessageTypes().get(6); - internal_static_openxc_MessageFormatCommand_fieldAccessorTable = new + internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_MessageFormatCommand_descriptor, + internal_static_openxc_PayloadFormatCommand_descriptor, new java.lang.String[] { "Format", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(7); diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index c5d42154..35e63518 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\"\xc8\x03\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\x16message_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.MessageFormatCommand\"u\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\x0eMESSAGE_FORMAT\x10\x06\"\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\"y\n\x14MessageFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.MessageFormatCommand.MessageFormat\"%\n\rMessageFormat\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06\x42INARY\x10\x02\"]\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\";\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\"\xc8\x03\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\"u\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\"\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\"]\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') @@ -77,7 +77,7 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( options=None, type=None), _descriptor.EnumValueDescriptor( - name='MESSAGE_FORMAT', index=5, number=6, + name='PAYLOAD_FORMAT', index=5, number=6, options=None, type=None), ], @@ -108,9 +108,9 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( serialized_end=1110, ) -_MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor( - name='MessageFormat', - full_name='openxc.MessageFormatCommand.MessageFormat', +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( + name='PayloadFormat', + full_name='openxc.PayloadFormatCommand.PayloadFormat', filename=None, file=DESCRIPTOR, values=[ @@ -119,14 +119,14 @@ _MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor( options=None, type=None), _descriptor.EnumValueDescriptor( - name='BINARY', index=1, number=2, + name='PROTOBUF', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=1321, - serialized_end=1358, + serialized_end=1360, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -146,8 +146,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1676, - serialized_end=1709, + serialized_start=1678, + serialized_end=1711, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -171,8 +171,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2001, - serialized_end=2038, + serialized_start=2003, + serialized_end=2040, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -208,8 +208,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2196, - serialized_end=2288, + serialized_start=2198, + serialized_end=2290, ) @@ -355,7 +355,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='message_format_command', full_name='openxc.ControlCommand.message_format_command', index=4, + name='payload_format_command', full_name='openxc.ControlCommand.payload_format_command', index=4, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -482,15 +482,15 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( ) -_MESSAGEFORMATCOMMAND = _descriptor.Descriptor( - name='MessageFormatCommand', - full_name='openxc.MessageFormatCommand', +_PAYLOADFORMATCOMMAND = _descriptor.Descriptor( + name='PayloadFormatCommand', + full_name='openxc.PayloadFormatCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='format', full_name='openxc.MessageFormatCommand.format', index=0, + name='format', full_name='openxc.PayloadFormatCommand.format', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, message_type=None, enum_type=None, containing_type=None, @@ -501,13 +501,13 @@ _MESSAGEFORMATCOMMAND = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _MESSAGEFORMATCOMMAND_MESSAGEFORMAT, + _PAYLOADFORMATCOMMAND_PAYLOADFORMAT, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=1237, - serialized_end=1358, + serialized_end=1360, ) @@ -548,8 +548,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1360, - serialized_end=1453, + serialized_start=1362, + serialized_end=1455, ) @@ -633,8 +633,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1456, - serialized_end=1709, + serialized_start=1458, + serialized_end=1711, ) @@ -710,8 +710,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1712, - serialized_end=1873, + serialized_start=1714, + serialized_end=1875, ) @@ -760,8 +760,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1876, - serialized_end=2038, + serialized_start=1878, + serialized_end=2040, ) @@ -810,8 +810,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2041, - serialized_end=2288, + serialized_start=2043, + serialized_end=2290, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -825,13 +825,13 @@ _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['message_format_command'].message_type = _MESSAGEFORMATCOMMAND +_CONTROLCOMMAND.fields_by_name['payload_format_command'].message_type = _PAYLOADFORMATCOMMAND _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; -_MESSAGEFORMATCOMMAND.fields_by_name['format'].enum_type = _MESSAGEFORMATCOMMAND_MESSAGEFORMAT -_MESSAGEFORMATCOMMAND_MESSAGEFORMAT.containing_type = _MESSAGEFORMATCOMMAND; +_PAYLOADFORMATCOMMAND.fields_by_name['format'].enum_type = _PAYLOADFORMATCOMMAND_PAYLOADFORMAT +_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; @@ -847,7 +847,7 @@ DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND -DESCRIPTOR.message_types_by_name['MessageFormatCommand'] = _MESSAGEFORMATCOMMAND +DESCRIPTOR.message_types_by_name['PayloadFormatCommand'] = _PAYLOADFORMATCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -890,11 +890,11 @@ class AcceptanceFilterBypassCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) -class MessageFormatCommand(_message.Message): +class PayloadFormatCommand(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _MESSAGEFORMATCOMMAND + DESCRIPTOR = _PAYLOADFORMATCOMMAND - # @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) + # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType diff --git a/openxc.proto b/openxc.proto index e0264c6b..f54c0906 100644 --- a/openxc.proto +++ b/openxc.proto @@ -28,14 +28,14 @@ message ControlCommand { DIAGNOSTIC = 3; PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; - MESSAGE_FORMAT = 6; + PAYLOAD_FORMAT = 6; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - optional MessageFormatCommand message_format_command = 5; + optional PayloadFormatCommand payload_format_command = 5; } message DiagnosticControlCommand { @@ -55,13 +55,13 @@ message AcceptanceFilterBypassCommand { optional bool bypass = 2; } -message MessageFormatCommand { - enum MessageFormat { +message PayloadFormatCommand { + enum PayloadFormat { JSON = 1; - BINARY = 2; + PROTOBUF = 2; } - optional MessageFormat format = 1; + optional PayloadFormat format = 1; } message CommandResponse { -- cgit 1.2.3-korg From 68ce7c57c76496efb28c385428b0e2d797d8df74 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 29 Sep 2014 21:52:34 -0400 Subject: Add a command to enable/disable pre-defined OBD-II requests. See openxc/vi-firmware#303. --- README.md | 23 +- gen/cpp/openxc.pb | 14 +- gen/cpp/openxc.pb.c | 14 +- gen/cpp/openxc.pb.h | 28 +- gen/java/com/openxc/BinaryMessages.java | 703 ++++++++++++++++++++++++++++++-- gen/python/openxc_pb2.py | 111 +++-- openxc.proto | 6 + 7 files changed, 805 insertions(+), 94 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/README.md b/README.md index e127543f..4b0c32bc 100644 --- a/README.md +++ b/README.md @@ -349,6 +349,27 @@ 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} ### Trace File Format @@ -451,7 +472,7 @@ manufacturers may support custom message names. * numerical, -179.0 to 179.0 degrees with standard GPS accuracy * 1Hz -### Signals from Diagnostics Messages +### Signals from Diagnostic Messages This set of signals is often retreived from OBD-II requests. The units can be found in the [OBD-II standard](http://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01). diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 716d2689..eef93e61 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ - +² openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,13 +21,14 @@ RawMessage bus ( message_id (  -data ( "È +data ( "¸ ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand< -payload_format_command ( 2.openxc.PayloadFormatCommand"u +payload_format_command ( 2.openxc.PayloadFormatCommandO + predefined_obd2_requests_command ( 2%.openxc.PredefinedObd2RequestsCommand"“ Type VERSION DEVICE_ID @@ -35,7 +36,8 @@ message_id (  DIAGNOSTIC PASSTHROUGH ACCEPTANCE_FILTER_BYPASS -PAYLOAD_FORMAT"ž +PAYLOAD_FORMAT +PREDEFINED_OBD2_REQUESTS"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -53,7 +55,9 @@ DIAGNOSTIC format (2*.openxc.PayloadFormatCommand.PayloadFormat"' PayloadFormat JSON -PROTOBUF"] +PROTOBUF"0 +PredefinedObd2RequestsCommand +enabled ("] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ffc0ec66..ac31b7ec 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 Sat Sep 27 21:46:00 2014. */ +/* Generated by nanopb-0.3.1 at Mon Sep 29 21:53:25 2014. */ #include "openxc.pb.h" @@ -26,12 +26,13 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[6] = { +const pb_field_t openxc_ControlCommand_fields[7] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, payload_format_command, acceptance_filter_bypass_command, &openxc_PayloadFormatCommand_fields), + PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, predefined_obd2_requests_command, payload_format_command, &openxc_PredefinedObd2RequestsCommand_fields), PB_LAST_FIELD }; @@ -58,6 +59,11 @@ const pb_field_t openxc_PayloadFormatCommand_fields[2] = { PB_LAST_FIELD }; +const pb_field_t openxc_PredefinedObd2RequestsCommand_fields[2] = { + PB_FIELD( 1, BOOL , OPTIONAL, STATIC , FIRST, openxc_PredefinedObd2RequestsCommand, enabled, enabled, 0), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -116,7 +122,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -127,7 +133,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 2df9a94b..4af15de9 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 Sat Sep 27 21:46:00 2014. */ +/* Generated by nanopb-0.3.1 at Mon Sep 29 21:53:25 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -28,7 +28,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3, openxc_ControlCommand_Type_PASSTHROUGH = 4, openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, - openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6 + openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6, + openxc_ControlCommand_Type_PREDEFINED_OBD2_REQUESTS = 7 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -145,6 +146,11 @@ typedef struct _openxc_PayloadFormatCommand { openxc_PayloadFormatCommand_PayloadFormat format; } openxc_PayloadFormatCommand; +typedef struct _openxc_PredefinedObd2RequestsCommand { + bool has_enabled; + bool enabled; +} openxc_PredefinedObd2RequestsCommand; + typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; typedef struct _openxc_RawMessage { @@ -185,6 +191,8 @@ typedef struct _openxc_ControlCommand { openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; bool has_payload_format_command; openxc_PayloadFormatCommand payload_format_command; + bool has_predefined_obd2_requests_command; + openxc_PredefinedObd2RequestsCommand predefined_obd2_requests_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -207,11 +215,12 @@ 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_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} +#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} #define openxc_AcceptanceFilterBypassCommand_init_default {false, 0, false, 0} #define openxc_PayloadFormatCommand_init_default {false, (openxc_PayloadFormatCommand_PayloadFormat)0} +#define openxc_PredefinedObd2RequestsCommand_init_default {false, 0} #define openxc_CommandResponse_init_default {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -219,11 +228,12 @@ typedef struct _openxc_VehicleMessage { #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_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} +#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} #define openxc_AcceptanceFilterBypassCommand_init_zero {false, 0, false, 0} #define openxc_PayloadFormatCommand_init_zero {false, (openxc_PayloadFormatCommand_PayloadFormat)0} +#define openxc_PredefinedObd2RequestsCommand_init_zero {false, 0} #define openxc_CommandResponse_init_zero {false, (openxc_ControlCommand_Type)0, false, "", false, 0} #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} @@ -260,6 +270,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_PayloadFormatCommand_format_tag 1 +#define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -274,6 +285,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 #define openxc_ControlCommand_payload_format_command_tag 5 +#define openxc_ControlCommand_predefined_obd2_requests_command_tag 6 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -284,11 +296,12 @@ 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_ControlCommand_fields[6]; +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]; extern const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3]; extern const pb_field_t openxc_PayloadFormatCommand_fields[2]; +extern const pb_field_t openxc_PredefinedObd2RequestsCommand_fields[2]; extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -296,13 +309,14 @@ 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 712 +#define openxc_VehicleMessage_size 716 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 122 +#define openxc_ControlCommand_size 126 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 #define openxc_PayloadFormatCommand_size 6 +#define openxc_PredefinedObd2RequestsCommand_size 2 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index bf424fbc..b3d1be43 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2111,6 +2111,20 @@ public final class BinaryMessages { * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); + + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + boolean hasPredefinedObd2RequestsCommand(); + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand(); + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2226,6 +2240,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; break; } + case 50: { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = predefinedObd2RequestsCommand_.toBuilder(); + } + predefinedObd2RequestsCommand_ = input.readMessage(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(predefinedObd2RequestsCommand_); + predefinedObd2RequestsCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2294,6 +2321,10 @@ public final class BinaryMessages { * PAYLOAD_FORMAT = 6; */ PAYLOAD_FORMAT(5, 6), + /** + * PREDEFINED_OBD2_REQUESTS = 7; + */ + PREDEFINED_OBD2_REQUESTS(6, 7), ; /** @@ -2320,6 +2351,10 @@ public final class BinaryMessages { * PAYLOAD_FORMAT = 6; */ public static final int PAYLOAD_FORMAT_VALUE = 6; + /** + * PREDEFINED_OBD2_REQUESTS = 7; + */ + public static final int PREDEFINED_OBD2_REQUESTS_VALUE = 7; public final int getNumber() { return value; } @@ -2332,6 +2367,7 @@ public final class BinaryMessages { case 4: return PASSTHROUGH; case 5: return ACCEPTANCE_FILTER_BYPASS; case 6: return PAYLOAD_FORMAT; + case 7: return PREDEFINED_OBD2_REQUESTS; default: return null; } } @@ -2488,12 +2524,35 @@ 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_; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public boolean hasPredefinedObd2RequestsCommand() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { + return predefinedObd2RequestsCommand_; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { + return predefinedObd2RequestsCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); + predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2522,6 +2581,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, payloadFormatCommand_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(6, predefinedObd2RequestsCommand_); + } getUnknownFields().writeTo(output); } @@ -2551,6 +2613,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, payloadFormatCommand_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, predefinedObd2RequestsCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2663,6 +2729,7 @@ public final class BinaryMessages { getPassthroughModeRequestFieldBuilder(); getAcceptanceFilterBypassCommandFieldBuilder(); getPayloadFormatCommandFieldBuilder(); + getPredefinedObd2RequestsCommandFieldBuilder(); } } private static Builder create() { @@ -2697,6 +2764,12 @@ public final class BinaryMessages { payloadFormatCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + } else { + predefinedObd2RequestsCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -2761,6 +2834,14 @@ public final class BinaryMessages { } else { result.payloadFormatCommand_ = payloadFormatCommandBuilder_.build(); } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + if (predefinedObd2RequestsCommandBuilder_ == null) { + result.predefinedObd2RequestsCommand_ = predefinedObd2RequestsCommand_; + } else { + result.predefinedObd2RequestsCommand_ = predefinedObd2RequestsCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2792,6 +2873,9 @@ public final class BinaryMessages { if (other.hasPayloadFormatCommand()) { mergePayloadFormatCommand(other.getPayloadFormatCommand()); } + if (other.hasPredefinedObd2RequestsCommand()) { + mergePredefinedObd2RequestsCommand(other.getPredefinedObd2RequestsCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -3323,6 +3407,123 @@ 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_; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public boolean hasPredefinedObd2RequestsCommand() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { + if (predefinedObd2RequestsCommandBuilder_ == null) { + return predefinedObd2RequestsCommand_; + } else { + return predefinedObd2RequestsCommandBuilder_.getMessage(); + } + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder setPredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { + if (predefinedObd2RequestsCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predefinedObd2RequestsCommand_ = value; + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder setPredefinedObd2RequestsCommand( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder builderForValue) { + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommand_ = builderForValue.build(); + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder mergePredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { + if (predefinedObd2RequestsCommandBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + predefinedObd2RequestsCommand_ != com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance()) { + predefinedObd2RequestsCommand_ = + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder(predefinedObd2RequestsCommand_).mergeFrom(value).buildPartial(); + } else { + predefinedObd2RequestsCommand_ = value; + } + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder clearPredefinedObd2RequestsCommand() { + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder getPredefinedObd2RequestsCommandBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPredefinedObd2RequestsCommandFieldBuilder().getBuilder(); + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { + if (predefinedObd2RequestsCommandBuilder_ != null) { + return predefinedObd2RequestsCommandBuilder_.getMessageOrBuilder(); + } else { + return predefinedObd2RequestsCommand_; + } + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> + getPredefinedObd2RequestsCommandFieldBuilder() { + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder>( + predefinedObd2RequestsCommand_, + getParentForChildren(), + isClean()); + predefinedObd2RequestsCommand_ = null; + } + return predefinedObd2RequestsCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -5454,6 +5655,402 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } + public interface PredefinedObd2RequestsCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bool enabled = 1; + /** + * optional bool enabled = 1; + */ + boolean hasEnabled(); + /** + * optional bool enabled = 1; + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} + */ + public static final class PredefinedObd2RequestsCommand extends + com.google.protobuf.GeneratedMessage + implements PredefinedObd2RequestsCommandOrBuilder { + // Use PredefinedObd2RequestsCommand.newBuilder() to construct. + private PredefinedObd2RequestsCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private PredefinedObd2RequestsCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final PredefinedObd2RequestsCommand defaultInstance; + public static PredefinedObd2RequestsCommand getDefaultInstance() { + return defaultInstance; + } + + public PredefinedObd2RequestsCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PredefinedObd2RequestsCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + enabled_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PredefinedObd2RequestsCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredefinedObd2RequestsCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional bool enabled = 1; + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_; + /** + * optional bool enabled = 1; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool enabled = 1; + */ + public boolean getEnabled() { + return enabled_; + } + + private void initFields() { + enabled_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + enabled_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + } + + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand build() { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildPartial() { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = new com.openxc.BinaryMessages.PredefinedObd2RequestsCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.enabled_ = enabled_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) { + return mergeFrom((com.openxc.BinaryMessages.PredefinedObd2RequestsCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand other) { + if (other == com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance()) return this; + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional bool enabled = 1; + private boolean enabled_ ; + /** + * optional bool enabled = 1; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool enabled = 1; + */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 1; + */ + public Builder setEnabled(boolean value) { + bitField0_ |= 0x00000001; + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 1; + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.PredefinedObd2RequestsCommand) + } + + static { + defaultInstance = new PredefinedObd2RequestsCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) + } + public interface CommandResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -10267,6 +10864,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; + private static 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 internal_static_openxc_CommandResponse_descriptor; private static @@ -10313,7 +10915,7 @@ public final class BinaryMessages { "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\"\310\003\n\016ControlCommand\022)\n\004type\030\001 " + + "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" + @@ -10321,44 +10923,49 @@ public final class BinaryMessages { "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\"u\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\"\236\001\n\030Diagno" + - "sticControlCommand\022*\n\007request\030\001 \001(\0132\031.op" + - "enxc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'" + - ".openxc.DiagnosticControlCommand.Action\"" + - "\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passth" + - "roughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007" + - "enabled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassC", - "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024P" + - "ayloadFormatCommand\022:\n\006format\030\001 \001(\0162*.op" + - "enxc.PayloadFormatCommand.PayloadFormat\"" + - "\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002" + - "\"]\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" + - "\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162\036.o" + - "penxc.TranslatedMessage.Type\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.DynamicField\"\\\n\004" + - "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + - "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + - "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "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" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10382,7 +10989,7 @@ public final class BinaryMessages { 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", }); + 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 @@ -10407,32 +11014,38 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PayloadFormatCommand_descriptor, new java.lang.String[] { "Format", }); - internal_static_openxc_CommandResponse_descriptor = + 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(8); + 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(9); + 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(10); + 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_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 35e63518..140bc4b9 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\"\xc8\x03\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\"u\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\"\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\"]\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\";\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') @@ -80,11 +80,15 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='PAYLOAD_FORMAT', index=5, number=6, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='PREDEFINED_OBD2_REQUESTS', index=6, number=7, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=832, - serialized_end=949, + serialized_start=914, + serialized_end=1061, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -104,8 +108,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1081, - serialized_end=1110, + serialized_start=1193, + serialized_end=1222, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -125,8 +129,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1321, - serialized_end=1360, + serialized_start=1433, + serialized_end=1472, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -146,8 +150,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1678, - serialized_end=1711, + serialized_start=1840, + serialized_end=1873, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -171,8 +175,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2003, - serialized_end=2040, + serialized_start=2165, + serialized_end=2202, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -208,8 +212,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2198, - serialized_end=2290, + serialized_start=2360, + serialized_end=2452, ) @@ -361,6 +365,13 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='predefined_obd2_requests_command', full_name='openxc.ControlCommand.predefined_obd2_requests_command', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -372,7 +383,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=949, + serialized_end=1061, ) @@ -407,8 +418,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=952, - serialized_end=1110, + serialized_start=1064, + serialized_end=1222, ) @@ -442,8 +453,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1112, - serialized_end=1173, + serialized_start=1224, + serialized_end=1285, ) @@ -477,8 +488,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1175, - serialized_end=1235, + serialized_start=1287, + serialized_end=1347, ) @@ -506,8 +517,36 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1237, - serialized_end=1360, + serialized_start=1349, + serialized_end=1472, +) + + +_PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( + name='PredefinedObd2RequestsCommand', + full_name='openxc.PredefinedObd2RequestsCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='enabled', full_name='openxc.PredefinedObd2RequestsCommand.enabled', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1474, + serialized_end=1522, ) @@ -548,8 +587,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1362, - serialized_end=1455, + serialized_start=1524, + serialized_end=1617, ) @@ -633,8 +672,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1458, - serialized_end=1711, + serialized_start=1620, + serialized_end=1873, ) @@ -710,8 +749,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1714, - serialized_end=1875, + serialized_start=1876, + serialized_end=2037, ) @@ -760,8 +799,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1878, - serialized_end=2040, + serialized_start=2040, + serialized_end=2202, ) @@ -810,8 +849,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2043, - serialized_end=2290, + serialized_start=2205, + serialized_end=2452, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -826,6 +865,7 @@ _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICC _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; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION @@ -848,6 +888,7 @@ DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTRO DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND DESCRIPTOR.message_types_by_name['PayloadFormatCommand'] = _PAYLOADFORMATCOMMAND +DESCRIPTOR.message_types_by_name['PredefinedObd2RequestsCommand'] = _PREDEFINEDOBD2REQUESTSCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -896,6 +937,12 @@ class PayloadFormatCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) +class PredefinedObd2RequestsCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index f54c0906..c2b7f7c2 100644 --- a/openxc.proto +++ b/openxc.proto @@ -29,6 +29,7 @@ message ControlCommand { PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; PAYLOAD_FORMAT = 6; + PREDEFINED_OBD2_REQUESTS = 7; } optional Type type = 1; @@ -36,6 +37,7 @@ message ControlCommand { optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; optional PayloadFormatCommand payload_format_command = 5; + optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; } message DiagnosticControlCommand { @@ -64,6 +66,10 @@ message PayloadFormatCommand { optional PayloadFormat format = 1; } +message PredefinedObd2RequestsCommand { + optional bool enabled = 1; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 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 'gen/java/com/openxc/BinaryMessages.java') 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 28c895ef2fc4e152c506b0965d8f1830f848870e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 22:07:13 -0400 Subject: Give frame format field a more specific name. --- gen/cpp/openxc.pb | 8 +- gen/cpp/openxc.pb.c | 4 +- gen/cpp/openxc.pb.h | 8 +- gen/java/com/openxc/BinaryMessages.java | 178 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 80 +++++++------- openxc.proto | 2 +- 6 files changed, 140 insertions(+), 140 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 66f214fe..e89c2537 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Ž +” openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -15,14 +15,14 @@ TRANSLATED DIAGNOSTIC CONTROL_COMMAND -COMMAND_RESPONSE"– +COMMAND_RESPONSE"œ RawMessage bus ( message_id (  -data ( . -format (2.openxc.RawMessage.FrameFormat") +data ( 4 + frame_format (2.openxc.RawMessage.FrameFormat") FrameFormat STANDARD EXTENDED"¸ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 3a5ca0ff..a99c7ddf 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 Oct 6 21:30:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 22:07:24 2014. */ #include "openxc.pb.h" @@ -23,7 +23,7 @@ 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_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_RawMessage, frame_format, data, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 5f11ec1b..ca87e0bc 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 Oct 6 21:30:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 22:07:24 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -165,8 +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; + bool has_frame_format; + openxc_RawMessage_FrameFormat frame_format; } openxc_RawMessage; typedef struct _openxc_DiagnosticControlCommand { @@ -281,7 +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_RawMessage_frame_format_tag 4 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 #define openxc_TranslatedMessage_type_tag 1 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 0937ef5d..2e3cd56f 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1515,15 +1515,15 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getData(); - // optional .openxc.RawMessage.FrameFormat format = 4; + // optional .openxc.RawMessage.FrameFormat frame_format = 4; /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - boolean hasFormat(); + boolean hasFrameFormat(); /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat(); + com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat(); } /** * Protobuf type {@code openxc.RawMessage} @@ -1598,7 +1598,7 @@ public final class BinaryMessages { unknownFields.mergeVarintField(4, rawValue); } else { bitField0_ |= 0x00000008; - format_ = value; + frameFormat_ = value; } break; } @@ -1772,27 +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 frame_format = 4; + public static final int FRAME_FORMAT_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_; /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public boolean hasFormat() { + public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { - return format_; + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + return frameFormat_; } private void initFields() { bus_ = 0; messageId_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; - format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1816,7 +1816,7 @@ public final class BinaryMessages { output.writeBytes(3, data_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, format_.getNumber()); + output.writeEnum(4, frameFormat_.getNumber()); } getUnknownFields().writeTo(output); } @@ -1841,7 +1841,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, format_.getNumber()); + .computeEnumSize(4, frameFormat_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1965,7 +1965,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); - format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -2010,7 +2010,7 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.format_ = format_; + result.frameFormat_ = frameFormat_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2036,8 +2036,8 @@ public final class BinaryMessages { if (other.hasData()) { setData(other.getData()); } - if (other.hasFormat()) { - setFormat(other.getFormat()); + if (other.hasFrameFormat()) { + setFrameFormat(other.getFrameFormat()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2168,38 +2168,38 @@ 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 frame_format = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public boolean hasFormat() { + public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { - return format_; + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + return frameFormat_; } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public Builder setFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { + public Builder setFrameFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; - format_ = value; + frameFormat_ = value; onChanged(); return this; } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public Builder clearFormat() { + public Builder clearFrameFormat() { bitField0_ = (bitField0_ & ~0x00000008); - format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; onChanged(); return this; } @@ -11085,61 +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\"\226\001\n\nRawMes" + + "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\234\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" + "\004data\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.open" + + "xc.RawMessage.FrameFormat\")\n\013FrameFormat" + + "\022\014\n\010STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016Control" + + "Command\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCo" + + "mmand.Type\022<\n\022diagnostic_request\030\002 \001(\0132 " + + ".openxc.DiagnosticControlCommand\022G\n\030pass" + + "through_mode_request\030\003 \001(\0132%.openxc.Pass" + + "throughModeControlCommand\022O\n acceptance_", + "filter_bypass_command\030\004 \001(\0132%.openxc.Acc" + + "eptanceFilterBypassCommand\022<\n\026payload_fo" + + "rmat_command\030\005 \001(\0132\034.openxc.PayloadForma" + + "tCommand\022O\n predefined_obd2_requests_com" + + "mand\030\006 \001(\0132%.openxc.PredefinedObd2Reques" + + "tsCommand\"\223\001\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVIC" + + "E_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\030PREDEFINED_OBD2_REQUESTS\020\007\"" + + "\236\001\n\030DiagnosticControlCommand\022*\n\007request\030", + "\001 \001(\0132\031.openxc.DiagnosticRequest\0227\n\006acti" + + "on\030\002 \001(\0162\'.openxc.DiagnosticControlComma" + + "nd.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002" + + "\"=\n\035PassthroughModeControlCommand\022\013\n\003bus" + + "\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035AcceptanceFil" + + "terBypassCommand\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.Payl" + + "oadFormat\"\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010" + + "PROTOBUF\020\002\"0\n\035PredefinedObd2RequestsComm", + "and\022\017\n\007enabled\030\001 \001(\010\"]\n\017CommandResponse\022" + + ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + + "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + + "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + + "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + + "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + + "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu", + "s\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\007success\030\005 \001(\010\022\036\n\026negat" + + "ive_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.DynamicField.Type\022\024\n\014str" + + "ing_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\021TranslatedMessa" + + "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + + "age.Type\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.ope" + + "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + + "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + + "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + + "enxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11157,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", "Format", }); + new java.lang.String[] { "Bus", "MessageId", "Data", "FrameFormat", }); 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 b2721d33..d69dcb5a 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\"\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') + 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\"\x9c\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\x34\n\x0c\x66rame_format\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') @@ -67,8 +67,8 @@ _RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=541, - serialized_end=582, + serialized_start=547, + serialized_end=588, ) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( @@ -108,8 +108,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1006, - serialized_end=1153, + serialized_start=1012, + serialized_end=1159, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -129,8 +129,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1285, - serialized_end=1314, + serialized_start=1291, + serialized_end=1320, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -150,8 +150,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1525, - serialized_end=1564, + serialized_start=1531, + serialized_end=1570, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -171,8 +171,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1932, - serialized_end=1965, + serialized_start=1938, + serialized_end=1971, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -196,8 +196,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2257, - serialized_end=2294, + serialized_start=2263, + serialized_end=2300, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -233,8 +233,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2452, - serialized_end=2544, + serialized_start=2458, + serialized_end=2550, ) @@ -331,7 +331,7 @@ _RAWMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='format', full_name='openxc.RawMessage.format', index=3, + name='frame_format', full_name='openxc.RawMessage.frame_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, @@ -348,7 +348,7 @@ _RAWMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=432, - serialized_end=582, + serialized_end=588, ) @@ -411,8 +411,8 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=585, - serialized_end=1153, + serialized_start=591, + serialized_end=1159, ) @@ -447,8 +447,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1156, - serialized_end=1314, + serialized_start=1162, + serialized_end=1320, ) @@ -482,8 +482,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1316, - serialized_end=1377, + serialized_start=1322, + serialized_end=1383, ) @@ -517,8 +517,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1379, - serialized_end=1439, + serialized_start=1385, + serialized_end=1445, ) @@ -546,8 +546,8 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1441, - serialized_end=1564, + serialized_start=1447, + serialized_end=1570, ) @@ -574,8 +574,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1566, - serialized_end=1614, + serialized_start=1572, + serialized_end=1620, ) @@ -616,8 +616,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1616, - serialized_end=1709, + serialized_start=1622, + serialized_end=1715, ) @@ -701,8 +701,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1712, - serialized_end=1965, + serialized_start=1718, + serialized_end=1971, ) @@ -778,8 +778,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1968, - serialized_end=2129, + serialized_start=1974, + serialized_end=2135, ) @@ -828,8 +828,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2132, - serialized_end=2294, + serialized_start=2138, + serialized_end=2300, ) @@ -878,8 +878,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2297, - serialized_end=2544, + serialized_start=2303, + serialized_end=2550, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -889,7 +889,7 @@ _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.fields_by_name['frame_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 diff --git a/openxc.proto b/openxc.proto index 3b23be5c..3c0a51d4 100644 --- a/openxc.proto +++ b/openxc.proto @@ -23,7 +23,7 @@ message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; optional bytes data = 3; - optional FrameFormat format = 4; + optional FrameFormat frame_format = 4; } message ControlCommand { -- cgit 1.2.3-korg From 9e84f7713ab25ddb69e6f46cf34285a09ee9e28b Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:12:02 -0400 Subject: Deprecate "translated" and "raw" names in binary format. Fixed #16. --- gen/cpp/openxc.pb | 24 +- gen/cpp/openxc.pb.c | 32 +- gen/cpp/openxc.pb.h | 109 ++--- gen/java/com/openxc/BinaryMessages.java | 825 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 164 +++---- openxc.proto | 10 +- 6 files changed, 578 insertions(+), 586 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index e89c2537..88993ab5 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,28 +1,28 @@ -” - openxc.protoopenxc"” +€ + openxc.protoopenxc"ˆ VehicleMessage) type (2.openxc.VehicleMessage.Type' - raw_message ( 2.openxc.RawMessage5 -translated_message ( 2.openxc.TranslatedMessage7 + can_message ( 2.openxc.CanMessage- +simple_message ( 2.openxc.SimpleMessage7 diagnostic_response ( 2.openxc.DiagnosticResponse/ control_command ( 2.openxc.ControlCommand1 -command_response ( 2.openxc.CommandResponse"Z +command_response ( 2.openxc.CommandResponse"V Type -RAW +CAN -TRANSLATED +SIMPLE DIAGNOSTIC CONTROL_COMMAND COMMAND_RESPONSE"œ -RawMessage +CanMessage bus ( message_id (  data ( 4 - frame_format (2.openxc.RawMessage.FrameFormat") + frame_format (2.openxc.CanMessage.FrameFormat") FrameFormat STANDARD EXTENDED"¸ @@ -99,9 +99,9 @@ message_id (  STRING NUM -BOOL"÷ -TranslatedMessage, -type (2.openxc.TranslatedMessage.Type +BOOL"ï + SimpleMessage( +type (2.openxc.SimpleMessage.Type name ( # value ( 2.openxc.DynamicField# event ( 2.openxc.DynamicField"\ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index a99c7ddf..b9d6d955 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 Oct 6 22:07:24 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:12:27 2014. */ #include "openxc.pb.h" @@ -11,19 +11,19 @@ const pb_field_t openxc_VehicleMessage_fields[7] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_VehicleMessage, type, type, 0), - PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, raw_message, type, &openxc_RawMessage_fields), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields), - PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, translated_message, &openxc_DiagnosticResponse_fields), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, can_message, type, &openxc_CanMessage_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, simple_message, can_message, &openxc_SimpleMessage_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, simple_message, &openxc_DiagnosticResponse_fields), PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, control_command, diagnostic_response, &openxc_ControlCommand_fields), PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, command_response, control_command, &openxc_CommandResponse_fields), PB_LAST_FIELD }; -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, frame_format, data, 0), +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, CALLBACK, OTHER, openxc_CanMessage, data, message_id, 0), + PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_CanMessage, frame_format, data, 0), PB_LAST_FIELD }; @@ -105,11 +105,11 @@ const pb_field_t openxc_DynamicField_fields[5] = { PB_LAST_FIELD }; -const pb_field_t openxc_TranslatedMessage_fields[5] = { - PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_TranslatedMessage, type, type, 0), - PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, name, type, 0), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, value, name, &openxc_DynamicField_fields), - PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, event, value, &openxc_DynamicField_fields), +const pb_field_t openxc_SimpleMessage_fields[5] = { + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_SimpleMessage, type, type, 0), + PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, openxc_SimpleMessage, name, type, 0), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, value, name, &openxc_DynamicField_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, event, value, &openxc_DynamicField_fields), PB_LAST_FIELD }; @@ -123,7 +123,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && pb_membersize(openxc_VehicleMessage, simple_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_SimpleMessage, value) < 65536 && pb_membersize(openxc_SimpleMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -134,7 +134,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 256 && pb_membersize(openxc_VehicleMessage, simple_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_SimpleMessage, value) < 256 && pb_membersize(openxc_SimpleMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index ca87e0bc..38107b33 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 Oct 6 22:07:24 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:12:27 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -15,17 +15,17 @@ extern "C" { /* Enum definitions */ typedef enum _openxc_VehicleMessage_Type { - openxc_VehicleMessage_Type_RAW = 1, - openxc_VehicleMessage_Type_TRANSLATED = 2, + openxc_VehicleMessage_Type_CAN = 1, + openxc_VehicleMessage_Type_SIMPLE = 2, openxc_VehicleMessage_Type_DIAGNOSTIC = 3, openxc_VehicleMessage_Type_CONTROL_COMMAND = 4, 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_CanMessage_FrameFormat { + openxc_CanMessage_FrameFormat_STANDARD = 1, + openxc_CanMessage_FrameFormat_EXTENDED = 2 +} openxc_CanMessage_FrameFormat; typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, @@ -58,14 +58,14 @@ typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_BOOL = 3 } openxc_DynamicField_Type; -typedef enum _openxc_TranslatedMessage_Type { - openxc_TranslatedMessage_Type_STRING = 1, - openxc_TranslatedMessage_Type_NUM = 2, - openxc_TranslatedMessage_Type_BOOL = 3, - openxc_TranslatedMessage_Type_EVENTED_STRING = 4, - openxc_TranslatedMessage_Type_EVENTED_NUM = 5, - openxc_TranslatedMessage_Type_EVENTED_BOOL = 6 -} openxc_TranslatedMessage_Type; +typedef enum _openxc_SimpleMessage_Type { + openxc_SimpleMessage_Type_STRING = 1, + openxc_SimpleMessage_Type_NUM = 2, + openxc_SimpleMessage_Type_BOOL = 3, + openxc_SimpleMessage_Type_EVENTED_STRING = 4, + openxc_SimpleMessage_Type_EVENTED_NUM = 5, + openxc_SimpleMessage_Type_EVENTED_BOOL = 6 +} openxc_SimpleMessage_Type; /* Struct definitions */ typedef struct _openxc_AcceptanceFilterBypassCommand { @@ -75,6 +75,16 @@ typedef struct _openxc_AcceptanceFilterBypassCommand { bool bypass; } openxc_AcceptanceFilterBypassCommand; +typedef struct _openxc_CanMessage { + bool has_bus; + int32_t bus; + bool has_message_id; + uint32_t message_id; + pb_callback_t data; + bool has_frame_format; + openxc_CanMessage_FrameFormat frame_format; +} openxc_CanMessage; + typedef struct _openxc_CommandResponse { bool has_type; openxc_ControlCommand_Type type; @@ -156,19 +166,6 @@ typedef struct _openxc_PredefinedObd2RequestsCommand { bool enabled; } openxc_PredefinedObd2RequestsCommand; -typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; - -typedef struct _openxc_RawMessage { - bool has_bus; - int32_t bus; - bool has_message_id; - uint32_t message_id; - bool has_data; - openxc_RawMessage_data_t data; - bool has_frame_format; - openxc_RawMessage_FrameFormat frame_format; -} openxc_RawMessage; - typedef struct _openxc_DiagnosticControlCommand { bool has_request; openxc_DiagnosticRequest request; @@ -176,16 +173,15 @@ typedef struct _openxc_DiagnosticControlCommand { openxc_DiagnosticControlCommand_Action action; } openxc_DiagnosticControlCommand; -typedef struct _openxc_TranslatedMessage { +typedef struct _openxc_SimpleMessage { bool has_type; - openxc_TranslatedMessage_Type type; - bool has_name; - char name[100]; + openxc_SimpleMessage_Type type; + pb_callback_t name; bool has_value; openxc_DynamicField value; bool has_event; openxc_DynamicField event; -} openxc_TranslatedMessage; +} openxc_SimpleMessage; typedef struct _openxc_ControlCommand { bool has_type; @@ -205,10 +201,10 @@ typedef struct _openxc_ControlCommand { typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; - bool has_raw_message; - openxc_RawMessage raw_message; - bool has_translated_message; - openxc_TranslatedMessage translated_message; + bool has_can_message; + openxc_CanMessage can_message; + bool has_simple_message; + openxc_SimpleMessage simple_message; bool has_diagnostic_response; openxc_DiagnosticResponse diagnostic_response; bool has_control_command; @@ -220,8 +216,8 @@ typedef struct _openxc_VehicleMessage { /* Default values for struct fields */ /* 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}}, false, (openxc_RawMessage_FrameFormat)0} +#define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_default, false, openxc_SimpleMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} +#define openxc_CanMessage_init_default {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_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} @@ -232,9 +228,9 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} #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}}, false, (openxc_RawMessage_FrameFormat)0} +#define openxc_SimpleMessage_init_default {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} +#define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} +#define openxc_CanMessage_init_zero {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_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} @@ -245,11 +241,15 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} #define openxc_DynamicField_init_zero {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_TranslatedMessage_init_zero {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} +#define openxc_SimpleMessage_init_zero {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ #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_data_tag 3 +#define openxc_CanMessage_frame_format_tag 4 #define openxc_CommandResponse_type_tag 1 #define openxc_CommandResponse_message_tag 2 #define openxc_CommandResponse_status_tag 3 @@ -278,16 +278,12 @@ typedef struct _openxc_VehicleMessage { #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_PayloadFormatCommand_format_tag 1 #define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 -#define openxc_RawMessage_bus_tag 1 -#define openxc_RawMessage_message_id_tag 2 -#define openxc_RawMessage_data_tag 3 -#define openxc_RawMessage_frame_format_tag 4 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 -#define openxc_TranslatedMessage_type_tag 1 -#define openxc_TranslatedMessage_name_tag 2 -#define openxc_TranslatedMessage_value_tag 3 -#define openxc_TranslatedMessage_event_tag 4 +#define openxc_SimpleMessage_type_tag 1 +#define openxc_SimpleMessage_name_tag 2 +#define openxc_SimpleMessage_value_tag 3 +#define openxc_SimpleMessage_event_tag 4 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 @@ -295,15 +291,15 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_payload_format_command_tag 5 #define openxc_ControlCommand_predefined_obd2_requests_command_tag 6 #define openxc_VehicleMessage_type_tag 1 -#define openxc_VehicleMessage_raw_message_tag 2 -#define openxc_VehicleMessage_translated_message_tag 3 +#define openxc_VehicleMessage_can_message_tag 2 +#define openxc_VehicleMessage_simple_message_tag 3 #define openxc_VehicleMessage_diagnostic_response_tag 4 #define openxc_VehicleMessage_control_command_tag 5 #define openxc_VehicleMessage_command_response_tag 6 /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; -extern const pb_field_t openxc_RawMessage_fields[5]; +extern const pb_field_t openxc_CanMessage_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]; @@ -314,11 +310,9 @@ extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; extern const pb_field_t openxc_DynamicField_fields[5]; -extern const pb_field_t openxc_TranslatedMessage_fields[5]; +extern const pb_field_t openxc_SimpleMessage_fields[5]; /* Maximum encoded size of messages (where known) */ -#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 @@ -329,7 +323,6 @@ extern const pb_field_t openxc_TranslatedMessage_fields[5]; #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 -#define openxc_TranslatedMessage_size 350 #ifdef __cplusplus } /* extern "C" */ diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 2e3cd56f..cb49929c 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -21,33 +21,33 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.VehicleMessage.Type getType(); - // optional .openxc.RawMessage raw_message = 2; + // optional .openxc.CanMessage can_message = 2; /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - boolean hasRawMessage(); + boolean hasCanMessage(); /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - com.openxc.BinaryMessages.RawMessage getRawMessage(); + com.openxc.BinaryMessages.CanMessage getCanMessage(); /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder(); + com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder(); - // optional .openxc.TranslatedMessage translated_message = 3; + // optional .openxc.SimpleMessage simple_message = 3; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - boolean hasTranslatedMessage(); + boolean hasSimpleMessage(); /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage(); + com.openxc.BinaryMessages.SimpleMessage getSimpleMessage(); /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); + com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder(); // optional .openxc.DiagnosticResponse diagnostic_response = 4; /** @@ -154,27 +154,27 @@ public final class BinaryMessages { break; } case 18: { - com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null; + com.openxc.BinaryMessages.CanMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = rawMessage_.toBuilder(); + subBuilder = canMessage_.toBuilder(); } - rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry); + canMessage_ = input.readMessage(com.openxc.BinaryMessages.CanMessage.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(rawMessage_); - rawMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(canMessage_); + canMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000002; break; } case 26: { - com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null; + com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = translatedMessage_.toBuilder(); + subBuilder = simpleMessage_.toBuilder(); } - translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry); + simpleMessage_ = input.readMessage(com.openxc.BinaryMessages.SimpleMessage.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(translatedMessage_); - translatedMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(simpleMessage_); + simpleMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; @@ -263,13 +263,13 @@ public final class BinaryMessages { public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** - * RAW = 1; + * CAN = 1; */ - RAW(0, 1), + CAN(0, 1), /** - * TRANSLATED = 2; + * SIMPLE = 2; */ - TRANSLATED(1, 2), + SIMPLE(1, 2), /** * DIAGNOSTIC = 3; */ @@ -285,13 +285,13 @@ public final class BinaryMessages { ; /** - * RAW = 1; + * CAN = 1; */ - public static final int RAW_VALUE = 1; + public static final int CAN_VALUE = 1; /** - * TRANSLATED = 2; + * SIMPLE = 2; */ - public static final int TRANSLATED_VALUE = 2; + public static final int SIMPLE_VALUE = 2; /** * DIAGNOSTIC = 3; */ @@ -310,8 +310,8 @@ public final class BinaryMessages { public static Type valueOf(int value) { switch (value) { - case 1: return RAW; - case 2: return TRANSLATED; + case 1: return CAN; + case 2: return SIMPLE; case 3: return DIAGNOSTIC; case 4: return CONTROL_COMMAND; case 5: return COMMAND_RESPONSE; @@ -383,48 +383,48 @@ public final class BinaryMessages { return type_; } - // optional .openxc.RawMessage raw_message = 2; - public static final int RAW_MESSAGE_FIELD_NUMBER = 2; - private com.openxc.BinaryMessages.RawMessage rawMessage_; + // optional .openxc.CanMessage can_message = 2; + public static final int CAN_MESSAGE_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.CanMessage canMessage_; /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public boolean hasRawMessage() { + public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessage getRawMessage() { - return rawMessage_; + public com.openxc.BinaryMessages.CanMessage getCanMessage() { + return canMessage_; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() { - return rawMessage_; + public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { + return canMessage_; } - // optional .openxc.TranslatedMessage translated_message = 3; - public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3; - private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_; + // optional .openxc.SimpleMessage simple_message = 3; + public static final int SIMPLE_MESSAGE_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.SimpleMessage simpleMessage_; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public boolean hasTranslatedMessage() { + public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { - return translatedMessage_; + public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { + return simpleMessage_; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - return translatedMessage_; + public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { + return simpleMessage_; } // optional .openxc.DiagnosticResponse diagnostic_response = 4; @@ -494,9 +494,9 @@ public final class BinaryMessages { } private void initFields() { - type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; - rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; + canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); + simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); @@ -517,10 +517,10 @@ public final class BinaryMessages { output.writeEnum(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, rawMessage_); + output.writeMessage(2, canMessage_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, translatedMessage_); + output.writeMessage(3, simpleMessage_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(4, diagnosticResponse_); @@ -546,11 +546,11 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rawMessage_); + .computeMessageSize(2, canMessage_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, translatedMessage_); + .computeMessageSize(3, simpleMessage_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream @@ -672,8 +672,8 @@ public final class BinaryMessages { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRawMessageFieldBuilder(); - getTranslatedMessageFieldBuilder(); + getCanMessageFieldBuilder(); + getSimpleMessageFieldBuilder(); getDiagnosticResponseFieldBuilder(); getControlCommandFieldBuilder(); getCommandResponseFieldBuilder(); @@ -685,18 +685,18 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; bitField0_ = (bitField0_ & ~0x00000001); - if (rawMessageBuilder_ == null) { - rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + if (canMessageBuilder_ == null) { + canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); } else { - rawMessageBuilder_.clear(); + canMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); - if (translatedMessageBuilder_ == null) { - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + if (simpleMessageBuilder_ == null) { + simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); } else { - translatedMessageBuilder_.clear(); + simpleMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); if (diagnosticResponseBuilder_ == null) { @@ -752,18 +752,18 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (rawMessageBuilder_ == null) { - result.rawMessage_ = rawMessage_; + if (canMessageBuilder_ == null) { + result.canMessage_ = canMessage_; } else { - result.rawMessage_ = rawMessageBuilder_.build(); + result.canMessage_ = canMessageBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (translatedMessageBuilder_ == null) { - result.translatedMessage_ = translatedMessage_; + if (simpleMessageBuilder_ == null) { + result.simpleMessage_ = simpleMessage_; } else { - result.translatedMessage_ = translatedMessageBuilder_.build(); + result.simpleMessage_ = simpleMessageBuilder_.build(); } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; @@ -808,11 +808,11 @@ public final class BinaryMessages { if (other.hasType()) { setType(other.getType()); } - if (other.hasRawMessage()) { - mergeRawMessage(other.getRawMessage()); + if (other.hasCanMessage()) { + mergeCanMessage(other.getCanMessage()); } - if (other.hasTranslatedMessage()) { - mergeTranslatedMessage(other.getTranslatedMessage()); + if (other.hasSimpleMessage()) { + mergeSimpleMessage(other.getSimpleMessage()); } if (other.hasDiagnosticResponse()) { mergeDiagnosticResponse(other.getDiagnosticResponse()); @@ -851,7 +851,7 @@ 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.RAW; + private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; /** * optional .openxc.VehicleMessage.Type type = 1; */ @@ -881,243 +881,243 @@ public final class BinaryMessages { */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; onChanged(); return this; } - // optional .openxc.RawMessage raw_message = 2; - private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + // 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.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_; + com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> canMessageBuilder_; /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public boolean hasRawMessage() { + public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessage getRawMessage() { - if (rawMessageBuilder_ == null) { - return rawMessage_; + public com.openxc.BinaryMessages.CanMessage getCanMessage() { + if (canMessageBuilder_ == null) { + return canMessage_; } else { - return rawMessageBuilder_.getMessage(); + return canMessageBuilder_.getMessage(); } } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) { - if (rawMessageBuilder_ == null) { + public Builder setCanMessage(com.openxc.BinaryMessages.CanMessage value) { + if (canMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - rawMessage_ = value; + canMessage_ = value; onChanged(); } else { - rawMessageBuilder_.setMessage(value); + canMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder setRawMessage( - com.openxc.BinaryMessages.RawMessage.Builder builderForValue) { - if (rawMessageBuilder_ == null) { - rawMessage_ = builderForValue.build(); + public Builder setCanMessage( + com.openxc.BinaryMessages.CanMessage.Builder builderForValue) { + if (canMessageBuilder_ == null) { + canMessage_ = builderForValue.build(); onChanged(); } else { - rawMessageBuilder_.setMessage(builderForValue.build()); + canMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) { - if (rawMessageBuilder_ == null) { + public Builder mergeCanMessage(com.openxc.BinaryMessages.CanMessage value) { + if (canMessageBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && - rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) { - rawMessage_ = - com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial(); + canMessage_ != com.openxc.BinaryMessages.CanMessage.getDefaultInstance()) { + canMessage_ = + com.openxc.BinaryMessages.CanMessage.newBuilder(canMessage_).mergeFrom(value).buildPartial(); } else { - rawMessage_ = value; + canMessage_ = value; } onChanged(); } else { - rawMessageBuilder_.mergeFrom(value); + canMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder clearRawMessage() { - if (rawMessageBuilder_ == null) { - rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + public Builder clearCanMessage() { + if (canMessageBuilder_ == null) { + canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); onChanged(); } else { - rawMessageBuilder_.clear(); + canMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() { + public com.openxc.BinaryMessages.CanMessage.Builder getCanMessageBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRawMessageFieldBuilder().getBuilder(); + return getCanMessageFieldBuilder().getBuilder(); } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() { - if (rawMessageBuilder_ != null) { - return rawMessageBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { + if (canMessageBuilder_ != null) { + return canMessageBuilder_.getMessageOrBuilder(); } else { - return rawMessage_; + return canMessage_; } } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> - getRawMessageFieldBuilder() { - if (rawMessageBuilder_ == null) { - rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>( - rawMessage_, + com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> + getCanMessageFieldBuilder() { + if (canMessageBuilder_ == null) { + canMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder>( + canMessage_, getParentForChildren(), isClean()); - rawMessage_ = null; + canMessage_ = null; } - return rawMessageBuilder_; + return canMessageBuilder_; } - // optional .openxc.TranslatedMessage translated_message = 3; - private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + // 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.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_; + com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> simpleMessageBuilder_; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public boolean hasTranslatedMessage() { + public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - return translatedMessage_; + public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { + if (simpleMessageBuilder_ == null) { + return simpleMessage_; } else { - return translatedMessageBuilder_.getMessage(); + return simpleMessageBuilder_.getMessage(); } } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { + public Builder setSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { + if (simpleMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - translatedMessage_ = value; + simpleMessage_ = value; onChanged(); } else { - translatedMessageBuilder_.setMessage(value); + simpleMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder setTranslatedMessage( - com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = builderForValue.build(); + public Builder setSimpleMessage( + com.openxc.BinaryMessages.SimpleMessage.Builder builderForValue) { + if (simpleMessageBuilder_ == null) { + simpleMessage_ = builderForValue.build(); onChanged(); } else { - translatedMessageBuilder_.setMessage(builderForValue.build()); + simpleMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { + public Builder mergeSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { + if (simpleMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && - translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) { - translatedMessage_ = - com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial(); + simpleMessage_ != com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) { + simpleMessage_ = + com.openxc.BinaryMessages.SimpleMessage.newBuilder(simpleMessage_).mergeFrom(value).buildPartial(); } else { - translatedMessage_ = value; + simpleMessage_ = value; } onChanged(); } else { - translatedMessageBuilder_.mergeFrom(value); + simpleMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder clearTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + public Builder clearSimpleMessage() { + if (simpleMessageBuilder_ == null) { + simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); onChanged(); } else { - translatedMessageBuilder_.clear(); + simpleMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() { + public com.openxc.BinaryMessages.SimpleMessage.Builder getSimpleMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getTranslatedMessageFieldBuilder().getBuilder(); + return getSimpleMessageFieldBuilder().getBuilder(); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - if (translatedMessageBuilder_ != null) { - return translatedMessageBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { + if (simpleMessageBuilder_ != null) { + return simpleMessageBuilder_.getMessageOrBuilder(); } else { - return translatedMessage_; + return simpleMessage_; } } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> - getTranslatedMessageFieldBuilder() { - if (translatedMessageBuilder_ == null) { - translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>( - translatedMessage_, + com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> + getSimpleMessageFieldBuilder() { + if (simpleMessageBuilder_ == null) { + simpleMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder>( + simpleMessage_, getParentForChildren(), isClean()); - translatedMessage_ = null; + simpleMessage_ = null; } - return translatedMessageBuilder_; + return simpleMessageBuilder_; } // optional .openxc.DiagnosticResponse diagnostic_response = 4; @@ -1482,7 +1482,7 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - public interface RawMessageOrBuilder + public interface CanMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 bus = 1; @@ -1515,35 +1515,35 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getData(); - // optional .openxc.RawMessage.FrameFormat frame_format = 4; + // optional .openxc.CanMessage.FrameFormat frame_format = 4; /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ boolean hasFrameFormat(); /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat(); + com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat(); } /** - * Protobuf type {@code openxc.RawMessage} + * Protobuf type {@code openxc.CanMessage} */ - public static final class RawMessage extends + public static final class CanMessage extends com.google.protobuf.GeneratedMessage - implements RawMessageOrBuilder { - // Use RawMessage.newBuilder() to construct. - private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements CanMessageOrBuilder { + // Use CanMessage.newBuilder() to construct. + private CanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private CanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final RawMessage defaultInstance; - public static RawMessage getDefaultInstance() { + private static final CanMessage defaultInstance; + public static CanMessage getDefaultInstance() { return defaultInstance; } - public RawMessage getDefaultInstanceForType() { + public CanMessage getDefaultInstanceForType() { return defaultInstance; } @@ -1553,7 +1553,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private RawMessage( + private CanMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1593,7 +1593,7 @@ public final class BinaryMessages { } case 32: { int rawValue = input.readEnum(); - com.openxc.BinaryMessages.RawMessage.FrameFormat value = com.openxc.BinaryMessages.RawMessage.FrameFormat.valueOf(rawValue); + com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(4, rawValue); } else { @@ -1616,33 +1616,33 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RawMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CanMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RawMessage(input, extensionRegistry); + return new CanMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } /** - * Protobuf enum {@code openxc.RawMessage.FrameFormat} + * Protobuf enum {@code openxc.CanMessage.FrameFormat} */ public enum FrameFormat implements com.google.protobuf.ProtocolMessageEnum { @@ -1698,7 +1698,7 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.openxc.BinaryMessages.RawMessage.getDescriptor().getEnumTypes().get(0); + return com.openxc.BinaryMessages.CanMessage.getDescriptor().getEnumTypes().get(0); } private static final FrameFormat[] VALUES = values(); @@ -1720,7 +1720,7 @@ public final class BinaryMessages { this.value = value; } - // @@protoc_insertion_point(enum_scope:openxc.RawMessage.FrameFormat) + // @@protoc_insertion_point(enum_scope:openxc.CanMessage.FrameFormat) } private int bitField0_; @@ -1772,19 +1772,19 @@ public final class BinaryMessages { return data_; } - // optional .openxc.RawMessage.FrameFormat frame_format = 4; + // optional .openxc.CanMessage.FrameFormat frame_format = 4; public static final int FRAME_FORMAT_FIELD_NUMBER = 4; - private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_; + private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_; /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } @@ -1792,7 +1792,7 @@ public final class BinaryMessages { bus_ = 0; messageId_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; - frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1855,53 +1855,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.CanMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.CanMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1910,7 +1910,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.CanMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1922,24 +1922,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.RawMessage} + * Protobuf type {@code openxc.CanMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.RawMessageOrBuilder { + implements com.openxc.BinaryMessages.CanMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.CanMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1965,7 +1965,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); - frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1976,23 +1976,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.CanMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.RawMessage build() { - com.openxc.BinaryMessages.RawMessage result = buildPartial(); + public com.openxc.BinaryMessages.CanMessage build() { + com.openxc.BinaryMessages.CanMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.RawMessage buildPartial() { - com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this); + public com.openxc.BinaryMessages.CanMessage buildPartial() { + com.openxc.BinaryMessages.CanMessage result = new com.openxc.BinaryMessages.CanMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2017,16 +2017,16 @@ public final class BinaryMessages { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.RawMessage) { - return mergeFrom((com.openxc.BinaryMessages.RawMessage)other); + if (other instanceof com.openxc.BinaryMessages.CanMessage) { + return mergeFrom((com.openxc.BinaryMessages.CanMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) { - if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.CanMessage other) { + if (other == com.openxc.BinaryMessages.CanMessage.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } @@ -2051,11 +2051,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.RawMessage parsedMessage = null; + com.openxc.BinaryMessages.CanMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.CanMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2168,24 +2168,24 @@ public final class BinaryMessages { return this; } - // optional .openxc.RawMessage.FrameFormat frame_format = 4; - private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + // optional .openxc.CanMessage.FrameFormat frame_format = 4; + private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - public Builder setFrameFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { + public Builder setFrameFormat(com.openxc.BinaryMessages.CanMessage.FrameFormat value) { if (value == null) { throw new NullPointerException(); } @@ -2195,24 +2195,24 @@ public final class BinaryMessages { return this; } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ public Builder clearFrameFormat() { bitField0_ = (bitField0_ & ~0x00000008); - frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.RawMessage) + // @@protoc_insertion_point(builder_scope:openxc.CanMessage) } static { - defaultInstance = new RawMessage(true); + defaultInstance = new CanMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.RawMessage) + // @@protoc_insertion_point(class_scope:openxc.CanMessage) } public interface ControlCommandOrBuilder @@ -9938,18 +9938,18 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DynamicField) } - public interface TranslatedMessageOrBuilder + public interface SimpleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .openxc.TranslatedMessage.Type type = 1; + // optional .openxc.SimpleMessage.Type type = 1; /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ boolean hasType(); /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - com.openxc.BinaryMessages.TranslatedMessage.Type getType(); + com.openxc.BinaryMessages.SimpleMessage.Type getType(); // optional string name = 2; /** @@ -9995,24 +9995,24 @@ public final class BinaryMessages { com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } /** - * Protobuf type {@code openxc.TranslatedMessage} + * Protobuf type {@code openxc.SimpleMessage} */ - public static final class TranslatedMessage extends + public static final class SimpleMessage extends com.google.protobuf.GeneratedMessage - implements TranslatedMessageOrBuilder { - // Use TranslatedMessage.newBuilder() to construct. - private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements SimpleMessageOrBuilder { + // Use SimpleMessage.newBuilder() to construct. + private SimpleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private SimpleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final TranslatedMessage defaultInstance; - public static TranslatedMessage getDefaultInstance() { + private static final SimpleMessage defaultInstance; + public static SimpleMessage getDefaultInstance() { return defaultInstance; } - public TranslatedMessage getDefaultInstanceForType() { + public SimpleMessage getDefaultInstanceForType() { return defaultInstance; } @@ -10022,7 +10022,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private TranslatedMessage( + private SimpleMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -10047,7 +10047,7 @@ public final class BinaryMessages { } case 8: { int rawValue = input.readEnum(); - com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue); + com.openxc.BinaryMessages.SimpleMessage.Type value = com.openxc.BinaryMessages.SimpleMessage.Type.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { @@ -10101,33 +10101,33 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TranslatedMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslatedMessage(input, extensionRegistry); + return new SimpleMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } /** - * Protobuf enum {@code openxc.TranslatedMessage.Type} + * Protobuf enum {@code openxc.SimpleMessage.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { @@ -10219,7 +10219,7 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0); + return com.openxc.BinaryMessages.SimpleMessage.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); @@ -10241,23 +10241,23 @@ public final class BinaryMessages { this.value = value; } - // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type) + // @@protoc_insertion_point(enum_scope:openxc.SimpleMessage.Type) } private int bitField0_; - // optional .openxc.TranslatedMessage.Type type = 1; + // optional .openxc.SimpleMessage.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; - private com.openxc.BinaryMessages.TranslatedMessage.Type type_; + private com.openxc.BinaryMessages.SimpleMessage.Type type_; /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - public com.openxc.BinaryMessages.TranslatedMessage.Type getType() { + public com.openxc.BinaryMessages.SimpleMessage.Type getType() { return type_; } @@ -10349,7 +10349,7 @@ public final class BinaryMessages { } private void initFields() { - type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; name_ = ""; value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -10415,53 +10415,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.SimpleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.SimpleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10470,7 +10470,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.SimpleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10482,24 +10482,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.TranslatedMessage} + * Protobuf type {@code openxc.SimpleMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder { + implements com.openxc.BinaryMessages.SimpleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.SimpleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -10521,7 +10521,7 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; bitField0_ = (bitField0_ & ~0x00000001); name_ = ""; bitField0_ = (bitField0_ & ~0x00000002); @@ -10546,23 +10546,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.SimpleMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.TranslatedMessage build() { - com.openxc.BinaryMessages.TranslatedMessage result = buildPartial(); + public com.openxc.BinaryMessages.SimpleMessage build() { + com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.TranslatedMessage buildPartial() { - com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this); + public com.openxc.BinaryMessages.SimpleMessage buildPartial() { + com.openxc.BinaryMessages.SimpleMessage result = new com.openxc.BinaryMessages.SimpleMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -10595,16 +10595,16 @@ public final class BinaryMessages { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) { - return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other); + if (other instanceof com.openxc.BinaryMessages.SimpleMessage) { + return mergeFrom((com.openxc.BinaryMessages.SimpleMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) { - if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.SimpleMessage other) { + if (other == com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } @@ -10631,11 +10631,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null; + com.openxc.BinaryMessages.SimpleMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.SimpleMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -10646,24 +10646,24 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.TranslatedMessage.Type type = 1; - private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + // optional .openxc.SimpleMessage.Type type = 1; + private com.openxc.BinaryMessages.SimpleMessage.Type type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - public com.openxc.BinaryMessages.TranslatedMessage.Type getType() { + public com.openxc.BinaryMessages.SimpleMessage.Type getType() { return type_; } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) { + public Builder setType(com.openxc.BinaryMessages.SimpleMessage.Type value) { if (value == null) { throw new NullPointerException(); } @@ -10673,11 +10673,11 @@ public final class BinaryMessages { return this; } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; onChanged(); return this; } @@ -10990,15 +10990,15 @@ public final class BinaryMessages { return eventBuilder_; } - // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) + // @@protoc_insertion_point(builder_scope:openxc.SimpleMessage) } static { - defaultInstance = new TranslatedMessage(true); + defaultInstance = new SimpleMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) + // @@protoc_insertion_point(class_scope:openxc.SimpleMessage) } private static com.google.protobuf.Descriptors.Descriptor @@ -11007,10 +11007,10 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_VehicleMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_RawMessage_descriptor; + internal_static_openxc_CanMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_RawMessage_fieldAccessorTable; + internal_static_openxc_CanMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_ControlCommand_descriptor; private static @@ -11062,10 +11062,10 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DynamicField_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_TranslatedMessage_descriptor; + internal_static_openxc_SimpleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_TranslatedMessage_fieldAccessorTable; + internal_static_openxc_SimpleMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -11075,71 +11075,70 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\224\003\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\210\003\n\016VehicleMessag" + "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." + - "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" + - "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" + - "xc.TranslatedMessage\0227\n\023diagnostic_respo" + - "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\022/\n" + - "\017control_command\030\005 \001(\0132\026.openxc.ControlC" + - "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\"\234\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\0224\n\014frame_format\030\004 \001(\0162\036.open" + - "xc.RawMessage.FrameFormat\")\n\013FrameFormat" + - "\022\014\n\010STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016Control" + - "Command\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCo" + - "mmand.Type\022<\n\022diagnostic_request\030\002 \001(\0132 " + - ".openxc.DiagnosticControlCommand\022G\n\030pass" + - "through_mode_request\030\003 \001(\0132%.openxc.Pass" + - "throughModeControlCommand\022O\n acceptance_", - "filter_bypass_command\030\004 \001(\0132%.openxc.Acc" + - "eptanceFilterBypassCommand\022<\n\026payload_fo" + - "rmat_command\030\005 \001(\0132\034.openxc.PayloadForma" + - "tCommand\022O\n predefined_obd2_requests_com" + - "mand\030\006 \001(\0132%.openxc.PredefinedObd2Reques" + - "tsCommand\"\223\001\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVIC" + - "E_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\030PREDEFINED_OBD2_REQUESTS\020\007\"" + - "\236\001\n\030DiagnosticControlCommand\022*\n\007request\030", - "\001 \001(\0132\031.openxc.DiagnosticRequest\0227\n\006acti" + - "on\030\002 \001(\0162\'.openxc.DiagnosticControlComma" + - "nd.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002" + - "\"=\n\035PassthroughModeControlCommand\022\013\n\003bus" + - "\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035AcceptanceFil" + - "terBypassCommand\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.Payl" + - "oadFormat\"\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010" + - "PROTOBUF\020\002\"0\n\035PredefinedObd2RequestsComm", - "and\022\017\n\007enabled\030\001 \001(\010\"]\n\017CommandResponse\022" + - ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + - "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + - "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + - "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + - "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + - "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu", - "s\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\007success\030\005 \001(\010\022\036\n\026negat" + - "ive_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.DynamicField.Type\022\024\n\014str" + - "ing_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\021TranslatedMessa" + - "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + - "age.Type\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.ope" + - "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + - "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + - "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + - "enxcB\016BinaryMessages" + "Type\022\'\n\013can_message\030\002 \001(\0132\022.openxc.CanMe" + + "ssage\022-\n\016simple_message\030\003 \001(\0132\025.openxc.S" + + "impleMessage\0227\n\023diagnostic_response\030\004 \001(" + + "\0132\032.openxc.DiagnosticResponse\022/\n\017control" + + "_command\030\005 \001(\0132\026.openxc.ControlCommand\0221" + + "\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\"\357\001\n\rSimpleMessage\022(\n\004type\030\001 \001(\016" + + "2\032.openxc.SimpleMessage.Type\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.DynamicField\"\\\n\004" + + "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + + "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + + "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11151,12 +11150,12 @@ public final class BinaryMessages { internal_static_openxc_VehicleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_VehicleMessage_descriptor, - new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); - internal_static_openxc_RawMessage_descriptor = + new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); + internal_static_openxc_CanMessage_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_openxc_RawMessage_fieldAccessorTable = new + internal_static_openxc_CanMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_RawMessage_descriptor, + internal_static_openxc_CanMessage_descriptor, new java.lang.String[] { "Bus", "MessageId", "Data", "FrameFormat", }); internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); @@ -11218,11 +11217,11 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); - internal_static_openxc_TranslatedMessage_descriptor = + internal_static_openxc_SimpleMessage_descriptor = getDescriptor().getMessageTypes().get(12); - internal_static_openxc_TranslatedMessage_fieldAccessorTable = new + internal_static_openxc_SimpleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_TranslatedMessage_descriptor, + internal_static_openxc_SimpleMessage_descriptor, new java.lang.String[] { "Type", "Name", "Value", "Event", }); return null; } diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index d69dcb5a..8b1ee796 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\"\x9c\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\x34\n\x0c\x66rame_format\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') + 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\"\xef\x01\n\rSimpleMessage\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.openxc.SimpleMessage.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') @@ -24,11 +24,11 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='RAW', index=0, number=1, + name='CAN', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='TRANSLATED', index=1, number=2, + name='SIMPLE', index=1, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( @@ -46,13 +46,13 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=339, - serialized_end=429, + serialized_start=331, + serialized_end=417, ) -_RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( +_CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( name='FrameFormat', - full_name='openxc.RawMessage.FrameFormat', + full_name='openxc.CanMessage.FrameFormat', filename=None, file=DESCRIPTOR, values=[ @@ -67,8 +67,8 @@ _RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=547, - serialized_end=588, + serialized_start=535, + serialized_end=576, ) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( @@ -108,8 +108,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1012, - serialized_end=1159, + serialized_start=1000, + serialized_end=1147, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -129,8 +129,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1291, - serialized_end=1320, + serialized_start=1279, + serialized_end=1308, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -150,8 +150,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1531, - serialized_end=1570, + serialized_start=1519, + serialized_end=1558, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -171,8 +171,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1938, - serialized_end=1971, + serialized_start=1926, + serialized_end=1959, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -196,13 +196,13 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2263, - serialized_end=2300, + serialized_start=2251, + serialized_end=2288, ) -_TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( +_SIMPLEMESSAGE_TYPE = _descriptor.EnumDescriptor( name='Type', - full_name='openxc.TranslatedMessage.Type', + full_name='openxc.SimpleMessage.Type', filename=None, file=DESCRIPTOR, values=[ @@ -233,8 +233,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2458, - serialized_end=2550, + serialized_start=2438, + serialized_end=2530, ) @@ -253,14 +253,14 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='raw_message', full_name='openxc.VehicleMessage.raw_message', index=1, + name='can_message', full_name='openxc.VehicleMessage.can_message', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='translated_message', full_name='openxc.VehicleMessage.translated_message', index=2, + name='simple_message', full_name='openxc.VehicleMessage.simple_message', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -298,40 +298,40 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=429, + serialized_end=417, ) -_RAWMESSAGE = _descriptor.Descriptor( - name='RawMessage', - full_name='openxc.RawMessage', +_CANMESSAGE = _descriptor.Descriptor( + name='CanMessage', + full_name='openxc.CanMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='bus', full_name='openxc.RawMessage.bus', index=0, + name='bus', full_name='openxc.CanMessage.bus', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='message_id', full_name='openxc.RawMessage.message_id', index=1, + name='message_id', full_name='openxc.CanMessage.message_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, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='data', full_name='openxc.RawMessage.data', index=2, + name='data', full_name='openxc.CanMessage.data', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value="", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='frame_format', full_name='openxc.RawMessage.frame_format', index=3, + name='frame_format', full_name='openxc.CanMessage.frame_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, @@ -342,13 +342,13 @@ _RAWMESSAGE = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _RAWMESSAGE_FRAMEFORMAT, + _CANMESSAGE_FRAMEFORMAT, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=432, - serialized_end=588, + serialized_start=420, + serialized_end=576, ) @@ -411,8 +411,8 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=591, - serialized_end=1159, + serialized_start=579, + serialized_end=1147, ) @@ -447,8 +447,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1162, - serialized_end=1320, + serialized_start=1150, + serialized_end=1308, ) @@ -482,8 +482,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1322, - serialized_end=1383, + serialized_start=1310, + serialized_end=1371, ) @@ -517,8 +517,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1385, - serialized_end=1445, + serialized_start=1373, + serialized_end=1433, ) @@ -546,8 +546,8 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1447, - serialized_end=1570, + serialized_start=1435, + serialized_end=1558, ) @@ -574,8 +574,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1572, - serialized_end=1620, + serialized_start=1560, + serialized_end=1608, ) @@ -616,8 +616,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1622, - serialized_end=1715, + serialized_start=1610, + serialized_end=1703, ) @@ -701,8 +701,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1718, - serialized_end=1971, + serialized_start=1706, + serialized_end=1959, ) @@ -778,8 +778,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1974, - serialized_end=2135, + serialized_start=1962, + serialized_end=2123, ) @@ -828,41 +828,41 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2138, - serialized_end=2300, + serialized_start=2126, + serialized_end=2288, ) -_TRANSLATEDMESSAGE = _descriptor.Descriptor( - name='TranslatedMessage', - full_name='openxc.TranslatedMessage', +_SIMPLEMESSAGE = _descriptor.Descriptor( + name='SimpleMessage', + full_name='openxc.SimpleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='type', full_name='openxc.TranslatedMessage.type', index=0, + name='type', full_name='openxc.SimpleMessage.type', index=0, number=1, 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), _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedMessage.name', index=1, + name='name', full_name='openxc.SimpleMessage.name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.TranslatedMessage.value', index=2, + name='value', full_name='openxc.SimpleMessage.value', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='event', full_name='openxc.TranslatedMessage.event', index=3, + name='event', full_name='openxc.SimpleMessage.event', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -873,24 +873,24 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _TRANSLATEDMESSAGE_TYPE, + _SIMPLEMESSAGE_TYPE, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=2303, - serialized_end=2550, + serialized_start=2291, + serialized_end=2530, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE -_VEHICLEMESSAGE.fields_by_name['raw_message'].message_type = _RAWMESSAGE -_VEHICLEMESSAGE.fields_by_name['translated_message'].message_type = _TRANSLATEDMESSAGE +_VEHICLEMESSAGE.fields_by_name['can_message'].message_type = _CANMESSAGE +_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; -_RAWMESSAGE.fields_by_name['frame_format'].enum_type = _RAWMESSAGE_FRAMEFORMAT -_RAWMESSAGE_FRAMEFORMAT.containing_type = _RAWMESSAGE; +_CANMESSAGE.fields_by_name['frame_format'].enum_type = _CANMESSAGE_FRAMEFORMAT +_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 @@ -908,12 +908,12 @@ _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; -_TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE -_TRANSLATEDMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD -_TRANSLATEDMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD -_TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; +_SIMPLEMESSAGE.fields_by_name['type'].enum_type = _SIMPLEMESSAGE_TYPE +_SIMPLEMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD +_SIMPLEMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD +_SIMPLEMESSAGE_TYPE.containing_type = _SIMPLEMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE -DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE +DESCRIPTOR.message_types_by_name['CanMessage'] = _CANMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND @@ -924,7 +924,7 @@ DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD -DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE +DESCRIPTOR.message_types_by_name['SimpleMessage'] = _SIMPLEMESSAGE class VehicleMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType @@ -932,11 +932,11 @@ class VehicleMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) -class RawMessage(_message.Message): +class CanMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _RAWMESSAGE + DESCRIPTOR = _CANMESSAGE - # @@protoc_insertion_point(class_scope:openxc.RawMessage) + # @@protoc_insertion_point(class_scope:openxc.CanMessage) class ControlCommand(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType @@ -998,11 +998,11 @@ class DynamicField(_message.Message): # @@protoc_insertion_point(class_scope:openxc.DynamicField) -class TranslatedMessage(_message.Message): +class SimpleMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDMESSAGE + DESCRIPTOR = _SIMPLEMESSAGE - # @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) + # @@protoc_insertion_point(class_scope:openxc.SimpleMessage) DESCRIPTOR.has_options = True diff --git a/openxc.proto b/openxc.proto index 3c0a51d4..3becaa5c 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,18 +4,18 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; + enum Type { CAN = 1; SIMPLE = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; COMMAND_RESPONSE = 5; } optional Type type = 1; - optional RawMessage raw_message = 2; - optional TranslatedMessage translated_message = 3; + optional CanMessage can_message = 2; + optional SimpleMessage simple_message = 3; optional DiagnosticResponse diagnostic_response = 4; optional ControlCommand control_command = 5; optional CommandResponse command_response = 6; } -message RawMessage { +message CanMessage { enum FrameFormat { STANDARD = 1; EXTENDED = 2; @@ -119,7 +119,7 @@ message DynamicField { optional bool boolean_value = 4; } -message TranslatedMessage { +message SimpleMessage { enum Type { STRING = 1; NUM = 2; BOOL = 3; EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} -- cgit 1.2.3-korg From d17a9c7988b05e70607d1eb823fbe160d0a4c506 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:25:13 -0400 Subject: Remove redundant 'type' field from binary SimpleVehicleMessage. You can figure out the type based on the value and event DynamicFields. Fixed #19. --- gen/cpp/openxc.pb | 21 +- gen/cpp/openxc.pb.c | 11 +- gen/cpp/openxc.pb.h | 26 +- gen/java/com/openxc/BinaryMessages.java | 413 ++++++++------------------------ gen/python/openxc_pb2.py | 65 +---- openxc.proto | 10 +- 6 files changed, 131 insertions(+), 415 deletions(-) (limited to 'gen/java/com/openxc/BinaryMessages.java') diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 88993ab5..a4716cee 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -€ +÷ openxc.protoopenxc"ˆ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -99,19 +99,10 @@ message_id (  STRING NUM -BOOL"ï - SimpleMessage( -type (2.openxc.SimpleMessage.Type -name ( # -value ( 2.openxc.DynamicField# -event ( 2.openxc.DynamicField"\ -Type - -STRING -NUM -BOOL -EVENTED_STRING - EVENTED_NUM - EVENTED_BOOLB +BOOL"g + SimpleMessage +name ( # +value ( 2.openxc.DynamicField# +event ( 2.openxc.DynamicFieldB com.openxcBBinaryMessages \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index b9d6d955..ccde431b 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 Oct 6 23:12:27 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:25:12 2014. */ #include "openxc.pb.h" @@ -105,11 +105,10 @@ const pb_field_t openxc_DynamicField_fields[5] = { PB_LAST_FIELD }; -const pb_field_t openxc_SimpleMessage_fields[5] = { - PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_SimpleMessage, type, type, 0), - PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, openxc_SimpleMessage, name, type, 0), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, value, name, &openxc_DynamicField_fields), - PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, event, value, &openxc_DynamicField_fields), +const pb_field_t openxc_SimpleMessage_fields[4] = { + PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, openxc_SimpleMessage, name, name, 0), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, value, name, &openxc_DynamicField_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, event, value, &openxc_DynamicField_fields), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 38107b33..5b36bd4a 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 Oct 6 23:12:27 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:25:12 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -58,15 +58,6 @@ typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_BOOL = 3 } openxc_DynamicField_Type; -typedef enum _openxc_SimpleMessage_Type { - openxc_SimpleMessage_Type_STRING = 1, - openxc_SimpleMessage_Type_NUM = 2, - openxc_SimpleMessage_Type_BOOL = 3, - openxc_SimpleMessage_Type_EVENTED_STRING = 4, - openxc_SimpleMessage_Type_EVENTED_NUM = 5, - openxc_SimpleMessage_Type_EVENTED_BOOL = 6 -} openxc_SimpleMessage_Type; - /* Struct definitions */ typedef struct _openxc_AcceptanceFilterBypassCommand { bool has_bus; @@ -174,8 +165,6 @@ typedef struct _openxc_DiagnosticControlCommand { } openxc_DiagnosticControlCommand; typedef struct _openxc_SimpleMessage { - bool has_type; - openxc_SimpleMessage_Type type; pb_callback_t name; bool has_value; openxc_DynamicField value; @@ -228,7 +217,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} #define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_SimpleMessage_init_default {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} +#define openxc_SimpleMessage_init_default {{{NULL}, NULL}, false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} #define openxc_CanMessage_init_zero {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_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} @@ -241,7 +230,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0} #define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0} #define openxc_DynamicField_init_zero {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_SimpleMessage_init_zero {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} +#define openxc_SimpleMessage_init_zero {{{NULL}, NULL}, false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define openxc_AcceptanceFilterBypassCommand_bus_tag 1 @@ -280,10 +269,9 @@ typedef struct _openxc_VehicleMessage { #define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 -#define openxc_SimpleMessage_type_tag 1 -#define openxc_SimpleMessage_name_tag 2 -#define openxc_SimpleMessage_value_tag 3 -#define openxc_SimpleMessage_event_tag 4 +#define openxc_SimpleMessage_name_tag 1 +#define openxc_SimpleMessage_value_tag 2 +#define openxc_SimpleMessage_event_tag 3 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 @@ -310,7 +298,7 @@ extern const pb_field_t openxc_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; extern const pb_field_t openxc_DynamicField_fields[5]; -extern const pb_field_t openxc_SimpleMessage_fields[5]; +extern const pb_field_t openxc_SimpleMessage_fields[4]; /* Maximum encoded size of messages (where known) */ #define openxc_ControlCommand_size 126 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index cb49929c..c495c7a6 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -9941,56 +9941,46 @@ public final class BinaryMessages { public interface SimpleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .openxc.SimpleMessage.Type type = 1; + // optional string name = 1; /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - boolean hasType(); - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - com.openxc.BinaryMessages.SimpleMessage.Type getType(); - - // optional string name = 2; - /** - * optional string name = 2; + * optional string name = 1; */ boolean hasName(); /** - * optional string name = 2; + * optional string name = 1; */ java.lang.String getName(); /** - * optional string name = 2; + * optional string name = 1; */ com.google.protobuf.ByteString getNameBytes(); - // optional .openxc.DynamicField value = 3; + // optional .openxc.DynamicField value = 2; /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ boolean hasValue(); /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ com.openxc.BinaryMessages.DynamicField getValue(); /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - // optional .openxc.DynamicField event = 4; + // optional .openxc.DynamicField event = 3; /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ boolean hasEvent(); /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ com.openxc.BinaryMessages.DynamicField getEvent(); /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } @@ -10045,25 +10035,14 @@ public final class BinaryMessages { } break; } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.SimpleMessage.Type value = com.openxc.BinaryMessages.SimpleMessage.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; + case 10: { + bitField0_ |= 0x00000001; name_ = input.readBytes(); break; } - case 26: { + case 18: { com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = value_.toBuilder(); } value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); @@ -10071,12 +10050,12 @@ public final class BinaryMessages { subBuilder.mergeFrom(value_); value_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; break; } - case 34: { + case 26: { com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = event_.toBuilder(); } event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); @@ -10084,7 +10063,7 @@ public final class BinaryMessages { subBuilder.mergeFrom(event_); event_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; break; } } @@ -10126,152 +10105,18 @@ public final class BinaryMessages { return PARSER; } - /** - * Protobuf enum {@code openxc.SimpleMessage.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - * STRING = 1; - */ - STRING(0, 1), - /** - * NUM = 2; - */ - NUM(1, 2), - /** - * BOOL = 3; - */ - BOOL(2, 3), - /** - * EVENTED_STRING = 4; - */ - EVENTED_STRING(3, 4), - /** - * EVENTED_NUM = 5; - */ - EVENTED_NUM(4, 5), - /** - * EVENTED_BOOL = 6; - */ - EVENTED_BOOL(5, 6), - ; - - /** - * STRING = 1; - */ - public static final int STRING_VALUE = 1; - /** - * NUM = 2; - */ - public static final int NUM_VALUE = 2; - /** - * BOOL = 3; - */ - public static final int BOOL_VALUE = 3; - /** - * EVENTED_STRING = 4; - */ - public static final int EVENTED_STRING_VALUE = 4; - /** - * EVENTED_NUM = 5; - */ - public static final int EVENTED_NUM_VALUE = 5; - /** - * EVENTED_BOOL = 6; - */ - public static final int EVENTED_BOOL_VALUE = 6; - - - public final int getNumber() { return value; } - - public static Type valueOf(int value) { - switch (value) { - case 1: return STRING; - case 2: return NUM; - case 3: return BOOL; - case 4: return EVENTED_STRING; - case 5: return EVENTED_NUM; - case 6: return EVENTED_BOOL; - 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 Type findValueByNumber(int number) { - return Type.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.SimpleMessage.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type 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 Type(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.SimpleMessage.Type) - } - private int bitField0_; - // optional .openxc.SimpleMessage.Type type = 1; - public static final int TYPE_FIELD_NUMBER = 1; - private com.openxc.BinaryMessages.SimpleMessage.Type type_; - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public com.openxc.BinaryMessages.SimpleMessage.Type getType() { - return type_; - } - - // optional string name = 2; - public static final int NAME_FIELD_NUMBER = 2; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; /** - * optional string name = 2; + * optional string name = 1; */ public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string name = 2; + * optional string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -10288,7 +10133,7 @@ public final class BinaryMessages { } } /** - * optional string name = 2; + * optional string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { @@ -10304,52 +10149,51 @@ public final class BinaryMessages { } } - // optional .openxc.DynamicField value = 3; - public static final int VALUE_FIELD_NUMBER = 3; + // optional .openxc.DynamicField value = 2; + public static final int VALUE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DynamicField value_; /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public boolean hasValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicField getValue() { return value_; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { return value_; } - // optional .openxc.DynamicField event = 4; - public static final int EVENT_FIELD_NUMBER = 4; + // optional .openxc.DynamicField event = 3; + public static final int EVENT_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.DynamicField event_; /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public boolean hasEvent() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicField getEvent() { return event_; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { return event_; } private void initFields() { - type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; name_ = ""; value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -10367,16 +10211,13 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); + output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameBytes()); + output.writeMessage(2, value_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, value_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, event_); + output.writeMessage(3, event_); } getUnknownFields().writeTo(output); } @@ -10389,19 +10230,15 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); + .computeBytesSize(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); + .computeMessageSize(2, value_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, value_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, event_); + .computeMessageSize(3, event_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -10521,22 +10358,20 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; - bitField0_ = (bitField0_ & ~0x00000001); name_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); if (valueBuilder_ == null) { value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } else { valueBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); if (eventBuilder_ == null) { event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } else { eventBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -10568,21 +10403,17 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.type_ = type_; + result.name_ = name_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.name_ = name_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } if (valueBuilder_ == null) { result.value_ = value_; } else { result.value_ = valueBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; } if (eventBuilder_ == null) { result.event_ = event_; @@ -10605,11 +10436,8 @@ public final class BinaryMessages { public Builder mergeFrom(com.openxc.BinaryMessages.SimpleMessage other) { if (other == com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } if (other.hasName()) { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } @@ -10646,52 +10474,16 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.SimpleMessage.Type type = 1; - private com.openxc.BinaryMessages.SimpleMessage.Type type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public com.openxc.BinaryMessages.SimpleMessage.Type getType() { - return type_; - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public Builder setType(com.openxc.BinaryMessages.SimpleMessage.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; - onChanged(); - return this; - } - - // optional string name = 2; + // optional string name = 1; private java.lang.Object name_ = ""; /** - * optional string name = 2; + * optional string name = 1; */ public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string name = 2; + * optional string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -10705,7 +10497,7 @@ public final class BinaryMessages { } } /** - * optional string name = 2; + * optional string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { @@ -10721,53 +10513,53 @@ public final class BinaryMessages { } } /** - * optional string name = 2; + * optional string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } /** - * optional string name = 2; + * optional string name = 1; */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * optional string name = 2; + * optional string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } - // optional .openxc.DynamicField value = 3; + // 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_; /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public boolean hasValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicField getValue() { if (valueBuilder_ == null) { @@ -10777,7 +10569,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder setValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { @@ -10789,11 +10581,11 @@ public final class BinaryMessages { } else { valueBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder setValue( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { @@ -10803,15 +10595,15 @@ public final class BinaryMessages { } else { valueBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && + if (((bitField0_ & 0x00000002) == 0x00000002) && value_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) { value_ = com.openxc.BinaryMessages.DynamicField.newBuilder(value_).mergeFrom(value).buildPartial(); @@ -10822,11 +10614,11 @@ public final class BinaryMessages { } else { valueBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder clearValue() { if (valueBuilder_ == null) { @@ -10835,19 +10627,19 @@ public final class BinaryMessages { } else { valueBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return getValueFieldBuilder().getBuilder(); } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { if (valueBuilder_ != null) { @@ -10857,7 +10649,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> @@ -10873,18 +10665,18 @@ public final class BinaryMessages { return valueBuilder_; } - // optional .openxc.DynamicField event = 4; + // 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_; /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public boolean hasEvent() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicField getEvent() { if (eventBuilder_ == null) { @@ -10894,7 +10686,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { @@ -10906,11 +10698,11 @@ public final class BinaryMessages { } else { eventBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder setEvent( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { @@ -10920,15 +10712,15 @@ public final class BinaryMessages { } else { eventBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && + if (((bitField0_ & 0x00000004) == 0x00000004) && event_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) { event_ = com.openxc.BinaryMessages.DynamicField.newBuilder(event_).mergeFrom(value).buildPartial(); @@ -10939,11 +10731,11 @@ public final class BinaryMessages { } else { eventBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder clearEvent() { if (eventBuilder_ == null) { @@ -10952,19 +10744,19 @@ public final class BinaryMessages { } else { eventBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return getEventFieldBuilder().getBuilder(); } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { if (eventBuilder_ != null) { @@ -10974,7 +10766,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> @@ -11132,13 +10924,10 @@ public final class BinaryMessages { "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\"\357\001\n\rSimpleMessage\022(\n\004type\030\001 \001(\016" + - "2\032.openxc.SimpleMessage.Type\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.DynamicField\"\\\n\004" + - "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + - "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + - "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "\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" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11222,7 +11011,7 @@ public final class BinaryMessages { internal_static_openxc_SimpleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_SimpleMessage_descriptor, - new java.lang.String[] { "Type", "Name", "Value", "Event", }); + new java.lang.String[] { "Name", "Value", "Event", }); return null; } }; diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 8b1ee796..4c5ff5c8 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\"\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\"\xef\x01\n\rSimpleMessage\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.openxc.SimpleMessage.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\"\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') @@ -200,43 +200,6 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( serialized_end=2288, ) -_SIMPLEMESSAGE_TYPE = _descriptor.EnumDescriptor( - name='Type', - full_name='openxc.SimpleMessage.Type', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='STRING', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NUM', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BOOL', index=2, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_STRING', index=3, number=4, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_NUM', index=4, number=5, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_BOOL', index=5, number=6, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2438, - serialized_end=2530, -) - _VEHICLEMESSAGE = _descriptor.Descriptor( name='VehicleMessage', @@ -841,29 +804,22 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='type', full_name='openxc.SimpleMessage.type', index=0, - number=1, 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), - _descriptor.FieldDescriptor( - name='name', full_name='openxc.SimpleMessage.name', index=1, - number=2, type=9, cpp_type=9, label=1, + 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"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.SimpleMessage.value', index=2, - number=3, type=11, cpp_type=10, label=1, + name='value', full_name='openxc.SimpleMessage.value', index=1, + number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='event', full_name='openxc.SimpleMessage.event', index=3, - number=4, type=11, cpp_type=10, label=1, + name='event', full_name='openxc.SimpleMessage.event', index=2, + number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -873,13 +829,12 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _SIMPLEMESSAGE_TYPE, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=2291, - serialized_end=2530, + serialized_start=2290, + serialized_end=2393, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -908,10 +863,8 @@ _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; -_SIMPLEMESSAGE.fields_by_name['type'].enum_type = _SIMPLEMESSAGE_TYPE _SIMPLEMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD _SIMPLEMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD -_SIMPLEMESSAGE_TYPE.containing_type = _SIMPLEMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['CanMessage'] = _CANMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND diff --git a/openxc.proto b/openxc.proto index 3becaa5c..252f214b 100644 --- a/openxc.proto +++ b/openxc.proto @@ -120,13 +120,9 @@ message DynamicField { } message SimpleMessage { - enum Type { STRING = 1; NUM = 2; BOOL = 3; - EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} - - optional Type type = 1; - optional string name = 2; - optional DynamicField value = 3; - optional DynamicField event = 4; + optional string name = 1; + optional DynamicField value = 2; + optional DynamicField event = 3; } // TODO we should also consider having an enum type, having each specific -- cgit 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 'gen/java/com/openxc/BinaryMessages.java') 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