summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--gen/cpp/openxc.pb9
-rw-r--r--gen/cpp/openxc.pb.c7
-rw-r--r--gen/cpp/openxc.pb.h19
-rw-r--r--gen/java/com/openxc/BinaryMessages.java182
-rw-r--r--gen/python/openxc_pb2.py53
-rw-r--r--openxc.proto3
7 files changed, 89 insertions, 185 deletions
diff --git a/README.md b/README.md
index 350cd24e..2cde1305 100644
--- a/README.md
+++ b/README.md
@@ -338,7 +338,6 @@ Valid formats are `json` and `binary`.
**Request**
{ "command": "message_format",
- "bus": 1,
"format": "json"
}
diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb
index dfad822b..5b90df96 100644
--- a/gen/cpp/openxc.pb
+++ b/gen/cpp/openxc.pb
@@ -1,5 +1,5 @@
-œ
+Ž
openxc.protoopenxc"”
VehicleMessage)
type (2.openxc.VehicleMessage.Type'
@@ -48,10 +48,9 @@ DIAGNOSTIC
enabled ("<
AcceptanceFilterBypassCommand
bus (
-bypass ("†
-MessageFormatCommand
-bus (:
-format (2*.openxc.MessageFormatCommand.MessageFormat"%
+bypass ("y
+MessageFormatCommand:
+format (2*.openxc.MessageFormatCommand.MessageFormat"%
MessageFormat
JSON
diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c
index 3fd1b4ab..0c04bc4f 100644
--- a/gen/cpp/openxc.pb.c
+++ b/gen/cpp/openxc.pb.c
@@ -1,5 +1,5 @@
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.1 at Sat Sep 27 19:56:19 2014. */
+/* Generated by nanopb-0.3.1 at Sat Sep 27 20:17:56 2014. */
#include "openxc.pb.h"
@@ -53,9 +53,8 @@ const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3] = {
PB_LAST_FIELD
};
-const pb_field_t openxc_MessageFormatCommand_fields[3] = {
- PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_MessageFormatCommand, bus, bus, 0),
- PB_FIELD( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_MessageFormatCommand, format, bus, 0),
+const pb_field_t openxc_MessageFormatCommand_fields[2] = {
+ PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_MessageFormatCommand, format, format, 0),
PB_LAST_FIELD
};
diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h
index 792aa935..2091dfaf 100644
--- a/gen/cpp/openxc.pb.h
+++ b/gen/cpp/openxc.pb.h
@@ -1,5 +1,5 @@
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.1 at Sat Sep 27 19:56:19 2014. */
+/* Generated by nanopb-0.3.1 at Sat Sep 27 20:17:56 2014. */
#ifndef PB_OPENXC_PB_H_INCLUDED
#define PB_OPENXC_PB_H_INCLUDED
@@ -134,8 +134,6 @@ typedef struct _openxc_DynamicField {
} openxc_DynamicField;
typedef struct _openxc_MessageFormatCommand {
- bool has_bus;
- int32_t bus;
bool has_format;
openxc_MessageFormatCommand_MessageFormat format;
} openxc_MessageFormatCommand;
@@ -213,7 +211,7 @@ typedef struct _openxc_VehicleMessage {
#define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0}
#define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0}
#define openxc_AcceptanceFilterBypassCommand_init_default {false, 0, false, 0}
-#define openxc_MessageFormatCommand_init_default {false, 0, false, (openxc_MessageFormatCommand_MessageFormat)0}
+#define openxc_MessageFormatCommand_init_default {false, (openxc_MessageFormatCommand_MessageFormat)0}
#define openxc_CommandResponse_init_default {false, (openxc_ControlCommand_Type)0, false, "", false, 0}
#define openxc_DiagnosticRequest_init_default {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0}
#define openxc_DiagnosticResponse_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0}
@@ -225,7 +223,7 @@ typedef struct _openxc_VehicleMessage {
#define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0}
#define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0}
#define openxc_AcceptanceFilterBypassCommand_init_zero {false, 0, false, 0}
-#define openxc_MessageFormatCommand_init_zero {false, 0, false, (openxc_MessageFormatCommand_MessageFormat)0}
+#define openxc_MessageFormatCommand_init_zero {false, (openxc_MessageFormatCommand_MessageFormat)0}
#define openxc_CommandResponse_init_zero {false, (openxc_ControlCommand_Type)0, false, "", false, 0}
#define openxc_DiagnosticRequest_init_zero {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0}
#define openxc_DiagnosticResponse_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0}
@@ -259,8 +257,7 @@ typedef struct _openxc_VehicleMessage {
#define openxc_DynamicField_string_value_tag 2
#define openxc_DynamicField_numeric_value_tag 3
#define openxc_DynamicField_boolean_value_tag 4
-#define openxc_MessageFormatCommand_bus_tag 1
-#define openxc_MessageFormatCommand_format_tag 2
+#define openxc_MessageFormatCommand_format_tag 1
#define openxc_PassthroughModeControlCommand_bus_tag 1
#define openxc_PassthroughModeControlCommand_enabled_tag 2
#define openxc_RawMessage_bus_tag 1
@@ -291,7 +288,7 @@ extern const pb_field_t openxc_ControlCommand_fields[6];
extern const pb_field_t openxc_DiagnosticControlCommand_fields[3];
extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3];
extern const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3];
-extern const pb_field_t openxc_MessageFormatCommand_fields[3];
+extern const pb_field_t openxc_MessageFormatCommand_fields[2];
extern const pb_field_t openxc_CommandResponse_fields[4];
extern const pb_field_t openxc_DiagnosticRequest_fields[10];
extern const pb_field_t openxc_DiagnosticResponse_fields[9];
@@ -299,13 +296,13 @@ extern const pb_field_t openxc_DynamicField_fields[5];
extern const pb_field_t openxc_TranslatedMessage_fields[5];
/* Maximum encoded size of messages (where known) */
-#define openxc_VehicleMessage_size 724
+#define openxc_VehicleMessage_size 712
#define openxc_RawMessage_size 27
-#define openxc_ControlCommand_size 133
+#define openxc_ControlCommand_size 122
#define openxc_DiagnosticControlCommand_size 76
#define openxc_PassthroughModeControlCommand_size 13
#define openxc_AcceptanceFilterBypassCommand_size 13
-#define openxc_MessageFormatCommand_size 17
+#define openxc_MessageFormatCommand_size 6
#define openxc_CommandResponse_size 139
#define openxc_DiagnosticRequest_size 68
#define openxc_DiagnosticResponse_size 56
diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java
index 7a745c5c..902b0c30 100644
--- a/gen/java/com/openxc/BinaryMessages.java
+++ b/gen/java/com/openxc/BinaryMessages.java
@@ -4970,23 +4970,13 @@ public final class BinaryMessages {
public interface MessageFormatCommandOrBuilder
extends com.google.protobuf.MessageOrBuilder {
- // optional int32 bus = 1;
- /**
- * <code>optional int32 bus = 1;</code>
- */
- boolean hasBus();
- /**
- * <code>optional int32 bus = 1;</code>
- */
- int getBus();
-
- // optional .openxc.MessageFormatCommand.MessageFormat format = 2;
+ // optional .openxc.MessageFormatCommand.MessageFormat format = 1;
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
boolean hasFormat();
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat();
}
@@ -5042,17 +5032,12 @@ public final class BinaryMessages {
break;
}
case 8: {
- bitField0_ |= 0x00000001;
- bus_ = input.readInt32();
- break;
- }
- case 16: {
int rawValue = input.readEnum();
com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.valueOf(rawValue);
if (value == null) {
- unknownFields.mergeVarintField(2, rawValue);
+ unknownFields.mergeVarintField(1, rawValue);
} else {
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
format_ = value;
}
break;
@@ -5179,40 +5164,23 @@ public final class BinaryMessages {
}
private int bitField0_;
- // optional int32 bus = 1;
- public static final int BUS_FIELD_NUMBER = 1;
- private int bus_;
- /**
- * <code>optional int32 bus = 1;</code>
- */
- public boolean hasBus() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>optional int32 bus = 1;</code>
- */
- public int getBus() {
- return bus_;
- }
-
- // optional .openxc.MessageFormatCommand.MessageFormat format = 2;
- public static final int FORMAT_FIELD_NUMBER = 2;
+ // optional .openxc.MessageFormatCommand.MessageFormat format = 1;
+ public static final int FORMAT_FIELD_NUMBER = 1;
private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_;
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
public boolean hasFormat() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
+ return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() {
return format_;
}
private void initFields() {
- bus_ = 0;
format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON;
}
private byte memoizedIsInitialized = -1;
@@ -5228,10 +5196,7 @@ public final class BinaryMessages {
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeInt32(1, bus_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeEnum(2, format_.getNumber());
+ output.writeEnum(1, format_.getNumber());
}
getUnknownFields().writeTo(output);
}
@@ -5244,11 +5209,7 @@ public final class BinaryMessages {
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, bus_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(2, format_.getNumber());
+ .computeEnumSize(1, format_.getNumber());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
@@ -5366,10 +5327,8 @@ public final class BinaryMessages {
public Builder clear() {
super.clear();
- bus_ = 0;
- bitField0_ = (bitField0_ & ~0x00000001);
format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON;
- bitField0_ = (bitField0_ & ~0x00000002);
+ bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@@ -5401,10 +5360,6 @@ public final class BinaryMessages {
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
- result.bus_ = bus_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
result.format_ = format_;
result.bitField0_ = to_bitField0_;
onBuilt();
@@ -5422,9 +5377,6 @@ public final class BinaryMessages {
public Builder mergeFrom(com.openxc.BinaryMessages.MessageFormatCommand other) {
if (other == com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) return this;
- if (other.hasBus()) {
- setBus(other.getBus());
- }
if (other.hasFormat()) {
setFormat(other.getFormat());
}
@@ -5455,70 +5407,37 @@ public final class BinaryMessages {
}
private int bitField0_;
- // optional int32 bus = 1;
- private int bus_ ;
- /**
- * <code>optional int32 bus = 1;</code>
- */
- public boolean hasBus() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>optional int32 bus = 1;</code>
- */
- public int getBus() {
- return bus_;
- }
- /**
- * <code>optional int32 bus = 1;</code>
- */
- public Builder setBus(int value) {
- bitField0_ |= 0x00000001;
- bus_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional int32 bus = 1;</code>
- */
- public Builder clearBus() {
- bitField0_ = (bitField0_ & ~0x00000001);
- bus_ = 0;
- onChanged();
- return this;
- }
-
- // optional .openxc.MessageFormatCommand.MessageFormat format = 2;
+ // optional .openxc.MessageFormatCommand.MessageFormat format = 1;
private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON;
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
public boolean hasFormat() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
+ return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() {
return format_;
}
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
public Builder setFormat(com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value) {
if (value == null) {
throw new NullPointerException();
}
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
format_ = value;
onChanged();
return this;
}
/**
- * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 2;</code>
+ * <code>optional .openxc.MessageFormatCommand.MessageFormat format = 1;</code>
*/
public Builder clearFormat() {
- bitField0_ = (bitField0_ & ~0x00000002);
+ bitField0_ = (bitField0_ & ~0x00000001);
format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON;
onChanged();
return this;
@@ -10412,35 +10331,34 @@ public final class BinaryMessages {
"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passth" +
"roughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007" +
"enabled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassC",
- "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"\206\001\n\024" +
- "MessageFormatCommand\022\013\n\003bus\030\001 \001(\005\022:\n\006for" +
- "mat\030\002 \001(\0162*.openxc.MessageFormatCommand." +
- "MessageFormat\"%\n\rMessageFormat\022\010\n\004JSON\020\001" +
- "\022\n\n\006BINARY\020\002\"]\n\017CommandResponse\022)\n\004type\030" +
- "\001 \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007me" +
- "ssage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagnost" +
- "icRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001" +
- "(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload" +
- "\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022\021\n\tfr",
- "equency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_t" +
- "ype\030\t \001(\0162%.openxc.DiagnosticRequest.Dec" +
- "odedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD" +
- "2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022" +
- "\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid" +
- "\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_resp" +
- "onse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005valu" +
- "e\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031" +
- ".openxc.DynamicField.Type\022\024\n\014string_valu" +
- "e\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolea",
- "n_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM" +
- "\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004ty" +
- "pe\030\001 \001(\0162\036.openxc.TranslatedMessage.Type" +
- "\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.D" +
- "ynamicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dyna" +
- "micField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n" +
- "\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_N" +
- "UM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bi" +
- "naryMessages"
+ "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"y\n\024M" +
+ "essageFormatCommand\022:\n\006format\030\001 \001(\0162*.op" +
+ "enxc.MessageFormatCommand.MessageFormat\"" +
+ "%\n\rMessageFormat\022\010\n\004JSON\020\001\022\n\n\006BINARY\020\002\"]" +
+ "\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.openxc" +
+ ".ControlCommand.Type\022\017\n\007message\030\002 \001(\t\022\016\n" +
+ "\006status\030\003 \001(\010\"\375\001\n\021DiagnosticRequest\022\013\n\003b" +
+ "us\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001" +
+ "(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030\005 \001(\014\022\032\n\022mult" +
+ "iple_responses\030\006 \001(\010\022\021\n\tfrequency\030\007 \001(\001\022",
+ "\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\0162%.op" +
+ "enxc.DiagnosticRequest.DecodedType\"!\n\013De" +
+ "codedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diagno" +
+ "sticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030" +
+ "\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007succ" +
+ "ess\030\005 \001(\010\022\036\n\026negative_response_code\030\006 \001(" +
+ "\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014Dy" +
+ "namicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dynami" +
+ "cField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rnum" +
+ "eric_value\030\003 \001(\001\022\025\n\rboolean_value\030\004 \001(\010\"",
+ "%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367" +
+ "\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162\036.ope" +
+ "nxc.TranslatedMessage.Type\022\014\n\004name\030\002 \001(\t" +
+ "\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicField\022#\n" +
+ "\005event\030\004 \001(\0132\024.openxc.DynamicField\"\\\n\004Ty" +
+ "pe\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVE" +
+ "NTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVENTE" +
+ "D_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -10488,7 +10406,7 @@ public final class BinaryMessages {
internal_static_openxc_MessageFormatCommand_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_openxc_MessageFormatCommand_descriptor,
- new java.lang.String[] { "Bus", "Format", });
+ new java.lang.String[] { "Format", });
internal_static_openxc_CommandResponse_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_openxc_CommandResponse_fieldAccessorTable = new
diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py
index 5488b5bb..c5d42154 100644
--- a/gen/python/openxc_pb2.py
+++ b/gen/python/openxc_pb2.py
@@ -13,7 +13,7 @@ from google.protobuf import descriptor_pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='openxc.proto',
package='openxc',
- serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\";\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xc8\x03\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12<\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32 .openxc.DiagnosticControlCommand\x12G\n\x18passthrough_mode_request\x18\x03 \x01(\x0b\x32%.openxc.PassthroughModeControlCommand\x12O\n acceptance_filter_bypass_command\x18\x04 \x01(\x0b\x32%.openxc.AcceptanceFilterBypassCommand\x12<\n\x16message_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.MessageFormatCommand\"u\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x0f\n\x0bPASSTHROUGH\x10\x04\x12\x1c\n\x18\x41\x43\x43\x45PTANCE_FILTER_BYPASS\x10\x05\x12\x12\n\x0eMESSAGE_FORMAT\x10\x06\"\x9e\x01\n\x18\x44iagnosticControlCommand\x12*\n\x07request\x18\x01 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12\x37\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\'.openxc.DiagnosticControlCommand.Action\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"=\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"<\n\x1d\x41\x63\x63\x65ptanceFilterBypassCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0e\n\x06\x62ypass\x18\x02 \x01(\x08\"\x86\x01\n\x14MessageFormatCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12:\n\x06\x66ormat\x18\x02 \x01(\x0e\x32*.openxc.MessageFormatCommand.MessageFormat\"%\n\rMessageFormat\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06\x42INARY\x10\x02\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages')
+ serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\";\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xc8\x03\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12<\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32 .openxc.DiagnosticControlCommand\x12G\n\x18passthrough_mode_request\x18\x03 \x01(\x0b\x32%.openxc.PassthroughModeControlCommand\x12O\n acceptance_filter_bypass_command\x18\x04 \x01(\x0b\x32%.openxc.AcceptanceFilterBypassCommand\x12<\n\x16message_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.MessageFormatCommand\"u\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x0f\n\x0bPASSTHROUGH\x10\x04\x12\x1c\n\x18\x41\x43\x43\x45PTANCE_FILTER_BYPASS\x10\x05\x12\x12\n\x0eMESSAGE_FORMAT\x10\x06\"\x9e\x01\n\x18\x44iagnosticControlCommand\x12*\n\x07request\x18\x01 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12\x37\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\'.openxc.DiagnosticControlCommand.Action\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"=\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"<\n\x1d\x41\x63\x63\x65ptanceFilterBypassCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x0e\n\x06\x62ypass\x18\x02 \x01(\x08\"y\n\x14MessageFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.MessageFormatCommand.MessageFormat\"%\n\rMessageFormat\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06\x42INARY\x10\x02\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages')
@@ -125,8 +125,8 @@ _MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
- serialized_start=1335,
- serialized_end=1372,
+ serialized_start=1321,
+ serialized_end=1358,
)
_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor(
@@ -146,8 +146,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
- serialized_start=1690,
- serialized_end=1723,
+ serialized_start=1676,
+ serialized_end=1709,
)
_DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor(
@@ -171,8 +171,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
- serialized_start=2015,
- serialized_end=2052,
+ serialized_start=2001,
+ serialized_end=2038,
)
_TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor(
@@ -208,8 +208,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
- serialized_start=2210,
- serialized_end=2302,
+ serialized_start=2196,
+ serialized_end=2288,
)
@@ -490,15 +490,8 @@ _MESSAGEFORMATCOMMAND = _descriptor.Descriptor(
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
- name='bus', full_name='openxc.MessageFormatCommand.bus', index=0,
- number=1, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='format', full_name='openxc.MessageFormatCommand.format', index=1,
- number=2, type=14, cpp_type=8, label=1,
+ name='format', full_name='openxc.MessageFormatCommand.format', index=0,
+ number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
@@ -513,8 +506,8 @@ _MESSAGEFORMATCOMMAND = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1238,
- serialized_end=1372,
+ serialized_start=1237,
+ serialized_end=1358,
)
@@ -555,8 +548,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1374,
- serialized_end=1467,
+ serialized_start=1360,
+ serialized_end=1453,
)
@@ -640,8 +633,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1470,
- serialized_end=1723,
+ serialized_start=1456,
+ serialized_end=1709,
)
@@ -717,8 +710,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1726,
- serialized_end=1887,
+ serialized_start=1712,
+ serialized_end=1873,
)
@@ -767,8 +760,8 @@ _DYNAMICFIELD = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1890,
- serialized_end=2052,
+ serialized_start=1876,
+ serialized_end=2038,
)
@@ -817,8 +810,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=2055,
- serialized_end=2302,
+ serialized_start=2041,
+ serialized_end=2288,
)
_VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE
diff --git a/openxc.proto b/openxc.proto
index 97a6ebb6..e0264c6b 100644
--- a/openxc.proto
+++ b/openxc.proto
@@ -61,8 +61,7 @@ message MessageFormatCommand {
BINARY = 2;
}
- optional int32 bus = 1;
- optional MessageFormat format = 2;
+ optional MessageFormat format = 1;
}
message CommandResponse {