/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.2.5 at Fri Jan 17 14:12:22 2014. */
+/* Generated by nanopb-0.2.5 at Fri Jan 17 14:31:26 2014. */
#include "openxc.pb.h"
PB_FIELD2( 4, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, pid, mode, 0),
PB_FIELD2( 5, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, success, pid, 0),
PB_FIELD2( 6, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, negative_response_code, success, 0),
- PB_FIELD2( 7, UINT64 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, payload, negative_response_code, 0),
+ PB_FIELD2( 7, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, payload, negative_response_code, 0),
PB_LAST_FIELD
};
*/
int getNegativeResponseCode();
- // optional uint64 payload = 7;
+ // optional bytes payload = 7;
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
boolean hasPayload();
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
- long getPayload();
+ com.google.protobuf.ByteString getPayload();
}
/**
* Protobuf type {@code openxc.DiagnosticMessage}
negativeResponseCode_ = input.readUInt32();
break;
}
- case 56: {
+ case 58: {
bitField0_ |= 0x00000040;
- payload_ = input.readUInt64();
+ payload_ = input.readBytes();
break;
}
}
return negativeResponseCode_;
}
- // optional uint64 payload = 7;
+ // optional bytes payload = 7;
public static final int PAYLOAD_FIELD_NUMBER = 7;
- private long payload_;
+ private com.google.protobuf.ByteString payload_;
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
public boolean hasPayload() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
- public long getPayload() {
+ public com.google.protobuf.ByteString getPayload() {
return payload_;
}
pid_ = 0;
success_ = false;
negativeResponseCode_ = 0;
- payload_ = 0L;
+ payload_ = com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
output.writeUInt32(6, negativeResponseCode_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
- output.writeUInt64(7, payload_);
+ output.writeBytes(7, payload_);
}
getUnknownFields().writeTo(output);
}
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(7, payload_);
+ .computeBytesSize(7, payload_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
bitField0_ = (bitField0_ & ~0x00000010);
negativeResponseCode_ = 0;
bitField0_ = (bitField0_ & ~0x00000020);
- payload_ = 0L;
+ payload_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
return this;
}
return this;
}
- // optional uint64 payload = 7;
- private long payload_ ;
+ // optional bytes payload = 7;
+ private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
public boolean hasPayload() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
- public long getPayload() {
+ public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
- public Builder setPayload(long value) {
- bitField0_ |= 0x00000040;
+ public Builder setPayload(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000040;
payload_ = value;
onChanged();
return this;
}
/**
- * <code>optional uint64 payload = 7;</code>
+ * <code>optional bytes payload = 7;</code>
+ *
+ * <pre>
+ * TODO we are capping this at 8 bytes for now - need to change when we
+ * support multi-frame responses
+ * </pre>
*/
public Builder clearPayload() {
bitField0_ = (bitField0_ & ~0x00000040);
- payload_ = 0L;
+ payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
"iagnosticMessage\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(\004\"\265\002\n\021TranslatedMes" +
+ "\006 \001(\r\022\017\n\007payload\030\007 \001(\014\"\265\002\n\021TranslatedMes" +
"sage\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMe" +
"ssage.Type\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" +
DESCRIPTOR = _descriptor.FileDescriptor(
name='openxc.proto',
package='openxc',
- serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\xbc\x01\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\"\x1f\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\";\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(\x04\"\x91\x01\n\x11\x44iagnosticMessage\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(\x04\"\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\"\xbc\x01\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\"\x1f\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\";\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(\x04\"\x91\x01\n\x11\x44iagnosticMessage\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\"\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')
options=None),
_descriptor.FieldDescriptor(
name='payload', full_name='openxc.DiagnosticMessage.payload', index=6,
- number=7, type=4, cpp_type=4, label=1,
- has_default_value=False, default_value=0,
+ number=7, type=12, cpp_type=9, label=1,
+ has_default_value=False, default_value="",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),