diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-03-26 08:53:09 -0400 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-03-26 08:53:09 -0400 |
commit | 03a5af0f0978d372bb9e5668700ed39eb8c2fd83 (patch) | |
tree | 4b0d9835192c090723fddc16051e7896ac66c40b | |
parent | f3f00874c637bcd700ded55f39cee5b1a881bc7c (diff) |
Remove parse_payload from diagnostic messages, it's not needed.
-rw-r--r-- | gen/cpp/openxc.pb | 19 | ||||
-rw-r--r-- | gen/cpp/openxc.pb.c | 15 | ||||
-rw-r--r-- | gen/cpp/openxc.pb.h | 23 | ||||
-rw-r--r-- | gen/java/com/openxc/BinaryMessages.java | 346 | ||||
-rw-r--r-- | gen/python/openxc_pb2.py | 47 | ||||
-rw-r--r-- | openxc.proto | 11 |
6 files changed, 183 insertions, 278 deletions
diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 54ddb8be..f259bbac 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -š +ƒ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -32,21 +32,20 @@ message_id (
DIAGNOSTIC"M CommandResponse) type (2.openxc.ControlCommand.Type -message ( "Ô +message ( "½ DiagnosticRequest bus ( message_id (
mode (
pid (
-payload ( -
parse_payload ( -multiple_responses ( -factor ( -offset ( - frequency - ( -name ( "¡ +payload ( +multiple_responses ( +factor ( +offset ( + frequency ( +name + ( "¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 25ed2bbf..e62efad3 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 Sat Mar 15 12:44:03 2014. */ +/* Generated by nanopb-0.2.5 at Mon Mar 24 17:19:53 2014. */ #include "openxc.pb.h" @@ -34,18 +34,17 @@ const pb_field_t openxc_CommandResponse_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticRequest_fields[12] = { +const pb_field_t openxc_DiagnosticRequest_fields[11] = { 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), PB_FIELD2( 4, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, pid, mode, 0), PB_FIELD2( 5, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, payload, pid, 0), - PB_FIELD2( 6, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, parse_payload, payload, 0), - PB_FIELD2( 7, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, multiple_responses, parse_payload, 0), - PB_FIELD2( 8, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, factor, multiple_responses, 0), - PB_FIELD2( 9, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, offset, factor, 0), - PB_FIELD2( 10, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, offset, 0), - PB_FIELD2( 11, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), + PB_FIELD2( 6, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, multiple_responses, payload, 0), + PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, factor, multiple_responses, 0), + PB_FIELD2( 8, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, offset, factor, 0), + PB_FIELD2( 9, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, offset, 0), + PB_FIELD2( 10, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 267f785c..82ab9872 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 Sat Mar 15 12:44:03 2014. */ +/* Generated by nanopb-0.2.5 at Mon Mar 24 17:19:53 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -63,8 +63,6 @@ typedef struct _openxc_DiagnosticRequest { uint32_t pid; bool has_payload; openxc_DiagnosticRequest_payload_t payload; - bool has_parse_payload; - bool parse_payload; bool has_multiple_responses; bool multiple_responses; bool has_factor; @@ -169,12 +167,11 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_mode_tag 3 #define openxc_DiagnosticRequest_pid_tag 4 #define openxc_DiagnosticRequest_payload_tag 5 -#define openxc_DiagnosticRequest_parse_payload_tag 6 -#define openxc_DiagnosticRequest_multiple_responses_tag 7 -#define openxc_DiagnosticRequest_factor_tag 8 -#define openxc_DiagnosticRequest_offset_tag 9 -#define openxc_DiagnosticRequest_frequency_tag 10 -#define openxc_DiagnosticRequest_name_tag 11 +#define openxc_DiagnosticRequest_multiple_responses_tag 6 +#define openxc_DiagnosticRequest_factor_tag 7 +#define openxc_DiagnosticRequest_offset_tag 8 +#define openxc_DiagnosticRequest_frequency_tag 9 +#define openxc_DiagnosticRequest_name_tag 10 #define openxc_DiagnosticResponse_bus_tag 1 #define openxc_DiagnosticResponse_message_id_tag 2 #define openxc_DiagnosticResponse_mode_tag 3 @@ -208,17 +205,17 @@ 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_DiagnosticRequest_fields[12]; +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 678 +#define openxc_VehicleMessage_size 676 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 90 +#define openxc_ControlCommand_size 88 #define openxc_CommandResponse_size 137 -#define openxc_DiagnosticRequest_size 82 +#define openxc_DiagnosticRequest_size 80 #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 00f1fe09..687e0644 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3355,67 +3355,57 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getPayload(); - // optional bool parse_payload = 6; + // optional bool multiple_responses = 6; /** - * <code>optional bool parse_payload = 6;</code> - */ - boolean hasParsePayload(); - /** - * <code>optional bool parse_payload = 6;</code> - */ - boolean getParsePayload(); - - // optional bool multiple_responses = 7; - /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ boolean hasMultipleResponses(); /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ boolean getMultipleResponses(); - // optional double factor = 8; + // optional double factor = 7; /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ boolean hasFactor(); /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ double getFactor(); - // optional double offset = 9; + // optional double offset = 8; /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ boolean hasOffset(); /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ double getOffset(); - // optional double frequency = 10; + // optional double frequency = 9; /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ boolean hasFrequency(); /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ double getFrequency(); - // optional string name = 11; + // optional string name = 10; /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ boolean hasName(); /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ java.lang.String getName(); /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ com.google.protobuf.ByteString getNameBytes(); @@ -3498,31 +3488,26 @@ public final class BinaryMessages { } case 48: { bitField0_ |= 0x00000020; - parsePayload_ = input.readBool(); + multipleResponses_ = input.readBool(); break; } - case 56: { + case 57: { bitField0_ |= 0x00000040; - multipleResponses_ = input.readBool(); + factor_ = input.readDouble(); break; } case 65: { bitField0_ |= 0x00000080; - factor_ = input.readDouble(); + offset_ = input.readDouble(); break; } case 73: { bitField0_ |= 0x00000100; - offset_ = input.readDouble(); - break; - } - case 81: { - bitField0_ |= 0x00000200; frequency_ = input.readDouble(); break; } - case 90: { - bitField0_ |= 0x00000400; + case 82: { + bitField0_ |= 0x00000200; name_ = input.readBytes(); break; } @@ -3656,97 +3641,81 @@ public final class BinaryMessages { return payload_; } - // optional bool parse_payload = 6; - public static final int PARSE_PAYLOAD_FIELD_NUMBER = 6; - private boolean parsePayload_; - /** - * <code>optional bool parse_payload = 6;</code> - */ - public boolean hasParsePayload() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * <code>optional bool parse_payload = 6;</code> - */ - public boolean getParsePayload() { - return parsePayload_; - } - - // optional bool multiple_responses = 7; - public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 7; + // optional bool multiple_responses = 6; + public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6; private boolean multipleResponses_; /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ public boolean hasMultipleResponses() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ public boolean getMultipleResponses() { return multipleResponses_; } - // optional double factor = 8; - public static final int FACTOR_FIELD_NUMBER = 8; + // optional double factor = 7; + public static final int FACTOR_FIELD_NUMBER = 7; private double factor_; /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ public boolean hasFactor() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ public double getFactor() { return factor_; } - // optional double offset = 9; - public static final int OFFSET_FIELD_NUMBER = 9; + // optional double offset = 8; + public static final int OFFSET_FIELD_NUMBER = 8; private double offset_; /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ public boolean hasOffset() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ public double getOffset() { return offset_; } - // optional double frequency = 10; - public static final int FREQUENCY_FIELD_NUMBER = 10; + // optional double frequency = 9; + public static final int FREQUENCY_FIELD_NUMBER = 9; private double frequency_; /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ public double getFrequency() { return frequency_; } - // optional string name = 11; - public static final int NAME_FIELD_NUMBER = 11; + // optional string name = 10; + public static final int NAME_FIELD_NUMBER = 10; private java.lang.Object name_; /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public boolean hasName() { - return ((bitField0_ & 0x00000400) == 0x00000400); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -3763,7 +3732,7 @@ public final class BinaryMessages { } } /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public com.google.protobuf.ByteString getNameBytes() { @@ -3785,7 +3754,6 @@ public final class BinaryMessages { mode_ = 0; pid_ = 0; payload_ = com.google.protobuf.ByteString.EMPTY; - parsePayload_ = false; multipleResponses_ = false; factor_ = 0D; offset_ = 0D; @@ -3820,22 +3788,19 @@ public final class BinaryMessages { output.writeBytes(5, payload_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBool(6, parsePayload_); + output.writeBool(6, multipleResponses_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBool(7, multipleResponses_); + output.writeDouble(7, factor_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeDouble(8, factor_); + output.writeDouble(8, offset_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeDouble(9, offset_); + output.writeDouble(9, frequency_); } if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeDouble(10, frequency_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeBytes(11, getNameBytes()); + output.writeBytes(10, getNameBytes()); } getUnknownFields().writeTo(output); } @@ -3868,27 +3833,23 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, parsePayload_); + .computeBoolSize(6, multipleResponses_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, multipleResponses_); + .computeDoubleSize(7, factor_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(8, factor_); + .computeDoubleSize(8, offset_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(9, offset_); + .computeDoubleSize(9, frequency_); } if (((bitField0_ & 0x00000200) == 0x00000200)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(10, frequency_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(11, getNameBytes()); + .computeBytesSize(10, getNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4016,18 +3977,16 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); payload_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); - parsePayload_ = false; - bitField0_ = (bitField0_ & ~0x00000020); multipleResponses_ = false; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); factor_ = 0D; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000040); offset_ = 0D; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000080); frequency_ = 0D; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); name_ = ""; - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4079,26 +4038,22 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } - result.parsePayload_ = parsePayload_; + result.multipleResponses_ = multipleResponses_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } - result.multipleResponses_ = multipleResponses_; + result.factor_ = factor_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } - result.factor_ = factor_; + result.offset_ = offset_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } - result.offset_ = offset_; + result.frequency_ = frequency_; if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000200; } - result.frequency_ = frequency_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } result.name_ = name_; result.bitField0_ = to_bitField0_; onBuilt(); @@ -4131,9 +4086,6 @@ public final class BinaryMessages { if (other.hasPayload()) { setPayload(other.getPayload()); } - if (other.hasParsePayload()) { - setParsePayload(other.getParsePayload()); - } if (other.hasMultipleResponses()) { setMultipleResponses(other.getMultipleResponses()); } @@ -4147,7 +4099,7 @@ public final class BinaryMessages { setFrequency(other.getFrequency()); } if (other.hasName()) { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; name_ = other.name_; onChanged(); } @@ -4366,181 +4318,148 @@ public final class BinaryMessages { return this; } - // optional bool parse_payload = 6; - private boolean parsePayload_ ; - /** - * <code>optional bool parse_payload = 6;</code> - */ - public boolean hasParsePayload() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * <code>optional bool parse_payload = 6;</code> - */ - public boolean getParsePayload() { - return parsePayload_; - } - /** - * <code>optional bool parse_payload = 6;</code> - */ - public Builder setParsePayload(boolean value) { - bitField0_ |= 0x00000020; - parsePayload_ = value; - onChanged(); - return this; - } - /** - * <code>optional bool parse_payload = 6;</code> - */ - public Builder clearParsePayload() { - bitField0_ = (bitField0_ & ~0x00000020); - parsePayload_ = false; - onChanged(); - return this; - } - - // optional bool multiple_responses = 7; + // optional bool multiple_responses = 6; private boolean multipleResponses_ ; /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ public boolean hasMultipleResponses() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ public boolean getMultipleResponses() { return multipleResponses_; } /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ public Builder setMultipleResponses(boolean value) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; multipleResponses_ = value; onChanged(); return this; } /** - * <code>optional bool multiple_responses = 7;</code> + * <code>optional bool multiple_responses = 6;</code> */ public Builder clearMultipleResponses() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); multipleResponses_ = false; onChanged(); return this; } - // optional double factor = 8; + // optional double factor = 7; private double factor_ ; /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ public boolean hasFactor() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ public double getFactor() { return factor_; } /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ public Builder setFactor(double value) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; factor_ = value; onChanged(); return this; } /** - * <code>optional double factor = 8;</code> + * <code>optional double factor = 7;</code> */ public Builder clearFactor() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000040); factor_ = 0D; onChanged(); return this; } - // optional double offset = 9; + // optional double offset = 8; private double offset_ ; /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ public boolean hasOffset() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ public double getOffset() { return offset_; } /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ public Builder setOffset(double value) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; offset_ = value; onChanged(); return this; } /** - * <code>optional double offset = 9;</code> + * <code>optional double offset = 8;</code> */ public Builder clearOffset() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000080); offset_ = 0D; onChanged(); return this; } - // optional double frequency = 10; + // optional double frequency = 9; private double frequency_ ; /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ public double getFrequency() { return frequency_; } /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ public Builder setFrequency(double value) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; frequency_ = value; onChanged(); return this; } /** - * <code>optional double frequency = 10;</code> + * <code>optional double frequency = 9;</code> */ public Builder clearFrequency() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); frequency_ = 0D; onChanged(); return this; } - // optional string name = 11; + // optional string name = 10; private java.lang.Object name_ = ""; /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public boolean hasName() { - return ((bitField0_ & 0x00000400) == 0x00000400); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -4554,7 +4473,7 @@ public final class BinaryMessages { } } /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public com.google.protobuf.ByteString getNameBytes() { @@ -4570,36 +4489,36 @@ public final class BinaryMessages { } } /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; name_ = value; onChanged(); return this; } /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000200); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * <code>optional string name = 11;</code> + * <code>optional string name = 10;</code> */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; name_ = value; onChanged(); return this; @@ -7566,28 +7485,27 @@ 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\"\324\001\n\021DiagnosticRequest" + + "e\022\017\n\007message\030\002 \001(\t\"\275\001\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\025\n" + - "\rparse_payload\030\006 \001(\010\022\032\n\022multiple_respons" + - "es\030\007 \001(\010\022\016\n\006factor\030\010 \001(\001\022\016\n\006offset\030\t \001(\001" + - "\022\021\n\tfrequency\030\n \001(\001\022\014\n\004name\030\013 \001(\t\"\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" + "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\016\n\006factor\030\007 \001(" + + "\001\022\016\n\006offset\030\010 \001(\001\022\021\n\tfrequency\030\t \001(\001\022\014\n\004" + + "name\030\n \001(\t\"\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() { @@ -7623,7 +7541,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", "ParsePayload", "MultipleResponses", "Factor", "Offset", "Frequency", "Name", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Factor", "Offset", "Frequency", "Name", }); 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 7432b21e..1e2191d6 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\"\xd4\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\x1a\n\x12multiple_responses\x18\x07 \x01(\x08\x12\x0e\n\x06\x66\x61\x63tor\x18\x08 \x01(\x01\x12\x0e\n\x06offset\x18\t \x01(\x01\x12\x11\n\tfrequency\x18\n \x01(\x01\x12\x0c\n\x04name\x18\x0b \x01(\t\"\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\"\xbd\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\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\x12\x0c\n\x04name\x18\n \x01(\t\"\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') @@ -96,8 +96,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1245, - serialized_end=1282, + serialized_start=1222, + serialized_end=1259, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -133,8 +133,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1440, - serialized_end=1532, + serialized_start=1417, + serialized_end=1509, ) @@ -358,43 +358,36 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='parse_payload', full_name='openxc.DiagnosticRequest.parse_payload', index=5, + name='multiple_responses', full_name='openxc.DiagnosticRequest.multiple_responses', index=5, number=6, 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), _descriptor.FieldDescriptor( - name='multiple_responses', full_name='openxc.DiagnosticRequest.multiple_responses', index=6, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, + name='factor', full_name='openxc.DiagnosticRequest.factor', index=6, + number=7, type=1, cpp_type=5, 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='factor', full_name='openxc.DiagnosticRequest.factor', index=7, + name='offset', full_name='openxc.DiagnosticRequest.offset', index=7, number=8, type=1, cpp_type=5, 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='offset', full_name='openxc.DiagnosticRequest.offset', index=8, + name='frequency', full_name='openxc.DiagnosticRequest.frequency', index=8, number=9, type=1, cpp_type=5, 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='frequency', full_name='openxc.DiagnosticRequest.frequency', index=9, - number=10, type=1, cpp_type=5, 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='name', full_name='openxc.DiagnosticRequest.name', index=10, - number=11, type=9, cpp_type=9, label=1, + name='name', full_name='openxc.DiagnosticRequest.name', index=9, + number=10, 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, @@ -409,7 +402,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=741, - serialized_end=953, + serialized_end=930, ) @@ -485,8 +478,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=956, - serialized_end=1117, + serialized_start=933, + serialized_end=1094, ) @@ -535,8 +528,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1120, - serialized_end=1282, + serialized_start=1097, + serialized_end=1259, ) @@ -585,8 +578,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1285, - serialized_end=1532, + serialized_start=1262, + serialized_end=1509, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 2deaf3bc..daccea2d 100644 --- a/openxc.proto +++ b/openxc.proto @@ -41,12 +41,11 @@ message DiagnosticRequest { // TODO we are capping this at 8 bytes for now - need to change when we // support multi-frame responses optional bytes payload = 5; - optional bool parse_payload = 6; - optional bool multiple_responses = 7; - optional double factor = 8; - optional double offset = 9; - optional double frequency = 10; - optional string name = 11; + optional bool multiple_responses = 6; + optional double factor = 7; + optional double offset = 8; + optional double frequency = 9; + optional string name = 10; } message DiagnosticResponse { |