diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-08-11 23:36:39 -0400 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-08-11 23:36:39 -0400 |
commit | 1430a2a202e37be476b7290c2018a1c0d64833d8 (patch) | |
tree | dc16f9ce7b36b022ddb8091dffa40a9bdd154b55 | |
parent | fcb217ef4140319ee8557f849bbaf01ecfe92e6f (diff) |
Move action field to ControlCommand in binary format.
-rw-r--r-- | gen/cpp/openxc.pb | 25 | ||||
-rw-r--r-- | gen/cpp/openxc.pb.c | 8 | ||||
-rw-r--r-- | gen/cpp/openxc.pb.h | 24 | ||||
-rw-r--r-- | gen/java/com/openxc/BinaryMessages.java | 406 | ||||
-rw-r--r-- | gen/python/openxc_pb2.py | 84 | ||||
-rw-r--r-- | openxc.proto | 4 |
6 files changed, 275 insertions, 276 deletions
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 { * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code> */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder(); + + // optional .openxc.ControlCommand.Action action = 3; + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + boolean hasAction(); + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + 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 { + /** + * <code>ADD = 1;</code> + */ + ADD(0, 1), + /** + * <code>CANCEL = 2;</code> + */ + CANCEL(1, 2), + ; + + /** + * <code>ADD = 1;</code> + */ + public static final int ADD_VALUE = 1; + /** + * <code>CANCEL = 2;</code> + */ + 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<Action> + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap<Action> + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<Action>() { + 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_; + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + 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; + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + public com.openxc.BinaryMessages.ControlCommand.Action getAction() { + return action_; + } + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + public Builder setAction(com.openxc.BinaryMessages.ControlCommand.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + action_ = value; + onChanged(); + return this; + } + /** + * <code>optional .openxc.ControlCommand.Action action = 3;</code> + */ + 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 { * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code> */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); - - // optional .openxc.DiagnosticRequest.Action action = 10; - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - boolean hasAction(); - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - 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 { - /** - * <code>ADD = 1;</code> - */ - ADD(0, 1), - /** - * <code>CANCEL = 3;</code> - */ - CANCEL(1, 3), - ; - - /** - * <code>ADD = 1;</code> - */ - public static final int ADD_VALUE = 1; - /** - * <code>CANCEL = 3;</code> - */ - 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<Action> - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap<Action> - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap<Action>() { - 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_; - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - 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; - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { - return action_; - } - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - public Builder setAction(com.openxc.BinaryMessages.DiagnosticRequest.Action value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - action_ = value; - onChanged(); - return this; - } - /** - * <code>optional .openxc.DiagnosticRequest.Action action = 10;</code> - */ - 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 { |