diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-03-04 13:35:02 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-03-04 13:35:02 -0500 |
commit | 5347f07163d737f6c6cfde9ad943c110b47e0963 (patch) | |
tree | 2491b8a98560782534ddf50fd0e09cb3d6e3efea /gen | |
parent | 37d7cb54624eaf3e674b700f706b53782489e764 (diff) |
Move ControlCommand inside VehicleMessage so it can be on same stream.
Diffstat (limited to 'gen')
-rw-r--r-- | gen/cpp/openxc.pb | 10 | ||||
-rw-r--r-- | gen/cpp/openxc.pb.c | 9 | ||||
-rw-r--r-- | gen/cpp/openxc.pb.h | 12 | ||||
-rw-r--r-- | gen/java/com/openxc/BinaryMessages.java | 257 | ||||
-rw-r--r-- | gen/python/openxc_pb2.py | 48 |
5 files changed, 279 insertions, 57 deletions
diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index d4bd0a80..50591abc 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,17 +1,19 @@ -« -openxc.protoopenxc"… +ñ +openxc.protoopenxc"Ë VehicleMessage) type (2.openxc.VehicleMessage.Type' raw_message (2.openxc.RawMessage5 translated_message (2.openxc.TranslatedMessage7 -diagnostic_response (2.openxc.DiagnosticResponse"/ +diagnostic_response (2.openxc.DiagnosticResponse/ +control_command (2.openxc.ControlCommand"D Type RAW TRANSLATED -DIAGNOSTIC"; +DIAGNOSTIC +CONTROL_COMMAND"; RawMessage bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 8c663ef1..4f1fa5a3 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,15 +1,16 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.5 at Mon Mar 3 15:48:39 2014. */ +/* Generated by nanopb-0.2.5 at Tue Mar 4 12:52:45 2014. */ #include "openxc.pb.h" -const pb_field_t openxc_VehicleMessage_fields[5] = { +const pb_field_t openxc_VehicleMessage_fields[6] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_VehicleMessage, type, type, 0), PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, raw_message, type, &openxc_RawMessage_fields), PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields), PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, translated_message, &openxc_DiagnosticResponse_fields), + PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, control_command, diagnostic_response, &openxc_ControlCommand_fields), PB_LAST_FIELD }; @@ -66,11 +67,11 @@ const pb_field_t openxc_TranslatedMessage_fields[9] = { /* 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_ControlCommand, diagnostic_request) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_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_ControlCommand, diagnostic_request) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_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_ControlCommand, diagnostic_request) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_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_ControlCommand, diagnostic_request) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_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 cfb0ef74..3363d474 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 Mar 3 15:48:39 2014. */ +/* Generated by nanopb-0.2.5 at Tue Mar 4 12:52:45 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -13,7 +13,8 @@ extern "C" { typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_RAW = 1, openxc_VehicleMessage_Type_TRANSLATED = 2, - openxc_VehicleMessage_Type_DIAGNOSTIC = 3 + openxc_VehicleMessage_Type_DIAGNOSTIC = 3, + openxc_VehicleMessage_Type_CONTROL_COMMAND = 4 } openxc_VehicleMessage_Type; typedef enum _openxc_ControlCommand_Type { @@ -131,6 +132,8 @@ typedef struct _openxc_VehicleMessage { openxc_TranslatedMessage translated_message; bool has_diagnostic_response; openxc_DiagnosticResponse diagnostic_response; + bool has_control_command; + openxc_ControlCommand control_command; } openxc_VehicleMessage; /* Default values for struct fields */ @@ -170,9 +173,10 @@ typedef struct _openxc_VehicleMessage { #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 #define openxc_VehicleMessage_diagnostic_response_tag 4 +#define openxc_VehicleMessage_control_command_tag 5 /* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[5]; +extern const pb_field_t openxc_VehicleMessage_fields[6]; extern const pb_field_t openxc_RawMessage_fields[4]; extern const pb_field_t openxc_ControlCommand_fields[3]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; @@ -180,7 +184,7 @@ extern const pb_field_t openxc_DiagnosticResponse_fields[9]; extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 430 +#define openxc_VehicleMessage_size 508 #define openxc_RawMessage_size 27 #define openxc_ControlCommand_size 76 #define openxc_DiagnosticRequest_size 68 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index f1f47537..dc44febc 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -62,6 +62,20 @@ public final class BinaryMessages { * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code> */ com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); + + // optional .openxc.ControlCommand control_command = 5; + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + boolean hasControlCommand(); + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + com.openxc.BinaryMessages.ControlCommand getControlCommand(); + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder(); } /** * Protobuf type {@code openxc.VehicleMessage} @@ -164,6 +178,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; break; } + case 42: { + com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = controlCommand_.toBuilder(); + } + controlCommand_ = input.readMessage(com.openxc.BinaryMessages.ControlCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(controlCommand_); + controlCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -220,6 +247,10 @@ public final class BinaryMessages { * <code>DIAGNOSTIC = 3;</code> */ DIAGNOSTIC(2, 3), + /** + * <code>CONTROL_COMMAND = 4;</code> + */ + CONTROL_COMMAND(3, 4), ; /** @@ -234,6 +265,10 @@ public final class BinaryMessages { * <code>DIAGNOSTIC = 3;</code> */ public static final int DIAGNOSTIC_VALUE = 3; + /** + * <code>CONTROL_COMMAND = 4;</code> + */ + public static final int CONTROL_COMMAND_VALUE = 4; public final int getNumber() { return value; } @@ -243,6 +278,7 @@ public final class BinaryMessages { case 1: return RAW; case 2: return TRANSLATED; case 3: return DIAGNOSTIC; + case 4: return CONTROL_COMMAND; default: return null; } } @@ -377,11 +413,34 @@ 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_; + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public boolean hasControlCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public com.openxc.BinaryMessages.ControlCommand getControlCommand() { + return controlCommand_; + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { + return controlCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); + controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -407,6 +466,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(4, diagnosticResponse_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, controlCommand_); + } getUnknownFields().writeTo(output); } @@ -432,6 +494,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, diagnosticResponse_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, controlCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -543,6 +609,7 @@ public final class BinaryMessages { getRawMessageFieldBuilder(); getTranslatedMessageFieldBuilder(); getDiagnosticResponseFieldBuilder(); + getControlCommandFieldBuilder(); } } private static Builder create() { @@ -571,6 +638,12 @@ public final class BinaryMessages { diagnosticResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + if (controlCommandBuilder_ == null) { + controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + } else { + controlCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -627,6 +700,14 @@ public final class BinaryMessages { } else { result.diagnosticResponse_ = diagnosticResponseBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (controlCommandBuilder_ == null) { + result.controlCommand_ = controlCommand_; + } else { + result.controlCommand_ = controlCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -655,6 +736,9 @@ public final class BinaryMessages { if (other.hasDiagnosticResponse()) { mergeDiagnosticResponse(other.getDiagnosticResponse()); } + if (other.hasControlCommand()) { + mergeControlCommand(other.getControlCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1069,6 +1153,123 @@ 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_; + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public boolean hasControlCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public com.openxc.BinaryMessages.ControlCommand getControlCommand() { + if (controlCommandBuilder_ == null) { + return controlCommand_; + } else { + return controlCommandBuilder_.getMessage(); + } + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) { + if (controlCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controlCommand_ = value; + onChanged(); + } else { + controlCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public Builder setControlCommand( + com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) { + if (controlCommandBuilder_ == null) { + controlCommand_ = builderForValue.build(); + onChanged(); + } else { + controlCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public Builder mergeControlCommand(com.openxc.BinaryMessages.ControlCommand value) { + if (controlCommandBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + controlCommand_ != com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) { + controlCommand_ = + com.openxc.BinaryMessages.ControlCommand.newBuilder(controlCommand_).mergeFrom(value).buildPartial(); + } else { + controlCommand_ = value; + } + onChanged(); + } else { + controlCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public Builder clearControlCommand() { + if (controlCommandBuilder_ == null) { + controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + onChanged(); + } else { + controlCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getControlCommandFieldBuilder().getBuilder(); + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { + if (controlCommandBuilder_ != null) { + return controlCommandBuilder_.getMessageOrBuilder(); + } else { + return controlCommand_; + } + } + /** + * <code>optional .openxc.ControlCommand control_command = 5;</code> + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> + getControlCommandFieldBuilder() { + if (controlCommandBuilder_ == null) { + controlCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder>( + controlCommand_, + getParentForChildren(), + isClean()); + controlCommand_ = null; + } + return controlCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) } @@ -5776,36 +5977,38 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\205\002\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\313\002\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\"/\n" + - "\004Type\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022\016\n\nDIAGNO" + - "STIC\020\003\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmes" + - "sage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\"\246\001\n\016ControlC" + - "ommand\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCom", - "mand.Type\0225\n\022diagnostic_request\030\002 \001(\0132\031." + - "openxc.DiagnosticRequest\"2\n\004Type\022\013\n\007VERS" + - "ION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\252\001\n" + - "\021DiagnosticRequest\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\007payload\030\005 \001(\014\022\025\n\rparse_payload\030\006 \001(\010\022\016" + - "\n\006factor\030\007 \001(\001\022\016\n\006offset\030\010 \001(\001\022\021\n\tfreque" + - "ncy\030\t \001(\001\"\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\026negativ", - "e_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r" + - "\n\005value\030\010 \001(\001\"\265\002\n\021TranslatedMessage\022,\n\004t" + - "ype\030\001 \001(\0162\036.openxc.TranslatedMessage.Typ" + - "e\022\014\n\004name\030\002 \001(\t\022\024\n\014string_value\030\003 \001(\t\022\025\n" + - "\rnumeric_value\030\004 \001(\001\022\025\n\rboolean_value\030\005 " + - "\001(\010\022\024\n\014string_event\030\006 \001(\t\022\025\n\rnumeric_eve" + - "nt\030\007 \001(\001\022\025\n\rboolean_event\030\010 \001(\010\"\\\n\004Type\022" + - "\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTE" + - "D_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVENTED_B" + - "OOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\022/\n" + + "\017control_command\030\005 \001(\0132\026.openxc.ControlC" + + "ommand\"D\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022" + + "\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_COMMAND\020\004\";\n\n" + + "RawMessage\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\"\246\001\n\016ControlCommand\022)\n\004" + + "type\030\001 \001(\0162\033.openxc.ControlCommand.Type\022" + + "5\n\022diagnostic_request\030\002 \001(\0132\031.openxc.Dia" + + "gnosticRequest\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tD" + + "EVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\252\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\025\n\rparse_payload\030\006 \001(\010\022\016\n\006factor\030\007" + + " \001(\001\022\016\n\006offset\030\010 \001(\001\022\021\n\tfrequency\030\t \001(\001\"" + + "\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\"\265\002\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162" + + "\036.openxc.TranslatedMessage.Type\022\014\n\004name\030" + + "\002 \001(\t\022\024\n\014string_value\030\003 \001(\t\022\025\n\rnumeric_v" + + "alue\030\004 \001(\001\022\025\n\rboolean_value\030\005 \001(\010\022\024\n\014str" + + "ing_event\030\006 \001(\t\022\025\n\rnumeric_event\030\007 \001(\001\022\025" + + "\n\rboolean_event\030\010 \001(\010\"\\\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\nc" + + "om.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -5817,7 +6020,7 @@ 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", }); + new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", }); internal_static_openxc_RawMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_RawMessage_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 017b0067..d1ea5cff 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\"\x85\x02\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\"/\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\";\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\"\xaa\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\x15\n\rparse_payload\x18\x06 \x01(\x08\x12\x0e\n\x06\x66\x61\x63tor\x18\x07 \x01(\x01\x12\x0e\n\x06offset\x18\x08 \x01(\x01\x12\x11\n\tfrequency\x18\t \x01(\x01\"\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\"\xb5\x02\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x0cstring_value\x18\x03 \x01(\t\x12\x15\n\rnumeric_value\x18\x04 \x01(\x01\x12\x15\n\rboolean_value\x18\x05 \x01(\x08\x12\x14\n\x0cstring_event\x18\x06 \x01(\t\x12\x15\n\rnumeric_event\x18\x07 \x01(\x01\x12\x15\n\rboolean_event\x18\x08 \x01(\x08\"\\\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\"\xcb\x02\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\"D\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\";\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\"\xaa\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\x15\n\rparse_payload\x18\x06 \x01(\x08\x12\x0e\n\x06\x66\x61\x63tor\x18\x07 \x01(\x01\x12\x0e\n\x06offset\x18\x08 \x01(\x01\x12\x11\n\tfrequency\x18\t \x01(\x01\"\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\"\xb5\x02\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x0cstring_value\x18\x03 \x01(\t\x12\x15\n\rnumeric_value\x18\x04 \x01(\x01\x12\x15\n\rboolean_value\x18\x05 \x01(\x08\x12\x14\n\x0cstring_event\x18\x06 \x01(\t\x12\x15\n\rnumeric_event\x18\x07 \x01(\x01\x12\x15\n\rboolean_event\x18\x08 \x01(\x08\"\\\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') @@ -35,11 +35,15 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='CONTROL_COMMAND', index=3, number=4, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=239, - serialized_end=286, + serialized_start=288, + serialized_end=356, ) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( @@ -63,8 +67,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=466, - serialized_end=516, + serialized_start=536, + serialized_end=586, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -100,8 +104,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1073, - serialized_end=1165, + serialized_start=1143, + serialized_end=1235, ) @@ -140,6 +144,13 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='control_command', full_name='openxc.VehicleMessage.control_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=[ ], @@ -151,7 +162,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=286, + serialized_end=356, ) @@ -192,8 +203,8 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=288, - serialized_end=347, + serialized_start=358, + serialized_end=417, ) @@ -228,8 +239,8 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=350, - serialized_end=516, + serialized_start=420, + serialized_end=586, ) @@ -312,8 +323,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=519, - serialized_end=689, + serialized_start=589, + serialized_end=759, ) @@ -389,8 +400,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=692, - serialized_end=853, + serialized_start=762, + serialized_end=923, ) @@ -467,14 +478,15 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=856, - serialized_end=1165, + serialized_start=926, + serialized_end=1235, ) _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['diagnostic_response'].message_type = _DIAGNOSTICRESPONSE +_VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST |