From b4bdf4e1ecdf99d8ecb0f13a99605aa10154169a Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 3 May 2013 12:15:49 -0400 Subject: Initial commit, moved from openxcplatform.com. --- CHANGELOG.md | 5 +++++ README.md | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 README.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..4022550a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# OpenXC Message Format Changelog + +## v0.1 + +* Initial release diff --git a/README.md b/README.md new file mode 100644 index 00000000..3ae3775b --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# OpenXC Message Format Specification + +There are two valid message types - single valued and evented. + +There may not be a 1:1 relationship between input and output signals - i.e. raw +engine timing CAN signals may be summarized in an "engine performance" metric on +the abstract side of the interface. + +## Single Valued + +The expected format of a single valued message is: + +{% highlight javascript %} +{"name": "steering_wheel_angle", "value": 45} +{% endhighlight %} + +## Evented + +The expected format of an event message is: + +{% highlight javascript %} +{"name": "button_event", "value": "up", "event": "pressed"} +{% endhighlight %} + +This format is good for something like a button event, where there are two +discrete pieces of information in the measurement. -- cgit 1.2.3-korg From 1c602e1df648f8ef2665278251316d1ee31cecd2 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 3 May 2013 12:16:55 -0400 Subject: Don't use pygments highlighting in README. --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ae3775b..ceb7ec35 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,13 @@ the abstract side of the interface. The expected format of a single valued message is: -{% highlight javascript %} -{"name": "steering_wheel_angle", "value": 45} -{% endhighlight %} + {"name": "steering_wheel_angle", "value": 45} ## Evented The expected format of an event message is: -{% highlight javascript %} -{"name": "button_event", "value": "up", "event": "pressed"} -{% endhighlight %} + {"name": "button_event", "value": "up", "event": "pressed"} This format is good for something like a button event, where there are two discrete pieces of information in the measurement. -- cgit 1.2.3-korg From 8e6aeac288787abbe415c90c8ef490a90b2a6c46 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 3 May 2013 12:28:54 -0400 Subject: Add license and official signal list. --- LICENSE | 24 ++++++++++++++++++++++++ README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..9a30ce45 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2012 Ford Motor Company +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index ceb7ec35..13622d68 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # OpenXC Message Format Specification +This specification is a part of the [OpenXC platform][OpenXC]. + +An OpenXC vehicle interface sends generic vehicle data over one or more output +interfaces (e.g. USB or Bluetooth) as JSON objects, separated by newlines. + There are two valid message types - single valued and evented. There may not be a 1:1 relationship between input and output signals - i.e. raw @@ -20,3 +25,56 @@ The expected format of an event message is: This format is good for something like a button event, where there are two discrete pieces of information in the measurement. + +## Official Signals + +These signal names are a part of the OpenXC specification, although some +manufacturers may support custom message names. + +* steering_wheel_angle + * numerical, degrees +* torque_at_transmission + * numerical, Nm +* engine_speed + * numerical, RPM +* vehicle_speed, numerical, Kph +* accelerator_pedal_position + * percentage +* parking_brake_status + * boolean, (true == brake engaged) +* brake_pedal_status + * boolean (True == pedal pressed) +* transmission_gear_position + * states: first, second, third, fourth, fifth, sixth, seventh, eighth, + reverse, neutral +* odometer + * Numerical, km +* ignition_status + * states: off, accessory, run, start +* fuel_level + * percentage +* fuel_consumed_since_restart + * numerical, liters (goes to 0 every time the + vehicle interfaces power cycles) +* door_status + * Value is State: driver, passenger, rear_left, rear_right. + * Event is boolean: true == ajar +* headlamp_status + * boolean, true is on +* high_beam_status + * boolean, true is on +* windshield_wiper_status + * boolean, true is on +* latitude + * numerical +* longitude + * numerical + +License +======= + +Copyright (c) 2012-2013 Ford Motor Company + +Licensed under the BSD license. + +[OpenXC]: http://openxcplatform.com -- cgit 1.2.3-korg From d121ae6f20376dc6fa75ef1140d7767f4ae236af Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 8 Aug 2013 10:34:59 -0400 Subject: Add a gear_lever_position signal to official set. This signal is primarily used on vehicles with continuously variable transmissions, where the transmission_gear_position signal is not useful. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 13622d68..8837b522 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,9 @@ manufacturers may support custom message names. * transmission_gear_position * states: first, second, third, fourth, fifth, sixth, seventh, eighth, reverse, neutral +* gear_lever_position + * states: neutral, park, reverse, drive, sport, low, first, second, third, + fourth, fifth, sixth * odometer * Numerical, km * ignition_status -- cgit 1.2.3-korg From 9bce073224cd7fb47327743ddc786199887556dc Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 26 Sep 2013 09:24:31 -0400 Subject: Document the RAW message format, including the bus attribute. --- CHANGELOG.md | 6 +++++- README.md | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4022550a..e40621ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # OpenXC Message Format Changelog +## v0.2 + +* Add a RAW can message format. + ## v0.1 -* Initial release +* Initial release. diff --git a/README.md b/README.md index 8837b522..81574a5c 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,22 @@ manufacturers may support custom message names. * longitude * numerical +## Raw CAN Message format + +An OpenXC vehicle interface may also output raw CAN messages. Each CAN message +is sent as a JSON object, separated by newlines. The format of each object is: + + {"bus": 1, "id": 1234, "value": "0x12345678"} + +**bus** - the numerical identifier of the CAN bus where this message originated, + most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). + +**id** - the CAN message ID + +**data** - up to 8 bytes of data from the CAN message's payload, represented as + a hexidecimal number in a string. Many JSON parser cannot handle 64-bit + integers, which is why we are not using a numerical data type. + License ======= -- cgit 1.2.3-korg From 21842ae6bf4aa2c2d7ecab86abe375dd3ba5c481 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 9 Oct 2013 12:51:35 -0400 Subject: Move frequencies here from the OpenXC site. --- README.md | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 81574a5c..bf6960a8 100644 --- a/README.md +++ b/README.md @@ -32,46 +32,68 @@ These signal names are a part of the OpenXC specification, although some manufacturers may support custom message names. * steering_wheel_angle - * numerical, degrees + * numerical, -600 to +600 degrees + * 10Hz * torque_at_transmission - * numerical, Nm + * numerical, -500 to 1500 Nm + * 10Hz * engine_speed - * numerical, RPM -* vehicle_speed, numerical, Kph + * numerical, 0 to 16382 RPM + * 10Hz +* vehicle_speed + * numerical, 0 to 655 km/h (this will be positive even if going in reverse + as it's not a velocity, although you can use the gear status to figure out + direction) + * 10Hz * accelerator_pedal_position * percentage + * 10Hz * parking_brake_status * boolean, (true == brake engaged) + * 1Hz, but sent immediately on change * brake_pedal_status * boolean (True == pedal pressed) + * 1Hz, but sent immediately on change * transmission_gear_position * states: first, second, third, fourth, fifth, sixth, seventh, eighth, reverse, neutral + * 1Hz, but sent immediately on change * gear_lever_position * states: neutral, park, reverse, drive, sport, low, first, second, third, fourth, fifth, sixth * odometer * Numerical, km + 0 to 16777214.000 km, with about .2m resolution + * 10Hz * ignition_status * states: off, accessory, run, start + * 1Hz, but sent immediately on change * fuel_level * percentage + * 2Hz * fuel_consumed_since_restart - * numerical, liters (goes to 0 every time the - vehicle interfaces power cycles) + * numerical, 0 - 4294967295.0 L (this goes to 0 every time the vehicle + restarts, like a trip meter) + * 10Hz * door_status * Value is State: driver, passenger, rear_left, rear_right. * Event is boolean: true == ajar + * 1Hz, but sent immediately on change * headlamp_status * boolean, true is on + * 1Hz, but sent immediately on change * high_beam_status * boolean, true is on + * 1Hz, but sent immediately on change * windshield_wiper_status * boolean, true is on + * 1Hz, but sent immediately on change * latitude - * numerical + * numerical, -89.0 to 89.0 degrees with standard GPS accuracy + * 1Hz * longitude - * numerical + * numerical, -179.0 to 179.0 degrees with standard GPS accuracy + * 1Hz ## Raw CAN Message format -- cgit 1.2.3-korg From 2e14ec89c5fb2e3c0d4ed4bcde5e7b04443f0413 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 5 Nov 2013 14:04:24 -0500 Subject: Add frequency to gear_lever_position --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bf6960a8..30720db5 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ manufacturers may support custom message names. * gear_lever_position * states: neutral, park, reverse, drive, sport, low, first, second, third, fourth, fifth, sixth + * 1Hz, but sent immediately on change * odometer * Numerical, km 0 to 16777214.000 km, with about .2m resolution -- cgit 1.2.3-korg From e9788f71fb5a4be6bc69605539b0135f0ba1829a Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 22 Nov 2013 10:20:17 -0500 Subject: Document trace file format. --- README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 30720db5..a56971ea 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,52 @@ The expected format of an event message is: This format is good for something like a button event, where there are two discrete pieces of information in the measurement. +## Raw CAN Message format + +An OpenXC vehicle interface may also output raw CAN messages. Each CAN message +is sent as a JSON object, separated by newlines. The format of each object is: + + {"bus": 1, "id": 1234, "value": "0x12345678"} + +**bus** - the numerical identifier of the CAN bus where this message originated, + most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). + +**id** - the CAN message ID + +**data** - up to 8 bytes of data from the CAN message's payload, represented as + a hexidecimal number in a string. Many JSON parser cannot handle 64-bit + integers, which is why we are not using a numerical data type. + +## Trace File Format + +An OpenXC vehicle trace file is a plaintext file that contains JSON objects, +separated by newlines. + +The first line may be a metadata object, although this is optional: + +``` +{"metadata": { + "version": "v3.0", + "vehicle_interface_id": "7ABF", + "vehicle": { + "make": "Ford", + "model": "Mustang", + "trim": "V6 Premium", + "year": 2013 + }, + "description": "highway drive to work", + "driver_name": "TJ Giuli", + "vehicle_id": "17N1039247929" +} +``` + +The following lines are OpenXC messages with a `timestamp` field added, e.g.: + + {"timestamp": 1385133351.285525, "name": "steering_wheel_angle", "value": 45} + +The timestamp is in [UNIX time](http://en.wikipedia.org/wiki/Unix_time) +(i.e. seconds since the UNIX epoch, 00:00:00 UTC, 1/1/1970). + ## Official Signals These signal names are a part of the OpenXC specification, although some @@ -96,22 +142,6 @@ manufacturers may support custom message names. * numerical, -179.0 to 179.0 degrees with standard GPS accuracy * 1Hz -## Raw CAN Message format - -An OpenXC vehicle interface may also output raw CAN messages. Each CAN message -is sent as a JSON object, separated by newlines. The format of each object is: - - {"bus": 1, "id": 1234, "value": "0x12345678"} - -**bus** - the numerical identifier of the CAN bus where this message originated, - most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). - -**id** - the CAN message ID - -**data** - up to 8 bytes of data from the CAN message's payload, represented as - a hexidecimal number in a string. Many JSON parser cannot handle 64-bit - integers, which is why we are not using a numerical data type. - License ======= -- cgit 1.2.3-korg From f85bc9eb9a932988bdab198f9da20c2fea55bac2 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 22 Aug 2013 10:35:35 -0400 Subject: Add benchmarking tests for binary encoding (moved from cantranslator). --- benchmark/pip-requirements.txt | 1 + benchmark/proto/.gitignore | 1 + benchmark/proto/compare_sizes.py | 31 +++++++++++++++++++++++++++++++ benchmark/proto/generate.sh | 3 +++ benchmark/proto/openxc.proto | 21 +++++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 benchmark/pip-requirements.txt create mode 100644 benchmark/proto/.gitignore create mode 100644 benchmark/proto/compare_sizes.py create mode 100755 benchmark/proto/generate.sh create mode 100644 benchmark/proto/openxc.proto diff --git a/benchmark/pip-requirements.txt b/benchmark/pip-requirements.txt new file mode 100644 index 00000000..7f147d92 --- /dev/null +++ b/benchmark/pip-requirements.txt @@ -0,0 +1 @@ +protobuf==2.5.0 diff --git a/benchmark/proto/.gitignore b/benchmark/proto/.gitignore new file mode 100644 index 00000000..0520d7d2 --- /dev/null +++ b/benchmark/proto/.gitignore @@ -0,0 +1 @@ +*_pb2.py diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py new file mode 100644 index 00000000..ce6b25b9 --- /dev/null +++ b/benchmark/proto/compare_sizes.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +from __future__ import division +import sys + +import openxc_pb2 +import json + +def sizeof_fmt(num): + for unit in ['bytes', 'KB', 'MB', 'GB', 'TB']: + if num < 1024.0: + return "%3.1f%s" % (num, unit) + num /= 1024.0 + +total_json_size = 0 +total_binary_size = 0 + +trace_file = sys.argv[1] +for line in open(trace_file): + raw_message = json.loads(line) + total_json_size += len(json.dumps(raw_message)) + binary_message = openxc_pb2.RawMessage() + binary_message.message_id = raw_message['id'] + binary_message.data = int(raw_message['data'], 0) + total_binary_size += len(binary_message.SerializeToString()) + +print("For the trace file %s..." % trace_file) +print("Total transferred JSON size is %s" % sizeof_fmt(total_json_size)) +print("Total transferred binary size is %s" % sizeof_fmt(total_binary_size)) +print("Binary encoding is %f%% smaller than JSON overall" % ( + 100 - (total_binary_size / total_json_size * 100))) diff --git a/benchmark/proto/generate.sh b/benchmark/proto/generate.sh new file mode 100755 index 00000000..576b7b13 --- /dev/null +++ b/benchmark/proto/generate.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +protoc -I . --python_out=. openxc.proto diff --git a/benchmark/proto/openxc.proto b/benchmark/proto/openxc.proto new file mode 100644 index 00000000..0af663c8 --- /dev/null +++ b/benchmark/proto/openxc.proto @@ -0,0 +1,21 @@ +package openxc; + +message RawMessage { + optional uint32 message_id = 1; + optional double data = 2; +} + +message TranslatedStringMessage { + optional string name = 1; + optional string value = 2; +} + +message TranslatedNumericMessage { + optional string name = 1; + optional double value = 2; +} + +message TranslatedBooleanMessage { + optional string name = 1; + optional bool value = 2; +} -- cgit 1.2.3-korg From 8f87419564532b304dec7105afe005f85cdec0e1 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 22 Aug 2013 10:57:48 -0400 Subject: Benchmark encoding translated messages as binary, too. Results for all of my trace files: > ./compare_sizes.py ~/ownCloud/OpenXC\ Traces/peplin/**/*.json 1 For the 89 trace files given... Total transferred raw JSON size is 13.3MB Total transferred raw binary size is 2.1MB Total transferred translated JSON size is 791.0MB Total transferred translated binary size is 318.6MB Total transferred JSON size is 804.3MB Total transferred binary size is 320.6MB Binary encoding is 84.328494% smaller than JSON for raw messages Binary encoding is 59.727489% smaller than JSON for translated messages Binary encoding is 60.133196% smaller than JSON overall --- benchmark/proto/compare_sizes.py | 56 ++++++++++++++++++++++++++++++++-------- benchmark/proto/openxc.proto | 3 +++ 2 files changed, 48 insertions(+), 11 deletions(-) mode change 100644 => 100755 benchmark/proto/compare_sizes.py diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py old mode 100644 new mode 100755 index ce6b25b9..b8b79bb9 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -2,6 +2,7 @@ from __future__ import division import sys +import numbers import openxc_pb2 import json @@ -12,20 +13,53 @@ def sizeof_fmt(num): return "%3.1f%s" % (num, unit) num /= 1024.0 -total_json_size = 0 -total_binary_size = 0 +total_raw_json_size = 0 +total_raw_binary_size = 0 +total_translated_json_size = 0 +total_translated_binary_size = 0 -trace_file = sys.argv[1] -for line in open(trace_file): - raw_message = json.loads(line) - total_json_size += len(json.dumps(raw_message)) - binary_message = openxc_pb2.RawMessage() - binary_message.message_id = raw_message['id'] - binary_message.data = int(raw_message['data'], 0) - total_binary_size += len(binary_message.SerializeToString()) +for trace_file in sys.argv[1:]: + for line in open(trace_file): + try: + json_message = json.loads(line) + except ValueError: + continue -print("For the trace file %s..." % trace_file) + if 'id' and 'data' in json_message: + total_raw_json_size += len(line) + binary_message = openxc_pb2.RawMessage() + binary_message.message_id = json_message['id'] + binary_message.data = int(json_message['data'], 0) + total_raw_binary_size += len(binary_message.SerializeToString()) + else: + if isinstance(json_message['value'], bool): + binary_message = openxc_pb2.TranslatedBooleanMessage() + elif isinstance(json_message['value'], numbers.Number): + binary_message = openxc_pb2.TranslatedNumericMessage() + else: + binary_message = openxc_pb2.TranslatedStringMessage() + binary_message.name = json_message['name'] + binary_message.value = json_message['value'] + total_translated_json_size += len(line) + total_translated_binary_size += len(binary_message.SerializeToString()) + + +print("For the %d trace files given..." % len(sys.argv[1:])) +print("Total transferred raw JSON size is %s" % sizeof_fmt(total_raw_json_size)) +print("Total transferred raw binary size is %s" % sizeof_fmt(total_raw_binary_size)) +print("Total transferred translated JSON size is %s" % + sizeof_fmt(total_translated_json_size)) +print("Total transferred translated binary size is %s" % + sizeof_fmt(total_translated_binary_size)) + +total_json_size = total_raw_json_size + total_translated_json_size print("Total transferred JSON size is %s" % sizeof_fmt(total_json_size)) +total_binary_size = total_raw_binary_size + total_translated_binary_size print("Total transferred binary size is %s" % sizeof_fmt(total_binary_size)) + +print("Binary encoding is %f%% smaller than JSON for raw messages" % ( + 100 - (total_raw_binary_size / total_raw_json_size * 100))) +print("Binary encoding is %f%% smaller than JSON for translated messages" % ( + 100 - (total_translated_binary_size / total_translated_json_size * 100))) print("Binary encoding is %f%% smaller than JSON overall" % ( 100 - (total_binary_size / total_json_size * 100))) diff --git a/benchmark/proto/openxc.proto b/benchmark/proto/openxc.proto index 0af663c8..0e39bb6c 100644 --- a/benchmark/proto/openxc.proto +++ b/benchmark/proto/openxc.proto @@ -19,3 +19,6 @@ message TranslatedBooleanMessage { optional string name = 1; optional bool value = 2; } + +// TODO we should also consider having an enum type, h aving each specific +// message defined as a protobuf -- cgit 1.2.3-korg From d3d7bf0e09ae6a4b8161c19e224742ae3d06d620 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 22 Aug 2013 16:57:54 -0400 Subject: Benchmark how much overhead each encoding adds vs raw CAN. --- benchmark/proto/compare_sizes.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index b8b79bb9..b6936df6 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -13,6 +13,7 @@ def sizeof_fmt(num): return "%3.1f%s" % (num, unit) num /= 1024.0 +total_raw_can_size = 0 total_raw_json_size = 0 total_raw_binary_size = 0 total_translated_json_size = 0 @@ -26,6 +27,9 @@ for trace_file in sys.argv[1:]: continue if 'id' and 'data' in json_message: + # rough approx. that CAN messages are 10 bytes - they could be less + # but most of ours are full 64+11 bits + total_raw_can_size += 10 total_raw_json_size += len(line) binary_message = openxc_pb2.RawMessage() binary_message.message_id = json_message['id'] @@ -45,6 +49,7 @@ for trace_file in sys.argv[1:]: print("For the %d trace files given..." % len(sys.argv[1:])) +print("Total transferred raw CAN size is %s" % sizeof_fmt(total_raw_can_size)) print("Total transferred raw JSON size is %s" % sizeof_fmt(total_raw_json_size)) print("Total transferred raw binary size is %s" % sizeof_fmt(total_raw_binary_size)) print("Total transferred translated JSON size is %s" % @@ -57,9 +62,16 @@ print("Total transferred JSON size is %s" % sizeof_fmt(total_json_size)) total_binary_size = total_raw_binary_size + total_translated_binary_size print("Total transferred binary size is %s" % sizeof_fmt(total_binary_size)) -print("Binary encoding is %f%% smaller than JSON for raw messages" % ( - 100 - (total_raw_binary_size / total_raw_json_size * 100))) -print("Binary encoding is %f%% smaller than JSON for translated messages" % ( - 100 - (total_translated_binary_size / total_translated_json_size * 100))) +if total_raw_can_size > 0: + print("Binary encoding adds %f%% overhead to raw CAN messages" % ( + total_raw_binary_size / total_raw_can_size * 100 - 100)) + print("JSON encoding adds %f%% overhead to raw CAN messages" % ( + total_raw_json_size / total_raw_can_size * 100 - 100)) +if total_raw_json_size > 0: + print("Binary encoding is %f%% smaller than JSON for raw messages" % ( + 100 - (total_raw_binary_size / total_raw_json_size * 100))) +if total_translated_json_size > 0: + print("Binary encoding is %f%% smaller than JSON for translated messages" % ( + 100 - (total_translated_binary_size / total_translated_json_size * 100))) print("Binary encoding is %f%% smaller than JSON overall" % ( 100 - (total_binary_size / total_json_size * 100))) -- cgit 1.2.3-korg From 1820baf320d5831815de35dddbbfc5818a0e004b Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 30 Sep 2013 16:07:27 -0400 Subject: Use a container type to be able to stream protobufs. --- benchmark/proto/compare_sizes.py | 22 +++++++++++++++------- benchmark/proto/openxc.proto | 11 +++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index b6936df6..192716f4 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -26,6 +26,8 @@ for trace_file in sys.argv[1:]: except ValueError: continue + message = openxc_pb2.VehicleMessage() + if 'id' and 'data' in json_message: # rough approx. that CAN messages are 10 bytes - they could be less # but most of ours are full 64+11 bits @@ -34,18 +36,24 @@ for trace_file in sys.argv[1:]: binary_message = openxc_pb2.RawMessage() binary_message.message_id = json_message['id'] binary_message.data = int(json_message['data'], 0) - total_raw_binary_size += len(binary_message.SerializeToString()) + message.type = openxc_pb2.VehicleMessage.RAW + message.raw_message = binary_message + total_raw_binary_size += len(message.SerializeToString()) else: if isinstance(json_message['value'], bool): - binary_message = openxc_pb2.TranslatedBooleanMessage() + message.type = openxc_pb2.VehicleMessage.BOOL + message.boolean_message.name = json_message['name'] + message.boolean_message.value = json_message['value'] elif isinstance(json_message['value'], numbers.Number): - binary_message = openxc_pb2.TranslatedNumericMessage() + message.type = openxc_pb2.VehicleMessage.NUM + message.numerical_message.name = json_message['name'] + message.numerical_message.value = json_message['value'] else: - binary_message = openxc_pb2.TranslatedStringMessage() - binary_message.name = json_message['name'] - binary_message.value = json_message['value'] + message.type = openxc_pb2.VehicleMessage.STRING + message.string_message.name = json_message['name'] + message.string_message.value = json_message['value'] total_translated_json_size += len(line) - total_translated_binary_size += len(binary_message.SerializeToString()) + total_translated_binary_size += len(message.SerializeToString()) print("For the %d trace files given..." % len(sys.argv[1:])) diff --git a/benchmark/proto/openxc.proto b/benchmark/proto/openxc.proto index 0e39bb6c..1917b0bd 100644 --- a/benchmark/proto/openxc.proto +++ b/benchmark/proto/openxc.proto @@ -1,5 +1,16 @@ package openxc; +message VehicleMessage { + enum Type { RAW = 1; STRING = 2; NUM = 3; BOOL = 4; } + + optional Type type = 1; + + optional RawMessage raw_message = 2; + optional TranslatedStringMessage string_message = 3; + optional TranslatedNumericMessage numerical_message = 4; + optional TranslatedBooleanMessage boolean_message = 5; +} + message RawMessage { optional uint32 message_id = 1; optional double data = 2; -- cgit 1.2.3-korg From b9a96fe63416583519d860c206cf27e408bcccab Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 30 Sep 2013 21:19:06 -0400 Subject: Move proto definition to top level. --- benchmark/proto/generate.sh | 2 +- benchmark/proto/openxc.proto | 35 ----------------------------------- openxc.proto | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 benchmark/proto/openxc.proto create mode 100644 openxc.proto diff --git a/benchmark/proto/generate.sh b/benchmark/proto/generate.sh index 576b7b13..09400a3d 100755 --- a/benchmark/proto/generate.sh +++ b/benchmark/proto/generate.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -protoc -I . --python_out=. openxc.proto +protoc -I ../.. --python_out=. ../../openxc.proto diff --git a/benchmark/proto/openxc.proto b/benchmark/proto/openxc.proto deleted file mode 100644 index 1917b0bd..00000000 --- a/benchmark/proto/openxc.proto +++ /dev/null @@ -1,35 +0,0 @@ -package openxc; - -message VehicleMessage { - enum Type { RAW = 1; STRING = 2; NUM = 3; BOOL = 4; } - - optional Type type = 1; - - optional RawMessage raw_message = 2; - optional TranslatedStringMessage string_message = 3; - optional TranslatedNumericMessage numerical_message = 4; - optional TranslatedBooleanMessage boolean_message = 5; -} - -message RawMessage { - optional uint32 message_id = 1; - optional double data = 2; -} - -message TranslatedStringMessage { - optional string name = 1; - optional string value = 2; -} - -message TranslatedNumericMessage { - optional string name = 1; - optional double value = 2; -} - -message TranslatedBooleanMessage { - optional string name = 1; - optional bool value = 2; -} - -// TODO we should also consider having an enum type, h aving each specific -// message defined as a protobuf diff --git a/openxc.proto b/openxc.proto new file mode 100644 index 00000000..1917b0bd --- /dev/null +++ b/openxc.proto @@ -0,0 +1,35 @@ +package openxc; + +message VehicleMessage { + enum Type { RAW = 1; STRING = 2; NUM = 3; BOOL = 4; } + + optional Type type = 1; + + optional RawMessage raw_message = 2; + optional TranslatedStringMessage string_message = 3; + optional TranslatedNumericMessage numerical_message = 4; + optional TranslatedBooleanMessage boolean_message = 5; +} + +message RawMessage { + optional uint32 message_id = 1; + optional double data = 2; +} + +message TranslatedStringMessage { + optional string name = 1; + optional string value = 2; +} + +message TranslatedNumericMessage { + optional string name = 1; + optional double value = 2; +} + +message TranslatedBooleanMessage { + optional string name = 1; + optional bool value = 2; +} + +// TODO we should also consider having an enum type, h aving each specific +// message defined as a protobuf -- cgit 1.2.3-korg From b4915d0bca3b66943296044d0eb7c8db9540e4ae Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 30 Sep 2013 23:32:29 -0400 Subject: Add an options file to enable static memory with nanopb. --- openxc.options | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 openxc.options diff --git a/openxc.options b/openxc.options new file mode 100644 index 00000000..3e2937ef --- /dev/null +++ b/openxc.options @@ -0,0 +1,2 @@ +# TODO this isn't working yet, so I'm defining it for everything in the Makefile +openxc_TranslatedNumericMessage.name max_size:100 -- cgit 1.2.3-korg From d356b057aa38ea088cedfe26f562b981171239fc Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 1 Oct 2013 14:46:03 -0400 Subject: Add a bus field to RawMessage and make data an 64-bit int. --- openxc.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openxc.proto b/openxc.proto index 1917b0bd..39130831 100644 --- a/openxc.proto +++ b/openxc.proto @@ -12,8 +12,9 @@ message VehicleMessage { } message RawMessage { - optional uint32 message_id = 1; - optional double data = 2; + optional int32 bus = 1; + optional uint32 message_id = 2; + optional sint64 data = 3; } message TranslatedStringMessage { -- cgit 1.2.3-korg From 11ca9d9f43e7e741b3138a06a6c6ab34be436dd8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 1 Oct 2013 16:56:35 -0400 Subject: Add generated protobuf implementations. --- .gitmodules | 3 + Makefile | 10 + benchmark/pip-requirements.txt | 1 - benchmark/proto/generate.sh | 3 - gen/README.mkd | 11 + gen/cpp/openxc.pb | 30 + gen/cpp/openxc.pb.c | 57 + gen/cpp/openxc.pb.h | 100 ++ gen/java/openxc/Openxc.java | 3668 ++++++++++++++++++++++++++++++++++++++++ gen/openxc.pb | 30 + gen/openxc.pb.c | 57 + gen/openxc.pb.h | 100 ++ gen/openxc_pb2.py | 296 ++++ gen/python/openxc_pb2.py | 296 ++++ libs/nanopb | 1 + pip-requirements.txt | 1 + script/bootstrap.sh | 179 ++ 17 files changed, 4839 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 100644 Makefile delete mode 100644 benchmark/pip-requirements.txt delete mode 100755 benchmark/proto/generate.sh create mode 100644 gen/README.mkd create mode 100644 gen/cpp/openxc.pb create mode 100644 gen/cpp/openxc.pb.c create mode 100644 gen/cpp/openxc.pb.h create mode 100644 gen/java/openxc/Openxc.java create mode 100644 gen/openxc.pb create mode 100644 gen/openxc.pb.c create mode 100644 gen/openxc.pb.h create mode 100644 gen/openxc_pb2.py create mode 100644 gen/python/openxc_pb2.py create mode 160000 libs/nanopb create mode 100644 pip-requirements.txt create mode 100755 script/bootstrap.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..aaa1a95c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libs/nanopb"] + path = libs/nanopb + url = https://code.google.com/p/nanopb/ diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..4b1b6875 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +nanopb: proto + python libs/nanopb/generator/nanopb_generator.py -s max_size:100 -f openxc.options gen/cpp/openxc.pb + +proto: openxc.proto + @mkdir -p gen/java + @mkdir -p gen/python + @mkdir -p gen/cpp + protoc -I . -I gen -ogen/cpp/openxc.pb --python_out=gen/python --java_out=gen/java $? + +all: nanopb proto diff --git a/benchmark/pip-requirements.txt b/benchmark/pip-requirements.txt deleted file mode 100644 index 7f147d92..00000000 --- a/benchmark/pip-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -protobuf==2.5.0 diff --git a/benchmark/proto/generate.sh b/benchmark/proto/generate.sh deleted file mode 100755 index 09400a3d..00000000 --- a/benchmark/proto/generate.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -protoc -I ../.. --python_out=. ../../openxc.proto diff --git a/gen/README.mkd b/gen/README.mkd new file mode 100644 index 00000000..e607772d --- /dev/null +++ b/gen/README.mkd @@ -0,0 +1,11 @@ +Generated Files +================ + +This directory holds generated implementation files for the Protocol Buffer +objects defined in openxc.proto. The definitions don't change very often, and so +it makes more sense to keep a compiled version in the repository for each +major build environment rather than requiring each developer to get the protobuf +dependencies. + +I've also not found a good way to incorporate protobuf generation with our +Makefile build system in the openxc/vi-firmware project. diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb new file mode 100644 index 00000000..e343eeb0 --- /dev/null +++ b/gen/cpp/openxc.pb @@ -0,0 +1,30 @@ + +Å + openxc.protoopenxc"Å +VehicleMessage) +type (2.openxc.VehicleMessage.Type' + raw_message ( 2.openxc.RawMessage7 +string_message ( 2.openxc.TranslatedStringMessage; +numerical_message ( 2 .openxc.TranslatedNumericMessage9 +boolean_message ( 2 .openxc.TranslatedBooleanMessage". +Type +RAW + +STRING +NUM +BOOL"; + +RawMessage +bus ( + +message_id (  +data ("6 +TranslatedStringMessage +name (  +value ( "7 +TranslatedNumericMessage +name (  +value ("7 +TranslatedBooleanMessage +name (  +value ( \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c new file mode 100644 index 00000000..89e32a60 --- /dev/null +++ b/gen/cpp/openxc.pb.c @@ -0,0 +1,57 @@ +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.2.4-dev at Tue Oct 1 16:51:23 2013. */ + +#include "openxc.pb.h" + + + +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, string_message, raw_message, &openxc_TranslatedStringMessage_fields), + PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, numerical_message, string_message, &openxc_TranslatedNumericMessage_fields), + PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, boolean_message, numerical_message, &openxc_TranslatedBooleanMessage_fields), + PB_LAST_FIELD +}; + +const pb_field_t openxc_RawMessage_fields[4] = { + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), + PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), + PB_FIELD2( 3, SINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_TranslatedStringMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedStringMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedStringMessage, value, name, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_TranslatedNumericMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedNumericMessage, name, name, 0), + PB_FIELD2( 2, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedNumericMessage, value, name, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_TranslatedBooleanMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedBooleanMessage, name, name, 0), + PB_FIELD2( 2, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedBooleanMessage, value, name, 0), + PB_LAST_FIELD +}; + + +/* 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, string_message) < 256 && pb_membersize(openxc_VehicleMessage, numerical_message) < 256 && pb_membersize(openxc_VehicleMessage, boolean_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) +#endif + +#if !defined(PB_FIELD_32BIT) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, string_message) < 65536 && pb_membersize(openxc_VehicleMessage, numerical_message) < 65536 && pb_membersize(openxc_VehicleMessage, boolean_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) +#endif + +/* On some platforms (such as AVR), double is really float. + * These are not directly supported by nanopb, but see example_avr_double. + * To get rid of this error, remove any double fields from your .proto. + */ +STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) + diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h new file mode 100644 index 00000000..9c50569d --- /dev/null +++ b/gen/cpp/openxc.pb.h @@ -0,0 +1,100 @@ +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.2.4-dev at Tue Oct 1 16:51:23 2013. */ + +#ifndef _PB_OPENXC_PB_H_ +#define _PB_OPENXC_PB_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Enum definitions */ +typedef enum _openxc_VehicleMessage_Type { + openxc_VehicleMessage_Type_RAW = 1, + openxc_VehicleMessage_Type_STRING = 2, + openxc_VehicleMessage_Type_NUM = 3, + openxc_VehicleMessage_Type_BOOL = 4 +} openxc_VehicleMessage_Type; + +/* Struct definitions */ +typedef struct _openxc_RawMessage { + bool has_bus; + int32_t bus; + bool has_message_id; + uint32_t message_id; + bool has_data; + int64_t data; +} openxc_RawMessage; + +typedef struct _openxc_TranslatedBooleanMessage { + bool has_name; + char name[100]; + bool has_value; + bool value; +} openxc_TranslatedBooleanMessage; + +typedef struct _openxc_TranslatedNumericMessage { + bool has_name; + char name[100]; + bool has_value; + double value; +} openxc_TranslatedNumericMessage; + +typedef struct _openxc_TranslatedStringMessage { + bool has_name; + char name[100]; + bool has_value; + char value[100]; +} openxc_TranslatedStringMessage; + +typedef struct _openxc_VehicleMessage { + bool has_type; + openxc_VehicleMessage_Type type; + bool has_raw_message; + openxc_RawMessage raw_message; + bool has_string_message; + openxc_TranslatedStringMessage string_message; + bool has_numerical_message; + openxc_TranslatedNumericMessage numerical_message; + bool has_boolean_message; + openxc_TranslatedBooleanMessage boolean_message; +} openxc_VehicleMessage; + +/* Default values for struct fields */ + +/* Field tags (for use in manual encoding/decoding) */ +#define openxc_RawMessage_bus_tag 1 +#define openxc_RawMessage_message_id_tag 2 +#define openxc_RawMessage_data_tag 3 +#define openxc_TranslatedBooleanMessage_name_tag 1 +#define openxc_TranslatedBooleanMessage_value_tag 2 +#define openxc_TranslatedNumericMessage_name_tag 1 +#define openxc_TranslatedNumericMessage_value_tag 2 +#define openxc_TranslatedStringMessage_name_tag 1 +#define openxc_TranslatedStringMessage_value_tag 2 +#define openxc_VehicleMessage_type_tag 1 +#define openxc_VehicleMessage_raw_message_tag 2 +#define openxc_VehicleMessage_string_message_tag 3 +#define openxc_VehicleMessage_numerical_message_tag 4 +#define openxc_VehicleMessage_boolean_message_tag 5 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t openxc_VehicleMessage_fields[6]; +extern const pb_field_t openxc_RawMessage_fields[4]; +extern const pb_field_t openxc_TranslatedStringMessage_fields[3]; +extern const pb_field_t openxc_TranslatedNumericMessage_fields[3]; +extern const pb_field_t openxc_TranslatedBooleanMessage_fields[3]; + +/* Maximum encoded size of messages (where known) */ +#define openxc_VehicleMessage_size 457 +#define openxc_RawMessage_size 23 +#define openxc_TranslatedStringMessage_size 204 +#define openxc_TranslatedNumericMessage_size 111 +#define openxc_TranslatedBooleanMessage_size 104 + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/gen/java/openxc/Openxc.java b/gen/java/openxc/Openxc.java new file mode 100644 index 00000000..f5c7f0b0 --- /dev/null +++ b/gen/java/openxc/Openxc.java @@ -0,0 +1,3668 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: openxc.proto + +package openxc; + +public final class Openxc { + private Openxc() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface VehicleMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.VehicleMessage.Type type = 1; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + boolean hasType(); + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + openxc.Openxc.VehicleMessage.Type getType(); + + // optional .openxc.RawMessage raw_message = 2; + /** + * optional .openxc.RawMessage raw_message = 2; + */ + boolean hasRawMessage(); + /** + * optional .openxc.RawMessage raw_message = 2; + */ + openxc.Openxc.RawMessage getRawMessage(); + /** + * optional .openxc.RawMessage raw_message = 2; + */ + openxc.Openxc.RawMessageOrBuilder getRawMessageOrBuilder(); + + // optional .openxc.TranslatedStringMessage string_message = 3; + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + boolean hasStringMessage(); + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + openxc.Openxc.TranslatedStringMessage getStringMessage(); + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + openxc.Openxc.TranslatedStringMessageOrBuilder getStringMessageOrBuilder(); + + // optional .openxc.TranslatedNumericMessage numerical_message = 4; + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + boolean hasNumericalMessage(); + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + openxc.Openxc.TranslatedNumericMessage getNumericalMessage(); + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + openxc.Openxc.TranslatedNumericMessageOrBuilder getNumericalMessageOrBuilder(); + + // optional .openxc.TranslatedBooleanMessage boolean_message = 5; + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + boolean hasBooleanMessage(); + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + openxc.Openxc.TranslatedBooleanMessage getBooleanMessage(); + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + openxc.Openxc.TranslatedBooleanMessageOrBuilder getBooleanMessageOrBuilder(); + } + /** + * Protobuf type {@code openxc.VehicleMessage} + */ + public static final class VehicleMessage extends + com.google.protobuf.GeneratedMessage + implements VehicleMessageOrBuilder { + // Use VehicleMessage.newBuilder() to construct. + private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final VehicleMessage defaultInstance; + public static VehicleMessage getDefaultInstance() { + return defaultInstance; + } + + public VehicleMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VehicleMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + openxc.Openxc.VehicleMessage.Type value = openxc.Openxc.VehicleMessage.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + openxc.Openxc.RawMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = rawMessage_.toBuilder(); + } + rawMessage_ = input.readMessage(openxc.Openxc.RawMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rawMessage_); + rawMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 26: { + openxc.Openxc.TranslatedStringMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = stringMessage_.toBuilder(); + } + stringMessage_ = input.readMessage(openxc.Openxc.TranslatedStringMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stringMessage_); + stringMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + case 34: { + openxc.Openxc.TranslatedNumericMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = numericalMessage_.toBuilder(); + } + numericalMessage_ = input.readMessage(openxc.Openxc.TranslatedNumericMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(numericalMessage_); + numericalMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 42: { + openxc.Openxc.TranslatedBooleanMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = booleanMessage_.toBuilder(); + } + booleanMessage_ = input.readMessage(openxc.Openxc.TranslatedBooleanMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(booleanMessage_); + booleanMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_VehicleMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_VehicleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.VehicleMessage.class, openxc.Openxc.VehicleMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public VehicleMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VehicleMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.VehicleMessage.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * RAW = 1; + */ + RAW(0, 1), + /** + * STRING = 2; + */ + STRING(1, 2), + /** + * NUM = 3; + */ + NUM(2, 3), + /** + * BOOL = 4; + */ + BOOL(3, 4), + ; + + /** + * RAW = 1; + */ + public static final int RAW_VALUE = 1; + /** + * STRING = 2; + */ + public static final int STRING_VALUE = 2; + /** + * NUM = 3; + */ + public static final int NUM_VALUE = 3; + /** + * BOOL = 4; + */ + public static final int BOOL_VALUE = 4; + + + public final int getNumber() { return value; } + + public static Type valueOf(int value) { + switch (value) { + case 1: return RAW; + case 2: return STRING; + case 3: return NUM; + case 4: return BOOL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return openxc.Openxc.VehicleMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type) + } + + private int bitField0_; + // optional .openxc.VehicleMessage.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private openxc.Openxc.VehicleMessage.Type type_; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public openxc.Openxc.VehicleMessage.Type getType() { + return type_; + } + + // optional .openxc.RawMessage raw_message = 2; + public static final int RAW_MESSAGE_FIELD_NUMBER = 2; + private openxc.Openxc.RawMessage rawMessage_; + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public boolean hasRawMessage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public openxc.Openxc.RawMessage getRawMessage() { + return rawMessage_; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public openxc.Openxc.RawMessageOrBuilder getRawMessageOrBuilder() { + return rawMessage_; + } + + // optional .openxc.TranslatedStringMessage string_message = 3; + public static final int STRING_MESSAGE_FIELD_NUMBER = 3; + private openxc.Openxc.TranslatedStringMessage stringMessage_; + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public boolean hasStringMessage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public openxc.Openxc.TranslatedStringMessage getStringMessage() { + return stringMessage_; + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public openxc.Openxc.TranslatedStringMessageOrBuilder getStringMessageOrBuilder() { + return stringMessage_; + } + + // optional .openxc.TranslatedNumericMessage numerical_message = 4; + public static final int NUMERICAL_MESSAGE_FIELD_NUMBER = 4; + private openxc.Openxc.TranslatedNumericMessage numericalMessage_; + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public boolean hasNumericalMessage() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public openxc.Openxc.TranslatedNumericMessage getNumericalMessage() { + return numericalMessage_; + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public openxc.Openxc.TranslatedNumericMessageOrBuilder getNumericalMessageOrBuilder() { + return numericalMessage_; + } + + // optional .openxc.TranslatedBooleanMessage boolean_message = 5; + public static final int BOOLEAN_MESSAGE_FIELD_NUMBER = 5; + private openxc.Openxc.TranslatedBooleanMessage booleanMessage_; + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public boolean hasBooleanMessage() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public openxc.Openxc.TranslatedBooleanMessage getBooleanMessage() { + return booleanMessage_; + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public openxc.Openxc.TranslatedBooleanMessageOrBuilder getBooleanMessageOrBuilder() { + return booleanMessage_; + } + + private void initFields() { + type_ = openxc.Openxc.VehicleMessage.Type.RAW; + rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); + stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); + booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, rawMessage_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, stringMessage_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, numericalMessage_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, booleanMessage_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rawMessage_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, stringMessage_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, numericalMessage_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, booleanMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static openxc.Openxc.VehicleMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.VehicleMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.VehicleMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.VehicleMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.VehicleMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.VehicleMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static openxc.Openxc.VehicleMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static openxc.Openxc.VehicleMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static openxc.Openxc.VehicleMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.VehicleMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(openxc.Openxc.VehicleMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.VehicleMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements openxc.Openxc.VehicleMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_VehicleMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_VehicleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.VehicleMessage.class, openxc.Openxc.VehicleMessage.Builder.class); + } + + // Construct using openxc.Openxc.VehicleMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRawMessageFieldBuilder(); + getStringMessageFieldBuilder(); + getNumericalMessageFieldBuilder(); + getBooleanMessageFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = openxc.Openxc.VehicleMessage.Type.RAW; + bitField0_ = (bitField0_ & ~0x00000001); + if (rawMessageBuilder_ == null) { + rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); + } else { + rawMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (stringMessageBuilder_ == null) { + stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + } else { + stringMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (numericalMessageBuilder_ == null) { + numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); + } else { + numericalMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (booleanMessageBuilder_ == null) { + booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); + } else { + booleanMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return openxc.Openxc.internal_static_openxc_VehicleMessage_descriptor; + } + + public openxc.Openxc.VehicleMessage getDefaultInstanceForType() { + return openxc.Openxc.VehicleMessage.getDefaultInstance(); + } + + public openxc.Openxc.VehicleMessage build() { + openxc.Openxc.VehicleMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public openxc.Openxc.VehicleMessage buildPartial() { + openxc.Openxc.VehicleMessage result = new openxc.Openxc.VehicleMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (rawMessageBuilder_ == null) { + result.rawMessage_ = rawMessage_; + } else { + result.rawMessage_ = rawMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (stringMessageBuilder_ == null) { + result.stringMessage_ = stringMessage_; + } else { + result.stringMessage_ = stringMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (numericalMessageBuilder_ == null) { + result.numericalMessage_ = numericalMessage_; + } else { + result.numericalMessage_ = numericalMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (booleanMessageBuilder_ == null) { + result.booleanMessage_ = booleanMessage_; + } else { + result.booleanMessage_ = booleanMessageBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof openxc.Openxc.VehicleMessage) { + return mergeFrom((openxc.Openxc.VehicleMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(openxc.Openxc.VehicleMessage other) { + if (other == openxc.Openxc.VehicleMessage.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasRawMessage()) { + mergeRawMessage(other.getRawMessage()); + } + if (other.hasStringMessage()) { + mergeStringMessage(other.getStringMessage()); + } + if (other.hasNumericalMessage()) { + mergeNumericalMessage(other.getNumericalMessage()); + } + if (other.hasBooleanMessage()) { + mergeBooleanMessage(other.getBooleanMessage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + openxc.Openxc.VehicleMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (openxc.Openxc.VehicleMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.VehicleMessage.Type type = 1; + private openxc.Openxc.VehicleMessage.Type type_ = openxc.Openxc.VehicleMessage.Type.RAW; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public openxc.Openxc.VehicleMessage.Type getType() { + return type_; + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public Builder setType(openxc.Openxc.VehicleMessage.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = openxc.Openxc.VehicleMessage.Type.RAW; + onChanged(); + return this; + } + + // optional .openxc.RawMessage raw_message = 2; + private openxc.Openxc.RawMessage rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.RawMessage, openxc.Openxc.RawMessage.Builder, openxc.Openxc.RawMessageOrBuilder> rawMessageBuilder_; + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public boolean hasRawMessage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public openxc.Openxc.RawMessage getRawMessage() { + if (rawMessageBuilder_ == null) { + return rawMessage_; + } else { + return rawMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder setRawMessage(openxc.Openxc.RawMessage value) { + if (rawMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rawMessage_ = value; + onChanged(); + } else { + rawMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder setRawMessage( + openxc.Openxc.RawMessage.Builder builderForValue) { + if (rawMessageBuilder_ == null) { + rawMessage_ = builderForValue.build(); + onChanged(); + } else { + rawMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder mergeRawMessage(openxc.Openxc.RawMessage value) { + if (rawMessageBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + rawMessage_ != openxc.Openxc.RawMessage.getDefaultInstance()) { + rawMessage_ = + openxc.Openxc.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial(); + } else { + rawMessage_ = value; + } + onChanged(); + } else { + rawMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder clearRawMessage() { + if (rawMessageBuilder_ == null) { + rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); + onChanged(); + } else { + rawMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public openxc.Openxc.RawMessage.Builder getRawMessageBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRawMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public openxc.Openxc.RawMessageOrBuilder getRawMessageOrBuilder() { + if (rawMessageBuilder_ != null) { + return rawMessageBuilder_.getMessageOrBuilder(); + } else { + return rawMessage_; + } + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.RawMessage, openxc.Openxc.RawMessage.Builder, openxc.Openxc.RawMessageOrBuilder> + getRawMessageFieldBuilder() { + if (rawMessageBuilder_ == null) { + rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.RawMessage, openxc.Openxc.RawMessage.Builder, openxc.Openxc.RawMessageOrBuilder>( + rawMessage_, + getParentForChildren(), + isClean()); + rawMessage_ = null; + } + return rawMessageBuilder_; + } + + // optional .openxc.TranslatedStringMessage string_message = 3; + private openxc.Openxc.TranslatedStringMessage stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedStringMessage, openxc.Openxc.TranslatedStringMessage.Builder, openxc.Openxc.TranslatedStringMessageOrBuilder> stringMessageBuilder_; + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public boolean hasStringMessage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public openxc.Openxc.TranslatedStringMessage getStringMessage() { + if (stringMessageBuilder_ == null) { + return stringMessage_; + } else { + return stringMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public Builder setStringMessage(openxc.Openxc.TranslatedStringMessage value) { + if (stringMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stringMessage_ = value; + onChanged(); + } else { + stringMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public Builder setStringMessage( + openxc.Openxc.TranslatedStringMessage.Builder builderForValue) { + if (stringMessageBuilder_ == null) { + stringMessage_ = builderForValue.build(); + onChanged(); + } else { + stringMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public Builder mergeStringMessage(openxc.Openxc.TranslatedStringMessage value) { + if (stringMessageBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + stringMessage_ != openxc.Openxc.TranslatedStringMessage.getDefaultInstance()) { + stringMessage_ = + openxc.Openxc.TranslatedStringMessage.newBuilder(stringMessage_).mergeFrom(value).buildPartial(); + } else { + stringMessage_ = value; + } + onChanged(); + } else { + stringMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public Builder clearStringMessage() { + if (stringMessageBuilder_ == null) { + stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + onChanged(); + } else { + stringMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public openxc.Openxc.TranslatedStringMessage.Builder getStringMessageBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStringMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + public openxc.Openxc.TranslatedStringMessageOrBuilder getStringMessageOrBuilder() { + if (stringMessageBuilder_ != null) { + return stringMessageBuilder_.getMessageOrBuilder(); + } else { + return stringMessage_; + } + } + /** + * optional .openxc.TranslatedStringMessage string_message = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedStringMessage, openxc.Openxc.TranslatedStringMessage.Builder, openxc.Openxc.TranslatedStringMessageOrBuilder> + getStringMessageFieldBuilder() { + if (stringMessageBuilder_ == null) { + stringMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedStringMessage, openxc.Openxc.TranslatedStringMessage.Builder, openxc.Openxc.TranslatedStringMessageOrBuilder>( + stringMessage_, + getParentForChildren(), + isClean()); + stringMessage_ = null; + } + return stringMessageBuilder_; + } + + // optional .openxc.TranslatedNumericMessage numerical_message = 4; + private openxc.Openxc.TranslatedNumericMessage numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedNumericMessage, openxc.Openxc.TranslatedNumericMessage.Builder, openxc.Openxc.TranslatedNumericMessageOrBuilder> numericalMessageBuilder_; + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public boolean hasNumericalMessage() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public openxc.Openxc.TranslatedNumericMessage getNumericalMessage() { + if (numericalMessageBuilder_ == null) { + return numericalMessage_; + } else { + return numericalMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public Builder setNumericalMessage(openxc.Openxc.TranslatedNumericMessage value) { + if (numericalMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + numericalMessage_ = value; + onChanged(); + } else { + numericalMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public Builder setNumericalMessage( + openxc.Openxc.TranslatedNumericMessage.Builder builderForValue) { + if (numericalMessageBuilder_ == null) { + numericalMessage_ = builderForValue.build(); + onChanged(); + } else { + numericalMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public Builder mergeNumericalMessage(openxc.Openxc.TranslatedNumericMessage value) { + if (numericalMessageBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + numericalMessage_ != openxc.Openxc.TranslatedNumericMessage.getDefaultInstance()) { + numericalMessage_ = + openxc.Openxc.TranslatedNumericMessage.newBuilder(numericalMessage_).mergeFrom(value).buildPartial(); + } else { + numericalMessage_ = value; + } + onChanged(); + } else { + numericalMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public Builder clearNumericalMessage() { + if (numericalMessageBuilder_ == null) { + numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); + onChanged(); + } else { + numericalMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public openxc.Openxc.TranslatedNumericMessage.Builder getNumericalMessageBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNumericalMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + public openxc.Openxc.TranslatedNumericMessageOrBuilder getNumericalMessageOrBuilder() { + if (numericalMessageBuilder_ != null) { + return numericalMessageBuilder_.getMessageOrBuilder(); + } else { + return numericalMessage_; + } + } + /** + * optional .openxc.TranslatedNumericMessage numerical_message = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedNumericMessage, openxc.Openxc.TranslatedNumericMessage.Builder, openxc.Openxc.TranslatedNumericMessageOrBuilder> + getNumericalMessageFieldBuilder() { + if (numericalMessageBuilder_ == null) { + numericalMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedNumericMessage, openxc.Openxc.TranslatedNumericMessage.Builder, openxc.Openxc.TranslatedNumericMessageOrBuilder>( + numericalMessage_, + getParentForChildren(), + isClean()); + numericalMessage_ = null; + } + return numericalMessageBuilder_; + } + + // optional .openxc.TranslatedBooleanMessage boolean_message = 5; + private openxc.Openxc.TranslatedBooleanMessage booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedBooleanMessage, openxc.Openxc.TranslatedBooleanMessage.Builder, openxc.Openxc.TranslatedBooleanMessageOrBuilder> booleanMessageBuilder_; + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public boolean hasBooleanMessage() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public openxc.Openxc.TranslatedBooleanMessage getBooleanMessage() { + if (booleanMessageBuilder_ == null) { + return booleanMessage_; + } else { + return booleanMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public Builder setBooleanMessage(openxc.Openxc.TranslatedBooleanMessage value) { + if (booleanMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + booleanMessage_ = value; + onChanged(); + } else { + booleanMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public Builder setBooleanMessage( + openxc.Openxc.TranslatedBooleanMessage.Builder builderForValue) { + if (booleanMessageBuilder_ == null) { + booleanMessage_ = builderForValue.build(); + onChanged(); + } else { + booleanMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public Builder mergeBooleanMessage(openxc.Openxc.TranslatedBooleanMessage value) { + if (booleanMessageBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + booleanMessage_ != openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance()) { + booleanMessage_ = + openxc.Openxc.TranslatedBooleanMessage.newBuilder(booleanMessage_).mergeFrom(value).buildPartial(); + } else { + booleanMessage_ = value; + } + onChanged(); + } else { + booleanMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public Builder clearBooleanMessage() { + if (booleanMessageBuilder_ == null) { + booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); + onChanged(); + } else { + booleanMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public openxc.Openxc.TranslatedBooleanMessage.Builder getBooleanMessageBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBooleanMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + public openxc.Openxc.TranslatedBooleanMessageOrBuilder getBooleanMessageOrBuilder() { + if (booleanMessageBuilder_ != null) { + return booleanMessageBuilder_.getMessageOrBuilder(); + } else { + return booleanMessage_; + } + } + /** + * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedBooleanMessage, openxc.Openxc.TranslatedBooleanMessage.Builder, openxc.Openxc.TranslatedBooleanMessageOrBuilder> + getBooleanMessageFieldBuilder() { + if (booleanMessageBuilder_ == null) { + booleanMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedBooleanMessage, openxc.Openxc.TranslatedBooleanMessage.Builder, openxc.Openxc.TranslatedBooleanMessageOrBuilder>( + booleanMessage_, + getParentForChildren(), + isClean()); + booleanMessage_ = null; + } + return booleanMessageBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) + } + + static { + defaultInstance = new VehicleMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) + } + + public interface RawMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional uint32 message_id = 2; + /** + * optional uint32 message_id = 2; + */ + boolean hasMessageId(); + /** + * optional uint32 message_id = 2; + */ + int getMessageId(); + + // optional sint64 data = 3; + /** + * optional sint64 data = 3; + */ + boolean hasData(); + /** + * optional sint64 data = 3; + */ + long getData(); + } + /** + * Protobuf type {@code openxc.RawMessage} + */ + public static final class RawMessage extends + com.google.protobuf.GeneratedMessage + implements RawMessageOrBuilder { + // Use RawMessage.newBuilder() to construct. + private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final RawMessage defaultInstance; + public static RawMessage getDefaultInstance() { + return defaultInstance; + } + + public RawMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RawMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + data_ = input.readSInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_RawMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_RawMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.RawMessage.class, openxc.Openxc.RawMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RawMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RawMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional uint32 message_id = 2; + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + private int messageId_; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + + // optional sint64 data = 3; + public static final int DATA_FIELD_NUMBER = 3; + private long data_; + /** + * optional sint64 data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional sint64 data = 3; + */ + public long getData() { + return data_; + } + + private void initFields() { + bus_ = 0; + messageId_ = 0; + data_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeSInt64(3, data_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeSInt64Size(3, data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static openxc.Openxc.RawMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.RawMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.RawMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.RawMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.RawMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.RawMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static openxc.Openxc.RawMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static openxc.Openxc.RawMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static openxc.Openxc.RawMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.RawMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(openxc.Openxc.RawMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.RawMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements openxc.Openxc.RawMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_RawMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_RawMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.RawMessage.class, openxc.Openxc.RawMessage.Builder.class); + } + + // Construct using openxc.Openxc.RawMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + messageId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + data_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return openxc.Openxc.internal_static_openxc_RawMessage_descriptor; + } + + public openxc.Openxc.RawMessage getDefaultInstanceForType() { + return openxc.Openxc.RawMessage.getDefaultInstance(); + } + + public openxc.Openxc.RawMessage build() { + openxc.Openxc.RawMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public openxc.Openxc.RawMessage buildPartial() { + openxc.Openxc.RawMessage result = new openxc.Openxc.RawMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.messageId_ = messageId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.data_ = data_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof openxc.Openxc.RawMessage) { + return mergeFrom((openxc.Openxc.RawMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(openxc.Openxc.RawMessage other) { + if (other == openxc.Openxc.RawMessage.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasMessageId()) { + setMessageId(other.getMessageId()); + } + if (other.hasData()) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + openxc.Openxc.RawMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (openxc.Openxc.RawMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 bus = 1; + private int bus_ ; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + /** + * optional int32 bus = 1; + */ + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); + return this; + } + /** + * optional int32 bus = 1; + */ + public Builder clearBus() { + bitField0_ = (bitField0_ & ~0x00000001); + bus_ = 0; + onChanged(); + return this; + } + + // optional uint32 message_id = 2; + private int messageId_ ; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + /** + * optional uint32 message_id = 2; + */ + public Builder setMessageId(int value) { + bitField0_ |= 0x00000002; + messageId_ = value; + onChanged(); + return this; + } + /** + * optional uint32 message_id = 2; + */ + public Builder clearMessageId() { + bitField0_ = (bitField0_ & ~0x00000002); + messageId_ = 0; + onChanged(); + return this; + } + + // optional sint64 data = 3; + private long data_ ; + /** + * optional sint64 data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional sint64 data = 3; + */ + public long getData() { + return data_; + } + /** + * optional sint64 data = 3; + */ + public Builder setData(long value) { + bitField0_ |= 0x00000004; + data_ = value; + onChanged(); + return this; + } + /** + * optional sint64 data = 3; + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000004); + data_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.RawMessage) + } + + static { + defaultInstance = new RawMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.RawMessage) + } + + public interface TranslatedStringMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional string value = 2; + /** + * optional string value = 2; + */ + boolean hasValue(); + /** + * optional string value = 2; + */ + java.lang.String getValue(); + /** + * optional string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + * Protobuf type {@code openxc.TranslatedStringMessage} + */ + public static final class TranslatedStringMessage extends + com.google.protobuf.GeneratedMessage + implements TranslatedStringMessageOrBuilder { + // Use TranslatedStringMessage.newBuilder() to construct. + private TranslatedStringMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TranslatedStringMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TranslatedStringMessage defaultInstance; + public static TranslatedStringMessage getDefaultInstance() { + return defaultInstance; + } + + public TranslatedStringMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TranslatedStringMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.TranslatedStringMessage.class, openxc.Openxc.TranslatedStringMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TranslatedStringMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslatedStringMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + name_ = ""; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static openxc.Openxc.TranslatedStringMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.TranslatedStringMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.TranslatedStringMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.TranslatedStringMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.TranslatedStringMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.TranslatedStringMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static openxc.Openxc.TranslatedStringMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static openxc.Openxc.TranslatedStringMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static openxc.Openxc.TranslatedStringMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.TranslatedStringMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(openxc.Openxc.TranslatedStringMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.TranslatedStringMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements openxc.Openxc.TranslatedStringMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.TranslatedStringMessage.class, openxc.Openxc.TranslatedStringMessage.Builder.class); + } + + // Construct using openxc.Openxc.TranslatedStringMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_descriptor; + } + + public openxc.Openxc.TranslatedStringMessage getDefaultInstanceForType() { + return openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + } + + public openxc.Openxc.TranslatedStringMessage build() { + openxc.Openxc.TranslatedStringMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public openxc.Openxc.TranslatedStringMessage buildPartial() { + openxc.Openxc.TranslatedStringMessage result = new openxc.Openxc.TranslatedStringMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof openxc.Openxc.TranslatedStringMessage) { + return mergeFrom((openxc.Openxc.TranslatedStringMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(openxc.Openxc.TranslatedStringMessage other) { + if (other == openxc.Openxc.TranslatedStringMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + openxc.Openxc.TranslatedStringMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (openxc.Openxc.TranslatedStringMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional string value = 2; + private java.lang.Object value_ = ""; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.TranslatedStringMessage) + } + + static { + defaultInstance = new TranslatedStringMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.TranslatedStringMessage) + } + + public interface TranslatedNumericMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional double value = 2; + /** + * optional double value = 2; + */ + boolean hasValue(); + /** + * optional double value = 2; + */ + double getValue(); + } + /** + * Protobuf type {@code openxc.TranslatedNumericMessage} + */ + public static final class TranslatedNumericMessage extends + com.google.protobuf.GeneratedMessage + implements TranslatedNumericMessageOrBuilder { + // Use TranslatedNumericMessage.newBuilder() to construct. + private TranslatedNumericMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TranslatedNumericMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TranslatedNumericMessage defaultInstance; + public static TranslatedNumericMessage getDefaultInstance() { + return defaultInstance; + } + + public TranslatedNumericMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TranslatedNumericMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + value_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.TranslatedNumericMessage.class, openxc.Openxc.TranslatedNumericMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TranslatedNumericMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslatedNumericMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional double value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private double value_; + /** + * optional double value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional double value = 2; + */ + public double getValue() { + return value_; + } + + private void initFields() { + name_ = ""; + value_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static openxc.Openxc.TranslatedNumericMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.TranslatedNumericMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.TranslatedNumericMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.TranslatedNumericMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.TranslatedNumericMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.TranslatedNumericMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static openxc.Openxc.TranslatedNumericMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static openxc.Openxc.TranslatedNumericMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static openxc.Openxc.TranslatedNumericMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.TranslatedNumericMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(openxc.Openxc.TranslatedNumericMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.TranslatedNumericMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements openxc.Openxc.TranslatedNumericMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.TranslatedNumericMessage.class, openxc.Openxc.TranslatedNumericMessage.Builder.class); + } + + // Construct using openxc.Openxc.TranslatedNumericMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_descriptor; + } + + public openxc.Openxc.TranslatedNumericMessage getDefaultInstanceForType() { + return openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); + } + + public openxc.Openxc.TranslatedNumericMessage build() { + openxc.Openxc.TranslatedNumericMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public openxc.Openxc.TranslatedNumericMessage buildPartial() { + openxc.Openxc.TranslatedNumericMessage result = new openxc.Openxc.TranslatedNumericMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof openxc.Openxc.TranslatedNumericMessage) { + return mergeFrom((openxc.Openxc.TranslatedNumericMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(openxc.Openxc.TranslatedNumericMessage other) { + if (other == openxc.Openxc.TranslatedNumericMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + openxc.Openxc.TranslatedNumericMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (openxc.Openxc.TranslatedNumericMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional double value = 2; + private double value_ ; + /** + * optional double value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional double value = 2; + */ + public double getValue() { + return value_; + } + /** + * optional double value = 2; + */ + public Builder setValue(double value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional double value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.TranslatedNumericMessage) + } + + static { + defaultInstance = new TranslatedNumericMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.TranslatedNumericMessage) + } + + public interface TranslatedBooleanMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional bool value = 2; + /** + * optional bool value = 2; + */ + boolean hasValue(); + /** + * optional bool value = 2; + */ + boolean getValue(); + } + /** + * Protobuf type {@code openxc.TranslatedBooleanMessage} + */ + public static final class TranslatedBooleanMessage extends + com.google.protobuf.GeneratedMessage + implements TranslatedBooleanMessageOrBuilder { + // Use TranslatedBooleanMessage.newBuilder() to construct. + private TranslatedBooleanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TranslatedBooleanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TranslatedBooleanMessage defaultInstance; + public static TranslatedBooleanMessage getDefaultInstance() { + return defaultInstance; + } + + public TranslatedBooleanMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TranslatedBooleanMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + value_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.TranslatedBooleanMessage.class, openxc.Openxc.TranslatedBooleanMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TranslatedBooleanMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslatedBooleanMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bool value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private boolean value_; + /** + * optional bool value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool value = 2; + */ + public boolean getValue() { + return value_; + } + + private void initFields() { + name_ = ""; + value_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.TranslatedBooleanMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static openxc.Openxc.TranslatedBooleanMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static openxc.Openxc.TranslatedBooleanMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static openxc.Openxc.TranslatedBooleanMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(openxc.Openxc.TranslatedBooleanMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.TranslatedBooleanMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements openxc.Openxc.TranslatedBooleanMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + openxc.Openxc.TranslatedBooleanMessage.class, openxc.Openxc.TranslatedBooleanMessage.Builder.class); + } + + // Construct using openxc.Openxc.TranslatedBooleanMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_descriptor; + } + + public openxc.Openxc.TranslatedBooleanMessage getDefaultInstanceForType() { + return openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); + } + + public openxc.Openxc.TranslatedBooleanMessage build() { + openxc.Openxc.TranslatedBooleanMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public openxc.Openxc.TranslatedBooleanMessage buildPartial() { + openxc.Openxc.TranslatedBooleanMessage result = new openxc.Openxc.TranslatedBooleanMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof openxc.Openxc.TranslatedBooleanMessage) { + return mergeFrom((openxc.Openxc.TranslatedBooleanMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(openxc.Openxc.TranslatedBooleanMessage other) { + if (other == openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + openxc.Openxc.TranslatedBooleanMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (openxc.Openxc.TranslatedBooleanMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional bool value = 2; + private boolean value_ ; + /** + * optional bool value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool value = 2; + */ + public boolean getValue() { + return value_; + } + /** + * optional bool value = 2; + */ + public Builder setValue(boolean value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional bool value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.TranslatedBooleanMessage) + } + + static { + defaultInstance = new TranslatedBooleanMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.TranslatedBooleanMessage) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_VehicleMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_VehicleMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_RawMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_RawMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_TranslatedStringMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_TranslatedStringMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_TranslatedNumericMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_TranslatedBooleanMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014openxc.proto\022\006openxc\"\305\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\0227\n\016string_message\030\003 \001(\0132\037.openxc.T" + + "ranslatedStringMessage\022;\n\021numerical_mess" + + "age\030\004 \001(\0132 .openxc.TranslatedNumericMess" + + "age\0229\n\017boolean_message\030\005 \001(\0132 .openxc.Tr" + + "anslatedBooleanMessage\".\n\004Type\022\007\n\003RAW\020\001\022" + + "\n\n\006STRING\020\002\022\007\n\003NUM\020\003\022\010\n\004BOOL\020\004\";\n\nRawMes" + + "sage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n", + "\004data\030\003 \001(\022\"6\n\027TranslatedStringMessage\022\014" + + "\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"7\n\030Translate" + + "dNumericMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\001\"7\n\030TranslatedBooleanMessage\022\014\n\004name" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\010" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_openxc_VehicleMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_openxc_VehicleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_VehicleMessage_descriptor, + new java.lang.String[] { "Type", "RawMessage", "StringMessage", "NumericalMessage", "BooleanMessage", }); + internal_static_openxc_RawMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_openxc_RawMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_RawMessage_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Data", }); + internal_static_openxc_TranslatedStringMessage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_openxc_TranslatedStringMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_TranslatedStringMessage_descriptor, + new java.lang.String[] { "Name", "Value", }); + internal_static_openxc_TranslatedNumericMessage_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_TranslatedNumericMessage_descriptor, + new java.lang.String[] { "Name", "Value", }); + internal_static_openxc_TranslatedBooleanMessage_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_TranslatedBooleanMessage_descriptor, + new java.lang.String[] { "Name", "Value", }); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gen/openxc.pb b/gen/openxc.pb new file mode 100644 index 00000000..e343eeb0 --- /dev/null +++ b/gen/openxc.pb @@ -0,0 +1,30 @@ + +Å + openxc.protoopenxc"Å +VehicleMessage) +type (2.openxc.VehicleMessage.Type' + raw_message ( 2.openxc.RawMessage7 +string_message ( 2.openxc.TranslatedStringMessage; +numerical_message ( 2 .openxc.TranslatedNumericMessage9 +boolean_message ( 2 .openxc.TranslatedBooleanMessage". +Type +RAW + +STRING +NUM +BOOL"; + +RawMessage +bus ( + +message_id (  +data ("6 +TranslatedStringMessage +name (  +value ( "7 +TranslatedNumericMessage +name (  +value ("7 +TranslatedBooleanMessage +name (  +value ( \ No newline at end of file diff --git a/gen/openxc.pb.c b/gen/openxc.pb.c new file mode 100644 index 00000000..19473b4d --- /dev/null +++ b/gen/openxc.pb.c @@ -0,0 +1,57 @@ +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.2.4-dev at Tue Oct 1 16:50:34 2013. */ + +#include "openxc.pb.h" + + + +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, string_message, raw_message, &openxc_TranslatedStringMessage_fields), + PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, numerical_message, string_message, &openxc_TranslatedNumericMessage_fields), + PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, boolean_message, numerical_message, &openxc_TranslatedBooleanMessage_fields), + PB_LAST_FIELD +}; + +const pb_field_t openxc_RawMessage_fields[4] = { + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), + PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), + PB_FIELD2( 3, SINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_TranslatedStringMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedStringMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedStringMessage, value, name, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_TranslatedNumericMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedNumericMessage, name, name, 0), + PB_FIELD2( 2, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedNumericMessage, value, name, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_TranslatedBooleanMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedBooleanMessage, name, name, 0), + PB_FIELD2( 2, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedBooleanMessage, value, name, 0), + PB_LAST_FIELD +}; + + +/* 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, string_message) < 256 && pb_membersize(openxc_VehicleMessage, numerical_message) < 256 && pb_membersize(openxc_VehicleMessage, boolean_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) +#endif + +#if !defined(PB_FIELD_32BIT) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, string_message) < 65536 && pb_membersize(openxc_VehicleMessage, numerical_message) < 65536 && pb_membersize(openxc_VehicleMessage, boolean_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) +#endif + +/* On some platforms (such as AVR), double is really float. + * These are not directly supported by nanopb, but see example_avr_double. + * To get rid of this error, remove any double fields from your .proto. + */ +STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) + diff --git a/gen/openxc.pb.h b/gen/openxc.pb.h new file mode 100644 index 00000000..4923dcc0 --- /dev/null +++ b/gen/openxc.pb.h @@ -0,0 +1,100 @@ +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.2.4-dev at Tue Oct 1 16:50:34 2013. */ + +#ifndef _PB_OPENXC_PB_H_ +#define _PB_OPENXC_PB_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Enum definitions */ +typedef enum _openxc_VehicleMessage_Type { + openxc_VehicleMessage_Type_RAW = 1, + openxc_VehicleMessage_Type_STRING = 2, + openxc_VehicleMessage_Type_NUM = 3, + openxc_VehicleMessage_Type_BOOL = 4 +} openxc_VehicleMessage_Type; + +/* Struct definitions */ +typedef struct _openxc_RawMessage { + bool has_bus; + int32_t bus; + bool has_message_id; + uint32_t message_id; + bool has_data; + int64_t data; +} openxc_RawMessage; + +typedef struct _openxc_TranslatedBooleanMessage { + bool has_name; + char name[100]; + bool has_value; + bool value; +} openxc_TranslatedBooleanMessage; + +typedef struct _openxc_TranslatedNumericMessage { + bool has_name; + char name[100]; + bool has_value; + double value; +} openxc_TranslatedNumericMessage; + +typedef struct _openxc_TranslatedStringMessage { + bool has_name; + char name[100]; + bool has_value; + char value[100]; +} openxc_TranslatedStringMessage; + +typedef struct _openxc_VehicleMessage { + bool has_type; + openxc_VehicleMessage_Type type; + bool has_raw_message; + openxc_RawMessage raw_message; + bool has_string_message; + openxc_TranslatedStringMessage string_message; + bool has_numerical_message; + openxc_TranslatedNumericMessage numerical_message; + bool has_boolean_message; + openxc_TranslatedBooleanMessage boolean_message; +} openxc_VehicleMessage; + +/* Default values for struct fields */ + +/* Field tags (for use in manual encoding/decoding) */ +#define openxc_RawMessage_bus_tag 1 +#define openxc_RawMessage_message_id_tag 2 +#define openxc_RawMessage_data_tag 3 +#define openxc_TranslatedBooleanMessage_name_tag 1 +#define openxc_TranslatedBooleanMessage_value_tag 2 +#define openxc_TranslatedNumericMessage_name_tag 1 +#define openxc_TranslatedNumericMessage_value_tag 2 +#define openxc_TranslatedStringMessage_name_tag 1 +#define openxc_TranslatedStringMessage_value_tag 2 +#define openxc_VehicleMessage_type_tag 1 +#define openxc_VehicleMessage_raw_message_tag 2 +#define openxc_VehicleMessage_string_message_tag 3 +#define openxc_VehicleMessage_numerical_message_tag 4 +#define openxc_VehicleMessage_boolean_message_tag 5 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t openxc_VehicleMessage_fields[6]; +extern const pb_field_t openxc_RawMessage_fields[4]; +extern const pb_field_t openxc_TranslatedStringMessage_fields[3]; +extern const pb_field_t openxc_TranslatedNumericMessage_fields[3]; +extern const pb_field_t openxc_TranslatedBooleanMessage_fields[3]; + +/* Maximum encoded size of messages (where known) */ +#define openxc_VehicleMessage_size 457 +#define openxc_RawMessage_size 23 +#define openxc_TranslatedStringMessage_size 204 +#define openxc_TranslatedNumericMessage_size 111 +#define openxc_TranslatedBooleanMessage_size 104 + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/gen/openxc_pb2.py b/gen/openxc_pb2.py new file mode 100644 index 00000000..ad379eb3 --- /dev/null +++ b/gen/openxc_pb2.py @@ -0,0 +1,296 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: openxc.proto + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='openxc.proto', + package='openxc', + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\xc5\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\x37\n\x0estring_message\x18\x03 \x01(\x0b\x32\x1f.openxc.TranslatedStringMessage\x12;\n\x11numerical_message\x18\x04 \x01(\x0b\x32 .openxc.TranslatedNumericMessage\x12\x39\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32 .openxc.TranslatedBooleanMessage\".\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x07\n\x03NUM\x10\x03\x12\x08\n\x04\x42OOL\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(\x12\"6\n\x17TranslatedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"7\n\x18TranslatedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"7\n\x18TranslatedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08') + + + +_VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( + name='Type', + full_name='openxc.VehicleMessage.Type', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='RAW', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='STRING', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NUM', index=2, number=3, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BOOL', index=3, number=4, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=304, + serialized_end=350, +) + + +_VEHICLEMESSAGE = _descriptor.Descriptor( + name='VehicleMessage', + full_name='openxc.VehicleMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='openxc.VehicleMessage.type', 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, + options=None), + _descriptor.FieldDescriptor( + name='raw_message', full_name='openxc.VehicleMessage.raw_message', index=1, + number=2, 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), + _descriptor.FieldDescriptor( + name='string_message', full_name='openxc.VehicleMessage.string_message', index=2, + number=3, 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), + _descriptor.FieldDescriptor( + name='numerical_message', full_name='openxc.VehicleMessage.numerical_message', index=3, + number=4, 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), + _descriptor.FieldDescriptor( + name='boolean_message', full_name='openxc.VehicleMessage.boolean_message', 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=[ + ], + nested_types=[], + enum_types=[ + _VEHICLEMESSAGE_TYPE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=25, + serialized_end=350, +) + + +_RAWMESSAGE = _descriptor.Descriptor( + name='RawMessage', + full_name='openxc.RawMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.RawMessage.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='message_id', full_name='openxc.RawMessage.message_id', index=1, + number=2, type=13, cpp_type=3, 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='data', full_name='openxc.RawMessage.data', index=2, + number=3, type=18, cpp_type=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=352, + serialized_end=411, +) + + +_TRANSLATEDSTRINGMESSAGE = _descriptor.Descriptor( + name='TranslatedStringMessage', + full_name='openxc.TranslatedStringMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.TranslatedStringMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.TranslatedStringMessage.value', index=1, + number=2, 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, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=413, + serialized_end=467, +) + + +_TRANSLATEDNUMERICMESSAGE = _descriptor.Descriptor( + name='TranslatedNumericMessage', + full_name='openxc.TranslatedNumericMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.TranslatedNumericMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.TranslatedNumericMessage.value', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=469, + serialized_end=524, +) + + +_TRANSLATEDBOOLEANMESSAGE = _descriptor.Descriptor( + name='TranslatedBooleanMessage', + full_name='openxc.TranslatedBooleanMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.TranslatedBooleanMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.TranslatedBooleanMessage.value', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=526, + serialized_end=581, +) + +_VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE +_VEHICLEMESSAGE.fields_by_name['raw_message'].message_type = _RAWMESSAGE +_VEHICLEMESSAGE.fields_by_name['string_message'].message_type = _TRANSLATEDSTRINGMESSAGE +_VEHICLEMESSAGE.fields_by_name['numerical_message'].message_type = _TRANSLATEDNUMERICMESSAGE +_VEHICLEMESSAGE.fields_by_name['boolean_message'].message_type = _TRANSLATEDBOOLEANMESSAGE +_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; +DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE +DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedStringMessage'] = _TRANSLATEDSTRINGMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedNumericMessage'] = _TRANSLATEDNUMERICMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedBooleanMessage'] = _TRANSLATEDBOOLEANMESSAGE + +class VehicleMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _VEHICLEMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) + +class RawMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _RAWMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.RawMessage) + +class TranslatedStringMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _TRANSLATEDSTRINGMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.TranslatedStringMessage) + +class TranslatedNumericMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _TRANSLATEDNUMERICMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.TranslatedNumericMessage) + +class TranslatedBooleanMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _TRANSLATEDBOOLEANMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.TranslatedBooleanMessage) + + +# @@protoc_insertion_point(module_scope) diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py new file mode 100644 index 00000000..ad379eb3 --- /dev/null +++ b/gen/python/openxc_pb2.py @@ -0,0 +1,296 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: openxc.proto + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='openxc.proto', + package='openxc', + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\xc5\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\x37\n\x0estring_message\x18\x03 \x01(\x0b\x32\x1f.openxc.TranslatedStringMessage\x12;\n\x11numerical_message\x18\x04 \x01(\x0b\x32 .openxc.TranslatedNumericMessage\x12\x39\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32 .openxc.TranslatedBooleanMessage\".\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x07\n\x03NUM\x10\x03\x12\x08\n\x04\x42OOL\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(\x12\"6\n\x17TranslatedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"7\n\x18TranslatedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"7\n\x18TranslatedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08') + + + +_VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( + name='Type', + full_name='openxc.VehicleMessage.Type', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='RAW', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='STRING', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NUM', index=2, number=3, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BOOL', index=3, number=4, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=304, + serialized_end=350, +) + + +_VEHICLEMESSAGE = _descriptor.Descriptor( + name='VehicleMessage', + full_name='openxc.VehicleMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='openxc.VehicleMessage.type', 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, + options=None), + _descriptor.FieldDescriptor( + name='raw_message', full_name='openxc.VehicleMessage.raw_message', index=1, + number=2, 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), + _descriptor.FieldDescriptor( + name='string_message', full_name='openxc.VehicleMessage.string_message', index=2, + number=3, 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), + _descriptor.FieldDescriptor( + name='numerical_message', full_name='openxc.VehicleMessage.numerical_message', index=3, + number=4, 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), + _descriptor.FieldDescriptor( + name='boolean_message', full_name='openxc.VehicleMessage.boolean_message', 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=[ + ], + nested_types=[], + enum_types=[ + _VEHICLEMESSAGE_TYPE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=25, + serialized_end=350, +) + + +_RAWMESSAGE = _descriptor.Descriptor( + name='RawMessage', + full_name='openxc.RawMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.RawMessage.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='message_id', full_name='openxc.RawMessage.message_id', index=1, + number=2, type=13, cpp_type=3, 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='data', full_name='openxc.RawMessage.data', index=2, + number=3, type=18, cpp_type=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=352, + serialized_end=411, +) + + +_TRANSLATEDSTRINGMESSAGE = _descriptor.Descriptor( + name='TranslatedStringMessage', + full_name='openxc.TranslatedStringMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.TranslatedStringMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.TranslatedStringMessage.value', index=1, + number=2, 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, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=413, + serialized_end=467, +) + + +_TRANSLATEDNUMERICMESSAGE = _descriptor.Descriptor( + name='TranslatedNumericMessage', + full_name='openxc.TranslatedNumericMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.TranslatedNumericMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.TranslatedNumericMessage.value', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=469, + serialized_end=524, +) + + +_TRANSLATEDBOOLEANMESSAGE = _descriptor.Descriptor( + name='TranslatedBooleanMessage', + full_name='openxc.TranslatedBooleanMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.TranslatedBooleanMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.TranslatedBooleanMessage.value', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=526, + serialized_end=581, +) + +_VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE +_VEHICLEMESSAGE.fields_by_name['raw_message'].message_type = _RAWMESSAGE +_VEHICLEMESSAGE.fields_by_name['string_message'].message_type = _TRANSLATEDSTRINGMESSAGE +_VEHICLEMESSAGE.fields_by_name['numerical_message'].message_type = _TRANSLATEDNUMERICMESSAGE +_VEHICLEMESSAGE.fields_by_name['boolean_message'].message_type = _TRANSLATEDBOOLEANMESSAGE +_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; +DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE +DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedStringMessage'] = _TRANSLATEDSTRINGMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedNumericMessage'] = _TRANSLATEDNUMERICMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedBooleanMessage'] = _TRANSLATEDBOOLEANMESSAGE + +class VehicleMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _VEHICLEMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) + +class RawMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _RAWMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.RawMessage) + +class TranslatedStringMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _TRANSLATEDSTRINGMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.TranslatedStringMessage) + +class TranslatedNumericMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _TRANSLATEDNUMERICMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.TranslatedNumericMessage) + +class TranslatedBooleanMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _TRANSLATEDBOOLEANMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.TranslatedBooleanMessage) + + +# @@protoc_insertion_point(module_scope) diff --git a/libs/nanopb b/libs/nanopb new file mode 160000 index 00000000..388d4de8 --- /dev/null +++ b/libs/nanopb @@ -0,0 +1 @@ +Subproject commit 388d4de833cf4e2127b2ab0489cb6b14ecc0cbb5 diff --git a/pip-requirements.txt b/pip-requirements.txt new file mode 100644 index 00000000..7f147d92 --- /dev/null +++ b/pip-requirements.txt @@ -0,0 +1 @@ +protobuf==2.5.0 diff --git a/script/bootstrap.sh b/script/bootstrap.sh new file mode 100755 index 00000000..c0422422 --- /dev/null +++ b/script/bootstrap.sh @@ -0,0 +1,179 @@ +#!/usr/bin/env bash + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +pushd $DIR/.. + +# TODO this is kind of a hacky way of determining if root is required - +# ideally we wouuld set up a little virtualenv in the dependencies folder +SUDO_CMD= +if command -v sudo >/dev/null 2>&1; then + SUDO_CMD="sudo -E" + + echo "The bootstrap script needs to install a few packages to your system as an admin, and we will use the 'sudo' command - enter your password to continue" + $SUDO_CMD ls > /dev/null +fi + +KERNEL=`uname` +if [ ${KERNEL:0:7} == "MINGW32" ]; then + OS="windows" +elif [ ${KERNEL:0:6} == "CYGWIN" ]; then + OS="cygwin" +elif [ $KERNEL == "Darwin" ]; then + OS="mac" +else + OS="linux" + if ! command -v lsb_release >/dev/null 2>&1; then + # Arch Linux + if command -v pacman>/dev/null 2>&1; then + $SUDO_CMD pacman -S lsb-release + fi + fi + + DISTRO=`lsb_release -si` +fi + +die() { + echo >&2 "${bldred}$@${txtrst}" + exit 1 +} + +_cygwin_error() { + echo + echo "${bldred}Missing \"$1\"${txtrst} - run the Cygwin installer again and select the base package set:" + echo " $CYGWIN_PACKAGES" + echo "After installing the packages, re-run this bootstrap script." + die +} + +if ! command -v tput >/dev/null 2>&1; then + if [ $OS == "cygwin" ]; then + echo "OPTIONAL: Install the \"ncurses\" package in Cygwin to get colored shell output" + fi +else + txtrst=$(tput sgr0) # reset + bldred=${txtbld}$(tput setaf 1) + bldgreen=${txtbld}$(tput setaf 2) +fi + +_pushd() { + pushd $1 > /dev/null +} + +_popd() { + popd > /dev/null +} + +_wait() { + if [ -z $CI ]; then + echo "Press Enter when done" + read + fi +} + +_install() { + if [ $OS == "cygwin" ]; then + _cygwin_error $1 + elif [ $OS == "mac" ]; then + # brew exists with 1 if it's already installed + set +e + brew install $1 + set -e + else + if [ -z $DISTRO ]; then + echo + echo "Missing $1 - install it using your distro's package manager or build from source" + _wait + else + if [ $DISTRO == "arch" ]; then + $SUDO_CMD pacman -S $1 + elif [ $DISTRO == "Ubuntu" ]; then + $SUDO_CMD apt-get update -qq + $SUDO_CMD apt-get install $1 -y + else + echo + echo "Missing $1 - install it using your distro's package manager or build from source" + _wait + fi + fi + fi +} + +CYGWIN_PACKAGES="make curl, libsasl2, ca-certificates, ncurses, python-setuptools" + +download() { + url=$1 + filename=$2 + curl $url -L --O $filename +} + +if [ `id -u` == 0 ]; then + die "Error: running as root - don't use 'sudo' with this script" +fi + +if ! command -v curl >/dev/null 2>&1; then + if [ $OS == "cygwin" ]; then + _cygwin_error "curl" + else + _install curl + fi +fi + +if [ $OS == "windows" ]; then + die "Sorry, the bootstrap script for compiling from source doesn't support the Windows console - try Cygwin." +fi + +if [ $OS == "mac" ] && ! command -v brew >/dev/null 2>&1; then + echo "Installing Homebrew..." + ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" +fi + +if ! command -v make >/dev/null 2>&1; then + if [ $OS == "cygwin" ]; then + _cygwin_error "make" + elif [ $OS == "mac" ]; then + die "Missing 'make' - install the Xcode CLI tools" + else + if [ $DISTRO == "arch" ]; then + $SUDO_CMD pacman -S base-devel + elif [ $DISTRO == "Ubuntu" ]; then + $SUDO_CMD apt-get update -qq + $SUDO_CMD apt-get install build-essential -y + fi + fi +fi + +if ! command -v python >/dev/null 2>&1; then + echo "Installing Python..." + _install "python" +fi + +if ! command -v pip >/dev/null 2>&1; then + echo "Installing Pip..." + if ! command -v easy_install >/dev/null 2>&1; then + die "easy_install not available, can't install pip" + fi + + $SUDO_CMD easy_install pip +fi + +$SUDO_CMD pip install -U pip +$SUDO_CMD pip install --pre -Ur pip-requirements.txt + +if ! command -v protoc >/dev/null 2>&1; then + if [ $OS == "cygwin" ]; then + _cygwin_error "protobuf" + elif [ $OS == "mac" ] || [ $OS == "linux" ]; then + if [ $DISTRO == "Ubuntu" ]; then + _install protobuf-compiler + else + _install protobuf + fi + fi +fi + +popd + +echo +echo "${bldgreen}All developer dependencies installed, ready to compile.$txtrst" -- cgit 1.2.3-korg From 0dbcea457cb624a60ecffe59c163d775ea2fc490 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 4 Oct 2013 19:31:51 -0400 Subject: Merge all sub-types into a single TranslatedMessage type. --- gen/cpp/openxc.pb | 35 +- gen/cpp/openxc.pb.c | 35 +- gen/cpp/openxc.pb.h | 75 +- gen/java/openxc/Openxc.java | 2413 ++++++++++++------------------------------- gen/python/openxc_pb2.py | 147 +-- openxc.options | 2 +- openxc.proto | 25 +- 7 files changed, 787 insertions(+), 1945 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index e343eeb0..523fc767 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,30 +1,25 @@ -Å - openxc.protoopenxc"Å +Â + openxc.protoopenxc"¼ VehicleMessage) type (2.openxc.VehicleMessage.Type' - raw_message ( 2.openxc.RawMessage7 -string_message ( 2.openxc.TranslatedStringMessage; -numerical_message ( 2 .openxc.TranslatedNumericMessage9 -boolean_message ( 2 .openxc.TranslatedBooleanMessage". + raw_message ( 2.openxc.RawMessage5 +translated_message ( 2.openxc.TranslatedMessage" Type -RAW +RAW -STRING -NUM -BOOL"; +TRANSLATED"; RawMessage bus ( message_id (  -data ("6 -TranslatedStringMessage -name (  -value ( "7 -TranslatedNumericMessage -name (  -value ("7 -TranslatedBooleanMessage -name (  -value ( \ No newline at end of file +data ("­ +TranslatedMessage +name (  + string_value (  +numerical_value ( + boolean_value ( + string_event (  +numerical_event ( + boolean_event ( \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 89e32a60..a49e1c07 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,16 +1,14 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.4-dev at Tue Oct 1 16:51:23 2013. */ +/* Generated by nanopb-0.2.4-dev at Fri Oct 4 19:24:10 2013. */ #include "openxc.pb.h" -const pb_field_t openxc_VehicleMessage_fields[6] = { +const pb_field_t openxc_VehicleMessage_fields[4] = { 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, string_message, raw_message, &openxc_TranslatedStringMessage_fields), - PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, numerical_message, string_message, &openxc_TranslatedNumericMessage_fields), - PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, boolean_message, numerical_message, &openxc_TranslatedBooleanMessage_fields), + PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields), PB_LAST_FIELD }; @@ -21,32 +19,25 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_TranslatedStringMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedStringMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedStringMessage, value, name, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_TranslatedNumericMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedNumericMessage, name, name, 0), - PB_FIELD2( 2, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedNumericMessage, value, name, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_TranslatedBooleanMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedBooleanMessage, name, name, 0), - PB_FIELD2( 2, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedBooleanMessage, value, name, 0), +const pb_field_t openxc_TranslatedMessage_fields[8] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_value, name, 0), + PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_value, string_value, 0), + PB_FIELD2( 4, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_value, numerical_value, 0), + PB_FIELD2( 5, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), + PB_FIELD2( 6, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_event, string_event, 0), + PB_FIELD2( 7, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_event, numerical_event, 0), PB_LAST_FIELD }; /* 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, string_message) < 256 && pb_membersize(openxc_VehicleMessage, numerical_message) < 256 && pb_membersize(openxc_VehicleMessage, boolean_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, string_message) < 65536 && pb_membersize(openxc_VehicleMessage, numerical_message) < 65536 && pb_membersize(openxc_VehicleMessage, boolean_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_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 9c50569d..8528e654 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.4-dev at Tue Oct 1 16:51:23 2013. */ +/* Generated by nanopb-0.2.4-dev at Fri Oct 4 19:24:10 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -12,9 +12,7 @@ extern "C" { /* Enum definitions */ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_RAW = 1, - openxc_VehicleMessage_Type_STRING = 2, - openxc_VehicleMessage_Type_NUM = 3, - openxc_VehicleMessage_Type_BOOL = 4 + openxc_VehicleMessage_Type_TRANSLATED = 2 } openxc_VehicleMessage_Type; /* Struct definitions */ @@ -27,38 +25,30 @@ typedef struct _openxc_RawMessage { int64_t data; } openxc_RawMessage; -typedef struct _openxc_TranslatedBooleanMessage { +typedef struct _openxc_TranslatedMessage { bool has_name; char name[100]; - bool has_value; - bool value; -} openxc_TranslatedBooleanMessage; - -typedef struct _openxc_TranslatedNumericMessage { - bool has_name; - char name[100]; - bool has_value; - double value; -} openxc_TranslatedNumericMessage; - -typedef struct _openxc_TranslatedStringMessage { - bool has_name; - char name[100]; - bool has_value; - char value[100]; -} openxc_TranslatedStringMessage; + bool has_string_value; + char string_value[100]; + bool has_numerical_value; + double numerical_value; + bool has_boolean_value; + bool boolean_value; + bool has_string_event; + char string_event[100]; + bool has_numerical_event; + double numerical_event; + bool has_boolean_event; + bool boolean_event; +} openxc_TranslatedMessage; typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; bool has_raw_message; openxc_RawMessage raw_message; - bool has_string_message; - openxc_TranslatedStringMessage string_message; - bool has_numerical_message; - openxc_TranslatedNumericMessage numerical_message; - bool has_boolean_message; - openxc_TranslatedBooleanMessage boolean_message; + bool has_translated_message; + openxc_TranslatedMessage translated_message; } openxc_VehicleMessage; /* Default values for struct fields */ @@ -67,31 +57,26 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 -#define openxc_TranslatedBooleanMessage_name_tag 1 -#define openxc_TranslatedBooleanMessage_value_tag 2 -#define openxc_TranslatedNumericMessage_name_tag 1 -#define openxc_TranslatedNumericMessage_value_tag 2 -#define openxc_TranslatedStringMessage_name_tag 1 -#define openxc_TranslatedStringMessage_value_tag 2 +#define openxc_TranslatedMessage_name_tag 1 +#define openxc_TranslatedMessage_string_value_tag 2 +#define openxc_TranslatedMessage_numerical_value_tag 3 +#define openxc_TranslatedMessage_boolean_value_tag 4 +#define openxc_TranslatedMessage_string_event_tag 5 +#define openxc_TranslatedMessage_numerical_event_tag 6 +#define openxc_TranslatedMessage_boolean_event_tag 7 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 -#define openxc_VehicleMessage_string_message_tag 3 -#define openxc_VehicleMessage_numerical_message_tag 4 -#define openxc_VehicleMessage_boolean_message_tag 5 +#define openxc_VehicleMessage_translated_message_tag 3 /* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[6]; +extern const pb_field_t openxc_VehicleMessage_fields[4]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_TranslatedStringMessage_fields[3]; -extern const pb_field_t openxc_TranslatedNumericMessage_fields[3]; -extern const pb_field_t openxc_TranslatedBooleanMessage_fields[3]; +extern const pb_field_t openxc_TranslatedMessage_fields[8]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 457 +#define openxc_VehicleMessage_size 362 #define openxc_RawMessage_size 23 -#define openxc_TranslatedStringMessage_size 204 -#define openxc_TranslatedNumericMessage_size 111 -#define openxc_TranslatedBooleanMessage_size 104 +#define openxc_TranslatedMessage_size 328 #ifdef __cplusplus } /* extern "C" */ diff --git a/gen/java/openxc/Openxc.java b/gen/java/openxc/Openxc.java index f5c7f0b0..93a4d05f 100644 --- a/gen/java/openxc/Openxc.java +++ b/gen/java/openxc/Openxc.java @@ -35,47 +35,19 @@ public final class Openxc { */ openxc.Openxc.RawMessageOrBuilder getRawMessageOrBuilder(); - // optional .openxc.TranslatedStringMessage string_message = 3; + // optional .openxc.TranslatedMessage translated_message = 3; /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - boolean hasStringMessage(); + boolean hasTranslatedMessage(); /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - openxc.Openxc.TranslatedStringMessage getStringMessage(); + openxc.Openxc.TranslatedMessage getTranslatedMessage(); /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - openxc.Openxc.TranslatedStringMessageOrBuilder getStringMessageOrBuilder(); - - // optional .openxc.TranslatedNumericMessage numerical_message = 4; - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - boolean hasNumericalMessage(); - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - openxc.Openxc.TranslatedNumericMessage getNumericalMessage(); - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - openxc.Openxc.TranslatedNumericMessageOrBuilder getNumericalMessageOrBuilder(); - - // optional .openxc.TranslatedBooleanMessage boolean_message = 5; - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - boolean hasBooleanMessage(); - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - openxc.Openxc.TranslatedBooleanMessage getBooleanMessage(); - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - openxc.Openxc.TranslatedBooleanMessageOrBuilder getBooleanMessageOrBuilder(); + openxc.Openxc.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); } /** * Protobuf type {@code openxc.VehicleMessage} @@ -153,44 +125,18 @@ public final class Openxc { break; } case 26: { - openxc.Openxc.TranslatedStringMessage.Builder subBuilder = null; + openxc.Openxc.TranslatedMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = stringMessage_.toBuilder(); + subBuilder = translatedMessage_.toBuilder(); } - stringMessage_ = input.readMessage(openxc.Openxc.TranslatedStringMessage.PARSER, extensionRegistry); + translatedMessage_ = input.readMessage(openxc.Openxc.TranslatedMessage.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(stringMessage_); - stringMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(translatedMessage_); + translatedMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } - case 34: { - openxc.Openxc.TranslatedNumericMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = numericalMessage_.toBuilder(); - } - numericalMessage_ = input.readMessage(openxc.Openxc.TranslatedNumericMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(numericalMessage_); - numericalMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 42: { - openxc.Openxc.TranslatedBooleanMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = booleanMessage_.toBuilder(); - } - booleanMessage_ = input.readMessage(openxc.Openxc.TranslatedBooleanMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(booleanMessage_); - booleanMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -240,17 +186,9 @@ public final class Openxc { */ RAW(0, 1), /** - * STRING = 2; - */ - STRING(1, 2), - /** - * NUM = 3; - */ - NUM(2, 3), - /** - * BOOL = 4; + * TRANSLATED = 2; */ - BOOL(3, 4), + TRANSLATED(1, 2), ; /** @@ -258,17 +196,9 @@ public final class Openxc { */ public static final int RAW_VALUE = 1; /** - * STRING = 2; - */ - public static final int STRING_VALUE = 2; - /** - * NUM = 3; - */ - public static final int NUM_VALUE = 3; - /** - * BOOL = 4; + * TRANSLATED = 2; */ - public static final int BOOL_VALUE = 4; + public static final int TRANSLATED_VALUE = 2; public final int getNumber() { return value; } @@ -276,9 +206,7 @@ public final class Openxc { public static Type valueOf(int value) { switch (value) { case 1: return RAW; - case 2: return STRING; - case 3: return NUM; - case 4: return BOOL; + case 2: return TRANSLATED; default: return null; } } @@ -369,78 +297,32 @@ public final class Openxc { return rawMessage_; } - // optional .openxc.TranslatedStringMessage string_message = 3; - public static final int STRING_MESSAGE_FIELD_NUMBER = 3; - private openxc.Openxc.TranslatedStringMessage stringMessage_; + // optional .openxc.TranslatedMessage translated_message = 3; + public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3; + private openxc.Openxc.TranslatedMessage translatedMessage_; /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public boolean hasStringMessage() { + public boolean hasTranslatedMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedStringMessage string_message = 3; - */ - public openxc.Openxc.TranslatedStringMessage getStringMessage() { - return stringMessage_; - } - /** - * optional .openxc.TranslatedStringMessage string_message = 3; - */ - public openxc.Openxc.TranslatedStringMessageOrBuilder getStringMessageOrBuilder() { - return stringMessage_; - } - - // optional .openxc.TranslatedNumericMessage numerical_message = 4; - public static final int NUMERICAL_MESSAGE_FIELD_NUMBER = 4; - private openxc.Openxc.TranslatedNumericMessage numericalMessage_; - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public boolean hasNumericalMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public openxc.Openxc.TranslatedNumericMessage getNumericalMessage() { - return numericalMessage_; - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public openxc.Openxc.TranslatedNumericMessageOrBuilder getNumericalMessageOrBuilder() { - return numericalMessage_; - } - - // optional .openxc.TranslatedBooleanMessage boolean_message = 5; - public static final int BOOLEAN_MESSAGE_FIELD_NUMBER = 5; - private openxc.Openxc.TranslatedBooleanMessage booleanMessage_; - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public boolean hasBooleanMessage() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public openxc.Openxc.TranslatedBooleanMessage getBooleanMessage() { - return booleanMessage_; + public openxc.Openxc.TranslatedMessage getTranslatedMessage() { + return translatedMessage_; } /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public openxc.Openxc.TranslatedBooleanMessageOrBuilder getBooleanMessageOrBuilder() { - return booleanMessage_; + public openxc.Openxc.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { + return translatedMessage_; } private void initFields() { type_ = openxc.Openxc.VehicleMessage.Type.RAW; rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); - stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); - numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); - booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); + translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -461,13 +343,7 @@ public final class Openxc { output.writeMessage(2, rawMessage_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, stringMessage_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, numericalMessage_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(5, booleanMessage_); + output.writeMessage(3, translatedMessage_); } getUnknownFields().writeTo(output); } @@ -488,15 +364,7 @@ public final class Openxc { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, stringMessage_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, numericalMessage_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, booleanMessage_); + .computeMessageSize(3, translatedMessage_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -607,9 +475,7 @@ public final class Openxc { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRawMessageFieldBuilder(); - getStringMessageFieldBuilder(); - getNumericalMessageFieldBuilder(); - getBooleanMessageFieldBuilder(); + getTranslatedMessageFieldBuilder(); } } private static Builder create() { @@ -626,24 +492,12 @@ public final class Openxc { rawMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); - if (stringMessageBuilder_ == null) { - stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + if (translatedMessageBuilder_ == null) { + translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); } else { - stringMessageBuilder_.clear(); + translatedMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); - if (numericalMessageBuilder_ == null) { - numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); - } else { - numericalMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (booleanMessageBuilder_ == null) { - booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); - } else { - booleanMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -687,26 +541,10 @@ public final class Openxc { if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (stringMessageBuilder_ == null) { - result.stringMessage_ = stringMessage_; - } else { - result.stringMessage_ = stringMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (numericalMessageBuilder_ == null) { - result.numericalMessage_ = numericalMessage_; - } else { - result.numericalMessage_ = numericalMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - if (booleanMessageBuilder_ == null) { - result.booleanMessage_ = booleanMessage_; + if (translatedMessageBuilder_ == null) { + result.translatedMessage_ = translatedMessage_; } else { - result.booleanMessage_ = booleanMessageBuilder_.build(); + result.translatedMessage_ = translatedMessageBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -730,14 +568,8 @@ public final class Openxc { if (other.hasRawMessage()) { mergeRawMessage(other.getRawMessage()); } - if (other.hasStringMessage()) { - mergeStringMessage(other.getStringMessage()); - } - if (other.hasNumericalMessage()) { - mergeNumericalMessage(other.getNumericalMessage()); - } - if (other.hasBooleanMessage()) { - mergeBooleanMessage(other.getBooleanMessage()); + if (other.hasTranslatedMessage()) { + mergeTranslatedMessage(other.getTranslatedMessage()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -919,355 +751,121 @@ public final class Openxc { return rawMessageBuilder_; } - // optional .openxc.TranslatedStringMessage string_message = 3; - private openxc.Openxc.TranslatedStringMessage stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + // optional .openxc.TranslatedMessage translated_message = 3; + private openxc.Openxc.TranslatedMessage translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedStringMessage, openxc.Openxc.TranslatedStringMessage.Builder, openxc.Openxc.TranslatedStringMessageOrBuilder> stringMessageBuilder_; + openxc.Openxc.TranslatedMessage, openxc.Openxc.TranslatedMessage.Builder, openxc.Openxc.TranslatedMessageOrBuilder> translatedMessageBuilder_; /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public boolean hasStringMessage() { + public boolean hasTranslatedMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public openxc.Openxc.TranslatedStringMessage getStringMessage() { - if (stringMessageBuilder_ == null) { - return stringMessage_; + public openxc.Openxc.TranslatedMessage getTranslatedMessage() { + if (translatedMessageBuilder_ == null) { + return translatedMessage_; } else { - return stringMessageBuilder_.getMessage(); + return translatedMessageBuilder_.getMessage(); } } /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder setStringMessage(openxc.Openxc.TranslatedStringMessage value) { - if (stringMessageBuilder_ == null) { + public Builder setTranslatedMessage(openxc.Openxc.TranslatedMessage value) { + if (translatedMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - stringMessage_ = value; + translatedMessage_ = value; onChanged(); } else { - stringMessageBuilder_.setMessage(value); + translatedMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder setStringMessage( - openxc.Openxc.TranslatedStringMessage.Builder builderForValue) { - if (stringMessageBuilder_ == null) { - stringMessage_ = builderForValue.build(); + public Builder setTranslatedMessage( + openxc.Openxc.TranslatedMessage.Builder builderForValue) { + if (translatedMessageBuilder_ == null) { + translatedMessage_ = builderForValue.build(); onChanged(); } else { - stringMessageBuilder_.setMessage(builderForValue.build()); + translatedMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder mergeStringMessage(openxc.Openxc.TranslatedStringMessage value) { - if (stringMessageBuilder_ == null) { + public Builder mergeTranslatedMessage(openxc.Openxc.TranslatedMessage value) { + if (translatedMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && - stringMessage_ != openxc.Openxc.TranslatedStringMessage.getDefaultInstance()) { - stringMessage_ = - openxc.Openxc.TranslatedStringMessage.newBuilder(stringMessage_).mergeFrom(value).buildPartial(); + translatedMessage_ != openxc.Openxc.TranslatedMessage.getDefaultInstance()) { + translatedMessage_ = + openxc.Openxc.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial(); } else { - stringMessage_ = value; + translatedMessage_ = value; } onChanged(); } else { - stringMessageBuilder_.mergeFrom(value); + translatedMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder clearStringMessage() { - if (stringMessageBuilder_ == null) { - stringMessage_ = openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); + public Builder clearTranslatedMessage() { + if (translatedMessageBuilder_ == null) { + translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); onChanged(); } else { - stringMessageBuilder_.clear(); + translatedMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional .openxc.TranslatedStringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public openxc.Openxc.TranslatedStringMessage.Builder getStringMessageBuilder() { + public openxc.Openxc.TranslatedMessage.Builder getTranslatedMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getStringMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.TranslatedStringMessage string_message = 3; - */ - public openxc.Openxc.TranslatedStringMessageOrBuilder getStringMessageOrBuilder() { - if (stringMessageBuilder_ != null) { - return stringMessageBuilder_.getMessageOrBuilder(); - } else { - return stringMessage_; - } - } - /** - * optional .openxc.TranslatedStringMessage string_message = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedStringMessage, openxc.Openxc.TranslatedStringMessage.Builder, openxc.Openxc.TranslatedStringMessageOrBuilder> - getStringMessageFieldBuilder() { - if (stringMessageBuilder_ == null) { - stringMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedStringMessage, openxc.Openxc.TranslatedStringMessage.Builder, openxc.Openxc.TranslatedStringMessageOrBuilder>( - stringMessage_, - getParentForChildren(), - isClean()); - stringMessage_ = null; - } - return stringMessageBuilder_; - } - - // optional .openxc.TranslatedNumericMessage numerical_message = 4; - private openxc.Openxc.TranslatedNumericMessage numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedNumericMessage, openxc.Openxc.TranslatedNumericMessage.Builder, openxc.Openxc.TranslatedNumericMessageOrBuilder> numericalMessageBuilder_; - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public boolean hasNumericalMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public openxc.Openxc.TranslatedNumericMessage getNumericalMessage() { - if (numericalMessageBuilder_ == null) { - return numericalMessage_; - } else { - return numericalMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public Builder setNumericalMessage(openxc.Openxc.TranslatedNumericMessage value) { - if (numericalMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - numericalMessage_ = value; - onChanged(); - } else { - numericalMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public Builder setNumericalMessage( - openxc.Openxc.TranslatedNumericMessage.Builder builderForValue) { - if (numericalMessageBuilder_ == null) { - numericalMessage_ = builderForValue.build(); - onChanged(); - } else { - numericalMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public Builder mergeNumericalMessage(openxc.Openxc.TranslatedNumericMessage value) { - if (numericalMessageBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - numericalMessage_ != openxc.Openxc.TranslatedNumericMessage.getDefaultInstance()) { - numericalMessage_ = - openxc.Openxc.TranslatedNumericMessage.newBuilder(numericalMessage_).mergeFrom(value).buildPartial(); - } else { - numericalMessage_ = value; - } - onChanged(); - } else { - numericalMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public Builder clearNumericalMessage() { - if (numericalMessageBuilder_ == null) { - numericalMessage_ = openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); - onChanged(); - } else { - numericalMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public openxc.Openxc.TranslatedNumericMessage.Builder getNumericalMessageBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getNumericalMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - public openxc.Openxc.TranslatedNumericMessageOrBuilder getNumericalMessageOrBuilder() { - if (numericalMessageBuilder_ != null) { - return numericalMessageBuilder_.getMessageOrBuilder(); - } else { - return numericalMessage_; - } - } - /** - * optional .openxc.TranslatedNumericMessage numerical_message = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedNumericMessage, openxc.Openxc.TranslatedNumericMessage.Builder, openxc.Openxc.TranslatedNumericMessageOrBuilder> - getNumericalMessageFieldBuilder() { - if (numericalMessageBuilder_ == null) { - numericalMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedNumericMessage, openxc.Openxc.TranslatedNumericMessage.Builder, openxc.Openxc.TranslatedNumericMessageOrBuilder>( - numericalMessage_, - getParentForChildren(), - isClean()); - numericalMessage_ = null; - } - return numericalMessageBuilder_; - } - - // optional .openxc.TranslatedBooleanMessage boolean_message = 5; - private openxc.Openxc.TranslatedBooleanMessage booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedBooleanMessage, openxc.Openxc.TranslatedBooleanMessage.Builder, openxc.Openxc.TranslatedBooleanMessageOrBuilder> booleanMessageBuilder_; - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public boolean hasBooleanMessage() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public openxc.Openxc.TranslatedBooleanMessage getBooleanMessage() { - if (booleanMessageBuilder_ == null) { - return booleanMessage_; - } else { - return booleanMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public Builder setBooleanMessage(openxc.Openxc.TranslatedBooleanMessage value) { - if (booleanMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - booleanMessage_ = value; - onChanged(); - } else { - booleanMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public Builder setBooleanMessage( - openxc.Openxc.TranslatedBooleanMessage.Builder builderForValue) { - if (booleanMessageBuilder_ == null) { - booleanMessage_ = builderForValue.build(); - onChanged(); - } else { - booleanMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public Builder mergeBooleanMessage(openxc.Openxc.TranslatedBooleanMessage value) { - if (booleanMessageBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - booleanMessage_ != openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance()) { - booleanMessage_ = - openxc.Openxc.TranslatedBooleanMessage.newBuilder(booleanMessage_).mergeFrom(value).buildPartial(); - } else { - booleanMessage_ = value; - } - onChanged(); - } else { - booleanMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public Builder clearBooleanMessage() { - if (booleanMessageBuilder_ == null) { - booleanMessage_ = openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); - onChanged(); - } else { - booleanMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; - */ - public openxc.Openxc.TranslatedBooleanMessage.Builder getBooleanMessageBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getBooleanMessageFieldBuilder().getBuilder(); + return getTranslatedMessageFieldBuilder().getBuilder(); } /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public openxc.Openxc.TranslatedBooleanMessageOrBuilder getBooleanMessageOrBuilder() { - if (booleanMessageBuilder_ != null) { - return booleanMessageBuilder_.getMessageOrBuilder(); + public openxc.Openxc.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { + if (translatedMessageBuilder_ != null) { + return translatedMessageBuilder_.getMessageOrBuilder(); } else { - return booleanMessage_; + return translatedMessage_; } } /** - * optional .openxc.TranslatedBooleanMessage boolean_message = 5; + * optional .openxc.TranslatedMessage translated_message = 3; */ private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedBooleanMessage, openxc.Openxc.TranslatedBooleanMessage.Builder, openxc.Openxc.TranslatedBooleanMessageOrBuilder> - getBooleanMessageFieldBuilder() { - if (booleanMessageBuilder_ == null) { - booleanMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedBooleanMessage, openxc.Openxc.TranslatedBooleanMessage.Builder, openxc.Openxc.TranslatedBooleanMessageOrBuilder>( - booleanMessage_, + openxc.Openxc.TranslatedMessage, openxc.Openxc.TranslatedMessage.Builder, openxc.Openxc.TranslatedMessageOrBuilder> + getTranslatedMessageFieldBuilder() { + if (translatedMessageBuilder_ == null) { + translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + openxc.Openxc.TranslatedMessage, openxc.Openxc.TranslatedMessage.Builder, openxc.Openxc.TranslatedMessageOrBuilder>( + translatedMessage_, getParentForChildren(), isClean()); - booleanMessage_ = null; + translatedMessage_ = null; } - return booleanMessageBuilder_; + return translatedMessageBuilder_; } // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) @@ -1839,7 +1437,7 @@ public final class Openxc { // @@protoc_insertion_point(class_scope:openxc.RawMessage) } - public interface TranslatedStringMessageOrBuilder + public interface TranslatedMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string name = 1; @@ -1857,40 +1455,95 @@ public final class Openxc { com.google.protobuf.ByteString getNameBytes(); - // optional string value = 2; + // optional string string_value = 2; + /** + * optional string string_value = 2; + */ + boolean hasStringValue(); + /** + * optional string string_value = 2; + */ + java.lang.String getStringValue(); + /** + * optional string string_value = 2; + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + // optional double numerical_value = 3; + /** + * optional double numerical_value = 3; + */ + boolean hasNumericalValue(); + /** + * optional double numerical_value = 3; + */ + double getNumericalValue(); + + // optional bool boolean_value = 4; /** - * optional string value = 2; + * optional bool boolean_value = 4; */ - boolean hasValue(); + boolean hasBooleanValue(); /** - * optional string value = 2; + * optional bool boolean_value = 4; */ - java.lang.String getValue(); + boolean getBooleanValue(); + + // optional string string_event = 5; + /** + * optional string string_event = 5; + */ + boolean hasStringEvent(); + /** + * optional string string_event = 5; + */ + java.lang.String getStringEvent(); /** - * optional string value = 2; + * optional string string_event = 5; */ com.google.protobuf.ByteString - getValueBytes(); + getStringEventBytes(); + + // optional double numerical_event = 6; + /** + * optional double numerical_event = 6; + */ + boolean hasNumericalEvent(); + /** + * optional double numerical_event = 6; + */ + double getNumericalEvent(); + + // optional bool boolean_event = 7; + /** + * optional bool boolean_event = 7; + */ + boolean hasBooleanEvent(); + /** + * optional bool boolean_event = 7; + */ + boolean getBooleanEvent(); } /** - * Protobuf type {@code openxc.TranslatedStringMessage} + * Protobuf type {@code openxc.TranslatedMessage} */ - public static final class TranslatedStringMessage extends + public static final class TranslatedMessage extends com.google.protobuf.GeneratedMessage - implements TranslatedStringMessageOrBuilder { - // Use TranslatedStringMessage.newBuilder() to construct. - private TranslatedStringMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements TranslatedMessageOrBuilder { + // Use TranslatedMessage.newBuilder() to construct. + private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private TranslatedStringMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final TranslatedStringMessage defaultInstance; - public static TranslatedStringMessage getDefaultInstance() { + private static final TranslatedMessage defaultInstance; + public static TranslatedMessage getDefaultInstance() { return defaultInstance; } - public TranslatedStringMessage getDefaultInstanceForType() { + public TranslatedMessage getDefaultInstanceForType() { return defaultInstance; } @@ -1900,7 +1553,7 @@ public final class Openxc { getUnknownFields() { return this.unknownFields; } - private TranslatedStringMessage( + private TranslatedMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1930,7 +1583,32 @@ public final class Openxc { } case 18: { bitField0_ |= 0x00000002; - value_ = input.readBytes(); + stringValue_ = input.readBytes(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + numericalValue_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + booleanValue_ = input.readBool(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + stringEvent_ = input.readBytes(); + break; + } + case 49: { + bitField0_ |= 0x00000020; + numericalEvent_ = input.readDouble(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + booleanEvent_ = input.readBool(); break; } } @@ -1947,28 +1625,28 @@ public final class Openxc { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_descriptor; + return openxc.Openxc.internal_static_openxc_TranslatedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_fieldAccessorTable + return openxc.Openxc.internal_static_openxc_TranslatedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedStringMessage.class, openxc.Openxc.TranslatedStringMessage.Builder.class); + openxc.Openxc.TranslatedMessage.class, openxc.Openxc.TranslatedMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TranslatedStringMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TranslatedMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslatedStringMessage(input, extensionRegistry); + return new TranslatedMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @@ -2016,20 +1694,20 @@ public final class Openxc { } } - // optional string value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; + // optional string string_value = 2; + public static final int STRING_VALUE_FIELD_NUMBER = 2; + private java.lang.Object stringValue_; /** - * optional string value = 2; + * optional string string_value = 2; */ - public boolean hasValue() { + public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string value = 2; + * optional string string_value = 2; */ - public java.lang.String getValue() { - java.lang.Object ref = value_; + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -2037,1130 +1715,74 @@ public final class Openxc { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - value_ = s; + stringValue_ = s; } return s; } } /** - * optional string value = 2; + * optional string string_value = 2; */ public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; + getStringValueBytes() { + java.lang.Object ref = stringValue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - value_ = b; + stringValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - private void initFields() { - name_ = ""; - value_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getValueBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static openxc.Openxc.TranslatedStringMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.TranslatedStringMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.TranslatedStringMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.TranslatedStringMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.TranslatedStringMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.TranslatedStringMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static openxc.Openxc.TranslatedStringMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static openxc.Openxc.TranslatedStringMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static openxc.Openxc.TranslatedStringMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.TranslatedStringMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(openxc.Openxc.TranslatedStringMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.TranslatedStringMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements openxc.Openxc.TranslatedStringMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedStringMessage.class, openxc.Openxc.TranslatedStringMessage.Builder.class); - } - - // Construct using openxc.Openxc.TranslatedStringMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return openxc.Openxc.internal_static_openxc_TranslatedStringMessage_descriptor; - } - - public openxc.Openxc.TranslatedStringMessage getDefaultInstanceForType() { - return openxc.Openxc.TranslatedStringMessage.getDefaultInstance(); - } - - public openxc.Openxc.TranslatedStringMessage build() { - openxc.Openxc.TranslatedStringMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public openxc.Openxc.TranslatedStringMessage buildPartial() { - openxc.Openxc.TranslatedStringMessage result = new openxc.Openxc.TranslatedStringMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof openxc.Openxc.TranslatedStringMessage) { - return mergeFrom((openxc.Openxc.TranslatedStringMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(openxc.Openxc.TranslatedStringMessage other) { - if (other == openxc.Openxc.TranslatedStringMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - bitField0_ |= 0x00000002; - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - openxc.Openxc.TranslatedStringMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (openxc.Openxc.TranslatedStringMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string name = 1; - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - // optional string value = 2; - private java.lang.Object value_ = ""; - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string value = 2; - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string value = 2; - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - /** - * optional string value = 2; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * optional string value = 2; - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.TranslatedStringMessage) - } - - static { - defaultInstance = new TranslatedStringMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.TranslatedStringMessage) - } - - public interface TranslatedNumericMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional double value = 2; - /** - * optional double value = 2; - */ - boolean hasValue(); - /** - * optional double value = 2; - */ - double getValue(); - } - /** - * Protobuf type {@code openxc.TranslatedNumericMessage} - */ - public static final class TranslatedNumericMessage extends - com.google.protobuf.GeneratedMessage - implements TranslatedNumericMessageOrBuilder { - // Use TranslatedNumericMessage.newBuilder() to construct. - private TranslatedNumericMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TranslatedNumericMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TranslatedNumericMessage defaultInstance; - public static TranslatedNumericMessage getDefaultInstance() { - return defaultInstance; - } - - public TranslatedNumericMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TranslatedNumericMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 17: { - bitField0_ |= 0x00000002; - value_ = input.readDouble(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedNumericMessage.class, openxc.Openxc.TranslatedNumericMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TranslatedNumericMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslatedNumericMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional double value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private double value_; - /** - * optional double value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional double value = 2; - */ - public double getValue() { - return value_; - } - - private void initFields() { - name_ = ""; - value_ = 0D; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeDouble(2, value_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static openxc.Openxc.TranslatedNumericMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.TranslatedNumericMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.TranslatedNumericMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.TranslatedNumericMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.TranslatedNumericMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.TranslatedNumericMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static openxc.Openxc.TranslatedNumericMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static openxc.Openxc.TranslatedNumericMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static openxc.Openxc.TranslatedNumericMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.TranslatedNumericMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(openxc.Openxc.TranslatedNumericMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.TranslatedNumericMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements openxc.Openxc.TranslatedNumericMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedNumericMessage.class, openxc.Openxc.TranslatedNumericMessage.Builder.class); - } - - // Construct using openxc.Openxc.TranslatedNumericMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = 0D; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return openxc.Openxc.internal_static_openxc_TranslatedNumericMessage_descriptor; - } - - public openxc.Openxc.TranslatedNumericMessage getDefaultInstanceForType() { - return openxc.Openxc.TranslatedNumericMessage.getDefaultInstance(); - } - - public openxc.Openxc.TranslatedNumericMessage build() { - openxc.Openxc.TranslatedNumericMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public openxc.Openxc.TranslatedNumericMessage buildPartial() { - openxc.Openxc.TranslatedNumericMessage result = new openxc.Openxc.TranslatedNumericMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof openxc.Openxc.TranslatedNumericMessage) { - return mergeFrom((openxc.Openxc.TranslatedNumericMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(openxc.Openxc.TranslatedNumericMessage other) { - if (other == openxc.Openxc.TranslatedNumericMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - setValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - openxc.Openxc.TranslatedNumericMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (openxc.Openxc.TranslatedNumericMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string name = 1; - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - // optional double value = 2; - private double value_ ; - /** - * optional double value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional double value = 2; - */ - public double getValue() { - return value_; - } - /** - * optional double value = 2; - */ - public Builder setValue(double value) { - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - /** - * optional double value = 2; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.TranslatedNumericMessage) - } - - static { - defaultInstance = new TranslatedNumericMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.TranslatedNumericMessage) - } - - public interface TranslatedBooleanMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional bool value = 2; - /** - * optional bool value = 2; - */ - boolean hasValue(); + // optional double numerical_value = 3; + public static final int NUMERICAL_VALUE_FIELD_NUMBER = 3; + private double numericalValue_; /** - * optional bool value = 2; + * optional double numerical_value = 3; */ - boolean getValue(); - } - /** - * Protobuf type {@code openxc.TranslatedBooleanMessage} - */ - public static final class TranslatedBooleanMessage extends - com.google.protobuf.GeneratedMessage - implements TranslatedBooleanMessageOrBuilder { - // Use TranslatedBooleanMessage.newBuilder() to construct. - private TranslatedBooleanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TranslatedBooleanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TranslatedBooleanMessage defaultInstance; - public static TranslatedBooleanMessage getDefaultInstance() { - return defaultInstance; - } - - public TranslatedBooleanMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TranslatedBooleanMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - value_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + public boolean hasNumericalValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_descriptor; + /** + * optional double numerical_value = 3; + */ + public double getNumericalValue() { + return numericalValue_; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedBooleanMessage.class, openxc.Openxc.TranslatedBooleanMessage.Builder.class); + // optional bool boolean_value = 4; + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; + private boolean booleanValue_; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TranslatedBooleanMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslatedBooleanMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; } - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; + // optional string string_event = 5; + public static final int STRING_EVENT_FIELD_NUMBER = 5; + private java.lang.Object stringEvent_; /** - * optional string name = 1; + * optional string string_event = 5; */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public boolean hasStringEvent() { + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string name = 1; + * optional string string_event = 5; */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getStringEvent() { + java.lang.Object ref = stringEvent_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3168,47 +1790,68 @@ public final class Openxc { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - name_ = s; + stringEvent_ = s; } return s; } } /** - * optional string name = 1; + * optional string string_event = 5; */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getStringEventBytes() { + java.lang.Object ref = stringEvent_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + stringEvent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // optional bool value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private boolean value_; + // optional double numerical_event = 6; + public static final int NUMERICAL_EVENT_FIELD_NUMBER = 6; + private double numericalEvent_; /** - * optional bool value = 2; + * optional double numerical_event = 6; */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public boolean hasNumericalEvent() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional double numerical_event = 6; + */ + public double getNumericalEvent() { + return numericalEvent_; + } + + // optional bool boolean_event = 7; + public static final int BOOLEAN_EVENT_FIELD_NUMBER = 7; + private boolean booleanEvent_; + /** + * optional bool boolean_event = 7; + */ + public boolean hasBooleanEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional bool value = 2; + * optional bool boolean_event = 7; */ - public boolean getValue() { - return value_; + public boolean getBooleanEvent() { + return booleanEvent_; } private void initFields() { name_ = ""; - value_ = false; + stringValue_ = ""; + numericalValue_ = 0D; + booleanValue_ = false; + stringEvent_ = ""; + numericalEvent_ = 0D; + booleanEvent_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3226,7 +1869,22 @@ public final class Openxc { output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, value_); + output.writeBytes(2, getStringValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, numericalValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, booleanValue_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getStringEventBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeDouble(6, numericalEvent_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBool(7, booleanEvent_); } getUnknownFields().writeTo(output); } @@ -3243,7 +1901,27 @@ public final class Openxc { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, value_); + .computeBytesSize(2, getStringValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, numericalValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, booleanValue_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getStringEventBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, numericalEvent_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, booleanEvent_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3257,53 +1935,53 @@ public final class Openxc { return super.writeReplace(); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + public static openxc.Openxc.TranslatedMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + public static openxc.Openxc.TranslatedMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom(byte[] data) + public static openxc.Openxc.TranslatedMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + public static openxc.Openxc.TranslatedMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom(java.io.InputStream input) + public static openxc.Openxc.TranslatedMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + public static openxc.Openxc.TranslatedMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static openxc.Openxc.TranslatedBooleanMessage parseDelimitedFrom(java.io.InputStream input) + public static openxc.Openxc.TranslatedMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static openxc.Openxc.TranslatedBooleanMessage parseDelimitedFrom( + public static openxc.Openxc.TranslatedMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + public static openxc.Openxc.TranslatedMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static openxc.Openxc.TranslatedBooleanMessage parseFrom( + public static openxc.Openxc.TranslatedMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3312,7 +1990,7 @@ public final class Openxc { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(openxc.Openxc.TranslatedBooleanMessage prototype) { + public static Builder newBuilder(openxc.Openxc.TranslatedMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -3324,24 +2002,24 @@ public final class Openxc { return builder; } /** - * Protobuf type {@code openxc.TranslatedBooleanMessage} + * Protobuf type {@code openxc.TranslatedMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements openxc.Openxc.TranslatedBooleanMessageOrBuilder { + implements openxc.Openxc.TranslatedMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_descriptor; + return openxc.Openxc.internal_static_openxc_TranslatedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable + return openxc.Openxc.internal_static_openxc_TranslatedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedBooleanMessage.class, openxc.Openxc.TranslatedBooleanMessage.Builder.class); + openxc.Openxc.TranslatedMessage.class, openxc.Openxc.TranslatedMessage.Builder.class); } - // Construct using openxc.Openxc.TranslatedBooleanMessage.newBuilder() + // Construct using openxc.Openxc.TranslatedMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3363,8 +2041,18 @@ public final class Openxc { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - value_ = false; + stringValue_ = ""; bitField0_ = (bitField0_ & ~0x00000002); + numericalValue_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + booleanValue_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + stringEvent_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + numericalEvent_ = 0D; + bitField0_ = (bitField0_ & ~0x00000020); + booleanEvent_ = false; + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -3374,23 +2062,23 @@ public final class Openxc { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return openxc.Openxc.internal_static_openxc_TranslatedBooleanMessage_descriptor; + return openxc.Openxc.internal_static_openxc_TranslatedMessage_descriptor; } - public openxc.Openxc.TranslatedBooleanMessage getDefaultInstanceForType() { - return openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance(); + public openxc.Openxc.TranslatedMessage getDefaultInstanceForType() { + return openxc.Openxc.TranslatedMessage.getDefaultInstance(); } - public openxc.Openxc.TranslatedBooleanMessage build() { - openxc.Openxc.TranslatedBooleanMessage result = buildPartial(); + public openxc.Openxc.TranslatedMessage build() { + openxc.Openxc.TranslatedMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public openxc.Openxc.TranslatedBooleanMessage buildPartial() { - openxc.Openxc.TranslatedBooleanMessage result = new openxc.Openxc.TranslatedBooleanMessage(this); + public openxc.Openxc.TranslatedMessage buildPartial() { + openxc.Openxc.TranslatedMessage result = new openxc.Openxc.TranslatedMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -3400,30 +2088,69 @@ public final class Openxc { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.value_ = value_; + result.stringValue_ = stringValue_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.numericalValue_ = numericalValue_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.booleanValue_ = booleanValue_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.stringEvent_ = stringEvent_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.numericalEvent_ = numericalEvent_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.booleanEvent_ = booleanEvent_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof openxc.Openxc.TranslatedBooleanMessage) { - return mergeFrom((openxc.Openxc.TranslatedBooleanMessage)other); + if (other instanceof openxc.Openxc.TranslatedMessage) { + return mergeFrom((openxc.Openxc.TranslatedMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(openxc.Openxc.TranslatedBooleanMessage other) { - if (other == openxc.Openxc.TranslatedBooleanMessage.getDefaultInstance()) return this; + public Builder mergeFrom(openxc.Openxc.TranslatedMessage other) { + if (other == openxc.Openxc.TranslatedMessage.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } - if (other.hasValue()) { - setValue(other.getValue()); + if (other.hasStringValue()) { + bitField0_ |= 0x00000002; + stringValue_ = other.stringValue_; + onChanged(); + } + if (other.hasNumericalValue()) { + setNumericalValue(other.getNumericalValue()); + } + if (other.hasBooleanValue()) { + setBooleanValue(other.getBooleanValue()); + } + if (other.hasStringEvent()) { + bitField0_ |= 0x00000010; + stringEvent_ = other.stringEvent_; + onChanged(); + } + if (other.hasNumericalEvent()) { + setNumericalEvent(other.getNumericalEvent()); + } + if (other.hasBooleanEvent()) { + setBooleanEvent(other.getBooleanEvent()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -3437,11 +2164,11 @@ public final class Openxc { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - openxc.Openxc.TranslatedBooleanMessage parsedMessage = null; + openxc.Openxc.TranslatedMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (openxc.Openxc.TranslatedBooleanMessage) e.getUnfinishedMessage(); + parsedMessage = (openxc.Openxc.TranslatedMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -3526,48 +2253,295 @@ public final class Openxc { return this; } - // optional bool value = 2; - private boolean value_ ; + // optional string string_value = 2; + private java.lang.Object stringValue_ = ""; /** - * optional bool value = 2; + * optional string string_value = 2; */ - public boolean hasValue() { + public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool value = 2; + * optional string string_value = 2; */ - public boolean getValue() { - return value_; + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stringValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional bool value = 2; + * optional string string_value = 2; */ - public Builder setValue(boolean value) { - bitField0_ |= 0x00000002; - value_ = value; + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string string_value = 2; + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + stringValue_ = value; onChanged(); return this; } /** - * optional bool value = 2; + * optional string string_value = 2; */ - public Builder clearValue() { + public Builder clearStringValue() { bitField0_ = (bitField0_ & ~0x00000002); - value_ = false; + stringValue_ = getDefaultInstance().getStringValue(); + onChanged(); + return this; + } + /** + * optional string string_value = 2; + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + stringValue_ = value; + onChanged(); + return this; + } + + // optional double numerical_value = 3; + private double numericalValue_ ; + /** + * optional double numerical_value = 3; + */ + public boolean hasNumericalValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional double numerical_value = 3; + */ + public double getNumericalValue() { + return numericalValue_; + } + /** + * optional double numerical_value = 3; + */ + public Builder setNumericalValue(double value) { + bitField0_ |= 0x00000004; + numericalValue_ = value; + onChanged(); + return this; + } + /** + * optional double numerical_value = 3; + */ + public Builder clearNumericalValue() { + bitField0_ = (bitField0_ & ~0x00000004); + numericalValue_ = 0D; + onChanged(); + return this; + } + + // optional bool boolean_value = 4; + private boolean booleanValue_ ; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; + } + /** + * optional bool boolean_value = 4; + */ + public Builder setBooleanValue(boolean value) { + bitField0_ |= 0x00000008; + booleanValue_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_value = 4; + */ + public Builder clearBooleanValue() { + bitField0_ = (bitField0_ & ~0x00000008); + booleanValue_ = false; + onChanged(); + return this; + } + + // optional string string_event = 5; + private java.lang.Object stringEvent_ = ""; + /** + * optional string string_event = 5; + */ + public boolean hasStringEvent() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string string_event = 5; + */ + public java.lang.String getStringEvent() { + java.lang.Object ref = stringEvent_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stringEvent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string string_event = 5; + */ + public com.google.protobuf.ByteString + getStringEventBytes() { + java.lang.Object ref = stringEvent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringEvent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string string_event = 5; + */ + public Builder setStringEvent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + stringEvent_ = value; + onChanged(); + return this; + } + /** + * optional string string_event = 5; + */ + public Builder clearStringEvent() { + bitField0_ = (bitField0_ & ~0x00000010); + stringEvent_ = getDefaultInstance().getStringEvent(); + onChanged(); + return this; + } + /** + * optional string string_event = 5; + */ + public Builder setStringEventBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + stringEvent_ = value; + onChanged(); + return this; + } + + // optional double numerical_event = 6; + private double numericalEvent_ ; + /** + * optional double numerical_event = 6; + */ + public boolean hasNumericalEvent() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional double numerical_event = 6; + */ + public double getNumericalEvent() { + return numericalEvent_; + } + /** + * optional double numerical_event = 6; + */ + public Builder setNumericalEvent(double value) { + bitField0_ |= 0x00000020; + numericalEvent_ = value; + onChanged(); + return this; + } + /** + * optional double numerical_event = 6; + */ + public Builder clearNumericalEvent() { + bitField0_ = (bitField0_ & ~0x00000020); + numericalEvent_ = 0D; + onChanged(); + return this; + } + + // optional bool boolean_event = 7; + private boolean booleanEvent_ ; + /** + * optional bool boolean_event = 7; + */ + public boolean hasBooleanEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool boolean_event = 7; + */ + public boolean getBooleanEvent() { + return booleanEvent_; + } + /** + * optional bool boolean_event = 7; + */ + public Builder setBooleanEvent(boolean value) { + bitField0_ |= 0x00000040; + booleanEvent_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_event = 7; + */ + public Builder clearBooleanEvent() { + bitField0_ = (bitField0_ & ~0x00000040); + booleanEvent_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.TranslatedBooleanMessage) + // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) } static { - defaultInstance = new TranslatedBooleanMessage(true); + defaultInstance = new TranslatedMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.TranslatedBooleanMessage) + // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) } private static com.google.protobuf.Descriptors.Descriptor @@ -3581,20 +2555,10 @@ public final class Openxc { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_RawMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_TranslatedStringMessage_descriptor; + internal_static_openxc_TranslatedMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_TranslatedStringMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_TranslatedNumericMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_TranslatedBooleanMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable; + internal_static_openxc_TranslatedMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -3604,21 +2568,18 @@ public final class Openxc { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\305\002\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\274\001\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\0227\n\016string_message\030\003 \001(\0132\037.openxc.T" + - "ranslatedStringMessage\022;\n\021numerical_mess" + - "age\030\004 \001(\0132 .openxc.TranslatedNumericMess" + - "age\0229\n\017boolean_message\030\005 \001(\0132 .openxc.Tr" + - "anslatedBooleanMessage\".\n\004Type\022\007\n\003RAW\020\001\022" + - "\n\n\006STRING\020\002\022\007\n\003NUM\020\003\022\010\n\004BOOL\020\004\";\n\nRawMes" + - "sage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n", - "\004data\030\003 \001(\022\"6\n\027TranslatedStringMessage\022\014" + - "\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"7\n\030Translate" + - "dNumericMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002" + - " \001(\001\"7\n\030TranslatedBooleanMessage\022\014\n\004name" + - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\010" + "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" + + "xc.TranslatedMessage\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + + "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + + "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\022\"\255\001\n\021T" + + "ranslatedMessage\022\014\n\004name\030\001 \001(\t\022\024\n\014string" + + "_value\030\002 \001(\t\022\027\n\017numerical_value\030\003 \001(\001\022\025\n" + + "\rboolean_value\030\004 \001(\010\022\024\n\014string_event\030\005 \001", + "(\t\022\027\n\017numerical_event\030\006 \001(\001\022\025\n\rboolean_e" + + "vent\030\007 \001(\010" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -3630,31 +2591,19 @@ public final class Openxc { internal_static_openxc_VehicleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_VehicleMessage_descriptor, - new java.lang.String[] { "Type", "RawMessage", "StringMessage", "NumericalMessage", "BooleanMessage", }); + new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", }); internal_static_openxc_RawMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, new java.lang.String[] { "Bus", "MessageId", "Data", }); - internal_static_openxc_TranslatedStringMessage_descriptor = + internal_static_openxc_TranslatedMessage_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_openxc_TranslatedStringMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_TranslatedStringMessage_descriptor, - new java.lang.String[] { "Name", "Value", }); - internal_static_openxc_TranslatedNumericMessage_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_openxc_TranslatedNumericMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_TranslatedNumericMessage_descriptor, - new java.lang.String[] { "Name", "Value", }); - internal_static_openxc_TranslatedBooleanMessage_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_openxc_TranslatedBooleanMessage_fieldAccessorTable = new + internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_TranslatedBooleanMessage_descriptor, - new java.lang.String[] { "Name", "Value", }); + internal_static_openxc_TranslatedMessage_descriptor, + new java.lang.String[] { "Name", "StringValue", "NumericalValue", "BooleanValue", "StringEvent", "NumericalEvent", "BooleanEvent", }); return null; } }; diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index ad379eb3..e4c48fb6 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\"\xc5\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\x37\n\x0estring_message\x18\x03 \x01(\x0b\x32\x1f.openxc.TranslatedStringMessage\x12;\n\x11numerical_message\x18\x04 \x01(\x0b\x32 .openxc.TranslatedNumericMessage\x12\x39\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32 .openxc.TranslatedBooleanMessage\".\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x07\n\x03NUM\x10\x03\x12\x08\n\x04\x42OOL\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(\x12\"6\n\x17TranslatedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"7\n\x18TranslatedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"7\n\x18TranslatedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08') + 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(\x12\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08') @@ -28,22 +28,14 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( options=None, type=None), _descriptor.EnumValueDescriptor( - name='STRING', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NUM', index=2, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BOOL', index=3, number=4, + name='TRANSLATED', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=304, - serialized_end=350, + serialized_start=182, + serialized_end=213, ) @@ -69,26 +61,12 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='string_message', full_name='openxc.VehicleMessage.string_message', index=2, + name='translated_message', full_name='openxc.VehicleMessage.translated_message', index=2, number=3, 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), - _descriptor.FieldDescriptor( - name='numerical_message', full_name='openxc.VehicleMessage.numerical_message', index=3, - number=4, 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), - _descriptor.FieldDescriptor( - name='boolean_message', full_name='openxc.VehicleMessage.boolean_message', 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=[ ], @@ -100,7 +78,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=350, + serialized_end=213, ) @@ -141,98 +119,63 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=352, - serialized_end=411, + serialized_start=215, + serialized_end=274, ) -_TRANSLATEDSTRINGMESSAGE = _descriptor.Descriptor( - name='TranslatedStringMessage', - full_name='openxc.TranslatedStringMessage', +_TRANSLATEDMESSAGE = _descriptor.Descriptor( + name='TranslatedMessage', + full_name='openxc.TranslatedMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedStringMessage.name', index=0, + name='name', full_name='openxc.TranslatedMessage.name', index=0, number=1, 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, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.TranslatedStringMessage.value', index=1, + name='string_value', full_name='openxc.TranslatedMessage.string_value', index=1, number=2, 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, options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=413, - serialized_end=467, -) - - -_TRANSLATEDNUMERICMESSAGE = _descriptor.Descriptor( - name='TranslatedNumericMessage', - full_name='openxc.TranslatedNumericMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedNumericMessage.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + name='numerical_value', full_name='openxc.TranslatedMessage.numerical_value', index=2, + number=3, 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='value', full_name='openxc.TranslatedNumericMessage.value', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + name='boolean_value', full_name='openxc.TranslatedMessage.boolean_value', index=3, + number=4, 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), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=469, - serialized_end=524, -) - - -_TRANSLATEDBOOLEANMESSAGE = _descriptor.Descriptor( - name='TranslatedBooleanMessage', - full_name='openxc.TranslatedBooleanMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedBooleanMessage.name', index=0, - number=1, type=9, cpp_type=9, label=1, + name='string_event', full_name='openxc.TranslatedMessage.string_event', index=4, + number=5, 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, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.TranslatedBooleanMessage.value', index=1, - number=2, type=8, cpp_type=7, label=1, + name='numerical_event', full_name='openxc.TranslatedMessage.numerical_event', index=5, + number=6, 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='boolean_event', full_name='openxc.TranslatedMessage.boolean_event', index=6, + number=7, 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, @@ -246,21 +189,17 @@ _TRANSLATEDBOOLEANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=526, - serialized_end=581, + serialized_start=277, + serialized_end=450, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE _VEHICLEMESSAGE.fields_by_name['raw_message'].message_type = _RAWMESSAGE -_VEHICLEMESSAGE.fields_by_name['string_message'].message_type = _TRANSLATEDSTRINGMESSAGE -_VEHICLEMESSAGE.fields_by_name['numerical_message'].message_type = _TRANSLATEDNUMERICMESSAGE -_VEHICLEMESSAGE.fields_by_name['boolean_message'].message_type = _TRANSLATEDBOOLEANMESSAGE +_VEHICLEMESSAGE.fields_by_name['translated_message'].message_type = _TRANSLATEDMESSAGE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE -DESCRIPTOR.message_types_by_name['TranslatedStringMessage'] = _TRANSLATEDSTRINGMESSAGE -DESCRIPTOR.message_types_by_name['TranslatedNumericMessage'] = _TRANSLATEDNUMERICMESSAGE -DESCRIPTOR.message_types_by_name['TranslatedBooleanMessage'] = _TRANSLATEDBOOLEANMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE class VehicleMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType @@ -274,23 +213,11 @@ class RawMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.RawMessage) -class TranslatedStringMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDSTRINGMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.TranslatedStringMessage) - -class TranslatedNumericMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDNUMERICMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.TranslatedNumericMessage) - -class TranslatedBooleanMessage(_message.Message): +class TranslatedMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDBOOLEANMESSAGE + DESCRIPTOR = _TRANSLATEDMESSAGE - # @@protoc_insertion_point(class_scope:openxc.TranslatedBooleanMessage) + # @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) # @@protoc_insertion_point(module_scope) diff --git a/openxc.options b/openxc.options index 3e2937ef..1863c0d3 100644 --- a/openxc.options +++ b/openxc.options @@ -1,2 +1,2 @@ # TODO this isn't working yet, so I'm defining it for everything in the Makefile -openxc_TranslatedNumericMessage.name max_size:100 +openxc_TranslatedMessage.name max_size:100 diff --git a/openxc.proto b/openxc.proto index 39130831..0748e75f 100644 --- a/openxc.proto +++ b/openxc.proto @@ -1,14 +1,12 @@ package openxc; message VehicleMessage { - enum Type { RAW = 1; STRING = 2; NUM = 3; BOOL = 4; } + enum Type { RAW = 1; TRANSLATED = 2; } optional Type type = 1; optional RawMessage raw_message = 2; - optional TranslatedStringMessage string_message = 3; - optional TranslatedNumericMessage numerical_message = 4; - optional TranslatedBooleanMessage boolean_message = 5; + optional TranslatedMessage translated_message = 3; } message RawMessage { @@ -17,20 +15,17 @@ message RawMessage { optional sint64 data = 3; } -message TranslatedStringMessage { +message TranslatedMessage { optional string name = 1; - optional string value = 2; -} -message TranslatedNumericMessage { - optional string name = 1; - optional double value = 2; -} + optional string string_value = 2; + optional double numerical_value = 3; + optional bool boolean_value = 4; -message TranslatedBooleanMessage { - optional string name = 1; - optional bool value = 2; + optional string string_event = 5; + optional double numerical_event = 6; + optional bool boolean_event = 7; } -// TODO we should also consider having an enum type, h aving each specific +// TODO we should also consider having an enum type, having each specific // message defined as a protobuf -- cgit 1.2.3-korg From c5f3b1fad0552f9f54970bfef25aa56c6795a8df Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 5 Oct 2013 16:08:56 -0400 Subject: Update benchmark tool for latest protobuf format. --- benchmark/proto/compare_sizes.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index 192716f4..5eee74cf 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -40,18 +40,14 @@ for trace_file in sys.argv[1:]: message.raw_message = binary_message total_raw_binary_size += len(message.SerializeToString()) else: + message.type = openxc_pb2.VehicleMessage.TRANSLATED + message.translated_message.name = json_message['name'] if isinstance(json_message['value'], bool): - message.type = openxc_pb2.VehicleMessage.BOOL - message.boolean_message.name = json_message['name'] - message.boolean_message.value = json_message['value'] + message.translated_message.boolean_value = json_message['value'] elif isinstance(json_message['value'], numbers.Number): - message.type = openxc_pb2.VehicleMessage.NUM - message.numerical_message.name = json_message['name'] - message.numerical_message.value = json_message['value'] + message.translated_message.numerical_value = json_message['value'] else: - message.type = openxc_pb2.VehicleMessage.STRING - message.string_message.name = json_message['name'] - message.string_message.value = json_message['value'] + message.translated_message.string_value = json_message['value'] total_translated_json_size += len(line) total_translated_binary_size += len(message.SerializeToString()) -- cgit 1.2.3-korg From b68150231d6f1a2608e2d33187e05d5d3bf4a5f1 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 5 Oct 2013 16:17:43 -0400 Subject: Remove timestamp from trace JSON before benchmarking - oops! The size savings is now about 35%, not 55%. --- benchmark/proto/compare_sizes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index 5eee74cf..f31a2e4b 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -26,13 +26,15 @@ for trace_file in sys.argv[1:]: except ValueError: continue + del json_message['timestamp'] + message = openxc_pb2.VehicleMessage() if 'id' and 'data' in json_message: # rough approx. that CAN messages are 10 bytes - they could be less # but most of ours are full 64+11 bits total_raw_can_size += 10 - total_raw_json_size += len(line) + total_raw_json_size += len(json.dumps(json_message)) binary_message = openxc_pb2.RawMessage() binary_message.message_id = json_message['id'] binary_message.data = int(json_message['data'], 0) @@ -48,7 +50,7 @@ for trace_file in sys.argv[1:]: message.translated_message.numerical_value = json_message['value'] else: message.translated_message.string_value = json_message['value'] - total_translated_json_size += len(line) + total_translated_json_size += len(json.dumps(json_message)) total_translated_binary_size += len(message.SerializeToString()) -- cgit 1.2.3-korg From 341e0fbd06aac57ecdec5fd4802bb5175c939e1b Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 5 Oct 2013 16:25:51 -0400 Subject: Switch raw data field to uint64 to fit all values and update benchmark. --- benchmark/proto/compare_sizes.py | 6 ++---- gen/cpp/openxc.pb | 2 +- gen/cpp/openxc.pb.c | 4 ++-- gen/cpp/openxc.pb.h | 4 ++-- gen/java/openxc/Openxc.java | 30 +++++++++++++++--------------- gen/python/openxc_pb2.py | 4 ++-- openxc.proto | 2 +- 7 files changed, 25 insertions(+), 27 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index f31a2e4b..e4ae6691 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -35,11 +35,9 @@ for trace_file in sys.argv[1:]: # but most of ours are full 64+11 bits total_raw_can_size += 10 total_raw_json_size += len(json.dumps(json_message)) - binary_message = openxc_pb2.RawMessage() - binary_message.message_id = json_message['id'] - binary_message.data = int(json_message['data'], 0) message.type = openxc_pb2.VehicleMessage.RAW - message.raw_message = binary_message + message.raw_message.message_id = json_message['id'] + message.raw_message.data = int(json_message['data'], 0) total_raw_binary_size += len(message.SerializeToString()) else: message.type = openxc_pb2.VehicleMessage.TRANSLATED diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 523fc767..27548ab6 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -14,7 +14,7 @@ RawMessage bus ( message_id (  -data ("­ +data ("­ TranslatedMessage name (  string_value (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index a49e1c07..5fb7d1cb 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.4-dev at Fri Oct 4 19:24:10 2013. */ +/* Generated by nanopb-0.2.4-dev at Sat Oct 5 16:25:23 2013. */ #include "openxc.pb.h" @@ -15,7 +15,7 @@ const pb_field_t openxc_VehicleMessage_fields[4] = { const pb_field_t openxc_RawMessage_fields[4] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD2( 3, SINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), + PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 8528e654..f4ec09c5 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.4-dev at Fri Oct 4 19:24:10 2013. */ +/* Generated by nanopb-0.2.4-dev at Sat Oct 5 16:25:23 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -22,7 +22,7 @@ typedef struct _openxc_RawMessage { bool has_message_id; uint32_t message_id; bool has_data; - int64_t data; + uint64_t data; } openxc_RawMessage; typedef struct _openxc_TranslatedMessage { diff --git a/gen/java/openxc/Openxc.java b/gen/java/openxc/Openxc.java index 93a4d05f..3e1ceba7 100644 --- a/gen/java/openxc/Openxc.java +++ b/gen/java/openxc/Openxc.java @@ -902,13 +902,13 @@ public final class Openxc { */ int getMessageId(); - // optional sint64 data = 3; + // optional uint64 data = 3; /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ boolean hasData(); /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ long getData(); } @@ -975,7 +975,7 @@ public final class Openxc { } case 24: { bitField0_ |= 0x00000004; - data_ = input.readSInt64(); + data_ = input.readUInt64(); break; } } @@ -1050,17 +1050,17 @@ public final class Openxc { return messageId_; } - // optional sint64 data = 3; + // optional uint64 data = 3; public static final int DATA_FIELD_NUMBER = 3; private long data_; /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ public long getData() { return data_; @@ -1090,7 +1090,7 @@ public final class Openxc { output.writeUInt32(2, messageId_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt64(3, data_); + output.writeUInt64(3, data_); } getUnknownFields().writeTo(output); } @@ -1111,7 +1111,7 @@ public final class Openxc { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(3, data_); + .computeUInt64Size(3, data_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1393,22 +1393,22 @@ public final class Openxc { return this; } - // optional sint64 data = 3; + // optional uint64 data = 3; private long data_ ; /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ public long getData() { return data_; } /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ public Builder setData(long value) { bitField0_ |= 0x00000004; @@ -1417,7 +1417,7 @@ public final class Openxc { return this; } /** - * optional sint64 data = 3; + * optional uint64 data = 3; */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000004); @@ -2574,7 +2574,7 @@ public final class Openxc { "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" + "xc.TranslatedMessage\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + - "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\022\"\255\001\n\021T" + + "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\255\001\n\021T" + "ranslatedMessage\022\014\n\004name\030\001 \001(\t\022\024\n\014string" + "_value\030\002 \001(\t\022\027\n\017numerical_value\030\003 \001(\001\022\025\n" + "\rboolean_value\030\004 \001(\010\022\024\n\014string_event\030\005 \001", diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index e4c48fb6..63edf332 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\"\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(\x12\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08') + 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\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08') @@ -105,7 +105,7 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None), _descriptor.FieldDescriptor( name='data', full_name='openxc.RawMessage.data', index=2, - number=3, type=18, cpp_type=2, label=1, + number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, diff --git a/openxc.proto b/openxc.proto index 0748e75f..b3dd3bad 100644 --- a/openxc.proto +++ b/openxc.proto @@ -12,7 +12,7 @@ message VehicleMessage { message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; - optional sint64 data = 3; + optional uint64 data = 3; } message TranslatedMessage { -- cgit 1.2.3-korg From 4904749890b1f2570f9197da99a07a76471e8400 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 9 Oct 2013 14:29:00 -0400 Subject: Fix package name of generated protobuf objects. --- gen/cpp/openxc.pb | 6 +- gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 2 +- gen/java/com/openxc/BinaryMessages.java | 2617 +++++++++++++++++++++++++++++++ gen/java/openxc/Openxc.java | 2617 ------------------------------- gen/python/openxc_pb2.py | 4 +- openxc.proto | 3 + 7 files changed, 2629 insertions(+), 2622 deletions(-) create mode 100644 gen/java/com/openxc/BinaryMessages.java delete mode 100644 gen/java/openxc/Openxc.java diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 27548ab6..d4356e1c 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Â +à openxc.protoopenxc"¼ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -22,4 +22,6 @@ message_id (  boolean_value ( string_event (  numerical_event ( - boolean_event ( \ No newline at end of file + boolean_event (B + +com.openxcBBinaryMessages \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 5fb7d1cb..91667bf3 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.4-dev at Sat Oct 5 16:25:23 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 9 14:26:13 2013. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index f4ec09c5..d278c681 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.4-dev at Sat Oct 5 16:25:23 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 9 14:26:13 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java new file mode 100644 index 00000000..7410c63e --- /dev/null +++ b/gen/java/com/openxc/BinaryMessages.java @@ -0,0 +1,2617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: openxc.proto + +package com.openxc; + +public final class BinaryMessages { + private BinaryMessages() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface VehicleMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.VehicleMessage.Type type = 1; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + boolean hasType(); + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + com.openxc.BinaryMessages.VehicleMessage.Type getType(); + + // optional .openxc.RawMessage raw_message = 2; + /** + * optional .openxc.RawMessage raw_message = 2; + */ + boolean hasRawMessage(); + /** + * optional .openxc.RawMessage raw_message = 2; + */ + com.openxc.BinaryMessages.RawMessage getRawMessage(); + /** + * optional .openxc.RawMessage raw_message = 2; + */ + com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder(); + + // optional .openxc.TranslatedMessage translated_message = 3; + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + boolean hasTranslatedMessage(); + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage(); + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); + } + /** + * Protobuf type {@code openxc.VehicleMessage} + */ + public static final class VehicleMessage extends + com.google.protobuf.GeneratedMessage + implements VehicleMessageOrBuilder { + // Use VehicleMessage.newBuilder() to construct. + private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final VehicleMessage defaultInstance; + public static VehicleMessage getDefaultInstance() { + return defaultInstance; + } + + public VehicleMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VehicleMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = rawMessage_.toBuilder(); + } + rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rawMessage_); + rawMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 26: { + com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = translatedMessage_.toBuilder(); + } + translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(translatedMessage_); + translatedMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public VehicleMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VehicleMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.VehicleMessage.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * RAW = 1; + */ + RAW(0, 1), + /** + * TRANSLATED = 2; + */ + TRANSLATED(1, 2), + ; + + /** + * RAW = 1; + */ + public static final int RAW_VALUE = 1; + /** + * TRANSLATED = 2; + */ + public static final int TRANSLATED_VALUE = 2; + + + public final int getNumber() { return value; } + + public static Type valueOf(int value) { + switch (value) { + case 1: return RAW; + case 2: return TRANSLATED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type) + } + + private int bitField0_; + // optional .openxc.VehicleMessage.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.VehicleMessage.Type type_; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public com.openxc.BinaryMessages.VehicleMessage.Type getType() { + return type_; + } + + // optional .openxc.RawMessage raw_message = 2; + public static final int RAW_MESSAGE_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.RawMessage rawMessage_; + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public boolean hasRawMessage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public com.openxc.BinaryMessages.RawMessage getRawMessage() { + return rawMessage_; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() { + return rawMessage_; + } + + // optional .openxc.TranslatedMessage translated_message = 3; + public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_; + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public boolean hasTranslatedMessage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { + return translatedMessage_; + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { + return translatedMessage_; + } + + private void initFields() { + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, rawMessage_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, translatedMessage_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rawMessage_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, translatedMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.VehicleMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.VehicleMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRawMessageFieldBuilder(); + getTranslatedMessageFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + bitField0_ = (bitField0_ & ~0x00000001); + if (rawMessageBuilder_ == null) { + rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + } else { + rawMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (translatedMessageBuilder_ == null) { + translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + } else { + translatedMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; + } + + public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.VehicleMessage build() { + com.openxc.BinaryMessages.VehicleMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.VehicleMessage buildPartial() { + com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (rawMessageBuilder_ == null) { + result.rawMessage_ = rawMessage_; + } else { + result.rawMessage_ = rawMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (translatedMessageBuilder_ == null) { + result.translatedMessage_ = translatedMessage_; + } else { + result.translatedMessage_ = translatedMessageBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.VehicleMessage) { + return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) { + if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasRawMessage()) { + mergeRawMessage(other.getRawMessage()); + } + if (other.hasTranslatedMessage()) { + mergeTranslatedMessage(other.getTranslatedMessage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.VehicleMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.VehicleMessage.Type type = 1; + private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public com.openxc.BinaryMessages.VehicleMessage.Type getType() { + return type_; + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + onChanged(); + return this; + } + + // optional .openxc.RawMessage raw_message = 2; + private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_; + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public boolean hasRawMessage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public com.openxc.BinaryMessages.RawMessage getRawMessage() { + if (rawMessageBuilder_ == null) { + return rawMessage_; + } else { + return rawMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) { + if (rawMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rawMessage_ = value; + onChanged(); + } else { + rawMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder setRawMessage( + com.openxc.BinaryMessages.RawMessage.Builder builderForValue) { + if (rawMessageBuilder_ == null) { + rawMessage_ = builderForValue.build(); + onChanged(); + } else { + rawMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) { + if (rawMessageBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) { + rawMessage_ = + com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial(); + } else { + rawMessage_ = value; + } + onChanged(); + } else { + rawMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public Builder clearRawMessage() { + if (rawMessageBuilder_ == null) { + rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + onChanged(); + } else { + rawMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRawMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() { + if (rawMessageBuilder_ != null) { + return rawMessageBuilder_.getMessageOrBuilder(); + } else { + return rawMessage_; + } + } + /** + * optional .openxc.RawMessage raw_message = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> + getRawMessageFieldBuilder() { + if (rawMessageBuilder_ == null) { + rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>( + rawMessage_, + getParentForChildren(), + isClean()); + rawMessage_ = null; + } + return rawMessageBuilder_; + } + + // optional .openxc.TranslatedMessage translated_message = 3; + private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_; + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public boolean hasTranslatedMessage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { + if (translatedMessageBuilder_ == null) { + return translatedMessage_; + } else { + return translatedMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { + if (translatedMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + translatedMessage_ = value; + onChanged(); + } else { + translatedMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public Builder setTranslatedMessage( + com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) { + if (translatedMessageBuilder_ == null) { + translatedMessage_ = builderForValue.build(); + onChanged(); + } else { + translatedMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { + if (translatedMessageBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) { + translatedMessage_ = + com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial(); + } else { + translatedMessage_ = value; + } + onChanged(); + } else { + translatedMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public Builder clearTranslatedMessage() { + if (translatedMessageBuilder_ == null) { + translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + onChanged(); + } else { + translatedMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTranslatedMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { + if (translatedMessageBuilder_ != null) { + return translatedMessageBuilder_.getMessageOrBuilder(); + } else { + return translatedMessage_; + } + } + /** + * optional .openxc.TranslatedMessage translated_message = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> + getTranslatedMessageFieldBuilder() { + if (translatedMessageBuilder_ == null) { + translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>( + translatedMessage_, + getParentForChildren(), + isClean()); + translatedMessage_ = null; + } + return translatedMessageBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) + } + + static { + defaultInstance = new VehicleMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) + } + + public interface RawMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional uint32 message_id = 2; + /** + * optional uint32 message_id = 2; + */ + boolean hasMessageId(); + /** + * optional uint32 message_id = 2; + */ + int getMessageId(); + + // optional uint64 data = 3; + /** + * optional uint64 data = 3; + */ + boolean hasData(); + /** + * optional uint64 data = 3; + */ + long getData(); + } + /** + * Protobuf type {@code openxc.RawMessage} + */ + public static final class RawMessage extends + com.google.protobuf.GeneratedMessage + implements RawMessageOrBuilder { + // Use RawMessage.newBuilder() to construct. + private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final RawMessage defaultInstance; + public static RawMessage getDefaultInstance() { + return defaultInstance; + } + + public RawMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RawMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + data_ = input.readUInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RawMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RawMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional uint32 message_id = 2; + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + private int messageId_; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + + // optional uint64 data = 3; + public static final int DATA_FIELD_NUMBER = 3; + private long data_; + /** + * optional uint64 data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint64 data = 3; + */ + public long getData() { + return data_; + } + + private void initFields() { + bus_ = 0; + messageId_ = 0; + data_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt64(3, data_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.RawMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.RawMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + messageId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + data_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + } + + public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.RawMessage build() { + com.openxc.BinaryMessages.RawMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.RawMessage buildPartial() { + com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.messageId_ = messageId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.data_ = data_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.RawMessage) { + return mergeFrom((com.openxc.BinaryMessages.RawMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) { + if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasMessageId()) { + setMessageId(other.getMessageId()); + } + if (other.hasData()) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.RawMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 bus = 1; + private int bus_ ; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + /** + * optional int32 bus = 1; + */ + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); + return this; + } + /** + * optional int32 bus = 1; + */ + public Builder clearBus() { + bitField0_ = (bitField0_ & ~0x00000001); + bus_ = 0; + onChanged(); + return this; + } + + // optional uint32 message_id = 2; + private int messageId_ ; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + /** + * optional uint32 message_id = 2; + */ + public Builder setMessageId(int value) { + bitField0_ |= 0x00000002; + messageId_ = value; + onChanged(); + return this; + } + /** + * optional uint32 message_id = 2; + */ + public Builder clearMessageId() { + bitField0_ = (bitField0_ & ~0x00000002); + messageId_ = 0; + onChanged(); + return this; + } + + // optional uint64 data = 3; + private long data_ ; + /** + * optional uint64 data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint64 data = 3; + */ + public long getData() { + return data_; + } + /** + * optional uint64 data = 3; + */ + public Builder setData(long value) { + bitField0_ |= 0x00000004; + data_ = value; + onChanged(); + return this; + } + /** + * optional uint64 data = 3; + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000004); + data_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.RawMessage) + } + + static { + defaultInstance = new RawMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.RawMessage) + } + + public interface TranslatedMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional string string_value = 2; + /** + * optional string string_value = 2; + */ + boolean hasStringValue(); + /** + * optional string string_value = 2; + */ + java.lang.String getStringValue(); + /** + * optional string string_value = 2; + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + // optional double numerical_value = 3; + /** + * optional double numerical_value = 3; + */ + boolean hasNumericalValue(); + /** + * optional double numerical_value = 3; + */ + double getNumericalValue(); + + // optional bool boolean_value = 4; + /** + * optional bool boolean_value = 4; + */ + boolean hasBooleanValue(); + /** + * optional bool boolean_value = 4; + */ + boolean getBooleanValue(); + + // optional string string_event = 5; + /** + * optional string string_event = 5; + */ + boolean hasStringEvent(); + /** + * optional string string_event = 5; + */ + java.lang.String getStringEvent(); + /** + * optional string string_event = 5; + */ + com.google.protobuf.ByteString + getStringEventBytes(); + + // optional double numerical_event = 6; + /** + * optional double numerical_event = 6; + */ + boolean hasNumericalEvent(); + /** + * optional double numerical_event = 6; + */ + double getNumericalEvent(); + + // optional bool boolean_event = 7; + /** + * optional bool boolean_event = 7; + */ + boolean hasBooleanEvent(); + /** + * optional bool boolean_event = 7; + */ + boolean getBooleanEvent(); + } + /** + * Protobuf type {@code openxc.TranslatedMessage} + */ + public static final class TranslatedMessage extends + com.google.protobuf.GeneratedMessage + implements TranslatedMessageOrBuilder { + // Use TranslatedMessage.newBuilder() to construct. + private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TranslatedMessage defaultInstance; + public static TranslatedMessage getDefaultInstance() { + return defaultInstance; + } + + public TranslatedMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TranslatedMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + stringValue_ = input.readBytes(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + numericalValue_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + booleanValue_ = input.readBool(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + stringEvent_ = input.readBytes(); + break; + } + case 49: { + bitField0_ |= 0x00000020; + numericalEvent_ = input.readDouble(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + booleanEvent_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TranslatedMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslatedMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string string_value = 2; + public static final int STRING_VALUE_FIELD_NUMBER = 2; + private java.lang.Object stringValue_; + /** + * optional string string_value = 2; + */ + public boolean hasStringValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string string_value = 2; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringValue_ = s; + } + return s; + } + } + /** + * optional string string_value = 2; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional double numerical_value = 3; + public static final int NUMERICAL_VALUE_FIELD_NUMBER = 3; + private double numericalValue_; + /** + * optional double numerical_value = 3; + */ + public boolean hasNumericalValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional double numerical_value = 3; + */ + public double getNumericalValue() { + return numericalValue_; + } + + // optional bool boolean_value = 4; + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; + private boolean booleanValue_; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; + } + + // optional string string_event = 5; + public static final int STRING_EVENT_FIELD_NUMBER = 5; + private java.lang.Object stringEvent_; + /** + * optional string string_event = 5; + */ + public boolean hasStringEvent() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string string_event = 5; + */ + public java.lang.String getStringEvent() { + java.lang.Object ref = stringEvent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringEvent_ = s; + } + return s; + } + } + /** + * optional string string_event = 5; + */ + public com.google.protobuf.ByteString + getStringEventBytes() { + java.lang.Object ref = stringEvent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringEvent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional double numerical_event = 6; + public static final int NUMERICAL_EVENT_FIELD_NUMBER = 6; + private double numericalEvent_; + /** + * optional double numerical_event = 6; + */ + public boolean hasNumericalEvent() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional double numerical_event = 6; + */ + public double getNumericalEvent() { + return numericalEvent_; + } + + // optional bool boolean_event = 7; + public static final int BOOLEAN_EVENT_FIELD_NUMBER = 7; + private boolean booleanEvent_; + /** + * optional bool boolean_event = 7; + */ + public boolean hasBooleanEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool boolean_event = 7; + */ + public boolean getBooleanEvent() { + return booleanEvent_; + } + + private void initFields() { + name_ = ""; + stringValue_ = ""; + numericalValue_ = 0D; + booleanValue_ = false; + stringEvent_ = ""; + numericalEvent_ = 0D; + booleanEvent_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getStringValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, numericalValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, booleanValue_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getStringEventBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeDouble(6, numericalEvent_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBool(7, booleanEvent_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getStringValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, numericalValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, booleanValue_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getStringEventBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, numericalEvent_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, booleanEvent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.TranslatedMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + stringValue_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + numericalValue_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + booleanValue_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + stringEvent_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + numericalEvent_ = 0D; + bitField0_ = (bitField0_ & ~0x00000020); + booleanEvent_ = false; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + } + + public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.TranslatedMessage build() { + com.openxc.BinaryMessages.TranslatedMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.TranslatedMessage buildPartial() { + com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.stringValue_ = stringValue_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.numericalValue_ = numericalValue_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.booleanValue_ = booleanValue_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.stringEvent_ = stringEvent_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.numericalEvent_ = numericalEvent_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.booleanEvent_ = booleanEvent_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) { + return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) { + if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasStringValue()) { + bitField0_ |= 0x00000002; + stringValue_ = other.stringValue_; + onChanged(); + } + if (other.hasNumericalValue()) { + setNumericalValue(other.getNumericalValue()); + } + if (other.hasBooleanValue()) { + setBooleanValue(other.getBooleanValue()); + } + if (other.hasStringEvent()) { + bitField0_ |= 0x00000010; + stringEvent_ = other.stringEvent_; + onChanged(); + } + if (other.hasNumericalEvent()) { + setNumericalEvent(other.getNumericalEvent()); + } + if (other.hasBooleanEvent()) { + setBooleanEvent(other.getBooleanEvent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional string string_value = 2; + private java.lang.Object stringValue_ = ""; + /** + * optional string string_value = 2; + */ + public boolean hasStringValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string string_value = 2; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stringValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string string_value = 2; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string string_value = 2; + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + stringValue_ = value; + onChanged(); + return this; + } + /** + * optional string string_value = 2; + */ + public Builder clearStringValue() { + bitField0_ = (bitField0_ & ~0x00000002); + stringValue_ = getDefaultInstance().getStringValue(); + onChanged(); + return this; + } + /** + * optional string string_value = 2; + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + stringValue_ = value; + onChanged(); + return this; + } + + // optional double numerical_value = 3; + private double numericalValue_ ; + /** + * optional double numerical_value = 3; + */ + public boolean hasNumericalValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional double numerical_value = 3; + */ + public double getNumericalValue() { + return numericalValue_; + } + /** + * optional double numerical_value = 3; + */ + public Builder setNumericalValue(double value) { + bitField0_ |= 0x00000004; + numericalValue_ = value; + onChanged(); + return this; + } + /** + * optional double numerical_value = 3; + */ + public Builder clearNumericalValue() { + bitField0_ = (bitField0_ & ~0x00000004); + numericalValue_ = 0D; + onChanged(); + return this; + } + + // optional bool boolean_value = 4; + private boolean booleanValue_ ; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; + } + /** + * optional bool boolean_value = 4; + */ + public Builder setBooleanValue(boolean value) { + bitField0_ |= 0x00000008; + booleanValue_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_value = 4; + */ + public Builder clearBooleanValue() { + bitField0_ = (bitField0_ & ~0x00000008); + booleanValue_ = false; + onChanged(); + return this; + } + + // optional string string_event = 5; + private java.lang.Object stringEvent_ = ""; + /** + * optional string string_event = 5; + */ + public boolean hasStringEvent() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string string_event = 5; + */ + public java.lang.String getStringEvent() { + java.lang.Object ref = stringEvent_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stringEvent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string string_event = 5; + */ + public com.google.protobuf.ByteString + getStringEventBytes() { + java.lang.Object ref = stringEvent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringEvent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string string_event = 5; + */ + public Builder setStringEvent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + stringEvent_ = value; + onChanged(); + return this; + } + /** + * optional string string_event = 5; + */ + public Builder clearStringEvent() { + bitField0_ = (bitField0_ & ~0x00000010); + stringEvent_ = getDefaultInstance().getStringEvent(); + onChanged(); + return this; + } + /** + * optional string string_event = 5; + */ + public Builder setStringEventBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + stringEvent_ = value; + onChanged(); + return this; + } + + // optional double numerical_event = 6; + private double numericalEvent_ ; + /** + * optional double numerical_event = 6; + */ + public boolean hasNumericalEvent() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional double numerical_event = 6; + */ + public double getNumericalEvent() { + return numericalEvent_; + } + /** + * optional double numerical_event = 6; + */ + public Builder setNumericalEvent(double value) { + bitField0_ |= 0x00000020; + numericalEvent_ = value; + onChanged(); + return this; + } + /** + * optional double numerical_event = 6; + */ + public Builder clearNumericalEvent() { + bitField0_ = (bitField0_ & ~0x00000020); + numericalEvent_ = 0D; + onChanged(); + return this; + } + + // optional bool boolean_event = 7; + private boolean booleanEvent_ ; + /** + * optional bool boolean_event = 7; + */ + public boolean hasBooleanEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool boolean_event = 7; + */ + public boolean getBooleanEvent() { + return booleanEvent_; + } + /** + * optional bool boolean_event = 7; + */ + public Builder setBooleanEvent(boolean value) { + bitField0_ |= 0x00000040; + booleanEvent_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_event = 7; + */ + public Builder clearBooleanEvent() { + bitField0_ = (bitField0_ & ~0x00000040); + booleanEvent_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) + } + + static { + defaultInstance = new TranslatedMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_VehicleMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_VehicleMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_RawMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_RawMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_TranslatedMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_TranslatedMessage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014openxc.proto\022\006openxc\"\274\001\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\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + + "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + + "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\255\001\n\021T" + + "ranslatedMessage\022\014\n\004name\030\001 \001(\t\022\024\n\014string" + + "_value\030\002 \001(\t\022\027\n\017numerical_value\030\003 \001(\001\022\025\n" + + "\rboolean_value\030\004 \001(\010\022\024\n\014string_event\030\005 \001", + "(\t\022\027\n\017numerical_event\030\006 \001(\001\022\025\n\rboolean_e" + + "vent\030\007 \001(\010B\034\n\ncom.openxcB\016BinaryMessages" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_openxc_VehicleMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_openxc_VehicleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_VehicleMessage_descriptor, + new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", }); + internal_static_openxc_RawMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_openxc_RawMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_RawMessage_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Data", }); + internal_static_openxc_TranslatedMessage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_openxc_TranslatedMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_TranslatedMessage_descriptor, + new java.lang.String[] { "Name", "StringValue", "NumericalValue", "BooleanValue", "StringEvent", "NumericalEvent", "BooleanEvent", }); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gen/java/openxc/Openxc.java b/gen/java/openxc/Openxc.java deleted file mode 100644 index 3e1ceba7..00000000 --- a/gen/java/openxc/Openxc.java +++ /dev/null @@ -1,2617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: openxc.proto - -package openxc; - -public final class Openxc { - private Openxc() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface VehicleMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional .openxc.VehicleMessage.Type type = 1; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - boolean hasType(); - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - openxc.Openxc.VehicleMessage.Type getType(); - - // optional .openxc.RawMessage raw_message = 2; - /** - * optional .openxc.RawMessage raw_message = 2; - */ - boolean hasRawMessage(); - /** - * optional .openxc.RawMessage raw_message = 2; - */ - openxc.Openxc.RawMessage getRawMessage(); - /** - * optional .openxc.RawMessage raw_message = 2; - */ - openxc.Openxc.RawMessageOrBuilder getRawMessageOrBuilder(); - - // optional .openxc.TranslatedMessage translated_message = 3; - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - boolean hasTranslatedMessage(); - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - openxc.Openxc.TranslatedMessage getTranslatedMessage(); - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - openxc.Openxc.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); - } - /** - * Protobuf type {@code openxc.VehicleMessage} - */ - public static final class VehicleMessage extends - com.google.protobuf.GeneratedMessage - implements VehicleMessageOrBuilder { - // Use VehicleMessage.newBuilder() to construct. - private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final VehicleMessage defaultInstance; - public static VehicleMessage getDefaultInstance() { - return defaultInstance; - } - - public VehicleMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private VehicleMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - openxc.Openxc.VehicleMessage.Type value = openxc.Openxc.VehicleMessage.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - openxc.Openxc.RawMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = rawMessage_.toBuilder(); - } - rawMessage_ = input.readMessage(openxc.Openxc.RawMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rawMessage_); - rawMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - openxc.Openxc.TranslatedMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = translatedMessage_.toBuilder(); - } - translatedMessage_ = input.readMessage(openxc.Openxc.TranslatedMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(translatedMessage_); - translatedMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_VehicleMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_VehicleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.VehicleMessage.class, openxc.Openxc.VehicleMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public VehicleMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VehicleMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code openxc.VehicleMessage.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - * RAW = 1; - */ - RAW(0, 1), - /** - * TRANSLATED = 2; - */ - TRANSLATED(1, 2), - ; - - /** - * RAW = 1; - */ - public static final int RAW_VALUE = 1; - /** - * TRANSLATED = 2; - */ - public static final int TRANSLATED_VALUE = 2; - - - public final int getNumber() { return value; } - - public static Type valueOf(int value) { - switch (value) { - case 1: return RAW; - case 2: return TRANSLATED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return openxc.Openxc.VehicleMessage.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private Type(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type) - } - - private int bitField0_; - // optional .openxc.VehicleMessage.Type type = 1; - public static final int TYPE_FIELD_NUMBER = 1; - private openxc.Openxc.VehicleMessage.Type type_; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - public openxc.Openxc.VehicleMessage.Type getType() { - return type_; - } - - // optional .openxc.RawMessage raw_message = 2; - public static final int RAW_MESSAGE_FIELD_NUMBER = 2; - private openxc.Openxc.RawMessage rawMessage_; - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public boolean hasRawMessage() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public openxc.Openxc.RawMessage getRawMessage() { - return rawMessage_; - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public openxc.Openxc.RawMessageOrBuilder getRawMessageOrBuilder() { - return rawMessage_; - } - - // optional .openxc.TranslatedMessage translated_message = 3; - public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3; - private openxc.Openxc.TranslatedMessage translatedMessage_; - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public boolean hasTranslatedMessage() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public openxc.Openxc.TranslatedMessage getTranslatedMessage() { - return translatedMessage_; - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public openxc.Openxc.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - return translatedMessage_; - } - - private void initFields() { - type_ = openxc.Openxc.VehicleMessage.Type.RAW; - rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); - translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, rawMessage_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, translatedMessage_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rawMessage_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, translatedMessage_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static openxc.Openxc.VehicleMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.VehicleMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.VehicleMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.VehicleMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.VehicleMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.VehicleMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static openxc.Openxc.VehicleMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static openxc.Openxc.VehicleMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static openxc.Openxc.VehicleMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.VehicleMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(openxc.Openxc.VehicleMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.VehicleMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements openxc.Openxc.VehicleMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_VehicleMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_VehicleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.VehicleMessage.class, openxc.Openxc.VehicleMessage.Builder.class); - } - - // Construct using openxc.Openxc.VehicleMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRawMessageFieldBuilder(); - getTranslatedMessageFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - type_ = openxc.Openxc.VehicleMessage.Type.RAW; - bitField0_ = (bitField0_ & ~0x00000001); - if (rawMessageBuilder_ == null) { - rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); - } else { - rawMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (translatedMessageBuilder_ == null) { - translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); - } else { - translatedMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return openxc.Openxc.internal_static_openxc_VehicleMessage_descriptor; - } - - public openxc.Openxc.VehicleMessage getDefaultInstanceForType() { - return openxc.Openxc.VehicleMessage.getDefaultInstance(); - } - - public openxc.Openxc.VehicleMessage build() { - openxc.Openxc.VehicleMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public openxc.Openxc.VehicleMessage buildPartial() { - openxc.Openxc.VehicleMessage result = new openxc.Openxc.VehicleMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (rawMessageBuilder_ == null) { - result.rawMessage_ = rawMessage_; - } else { - result.rawMessage_ = rawMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (translatedMessageBuilder_ == null) { - result.translatedMessage_ = translatedMessage_; - } else { - result.translatedMessage_ = translatedMessageBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof openxc.Openxc.VehicleMessage) { - return mergeFrom((openxc.Openxc.VehicleMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(openxc.Openxc.VehicleMessage other) { - if (other == openxc.Openxc.VehicleMessage.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasRawMessage()) { - mergeRawMessage(other.getRawMessage()); - } - if (other.hasTranslatedMessage()) { - mergeTranslatedMessage(other.getTranslatedMessage()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - openxc.Openxc.VehicleMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (openxc.Openxc.VehicleMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional .openxc.VehicleMessage.Type type = 1; - private openxc.Openxc.VehicleMessage.Type type_ = openxc.Openxc.VehicleMessage.Type.RAW; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - public openxc.Openxc.VehicleMessage.Type getType() { - return type_; - } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - public Builder setType(openxc.Openxc.VehicleMessage.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = openxc.Openxc.VehicleMessage.Type.RAW; - onChanged(); - return this; - } - - // optional .openxc.RawMessage raw_message = 2; - private openxc.Openxc.RawMessage rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.RawMessage, openxc.Openxc.RawMessage.Builder, openxc.Openxc.RawMessageOrBuilder> rawMessageBuilder_; - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public boolean hasRawMessage() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public openxc.Openxc.RawMessage getRawMessage() { - if (rawMessageBuilder_ == null) { - return rawMessage_; - } else { - return rawMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public Builder setRawMessage(openxc.Openxc.RawMessage value) { - if (rawMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - rawMessage_ = value; - onChanged(); - } else { - rawMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public Builder setRawMessage( - openxc.Openxc.RawMessage.Builder builderForValue) { - if (rawMessageBuilder_ == null) { - rawMessage_ = builderForValue.build(); - onChanged(); - } else { - rawMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public Builder mergeRawMessage(openxc.Openxc.RawMessage value) { - if (rawMessageBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - rawMessage_ != openxc.Openxc.RawMessage.getDefaultInstance()) { - rawMessage_ = - openxc.Openxc.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial(); - } else { - rawMessage_ = value; - } - onChanged(); - } else { - rawMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public Builder clearRawMessage() { - if (rawMessageBuilder_ == null) { - rawMessage_ = openxc.Openxc.RawMessage.getDefaultInstance(); - onChanged(); - } else { - rawMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public openxc.Openxc.RawMessage.Builder getRawMessageBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getRawMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - public openxc.Openxc.RawMessageOrBuilder getRawMessageOrBuilder() { - if (rawMessageBuilder_ != null) { - return rawMessageBuilder_.getMessageOrBuilder(); - } else { - return rawMessage_; - } - } - /** - * optional .openxc.RawMessage raw_message = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.RawMessage, openxc.Openxc.RawMessage.Builder, openxc.Openxc.RawMessageOrBuilder> - getRawMessageFieldBuilder() { - if (rawMessageBuilder_ == null) { - rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.RawMessage, openxc.Openxc.RawMessage.Builder, openxc.Openxc.RawMessageOrBuilder>( - rawMessage_, - getParentForChildren(), - isClean()); - rawMessage_ = null; - } - return rawMessageBuilder_; - } - - // optional .openxc.TranslatedMessage translated_message = 3; - private openxc.Openxc.TranslatedMessage translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedMessage, openxc.Openxc.TranslatedMessage.Builder, openxc.Openxc.TranslatedMessageOrBuilder> translatedMessageBuilder_; - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public boolean hasTranslatedMessage() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public openxc.Openxc.TranslatedMessage getTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - return translatedMessage_; - } else { - return translatedMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public Builder setTranslatedMessage(openxc.Openxc.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - translatedMessage_ = value; - onChanged(); - } else { - translatedMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public Builder setTranslatedMessage( - openxc.Openxc.TranslatedMessage.Builder builderForValue) { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = builderForValue.build(); - onChanged(); - } else { - translatedMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public Builder mergeTranslatedMessage(openxc.Openxc.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - translatedMessage_ != openxc.Openxc.TranslatedMessage.getDefaultInstance()) { - translatedMessage_ = - openxc.Openxc.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial(); - } else { - translatedMessage_ = value; - } - onChanged(); - } else { - translatedMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public Builder clearTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = openxc.Openxc.TranslatedMessage.getDefaultInstance(); - onChanged(); - } else { - translatedMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public openxc.Openxc.TranslatedMessage.Builder getTranslatedMessageBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getTranslatedMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - public openxc.Openxc.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - if (translatedMessageBuilder_ != null) { - return translatedMessageBuilder_.getMessageOrBuilder(); - } else { - return translatedMessage_; - } - } - /** - * optional .openxc.TranslatedMessage translated_message = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedMessage, openxc.Openxc.TranslatedMessage.Builder, openxc.Openxc.TranslatedMessageOrBuilder> - getTranslatedMessageFieldBuilder() { - if (translatedMessageBuilder_ == null) { - translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - openxc.Openxc.TranslatedMessage, openxc.Openxc.TranslatedMessage.Builder, openxc.Openxc.TranslatedMessageOrBuilder>( - translatedMessage_, - getParentForChildren(), - isClean()); - translatedMessage_ = null; - } - return translatedMessageBuilder_; - } - - // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) - } - - static { - defaultInstance = new VehicleMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) - } - - public interface RawMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ - boolean hasBus(); - /** - * optional int32 bus = 1; - */ - int getBus(); - - // optional uint32 message_id = 2; - /** - * optional uint32 message_id = 2; - */ - boolean hasMessageId(); - /** - * optional uint32 message_id = 2; - */ - int getMessageId(); - - // optional uint64 data = 3; - /** - * optional uint64 data = 3; - */ - boolean hasData(); - /** - * optional uint64 data = 3; - */ - long getData(); - } - /** - * Protobuf type {@code openxc.RawMessage} - */ - public static final class RawMessage extends - com.google.protobuf.GeneratedMessage - implements RawMessageOrBuilder { - // Use RawMessage.newBuilder() to construct. - private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final RawMessage defaultInstance; - public static RawMessage getDefaultInstance() { - return defaultInstance; - } - - public RawMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RawMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - data_ = input.readUInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_RawMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_RawMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.RawMessage.class, openxc.Openxc.RawMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RawMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RawMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional int32 bus = 1; - public static final int BUS_FIELD_NUMBER = 1; - private int bus_; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - public int getBus() { - return bus_; - } - - // optional uint32 message_id = 2; - public static final int MESSAGE_ID_FIELD_NUMBER = 2; - private int messageId_; - /** - * optional uint32 message_id = 2; - */ - public boolean hasMessageId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 message_id = 2; - */ - public int getMessageId() { - return messageId_; - } - - // optional uint64 data = 3; - public static final int DATA_FIELD_NUMBER = 3; - private long data_; - /** - * optional uint64 data = 3; - */ - public boolean hasData() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint64 data = 3; - */ - public long getData() { - return data_; - } - - private void initFields() { - bus_ = 0; - messageId_ = 0; - data_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, bus_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, messageId_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt64(3, data_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, bus_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, messageId_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, data_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static openxc.Openxc.RawMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.RawMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.RawMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.RawMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.RawMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.RawMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static openxc.Openxc.RawMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static openxc.Openxc.RawMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static openxc.Openxc.RawMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.RawMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(openxc.Openxc.RawMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.RawMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements openxc.Openxc.RawMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_RawMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_RawMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.RawMessage.class, openxc.Openxc.RawMessage.Builder.class); - } - - // Construct using openxc.Openxc.RawMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - bus_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - messageId_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - data_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return openxc.Openxc.internal_static_openxc_RawMessage_descriptor; - } - - public openxc.Openxc.RawMessage getDefaultInstanceForType() { - return openxc.Openxc.RawMessage.getDefaultInstance(); - } - - public openxc.Openxc.RawMessage build() { - openxc.Openxc.RawMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public openxc.Openxc.RawMessage buildPartial() { - openxc.Openxc.RawMessage result = new openxc.Openxc.RawMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.bus_ = bus_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.messageId_ = messageId_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.data_ = data_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof openxc.Openxc.RawMessage) { - return mergeFrom((openxc.Openxc.RawMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(openxc.Openxc.RawMessage other) { - if (other == openxc.Openxc.RawMessage.getDefaultInstance()) return this; - if (other.hasBus()) { - setBus(other.getBus()); - } - if (other.hasMessageId()) { - setMessageId(other.getMessageId()); - } - if (other.hasData()) { - setData(other.getData()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - openxc.Openxc.RawMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (openxc.Openxc.RawMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional int32 bus = 1; - private int bus_ ; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - public int getBus() { - return bus_; - } - /** - * optional int32 bus = 1; - */ - public Builder setBus(int value) { - bitField0_ |= 0x00000001; - bus_ = value; - onChanged(); - return this; - } - /** - * optional int32 bus = 1; - */ - public Builder clearBus() { - bitField0_ = (bitField0_ & ~0x00000001); - bus_ = 0; - onChanged(); - return this; - } - - // optional uint32 message_id = 2; - private int messageId_ ; - /** - * optional uint32 message_id = 2; - */ - public boolean hasMessageId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 message_id = 2; - */ - public int getMessageId() { - return messageId_; - } - /** - * optional uint32 message_id = 2; - */ - public Builder setMessageId(int value) { - bitField0_ |= 0x00000002; - messageId_ = value; - onChanged(); - return this; - } - /** - * optional uint32 message_id = 2; - */ - public Builder clearMessageId() { - bitField0_ = (bitField0_ & ~0x00000002); - messageId_ = 0; - onChanged(); - return this; - } - - // optional uint64 data = 3; - private long data_ ; - /** - * optional uint64 data = 3; - */ - public boolean hasData() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint64 data = 3; - */ - public long getData() { - return data_; - } - /** - * optional uint64 data = 3; - */ - public Builder setData(long value) { - bitField0_ |= 0x00000004; - data_ = value; - onChanged(); - return this; - } - /** - * optional uint64 data = 3; - */ - public Builder clearData() { - bitField0_ = (bitField0_ & ~0x00000004); - data_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.RawMessage) - } - - static { - defaultInstance = new RawMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.RawMessage) - } - - public interface TranslatedMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional string string_value = 2; - /** - * optional string string_value = 2; - */ - boolean hasStringValue(); - /** - * optional string string_value = 2; - */ - java.lang.String getStringValue(); - /** - * optional string string_value = 2; - */ - com.google.protobuf.ByteString - getStringValueBytes(); - - // optional double numerical_value = 3; - /** - * optional double numerical_value = 3; - */ - boolean hasNumericalValue(); - /** - * optional double numerical_value = 3; - */ - double getNumericalValue(); - - // optional bool boolean_value = 4; - /** - * optional bool boolean_value = 4; - */ - boolean hasBooleanValue(); - /** - * optional bool boolean_value = 4; - */ - boolean getBooleanValue(); - - // optional string string_event = 5; - /** - * optional string string_event = 5; - */ - boolean hasStringEvent(); - /** - * optional string string_event = 5; - */ - java.lang.String getStringEvent(); - /** - * optional string string_event = 5; - */ - com.google.protobuf.ByteString - getStringEventBytes(); - - // optional double numerical_event = 6; - /** - * optional double numerical_event = 6; - */ - boolean hasNumericalEvent(); - /** - * optional double numerical_event = 6; - */ - double getNumericalEvent(); - - // optional bool boolean_event = 7; - /** - * optional bool boolean_event = 7; - */ - boolean hasBooleanEvent(); - /** - * optional bool boolean_event = 7; - */ - boolean getBooleanEvent(); - } - /** - * Protobuf type {@code openxc.TranslatedMessage} - */ - public static final class TranslatedMessage extends - com.google.protobuf.GeneratedMessage - implements TranslatedMessageOrBuilder { - // Use TranslatedMessage.newBuilder() to construct. - private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TranslatedMessage defaultInstance; - public static TranslatedMessage getDefaultInstance() { - return defaultInstance; - } - - public TranslatedMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TranslatedMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - stringValue_ = input.readBytes(); - break; - } - case 25: { - bitField0_ |= 0x00000004; - numericalValue_ = input.readDouble(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - booleanValue_ = input.readBool(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - stringEvent_ = input.readBytes(); - break; - } - case 49: { - bitField0_ |= 0x00000020; - numericalEvent_ = input.readDouble(); - break; - } - case 56: { - bitField0_ |= 0x00000040; - booleanEvent_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedMessage.class, openxc.Openxc.TranslatedMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TranslatedMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslatedMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string string_value = 2; - public static final int STRING_VALUE_FIELD_NUMBER = 2; - private java.lang.Object stringValue_; - /** - * optional string string_value = 2; - */ - public boolean hasStringValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string string_value = 2; - */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stringValue_ = s; - } - return s; - } - } - /** - * optional string string_value = 2; - */ - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional double numerical_value = 3; - public static final int NUMERICAL_VALUE_FIELD_NUMBER = 3; - private double numericalValue_; - /** - * optional double numerical_value = 3; - */ - public boolean hasNumericalValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional double numerical_value = 3; - */ - public double getNumericalValue() { - return numericalValue_; - } - - // optional bool boolean_value = 4; - public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; - private boolean booleanValue_; - /** - * optional bool boolean_value = 4; - */ - public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool boolean_value = 4; - */ - public boolean getBooleanValue() { - return booleanValue_; - } - - // optional string string_event = 5; - public static final int STRING_EVENT_FIELD_NUMBER = 5; - private java.lang.Object stringEvent_; - /** - * optional string string_event = 5; - */ - public boolean hasStringEvent() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional string string_event = 5; - */ - public java.lang.String getStringEvent() { - java.lang.Object ref = stringEvent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stringEvent_ = s; - } - return s; - } - } - /** - * optional string string_event = 5; - */ - public com.google.protobuf.ByteString - getStringEventBytes() { - java.lang.Object ref = stringEvent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringEvent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional double numerical_event = 6; - public static final int NUMERICAL_EVENT_FIELD_NUMBER = 6; - private double numericalEvent_; - /** - * optional double numerical_event = 6; - */ - public boolean hasNumericalEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional double numerical_event = 6; - */ - public double getNumericalEvent() { - return numericalEvent_; - } - - // optional bool boolean_event = 7; - public static final int BOOLEAN_EVENT_FIELD_NUMBER = 7; - private boolean booleanEvent_; - /** - * optional bool boolean_event = 7; - */ - public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool boolean_event = 7; - */ - public boolean getBooleanEvent() { - return booleanEvent_; - } - - private void initFields() { - name_ = ""; - stringValue_ = ""; - numericalValue_ = 0D; - booleanValue_ = false; - stringEvent_ = ""; - numericalEvent_ = 0D; - booleanEvent_ = false; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getStringValueBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeDouble(3, numericalValue_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, booleanValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getStringEventBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeDouble(6, numericalEvent_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBool(7, booleanEvent_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getStringValueBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, numericalValue_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, booleanValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getStringEventBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(6, numericalEvent_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, booleanEvent_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static openxc.Openxc.TranslatedMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.TranslatedMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.TranslatedMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static openxc.Openxc.TranslatedMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static openxc.Openxc.TranslatedMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.TranslatedMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static openxc.Openxc.TranslatedMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static openxc.Openxc.TranslatedMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static openxc.Openxc.TranslatedMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static openxc.Openxc.TranslatedMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(openxc.Openxc.TranslatedMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.TranslatedMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements openxc.Openxc.TranslatedMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return openxc.Openxc.internal_static_openxc_TranslatedMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return openxc.Openxc.internal_static_openxc_TranslatedMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - openxc.Openxc.TranslatedMessage.class, openxc.Openxc.TranslatedMessage.Builder.class); - } - - // Construct using openxc.Openxc.TranslatedMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - stringValue_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - numericalValue_ = 0D; - bitField0_ = (bitField0_ & ~0x00000004); - booleanValue_ = false; - bitField0_ = (bitField0_ & ~0x00000008); - stringEvent_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - numericalEvent_ = 0D; - bitField0_ = (bitField0_ & ~0x00000020); - booleanEvent_ = false; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return openxc.Openxc.internal_static_openxc_TranslatedMessage_descriptor; - } - - public openxc.Openxc.TranslatedMessage getDefaultInstanceForType() { - return openxc.Openxc.TranslatedMessage.getDefaultInstance(); - } - - public openxc.Openxc.TranslatedMessage build() { - openxc.Openxc.TranslatedMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public openxc.Openxc.TranslatedMessage buildPartial() { - openxc.Openxc.TranslatedMessage result = new openxc.Openxc.TranslatedMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.stringValue_ = stringValue_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.numericalValue_ = numericalValue_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.booleanValue_ = booleanValue_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.stringEvent_ = stringEvent_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.numericalEvent_ = numericalEvent_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.booleanEvent_ = booleanEvent_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof openxc.Openxc.TranslatedMessage) { - return mergeFrom((openxc.Openxc.TranslatedMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(openxc.Openxc.TranslatedMessage other) { - if (other == openxc.Openxc.TranslatedMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasStringValue()) { - bitField0_ |= 0x00000002; - stringValue_ = other.stringValue_; - onChanged(); - } - if (other.hasNumericalValue()) { - setNumericalValue(other.getNumericalValue()); - } - if (other.hasBooleanValue()) { - setBooleanValue(other.getBooleanValue()); - } - if (other.hasStringEvent()) { - bitField0_ |= 0x00000010; - stringEvent_ = other.stringEvent_; - onChanged(); - } - if (other.hasNumericalEvent()) { - setNumericalEvent(other.getNumericalEvent()); - } - if (other.hasBooleanEvent()) { - setBooleanEvent(other.getBooleanEvent()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - openxc.Openxc.TranslatedMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (openxc.Openxc.TranslatedMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string name = 1; - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - // optional string string_value = 2; - private java.lang.Object stringValue_ = ""; - /** - * optional string string_value = 2; - */ - public boolean hasStringValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string string_value = 2; - */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - stringValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string string_value = 2; - */ - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string string_value = 2; - */ - public Builder setStringValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - stringValue_ = value; - onChanged(); - return this; - } - /** - * optional string string_value = 2; - */ - public Builder clearStringValue() { - bitField0_ = (bitField0_ & ~0x00000002); - stringValue_ = getDefaultInstance().getStringValue(); - onChanged(); - return this; - } - /** - * optional string string_value = 2; - */ - public Builder setStringValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - stringValue_ = value; - onChanged(); - return this; - } - - // optional double numerical_value = 3; - private double numericalValue_ ; - /** - * optional double numerical_value = 3; - */ - public boolean hasNumericalValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional double numerical_value = 3; - */ - public double getNumericalValue() { - return numericalValue_; - } - /** - * optional double numerical_value = 3; - */ - public Builder setNumericalValue(double value) { - bitField0_ |= 0x00000004; - numericalValue_ = value; - onChanged(); - return this; - } - /** - * optional double numerical_value = 3; - */ - public Builder clearNumericalValue() { - bitField0_ = (bitField0_ & ~0x00000004); - numericalValue_ = 0D; - onChanged(); - return this; - } - - // optional bool boolean_value = 4; - private boolean booleanValue_ ; - /** - * optional bool boolean_value = 4; - */ - public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool boolean_value = 4; - */ - public boolean getBooleanValue() { - return booleanValue_; - } - /** - * optional bool boolean_value = 4; - */ - public Builder setBooleanValue(boolean value) { - bitField0_ |= 0x00000008; - booleanValue_ = value; - onChanged(); - return this; - } - /** - * optional bool boolean_value = 4; - */ - public Builder clearBooleanValue() { - bitField0_ = (bitField0_ & ~0x00000008); - booleanValue_ = false; - onChanged(); - return this; - } - - // optional string string_event = 5; - private java.lang.Object stringEvent_ = ""; - /** - * optional string string_event = 5; - */ - public boolean hasStringEvent() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional string string_event = 5; - */ - public java.lang.String getStringEvent() { - java.lang.Object ref = stringEvent_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - stringEvent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string string_event = 5; - */ - public com.google.protobuf.ByteString - getStringEventBytes() { - java.lang.Object ref = stringEvent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringEvent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string string_event = 5; - */ - public Builder setStringEvent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - stringEvent_ = value; - onChanged(); - return this; - } - /** - * optional string string_event = 5; - */ - public Builder clearStringEvent() { - bitField0_ = (bitField0_ & ~0x00000010); - stringEvent_ = getDefaultInstance().getStringEvent(); - onChanged(); - return this; - } - /** - * optional string string_event = 5; - */ - public Builder setStringEventBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - stringEvent_ = value; - onChanged(); - return this; - } - - // optional double numerical_event = 6; - private double numericalEvent_ ; - /** - * optional double numerical_event = 6; - */ - public boolean hasNumericalEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional double numerical_event = 6; - */ - public double getNumericalEvent() { - return numericalEvent_; - } - /** - * optional double numerical_event = 6; - */ - public Builder setNumericalEvent(double value) { - bitField0_ |= 0x00000020; - numericalEvent_ = value; - onChanged(); - return this; - } - /** - * optional double numerical_event = 6; - */ - public Builder clearNumericalEvent() { - bitField0_ = (bitField0_ & ~0x00000020); - numericalEvent_ = 0D; - onChanged(); - return this; - } - - // optional bool boolean_event = 7; - private boolean booleanEvent_ ; - /** - * optional bool boolean_event = 7; - */ - public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool boolean_event = 7; - */ - public boolean getBooleanEvent() { - return booleanEvent_; - } - /** - * optional bool boolean_event = 7; - */ - public Builder setBooleanEvent(boolean value) { - bitField0_ |= 0x00000040; - booleanEvent_ = value; - onChanged(); - return this; - } - /** - * optional bool boolean_event = 7; - */ - public Builder clearBooleanEvent() { - bitField0_ = (bitField0_ & ~0x00000040); - booleanEvent_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) - } - - static { - defaultInstance = new TranslatedMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_VehicleMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_VehicleMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_RawMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_RawMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_TranslatedMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_TranslatedMessage_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\274\001\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\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + - "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + - "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\255\001\n\021T" + - "ranslatedMessage\022\014\n\004name\030\001 \001(\t\022\024\n\014string" + - "_value\030\002 \001(\t\022\027\n\017numerical_value\030\003 \001(\001\022\025\n" + - "\rboolean_value\030\004 \001(\010\022\024\n\014string_event\030\005 \001", - "(\t\022\027\n\017numerical_event\030\006 \001(\001\022\025\n\rboolean_e" + - "vent\030\007 \001(\010" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_openxc_VehicleMessage_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_openxc_VehicleMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_VehicleMessage_descriptor, - new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", }); - internal_static_openxc_RawMessage_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_openxc_RawMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", }); - internal_static_openxc_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_openxc_TranslatedMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_TranslatedMessage_descriptor, - new java.lang.String[] { "Name", "StringValue", "NumericalValue", "BooleanValue", "StringEvent", "NumericalEvent", "BooleanEvent", }); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 63edf332..5b311a2e 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\"\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\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08') + 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\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -220,4 +220,6 @@ class TranslatedMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), '\n\ncom.openxcB\016BinaryMessages') # @@protoc_insertion_point(module_scope) diff --git a/openxc.proto b/openxc.proto index b3dd3bad..9f9046eb 100644 --- a/openxc.proto +++ b/openxc.proto @@ -1,5 +1,8 @@ package openxc; +option java_package = "com.openxc"; +option java_outer_classname = "BinaryMessages"; + message VehicleMessage { enum Type { RAW = 1; TRANSLATED = 2; } -- cgit 1.2.3-korg From da1d41840879bc75a9df06972e1ec191bbfd3691 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 23 Oct 2013 09:02:33 -0400 Subject: Switch back to many subtypes for binary messages. Some protobuf libraries don't support checking if a field exists (they always return a default value), so although this style has more code it is easier to support. --- benchmark/proto/compare_sizes.py | 35 +- gen/cpp/openxc.pb | 54 +- gen/cpp/openxc.pb.c | 62 +- gen/cpp/openxc.pb.h | 136 +- gen/java/com/openxc/BinaryMessages.java | 5511 ++++++++++++++++++++++++++----- gen/python/openxc_pb2.py | 319 +- openxc.proto | 52 +- 7 files changed, 5203 insertions(+), 966 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index e4ae6691..1fb96030 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -40,14 +40,35 @@ for trace_file in sys.argv[1:]: message.raw_message.data = int(json_message['data'], 0) total_raw_binary_size += len(message.SerializeToString()) else: - message.type = openxc_pb2.VehicleMessage.TRANSLATED - message.translated_message.name = json_message['name'] - if isinstance(json_message['value'], bool): - message.translated_message.boolean_value = json_message['value'] - elif isinstance(json_message['value'], numbers.Number): - message.translated_message.numerical_value = json_message['value'] + if 'event' in json_message: + if isinstance(json_message['event'], bool): + message.type = openxc_pb2.VehicleMessage.EVENTED_BOOL + message.evented_boolean_message.name = json_message['name'] + message.evented_boolean_message.value = json_message['value'] + message.evented_boolean_message.event = json_message['event'] + elif isinstance(json_message['event'], numbers.Number): + message.type = openxc_pb2.VehicleMessage.EVENTED_NUM + message.evented_numeric_message.name = json_message['name'] + message.evented_numeric_message.value = json_message['value'] + message.evented_numeric_message.event = json_message['event'] + else: + message.type = openxc_pb2.VehicleMessage.EVENTED_STRING + message.evented_string_message.name = json_message['name'] + message.evented_string_message.value = json_message['value'] + message.evented_numeric_message.event = json_message['event'] else: - message.translated_message.string_value = json_message['value'] + if isinstance(json_message['value'], bool): + message.type = openxc_pb2.VehicleMessage.BOOL + message.boolean_message.name = json_message['name'] + message.boolean_message.value = json_message['value'] + elif isinstance(json_message['value'], numbers.Number): + message.type = openxc_pb2.VehicleMessage.NUM + message.numeric_message.name = json_message['name'] + message.numeric_message.value = json_message['value'] + else: + message.type = openxc_pb2.VehicleMessage.STRING + message.string_message.name = json_message['name'] + message.string_message.value = json_message['value'] total_translated_json_size += len(json.dumps(json_message)) total_translated_binary_size += len(message.SerializeToString()) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index d4356e1c..7efe870c 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,27 +1,49 @@ -à - openxc.protoopenxc"¼ +Ú + openxc.protoopenxc"š VehicleMessage) type (2.openxc.VehicleMessage.Type' - raw_message ( 2.openxc.RawMessage5 -translated_message ( 2.openxc.TranslatedMessage" + raw_message ( 2.openxc.RawMessage- +string_message ( 2.openxc.StringMessage/ +numeric_message ( 2.openxc.NumericMessage/ +boolean_message ( 2.openxc.BooleanMessage< +evented_string_message ( 2.openxc.EventedStringMessage> +evented_boolean_message ( 2.openxc.EventedBooleanMessage> +evented_numeric_message ( 2.openxc.EventedNumericMessage"e Type -RAW +RAW -TRANSLATED"; +STRING +BOOL +NUM + EVENTED_NUM +EVENTED_STRING + EVENTED_BOOL"- RawMessage bus ( -message_id (  -data ("­ -TranslatedMessage -name (  - string_value (  -numerical_value ( - boolean_value ( - string_event (  -numerical_event ( - boolean_event (B +message_id ( ", + StringMessage +name (  +value ( "- +NumericMessage +name (  +value ("- +BooleanMessage +name (  +value ("B +EventedStringMessage +name (  +value (  +event ( "C +EventedBooleanMessage +name (  +value (  +event ("C +EventedNumericMessage +name (  +value (  +event (B com.openxcBBinaryMessages \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 91667bf3..541c6b0c 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,43 +1,75 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.4-dev at Wed Oct 9 14:26:13 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 23 08:59:20 2013. */ #include "openxc.pb.h" -const pb_field_t openxc_VehicleMessage_fields[4] = { +const pb_field_t openxc_VehicleMessage_fields[9] = { 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( 3, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, string_message, raw_message, &openxc_StringMessage_fields), + PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, numeric_message, string_message, &openxc_NumericMessage_fields), + PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, boolean_message, numeric_message, &openxc_BooleanMessage_fields), + PB_FIELD2( 6, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, evented_string_message, boolean_message, &openxc_EventedStringMessage_fields), + PB_FIELD2( 7, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, evented_boolean_message, evented_string_message, &openxc_EventedBooleanMessage_fields), + PB_FIELD2( 8, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, evented_numeric_message, evented_boolean_message, &openxc_EventedNumericMessage_fields), PB_LAST_FIELD }; -const pb_field_t openxc_RawMessage_fields[4] = { +const pb_field_t openxc_RawMessage_fields[3] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; -const pb_field_t openxc_TranslatedMessage_fields[8] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_value, name, 0), - PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_value, string_value, 0), - PB_FIELD2( 4, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_value, numerical_value, 0), - PB_FIELD2( 5, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), - PB_FIELD2( 6, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_event, string_event, 0), - PB_FIELD2( 7, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_event, numerical_event, 0), +const pb_field_t openxc_StringMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_StringMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_StringMessage, value, name, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_NumericMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_NumericMessage, name, name, 0), + PB_FIELD2( 2, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_NumericMessage, value, name, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_BooleanMessage_fields[3] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_BooleanMessage, name, name, 0), + PB_FIELD2( 2, BOOL , OPTIONAL, STATIC, OTHER, openxc_BooleanMessage, value, name, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_EventedStringMessage_fields[4] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_EventedStringMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedStringMessage, value, name, 0), + PB_FIELD2( 3, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedStringMessage, event, value, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_EventedBooleanMessage_fields[4] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_EventedBooleanMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedBooleanMessage, value, name, 0), + PB_FIELD2( 3, BOOL , OPTIONAL, STATIC, OTHER, openxc_EventedBooleanMessage, event, value, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_EventedNumericMessage_fields[4] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_EventedNumericMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedNumericMessage, value, name, 0), + PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_EventedNumericMessage, event, value, 0), PB_LAST_FIELD }; /* 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), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, string_message) < 256 && pb_membersize(openxc_VehicleMessage, numeric_message) < 256 && pb_membersize(openxc_VehicleMessage, boolean_message) < 256 && pb_membersize(openxc_VehicleMessage, evented_string_message) < 256 && pb_membersize(openxc_VehicleMessage, evented_boolean_message) < 256 && pb_membersize(openxc_VehicleMessage, evented_numeric_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_StringMessage_openxc_NumericMessage_openxc_BooleanMessage_openxc_EventedStringMessage_openxc_EventedBooleanMessage_openxc_EventedNumericMessage) #endif #if !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, string_message) < 65536 && pb_membersize(openxc_VehicleMessage, numeric_message) < 65536 && pb_membersize(openxc_VehicleMessage, boolean_message) < 65536 && pb_membersize(openxc_VehicleMessage, evented_string_message) < 65536 && pb_membersize(openxc_VehicleMessage, evented_boolean_message) < 65536 && pb_membersize(openxc_VehicleMessage, evented_numeric_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_StringMessage_openxc_NumericMessage_openxc_BooleanMessage_openxc_EventedStringMessage_openxc_EventedBooleanMessage_openxc_EventedNumericMessage) #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 d278c681..389c09c9 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.4-dev at Wed Oct 9 14:26:13 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 23 08:59:20 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -12,71 +12,137 @@ extern "C" { /* Enum definitions */ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_RAW = 1, - openxc_VehicleMessage_Type_TRANSLATED = 2 + openxc_VehicleMessage_Type_STRING = 2, + openxc_VehicleMessage_Type_BOOL = 3, + openxc_VehicleMessage_Type_NUM = 4, + openxc_VehicleMessage_Type_EVENTED_NUM = 5, + openxc_VehicleMessage_Type_EVENTED_STRING = 6, + openxc_VehicleMessage_Type_EVENTED_BOOL = 7 } openxc_VehicleMessage_Type; /* Struct definitions */ +typedef struct _openxc_BooleanMessage { + bool has_name; + char name[100]; + bool has_value; + bool value; +} openxc_BooleanMessage; + +typedef struct _openxc_EventedBooleanMessage { + bool has_name; + char name[100]; + bool has_value; + char value[100]; + bool has_event; + bool event; +} openxc_EventedBooleanMessage; + +typedef struct _openxc_EventedNumericMessage { + bool has_name; + char name[100]; + bool has_value; + char value[100]; + bool has_event; + double event; +} openxc_EventedNumericMessage; + +typedef struct _openxc_EventedStringMessage { + bool has_name; + char name[100]; + bool has_value; + char value[100]; + bool has_event; + char event[100]; +} openxc_EventedStringMessage; + +typedef struct _openxc_NumericMessage { + bool has_name; + char name[100]; + bool has_value; + double value; +} openxc_NumericMessage; + typedef struct _openxc_RawMessage { bool has_bus; int32_t bus; bool has_message_id; uint32_t message_id; - bool has_data; - uint64_t data; } openxc_RawMessage; -typedef struct _openxc_TranslatedMessage { +typedef struct _openxc_StringMessage { bool has_name; char name[100]; - bool has_string_value; - char string_value[100]; - bool has_numerical_value; - double numerical_value; - bool has_boolean_value; - bool boolean_value; - bool has_string_event; - char string_event[100]; - bool has_numerical_event; - double numerical_event; - bool has_boolean_event; - bool boolean_event; -} openxc_TranslatedMessage; + bool has_value; + char value[100]; +} openxc_StringMessage; typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; bool has_raw_message; openxc_RawMessage raw_message; - bool has_translated_message; - openxc_TranslatedMessage translated_message; + bool has_string_message; + openxc_StringMessage string_message; + bool has_numeric_message; + openxc_NumericMessage numeric_message; + bool has_boolean_message; + openxc_BooleanMessage boolean_message; + bool has_evented_string_message; + openxc_EventedStringMessage evented_string_message; + bool has_evented_boolean_message; + openxc_EventedBooleanMessage evented_boolean_message; + bool has_evented_numeric_message; + openxc_EventedNumericMessage evented_numeric_message; } openxc_VehicleMessage; /* Default values for struct fields */ /* Field tags (for use in manual encoding/decoding) */ +#define openxc_BooleanMessage_name_tag 1 +#define openxc_BooleanMessage_value_tag 2 +#define openxc_EventedBooleanMessage_name_tag 1 +#define openxc_EventedBooleanMessage_value_tag 2 +#define openxc_EventedBooleanMessage_event_tag 3 +#define openxc_EventedNumericMessage_name_tag 1 +#define openxc_EventedNumericMessage_value_tag 2 +#define openxc_EventedNumericMessage_event_tag 3 +#define openxc_EventedStringMessage_name_tag 1 +#define openxc_EventedStringMessage_value_tag 2 +#define openxc_EventedStringMessage_event_tag 3 +#define openxc_NumericMessage_name_tag 1 +#define openxc_NumericMessage_value_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 -#define openxc_RawMessage_data_tag 3 -#define openxc_TranslatedMessage_name_tag 1 -#define openxc_TranslatedMessage_string_value_tag 2 -#define openxc_TranslatedMessage_numerical_value_tag 3 -#define openxc_TranslatedMessage_boolean_value_tag 4 -#define openxc_TranslatedMessage_string_event_tag 5 -#define openxc_TranslatedMessage_numerical_event_tag 6 -#define openxc_TranslatedMessage_boolean_event_tag 7 +#define openxc_StringMessage_name_tag 1 +#define openxc_StringMessage_value_tag 2 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 -#define openxc_VehicleMessage_translated_message_tag 3 +#define openxc_VehicleMessage_string_message_tag 3 +#define openxc_VehicleMessage_numeric_message_tag 4 +#define openxc_VehicleMessage_boolean_message_tag 5 +#define openxc_VehicleMessage_evented_string_message_tag 6 +#define openxc_VehicleMessage_evented_boolean_message_tag 7 +#define openxc_VehicleMessage_evented_numeric_message_tag 8 /* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[4]; -extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_TranslatedMessage_fields[8]; +extern const pb_field_t openxc_VehicleMessage_fields[9]; +extern const pb_field_t openxc_RawMessage_fields[3]; +extern const pb_field_t openxc_StringMessage_fields[3]; +extern const pb_field_t openxc_NumericMessage_fields[3]; +extern const pb_field_t openxc_BooleanMessage_fields[3]; +extern const pb_field_t openxc_EventedStringMessage_fields[4]; +extern const pb_field_t openxc_EventedBooleanMessage_fields[4]; +extern const pb_field_t openxc_EventedNumericMessage_fields[4]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 362 -#define openxc_RawMessage_size 23 -#define openxc_TranslatedMessage_size 328 +#define openxc_VehicleMessage_size 1180 +#define openxc_RawMessage_size 12 +#define openxc_StringMessage_size 204 +#define openxc_NumericMessage_size 111 +#define openxc_BooleanMessage_size 104 +#define openxc_EventedStringMessage_size 306 +#define openxc_EventedBooleanMessage_size 206 +#define openxc_EventedNumericMessage_size 213 #ifdef __cplusplus } /* extern "C" */ diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 7410c63e..a2932845 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -35,19 +35,89 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder(); - // optional .openxc.TranslatedMessage translated_message = 3; + // optional .openxc.StringMessage string_message = 3; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - boolean hasTranslatedMessage(); + boolean hasStringMessage(); /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage(); + com.openxc.BinaryMessages.StringMessage getStringMessage(); /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); + com.openxc.BinaryMessages.StringMessageOrBuilder getStringMessageOrBuilder(); + + // optional .openxc.NumericMessage numeric_message = 4; + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + boolean hasNumericMessage(); + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + com.openxc.BinaryMessages.NumericMessage getNumericMessage(); + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + com.openxc.BinaryMessages.NumericMessageOrBuilder getNumericMessageOrBuilder(); + + // optional .openxc.BooleanMessage boolean_message = 5; + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + boolean hasBooleanMessage(); + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + com.openxc.BinaryMessages.BooleanMessage getBooleanMessage(); + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + com.openxc.BinaryMessages.BooleanMessageOrBuilder getBooleanMessageOrBuilder(); + + // optional .openxc.EventedStringMessage evented_string_message = 6; + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + boolean hasEventedStringMessage(); + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + com.openxc.BinaryMessages.EventedStringMessage getEventedStringMessage(); + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + com.openxc.BinaryMessages.EventedStringMessageOrBuilder getEventedStringMessageOrBuilder(); + + // optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + boolean hasEventedBooleanMessage(); + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + com.openxc.BinaryMessages.EventedBooleanMessage getEventedBooleanMessage(); + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder getEventedBooleanMessageOrBuilder(); + + // optional .openxc.EventedNumericMessage evented_numeric_message = 8; + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + boolean hasEventedNumericMessage(); + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + com.openxc.BinaryMessages.EventedNumericMessage getEventedNumericMessage(); + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + com.openxc.BinaryMessages.EventedNumericMessageOrBuilder getEventedNumericMessageOrBuilder(); } /** * Protobuf type {@code openxc.VehicleMessage} @@ -125,18 +195,83 @@ public final class BinaryMessages { break; } case 26: { - com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null; + com.openxc.BinaryMessages.StringMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = translatedMessage_.toBuilder(); + subBuilder = stringMessage_.toBuilder(); } - translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry); + stringMessage_ = input.readMessage(com.openxc.BinaryMessages.StringMessage.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(translatedMessage_); - translatedMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(stringMessage_); + stringMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } + case 34: { + com.openxc.BinaryMessages.NumericMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = numericMessage_.toBuilder(); + } + numericMessage_ = input.readMessage(com.openxc.BinaryMessages.NumericMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(numericMessage_); + numericMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 42: { + com.openxc.BinaryMessages.BooleanMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = booleanMessage_.toBuilder(); + } + booleanMessage_ = input.readMessage(com.openxc.BinaryMessages.BooleanMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(booleanMessage_); + booleanMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } + case 50: { + com.openxc.BinaryMessages.EventedStringMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = eventedStringMessage_.toBuilder(); + } + eventedStringMessage_ = input.readMessage(com.openxc.BinaryMessages.EventedStringMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(eventedStringMessage_); + eventedStringMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } + case 58: { + com.openxc.BinaryMessages.EventedBooleanMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + subBuilder = eventedBooleanMessage_.toBuilder(); + } + eventedBooleanMessage_ = input.readMessage(com.openxc.BinaryMessages.EventedBooleanMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(eventedBooleanMessage_); + eventedBooleanMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000040; + break; + } + case 66: { + com.openxc.BinaryMessages.EventedNumericMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000080) == 0x00000080)) { + subBuilder = eventedNumericMessage_.toBuilder(); + } + eventedNumericMessage_ = input.readMessage(com.openxc.BinaryMessages.EventedNumericMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(eventedNumericMessage_); + eventedNumericMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000080; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -186,9 +321,29 @@ public final class BinaryMessages { */ RAW(0, 1), /** - * TRANSLATED = 2; + * STRING = 2; + */ + STRING(1, 2), + /** + * BOOL = 3; + */ + BOOL(2, 3), + /** + * NUM = 4; + */ + NUM(3, 4), + /** + * EVENTED_NUM = 5; + */ + EVENTED_NUM(4, 5), + /** + * EVENTED_STRING = 6; + */ + EVENTED_STRING(5, 6), + /** + * EVENTED_BOOL = 7; */ - TRANSLATED(1, 2), + EVENTED_BOOL(6, 7), ; /** @@ -196,9 +351,29 @@ public final class BinaryMessages { */ public static final int RAW_VALUE = 1; /** - * TRANSLATED = 2; + * STRING = 2; + */ + public static final int STRING_VALUE = 2; + /** + * BOOL = 3; + */ + public static final int BOOL_VALUE = 3; + /** + * NUM = 4; + */ + public static final int NUM_VALUE = 4; + /** + * EVENTED_NUM = 5; + */ + public static final int EVENTED_NUM_VALUE = 5; + /** + * EVENTED_STRING = 6; + */ + public static final int EVENTED_STRING_VALUE = 6; + /** + * EVENTED_BOOL = 7; */ - public static final int TRANSLATED_VALUE = 2; + public static final int EVENTED_BOOL_VALUE = 7; public final int getNumber() { return value; } @@ -206,7 +381,12 @@ public final class BinaryMessages { public static Type valueOf(int value) { switch (value) { case 1: return RAW; - case 2: return TRANSLATED; + case 2: return STRING; + case 3: return BOOL; + case 4: return NUM; + case 5: return EVENTED_NUM; + case 6: return EVENTED_STRING; + case 7: return EVENTED_BOOL; default: return null; } } @@ -297,32 +477,147 @@ public final class BinaryMessages { return rawMessage_; } - // optional .openxc.TranslatedMessage translated_message = 3; - public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3; - private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_; + // optional .openxc.StringMessage string_message = 3; + public static final int STRING_MESSAGE_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.StringMessage stringMessage_; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public boolean hasTranslatedMessage() { + public boolean hasStringMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; + */ + public com.openxc.BinaryMessages.StringMessage getStringMessage() { + return stringMessage_; + } + /** + * optional .openxc.StringMessage string_message = 3; + */ + public com.openxc.BinaryMessages.StringMessageOrBuilder getStringMessageOrBuilder() { + return stringMessage_; + } + + // optional .openxc.NumericMessage numeric_message = 4; + public static final int NUMERIC_MESSAGE_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.NumericMessage numericMessage_; + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public boolean hasNumericMessage() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public com.openxc.BinaryMessages.NumericMessage getNumericMessage() { + return numericMessage_; + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public com.openxc.BinaryMessages.NumericMessageOrBuilder getNumericMessageOrBuilder() { + return numericMessage_; + } + + // optional .openxc.BooleanMessage boolean_message = 5; + public static final int BOOLEAN_MESSAGE_FIELD_NUMBER = 5; + private com.openxc.BinaryMessages.BooleanMessage booleanMessage_; + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public boolean hasBooleanMessage() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public com.openxc.BinaryMessages.BooleanMessage getBooleanMessage() { + return booleanMessage_; + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public com.openxc.BinaryMessages.BooleanMessageOrBuilder getBooleanMessageOrBuilder() { + return booleanMessage_; + } + + // optional .openxc.EventedStringMessage evented_string_message = 6; + public static final int EVENTED_STRING_MESSAGE_FIELD_NUMBER = 6; + private com.openxc.BinaryMessages.EventedStringMessage eventedStringMessage_; + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public boolean hasEventedStringMessage() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public com.openxc.BinaryMessages.EventedStringMessage getEventedStringMessage() { + return eventedStringMessage_; + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public com.openxc.BinaryMessages.EventedStringMessageOrBuilder getEventedStringMessageOrBuilder() { + return eventedStringMessage_; + } + + // optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + public static final int EVENTED_BOOLEAN_MESSAGE_FIELD_NUMBER = 7; + private com.openxc.BinaryMessages.EventedBooleanMessage eventedBooleanMessage_; + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public boolean hasEventedBooleanMessage() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public com.openxc.BinaryMessages.EventedBooleanMessage getEventedBooleanMessage() { + return eventedBooleanMessage_; + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder getEventedBooleanMessageOrBuilder() { + return eventedBooleanMessage_; + } + + // optional .openxc.EventedNumericMessage evented_numeric_message = 8; + public static final int EVENTED_NUMERIC_MESSAGE_FIELD_NUMBER = 8; + private com.openxc.BinaryMessages.EventedNumericMessage eventedNumericMessage_; + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public boolean hasEventedNumericMessage() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; */ - public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { - return translatedMessage_; + public com.openxc.BinaryMessages.EventedNumericMessage getEventedNumericMessage() { + return eventedNumericMessage_; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; */ - public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - return translatedMessage_; + public com.openxc.BinaryMessages.EventedNumericMessageOrBuilder getEventedNumericMessageOrBuilder() { + return eventedNumericMessage_; } private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); + numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); + booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); + eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); + eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); + eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -343,7 +638,22 @@ public final class BinaryMessages { output.writeMessage(2, rawMessage_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, translatedMessage_); + output.writeMessage(3, stringMessage_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, numericMessage_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, booleanMessage_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(6, eventedStringMessage_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(7, eventedBooleanMessage_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeMessage(8, eventedNumericMessage_); } getUnknownFields().writeTo(output); } @@ -364,7 +674,27 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, translatedMessage_); + .computeMessageSize(3, stringMessage_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, numericMessage_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, booleanMessage_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, eventedStringMessage_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, eventedBooleanMessage_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, eventedNumericMessage_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -475,7 +805,12 @@ public final class BinaryMessages { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRawMessageFieldBuilder(); - getTranslatedMessageFieldBuilder(); + getStringMessageFieldBuilder(); + getNumericMessageFieldBuilder(); + getBooleanMessageFieldBuilder(); + getEventedStringMessageFieldBuilder(); + getEventedBooleanMessageFieldBuilder(); + getEventedNumericMessageFieldBuilder(); } } private static Builder create() { @@ -492,12 +827,42 @@ public final class BinaryMessages { rawMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); - if (translatedMessageBuilder_ == null) { - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + if (stringMessageBuilder_ == null) { + stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); } else { - translatedMessageBuilder_.clear(); + stringMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + if (numericMessageBuilder_ == null) { + numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); + } else { + numericMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (booleanMessageBuilder_ == null) { + booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); + } else { + booleanMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (eventedStringMessageBuilder_ == null) { + eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); + } else { + eventedStringMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (eventedBooleanMessageBuilder_ == null) { + eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); + } else { + eventedBooleanMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (eventedNumericMessageBuilder_ == null) { + eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); + } else { + eventedNumericMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -541,10 +906,50 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (translatedMessageBuilder_ == null) { - result.translatedMessage_ = translatedMessage_; + if (stringMessageBuilder_ == null) { + result.stringMessage_ = stringMessage_; + } else { + result.stringMessage_ = stringMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (numericMessageBuilder_ == null) { + result.numericMessage_ = numericMessage_; + } else { + result.numericMessage_ = numericMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (booleanMessageBuilder_ == null) { + result.booleanMessage_ = booleanMessage_; + } else { + result.booleanMessage_ = booleanMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + if (eventedStringMessageBuilder_ == null) { + result.eventedStringMessage_ = eventedStringMessage_; + } else { + result.eventedStringMessage_ = eventedStringMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + if (eventedBooleanMessageBuilder_ == null) { + result.eventedBooleanMessage_ = eventedBooleanMessage_; } else { - result.translatedMessage_ = translatedMessageBuilder_.build(); + result.eventedBooleanMessage_ = eventedBooleanMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + if (eventedNumericMessageBuilder_ == null) { + result.eventedNumericMessage_ = eventedNumericMessage_; + } else { + result.eventedNumericMessage_ = eventedNumericMessageBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -568,8 +973,23 @@ public final class BinaryMessages { if (other.hasRawMessage()) { mergeRawMessage(other.getRawMessage()); } - if (other.hasTranslatedMessage()) { - mergeTranslatedMessage(other.getTranslatedMessage()); + if (other.hasStringMessage()) { + mergeStringMessage(other.getStringMessage()); + } + if (other.hasNumericMessage()) { + mergeNumericMessage(other.getNumericMessage()); + } + if (other.hasBooleanMessage()) { + mergeBooleanMessage(other.getBooleanMessage()); + } + if (other.hasEventedStringMessage()) { + mergeEventedStringMessage(other.getEventedStringMessage()); + } + if (other.hasEventedBooleanMessage()) { + mergeEventedBooleanMessage(other.getEventedBooleanMessage()); + } + if (other.hasEventedNumericMessage()) { + mergeEventedNumericMessage(other.getEventedNumericMessage()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -751,186 +1171,3772 @@ public final class BinaryMessages { return rawMessageBuilder_; } - // optional .openxc.TranslatedMessage translated_message = 3; - private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + // optional .openxc.StringMessage string_message = 3; + private com.openxc.BinaryMessages.StringMessage stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_; + com.openxc.BinaryMessages.StringMessage, com.openxc.BinaryMessages.StringMessage.Builder, com.openxc.BinaryMessages.StringMessageOrBuilder> stringMessageBuilder_; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public boolean hasTranslatedMessage() { + public boolean hasStringMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - return translatedMessage_; + public com.openxc.BinaryMessages.StringMessage getStringMessage() { + if (stringMessageBuilder_ == null) { + return stringMessage_; } else { - return translatedMessageBuilder_.getMessage(); + return stringMessageBuilder_.getMessage(); } } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { + public Builder setStringMessage(com.openxc.BinaryMessages.StringMessage value) { + if (stringMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - translatedMessage_ = value; + stringMessage_ = value; onChanged(); } else { - translatedMessageBuilder_.setMessage(value); + stringMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public Builder setTranslatedMessage( - com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = builderForValue.build(); + public Builder setStringMessage( + com.openxc.BinaryMessages.StringMessage.Builder builderForValue) { + if (stringMessageBuilder_ == null) { + stringMessage_ = builderForValue.build(); onChanged(); } else { - translatedMessageBuilder_.setMessage(builderForValue.build()); + stringMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { + public Builder mergeStringMessage(com.openxc.BinaryMessages.StringMessage value) { + if (stringMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && - translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) { - translatedMessage_ = - com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial(); + stringMessage_ != com.openxc.BinaryMessages.StringMessage.getDefaultInstance()) { + stringMessage_ = + com.openxc.BinaryMessages.StringMessage.newBuilder(stringMessage_).mergeFrom(value).buildPartial(); } else { - translatedMessage_ = value; + stringMessage_ = value; } onChanged(); } else { - translatedMessageBuilder_.mergeFrom(value); + stringMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public Builder clearTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + public Builder clearStringMessage() { + if (stringMessageBuilder_ == null) { + stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); onChanged(); } else { - translatedMessageBuilder_.clear(); + stringMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() { + public com.openxc.BinaryMessages.StringMessage.Builder getStringMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getTranslatedMessageFieldBuilder().getBuilder(); + return getStringMessageFieldBuilder().getBuilder(); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - if (translatedMessageBuilder_ != null) { - return translatedMessageBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.StringMessageOrBuilder getStringMessageOrBuilder() { + if (stringMessageBuilder_ != null) { + return stringMessageBuilder_.getMessageOrBuilder(); } else { - return translatedMessage_; + return stringMessage_; } } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.StringMessage string_message = 3; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> - getTranslatedMessageFieldBuilder() { - if (translatedMessageBuilder_ == null) { - translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>( - translatedMessage_, + com.openxc.BinaryMessages.StringMessage, com.openxc.BinaryMessages.StringMessage.Builder, com.openxc.BinaryMessages.StringMessageOrBuilder> + getStringMessageFieldBuilder() { + if (stringMessageBuilder_ == null) { + stringMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.StringMessage, com.openxc.BinaryMessages.StringMessage.Builder, com.openxc.BinaryMessages.StringMessageOrBuilder>( + stringMessage_, getParentForChildren(), isClean()); - translatedMessage_ = null; + stringMessage_ = null; } - return translatedMessageBuilder_; + return stringMessageBuilder_; } - // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) - } - - static { - defaultInstance = new VehicleMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) - } - - public interface RawMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ - boolean hasBus(); - /** - * optional int32 bus = 1; - */ - int getBus(); - - // optional uint32 message_id = 2; - /** - * optional uint32 message_id = 2; - */ - boolean hasMessageId(); - /** - * optional uint32 message_id = 2; - */ - int getMessageId(); - - // optional uint64 data = 3; - /** - * optional uint64 data = 3; - */ - boolean hasData(); - /** - * optional uint64 data = 3; - */ - long getData(); - } - /** - * Protobuf type {@code openxc.RawMessage} - */ - public static final class RawMessage extends - com.google.protobuf.GeneratedMessage - implements RawMessageOrBuilder { - // Use RawMessage.newBuilder() to construct. - private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + // optional .openxc.NumericMessage numeric_message = 4; + private com.openxc.BinaryMessages.NumericMessage numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NumericMessage, com.openxc.BinaryMessages.NumericMessage.Builder, com.openxc.BinaryMessages.NumericMessageOrBuilder> numericMessageBuilder_; + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public boolean hasNumericMessage() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public com.openxc.BinaryMessages.NumericMessage getNumericMessage() { + if (numericMessageBuilder_ == null) { + return numericMessage_; + } else { + return numericMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public Builder setNumericMessage(com.openxc.BinaryMessages.NumericMessage value) { + if (numericMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + numericMessage_ = value; + onChanged(); + } else { + numericMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public Builder setNumericMessage( + com.openxc.BinaryMessages.NumericMessage.Builder builderForValue) { + if (numericMessageBuilder_ == null) { + numericMessage_ = builderForValue.build(); + onChanged(); + } else { + numericMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public Builder mergeNumericMessage(com.openxc.BinaryMessages.NumericMessage value) { + if (numericMessageBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + numericMessage_ != com.openxc.BinaryMessages.NumericMessage.getDefaultInstance()) { + numericMessage_ = + com.openxc.BinaryMessages.NumericMessage.newBuilder(numericMessage_).mergeFrom(value).buildPartial(); + } else { + numericMessage_ = value; + } + onChanged(); + } else { + numericMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public Builder clearNumericMessage() { + if (numericMessageBuilder_ == null) { + numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); + onChanged(); + } else { + numericMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public com.openxc.BinaryMessages.NumericMessage.Builder getNumericMessageBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNumericMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + public com.openxc.BinaryMessages.NumericMessageOrBuilder getNumericMessageOrBuilder() { + if (numericMessageBuilder_ != null) { + return numericMessageBuilder_.getMessageOrBuilder(); + } else { + return numericMessage_; + } + } + /** + * optional .openxc.NumericMessage numeric_message = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NumericMessage, com.openxc.BinaryMessages.NumericMessage.Builder, com.openxc.BinaryMessages.NumericMessageOrBuilder> + getNumericMessageFieldBuilder() { + if (numericMessageBuilder_ == null) { + numericMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NumericMessage, com.openxc.BinaryMessages.NumericMessage.Builder, com.openxc.BinaryMessages.NumericMessageOrBuilder>( + numericMessage_, + getParentForChildren(), + isClean()); + numericMessage_ = null; + } + return numericMessageBuilder_; + } + + // optional .openxc.BooleanMessage boolean_message = 5; + private com.openxc.BinaryMessages.BooleanMessage booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.BooleanMessage, com.openxc.BinaryMessages.BooleanMessage.Builder, com.openxc.BinaryMessages.BooleanMessageOrBuilder> booleanMessageBuilder_; + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public boolean hasBooleanMessage() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public com.openxc.BinaryMessages.BooleanMessage getBooleanMessage() { + if (booleanMessageBuilder_ == null) { + return booleanMessage_; + } else { + return booleanMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public Builder setBooleanMessage(com.openxc.BinaryMessages.BooleanMessage value) { + if (booleanMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + booleanMessage_ = value; + onChanged(); + } else { + booleanMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public Builder setBooleanMessage( + com.openxc.BinaryMessages.BooleanMessage.Builder builderForValue) { + if (booleanMessageBuilder_ == null) { + booleanMessage_ = builderForValue.build(); + onChanged(); + } else { + booleanMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public Builder mergeBooleanMessage(com.openxc.BinaryMessages.BooleanMessage value) { + if (booleanMessageBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + booleanMessage_ != com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance()) { + booleanMessage_ = + com.openxc.BinaryMessages.BooleanMessage.newBuilder(booleanMessage_).mergeFrom(value).buildPartial(); + } else { + booleanMessage_ = value; + } + onChanged(); + } else { + booleanMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public Builder clearBooleanMessage() { + if (booleanMessageBuilder_ == null) { + booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); + onChanged(); + } else { + booleanMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public com.openxc.BinaryMessages.BooleanMessage.Builder getBooleanMessageBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBooleanMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + public com.openxc.BinaryMessages.BooleanMessageOrBuilder getBooleanMessageOrBuilder() { + if (booleanMessageBuilder_ != null) { + return booleanMessageBuilder_.getMessageOrBuilder(); + } else { + return booleanMessage_; + } + } + /** + * optional .openxc.BooleanMessage boolean_message = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.BooleanMessage, com.openxc.BinaryMessages.BooleanMessage.Builder, com.openxc.BinaryMessages.BooleanMessageOrBuilder> + getBooleanMessageFieldBuilder() { + if (booleanMessageBuilder_ == null) { + booleanMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.BooleanMessage, com.openxc.BinaryMessages.BooleanMessage.Builder, com.openxc.BinaryMessages.BooleanMessageOrBuilder>( + booleanMessage_, + getParentForChildren(), + isClean()); + booleanMessage_ = null; + } + return booleanMessageBuilder_; + } + + // optional .openxc.EventedStringMessage evented_string_message = 6; + private com.openxc.BinaryMessages.EventedStringMessage eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedStringMessage, com.openxc.BinaryMessages.EventedStringMessage.Builder, com.openxc.BinaryMessages.EventedStringMessageOrBuilder> eventedStringMessageBuilder_; + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public boolean hasEventedStringMessage() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public com.openxc.BinaryMessages.EventedStringMessage getEventedStringMessage() { + if (eventedStringMessageBuilder_ == null) { + return eventedStringMessage_; + } else { + return eventedStringMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public Builder setEventedStringMessage(com.openxc.BinaryMessages.EventedStringMessage value) { + if (eventedStringMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventedStringMessage_ = value; + onChanged(); + } else { + eventedStringMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public Builder setEventedStringMessage( + com.openxc.BinaryMessages.EventedStringMessage.Builder builderForValue) { + if (eventedStringMessageBuilder_ == null) { + eventedStringMessage_ = builderForValue.build(); + onChanged(); + } else { + eventedStringMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public Builder mergeEventedStringMessage(com.openxc.BinaryMessages.EventedStringMessage value) { + if (eventedStringMessageBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + eventedStringMessage_ != com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance()) { + eventedStringMessage_ = + com.openxc.BinaryMessages.EventedStringMessage.newBuilder(eventedStringMessage_).mergeFrom(value).buildPartial(); + } else { + eventedStringMessage_ = value; + } + onChanged(); + } else { + eventedStringMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public Builder clearEventedStringMessage() { + if (eventedStringMessageBuilder_ == null) { + eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); + onChanged(); + } else { + eventedStringMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public com.openxc.BinaryMessages.EventedStringMessage.Builder getEventedStringMessageBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getEventedStringMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + public com.openxc.BinaryMessages.EventedStringMessageOrBuilder getEventedStringMessageOrBuilder() { + if (eventedStringMessageBuilder_ != null) { + return eventedStringMessageBuilder_.getMessageOrBuilder(); + } else { + return eventedStringMessage_; + } + } + /** + * optional .openxc.EventedStringMessage evented_string_message = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedStringMessage, com.openxc.BinaryMessages.EventedStringMessage.Builder, com.openxc.BinaryMessages.EventedStringMessageOrBuilder> + getEventedStringMessageFieldBuilder() { + if (eventedStringMessageBuilder_ == null) { + eventedStringMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedStringMessage, com.openxc.BinaryMessages.EventedStringMessage.Builder, com.openxc.BinaryMessages.EventedStringMessageOrBuilder>( + eventedStringMessage_, + getParentForChildren(), + isClean()); + eventedStringMessage_ = null; + } + return eventedStringMessageBuilder_; + } + + // optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + private com.openxc.BinaryMessages.EventedBooleanMessage eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedBooleanMessage, com.openxc.BinaryMessages.EventedBooleanMessage.Builder, com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder> eventedBooleanMessageBuilder_; + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public boolean hasEventedBooleanMessage() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public com.openxc.BinaryMessages.EventedBooleanMessage getEventedBooleanMessage() { + if (eventedBooleanMessageBuilder_ == null) { + return eventedBooleanMessage_; + } else { + return eventedBooleanMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public Builder setEventedBooleanMessage(com.openxc.BinaryMessages.EventedBooleanMessage value) { + if (eventedBooleanMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventedBooleanMessage_ = value; + onChanged(); + } else { + eventedBooleanMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + return this; + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public Builder setEventedBooleanMessage( + com.openxc.BinaryMessages.EventedBooleanMessage.Builder builderForValue) { + if (eventedBooleanMessageBuilder_ == null) { + eventedBooleanMessage_ = builderForValue.build(); + onChanged(); + } else { + eventedBooleanMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + return this; + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public Builder mergeEventedBooleanMessage(com.openxc.BinaryMessages.EventedBooleanMessage value) { + if (eventedBooleanMessageBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040) && + eventedBooleanMessage_ != com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance()) { + eventedBooleanMessage_ = + com.openxc.BinaryMessages.EventedBooleanMessage.newBuilder(eventedBooleanMessage_).mergeFrom(value).buildPartial(); + } else { + eventedBooleanMessage_ = value; + } + onChanged(); + } else { + eventedBooleanMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + return this; + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public Builder clearEventedBooleanMessage() { + if (eventedBooleanMessageBuilder_ == null) { + eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); + onChanged(); + } else { + eventedBooleanMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public com.openxc.BinaryMessages.EventedBooleanMessage.Builder getEventedBooleanMessageBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getEventedBooleanMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + public com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder getEventedBooleanMessageOrBuilder() { + if (eventedBooleanMessageBuilder_ != null) { + return eventedBooleanMessageBuilder_.getMessageOrBuilder(); + } else { + return eventedBooleanMessage_; + } + } + /** + * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedBooleanMessage, com.openxc.BinaryMessages.EventedBooleanMessage.Builder, com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder> + getEventedBooleanMessageFieldBuilder() { + if (eventedBooleanMessageBuilder_ == null) { + eventedBooleanMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedBooleanMessage, com.openxc.BinaryMessages.EventedBooleanMessage.Builder, com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder>( + eventedBooleanMessage_, + getParentForChildren(), + isClean()); + eventedBooleanMessage_ = null; + } + return eventedBooleanMessageBuilder_; + } + + // optional .openxc.EventedNumericMessage evented_numeric_message = 8; + private com.openxc.BinaryMessages.EventedNumericMessage eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedNumericMessage, com.openxc.BinaryMessages.EventedNumericMessage.Builder, com.openxc.BinaryMessages.EventedNumericMessageOrBuilder> eventedNumericMessageBuilder_; + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public boolean hasEventedNumericMessage() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public com.openxc.BinaryMessages.EventedNumericMessage getEventedNumericMessage() { + if (eventedNumericMessageBuilder_ == null) { + return eventedNumericMessage_; + } else { + return eventedNumericMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public Builder setEventedNumericMessage(com.openxc.BinaryMessages.EventedNumericMessage value) { + if (eventedNumericMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventedNumericMessage_ = value; + onChanged(); + } else { + eventedNumericMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + return this; + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public Builder setEventedNumericMessage( + com.openxc.BinaryMessages.EventedNumericMessage.Builder builderForValue) { + if (eventedNumericMessageBuilder_ == null) { + eventedNumericMessage_ = builderForValue.build(); + onChanged(); + } else { + eventedNumericMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + return this; + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public Builder mergeEventedNumericMessage(com.openxc.BinaryMessages.EventedNumericMessage value) { + if (eventedNumericMessageBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080) && + eventedNumericMessage_ != com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance()) { + eventedNumericMessage_ = + com.openxc.BinaryMessages.EventedNumericMessage.newBuilder(eventedNumericMessage_).mergeFrom(value).buildPartial(); + } else { + eventedNumericMessage_ = value; + } + onChanged(); + } else { + eventedNumericMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + return this; + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public Builder clearEventedNumericMessage() { + if (eventedNumericMessageBuilder_ == null) { + eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); + onChanged(); + } else { + eventedNumericMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public com.openxc.BinaryMessages.EventedNumericMessage.Builder getEventedNumericMessageBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getEventedNumericMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + public com.openxc.BinaryMessages.EventedNumericMessageOrBuilder getEventedNumericMessageOrBuilder() { + if (eventedNumericMessageBuilder_ != null) { + return eventedNumericMessageBuilder_.getMessageOrBuilder(); + } else { + return eventedNumericMessage_; + } + } + /** + * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedNumericMessage, com.openxc.BinaryMessages.EventedNumericMessage.Builder, com.openxc.BinaryMessages.EventedNumericMessageOrBuilder> + getEventedNumericMessageFieldBuilder() { + if (eventedNumericMessageBuilder_ == null) { + eventedNumericMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.EventedNumericMessage, com.openxc.BinaryMessages.EventedNumericMessage.Builder, com.openxc.BinaryMessages.EventedNumericMessageOrBuilder>( + eventedNumericMessage_, + getParentForChildren(), + isClean()); + eventedNumericMessage_ = null; + } + return eventedNumericMessageBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) + } + + static { + defaultInstance = new VehicleMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) + } + + public interface RawMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional uint32 message_id = 2; + /** + * optional uint32 message_id = 2; + */ + boolean hasMessageId(); + /** + * optional uint32 message_id = 2; + */ + int getMessageId(); + } + /** + * Protobuf type {@code openxc.RawMessage} + */ + public static final class RawMessage extends + com.google.protobuf.GeneratedMessage + implements RawMessageOrBuilder { + // Use RawMessage.newBuilder() to construct. + private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final RawMessage defaultInstance; public static RawMessage getDefaultInstance() { return defaultInstance; } - public RawMessage getDefaultInstanceForType() { + public RawMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RawMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RawMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RawMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional uint32 message_id = 2; + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + private int messageId_; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + + private void initFields() { + bus_ = 0; + messageId_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, messageId_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, messageId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.RawMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.RawMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.RawMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + messageId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + } + + public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.RawMessage build() { + com.openxc.BinaryMessages.RawMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.RawMessage buildPartial() { + com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.messageId_ = messageId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.RawMessage) { + return mergeFrom((com.openxc.BinaryMessages.RawMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) { + if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasMessageId()) { + setMessageId(other.getMessageId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.RawMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 bus = 1; + private int bus_ ; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + /** + * optional int32 bus = 1; + */ + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); + return this; + } + /** + * optional int32 bus = 1; + */ + public Builder clearBus() { + bitField0_ = (bitField0_ & ~0x00000001); + bus_ = 0; + onChanged(); + return this; + } + + // optional uint32 message_id = 2; + private int messageId_ ; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + /** + * optional uint32 message_id = 2; + */ + public Builder setMessageId(int value) { + bitField0_ |= 0x00000002; + messageId_ = value; + onChanged(); + return this; + } + /** + * optional uint32 message_id = 2; + */ + public Builder clearMessageId() { + bitField0_ = (bitField0_ & ~0x00000002); + messageId_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.RawMessage) + } + + static { + defaultInstance = new RawMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.RawMessage) + } + + public interface StringMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional string value = 2; + /** + * optional string value = 2; + */ + boolean hasValue(); + /** + * optional string value = 2; + */ + java.lang.String getValue(); + /** + * optional string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + * Protobuf type {@code openxc.StringMessage} + */ + public static final class StringMessage extends + com.google.protobuf.GeneratedMessage + implements StringMessageOrBuilder { + // Use StringMessage.newBuilder() to construct. + private StringMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private StringMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final StringMessage defaultInstance; + public static StringMessage getDefaultInstance() { + return defaultInstance; + } + + public StringMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StringMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.StringMessage.class, com.openxc.BinaryMessages.StringMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StringMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StringMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + name_ = ""; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.StringMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.StringMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.StringMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.StringMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.StringMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.StringMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.StringMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.StringMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.StringMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.StringMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.StringMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.StringMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.StringMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.StringMessage.class, com.openxc.BinaryMessages.StringMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.StringMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_descriptor; + } + + public com.openxc.BinaryMessages.StringMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.StringMessage build() { + com.openxc.BinaryMessages.StringMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.StringMessage buildPartial() { + com.openxc.BinaryMessages.StringMessage result = new com.openxc.BinaryMessages.StringMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.StringMessage) { + return mergeFrom((com.openxc.BinaryMessages.StringMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.StringMessage other) { + if (other == com.openxc.BinaryMessages.StringMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.StringMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.StringMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional string value = 2; + private java.lang.Object value_ = ""; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.StringMessage) + } + + static { + defaultInstance = new StringMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.StringMessage) + } + + public interface NumericMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional double value = 2; + /** + * optional double value = 2; + */ + boolean hasValue(); + /** + * optional double value = 2; + */ + double getValue(); + } + /** + * Protobuf type {@code openxc.NumericMessage} + */ + public static final class NumericMessage extends + com.google.protobuf.GeneratedMessage + implements NumericMessageOrBuilder { + // Use NumericMessage.newBuilder() to construct. + private NumericMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private NumericMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final NumericMessage defaultInstance; + public static NumericMessage getDefaultInstance() { + return defaultInstance; + } + + public NumericMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NumericMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + value_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NumericMessage.class, com.openxc.BinaryMessages.NumericMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NumericMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional double value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private double value_; + /** + * optional double value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional double value = 2; + */ + public double getValue() { + return value_; + } + + private void initFields() { + name_ = ""; + value_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.NumericMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.NumericMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.NumericMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.NumericMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.NumericMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.NumericMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.NumericMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.NumericMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.NumericMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.NumericMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.NumericMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.NumericMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.NumericMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NumericMessage.class, com.openxc.BinaryMessages.NumericMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.NumericMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_descriptor; + } + + public com.openxc.BinaryMessages.NumericMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.NumericMessage build() { + com.openxc.BinaryMessages.NumericMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.NumericMessage buildPartial() { + com.openxc.BinaryMessages.NumericMessage result = new com.openxc.BinaryMessages.NumericMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.NumericMessage) { + return mergeFrom((com.openxc.BinaryMessages.NumericMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.NumericMessage other) { + if (other == com.openxc.BinaryMessages.NumericMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.NumericMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.NumericMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional double value = 2; + private double value_ ; + /** + * optional double value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional double value = 2; + */ + public double getValue() { + return value_; + } + /** + * optional double value = 2; + */ + public Builder setValue(double value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional double value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.NumericMessage) + } + + static { + defaultInstance = new NumericMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.NumericMessage) + } + + public interface BooleanMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional bool value = 2; + /** + * optional bool value = 2; + */ + boolean hasValue(); + /** + * optional bool value = 2; + */ + boolean getValue(); + } + /** + * Protobuf type {@code openxc.BooleanMessage} + */ + public static final class BooleanMessage extends + com.google.protobuf.GeneratedMessage + implements BooleanMessageOrBuilder { + // Use BooleanMessage.newBuilder() to construct. + private BooleanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private BooleanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final BooleanMessage defaultInstance; + public static BooleanMessage getDefaultInstance() { + return defaultInstance; + } + + public BooleanMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BooleanMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + value_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.BooleanMessage.class, com.openxc.BinaryMessages.BooleanMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public BooleanMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BooleanMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bool value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private boolean value_; + /** + * optional bool value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool value = 2; + */ + public boolean getValue() { + return value_; + } + + private void initFields() { + name_ = ""; + value_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.BooleanMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.BooleanMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.BooleanMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.BooleanMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.BooleanMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.BooleanMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.BooleanMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.BooleanMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.BooleanMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.BooleanMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.BooleanMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.BooleanMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.BooleanMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.BooleanMessage.class, com.openxc.BinaryMessages.BooleanMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.BooleanMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_descriptor; + } + + public com.openxc.BinaryMessages.BooleanMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.BooleanMessage build() { + com.openxc.BinaryMessages.BooleanMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.BooleanMessage buildPartial() { + com.openxc.BinaryMessages.BooleanMessage result = new com.openxc.BinaryMessages.BooleanMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.BooleanMessage) { + return mergeFrom((com.openxc.BinaryMessages.BooleanMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.BooleanMessage other) { + if (other == com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.BooleanMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.BooleanMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional bool value = 2; + private boolean value_ ; + /** + * optional bool value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool value = 2; + */ + public boolean getValue() { + return value_; + } + /** + * optional bool value = 2; + */ + public Builder setValue(boolean value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional bool value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.BooleanMessage) + } + + static { + defaultInstance = new BooleanMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.BooleanMessage) + } + + public interface EventedStringMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional string value = 2; + /** + * optional string value = 2; + */ + boolean hasValue(); + /** + * optional string value = 2; + */ + java.lang.String getValue(); + /** + * optional string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + + // optional string event = 3; + /** + * optional string event = 3; + */ + boolean hasEvent(); + /** + * optional string event = 3; + */ + java.lang.String getEvent(); + /** + * optional string event = 3; + */ + com.google.protobuf.ByteString + getEventBytes(); + } + /** + * Protobuf type {@code openxc.EventedStringMessage} + */ + public static final class EventedStringMessage extends + com.google.protobuf.GeneratedMessage + implements EventedStringMessageOrBuilder { + // Use EventedStringMessage.newBuilder() to construct. + private EventedStringMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private EventedStringMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final EventedStringMessage defaultInstance; + public static EventedStringMessage getDefaultInstance() { + return defaultInstance; + } + + public EventedStringMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EventedStringMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + event_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.EventedStringMessage.class, com.openxc.BinaryMessages.EventedStringMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public EventedStringMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EventedStringMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string event = 3; + public static final int EVENT_FIELD_NUMBER = 3; + private java.lang.Object event_; + /** + * optional string event = 3; + */ + public boolean hasEvent() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string event = 3; + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + event_ = s; + } + return s; + } + } + /** + * optional string event = 3; + */ + public com.google.protobuf.ByteString + getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + name_ = ""; + value_ = ""; + event_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getEventBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getEventBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.EventedStringMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.EventedStringMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.EventedStringMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.EventedStringMessage.class, com.openxc.BinaryMessages.EventedStringMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.EventedStringMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + event_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_descriptor; + } + + public com.openxc.BinaryMessages.EventedStringMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.EventedStringMessage build() { + com.openxc.BinaryMessages.EventedStringMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.EventedStringMessage buildPartial() { + com.openxc.BinaryMessages.EventedStringMessage result = new com.openxc.BinaryMessages.EventedStringMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.event_ = event_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.EventedStringMessage) { + return mergeFrom((com.openxc.BinaryMessages.EventedStringMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.EventedStringMessage other) { + if (other == com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); + } + if (other.hasEvent()) { + bitField0_ |= 0x00000004; + event_ = other.event_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.EventedStringMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.EventedStringMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional string value = 2; + private java.lang.Object value_ = ""; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + + // optional string event = 3; + private java.lang.Object event_ = ""; + /** + * optional string event = 3; + */ + public boolean hasEvent() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string event = 3; + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string event = 3; + */ + public com.google.protobuf.ByteString + getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string event = 3; + */ + public Builder setEvent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + event_ = value; + onChanged(); + return this; + } + /** + * optional string event = 3; + */ + public Builder clearEvent() { + bitField0_ = (bitField0_ & ~0x00000004); + event_ = getDefaultInstance().getEvent(); + onChanged(); + return this; + } + /** + * optional string event = 3; + */ + public Builder setEventBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + event_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.EventedStringMessage) + } + + static { + defaultInstance = new EventedStringMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.EventedStringMessage) + } + + public interface EventedBooleanMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional string value = 2; + /** + * optional string value = 2; + */ + boolean hasValue(); + /** + * optional string value = 2; + */ + java.lang.String getValue(); + /** + * optional string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + + // optional bool event = 3; + /** + * optional bool event = 3; + */ + boolean hasEvent(); + /** + * optional bool event = 3; + */ + boolean getEvent(); + } + /** + * Protobuf type {@code openxc.EventedBooleanMessage} + */ + public static final class EventedBooleanMessage extends + com.google.protobuf.GeneratedMessage + implements EventedBooleanMessageOrBuilder { + // Use EventedBooleanMessage.newBuilder() to construct. + private EventedBooleanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private EventedBooleanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final EventedBooleanMessage defaultInstance; + public static EventedBooleanMessage getDefaultInstance() { + return defaultInstance; + } + + public EventedBooleanMessage getDefaultInstanceForType() { return defaultInstance; } @@ -940,7 +4946,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private RawMessage( + private EventedBooleanMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -963,19 +4969,19 @@ public final class BinaryMessages { } break; } - case 8: { + case 10: { bitField0_ |= 0x00000001; - bus_ = input.readInt32(); + name_ = input.readBytes(); break; } - case 16: { + case 18: { bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); + value_ = input.readBytes(); break; } case 24: { bitField0_ |= 0x00000004; - data_ = input.readUInt64(); + event_ = input.readBool(); break; } } @@ -992,84 +4998,138 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + com.openxc.BinaryMessages.EventedBooleanMessage.class, com.openxc.BinaryMessages.EventedBooleanMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RawMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public EventedBooleanMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RawMessage(input, extensionRegistry); + return new EventedBooleanMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } - - private int bitField0_; - // optional int32 bus = 1; - public static final int BUS_FIELD_NUMBER = 1; - private int bus_; + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } /** - * optional int32 bus = 1; + * optional string name = 1; */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + // optional string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; /** - * optional int32 bus = 1; + * optional string value = 2; */ - public int getBus() { - return bus_; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - - // optional uint32 message_id = 2; - public static final int MESSAGE_ID_FIELD_NUMBER = 2; - private int messageId_; /** - * optional uint32 message_id = 2; + * optional string value = 2; */ - public boolean hasMessageId() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } } /** - * optional uint32 message_id = 2; + * optional string value = 2; */ - public int getMessageId() { - return messageId_; + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional uint64 data = 3; - public static final int DATA_FIELD_NUMBER = 3; - private long data_; + // optional bool event = 3; + public static final int EVENT_FIELD_NUMBER = 3; + private boolean event_; /** - * optional uint64 data = 3; + * optional bool event = 3; */ - public boolean hasData() { + public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional uint64 data = 3; + * optional bool event = 3; */ - public long getData() { - return data_; + public boolean getEvent() { + return event_; } private void initFields() { - bus_ = 0; - messageId_ = 0; - data_ = 0L; + name_ = ""; + value_ = ""; + event_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1084,13 +5144,13 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, bus_); + output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, messageId_); + output.writeBytes(2, getValueBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt64(3, data_); + output.writeBool(3, event_); } getUnknownFields().writeTo(output); } @@ -1103,15 +5163,15 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, bus_); + .computeBytesSize(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, messageId_); + .computeBytesSize(2, getValueBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, data_); + .computeBoolSize(3, event_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1125,53 +5185,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.EventedBooleanMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.EventedBooleanMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1180,7 +5240,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.EventedBooleanMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1192,24 +5252,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.RawMessage} + * Protobuf type {@code openxc.EventedBooleanMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.RawMessageOrBuilder { + implements com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + com.openxc.BinaryMessages.EventedBooleanMessage.class, com.openxc.BinaryMessages.EventedBooleanMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.EventedBooleanMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1229,11 +5289,11 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - bus_ = 0; + name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - messageId_ = 0; + value_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - data_ = 0L; + event_ = false; bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -1244,61 +5304,65 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_descriptor; } - public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.EventedBooleanMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.RawMessage build() { - com.openxc.BinaryMessages.RawMessage result = buildPartial(); + public com.openxc.BinaryMessages.EventedBooleanMessage build() { + com.openxc.BinaryMessages.EventedBooleanMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.RawMessage buildPartial() { - com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this); + public com.openxc.BinaryMessages.EventedBooleanMessage buildPartial() { + com.openxc.BinaryMessages.EventedBooleanMessage result = new com.openxc.BinaryMessages.EventedBooleanMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.bus_ = bus_; + result.name_ = name_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.messageId_ = messageId_; + result.value_ = value_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.data_ = data_; + result.event_ = event_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.RawMessage) { - return mergeFrom((com.openxc.BinaryMessages.RawMessage)other); + if (other instanceof com.openxc.BinaryMessages.EventedBooleanMessage) { + return mergeFrom((com.openxc.BinaryMessages.EventedBooleanMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) { - if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this; - if (other.hasBus()) { - setBus(other.getBus()); + public Builder mergeFrom(com.openxc.BinaryMessages.EventedBooleanMessage other) { + if (other == com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); } - if (other.hasMessageId()) { - setMessageId(other.getMessageId()); + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); } - if (other.hasData()) { - setData(other.getData()); + if (other.hasEvent()) { + setEvent(other.getEvent()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -1312,11 +5376,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.RawMessage parsedMessage = null; + com.openxc.BinaryMessages.EventedBooleanMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.EventedBooleanMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1327,223 +5391,260 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; - private int bus_ ; + // optional string name = 1; + private java.lang.Object name_ = ""; /** - * optional int32 bus = 1; + * optional string name = 1; */ - public boolean hasBus() { + public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 bus = 1; + * optional string name = 1; */ - public int getBus() { - return bus_; + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional int32 bus = 1; + * optional string name = 1; */ - public Builder setBus(int value) { - bitField0_ |= 0x00000001; - bus_ = value; + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; onChanged(); return this; } /** - * optional int32 bus = 1; + * optional string name = 1; */ - public Builder clearBus() { + public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); - bus_ = 0; + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; onChanged(); return this; } - // optional uint32 message_id = 2; - private int messageId_ ; + // optional string value = 2; + private java.lang.Object value_ = ""; /** - * optional uint32 message_id = 2; + * optional string value = 2; */ - public boolean hasMessageId() { + public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional uint32 message_id = 2; + * optional string value = 2; */ - public int getMessageId() { - return messageId_; + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional uint32 message_id = 2; + * optional string value = 2; */ - public Builder setMessageId(int value) { - bitField0_ |= 0x00000002; - messageId_ = value; + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; onChanged(); return this; } /** - * optional uint32 message_id = 2; + * optional string value = 2; */ - public Builder clearMessageId() { + public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000002); - messageId_ = 0; + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; onChanged(); return this; } - // optional uint64 data = 3; - private long data_ ; + // optional bool event = 3; + private boolean event_ ; /** - * optional uint64 data = 3; + * optional bool event = 3; */ - public boolean hasData() { + public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional uint64 data = 3; + * optional bool event = 3; */ - public long getData() { - return data_; + public boolean getEvent() { + return event_; } /** - * optional uint64 data = 3; + * optional bool event = 3; */ - public Builder setData(long value) { + public Builder setEvent(boolean value) { bitField0_ |= 0x00000004; - data_ = value; + event_ = value; onChanged(); return this; } /** - * optional uint64 data = 3; + * optional bool event = 3; */ - public Builder clearData() { + public Builder clearEvent() { bitField0_ = (bitField0_ & ~0x00000004); - data_ = 0L; + event_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.RawMessage) + // @@protoc_insertion_point(builder_scope:openxc.EventedBooleanMessage) } static { - defaultInstance = new RawMessage(true); + defaultInstance = new EventedBooleanMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.RawMessage) + // @@protoc_insertion_point(class_scope:openxc.EventedBooleanMessage) } - public interface TranslatedMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional string string_value = 2; - /** - * optional string string_value = 2; - */ - boolean hasStringValue(); - /** - * optional string string_value = 2; - */ - java.lang.String getStringValue(); - /** - * optional string string_value = 2; - */ - com.google.protobuf.ByteString - getStringValueBytes(); + public interface EventedNumericMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { - // optional double numerical_value = 3; - /** - * optional double numerical_value = 3; - */ - boolean hasNumericalValue(); + // optional string name = 1; /** - * optional double numerical_value = 3; + * optional string name = 1; */ - double getNumericalValue(); - - // optional bool boolean_value = 4; + boolean hasName(); /** - * optional bool boolean_value = 4; + * optional string name = 1; */ - boolean hasBooleanValue(); + java.lang.String getName(); /** - * optional bool boolean_value = 4; + * optional string name = 1; */ - boolean getBooleanValue(); + com.google.protobuf.ByteString + getNameBytes(); - // optional string string_event = 5; + // optional string value = 2; /** - * optional string string_event = 5; + * optional string value = 2; */ - boolean hasStringEvent(); + boolean hasValue(); /** - * optional string string_event = 5; + * optional string value = 2; */ - java.lang.String getStringEvent(); + java.lang.String getValue(); /** - * optional string string_event = 5; + * optional string value = 2; */ com.google.protobuf.ByteString - getStringEventBytes(); - - // optional double numerical_event = 6; - /** - * optional double numerical_event = 6; - */ - boolean hasNumericalEvent(); - /** - * optional double numerical_event = 6; - */ - double getNumericalEvent(); + getValueBytes(); - // optional bool boolean_event = 7; + // optional double event = 3; /** - * optional bool boolean_event = 7; + * optional double event = 3; */ - boolean hasBooleanEvent(); + boolean hasEvent(); /** - * optional bool boolean_event = 7; + * optional double event = 3; */ - boolean getBooleanEvent(); + double getEvent(); } /** - * Protobuf type {@code openxc.TranslatedMessage} + * Protobuf type {@code openxc.EventedNumericMessage} */ - public static final class TranslatedMessage extends + public static final class EventedNumericMessage extends com.google.protobuf.GeneratedMessage - implements TranslatedMessageOrBuilder { - // Use TranslatedMessage.newBuilder() to construct. - private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements EventedNumericMessageOrBuilder { + // Use EventedNumericMessage.newBuilder() to construct. + private EventedNumericMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private EventedNumericMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final TranslatedMessage defaultInstance; - public static TranslatedMessage getDefaultInstance() { + private static final EventedNumericMessage defaultInstance; + public static EventedNumericMessage getDefaultInstance() { return defaultInstance; } - public TranslatedMessage getDefaultInstanceForType() { + public EventedNumericMessage getDefaultInstanceForType() { return defaultInstance; } @@ -1553,7 +5654,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private TranslatedMessage( + private EventedNumericMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1583,32 +5684,12 @@ public final class BinaryMessages { } case 18: { bitField0_ |= 0x00000002; - stringValue_ = input.readBytes(); + value_ = input.readBytes(); break; } case 25: { bitField0_ |= 0x00000004; - numericalValue_ = input.readDouble(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - booleanValue_ = input.readBool(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - stringEvent_ = input.readBytes(); - break; - } - case 49: { - bitField0_ |= 0x00000020; - numericalEvent_ = input.readDouble(); - break; - } - case 56: { - bitField0_ |= 0x00000040; - booleanEvent_ = input.readBool(); + event_ = input.readDouble(); break; } } @@ -1625,28 +5706,28 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + com.openxc.BinaryMessages.EventedNumericMessage.class, com.openxc.BinaryMessages.EventedNumericMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TranslatedMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public EventedNumericMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslatedMessage(input, extensionRegistry); + return new EventedNumericMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @@ -1694,20 +5775,20 @@ public final class BinaryMessages { } } - // optional string string_value = 2; - public static final int STRING_VALUE_FIELD_NUMBER = 2; - private java.lang.Object stringValue_; + // optional string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; /** - * optional string string_value = 2; + * optional string value = 2; */ - public boolean hasStringValue() { + public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string string_value = 2; + * optional string value = 2; */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; + public java.lang.String getValue() { + java.lang.Object ref = value_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -1715,143 +5796,48 @@ public final class BinaryMessages { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - stringValue_ = s; + value_ = s; } return s; } } /** - * optional string string_value = 2; + * optional string value = 2; */ public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; + getValueBytes() { + java.lang.Object ref = value_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - stringValue_ = b; + value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // optional double numerical_value = 3; - public static final int NUMERICAL_VALUE_FIELD_NUMBER = 3; - private double numericalValue_; + // optional double event = 3; + public static final int EVENT_FIELD_NUMBER = 3; + private double event_; /** - * optional double numerical_value = 3; + * optional double event = 3; */ - public boolean hasNumericalValue() { + public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional double numerical_value = 3; - */ - public double getNumericalValue() { - return numericalValue_; - } - - // optional bool boolean_value = 4; - public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; - private boolean booleanValue_; - /** - * optional bool boolean_value = 4; - */ - public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool boolean_value = 4; - */ - public boolean getBooleanValue() { - return booleanValue_; - } - - // optional string string_event = 5; - public static final int STRING_EVENT_FIELD_NUMBER = 5; - private java.lang.Object stringEvent_; - /** - * optional string string_event = 5; - */ - public boolean hasStringEvent() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional string string_event = 5; - */ - public java.lang.String getStringEvent() { - java.lang.Object ref = stringEvent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stringEvent_ = s; - } - return s; - } - } - /** - * optional string string_event = 5; - */ - public com.google.protobuf.ByteString - getStringEventBytes() { - java.lang.Object ref = stringEvent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringEvent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional double numerical_event = 6; - public static final int NUMERICAL_EVENT_FIELD_NUMBER = 6; - private double numericalEvent_; - /** - * optional double numerical_event = 6; - */ - public boolean hasNumericalEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional double numerical_event = 6; - */ - public double getNumericalEvent() { - return numericalEvent_; - } - - // optional bool boolean_event = 7; - public static final int BOOLEAN_EVENT_FIELD_NUMBER = 7; - private boolean booleanEvent_; - /** - * optional bool boolean_event = 7; - */ - public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool boolean_event = 7; + * optional double event = 3; */ - public boolean getBooleanEvent() { - return booleanEvent_; + public double getEvent() { + return event_; } private void initFields() { name_ = ""; - stringValue_ = ""; - numericalValue_ = 0D; - booleanValue_ = false; - stringEvent_ = ""; - numericalEvent_ = 0D; - booleanEvent_ = false; + value_ = ""; + event_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1869,22 +5855,10 @@ public final class BinaryMessages { output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getStringValueBytes()); + output.writeBytes(2, getValueBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeDouble(3, numericalValue_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, booleanValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getStringEventBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeDouble(6, numericalEvent_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBool(7, booleanEvent_); + output.writeDouble(3, event_); } getUnknownFields().writeTo(output); } @@ -1901,27 +5875,11 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getStringValueBytes()); + .computeBytesSize(2, getValueBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, numericalValue_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, booleanValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getStringEventBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(6, numericalEvent_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, booleanEvent_); + .computeDoubleSize(3, event_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1935,53 +5893,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.EventedNumericMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.EventedNumericMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1990,7 +5948,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.EventedNumericMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2002,24 +5960,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.TranslatedMessage} + * Protobuf type {@code openxc.EventedNumericMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder { + implements com.openxc.BinaryMessages.EventedNumericMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + com.openxc.BinaryMessages.EventedNumericMessage.class, com.openxc.BinaryMessages.EventedNumericMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.EventedNumericMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2041,18 +5999,10 @@ public final class BinaryMessages { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - stringValue_ = ""; + value_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - numericalValue_ = 0D; + event_ = 0D; bitField0_ = (bitField0_ & ~0x00000004); - booleanValue_ = false; - bitField0_ = (bitField0_ & ~0x00000008); - stringEvent_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - numericalEvent_ = 0D; - bitField0_ = (bitField0_ & ~0x00000020); - booleanEvent_ = false; - bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -2062,23 +6012,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_descriptor; } - public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.EventedNumericMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.TranslatedMessage build() { - com.openxc.BinaryMessages.TranslatedMessage result = buildPartial(); + public com.openxc.BinaryMessages.EventedNumericMessage build() { + com.openxc.BinaryMessages.EventedNumericMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.TranslatedMessage buildPartial() { - com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this); + public com.openxc.BinaryMessages.EventedNumericMessage buildPartial() { + com.openxc.BinaryMessages.EventedNumericMessage result = new com.openxc.BinaryMessages.EventedNumericMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2088,69 +6038,39 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.stringValue_ = stringValue_; + result.value_ = value_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.numericalValue_ = numericalValue_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.booleanValue_ = booleanValue_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.stringEvent_ = stringEvent_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.numericalEvent_ = numericalEvent_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.booleanEvent_ = booleanEvent_; + result.event_ = event_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) { - return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other); + if (other instanceof com.openxc.BinaryMessages.EventedNumericMessage) { + return mergeFrom((com.openxc.BinaryMessages.EventedNumericMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) { - if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.EventedNumericMessage other) { + if (other == com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } - if (other.hasStringValue()) { + if (other.hasValue()) { bitField0_ |= 0x00000002; - stringValue_ = other.stringValue_; + value_ = other.value_; onChanged(); } - if (other.hasNumericalValue()) { - setNumericalValue(other.getNumericalValue()); - } - if (other.hasBooleanValue()) { - setBooleanValue(other.getBooleanValue()); - } - if (other.hasStringEvent()) { - bitField0_ |= 0x00000010; - stringEvent_ = other.stringEvent_; - onChanged(); - } - if (other.hasNumericalEvent()) { - setNumericalEvent(other.getNumericalEvent()); - } - if (other.hasBooleanEvent()) { - setBooleanEvent(other.getBooleanEvent()); + if (other.hasEvent()) { + setEvent(other.getEvent()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2164,11 +6084,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null; + com.openxc.BinaryMessages.EventedNumericMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.EventedNumericMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2253,295 +6173,122 @@ public final class BinaryMessages { return this; } - // optional string string_value = 2; - private java.lang.Object stringValue_ = ""; + // optional string value = 2; + private java.lang.Object value_ = ""; /** - * optional string string_value = 2; + * optional string value = 2; */ - public boolean hasStringValue() { + public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string string_value = 2; + * optional string value = 2; */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; + public java.lang.String getValue() { + java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); - stringValue_ = s; + value_ = s; return s; } else { return (java.lang.String) ref; } } /** - * optional string string_value = 2; + * optional string value = 2; */ public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; + getValueBytes() { + java.lang.Object ref = value_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - stringValue_ = b; + value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string string_value = 2; + * optional string value = 2; */ - public Builder setStringValue( + public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - stringValue_ = value; + value_ = value; onChanged(); return this; } /** - * optional string string_value = 2; + * optional string value = 2; */ - public Builder clearStringValue() { + public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000002); - stringValue_ = getDefaultInstance().getStringValue(); + value_ = getDefaultInstance().getValue(); onChanged(); return this; } /** - * optional string string_value = 2; + * optional string value = 2; */ - public Builder setStringValueBytes( + public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - stringValue_ = value; + value_ = value; onChanged(); return this; } - // optional double numerical_value = 3; - private double numericalValue_ ; + // optional double event = 3; + private double event_ ; /** - * optional double numerical_value = 3; + * optional double event = 3; */ - public boolean hasNumericalValue() { + public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional double numerical_value = 3; + * optional double event = 3; */ - public double getNumericalValue() { - return numericalValue_; + public double getEvent() { + return event_; } /** - * optional double numerical_value = 3; + * optional double event = 3; */ - public Builder setNumericalValue(double value) { + public Builder setEvent(double value) { bitField0_ |= 0x00000004; - numericalValue_ = value; + event_ = value; onChanged(); return this; } /** - * optional double numerical_value = 3; + * optional double event = 3; */ - public Builder clearNumericalValue() { + public Builder clearEvent() { bitField0_ = (bitField0_ & ~0x00000004); - numericalValue_ = 0D; - onChanged(); - return this; - } - - // optional bool boolean_value = 4; - private boolean booleanValue_ ; - /** - * optional bool boolean_value = 4; - */ - public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool boolean_value = 4; - */ - public boolean getBooleanValue() { - return booleanValue_; - } - /** - * optional bool boolean_value = 4; - */ - public Builder setBooleanValue(boolean value) { - bitField0_ |= 0x00000008; - booleanValue_ = value; - onChanged(); - return this; - } - /** - * optional bool boolean_value = 4; - */ - public Builder clearBooleanValue() { - bitField0_ = (bitField0_ & ~0x00000008); - booleanValue_ = false; - onChanged(); - return this; - } - - // optional string string_event = 5; - private java.lang.Object stringEvent_ = ""; - /** - * optional string string_event = 5; - */ - public boolean hasStringEvent() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional string string_event = 5; - */ - public java.lang.String getStringEvent() { - java.lang.Object ref = stringEvent_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - stringEvent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string string_event = 5; - */ - public com.google.protobuf.ByteString - getStringEventBytes() { - java.lang.Object ref = stringEvent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringEvent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string string_event = 5; - */ - public Builder setStringEvent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - stringEvent_ = value; - onChanged(); - return this; - } - /** - * optional string string_event = 5; - */ - public Builder clearStringEvent() { - bitField0_ = (bitField0_ & ~0x00000010); - stringEvent_ = getDefaultInstance().getStringEvent(); - onChanged(); - return this; - } - /** - * optional string string_event = 5; - */ - public Builder setStringEventBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - stringEvent_ = value; - onChanged(); - return this; - } - - // optional double numerical_event = 6; - private double numericalEvent_ ; - /** - * optional double numerical_event = 6; - */ - public boolean hasNumericalEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional double numerical_event = 6; - */ - public double getNumericalEvent() { - return numericalEvent_; - } - /** - * optional double numerical_event = 6; - */ - public Builder setNumericalEvent(double value) { - bitField0_ |= 0x00000020; - numericalEvent_ = value; - onChanged(); - return this; - } - /** - * optional double numerical_event = 6; - */ - public Builder clearNumericalEvent() { - bitField0_ = (bitField0_ & ~0x00000020); - numericalEvent_ = 0D; - onChanged(); - return this; - } - - // optional bool boolean_event = 7; - private boolean booleanEvent_ ; - /** - * optional bool boolean_event = 7; - */ - public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool boolean_event = 7; - */ - public boolean getBooleanEvent() { - return booleanEvent_; - } - /** - * optional bool boolean_event = 7; - */ - public Builder setBooleanEvent(boolean value) { - bitField0_ |= 0x00000040; - booleanEvent_ = value; - onChanged(); - return this; - } - /** - * optional bool boolean_event = 7; - */ - public Builder clearBooleanEvent() { - bitField0_ = (bitField0_ & ~0x00000040); - booleanEvent_ = false; + event_ = 0D; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) + // @@protoc_insertion_point(builder_scope:openxc.EventedNumericMessage) } static { - defaultInstance = new TranslatedMessage(true); + defaultInstance = new EventedNumericMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) + // @@protoc_insertion_point(class_scope:openxc.EventedNumericMessage) } private static com.google.protobuf.Descriptors.Descriptor @@ -2555,10 +6302,35 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_RawMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_TranslatedMessage_descriptor; + internal_static_openxc_StringMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_StringMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_NumericMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_NumericMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_BooleanMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_BooleanMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_EventedStringMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_EventedStringMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_EventedBooleanMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_TranslatedMessage_fieldAccessorTable; + internal_static_openxc_EventedBooleanMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_EventedNumericMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_EventedNumericMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -2568,18 +6340,31 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\274\001\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\232\004\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\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + - "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + - "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\255\001\n\021T" + - "ranslatedMessage\022\014\n\004name\030\001 \001(\t\022\024\n\014string" + - "_value\030\002 \001(\t\022\027\n\017numerical_value\030\003 \001(\001\022\025\n" + - "\rboolean_value\030\004 \001(\010\022\024\n\014string_event\030\005 \001", - "(\t\022\027\n\017numerical_event\030\006 \001(\001\022\025\n\rboolean_e" + - "vent\030\007 \001(\010B\034\n\ncom.openxcB\016BinaryMessages" + "ssage\022-\n\016string_message\030\003 \001(\0132\025.openxc.S" + + "tringMessage\022/\n\017numeric_message\030\004 \001(\0132\026." + + "openxc.NumericMessage\022/\n\017boolean_message" + + "\030\005 \001(\0132\026.openxc.BooleanMessage\022<\n\026evente" + + "d_string_message\030\006 \001(\0132\034.openxc.EventedS" + + "tringMessage\022>\n\027evented_boolean_message\030" + + "\007 \001(\0132\035.openxc.EventedBooleanMessage\022>\n\027", + "evented_numeric_message\030\010 \001(\0132\035.openxc.E" + + "ventedNumericMessage\"e\n\004Type\022\007\n\003RAW\020\001\022\n\n" + + "\006STRING\020\002\022\010\n\004BOOL\020\003\022\007\n\003NUM\020\004\022\017\n\013EVENTED_" + + "NUM\020\005\022\022\n\016EVENTED_STRING\020\006\022\020\n\014EVENTED_BOO" + + "L\020\007\"-\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_id\030\002 \001(\r\",\n\rStringMessage\022\014\n\004name\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t\"-\n\016NumericMessage\022\014\n\004na" + + "me\030\001 \001(\t\022\r\n\005value\030\002 \001(\001\"-\n\016BooleanMessag" + + "e\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\010\"B\n\024Evente" + + "dStringMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 ", + "\001(\t\022\r\n\005event\030\003 \001(\t\"C\n\025EventedBooleanMess" + + "age\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005even" + + "t\030\003 \001(\010\"C\n\025EventedNumericMessage\022\014\n\004name" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005event\030\003 \001(\001B\034\n\n" + + "com.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -2591,19 +6376,49 @@ 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", }); + new java.lang.String[] { "Type", "RawMessage", "StringMessage", "NumericMessage", "BooleanMessage", "EventedStringMessage", "EventedBooleanMessage", "EventedNumericMessage", }); internal_static_openxc_RawMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", }); - internal_static_openxc_TranslatedMessage_descriptor = + new java.lang.String[] { "Bus", "MessageId", }); + internal_static_openxc_StringMessage_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_openxc_TranslatedMessage_fieldAccessorTable = new + internal_static_openxc_StringMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_StringMessage_descriptor, + new java.lang.String[] { "Name", "Value", }); + internal_static_openxc_NumericMessage_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_openxc_NumericMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_NumericMessage_descriptor, + new java.lang.String[] { "Name", "Value", }); + internal_static_openxc_BooleanMessage_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_openxc_BooleanMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_BooleanMessage_descriptor, + new java.lang.String[] { "Name", "Value", }); + internal_static_openxc_EventedStringMessage_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_openxc_EventedStringMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_EventedStringMessage_descriptor, + new java.lang.String[] { "Name", "Value", "Event", }); + internal_static_openxc_EventedBooleanMessage_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_openxc_EventedBooleanMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_EventedBooleanMessage_descriptor, + new java.lang.String[] { "Name", "Value", "Event", }); + internal_static_openxc_EventedNumericMessage_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_openxc_EventedNumericMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_TranslatedMessage_descriptor, - new java.lang.String[] { "Name", "StringValue", "NumericalValue", "BooleanValue", "StringEvent", "NumericalEvent", "BooleanEvent", }); + internal_static_openxc_EventedNumericMessage_descriptor, + new java.lang.String[] { "Name", "Value", "Event", }); return null; } }; diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 5b311a2e..6c773033 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\"\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\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x9a\x04\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-\n\x0estring_message\x18\x03 \x01(\x0b\x32\x15.openxc.StringMessage\x12/\n\x0fnumeric_message\x18\x04 \x01(\x0b\x32\x16.openxc.NumericMessage\x12/\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32\x16.openxc.BooleanMessage\x12<\n\x16\x65vented_string_message\x18\x06 \x01(\x0b\x32\x1c.openxc.EventedStringMessage\x12>\n\x17\x65vented_boolean_message\x18\x07 \x01(\x0b\x32\x1d.openxc.EventedBooleanMessage\x12>\n\x17\x65vented_numeric_message\x18\x08 \x01(\x0b\x32\x1d.openxc.EventedNumericMessage\"e\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x07\n\x03NUM\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x12\n\x0e\x45VENTED_STRING\x10\x06\x12\x10\n\x0c\x45VENTED_BOOL\x10\x07\"-\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\",\n\rStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"-\n\x0eNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"-\n\x0e\x42ooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08\"B\n\x14\x45ventedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\t\"C\n\x15\x45ventedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x08\"C\n\x15\x45ventedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x01\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -28,14 +28,34 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( options=None, type=None), _descriptor.EnumValueDescriptor( - name='TRANSLATED', index=1, number=2, + name='STRING', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BOOL', index=2, number=3, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NUM', index=3, number=4, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EVENTED_NUM', index=4, number=5, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EVENTED_STRING', index=5, number=6, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EVENTED_BOOL', index=6, number=7, options=None, type=None), ], containing_type=None, options=None, - serialized_start=182, - serialized_end=213, + serialized_start=462, + serialized_end=563, ) @@ -61,12 +81,47 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='translated_message', full_name='openxc.VehicleMessage.translated_message', index=2, + name='string_message', full_name='openxc.VehicleMessage.string_message', index=2, number=3, 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), + _descriptor.FieldDescriptor( + name='numeric_message', full_name='openxc.VehicleMessage.numeric_message', index=3, + number=4, 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), + _descriptor.FieldDescriptor( + name='boolean_message', full_name='openxc.VehicleMessage.boolean_message', 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), + _descriptor.FieldDescriptor( + name='evented_string_message', full_name='openxc.VehicleMessage.evented_string_message', index=5, + number=6, 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), + _descriptor.FieldDescriptor( + name='evented_boolean_message', full_name='openxc.VehicleMessage.evented_boolean_message', index=6, + number=7, 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), + _descriptor.FieldDescriptor( + name='evented_numeric_message', full_name='openxc.VehicleMessage.evented_numeric_message', index=7, + number=8, 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=[ ], @@ -78,7 +133,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=213, + serialized_end=563, ) @@ -103,9 +158,72 @@ _RAWMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=565, + serialized_end=610, +) + + +_STRINGMESSAGE = _descriptor.Descriptor( + name='StringMessage', + full_name='openxc.StringMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.StringMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.StringMessage.value', index=1, + number=2, 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, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=612, + serialized_end=656, +) + + +_NUMERICMESSAGE = _descriptor.Descriptor( + name='NumericMessage', + full_name='openxc.NumericMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ _descriptor.FieldDescriptor( - name='data', full_name='openxc.RawMessage.data', index=2, - number=3, type=4, cpp_type=4, label=1, + name='name', full_name='openxc.NumericMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.NumericMessage.value', index=1, + number=2, 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, @@ -119,64 +237,155 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=215, - serialized_end=274, + serialized_start=658, + serialized_end=703, +) + + +_BOOLEANMESSAGE = _descriptor.Descriptor( + name='BooleanMessage', + full_name='openxc.BooleanMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='openxc.BooleanMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.BooleanMessage.value', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=705, + serialized_end=750, ) -_TRANSLATEDMESSAGE = _descriptor.Descriptor( - name='TranslatedMessage', - full_name='openxc.TranslatedMessage', +_EVENTEDSTRINGMESSAGE = _descriptor.Descriptor( + name='EventedStringMessage', + full_name='openxc.EventedStringMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedMessage.name', index=0, + name='name', full_name='openxc.EventedStringMessage.name', index=0, number=1, 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, options=None), _descriptor.FieldDescriptor( - name='string_value', full_name='openxc.TranslatedMessage.string_value', index=1, + name='value', full_name='openxc.EventedStringMessage.value', index=1, number=2, 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, options=None), _descriptor.FieldDescriptor( - name='numerical_value', full_name='openxc.TranslatedMessage.numerical_value', index=2, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + name='event', full_name='openxc.EventedStringMessage.event', index=2, + number=3, 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, options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=752, + serialized_end=818, +) + + +_EVENTEDBOOLEANMESSAGE = _descriptor.Descriptor( + name='EventedBooleanMessage', + full_name='openxc.EventedBooleanMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ _descriptor.FieldDescriptor( - name='boolean_value', full_name='openxc.TranslatedMessage.boolean_value', index=3, - number=4, type=8, cpp_type=7, label=1, + name='name', full_name='openxc.EventedBooleanMessage.name', index=0, + number=1, 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, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.EventedBooleanMessage.value', index=1, + number=2, 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, + options=None), + _descriptor.FieldDescriptor( + name='event', full_name='openxc.EventedBooleanMessage.event', index=2, + number=3, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=820, + serialized_end=887, +) + + +_EVENTEDNUMERICMESSAGE = _descriptor.Descriptor( + name='EventedNumericMessage', + full_name='openxc.EventedNumericMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ _descriptor.FieldDescriptor( - name='string_event', full_name='openxc.TranslatedMessage.string_event', index=4, - number=5, type=9, cpp_type=9, label=1, + name='name', full_name='openxc.EventedNumericMessage.name', index=0, + number=1, 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, options=None), _descriptor.FieldDescriptor( - name='numerical_event', full_name='openxc.TranslatedMessage.numerical_event', index=5, - number=6, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + name='value', full_name='openxc.EventedNumericMessage.value', index=1, + number=2, 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, options=None), _descriptor.FieldDescriptor( - name='boolean_event', full_name='openxc.TranslatedMessage.boolean_event', index=6, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, + name='event', full_name='openxc.EventedNumericMessage.event', index=2, + number=3, 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), @@ -189,17 +398,27 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=277, - serialized_end=450, + serialized_start=889, + serialized_end=956, ) _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['string_message'].message_type = _STRINGMESSAGE +_VEHICLEMESSAGE.fields_by_name['numeric_message'].message_type = _NUMERICMESSAGE +_VEHICLEMESSAGE.fields_by_name['boolean_message'].message_type = _BOOLEANMESSAGE +_VEHICLEMESSAGE.fields_by_name['evented_string_message'].message_type = _EVENTEDSTRINGMESSAGE +_VEHICLEMESSAGE.fields_by_name['evented_boolean_message'].message_type = _EVENTEDBOOLEANMESSAGE +_VEHICLEMESSAGE.fields_by_name['evented_numeric_message'].message_type = _EVENTEDNUMERICMESSAGE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE -DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE +DESCRIPTOR.message_types_by_name['StringMessage'] = _STRINGMESSAGE +DESCRIPTOR.message_types_by_name['NumericMessage'] = _NUMERICMESSAGE +DESCRIPTOR.message_types_by_name['BooleanMessage'] = _BOOLEANMESSAGE +DESCRIPTOR.message_types_by_name['EventedStringMessage'] = _EVENTEDSTRINGMESSAGE +DESCRIPTOR.message_types_by_name['EventedBooleanMessage'] = _EVENTEDBOOLEANMESSAGE +DESCRIPTOR.message_types_by_name['EventedNumericMessage'] = _EVENTEDNUMERICMESSAGE class VehicleMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType @@ -213,11 +432,41 @@ class RawMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.RawMessage) -class TranslatedMessage(_message.Message): +class StringMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _STRINGMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.StringMessage) + +class NumericMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _NUMERICMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.NumericMessage) + +class BooleanMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _BOOLEANMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.BooleanMessage) + +class EventedStringMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _EVENTEDSTRINGMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.EventedStringMessage) + +class EventedBooleanMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _EVENTEDBOOLEANMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.EventedBooleanMessage) + +class EventedNumericMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDMESSAGE + DESCRIPTOR = _EVENTEDNUMERICMESSAGE - # @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) + # @@protoc_insertion_point(class_scope:openxc.EventedNumericMessage) DESCRIPTOR.has_options = True diff --git a/openxc.proto b/openxc.proto index 9f9046eb..54133432 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,30 +4,62 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; TRANSLATED = 2; } + enum Type { RAW = 1; + STRING = 2; + BOOL = 3; + NUM = 4; + EVENTED_NUM = 5; + EVENTED_STRING = 6; + EVENTED_BOOL = 7; + } optional Type type = 1; optional RawMessage raw_message = 2; - optional TranslatedMessage translated_message = 3; + optional StringMessage string_message = 3; + optional NumericMessage numeric_message = 4; + optional BooleanMessage boolean_message = 5; + optional EventedStringMessage evented_string_message = 6; + optional EventedBooleanMessage evented_boolean_message = 7; + optional EventedNumericMessage evented_numeric_message = 8; } message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; - optional uint64 data = 3; } -message TranslatedMessage { +message StringMessage { optional string name = 1; + optional string value = 2; +} - optional string string_value = 2; - optional double numerical_value = 3; - optional bool boolean_value = 4; +message NumericMessage { + optional string name = 1; + optional double value = 2; +} - optional string string_event = 5; - optional double numerical_event = 6; - optional bool boolean_event = 7; +message BooleanMessage { + optional string name = 1; + optional bool value = 2; +} + +message EventedStringMessage { + optional string name = 1; + optional string value = 2; + optional string event = 3; +} + +message EventedBooleanMessage { + optional string name = 1; + optional string value = 2; + optional bool event = 3; +} + +message EventedNumericMessage { + optional string name = 1; + optional string value = 2; + optional double event = 3; } // TODO we should also consider having an enum type, having each specific -- cgit 1.2.3-korg From a1b4117678436b6956d9c244c1b19d9e3694bc78 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 23 Oct 2013 09:55:14 -0400 Subject: Restore accidentally deleted data field from raw message. --- gen/cpp/openxc.pb | 7 ++- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 11 ++-- gen/java/com/openxc/BinaryMessages.java | 105 ++++++++++++++++++++++++++++---- gen/python/openxc_pb2.py | 35 ++++++----- openxc.proto | 1 + 6 files changed, 129 insertions(+), 35 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 7efe870c..348c1ae0 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Ú +è openxc.protoopenxc"š VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -18,12 +18,13 @@ NUM EVENTED_NUM EVENTED_STRING - EVENTED_BOOL"- + EVENTED_BOOL"; RawMessage bus ( -message_id ( ", +message_id (  +data (", StringMessage name (  value ( "- diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 541c6b0c..943a8951 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.4-dev at Wed Oct 23 08:59:20 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 23 09:56:27 2013. */ #include "openxc.pb.h" @@ -17,9 +17,10 @@ const pb_field_t openxc_VehicleMessage_fields[9] = { PB_LAST_FIELD }; -const pb_field_t openxc_RawMessage_fields[3] = { +const pb_field_t openxc_RawMessage_fields[4] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), + PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 389c09c9..c18a640a 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.4-dev at Wed Oct 23 08:59:20 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 23 09:56:27 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -67,6 +67,8 @@ typedef struct _openxc_RawMessage { int32_t bus; bool has_message_id; uint32_t message_id; + bool has_data; + uint64_t data; } openxc_RawMessage; typedef struct _openxc_StringMessage { @@ -113,6 +115,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_NumericMessage_value_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 +#define openxc_RawMessage_data_tag 3 #define openxc_StringMessage_name_tag 1 #define openxc_StringMessage_value_tag 2 #define openxc_VehicleMessage_type_tag 1 @@ -126,7 +129,7 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[9]; -extern const pb_field_t openxc_RawMessage_fields[3]; +extern const pb_field_t openxc_RawMessage_fields[4]; extern const pb_field_t openxc_StringMessage_fields[3]; extern const pb_field_t openxc_NumericMessage_fields[3]; extern const pb_field_t openxc_BooleanMessage_fields[3]; @@ -135,8 +138,8 @@ extern const pb_field_t openxc_EventedBooleanMessage_fields[4]; extern const pb_field_t openxc_EventedNumericMessage_fields[4]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 1180 -#define openxc_RawMessage_size 12 +#define openxc_VehicleMessage_size 1191 +#define openxc_RawMessage_size 23 #define openxc_StringMessage_size 204 #define openxc_NumericMessage_size 111 #define openxc_BooleanMessage_size 104 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index a2932845..79df3f32 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1906,6 +1906,16 @@ public final class BinaryMessages { * optional uint32 message_id = 2; */ int getMessageId(); + + // optional uint64 data = 3; + /** + * optional uint64 data = 3; + */ + boolean hasData(); + /** + * optional uint64 data = 3; + */ + long getData(); } /** * Protobuf type {@code openxc.RawMessage} @@ -1968,6 +1978,11 @@ public final class BinaryMessages { messageId_ = input.readUInt32(); break; } + case 24: { + bitField0_ |= 0x00000004; + data_ = input.readUInt64(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2040,9 +2055,26 @@ public final class BinaryMessages { return messageId_; } + // optional uint64 data = 3; + public static final int DATA_FIELD_NUMBER = 3; + private long data_; + /** + * optional uint64 data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint64 data = 3; + */ + public long getData() { + return data_; + } + private void initFields() { bus_ = 0; messageId_ = 0; + data_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2062,6 +2094,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, messageId_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt64(3, data_); + } getUnknownFields().writeTo(output); } @@ -2079,6 +2114,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, messageId_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, data_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2199,6 +2238,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); messageId_ = 0; bitField0_ = (bitField0_ & ~0x00000002); + data_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -2235,6 +2276,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000002; } result.messageId_ = messageId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.data_ = data_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2257,6 +2302,9 @@ public final class BinaryMessages { if (other.hasMessageId()) { setMessageId(other.getMessageId()); } + if (other.hasData()) { + setData(other.getData()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2350,6 +2398,39 @@ public final class BinaryMessages { return this; } + // optional uint64 data = 3; + private long data_ ; + /** + * optional uint64 data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint64 data = 3; + */ + public long getData() { + return data_; + } + /** + * optional uint64 data = 3; + */ + public Builder setData(long value) { + bitField0_ |= 0x00000004; + data_ = value; + onChanged(); + return this; + } + /** + * optional uint64 data = 3; + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000004); + data_ = 0L; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.RawMessage) } @@ -6354,17 +6435,17 @@ public final class BinaryMessages { "ventedNumericMessage\"e\n\004Type\022\007\n\003RAW\020\001\022\n\n" + "\006STRING\020\002\022\010\n\004BOOL\020\003\022\007\n\003NUM\020\004\022\017\n\013EVENTED_" + "NUM\020\005\022\022\n\016EVENTED_STRING\020\006\022\020\n\014EVENTED_BOO" + - "L\020\007\"-\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_id\030\002 \001(\r\",\n\rStringMessage\022\014\n\004name\030\001 \001(" + - "\t\022\r\n\005value\030\002 \001(\t\"-\n\016NumericMessage\022\014\n\004na" + - "me\030\001 \001(\t\022\r\n\005value\030\002 \001(\001\"-\n\016BooleanMessag" + - "e\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\010\"B\n\024Evente" + - "dStringMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 ", - "\001(\t\022\r\n\005event\030\003 \001(\t\"C\n\025EventedBooleanMess" + - "age\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005even" + - "t\030\003 \001(\010\"C\n\025EventedNumericMessage\022\014\n\004name" + - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005event\030\003 \001(\001B\034\n\n" + - "com.openxcB\016BinaryMessages" + "L\020\007\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\",\n\rStringMessag" + + "e\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"-\n\016Numeri" + + "cMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\001\"-\n" + + "\016BooleanMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\010\"B\n\024EventedStringMessage\022\014\n\004name\030\001 \001", + "(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005event\030\003 \001(\t\"C\n\025Even" + + "tedBooleanMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t\022\r\n\005event\030\003 \001(\010\"C\n\025EventedNumericM" + + "essage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005e" + + "vent\030\003 \001(\001B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -6382,7 +6463,7 @@ public final class BinaryMessages { internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", }); + new java.lang.String[] { "Bus", "MessageId", "Data", }); internal_static_openxc_StringMessage_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_openxc_StringMessage_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 6c773033..e5086b7f 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\"\x9a\x04\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-\n\x0estring_message\x18\x03 \x01(\x0b\x32\x15.openxc.StringMessage\x12/\n\x0fnumeric_message\x18\x04 \x01(\x0b\x32\x16.openxc.NumericMessage\x12/\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32\x16.openxc.BooleanMessage\x12<\n\x16\x65vented_string_message\x18\x06 \x01(\x0b\x32\x1c.openxc.EventedStringMessage\x12>\n\x17\x65vented_boolean_message\x18\x07 \x01(\x0b\x32\x1d.openxc.EventedBooleanMessage\x12>\n\x17\x65vented_numeric_message\x18\x08 \x01(\x0b\x32\x1d.openxc.EventedNumericMessage\"e\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x07\n\x03NUM\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x12\n\x0e\x45VENTED_STRING\x10\x06\x12\x10\n\x0c\x45VENTED_BOOL\x10\x07\"-\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\",\n\rStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"-\n\x0eNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"-\n\x0e\x42ooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08\"B\n\x14\x45ventedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\t\"C\n\x15\x45ventedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x08\"C\n\x15\x45ventedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x01\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x9a\x04\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-\n\x0estring_message\x18\x03 \x01(\x0b\x32\x15.openxc.StringMessage\x12/\n\x0fnumeric_message\x18\x04 \x01(\x0b\x32\x16.openxc.NumericMessage\x12/\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32\x16.openxc.BooleanMessage\x12<\n\x16\x65vented_string_message\x18\x06 \x01(\x0b\x32\x1c.openxc.EventedStringMessage\x12>\n\x17\x65vented_boolean_message\x18\x07 \x01(\x0b\x32\x1d.openxc.EventedBooleanMessage\x12>\n\x17\x65vented_numeric_message\x18\x08 \x01(\x0b\x32\x1d.openxc.EventedNumericMessage\"e\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x07\n\x03NUM\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x12\n\x0e\x45VENTED_STRING\x10\x06\x12\x10\n\x0c\x45VENTED_BOOL\x10\x07\";\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\",\n\rStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"-\n\x0eNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"-\n\x0e\x42ooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08\"B\n\x14\x45ventedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\t\"C\n\x15\x45ventedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x08\"C\n\x15\x45ventedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x01\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -158,6 +158,13 @@ _RAWMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='data', full_name='openxc.RawMessage.data', index=2, + number=3, type=4, cpp_type=4, 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), ], extensions=[ ], @@ -168,7 +175,7 @@ _RAWMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=565, - serialized_end=610, + serialized_end=624, ) @@ -202,8 +209,8 @@ _STRINGMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=612, - serialized_end=656, + serialized_start=626, + serialized_end=670, ) @@ -237,8 +244,8 @@ _NUMERICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=658, - serialized_end=703, + serialized_start=672, + serialized_end=717, ) @@ -272,8 +279,8 @@ _BOOLEANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=705, - serialized_end=750, + serialized_start=719, + serialized_end=764, ) @@ -314,8 +321,8 @@ _EVENTEDSTRINGMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=752, - serialized_end=818, + serialized_start=766, + serialized_end=832, ) @@ -356,8 +363,8 @@ _EVENTEDBOOLEANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=820, - serialized_end=887, + serialized_start=834, + serialized_end=901, ) @@ -398,8 +405,8 @@ _EVENTEDNUMERICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=889, - serialized_end=956, + serialized_start=903, + serialized_end=970, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 54133432..1af84365 100644 --- a/openxc.proto +++ b/openxc.proto @@ -27,6 +27,7 @@ message VehicleMessage { message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; + optional uint64 data = 3; } message StringMessage { -- cgit 1.2.3-korg From bcb6928c19945a4e48d33ae3a4f1f8b48df3eeec Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 24 Oct 2013 09:56:02 -0400 Subject: Revert "Restore accidentally deleted data field from raw message." This reverts commit e4a78ec9935af3b19d314e88b0ed935789162ca8. --- gen/cpp/openxc.pb | 7 +-- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 11 ++-- gen/java/com/openxc/BinaryMessages.java | 105 ++++---------------------------- gen/python/openxc_pb2.py | 35 +++++------ openxc.proto | 1 - 6 files changed, 35 insertions(+), 129 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 348c1ae0..7efe870c 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -è +Ú openxc.protoopenxc"š VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -18,13 +18,12 @@ NUM EVENTED_NUM EVENTED_STRING - EVENTED_BOOL"; + EVENTED_BOOL"- RawMessage bus ( -message_id (  -data (", +message_id ( ", StringMessage name (  value ( "- diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 943a8951..541c6b0c 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.4-dev at Wed Oct 23 09:56:27 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 23 08:59:20 2013. */ #include "openxc.pb.h" @@ -17,10 +17,9 @@ const pb_field_t openxc_VehicleMessage_fields[9] = { PB_LAST_FIELD }; -const pb_field_t openxc_RawMessage_fields[4] = { +const pb_field_t openxc_RawMessage_fields[3] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index c18a640a..389c09c9 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.4-dev at Wed Oct 23 09:56:27 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 23 08:59:20 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -67,8 +67,6 @@ typedef struct _openxc_RawMessage { int32_t bus; bool has_message_id; uint32_t message_id; - bool has_data; - uint64_t data; } openxc_RawMessage; typedef struct _openxc_StringMessage { @@ -115,7 +113,6 @@ typedef struct _openxc_VehicleMessage { #define openxc_NumericMessage_value_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 -#define openxc_RawMessage_data_tag 3 #define openxc_StringMessage_name_tag 1 #define openxc_StringMessage_value_tag 2 #define openxc_VehicleMessage_type_tag 1 @@ -129,7 +126,7 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[9]; -extern const pb_field_t openxc_RawMessage_fields[4]; +extern const pb_field_t openxc_RawMessage_fields[3]; extern const pb_field_t openxc_StringMessage_fields[3]; extern const pb_field_t openxc_NumericMessage_fields[3]; extern const pb_field_t openxc_BooleanMessage_fields[3]; @@ -138,8 +135,8 @@ extern const pb_field_t openxc_EventedBooleanMessage_fields[4]; extern const pb_field_t openxc_EventedNumericMessage_fields[4]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 1191 -#define openxc_RawMessage_size 23 +#define openxc_VehicleMessage_size 1180 +#define openxc_RawMessage_size 12 #define openxc_StringMessage_size 204 #define openxc_NumericMessage_size 111 #define openxc_BooleanMessage_size 104 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 79df3f32..a2932845 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1906,16 +1906,6 @@ public final class BinaryMessages { * optional uint32 message_id = 2; */ int getMessageId(); - - // optional uint64 data = 3; - /** - * optional uint64 data = 3; - */ - boolean hasData(); - /** - * optional uint64 data = 3; - */ - long getData(); } /** * Protobuf type {@code openxc.RawMessage} @@ -1978,11 +1968,6 @@ public final class BinaryMessages { messageId_ = input.readUInt32(); break; } - case 24: { - bitField0_ |= 0x00000004; - data_ = input.readUInt64(); - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2055,26 +2040,9 @@ public final class BinaryMessages { return messageId_; } - // optional uint64 data = 3; - public static final int DATA_FIELD_NUMBER = 3; - private long data_; - /** - * optional uint64 data = 3; - */ - public boolean hasData() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint64 data = 3; - */ - public long getData() { - return data_; - } - private void initFields() { bus_ = 0; messageId_ = 0; - data_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2094,9 +2062,6 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, messageId_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt64(3, data_); - } getUnknownFields().writeTo(output); } @@ -2114,10 +2079,6 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, messageId_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, data_); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2238,8 +2199,6 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); messageId_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - data_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -2276,10 +2235,6 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000002; } result.messageId_ = messageId_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.data_ = data_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2302,9 +2257,6 @@ public final class BinaryMessages { if (other.hasMessageId()) { setMessageId(other.getMessageId()); } - if (other.hasData()) { - setData(other.getData()); - } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2398,39 +2350,6 @@ public final class BinaryMessages { return this; } - // optional uint64 data = 3; - private long data_ ; - /** - * optional uint64 data = 3; - */ - public boolean hasData() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional uint64 data = 3; - */ - public long getData() { - return data_; - } - /** - * optional uint64 data = 3; - */ - public Builder setData(long value) { - bitField0_ |= 0x00000004; - data_ = value; - onChanged(); - return this; - } - /** - * optional uint64 data = 3; - */ - public Builder clearData() { - bitField0_ = (bitField0_ & ~0x00000004); - data_ = 0L; - onChanged(); - return this; - } - // @@protoc_insertion_point(builder_scope:openxc.RawMessage) } @@ -6435,17 +6354,17 @@ public final class BinaryMessages { "ventedNumericMessage\"e\n\004Type\022\007\n\003RAW\020\001\022\n\n" + "\006STRING\020\002\022\010\n\004BOOL\020\003\022\007\n\003NUM\020\004\022\017\n\013EVENTED_" + "NUM\020\005\022\022\n\016EVENTED_STRING\020\006\022\020\n\014EVENTED_BOO" + - "L\020\007\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\",\n\rStringMessag" + - "e\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"-\n\016Numeri" + - "cMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\001\"-\n" + - "\016BooleanMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002" + - " \001(\010\"B\n\024EventedStringMessage\022\014\n\004name\030\001 \001", - "(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005event\030\003 \001(\t\"C\n\025Even" + - "tedBooleanMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value" + - "\030\002 \001(\t\022\r\n\005event\030\003 \001(\010\"C\n\025EventedNumericM" + - "essage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005e" + - "vent\030\003 \001(\001B\034\n\ncom.openxcB\016BinaryMessages" + "L\020\007\"-\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_id\030\002 \001(\r\",\n\rStringMessage\022\014\n\004name\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t\"-\n\016NumericMessage\022\014\n\004na" + + "me\030\001 \001(\t\022\r\n\005value\030\002 \001(\001\"-\n\016BooleanMessag" + + "e\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\010\"B\n\024Evente" + + "dStringMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 ", + "\001(\t\022\r\n\005event\030\003 \001(\t\"C\n\025EventedBooleanMess" + + "age\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005even" + + "t\030\003 \001(\010\"C\n\025EventedNumericMessage\022\014\n\004name" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005event\030\003 \001(\001B\034\n\n" + + "com.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -6463,7 +6382,7 @@ public final class BinaryMessages { internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", }); + new java.lang.String[] { "Bus", "MessageId", }); internal_static_openxc_StringMessage_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_openxc_StringMessage_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index e5086b7f..6c773033 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\"\x9a\x04\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-\n\x0estring_message\x18\x03 \x01(\x0b\x32\x15.openxc.StringMessage\x12/\n\x0fnumeric_message\x18\x04 \x01(\x0b\x32\x16.openxc.NumericMessage\x12/\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32\x16.openxc.BooleanMessage\x12<\n\x16\x65vented_string_message\x18\x06 \x01(\x0b\x32\x1c.openxc.EventedStringMessage\x12>\n\x17\x65vented_boolean_message\x18\x07 \x01(\x0b\x32\x1d.openxc.EventedBooleanMessage\x12>\n\x17\x65vented_numeric_message\x18\x08 \x01(\x0b\x32\x1d.openxc.EventedNumericMessage\"e\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x07\n\x03NUM\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x12\n\x0e\x45VENTED_STRING\x10\x06\x12\x10\n\x0c\x45VENTED_BOOL\x10\x07\";\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\",\n\rStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"-\n\x0eNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"-\n\x0e\x42ooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08\"B\n\x14\x45ventedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\t\"C\n\x15\x45ventedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x08\"C\n\x15\x45ventedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x01\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x9a\x04\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-\n\x0estring_message\x18\x03 \x01(\x0b\x32\x15.openxc.StringMessage\x12/\n\x0fnumeric_message\x18\x04 \x01(\x0b\x32\x16.openxc.NumericMessage\x12/\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32\x16.openxc.BooleanMessage\x12<\n\x16\x65vented_string_message\x18\x06 \x01(\x0b\x32\x1c.openxc.EventedStringMessage\x12>\n\x17\x65vented_boolean_message\x18\x07 \x01(\x0b\x32\x1d.openxc.EventedBooleanMessage\x12>\n\x17\x65vented_numeric_message\x18\x08 \x01(\x0b\x32\x1d.openxc.EventedNumericMessage\"e\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x07\n\x03NUM\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x12\n\x0e\x45VENTED_STRING\x10\x06\x12\x10\n\x0c\x45VENTED_BOOL\x10\x07\"-\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\",\n\rStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"-\n\x0eNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"-\n\x0e\x42ooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08\"B\n\x14\x45ventedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\t\"C\n\x15\x45ventedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x08\"C\n\x15\x45ventedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x01\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -158,13 +158,6 @@ _RAWMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( - name='data', full_name='openxc.RawMessage.data', index=2, - number=3, type=4, cpp_type=4, 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), ], extensions=[ ], @@ -175,7 +168,7 @@ _RAWMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=565, - serialized_end=624, + serialized_end=610, ) @@ -209,8 +202,8 @@ _STRINGMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=626, - serialized_end=670, + serialized_start=612, + serialized_end=656, ) @@ -244,8 +237,8 @@ _NUMERICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=672, - serialized_end=717, + serialized_start=658, + serialized_end=703, ) @@ -279,8 +272,8 @@ _BOOLEANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=719, - serialized_end=764, + serialized_start=705, + serialized_end=750, ) @@ -321,8 +314,8 @@ _EVENTEDSTRINGMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=766, - serialized_end=832, + serialized_start=752, + serialized_end=818, ) @@ -363,8 +356,8 @@ _EVENTEDBOOLEANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=834, - serialized_end=901, + serialized_start=820, + serialized_end=887, ) @@ -405,8 +398,8 @@ _EVENTEDNUMERICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=903, - serialized_end=970, + serialized_start=889, + serialized_end=956, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 1af84365..54133432 100644 --- a/openxc.proto +++ b/openxc.proto @@ -27,7 +27,6 @@ message VehicleMessage { message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; - optional uint64 data = 3; } message StringMessage { -- cgit 1.2.3-korg From 25dcef2e59fed31f0bba291a9a08f5021e371cf8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 24 Oct 2013 09:56:07 -0400 Subject: Revert "Switch back to many subtypes for binary messages." This reverts commit 3e954ea9c44bdd00b39d3f0d2cc43662e633c891. --- benchmark/proto/compare_sizes.py | 35 +- gen/cpp/openxc.pb | 54 +- gen/cpp/openxc.pb.c | 62 +- gen/cpp/openxc.pb.h | 136 +- gen/java/com/openxc/BinaryMessages.java | 5455 +++++-------------------------- gen/python/openxc_pb2.py | 319 +- openxc.proto | 52 +- 7 files changed, 938 insertions(+), 5175 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index 1fb96030..e4ae6691 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -40,35 +40,14 @@ for trace_file in sys.argv[1:]: message.raw_message.data = int(json_message['data'], 0) total_raw_binary_size += len(message.SerializeToString()) else: - if 'event' in json_message: - if isinstance(json_message['event'], bool): - message.type = openxc_pb2.VehicleMessage.EVENTED_BOOL - message.evented_boolean_message.name = json_message['name'] - message.evented_boolean_message.value = json_message['value'] - message.evented_boolean_message.event = json_message['event'] - elif isinstance(json_message['event'], numbers.Number): - message.type = openxc_pb2.VehicleMessage.EVENTED_NUM - message.evented_numeric_message.name = json_message['name'] - message.evented_numeric_message.value = json_message['value'] - message.evented_numeric_message.event = json_message['event'] - else: - message.type = openxc_pb2.VehicleMessage.EVENTED_STRING - message.evented_string_message.name = json_message['name'] - message.evented_string_message.value = json_message['value'] - message.evented_numeric_message.event = json_message['event'] + message.type = openxc_pb2.VehicleMessage.TRANSLATED + message.translated_message.name = json_message['name'] + if isinstance(json_message['value'], bool): + message.translated_message.boolean_value = json_message['value'] + elif isinstance(json_message['value'], numbers.Number): + message.translated_message.numerical_value = json_message['value'] else: - if isinstance(json_message['value'], bool): - message.type = openxc_pb2.VehicleMessage.BOOL - message.boolean_message.name = json_message['name'] - message.boolean_message.value = json_message['value'] - elif isinstance(json_message['value'], numbers.Number): - message.type = openxc_pb2.VehicleMessage.NUM - message.numeric_message.name = json_message['name'] - message.numeric_message.value = json_message['value'] - else: - message.type = openxc_pb2.VehicleMessage.STRING - message.string_message.name = json_message['name'] - message.string_message.value = json_message['value'] + message.translated_message.string_value = json_message['value'] total_translated_json_size += len(json.dumps(json_message)) total_translated_binary_size += len(message.SerializeToString()) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 7efe870c..d4356e1c 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,49 +1,27 @@ -Ú - openxc.protoopenxc"š +à + openxc.protoopenxc"¼ VehicleMessage) type (2.openxc.VehicleMessage.Type' - raw_message ( 2.openxc.RawMessage- -string_message ( 2.openxc.StringMessage/ -numeric_message ( 2.openxc.NumericMessage/ -boolean_message ( 2.openxc.BooleanMessage< -evented_string_message ( 2.openxc.EventedStringMessage> -evented_boolean_message ( 2.openxc.EventedBooleanMessage> -evented_numeric_message ( 2.openxc.EventedNumericMessage"e + raw_message ( 2.openxc.RawMessage5 +translated_message ( 2.openxc.TranslatedMessage" Type -RAW +RAW -STRING -BOOL -NUM - EVENTED_NUM -EVENTED_STRING - EVENTED_BOOL"- +TRANSLATED"; RawMessage bus ( -message_id ( ", - StringMessage -name (  -value ( "- -NumericMessage -name (  -value ("- -BooleanMessage -name (  -value ("B -EventedStringMessage -name (  -value (  -event ( "C -EventedBooleanMessage -name (  -value (  -event ("C -EventedNumericMessage -name (  -value (  -event (B +message_id (  +data ("­ +TranslatedMessage +name (  + string_value (  +numerical_value ( + boolean_value ( + string_event (  +numerical_event ( + boolean_event (B com.openxcBBinaryMessages \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 541c6b0c..91667bf3 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,75 +1,43 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.4-dev at Wed Oct 23 08:59:20 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 9 14:26:13 2013. */ #include "openxc.pb.h" -const pb_field_t openxc_VehicleMessage_fields[9] = { +const pb_field_t openxc_VehicleMessage_fields[4] = { 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, string_message, raw_message, &openxc_StringMessage_fields), - PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, numeric_message, string_message, &openxc_NumericMessage_fields), - PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, boolean_message, numeric_message, &openxc_BooleanMessage_fields), - PB_FIELD2( 6, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, evented_string_message, boolean_message, &openxc_EventedStringMessage_fields), - PB_FIELD2( 7, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, evented_boolean_message, evented_string_message, &openxc_EventedBooleanMessage_fields), - PB_FIELD2( 8, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, evented_numeric_message, evented_boolean_message, &openxc_EventedNumericMessage_fields), + PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields), PB_LAST_FIELD }; -const pb_field_t openxc_RawMessage_fields[3] = { +const pb_field_t openxc_RawMessage_fields[4] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), + PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; -const pb_field_t openxc_StringMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_StringMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_StringMessage, value, name, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_NumericMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_NumericMessage, name, name, 0), - PB_FIELD2( 2, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_NumericMessage, value, name, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_BooleanMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_BooleanMessage, name, name, 0), - PB_FIELD2( 2, BOOL , OPTIONAL, STATIC, OTHER, openxc_BooleanMessage, value, name, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_EventedStringMessage_fields[4] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_EventedStringMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedStringMessage, value, name, 0), - PB_FIELD2( 3, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedStringMessage, event, value, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_EventedBooleanMessage_fields[4] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_EventedBooleanMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedBooleanMessage, value, name, 0), - PB_FIELD2( 3, BOOL , OPTIONAL, STATIC, OTHER, openxc_EventedBooleanMessage, event, value, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_EventedNumericMessage_fields[4] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_EventedNumericMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_EventedNumericMessage, value, name, 0), - PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_EventedNumericMessage, event, value, 0), +const pb_field_t openxc_TranslatedMessage_fields[8] = { + PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedMessage, name, name, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_value, name, 0), + PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_value, string_value, 0), + PB_FIELD2( 4, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_value, numerical_value, 0), + PB_FIELD2( 5, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), + PB_FIELD2( 6, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_event, string_event, 0), + PB_FIELD2( 7, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_event, numerical_event, 0), PB_LAST_FIELD }; /* 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, string_message) < 256 && pb_membersize(openxc_VehicleMessage, numeric_message) < 256 && pb_membersize(openxc_VehicleMessage, boolean_message) < 256 && pb_membersize(openxc_VehicleMessage, evented_string_message) < 256 && pb_membersize(openxc_VehicleMessage, evented_boolean_message) < 256 && pb_membersize(openxc_VehicleMessage, evented_numeric_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_StringMessage_openxc_NumericMessage_openxc_BooleanMessage_openxc_EventedStringMessage_openxc_EventedBooleanMessage_openxc_EventedNumericMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, string_message) < 65536 && pb_membersize(openxc_VehicleMessage, numeric_message) < 65536 && pb_membersize(openxc_VehicleMessage, boolean_message) < 65536 && pb_membersize(openxc_VehicleMessage, evented_string_message) < 65536 && pb_membersize(openxc_VehicleMessage, evented_boolean_message) < 65536 && pb_membersize(openxc_VehicleMessage, evented_numeric_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_StringMessage_openxc_NumericMessage_openxc_BooleanMessage_openxc_EventedStringMessage_openxc_EventedBooleanMessage_openxc_EventedNumericMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_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 389c09c9..d278c681 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.4-dev at Wed Oct 23 08:59:20 2013. */ +/* Generated by nanopb-0.2.4-dev at Wed Oct 9 14:26:13 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -12,137 +12,71 @@ extern "C" { /* Enum definitions */ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_RAW = 1, - openxc_VehicleMessage_Type_STRING = 2, - openxc_VehicleMessage_Type_BOOL = 3, - openxc_VehicleMessage_Type_NUM = 4, - openxc_VehicleMessage_Type_EVENTED_NUM = 5, - openxc_VehicleMessage_Type_EVENTED_STRING = 6, - openxc_VehicleMessage_Type_EVENTED_BOOL = 7 + openxc_VehicleMessage_Type_TRANSLATED = 2 } openxc_VehicleMessage_Type; /* Struct definitions */ -typedef struct _openxc_BooleanMessage { - bool has_name; - char name[100]; - bool has_value; - bool value; -} openxc_BooleanMessage; - -typedef struct _openxc_EventedBooleanMessage { - bool has_name; - char name[100]; - bool has_value; - char value[100]; - bool has_event; - bool event; -} openxc_EventedBooleanMessage; - -typedef struct _openxc_EventedNumericMessage { - bool has_name; - char name[100]; - bool has_value; - char value[100]; - bool has_event; - double event; -} openxc_EventedNumericMessage; - -typedef struct _openxc_EventedStringMessage { - bool has_name; - char name[100]; - bool has_value; - char value[100]; - bool has_event; - char event[100]; -} openxc_EventedStringMessage; - -typedef struct _openxc_NumericMessage { - bool has_name; - char name[100]; - bool has_value; - double value; -} openxc_NumericMessage; - typedef struct _openxc_RawMessage { bool has_bus; int32_t bus; bool has_message_id; uint32_t message_id; + bool has_data; + uint64_t data; } openxc_RawMessage; -typedef struct _openxc_StringMessage { +typedef struct _openxc_TranslatedMessage { bool has_name; char name[100]; - bool has_value; - char value[100]; -} openxc_StringMessage; + bool has_string_value; + char string_value[100]; + bool has_numerical_value; + double numerical_value; + bool has_boolean_value; + bool boolean_value; + bool has_string_event; + char string_event[100]; + bool has_numerical_event; + double numerical_event; + bool has_boolean_event; + bool boolean_event; +} openxc_TranslatedMessage; typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; bool has_raw_message; openxc_RawMessage raw_message; - bool has_string_message; - openxc_StringMessage string_message; - bool has_numeric_message; - openxc_NumericMessage numeric_message; - bool has_boolean_message; - openxc_BooleanMessage boolean_message; - bool has_evented_string_message; - openxc_EventedStringMessage evented_string_message; - bool has_evented_boolean_message; - openxc_EventedBooleanMessage evented_boolean_message; - bool has_evented_numeric_message; - openxc_EventedNumericMessage evented_numeric_message; + bool has_translated_message; + openxc_TranslatedMessage translated_message; } openxc_VehicleMessage; /* Default values for struct fields */ /* Field tags (for use in manual encoding/decoding) */ -#define openxc_BooleanMessage_name_tag 1 -#define openxc_BooleanMessage_value_tag 2 -#define openxc_EventedBooleanMessage_name_tag 1 -#define openxc_EventedBooleanMessage_value_tag 2 -#define openxc_EventedBooleanMessage_event_tag 3 -#define openxc_EventedNumericMessage_name_tag 1 -#define openxc_EventedNumericMessage_value_tag 2 -#define openxc_EventedNumericMessage_event_tag 3 -#define openxc_EventedStringMessage_name_tag 1 -#define openxc_EventedStringMessage_value_tag 2 -#define openxc_EventedStringMessage_event_tag 3 -#define openxc_NumericMessage_name_tag 1 -#define openxc_NumericMessage_value_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 -#define openxc_StringMessage_name_tag 1 -#define openxc_StringMessage_value_tag 2 +#define openxc_RawMessage_data_tag 3 +#define openxc_TranslatedMessage_name_tag 1 +#define openxc_TranslatedMessage_string_value_tag 2 +#define openxc_TranslatedMessage_numerical_value_tag 3 +#define openxc_TranslatedMessage_boolean_value_tag 4 +#define openxc_TranslatedMessage_string_event_tag 5 +#define openxc_TranslatedMessage_numerical_event_tag 6 +#define openxc_TranslatedMessage_boolean_event_tag 7 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 -#define openxc_VehicleMessage_string_message_tag 3 -#define openxc_VehicleMessage_numeric_message_tag 4 -#define openxc_VehicleMessage_boolean_message_tag 5 -#define openxc_VehicleMessage_evented_string_message_tag 6 -#define openxc_VehicleMessage_evented_boolean_message_tag 7 -#define openxc_VehicleMessage_evented_numeric_message_tag 8 +#define openxc_VehicleMessage_translated_message_tag 3 /* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[9]; -extern const pb_field_t openxc_RawMessage_fields[3]; -extern const pb_field_t openxc_StringMessage_fields[3]; -extern const pb_field_t openxc_NumericMessage_fields[3]; -extern const pb_field_t openxc_BooleanMessage_fields[3]; -extern const pb_field_t openxc_EventedStringMessage_fields[4]; -extern const pb_field_t openxc_EventedBooleanMessage_fields[4]; -extern const pb_field_t openxc_EventedNumericMessage_fields[4]; +extern const pb_field_t openxc_VehicleMessage_fields[4]; +extern const pb_field_t openxc_RawMessage_fields[4]; +extern const pb_field_t openxc_TranslatedMessage_fields[8]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 1180 -#define openxc_RawMessage_size 12 -#define openxc_StringMessage_size 204 -#define openxc_NumericMessage_size 111 -#define openxc_BooleanMessage_size 104 -#define openxc_EventedStringMessage_size 306 -#define openxc_EventedBooleanMessage_size 206 -#define openxc_EventedNumericMessage_size 213 +#define openxc_VehicleMessage_size 362 +#define openxc_RawMessage_size 23 +#define openxc_TranslatedMessage_size 328 #ifdef __cplusplus } /* extern "C" */ diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index a2932845..7410c63e 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -35,89 +35,19 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder(); - // optional .openxc.StringMessage string_message = 3; + // optional .openxc.TranslatedMessage translated_message = 3; /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - boolean hasStringMessage(); + boolean hasTranslatedMessage(); /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - com.openxc.BinaryMessages.StringMessage getStringMessage(); + com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage(); /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - com.openxc.BinaryMessages.StringMessageOrBuilder getStringMessageOrBuilder(); - - // optional .openxc.NumericMessage numeric_message = 4; - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - boolean hasNumericMessage(); - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - com.openxc.BinaryMessages.NumericMessage getNumericMessage(); - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - com.openxc.BinaryMessages.NumericMessageOrBuilder getNumericMessageOrBuilder(); - - // optional .openxc.BooleanMessage boolean_message = 5; - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - boolean hasBooleanMessage(); - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - com.openxc.BinaryMessages.BooleanMessage getBooleanMessage(); - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - com.openxc.BinaryMessages.BooleanMessageOrBuilder getBooleanMessageOrBuilder(); - - // optional .openxc.EventedStringMessage evented_string_message = 6; - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - boolean hasEventedStringMessage(); - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - com.openxc.BinaryMessages.EventedStringMessage getEventedStringMessage(); - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - com.openxc.BinaryMessages.EventedStringMessageOrBuilder getEventedStringMessageOrBuilder(); - - // optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - boolean hasEventedBooleanMessage(); - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - com.openxc.BinaryMessages.EventedBooleanMessage getEventedBooleanMessage(); - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder getEventedBooleanMessageOrBuilder(); - - // optional .openxc.EventedNumericMessage evented_numeric_message = 8; - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - boolean hasEventedNumericMessage(); - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - com.openxc.BinaryMessages.EventedNumericMessage getEventedNumericMessage(); - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - com.openxc.BinaryMessages.EventedNumericMessageOrBuilder getEventedNumericMessageOrBuilder(); + com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); } /** * Protobuf type {@code openxc.VehicleMessage} @@ -195,83 +125,18 @@ public final class BinaryMessages { break; } case 26: { - com.openxc.BinaryMessages.StringMessage.Builder subBuilder = null; + com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = stringMessage_.toBuilder(); + subBuilder = translatedMessage_.toBuilder(); } - stringMessage_ = input.readMessage(com.openxc.BinaryMessages.StringMessage.PARSER, extensionRegistry); + translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(stringMessage_); - stringMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(translatedMessage_); + translatedMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } - case 34: { - com.openxc.BinaryMessages.NumericMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = numericMessage_.toBuilder(); - } - numericMessage_ = input.readMessage(com.openxc.BinaryMessages.NumericMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(numericMessage_); - numericMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 42: { - com.openxc.BinaryMessages.BooleanMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = booleanMessage_.toBuilder(); - } - booleanMessage_ = input.readMessage(com.openxc.BinaryMessages.BooleanMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(booleanMessage_); - booleanMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 50: { - com.openxc.BinaryMessages.EventedStringMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - subBuilder = eventedStringMessage_.toBuilder(); - } - eventedStringMessage_ = input.readMessage(com.openxc.BinaryMessages.EventedStringMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventedStringMessage_); - eventedStringMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 58: { - com.openxc.BinaryMessages.EventedBooleanMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) == 0x00000040)) { - subBuilder = eventedBooleanMessage_.toBuilder(); - } - eventedBooleanMessage_ = input.readMessage(com.openxc.BinaryMessages.EventedBooleanMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventedBooleanMessage_); - eventedBooleanMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case 66: { - com.openxc.BinaryMessages.EventedNumericMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) == 0x00000080)) { - subBuilder = eventedNumericMessage_.toBuilder(); - } - eventedNumericMessage_ = input.readMessage(com.openxc.BinaryMessages.EventedNumericMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventedNumericMessage_); - eventedNumericMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -321,29 +186,9 @@ public final class BinaryMessages { */ RAW(0, 1), /** - * STRING = 2; - */ - STRING(1, 2), - /** - * BOOL = 3; - */ - BOOL(2, 3), - /** - * NUM = 4; - */ - NUM(3, 4), - /** - * EVENTED_NUM = 5; - */ - EVENTED_NUM(4, 5), - /** - * EVENTED_STRING = 6; - */ - EVENTED_STRING(5, 6), - /** - * EVENTED_BOOL = 7; + * TRANSLATED = 2; */ - EVENTED_BOOL(6, 7), + TRANSLATED(1, 2), ; /** @@ -351,29 +196,9 @@ public final class BinaryMessages { */ public static final int RAW_VALUE = 1; /** - * STRING = 2; - */ - public static final int STRING_VALUE = 2; - /** - * BOOL = 3; - */ - public static final int BOOL_VALUE = 3; - /** - * NUM = 4; - */ - public static final int NUM_VALUE = 4; - /** - * EVENTED_NUM = 5; - */ - public static final int EVENTED_NUM_VALUE = 5; - /** - * EVENTED_STRING = 6; - */ - public static final int EVENTED_STRING_VALUE = 6; - /** - * EVENTED_BOOL = 7; + * TRANSLATED = 2; */ - public static final int EVENTED_BOOL_VALUE = 7; + public static final int TRANSLATED_VALUE = 2; public final int getNumber() { return value; } @@ -381,12 +206,7 @@ public final class BinaryMessages { public static Type valueOf(int value) { switch (value) { case 1: return RAW; - case 2: return STRING; - case 3: return BOOL; - case 4: return NUM; - case 5: return EVENTED_NUM; - case 6: return EVENTED_STRING; - case 7: return EVENTED_BOOL; + case 2: return TRANSLATED; default: return null; } } @@ -477,147 +297,32 @@ public final class BinaryMessages { return rawMessage_; } - // optional .openxc.StringMessage string_message = 3; - public static final int STRING_MESSAGE_FIELD_NUMBER = 3; - private com.openxc.BinaryMessages.StringMessage stringMessage_; + // optional .openxc.TranslatedMessage translated_message = 3; + public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_; /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public boolean hasStringMessage() { + public boolean hasTranslatedMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.StringMessage string_message = 3; - */ - public com.openxc.BinaryMessages.StringMessage getStringMessage() { - return stringMessage_; - } - /** - * optional .openxc.StringMessage string_message = 3; - */ - public com.openxc.BinaryMessages.StringMessageOrBuilder getStringMessageOrBuilder() { - return stringMessage_; - } - - // optional .openxc.NumericMessage numeric_message = 4; - public static final int NUMERIC_MESSAGE_FIELD_NUMBER = 4; - private com.openxc.BinaryMessages.NumericMessage numericMessage_; - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public boolean hasNumericMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public com.openxc.BinaryMessages.NumericMessage getNumericMessage() { - return numericMessage_; - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public com.openxc.BinaryMessages.NumericMessageOrBuilder getNumericMessageOrBuilder() { - return numericMessage_; - } - - // optional .openxc.BooleanMessage boolean_message = 5; - public static final int BOOLEAN_MESSAGE_FIELD_NUMBER = 5; - private com.openxc.BinaryMessages.BooleanMessage booleanMessage_; - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public boolean hasBooleanMessage() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public com.openxc.BinaryMessages.BooleanMessage getBooleanMessage() { - return booleanMessage_; - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public com.openxc.BinaryMessages.BooleanMessageOrBuilder getBooleanMessageOrBuilder() { - return booleanMessage_; - } - - // optional .openxc.EventedStringMessage evented_string_message = 6; - public static final int EVENTED_STRING_MESSAGE_FIELD_NUMBER = 6; - private com.openxc.BinaryMessages.EventedStringMessage eventedStringMessage_; - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public boolean hasEventedStringMessage() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public com.openxc.BinaryMessages.EventedStringMessage getEventedStringMessage() { - return eventedStringMessage_; - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public com.openxc.BinaryMessages.EventedStringMessageOrBuilder getEventedStringMessageOrBuilder() { - return eventedStringMessage_; - } - - // optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - public static final int EVENTED_BOOLEAN_MESSAGE_FIELD_NUMBER = 7; - private com.openxc.BinaryMessages.EventedBooleanMessage eventedBooleanMessage_; - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public boolean hasEventedBooleanMessage() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public com.openxc.BinaryMessages.EventedBooleanMessage getEventedBooleanMessage() { - return eventedBooleanMessage_; - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder getEventedBooleanMessageOrBuilder() { - return eventedBooleanMessage_; - } - - // optional .openxc.EventedNumericMessage evented_numeric_message = 8; - public static final int EVENTED_NUMERIC_MESSAGE_FIELD_NUMBER = 8; - private com.openxc.BinaryMessages.EventedNumericMessage eventedNumericMessage_; - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public boolean hasEventedNumericMessage() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public com.openxc.BinaryMessages.EventedNumericMessage getEventedNumericMessage() { - return eventedNumericMessage_; + public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { + return translatedMessage_; } /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public com.openxc.BinaryMessages.EventedNumericMessageOrBuilder getEventedNumericMessageOrBuilder() { - return eventedNumericMessage_; + public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { + return translatedMessage_; } private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); - stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); - numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); - booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); - eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); - eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); - eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); + translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -638,22 +343,7 @@ public final class BinaryMessages { output.writeMessage(2, rawMessage_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, stringMessage_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, numericMessage_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(5, booleanMessage_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeMessage(6, eventedStringMessage_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeMessage(7, eventedBooleanMessage_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeMessage(8, eventedNumericMessage_); + output.writeMessage(3, translatedMessage_); } getUnknownFields().writeTo(output); } @@ -674,27 +364,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, stringMessage_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, numericMessage_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, booleanMessage_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, eventedStringMessage_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, eventedBooleanMessage_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, eventedNumericMessage_); + .computeMessageSize(3, translatedMessage_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -805,12 +475,7 @@ public final class BinaryMessages { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRawMessageFieldBuilder(); - getStringMessageFieldBuilder(); - getNumericMessageFieldBuilder(); - getBooleanMessageFieldBuilder(); - getEventedStringMessageFieldBuilder(); - getEventedBooleanMessageFieldBuilder(); - getEventedNumericMessageFieldBuilder(); + getTranslatedMessageFieldBuilder(); } } private static Builder create() { @@ -827,42 +492,12 @@ public final class BinaryMessages { rawMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); - if (stringMessageBuilder_ == null) { - stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); + if (translatedMessageBuilder_ == null) { + translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); } else { - stringMessageBuilder_.clear(); + translatedMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); - if (numericMessageBuilder_ == null) { - numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); - } else { - numericMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (booleanMessageBuilder_ == null) { - booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); - } else { - booleanMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - if (eventedStringMessageBuilder_ == null) { - eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); - } else { - eventedStringMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - if (eventedBooleanMessageBuilder_ == null) { - eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); - } else { - eventedBooleanMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - if (eventedNumericMessageBuilder_ == null) { - eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); - } else { - eventedNumericMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -906,50 +541,10 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (stringMessageBuilder_ == null) { - result.stringMessage_ = stringMessage_; - } else { - result.stringMessage_ = stringMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (numericMessageBuilder_ == null) { - result.numericMessage_ = numericMessage_; - } else { - result.numericMessage_ = numericMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - if (booleanMessageBuilder_ == null) { - result.booleanMessage_ = booleanMessage_; - } else { - result.booleanMessage_ = booleanMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - if (eventedStringMessageBuilder_ == null) { - result.eventedStringMessage_ = eventedStringMessage_; - } else { - result.eventedStringMessage_ = eventedStringMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - if (eventedBooleanMessageBuilder_ == null) { - result.eventedBooleanMessage_ = eventedBooleanMessage_; + if (translatedMessageBuilder_ == null) { + result.translatedMessage_ = translatedMessage_; } else { - result.eventedBooleanMessage_ = eventedBooleanMessageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - if (eventedNumericMessageBuilder_ == null) { - result.eventedNumericMessage_ = eventedNumericMessage_; - } else { - result.eventedNumericMessage_ = eventedNumericMessageBuilder_.build(); + result.translatedMessage_ = translatedMessageBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -973,23 +568,8 @@ public final class BinaryMessages { if (other.hasRawMessage()) { mergeRawMessage(other.getRawMessage()); } - if (other.hasStringMessage()) { - mergeStringMessage(other.getStringMessage()); - } - if (other.hasNumericMessage()) { - mergeNumericMessage(other.getNumericMessage()); - } - if (other.hasBooleanMessage()) { - mergeBooleanMessage(other.getBooleanMessage()); - } - if (other.hasEventedStringMessage()) { - mergeEventedStringMessage(other.getEventedStringMessage()); - } - if (other.hasEventedBooleanMessage()) { - mergeEventedBooleanMessage(other.getEventedBooleanMessage()); - } - if (other.hasEventedNumericMessage()) { - mergeEventedNumericMessage(other.getEventedNumericMessage()); + if (other.hasTranslatedMessage()) { + mergeTranslatedMessage(other.getTranslatedMessage()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -1171,3772 +751,186 @@ public final class BinaryMessages { return rawMessageBuilder_; } - // optional .openxc.StringMessage string_message = 3; - private com.openxc.BinaryMessages.StringMessage stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); + // optional .openxc.TranslatedMessage translated_message = 3; + private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.StringMessage, com.openxc.BinaryMessages.StringMessage.Builder, com.openxc.BinaryMessages.StringMessageOrBuilder> stringMessageBuilder_; + com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_; /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public boolean hasStringMessage() { + public boolean hasTranslatedMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public com.openxc.BinaryMessages.StringMessage getStringMessage() { - if (stringMessageBuilder_ == null) { - return stringMessage_; + public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { + if (translatedMessageBuilder_ == null) { + return translatedMessage_; } else { - return stringMessageBuilder_.getMessage(); + return translatedMessageBuilder_.getMessage(); } } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder setStringMessage(com.openxc.BinaryMessages.StringMessage value) { - if (stringMessageBuilder_ == null) { + public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { + if (translatedMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - stringMessage_ = value; + translatedMessage_ = value; onChanged(); } else { - stringMessageBuilder_.setMessage(value); + translatedMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder setStringMessage( - com.openxc.BinaryMessages.StringMessage.Builder builderForValue) { - if (stringMessageBuilder_ == null) { - stringMessage_ = builderForValue.build(); + public Builder setTranslatedMessage( + com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) { + if (translatedMessageBuilder_ == null) { + translatedMessage_ = builderForValue.build(); onChanged(); } else { - stringMessageBuilder_.setMessage(builderForValue.build()); + translatedMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder mergeStringMessage(com.openxc.BinaryMessages.StringMessage value) { - if (stringMessageBuilder_ == null) { + public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { + if (translatedMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && - stringMessage_ != com.openxc.BinaryMessages.StringMessage.getDefaultInstance()) { - stringMessage_ = - com.openxc.BinaryMessages.StringMessage.newBuilder(stringMessage_).mergeFrom(value).buildPartial(); + translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) { + translatedMessage_ = + com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial(); } else { - stringMessage_ = value; + translatedMessage_ = value; } onChanged(); } else { - stringMessageBuilder_.mergeFrom(value); + translatedMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public Builder clearStringMessage() { - if (stringMessageBuilder_ == null) { - stringMessage_ = com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); + public Builder clearTranslatedMessage() { + if (translatedMessageBuilder_ == null) { + translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); onChanged(); } else { - stringMessageBuilder_.clear(); + translatedMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public com.openxc.BinaryMessages.StringMessage.Builder getStringMessageBuilder() { + public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getStringMessageFieldBuilder().getBuilder(); + return getTranslatedMessageFieldBuilder().getBuilder(); } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ - public com.openxc.BinaryMessages.StringMessageOrBuilder getStringMessageOrBuilder() { - if (stringMessageBuilder_ != null) { - return stringMessageBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { + if (translatedMessageBuilder_ != null) { + return translatedMessageBuilder_.getMessageOrBuilder(); } else { - return stringMessage_; + return translatedMessage_; } } /** - * optional .openxc.StringMessage string_message = 3; + * optional .openxc.TranslatedMessage translated_message = 3; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.StringMessage, com.openxc.BinaryMessages.StringMessage.Builder, com.openxc.BinaryMessages.StringMessageOrBuilder> - getStringMessageFieldBuilder() { - if (stringMessageBuilder_ == null) { - stringMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.StringMessage, com.openxc.BinaryMessages.StringMessage.Builder, com.openxc.BinaryMessages.StringMessageOrBuilder>( - stringMessage_, + com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> + getTranslatedMessageFieldBuilder() { + if (translatedMessageBuilder_ == null) { + translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>( + translatedMessage_, getParentForChildren(), isClean()); - stringMessage_ = null; + translatedMessage_ = null; } - return stringMessageBuilder_; + return translatedMessageBuilder_; } - // optional .openxc.NumericMessage numeric_message = 4; - private com.openxc.BinaryMessages.NumericMessage numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.NumericMessage, com.openxc.BinaryMessages.NumericMessage.Builder, com.openxc.BinaryMessages.NumericMessageOrBuilder> numericMessageBuilder_; - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public boolean hasNumericMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public com.openxc.BinaryMessages.NumericMessage getNumericMessage() { - if (numericMessageBuilder_ == null) { - return numericMessage_; - } else { - return numericMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public Builder setNumericMessage(com.openxc.BinaryMessages.NumericMessage value) { - if (numericMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - numericMessage_ = value; - onChanged(); - } else { - numericMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public Builder setNumericMessage( - com.openxc.BinaryMessages.NumericMessage.Builder builderForValue) { - if (numericMessageBuilder_ == null) { - numericMessage_ = builderForValue.build(); - onChanged(); - } else { - numericMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public Builder mergeNumericMessage(com.openxc.BinaryMessages.NumericMessage value) { - if (numericMessageBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - numericMessage_ != com.openxc.BinaryMessages.NumericMessage.getDefaultInstance()) { - numericMessage_ = - com.openxc.BinaryMessages.NumericMessage.newBuilder(numericMessage_).mergeFrom(value).buildPartial(); - } else { - numericMessage_ = value; - } - onChanged(); - } else { - numericMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public Builder clearNumericMessage() { - if (numericMessageBuilder_ == null) { - numericMessage_ = com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); - onChanged(); - } else { - numericMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public com.openxc.BinaryMessages.NumericMessage.Builder getNumericMessageBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getNumericMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - public com.openxc.BinaryMessages.NumericMessageOrBuilder getNumericMessageOrBuilder() { - if (numericMessageBuilder_ != null) { - return numericMessageBuilder_.getMessageOrBuilder(); - } else { - return numericMessage_; - } - } - /** - * optional .openxc.NumericMessage numeric_message = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.NumericMessage, com.openxc.BinaryMessages.NumericMessage.Builder, com.openxc.BinaryMessages.NumericMessageOrBuilder> - getNumericMessageFieldBuilder() { - if (numericMessageBuilder_ == null) { - numericMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.NumericMessage, com.openxc.BinaryMessages.NumericMessage.Builder, com.openxc.BinaryMessages.NumericMessageOrBuilder>( - numericMessage_, - getParentForChildren(), - isClean()); - numericMessage_ = null; - } - return numericMessageBuilder_; - } - - // optional .openxc.BooleanMessage boolean_message = 5; - private com.openxc.BinaryMessages.BooleanMessage booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.BooleanMessage, com.openxc.BinaryMessages.BooleanMessage.Builder, com.openxc.BinaryMessages.BooleanMessageOrBuilder> booleanMessageBuilder_; - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public boolean hasBooleanMessage() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public com.openxc.BinaryMessages.BooleanMessage getBooleanMessage() { - if (booleanMessageBuilder_ == null) { - return booleanMessage_; - } else { - return booleanMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public Builder setBooleanMessage(com.openxc.BinaryMessages.BooleanMessage value) { - if (booleanMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - booleanMessage_ = value; - onChanged(); - } else { - booleanMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public Builder setBooleanMessage( - com.openxc.BinaryMessages.BooleanMessage.Builder builderForValue) { - if (booleanMessageBuilder_ == null) { - booleanMessage_ = builderForValue.build(); - onChanged(); - } else { - booleanMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public Builder mergeBooleanMessage(com.openxc.BinaryMessages.BooleanMessage value) { - if (booleanMessageBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - booleanMessage_ != com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance()) { - booleanMessage_ = - com.openxc.BinaryMessages.BooleanMessage.newBuilder(booleanMessage_).mergeFrom(value).buildPartial(); - } else { - booleanMessage_ = value; - } - onChanged(); - } else { - booleanMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - return this; - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public Builder clearBooleanMessage() { - if (booleanMessageBuilder_ == null) { - booleanMessage_ = com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); - onChanged(); - } else { - booleanMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public com.openxc.BinaryMessages.BooleanMessage.Builder getBooleanMessageBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getBooleanMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - public com.openxc.BinaryMessages.BooleanMessageOrBuilder getBooleanMessageOrBuilder() { - if (booleanMessageBuilder_ != null) { - return booleanMessageBuilder_.getMessageOrBuilder(); - } else { - return booleanMessage_; - } - } - /** - * optional .openxc.BooleanMessage boolean_message = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.BooleanMessage, com.openxc.BinaryMessages.BooleanMessage.Builder, com.openxc.BinaryMessages.BooleanMessageOrBuilder> - getBooleanMessageFieldBuilder() { - if (booleanMessageBuilder_ == null) { - booleanMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.BooleanMessage, com.openxc.BinaryMessages.BooleanMessage.Builder, com.openxc.BinaryMessages.BooleanMessageOrBuilder>( - booleanMessage_, - getParentForChildren(), - isClean()); - booleanMessage_ = null; - } - return booleanMessageBuilder_; - } - - // optional .openxc.EventedStringMessage evented_string_message = 6; - private com.openxc.BinaryMessages.EventedStringMessage eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedStringMessage, com.openxc.BinaryMessages.EventedStringMessage.Builder, com.openxc.BinaryMessages.EventedStringMessageOrBuilder> eventedStringMessageBuilder_; - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public boolean hasEventedStringMessage() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public com.openxc.BinaryMessages.EventedStringMessage getEventedStringMessage() { - if (eventedStringMessageBuilder_ == null) { - return eventedStringMessage_; - } else { - return eventedStringMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public Builder setEventedStringMessage(com.openxc.BinaryMessages.EventedStringMessage value) { - if (eventedStringMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eventedStringMessage_ = value; - onChanged(); - } else { - eventedStringMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public Builder setEventedStringMessage( - com.openxc.BinaryMessages.EventedStringMessage.Builder builderForValue) { - if (eventedStringMessageBuilder_ == null) { - eventedStringMessage_ = builderForValue.build(); - onChanged(); - } else { - eventedStringMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public Builder mergeEventedStringMessage(com.openxc.BinaryMessages.EventedStringMessage value) { - if (eventedStringMessageBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020) && - eventedStringMessage_ != com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance()) { - eventedStringMessage_ = - com.openxc.BinaryMessages.EventedStringMessage.newBuilder(eventedStringMessage_).mergeFrom(value).buildPartial(); - } else { - eventedStringMessage_ = value; - } - onChanged(); - } else { - eventedStringMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public Builder clearEventedStringMessage() { - if (eventedStringMessageBuilder_ == null) { - eventedStringMessage_ = com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); - onChanged(); - } else { - eventedStringMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public com.openxc.BinaryMessages.EventedStringMessage.Builder getEventedStringMessageBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getEventedStringMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - public com.openxc.BinaryMessages.EventedStringMessageOrBuilder getEventedStringMessageOrBuilder() { - if (eventedStringMessageBuilder_ != null) { - return eventedStringMessageBuilder_.getMessageOrBuilder(); - } else { - return eventedStringMessage_; - } - } - /** - * optional .openxc.EventedStringMessage evented_string_message = 6; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedStringMessage, com.openxc.BinaryMessages.EventedStringMessage.Builder, com.openxc.BinaryMessages.EventedStringMessageOrBuilder> - getEventedStringMessageFieldBuilder() { - if (eventedStringMessageBuilder_ == null) { - eventedStringMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedStringMessage, com.openxc.BinaryMessages.EventedStringMessage.Builder, com.openxc.BinaryMessages.EventedStringMessageOrBuilder>( - eventedStringMessage_, - getParentForChildren(), - isClean()); - eventedStringMessage_ = null; - } - return eventedStringMessageBuilder_; - } - - // optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - private com.openxc.BinaryMessages.EventedBooleanMessage eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedBooleanMessage, com.openxc.BinaryMessages.EventedBooleanMessage.Builder, com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder> eventedBooleanMessageBuilder_; - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public boolean hasEventedBooleanMessage() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public com.openxc.BinaryMessages.EventedBooleanMessage getEventedBooleanMessage() { - if (eventedBooleanMessageBuilder_ == null) { - return eventedBooleanMessage_; - } else { - return eventedBooleanMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public Builder setEventedBooleanMessage(com.openxc.BinaryMessages.EventedBooleanMessage value) { - if (eventedBooleanMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eventedBooleanMessage_ = value; - onChanged(); - } else { - eventedBooleanMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - return this; - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public Builder setEventedBooleanMessage( - com.openxc.BinaryMessages.EventedBooleanMessage.Builder builderForValue) { - if (eventedBooleanMessageBuilder_ == null) { - eventedBooleanMessage_ = builderForValue.build(); - onChanged(); - } else { - eventedBooleanMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - return this; - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public Builder mergeEventedBooleanMessage(com.openxc.BinaryMessages.EventedBooleanMessage value) { - if (eventedBooleanMessageBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040) && - eventedBooleanMessage_ != com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance()) { - eventedBooleanMessage_ = - com.openxc.BinaryMessages.EventedBooleanMessage.newBuilder(eventedBooleanMessage_).mergeFrom(value).buildPartial(); - } else { - eventedBooleanMessage_ = value; - } - onChanged(); - } else { - eventedBooleanMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - return this; - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public Builder clearEventedBooleanMessage() { - if (eventedBooleanMessageBuilder_ == null) { - eventedBooleanMessage_ = com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); - onChanged(); - } else { - eventedBooleanMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public com.openxc.BinaryMessages.EventedBooleanMessage.Builder getEventedBooleanMessageBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getEventedBooleanMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - public com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder getEventedBooleanMessageOrBuilder() { - if (eventedBooleanMessageBuilder_ != null) { - return eventedBooleanMessageBuilder_.getMessageOrBuilder(); - } else { - return eventedBooleanMessage_; - } - } - /** - * optional .openxc.EventedBooleanMessage evented_boolean_message = 7; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedBooleanMessage, com.openxc.BinaryMessages.EventedBooleanMessage.Builder, com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder> - getEventedBooleanMessageFieldBuilder() { - if (eventedBooleanMessageBuilder_ == null) { - eventedBooleanMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedBooleanMessage, com.openxc.BinaryMessages.EventedBooleanMessage.Builder, com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder>( - eventedBooleanMessage_, - getParentForChildren(), - isClean()); - eventedBooleanMessage_ = null; - } - return eventedBooleanMessageBuilder_; - } - - // optional .openxc.EventedNumericMessage evented_numeric_message = 8; - private com.openxc.BinaryMessages.EventedNumericMessage eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedNumericMessage, com.openxc.BinaryMessages.EventedNumericMessage.Builder, com.openxc.BinaryMessages.EventedNumericMessageOrBuilder> eventedNumericMessageBuilder_; - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public boolean hasEventedNumericMessage() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public com.openxc.BinaryMessages.EventedNumericMessage getEventedNumericMessage() { - if (eventedNumericMessageBuilder_ == null) { - return eventedNumericMessage_; - } else { - return eventedNumericMessageBuilder_.getMessage(); - } - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public Builder setEventedNumericMessage(com.openxc.BinaryMessages.EventedNumericMessage value) { - if (eventedNumericMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eventedNumericMessage_ = value; - onChanged(); - } else { - eventedNumericMessageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - return this; - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public Builder setEventedNumericMessage( - com.openxc.BinaryMessages.EventedNumericMessage.Builder builderForValue) { - if (eventedNumericMessageBuilder_ == null) { - eventedNumericMessage_ = builderForValue.build(); - onChanged(); - } else { - eventedNumericMessageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - return this; - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public Builder mergeEventedNumericMessage(com.openxc.BinaryMessages.EventedNumericMessage value) { - if (eventedNumericMessageBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080) && - eventedNumericMessage_ != com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance()) { - eventedNumericMessage_ = - com.openxc.BinaryMessages.EventedNumericMessage.newBuilder(eventedNumericMessage_).mergeFrom(value).buildPartial(); - } else { - eventedNumericMessage_ = value; - } - onChanged(); - } else { - eventedNumericMessageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - return this; - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public Builder clearEventedNumericMessage() { - if (eventedNumericMessageBuilder_ == null) { - eventedNumericMessage_ = com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); - onChanged(); - } else { - eventedNumericMessageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public com.openxc.BinaryMessages.EventedNumericMessage.Builder getEventedNumericMessageBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getEventedNumericMessageFieldBuilder().getBuilder(); - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - public com.openxc.BinaryMessages.EventedNumericMessageOrBuilder getEventedNumericMessageOrBuilder() { - if (eventedNumericMessageBuilder_ != null) { - return eventedNumericMessageBuilder_.getMessageOrBuilder(); - } else { - return eventedNumericMessage_; - } - } - /** - * optional .openxc.EventedNumericMessage evented_numeric_message = 8; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedNumericMessage, com.openxc.BinaryMessages.EventedNumericMessage.Builder, com.openxc.BinaryMessages.EventedNumericMessageOrBuilder> - getEventedNumericMessageFieldBuilder() { - if (eventedNumericMessageBuilder_ == null) { - eventedNumericMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.EventedNumericMessage, com.openxc.BinaryMessages.EventedNumericMessage.Builder, com.openxc.BinaryMessages.EventedNumericMessageOrBuilder>( - eventedNumericMessage_, - getParentForChildren(), - isClean()); - eventedNumericMessage_ = null; - } - return eventedNumericMessageBuilder_; - } - - // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) - } - - static { - defaultInstance = new VehicleMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) - } - - public interface RawMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ - boolean hasBus(); - /** - * optional int32 bus = 1; - */ - int getBus(); - - // optional uint32 message_id = 2; - /** - * optional uint32 message_id = 2; - */ - boolean hasMessageId(); - /** - * optional uint32 message_id = 2; - */ - int getMessageId(); - } - /** - * Protobuf type {@code openxc.RawMessage} - */ - public static final class RawMessage extends - com.google.protobuf.GeneratedMessage - implements RawMessageOrBuilder { - // Use RawMessage.newBuilder() to construct. - private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final RawMessage defaultInstance; - public static RawMessage getDefaultInstance() { - return defaultInstance; - } - - public RawMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RawMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RawMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RawMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional int32 bus = 1; - public static final int BUS_FIELD_NUMBER = 1; - private int bus_; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - public int getBus() { - return bus_; - } - - // optional uint32 message_id = 2; - public static final int MESSAGE_ID_FIELD_NUMBER = 2; - private int messageId_; - /** - * optional uint32 message_id = 2; - */ - public boolean hasMessageId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 message_id = 2; - */ - public int getMessageId() { - return messageId_; - } - - private void initFields() { - bus_ = 0; - messageId_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, bus_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, messageId_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, bus_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, messageId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.openxc.BinaryMessages.RawMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.RawMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.RawMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.RawMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.RawMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.RawMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.RawMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.RawMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); - } - - // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - bus_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - messageId_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; - } - - public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); - } - - public com.openxc.BinaryMessages.RawMessage build() { - com.openxc.BinaryMessages.RawMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.openxc.BinaryMessages.RawMessage buildPartial() { - com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.bus_ = bus_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.messageId_ = messageId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.RawMessage) { - return mergeFrom((com.openxc.BinaryMessages.RawMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) { - if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this; - if (other.hasBus()) { - setBus(other.getBus()); - } - if (other.hasMessageId()) { - setMessageId(other.getMessageId()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.openxc.BinaryMessages.RawMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional int32 bus = 1; - private int bus_ ; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - public int getBus() { - return bus_; - } - /** - * optional int32 bus = 1; - */ - public Builder setBus(int value) { - bitField0_ |= 0x00000001; - bus_ = value; - onChanged(); - return this; - } - /** - * optional int32 bus = 1; - */ - public Builder clearBus() { - bitField0_ = (bitField0_ & ~0x00000001); - bus_ = 0; - onChanged(); - return this; - } - - // optional uint32 message_id = 2; - private int messageId_ ; - /** - * optional uint32 message_id = 2; - */ - public boolean hasMessageId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional uint32 message_id = 2; - */ - public int getMessageId() { - return messageId_; - } - /** - * optional uint32 message_id = 2; - */ - public Builder setMessageId(int value) { - bitField0_ |= 0x00000002; - messageId_ = value; - onChanged(); - return this; - } - /** - * optional uint32 message_id = 2; - */ - public Builder clearMessageId() { - bitField0_ = (bitField0_ & ~0x00000002); - messageId_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.RawMessage) - } - - static { - defaultInstance = new RawMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.RawMessage) - } - - public interface StringMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional string value = 2; - /** - * optional string value = 2; - */ - boolean hasValue(); - /** - * optional string value = 2; - */ - java.lang.String getValue(); - /** - * optional string value = 2; - */ - com.google.protobuf.ByteString - getValueBytes(); - } - /** - * Protobuf type {@code openxc.StringMessage} - */ - public static final class StringMessage extends - com.google.protobuf.GeneratedMessage - implements StringMessageOrBuilder { - // Use StringMessage.newBuilder() to construct. - private StringMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private StringMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final StringMessage defaultInstance; - public static StringMessage getDefaultInstance() { - return defaultInstance; - } - - public StringMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StringMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - value_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.StringMessage.class, com.openxc.BinaryMessages.StringMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public StringMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StringMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } - } - /** - * optional string value = 2; - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - name_ = ""; - value_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getValueBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.openxc.BinaryMessages.StringMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.StringMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.StringMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.StringMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.StringMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.StringMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.StringMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.openxc.BinaryMessages.StringMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.StringMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.StringMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.StringMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.StringMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.StringMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.StringMessage.class, com.openxc.BinaryMessages.StringMessage.Builder.class); - } - - // Construct using com.openxc.BinaryMessages.StringMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_StringMessage_descriptor; - } - - public com.openxc.BinaryMessages.StringMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.StringMessage.getDefaultInstance(); - } - - public com.openxc.BinaryMessages.StringMessage build() { - com.openxc.BinaryMessages.StringMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.openxc.BinaryMessages.StringMessage buildPartial() { - com.openxc.BinaryMessages.StringMessage result = new com.openxc.BinaryMessages.StringMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.StringMessage) { - return mergeFrom((com.openxc.BinaryMessages.StringMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.openxc.BinaryMessages.StringMessage other) { - if (other == com.openxc.BinaryMessages.StringMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - bitField0_ |= 0x00000002; - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.openxc.BinaryMessages.StringMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.StringMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string name = 1; - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - // optional string value = 2; - private java.lang.Object value_ = ""; - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string value = 2; - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string value = 2; - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - /** - * optional string value = 2; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * optional string value = 2; - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.StringMessage) - } - - static { - defaultInstance = new StringMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.StringMessage) - } - - public interface NumericMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional double value = 2; - /** - * optional double value = 2; - */ - boolean hasValue(); - /** - * optional double value = 2; - */ - double getValue(); - } - /** - * Protobuf type {@code openxc.NumericMessage} - */ - public static final class NumericMessage extends - com.google.protobuf.GeneratedMessage - implements NumericMessageOrBuilder { - // Use NumericMessage.newBuilder() to construct. - private NumericMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private NumericMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final NumericMessage defaultInstance; - public static NumericMessage getDefaultInstance() { - return defaultInstance; - } - - public NumericMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NumericMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 17: { - bitField0_ |= 0x00000002; - value_ = input.readDouble(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NumericMessage.class, com.openxc.BinaryMessages.NumericMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public NumericMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NumericMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional double value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private double value_; - /** - * optional double value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional double value = 2; - */ - public double getValue() { - return value_; - } - - private void initFields() { - name_ = ""; - value_ = 0D; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeDouble(2, value_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.openxc.BinaryMessages.NumericMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.NumericMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.NumericMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.NumericMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.NumericMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.NumericMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.NumericMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.openxc.BinaryMessages.NumericMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.NumericMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.NumericMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.NumericMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.NumericMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.NumericMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NumericMessage.class, com.openxc.BinaryMessages.NumericMessage.Builder.class); - } - - // Construct using com.openxc.BinaryMessages.NumericMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = 0D; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_NumericMessage_descriptor; - } - - public com.openxc.BinaryMessages.NumericMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.NumericMessage.getDefaultInstance(); - } - - public com.openxc.BinaryMessages.NumericMessage build() { - com.openxc.BinaryMessages.NumericMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.openxc.BinaryMessages.NumericMessage buildPartial() { - com.openxc.BinaryMessages.NumericMessage result = new com.openxc.BinaryMessages.NumericMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.NumericMessage) { - return mergeFrom((com.openxc.BinaryMessages.NumericMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.openxc.BinaryMessages.NumericMessage other) { - if (other == com.openxc.BinaryMessages.NumericMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - setValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.openxc.BinaryMessages.NumericMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.NumericMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string name = 1; - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - // optional double value = 2; - private double value_ ; - /** - * optional double value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional double value = 2; - */ - public double getValue() { - return value_; - } - /** - * optional double value = 2; - */ - public Builder setValue(double value) { - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - /** - * optional double value = 2; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.NumericMessage) - } - - static { - defaultInstance = new NumericMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.NumericMessage) - } - - public interface BooleanMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional bool value = 2; - /** - * optional bool value = 2; - */ - boolean hasValue(); - /** - * optional bool value = 2; - */ - boolean getValue(); - } - /** - * Protobuf type {@code openxc.BooleanMessage} - */ - public static final class BooleanMessage extends - com.google.protobuf.GeneratedMessage - implements BooleanMessageOrBuilder { - // Use BooleanMessage.newBuilder() to construct. - private BooleanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private BooleanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final BooleanMessage defaultInstance; - public static BooleanMessage getDefaultInstance() { - return defaultInstance; - } - - public BooleanMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BooleanMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - value_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.BooleanMessage.class, com.openxc.BinaryMessages.BooleanMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public BooleanMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BooleanMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional bool value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private boolean value_; - /** - * optional bool value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool value = 2; - */ - public boolean getValue() { - return value_; - } - - private void initFields() { - name_ = ""; - value_ = false; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, value_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.openxc.BinaryMessages.BooleanMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.BooleanMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.BooleanMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.BooleanMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.BooleanMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.BooleanMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.BooleanMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.openxc.BinaryMessages.BooleanMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.BooleanMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.BooleanMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.BooleanMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.BooleanMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.BooleanMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.BooleanMessage.class, com.openxc.BinaryMessages.BooleanMessage.Builder.class); - } - - // Construct using com.openxc.BinaryMessages.BooleanMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = false; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_BooleanMessage_descriptor; - } - - public com.openxc.BinaryMessages.BooleanMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance(); - } - - public com.openxc.BinaryMessages.BooleanMessage build() { - com.openxc.BinaryMessages.BooleanMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.openxc.BinaryMessages.BooleanMessage buildPartial() { - com.openxc.BinaryMessages.BooleanMessage result = new com.openxc.BinaryMessages.BooleanMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.BooleanMessage) { - return mergeFrom((com.openxc.BinaryMessages.BooleanMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.openxc.BinaryMessages.BooleanMessage other) { - if (other == com.openxc.BinaryMessages.BooleanMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - setValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.openxc.BinaryMessages.BooleanMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.BooleanMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string name = 1; - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - // optional bool value = 2; - private boolean value_ ; - /** - * optional bool value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional bool value = 2; - */ - public boolean getValue() { - return value_; - } - /** - * optional bool value = 2; - */ - public Builder setValue(boolean value) { - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - /** - * optional bool value = 2; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.BooleanMessage) - } - - static { - defaultInstance = new BooleanMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:openxc.BooleanMessage) - } - - public interface EventedStringMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - // optional string value = 2; - /** - * optional string value = 2; - */ - boolean hasValue(); - /** - * optional string value = 2; - */ - java.lang.String getValue(); - /** - * optional string value = 2; - */ - com.google.protobuf.ByteString - getValueBytes(); - - // optional string event = 3; - /** - * optional string event = 3; - */ - boolean hasEvent(); - /** - * optional string event = 3; - */ - java.lang.String getEvent(); - /** - * optional string event = 3; - */ - com.google.protobuf.ByteString - getEventBytes(); - } - /** - * Protobuf type {@code openxc.EventedStringMessage} - */ - public static final class EventedStringMessage extends - com.google.protobuf.GeneratedMessage - implements EventedStringMessageOrBuilder { - // Use EventedStringMessage.newBuilder() to construct. - private EventedStringMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private EventedStringMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final EventedStringMessage defaultInstance; - public static EventedStringMessage getDefaultInstance() { - return defaultInstance; - } - - public EventedStringMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EventedStringMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - value_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - event_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.EventedStringMessage.class, com.openxc.BinaryMessages.EventedStringMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public EventedStringMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EventedStringMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } - } - /** - * optional string value = 2; - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string event = 3; - public static final int EVENT_FIELD_NUMBER = 3; - private java.lang.Object event_; - /** - * optional string event = 3; - */ - public boolean hasEvent() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string event = 3; - */ - public java.lang.String getEvent() { - java.lang.Object ref = event_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - event_ = s; - } - return s; - } - } - /** - * optional string event = 3; - */ - public com.google.protobuf.ByteString - getEventBytes() { - java.lang.Object ref = event_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - event_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - name_ = ""; - value_ = ""; - event_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getEventBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getValueBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getEventBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.openxc.BinaryMessages.EventedStringMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.EventedStringMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code openxc.EventedStringMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.EventedStringMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.EventedStringMessage.class, com.openxc.BinaryMessages.EventedStringMessage.Builder.class); - } - - // Construct using com.openxc.BinaryMessages.EventedStringMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - event_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedStringMessage_descriptor; - } - - public com.openxc.BinaryMessages.EventedStringMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance(); - } - - public com.openxc.BinaryMessages.EventedStringMessage build() { - com.openxc.BinaryMessages.EventedStringMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.openxc.BinaryMessages.EventedStringMessage buildPartial() { - com.openxc.BinaryMessages.EventedStringMessage result = new com.openxc.BinaryMessages.EventedStringMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.event_ = event_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.EventedStringMessage) { - return mergeFrom((com.openxc.BinaryMessages.EventedStringMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.openxc.BinaryMessages.EventedStringMessage other) { - if (other == com.openxc.BinaryMessages.EventedStringMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - bitField0_ |= 0x00000002; - value_ = other.value_; - onChanged(); - } - if (other.hasEvent()) { - bitField0_ |= 0x00000004; - event_ = other.event_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.openxc.BinaryMessages.EventedStringMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.EventedStringMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string name = 1; - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - // optional string value = 2; - private java.lang.Object value_ = ""; - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string value = 2; - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string value = 2; - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - /** - * optional string value = 2; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * optional string value = 2; - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - - // optional string event = 3; - private java.lang.Object event_ = ""; - /** - * optional string event = 3; - */ - public boolean hasEvent() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string event = 3; - */ - public java.lang.String getEvent() { - java.lang.Object ref = event_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - event_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string event = 3; - */ - public com.google.protobuf.ByteString - getEventBytes() { - java.lang.Object ref = event_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - event_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string event = 3; - */ - public Builder setEvent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - event_ = value; - onChanged(); - return this; - } - /** - * optional string event = 3; - */ - public Builder clearEvent() { - bitField0_ = (bitField0_ & ~0x00000004); - event_ = getDefaultInstance().getEvent(); - onChanged(); - return this; - } - /** - * optional string event = 3; - */ - public Builder setEventBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - event_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:openxc.EventedStringMessage) + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) } static { - defaultInstance = new EventedStringMessage(true); + defaultInstance = new VehicleMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.EventedStringMessage) + // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - public interface EventedBooleanMessageOrBuilder + public interface RawMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string name = 1; - /** - * optional string name = 1; - */ - boolean hasName(); + // optional int32 bus = 1; /** - * optional string name = 1; + * optional int32 bus = 1; */ - java.lang.String getName(); + boolean hasBus(); /** - * optional string name = 1; + * optional int32 bus = 1; */ - com.google.protobuf.ByteString - getNameBytes(); + int getBus(); - // optional string value = 2; - /** - * optional string value = 2; - */ - boolean hasValue(); + // optional uint32 message_id = 2; /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - java.lang.String getValue(); + boolean hasMessageId(); /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - com.google.protobuf.ByteString - getValueBytes(); + int getMessageId(); - // optional bool event = 3; + // optional uint64 data = 3; /** - * optional bool event = 3; + * optional uint64 data = 3; */ - boolean hasEvent(); + boolean hasData(); /** - * optional bool event = 3; + * optional uint64 data = 3; */ - boolean getEvent(); + long getData(); } /** - * Protobuf type {@code openxc.EventedBooleanMessage} + * Protobuf type {@code openxc.RawMessage} */ - public static final class EventedBooleanMessage extends + public static final class RawMessage extends com.google.protobuf.GeneratedMessage - implements EventedBooleanMessageOrBuilder { - // Use EventedBooleanMessage.newBuilder() to construct. - private EventedBooleanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements RawMessageOrBuilder { + // Use RawMessage.newBuilder() to construct. + private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private EventedBooleanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final EventedBooleanMessage defaultInstance; - public static EventedBooleanMessage getDefaultInstance() { + private static final RawMessage defaultInstance; + public static RawMessage getDefaultInstance() { return defaultInstance; } - public EventedBooleanMessage getDefaultInstanceForType() { + public RawMessage getDefaultInstanceForType() { return defaultInstance; } @@ -4946,7 +940,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private EventedBooleanMessage( + private RawMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4969,19 +963,19 @@ public final class BinaryMessages { } break; } - case 10: { + case 8: { bitField0_ |= 0x00000001; - name_ = input.readBytes(); + bus_ = input.readInt32(); break; } - case 18: { + case 16: { bitField0_ |= 0x00000002; - value_ = input.readBytes(); + messageId_ = input.readUInt32(); break; } case 24: { bitField0_ |= 0x00000004; - event_ = input.readBool(); + data_ = input.readUInt64(); break; } } @@ -4998,138 +992,84 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.EventedBooleanMessage.class, com.openxc.BinaryMessages.EventedBooleanMessage.Builder.class); + com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public EventedBooleanMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RawMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventedBooleanMessage(input, extensionRegistry); + return new RawMessage(input, extensionRegistry); } }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - /** - * optional string name = 1; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; /** - * optional string name = 1; + * optional int32 bus = 1; */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - - // optional string value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; /** - * optional string value = 2; + * optional int32 bus = 1; */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public int getBus() { + return bus_; } + + // optional uint32 message_id = 2; + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + private int messageId_; /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getMessageId() { + return messageId_; } - // optional bool event = 3; - public static final int EVENT_FIELD_NUMBER = 3; - private boolean event_; + // optional uint64 data = 3; + public static final int DATA_FIELD_NUMBER = 3; + private long data_; /** - * optional bool event = 3; + * optional uint64 data = 3; */ - public boolean hasEvent() { + public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional bool event = 3; + * optional uint64 data = 3; */ - public boolean getEvent() { - return event_; + public long getData() { + return data_; } private void initFields() { - name_ = ""; - value_ = ""; - event_ = false; + bus_ = 0; + messageId_ = 0; + data_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -5144,13 +1084,13 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); + output.writeUInt32(2, messageId_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(3, event_); + output.writeUInt64(3, data_); } getUnknownFields().writeTo(output); } @@ -5163,15 +1103,15 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeInt32Size(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getValueBytes()); + .computeUInt32Size(2, messageId_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, event_); + .computeUInt64Size(3, data_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -5185,53 +1125,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( + public static com.openxc.BinaryMessages.RawMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( + public static com.openxc.BinaryMessages.RawMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( + public static com.openxc.BinaryMessages.RawMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( + public static com.openxc.BinaryMessages.RawMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( + public static com.openxc.BinaryMessages.RawMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.EventedBooleanMessage parseFrom( + public static com.openxc.BinaryMessages.RawMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5240,7 +1180,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.EventedBooleanMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -5252,24 +1192,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.EventedBooleanMessage} + * Protobuf type {@code openxc.RawMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.EventedBooleanMessageOrBuilder { + implements com.openxc.BinaryMessages.RawMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.EventedBooleanMessage.class, com.openxc.BinaryMessages.EventedBooleanMessage.Builder.class); + com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.EventedBooleanMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5289,11 +1229,11 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - name_ = ""; + bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; + messageId_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - event_ = false; + data_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -5304,65 +1244,61 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedBooleanMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; } - public com.openxc.BinaryMessages.EventedBooleanMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.EventedBooleanMessage build() { - com.openxc.BinaryMessages.EventedBooleanMessage result = buildPartial(); + public com.openxc.BinaryMessages.RawMessage build() { + com.openxc.BinaryMessages.RawMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.EventedBooleanMessage buildPartial() { - com.openxc.BinaryMessages.EventedBooleanMessage result = new com.openxc.BinaryMessages.EventedBooleanMessage(this); + public com.openxc.BinaryMessages.RawMessage buildPartial() { + com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.name_ = name_; + result.bus_ = bus_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.value_ = value_; + result.messageId_ = messageId_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.event_ = event_; + result.data_ = data_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.EventedBooleanMessage) { - return mergeFrom((com.openxc.BinaryMessages.EventedBooleanMessage)other); + if (other instanceof com.openxc.BinaryMessages.RawMessage) { + return mergeFrom((com.openxc.BinaryMessages.RawMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.EventedBooleanMessage other) { - if (other == com.openxc.BinaryMessages.EventedBooleanMessage.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); + public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) { + if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); } - if (other.hasValue()) { - bitField0_ |= 0x00000002; - value_ = other.value_; - onChanged(); + if (other.hasMessageId()) { + setMessageId(other.getMessageId()); } - if (other.hasEvent()) { - setEvent(other.getEvent()); + if (other.hasData()) { + setData(other.getData()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -5376,11 +1312,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.EventedBooleanMessage parsedMessage = null; + com.openxc.BinaryMessages.RawMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.EventedBooleanMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -5391,260 +1327,223 @@ public final class BinaryMessages { } private int bitField0_; - // optional string name = 1; - private java.lang.Object name_ = ""; + // optional int32 bus = 1; + private int bus_ ; /** - * optional string name = 1; + * optional int32 bus = 1; */ - public boolean hasName() { + public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; + * optional int32 bus = 1; */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getBus() { + return bus_; } /** - * optional string name = 1; + * optional int32 bus = 1; */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; onChanged(); return this; } /** - * optional string name = 1; + * optional int32 bus = 1; */ - public Builder clearName() { + public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - name_ = value; + bus_ = 0; onChanged(); return this; } - // optional string value = 2; - private java.lang.Object value_ = ""; + // optional uint32 message_id = 2; + private int messageId_ ; /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - public boolean hasValue() { + public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getMessageId() { + return messageId_; } /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; + public Builder setMessageId(int value) { + bitField0_ |= 0x00000002; + messageId_ = value; onChanged(); return this; } /** - * optional string value = 2; + * optional uint32 message_id = 2; */ - public Builder clearValue() { + public Builder clearMessageId() { bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * optional string value = 2; - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; + messageId_ = 0; onChanged(); return this; } - // optional bool event = 3; - private boolean event_ ; + // optional uint64 data = 3; + private long data_ ; /** - * optional bool event = 3; + * optional uint64 data = 3; */ - public boolean hasEvent() { + public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional bool event = 3; + * optional uint64 data = 3; */ - public boolean getEvent() { - return event_; + public long getData() { + return data_; } /** - * optional bool event = 3; + * optional uint64 data = 3; */ - public Builder setEvent(boolean value) { + public Builder setData(long value) { bitField0_ |= 0x00000004; - event_ = value; + data_ = value; onChanged(); return this; } /** - * optional bool event = 3; + * optional uint64 data = 3; */ - public Builder clearEvent() { + public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000004); - event_ = false; + data_ = 0L; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.EventedBooleanMessage) + // @@protoc_insertion_point(builder_scope:openxc.RawMessage) } static { - defaultInstance = new EventedBooleanMessage(true); + defaultInstance = new RawMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.EventedBooleanMessage) + // @@protoc_insertion_point(class_scope:openxc.RawMessage) } - public interface EventedNumericMessageOrBuilder + public interface TranslatedMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string name = 1; + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional string string_value = 2; + /** + * optional string string_value = 2; + */ + boolean hasStringValue(); + /** + * optional string string_value = 2; + */ + java.lang.String getStringValue(); + /** + * optional string string_value = 2; + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + // optional double numerical_value = 3; /** - * optional string name = 1; + * optional double numerical_value = 3; */ - boolean hasName(); + boolean hasNumericalValue(); /** - * optional string name = 1; + * optional double numerical_value = 3; */ - java.lang.String getName(); + double getNumericalValue(); + + // optional bool boolean_value = 4; /** - * optional string name = 1; + * optional bool boolean_value = 4; */ - com.google.protobuf.ByteString - getNameBytes(); + boolean hasBooleanValue(); + /** + * optional bool boolean_value = 4; + */ + boolean getBooleanValue(); - // optional string value = 2; + // optional string string_event = 5; /** - * optional string value = 2; + * optional string string_event = 5; */ - boolean hasValue(); + boolean hasStringEvent(); /** - * optional string value = 2; + * optional string string_event = 5; */ - java.lang.String getValue(); + java.lang.String getStringEvent(); /** - * optional string value = 2; + * optional string string_event = 5; */ com.google.protobuf.ByteString - getValueBytes(); + getStringEventBytes(); + + // optional double numerical_event = 6; + /** + * optional double numerical_event = 6; + */ + boolean hasNumericalEvent(); + /** + * optional double numerical_event = 6; + */ + double getNumericalEvent(); - // optional double event = 3; + // optional bool boolean_event = 7; /** - * optional double event = 3; + * optional bool boolean_event = 7; */ - boolean hasEvent(); + boolean hasBooleanEvent(); /** - * optional double event = 3; + * optional bool boolean_event = 7; */ - double getEvent(); + boolean getBooleanEvent(); } /** - * Protobuf type {@code openxc.EventedNumericMessage} + * Protobuf type {@code openxc.TranslatedMessage} */ - public static final class EventedNumericMessage extends + public static final class TranslatedMessage extends com.google.protobuf.GeneratedMessage - implements EventedNumericMessageOrBuilder { - // Use EventedNumericMessage.newBuilder() to construct. - private EventedNumericMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements TranslatedMessageOrBuilder { + // Use TranslatedMessage.newBuilder() to construct. + private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private EventedNumericMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final EventedNumericMessage defaultInstance; - public static EventedNumericMessage getDefaultInstance() { + private static final TranslatedMessage defaultInstance; + public static TranslatedMessage getDefaultInstance() { return defaultInstance; } - public EventedNumericMessage getDefaultInstanceForType() { + public TranslatedMessage getDefaultInstanceForType() { return defaultInstance; } @@ -5654,7 +1553,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private EventedNumericMessage( + private TranslatedMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5684,12 +1583,32 @@ public final class BinaryMessages { } case 18: { bitField0_ |= 0x00000002; - value_ = input.readBytes(); + stringValue_ = input.readBytes(); break; } case 25: { bitField0_ |= 0x00000004; - event_ = input.readDouble(); + numericalValue_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + booleanValue_ = input.readBool(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + stringEvent_ = input.readBytes(); + break; + } + case 49: { + bitField0_ |= 0x00000020; + numericalEvent_ = input.readDouble(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + booleanEvent_ = input.readBool(); break; } } @@ -5706,28 +1625,28 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.EventedNumericMessage.class, com.openxc.BinaryMessages.EventedNumericMessage.Builder.class); + com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public EventedNumericMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TranslatedMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventedNumericMessage(input, extensionRegistry); + return new TranslatedMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @@ -5775,20 +1694,20 @@ public final class BinaryMessages { } } - // optional string value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; + // optional string string_value = 2; + public static final int STRING_VALUE_FIELD_NUMBER = 2; + private java.lang.Object stringValue_; /** - * optional string value = 2; + * optional string string_value = 2; */ - public boolean hasValue() { + public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string value = 2; + * optional string string_value = 2; */ - public java.lang.String getValue() { - java.lang.Object ref = value_; + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -5796,48 +1715,143 @@ public final class BinaryMessages { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - value_ = s; + stringValue_ = s; } return s; } } /** - * optional string value = 2; + * optional string string_value = 2; */ public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; + getStringValueBytes() { + java.lang.Object ref = stringValue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - value_ = b; + stringValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // optional double event = 3; - public static final int EVENT_FIELD_NUMBER = 3; - private double event_; + // optional double numerical_value = 3; + public static final int NUMERICAL_VALUE_FIELD_NUMBER = 3; + private double numericalValue_; /** - * optional double event = 3; + * optional double numerical_value = 3; */ - public boolean hasEvent() { + public boolean hasNumericalValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional double event = 3; + * optional double numerical_value = 3; + */ + public double getNumericalValue() { + return numericalValue_; + } + + // optional bool boolean_value = 4; + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; + private boolean booleanValue_; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; + } + + // optional string string_event = 5; + public static final int STRING_EVENT_FIELD_NUMBER = 5; + private java.lang.Object stringEvent_; + /** + * optional string string_event = 5; + */ + public boolean hasStringEvent() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string string_event = 5; + */ + public java.lang.String getStringEvent() { + java.lang.Object ref = stringEvent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringEvent_ = s; + } + return s; + } + } + /** + * optional string string_event = 5; + */ + public com.google.protobuf.ByteString + getStringEventBytes() { + java.lang.Object ref = stringEvent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringEvent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional double numerical_event = 6; + public static final int NUMERICAL_EVENT_FIELD_NUMBER = 6; + private double numericalEvent_; + /** + * optional double numerical_event = 6; + */ + public boolean hasNumericalEvent() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional double numerical_event = 6; + */ + public double getNumericalEvent() { + return numericalEvent_; + } + + // optional bool boolean_event = 7; + public static final int BOOLEAN_EVENT_FIELD_NUMBER = 7; + private boolean booleanEvent_; + /** + * optional bool boolean_event = 7; + */ + public boolean hasBooleanEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool boolean_event = 7; */ - public double getEvent() { - return event_; + public boolean getBooleanEvent() { + return booleanEvent_; } private void initFields() { name_ = ""; - value_ = ""; - event_ = 0D; + stringValue_ = ""; + numericalValue_ = 0D; + booleanValue_ = false; + stringEvent_ = ""; + numericalEvent_ = 0D; + booleanEvent_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -5855,10 +1869,22 @@ public final class BinaryMessages { output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); + output.writeBytes(2, getStringValueBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeDouble(3, event_); + output.writeDouble(3, numericalValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, booleanValue_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getStringEventBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeDouble(6, numericalEvent_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBool(7, booleanEvent_); } getUnknownFields().writeTo(output); } @@ -5875,11 +1901,27 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getValueBytes()); + .computeBytesSize(2, getStringValueBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, event_); + .computeDoubleSize(3, numericalValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, booleanValue_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getStringEventBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, numericalEvent_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, booleanEvent_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -5893,53 +1935,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.EventedNumericMessage parseFrom( + public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5948,7 +1990,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.EventedNumericMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -5960,24 +2002,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.EventedNumericMessage} + * Protobuf type {@code openxc.TranslatedMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.EventedNumericMessageOrBuilder { + implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.EventedNumericMessage.class, com.openxc.BinaryMessages.EventedNumericMessage.Builder.class); + com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.EventedNumericMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5999,10 +2041,18 @@ public final class BinaryMessages { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; + stringValue_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - event_ = 0D; + numericalValue_ = 0D; bitField0_ = (bitField0_ & ~0x00000004); + booleanValue_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + stringEvent_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + numericalEvent_ = 0D; + bitField0_ = (bitField0_ & ~0x00000020); + booleanEvent_ = false; + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -6012,23 +2062,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_EventedNumericMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; } - public com.openxc.BinaryMessages.EventedNumericMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.EventedNumericMessage build() { - com.openxc.BinaryMessages.EventedNumericMessage result = buildPartial(); + public com.openxc.BinaryMessages.TranslatedMessage build() { + com.openxc.BinaryMessages.TranslatedMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.EventedNumericMessage buildPartial() { - com.openxc.BinaryMessages.EventedNumericMessage result = new com.openxc.BinaryMessages.EventedNumericMessage(this); + public com.openxc.BinaryMessages.TranslatedMessage buildPartial() { + com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -6038,39 +2088,69 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.value_ = value_; + result.stringValue_ = stringValue_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.event_ = event_; + result.numericalValue_ = numericalValue_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.booleanValue_ = booleanValue_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.stringEvent_ = stringEvent_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.numericalEvent_ = numericalEvent_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.booleanEvent_ = booleanEvent_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.EventedNumericMessage) { - return mergeFrom((com.openxc.BinaryMessages.EventedNumericMessage)other); + if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) { + return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.EventedNumericMessage other) { - if (other == com.openxc.BinaryMessages.EventedNumericMessage.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) { + if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } - if (other.hasValue()) { + if (other.hasStringValue()) { bitField0_ |= 0x00000002; - value_ = other.value_; + stringValue_ = other.stringValue_; onChanged(); } - if (other.hasEvent()) { - setEvent(other.getEvent()); + if (other.hasNumericalValue()) { + setNumericalValue(other.getNumericalValue()); + } + if (other.hasBooleanValue()) { + setBooleanValue(other.getBooleanValue()); + } + if (other.hasStringEvent()) { + bitField0_ |= 0x00000010; + stringEvent_ = other.stringEvent_; + onChanged(); + } + if (other.hasNumericalEvent()) { + setNumericalEvent(other.getNumericalEvent()); + } + if (other.hasBooleanEvent()) { + setBooleanEvent(other.getBooleanEvent()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -6084,11 +2164,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.EventedNumericMessage parsedMessage = null; + com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.EventedNumericMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -6173,122 +2253,295 @@ public final class BinaryMessages { return this; } - // optional string value = 2; - private java.lang.Object value_ = ""; + // optional string string_value = 2; + private java.lang.Object stringValue_ = ""; /** - * optional string value = 2; + * optional string string_value = 2; */ - public boolean hasValue() { + public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string value = 2; + * optional string string_value = 2; */ - public java.lang.String getValue() { - java.lang.Object ref = value_; + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); - value_ = s; + stringValue_ = s; return s; } else { return (java.lang.String) ref; } } /** - * optional string value = 2; + * optional string string_value = 2; */ public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; + getStringValueBytes() { + java.lang.Object ref = stringValue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - value_ = b; + stringValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string value = 2; + * optional string string_value = 2; */ - public Builder setValue( + public Builder setStringValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - value_ = value; + stringValue_ = value; onChanged(); return this; } /** - * optional string value = 2; + * optional string string_value = 2; */ - public Builder clearValue() { + public Builder clearStringValue() { bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); + stringValue_ = getDefaultInstance().getStringValue(); onChanged(); return this; } /** - * optional string value = 2; + * optional string string_value = 2; */ - public Builder setValueBytes( + public Builder setStringValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - value_ = value; + stringValue_ = value; onChanged(); return this; } - // optional double event = 3; - private double event_ ; + // optional double numerical_value = 3; + private double numericalValue_ ; /** - * optional double event = 3; + * optional double numerical_value = 3; */ - public boolean hasEvent() { + public boolean hasNumericalValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional double event = 3; + * optional double numerical_value = 3; */ - public double getEvent() { - return event_; + public double getNumericalValue() { + return numericalValue_; } /** - * optional double event = 3; + * optional double numerical_value = 3; */ - public Builder setEvent(double value) { + public Builder setNumericalValue(double value) { bitField0_ |= 0x00000004; - event_ = value; + numericalValue_ = value; onChanged(); return this; } /** - * optional double event = 3; + * optional double numerical_value = 3; */ - public Builder clearEvent() { + public Builder clearNumericalValue() { bitField0_ = (bitField0_ & ~0x00000004); - event_ = 0D; + numericalValue_ = 0D; + onChanged(); + return this; + } + + // optional bool boolean_value = 4; + private boolean booleanValue_ ; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; + } + /** + * optional bool boolean_value = 4; + */ + public Builder setBooleanValue(boolean value) { + bitField0_ |= 0x00000008; + booleanValue_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_value = 4; + */ + public Builder clearBooleanValue() { + bitField0_ = (bitField0_ & ~0x00000008); + booleanValue_ = false; + onChanged(); + return this; + } + + // optional string string_event = 5; + private java.lang.Object stringEvent_ = ""; + /** + * optional string string_event = 5; + */ + public boolean hasStringEvent() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string string_event = 5; + */ + public java.lang.String getStringEvent() { + java.lang.Object ref = stringEvent_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stringEvent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string string_event = 5; + */ + public com.google.protobuf.ByteString + getStringEventBytes() { + java.lang.Object ref = stringEvent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringEvent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string string_event = 5; + */ + public Builder setStringEvent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + stringEvent_ = value; + onChanged(); + return this; + } + /** + * optional string string_event = 5; + */ + public Builder clearStringEvent() { + bitField0_ = (bitField0_ & ~0x00000010); + stringEvent_ = getDefaultInstance().getStringEvent(); + onChanged(); + return this; + } + /** + * optional string string_event = 5; + */ + public Builder setStringEventBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + stringEvent_ = value; + onChanged(); + return this; + } + + // optional double numerical_event = 6; + private double numericalEvent_ ; + /** + * optional double numerical_event = 6; + */ + public boolean hasNumericalEvent() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional double numerical_event = 6; + */ + public double getNumericalEvent() { + return numericalEvent_; + } + /** + * optional double numerical_event = 6; + */ + public Builder setNumericalEvent(double value) { + bitField0_ |= 0x00000020; + numericalEvent_ = value; + onChanged(); + return this; + } + /** + * optional double numerical_event = 6; + */ + public Builder clearNumericalEvent() { + bitField0_ = (bitField0_ & ~0x00000020); + numericalEvent_ = 0D; + onChanged(); + return this; + } + + // optional bool boolean_event = 7; + private boolean booleanEvent_ ; + /** + * optional bool boolean_event = 7; + */ + public boolean hasBooleanEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool boolean_event = 7; + */ + public boolean getBooleanEvent() { + return booleanEvent_; + } + /** + * optional bool boolean_event = 7; + */ + public Builder setBooleanEvent(boolean value) { + bitField0_ |= 0x00000040; + booleanEvent_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_event = 7; + */ + public Builder clearBooleanEvent() { + bitField0_ = (bitField0_ & ~0x00000040); + booleanEvent_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.EventedNumericMessage) + // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) } static { - defaultInstance = new EventedNumericMessage(true); + defaultInstance = new TranslatedMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.EventedNumericMessage) + // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) } private static com.google.protobuf.Descriptors.Descriptor @@ -6302,35 +2555,10 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_RawMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_StringMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_StringMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_NumericMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_NumericMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_BooleanMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_BooleanMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_EventedStringMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_EventedStringMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_EventedBooleanMessage_descriptor; + internal_static_openxc_TranslatedMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_EventedBooleanMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_EventedNumericMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_EventedNumericMessage_fieldAccessorTable; + internal_static_openxc_TranslatedMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -6340,31 +2568,18 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\232\004\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\274\001\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\022-\n\016string_message\030\003 \001(\0132\025.openxc.S" + - "tringMessage\022/\n\017numeric_message\030\004 \001(\0132\026." + - "openxc.NumericMessage\022/\n\017boolean_message" + - "\030\005 \001(\0132\026.openxc.BooleanMessage\022<\n\026evente" + - "d_string_message\030\006 \001(\0132\034.openxc.EventedS" + - "tringMessage\022>\n\027evented_boolean_message\030" + - "\007 \001(\0132\035.openxc.EventedBooleanMessage\022>\n\027", - "evented_numeric_message\030\010 \001(\0132\035.openxc.E" + - "ventedNumericMessage\"e\n\004Type\022\007\n\003RAW\020\001\022\n\n" + - "\006STRING\020\002\022\010\n\004BOOL\020\003\022\007\n\003NUM\020\004\022\017\n\013EVENTED_" + - "NUM\020\005\022\022\n\016EVENTED_STRING\020\006\022\020\n\014EVENTED_BOO" + - "L\020\007\"-\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_id\030\002 \001(\r\",\n\rStringMessage\022\014\n\004name\030\001 \001(" + - "\t\022\r\n\005value\030\002 \001(\t\"-\n\016NumericMessage\022\014\n\004na" + - "me\030\001 \001(\t\022\r\n\005value\030\002 \001(\001\"-\n\016BooleanMessag" + - "e\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\010\"B\n\024Evente" + - "dStringMessage\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 ", - "\001(\t\022\r\n\005event\030\003 \001(\t\"C\n\025EventedBooleanMess" + - "age\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005even" + - "t\030\003 \001(\010\"C\n\025EventedNumericMessage\022\014\n\004name" + - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\r\n\005event\030\003 \001(\001B\034\n\n" + - "com.openxcB\016BinaryMessages" + "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" + + "xc.TranslatedMessage\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + + "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + + "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\255\001\n\021T" + + "ranslatedMessage\022\014\n\004name\030\001 \001(\t\022\024\n\014string" + + "_value\030\002 \001(\t\022\027\n\017numerical_value\030\003 \001(\001\022\025\n" + + "\rboolean_value\030\004 \001(\010\022\024\n\014string_event\030\005 \001", + "(\t\022\027\n\017numerical_event\030\006 \001(\001\022\025\n\rboolean_e" + + "vent\030\007 \001(\010B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -6376,49 +2591,19 @@ 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", "StringMessage", "NumericMessage", "BooleanMessage", "EventedStringMessage", "EventedBooleanMessage", "EventedNumericMessage", }); + new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", }); internal_static_openxc_RawMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", }); - internal_static_openxc_StringMessage_descriptor = + new java.lang.String[] { "Bus", "MessageId", "Data", }); + internal_static_openxc_TranslatedMessage_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_openxc_StringMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_StringMessage_descriptor, - new java.lang.String[] { "Name", "Value", }); - internal_static_openxc_NumericMessage_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_openxc_NumericMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_NumericMessage_descriptor, - new java.lang.String[] { "Name", "Value", }); - internal_static_openxc_BooleanMessage_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_openxc_BooleanMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_BooleanMessage_descriptor, - new java.lang.String[] { "Name", "Value", }); - internal_static_openxc_EventedStringMessage_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_openxc_EventedStringMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_EventedStringMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }); - internal_static_openxc_EventedBooleanMessage_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_openxc_EventedBooleanMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_EventedBooleanMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }); - internal_static_openxc_EventedNumericMessage_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_openxc_EventedNumericMessage_fieldAccessorTable = new + internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_EventedNumericMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }); + internal_static_openxc_TranslatedMessage_descriptor, + new java.lang.String[] { "Name", "StringValue", "NumericalValue", "BooleanValue", "StringEvent", "NumericalEvent", "BooleanEvent", }); return null; } }; diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 6c773033..5b311a2e 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\"\x9a\x04\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-\n\x0estring_message\x18\x03 \x01(\x0b\x32\x15.openxc.StringMessage\x12/\n\x0fnumeric_message\x18\x04 \x01(\x0b\x32\x16.openxc.NumericMessage\x12/\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32\x16.openxc.BooleanMessage\x12<\n\x16\x65vented_string_message\x18\x06 \x01(\x0b\x32\x1c.openxc.EventedStringMessage\x12>\n\x17\x65vented_boolean_message\x18\x07 \x01(\x0b\x32\x1d.openxc.EventedBooleanMessage\x12>\n\x17\x65vented_numeric_message\x18\x08 \x01(\x0b\x32\x1d.openxc.EventedNumericMessage\"e\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x07\n\x03NUM\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x12\n\x0e\x45VENTED_STRING\x10\x06\x12\x10\n\x0c\x45VENTED_BOOL\x10\x07\"-\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\",\n\rStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"-\n\x0eNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"-\n\x0e\x42ooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08\"B\n\x14\x45ventedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\t\"C\n\x15\x45ventedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x08\"C\n\x15\x45ventedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05\x65vent\x18\x03 \x01(\x01\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\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -28,34 +28,14 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( options=None, type=None), _descriptor.EnumValueDescriptor( - name='STRING', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BOOL', index=2, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NUM', index=3, number=4, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_NUM', index=4, number=5, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_STRING', index=5, number=6, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_BOOL', index=6, number=7, + name='TRANSLATED', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=462, - serialized_end=563, + serialized_start=182, + serialized_end=213, ) @@ -81,47 +61,12 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='string_message', full_name='openxc.VehicleMessage.string_message', index=2, + name='translated_message', full_name='openxc.VehicleMessage.translated_message', index=2, number=3, 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), - _descriptor.FieldDescriptor( - name='numeric_message', full_name='openxc.VehicleMessage.numeric_message', index=3, - number=4, 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), - _descriptor.FieldDescriptor( - name='boolean_message', full_name='openxc.VehicleMessage.boolean_message', 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), - _descriptor.FieldDescriptor( - name='evented_string_message', full_name='openxc.VehicleMessage.evented_string_message', index=5, - number=6, 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), - _descriptor.FieldDescriptor( - name='evented_boolean_message', full_name='openxc.VehicleMessage.evented_boolean_message', index=6, - number=7, 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), - _descriptor.FieldDescriptor( - name='evented_numeric_message', full_name='openxc.VehicleMessage.evented_numeric_message', index=7, - number=8, 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=[ ], @@ -133,7 +78,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=563, + serialized_end=213, ) @@ -158,72 +103,9 @@ _RAWMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=565, - serialized_end=610, -) - - -_STRINGMESSAGE = _descriptor.Descriptor( - name='StringMessage', - full_name='openxc.StringMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='openxc.StringMessage.name', index=0, - number=1, 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, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='openxc.StringMessage.value', index=1, - number=2, 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, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=612, - serialized_end=656, -) - - -_NUMERICMESSAGE = _descriptor.Descriptor( - name='NumericMessage', - full_name='openxc.NumericMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.NumericMessage.name', index=0, - number=1, 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, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='openxc.NumericMessage.value', index=1, - number=2, type=1, cpp_type=5, label=1, + name='data', full_name='openxc.RawMessage.data', index=2, + number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -237,155 +119,64 @@ _NUMERICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=658, - serialized_end=703, -) - - -_BOOLEANMESSAGE = _descriptor.Descriptor( - name='BooleanMessage', - full_name='openxc.BooleanMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='openxc.BooleanMessage.name', index=0, - number=1, 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, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='openxc.BooleanMessage.value', index=1, - number=2, 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), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=705, - serialized_end=750, + serialized_start=215, + serialized_end=274, ) -_EVENTEDSTRINGMESSAGE = _descriptor.Descriptor( - name='EventedStringMessage', - full_name='openxc.EventedStringMessage', +_TRANSLATEDMESSAGE = _descriptor.Descriptor( + name='TranslatedMessage', + full_name='openxc.TranslatedMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.EventedStringMessage.name', index=0, + name='name', full_name='openxc.TranslatedMessage.name', index=0, number=1, 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, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.EventedStringMessage.value', index=1, + name='string_value', full_name='openxc.TranslatedMessage.string_value', index=1, number=2, 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, options=None), _descriptor.FieldDescriptor( - name='event', full_name='openxc.EventedStringMessage.event', index=2, - number=3, 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, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=752, - serialized_end=818, -) - - -_EVENTEDBOOLEANMESSAGE = _descriptor.Descriptor( - name='EventedBooleanMessage', - full_name='openxc.EventedBooleanMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='openxc.EventedBooleanMessage.name', index=0, - number=1, 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, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='openxc.EventedBooleanMessage.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + name='numerical_value', full_name='openxc.TranslatedMessage.numerical_value', index=2, + number=3, 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='event', full_name='openxc.EventedBooleanMessage.event', index=2, - number=3, type=8, cpp_type=7, label=1, + name='boolean_value', full_name='openxc.TranslatedMessage.boolean_value', index=3, + number=4, 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), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=820, - serialized_end=887, -) - - -_EVENTEDNUMERICMESSAGE = _descriptor.Descriptor( - name='EventedNumericMessage', - full_name='openxc.EventedNumericMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.EventedNumericMessage.name', index=0, - number=1, type=9, cpp_type=9, label=1, + name='string_event', full_name='openxc.TranslatedMessage.string_event', index=4, + number=5, 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, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.EventedNumericMessage.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + name='numerical_event', full_name='openxc.TranslatedMessage.numerical_event', index=5, + number=6, 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='event', full_name='openxc.EventedNumericMessage.event', index=2, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + name='boolean_event', full_name='openxc.TranslatedMessage.boolean_event', index=6, + number=7, 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), @@ -398,27 +189,17 @@ _EVENTEDNUMERICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=889, - serialized_end=956, + serialized_start=277, + serialized_end=450, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE _VEHICLEMESSAGE.fields_by_name['raw_message'].message_type = _RAWMESSAGE -_VEHICLEMESSAGE.fields_by_name['string_message'].message_type = _STRINGMESSAGE -_VEHICLEMESSAGE.fields_by_name['numeric_message'].message_type = _NUMERICMESSAGE -_VEHICLEMESSAGE.fields_by_name['boolean_message'].message_type = _BOOLEANMESSAGE -_VEHICLEMESSAGE.fields_by_name['evented_string_message'].message_type = _EVENTEDSTRINGMESSAGE -_VEHICLEMESSAGE.fields_by_name['evented_boolean_message'].message_type = _EVENTEDBOOLEANMESSAGE -_VEHICLEMESSAGE.fields_by_name['evented_numeric_message'].message_type = _EVENTEDNUMERICMESSAGE +_VEHICLEMESSAGE.fields_by_name['translated_message'].message_type = _TRANSLATEDMESSAGE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE -DESCRIPTOR.message_types_by_name['StringMessage'] = _STRINGMESSAGE -DESCRIPTOR.message_types_by_name['NumericMessage'] = _NUMERICMESSAGE -DESCRIPTOR.message_types_by_name['BooleanMessage'] = _BOOLEANMESSAGE -DESCRIPTOR.message_types_by_name['EventedStringMessage'] = _EVENTEDSTRINGMESSAGE -DESCRIPTOR.message_types_by_name['EventedBooleanMessage'] = _EVENTEDBOOLEANMESSAGE -DESCRIPTOR.message_types_by_name['EventedNumericMessage'] = _EVENTEDNUMERICMESSAGE +DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE class VehicleMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType @@ -432,41 +213,11 @@ class RawMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.RawMessage) -class StringMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _STRINGMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.StringMessage) - -class NumericMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _NUMERICMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.NumericMessage) - -class BooleanMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _BOOLEANMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.BooleanMessage) - -class EventedStringMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _EVENTEDSTRINGMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.EventedStringMessage) - -class EventedBooleanMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _EVENTEDBOOLEANMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.EventedBooleanMessage) - -class EventedNumericMessage(_message.Message): +class TranslatedMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _EVENTEDNUMERICMESSAGE + DESCRIPTOR = _TRANSLATEDMESSAGE - # @@protoc_insertion_point(class_scope:openxc.EventedNumericMessage) + # @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) DESCRIPTOR.has_options = True diff --git a/openxc.proto b/openxc.proto index 54133432..9f9046eb 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,62 +4,30 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; - STRING = 2; - BOOL = 3; - NUM = 4; - EVENTED_NUM = 5; - EVENTED_STRING = 6; - EVENTED_BOOL = 7; - } + enum Type { RAW = 1; TRANSLATED = 2; } optional Type type = 1; optional RawMessage raw_message = 2; - optional StringMessage string_message = 3; - optional NumericMessage numeric_message = 4; - optional BooleanMessage boolean_message = 5; - optional EventedStringMessage evented_string_message = 6; - optional EventedBooleanMessage evented_boolean_message = 7; - optional EventedNumericMessage evented_numeric_message = 8; + optional TranslatedMessage translated_message = 3; } message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; + optional uint64 data = 3; } -message StringMessage { +message TranslatedMessage { optional string name = 1; - optional string value = 2; -} -message NumericMessage { - optional string name = 1; - optional double value = 2; -} + optional string string_value = 2; + optional double numerical_value = 3; + optional bool boolean_value = 4; -message BooleanMessage { - optional string name = 1; - optional bool value = 2; -} - -message EventedStringMessage { - optional string name = 1; - optional string value = 2; - optional string event = 3; -} - -message EventedBooleanMessage { - optional string name = 1; - optional string value = 2; - optional bool event = 3; -} - -message EventedNumericMessage { - optional string name = 1; - optional string value = 2; - optional double event = 3; + optional string string_event = 5; + optional double numerical_event = 6; + optional bool boolean_event = 7; } // TODO we should also consider having an enum type, having each specific -- cgit 1.2.3-korg From f8ea5374f584310fbd7521b41385a71eb7c613d3 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 24 Oct 2013 10:09:30 -0400 Subject: Minimize the number of separate protobuf types. --- benchmark/proto/compare_sizes.py | 25 +- gen/cpp/openxc.pb | 29 +- gen/cpp/openxc.pb.c | 19 +- gen/cpp/openxc.pb.h | 42 ++- gen/java/com/openxc/BinaryMessages.java | 634 +++++++++++++++++++++----------- gen/python/openxc_pb2.py | 79 +++- openxc.proto | 19 +- 7 files changed, 573 insertions(+), 274 deletions(-) diff --git a/benchmark/proto/compare_sizes.py b/benchmark/proto/compare_sizes.py index e4ae6691..0ed445fd 100755 --- a/benchmark/proto/compare_sizes.py +++ b/benchmark/proto/compare_sizes.py @@ -42,12 +42,27 @@ for trace_file in sys.argv[1:]: else: message.type = openxc_pb2.VehicleMessage.TRANSLATED message.translated_message.name = json_message['name'] - if isinstance(json_message['value'], bool): - message.translated_message.boolean_value = json_message['value'] - elif isinstance(json_message['value'], numbers.Number): - message.translated_message.numerical_value = json_message['value'] - else: + if 'event' in json_message: message.translated_message.string_value = json_message['value'] + if isinstance(json_message['event'], bool): + message.translated_message.type = openxc_pb2.TranslatedMessage.EVENTED_BOOL + message.translated_message.boolean_event = json_message['event'] + elif isinstance(json_message['event'], numbers.Number): + message.translated_message.type = openxc_pb2.TranslatedMessage.EVENTED_NUM + message.translated_message.numeric_value = json_message['event'] + else: + message.translated_message.type = openxc_pb2.TranslatedMessage.EVENTED_STRING + message.translated_message.string_value = json_message['event'] + else: + if isinstance(json_message['value'], bool): + message.translated_message.type = openxc_pb2.TranslatedMessage.BOOL + message.translated_message.boolean_value = json_message['value'] + elif isinstance(json_message['value'], numbers.Number): + message.translated_message.type = openxc_pb2.TranslatedMessage.NUM + message.translated_message.numeric_value = json_message['value'] + else: + message.translated_message.type = openxc_pb2.TranslatedMessage.STRING + message.translated_message.string_value = json_message['value'] total_translated_json_size += len(json.dumps(json_message)) total_translated_binary_size += len(message.SerializeToString()) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index d4356e1c..88cf91aa 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -à +è openxc.protoopenxc"¼ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -14,14 +14,23 @@ RawMessage bus ( message_id (  -data ("­ -TranslatedMessage -name (  - string_value (  -numerical_value ( - boolean_value ( - string_event (  -numerical_event ( - boolean_event (B +data ("µ +TranslatedMessage, +type (2.openxc.TranslatedMessage.Type +name (  + string_value (  + numeric_value ( + boolean_value ( + string_event (  + numeric_event ( + boolean_event ("\ +Type + +STRING +NUM +BOOL +EVENTED_STRING + EVENTED_NUM + EVENTED_BOOLB com.openxcBBinaryMessages \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 91667bf3..1625254e 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.4-dev at Wed Oct 9 14:26:13 2013. */ +/* Generated by nanopb-0.2.4-dev at Thu Oct 24 10:06:38 2013. */ #include "openxc.pb.h" @@ -19,14 +19,15 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_TranslatedMessage_fields[8] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_value, name, 0), - PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_value, string_value, 0), - PB_FIELD2( 4, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_value, numerical_value, 0), - PB_FIELD2( 5, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), - PB_FIELD2( 6, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numerical_event, string_event, 0), - PB_FIELD2( 7, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_event, numerical_event, 0), +const pb_field_t openxc_TranslatedMessage_fields[9] = { + PB_FIELD2( 1, ENUM , OPTIONAL, STATIC, FIRST, openxc_TranslatedMessage, type, type, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, name, type, 0), + PB_FIELD2( 3, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_value, name, 0), + PB_FIELD2( 4, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numeric_value, string_value, 0), + PB_FIELD2( 5, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_value, numeric_value, 0), + PB_FIELD2( 6, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), + PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numeric_event, string_event, 0), + PB_FIELD2( 8, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_event, numeric_event, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index d278c681..81a0779d 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.4-dev at Wed Oct 9 14:26:13 2013. */ +/* Generated by nanopb-0.2.4-dev at Thu Oct 24 10:06:38 2013. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -15,6 +15,15 @@ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_TRANSLATED = 2 } openxc_VehicleMessage_Type; +typedef enum _openxc_TranslatedMessage_Type { + openxc_TranslatedMessage_Type_STRING = 1, + openxc_TranslatedMessage_Type_NUM = 2, + openxc_TranslatedMessage_Type_BOOL = 3, + openxc_TranslatedMessage_Type_EVENTED_STRING = 4, + openxc_TranslatedMessage_Type_EVENTED_NUM = 5, + openxc_TranslatedMessage_Type_EVENTED_BOOL = 6 +} openxc_TranslatedMessage_Type; + /* Struct definitions */ typedef struct _openxc_RawMessage { bool has_bus; @@ -26,18 +35,20 @@ typedef struct _openxc_RawMessage { } openxc_RawMessage; typedef struct _openxc_TranslatedMessage { + bool has_type; + openxc_TranslatedMessage_Type type; bool has_name; char name[100]; bool has_string_value; char string_value[100]; - bool has_numerical_value; - double numerical_value; + bool has_numeric_value; + double numeric_value; bool has_boolean_value; bool boolean_value; bool has_string_event; char string_event[100]; - bool has_numerical_event; - double numerical_event; + bool has_numeric_event; + double numeric_event; bool has_boolean_event; bool boolean_event; } openxc_TranslatedMessage; @@ -57,13 +68,14 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 -#define openxc_TranslatedMessage_name_tag 1 -#define openxc_TranslatedMessage_string_value_tag 2 -#define openxc_TranslatedMessage_numerical_value_tag 3 -#define openxc_TranslatedMessage_boolean_value_tag 4 -#define openxc_TranslatedMessage_string_event_tag 5 -#define openxc_TranslatedMessage_numerical_event_tag 6 -#define openxc_TranslatedMessage_boolean_event_tag 7 +#define openxc_TranslatedMessage_type_tag 1 +#define openxc_TranslatedMessage_name_tag 2 +#define openxc_TranslatedMessage_string_value_tag 3 +#define openxc_TranslatedMessage_numeric_value_tag 4 +#define openxc_TranslatedMessage_boolean_value_tag 5 +#define openxc_TranslatedMessage_string_event_tag 6 +#define openxc_TranslatedMessage_numeric_event_tag 7 +#define openxc_TranslatedMessage_boolean_event_tag 8 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -71,12 +83,12 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[4]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_TranslatedMessage_fields[8]; +extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 362 +#define openxc_VehicleMessage_size 368 #define openxc_RawMessage_size 23 -#define openxc_TranslatedMessage_size 328 +#define openxc_TranslatedMessage_size 334 #ifdef __cplusplus } /* extern "C" */ diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 7410c63e..02f2579f 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1440,88 +1440,98 @@ public final class BinaryMessages { public interface TranslatedMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string name = 1; + // optional .openxc.TranslatedMessage.Type type = 1; /** - * optional string name = 1; + * optional .openxc.TranslatedMessage.Type type = 1; + */ + boolean hasType(); + /** + * optional .openxc.TranslatedMessage.Type type = 1; + */ + com.openxc.BinaryMessages.TranslatedMessage.Type getType(); + + // optional string name = 2; + /** + * optional string name = 2; */ boolean hasName(); /** - * optional string name = 1; + * optional string name = 2; */ java.lang.String getName(); /** - * optional string name = 1; + * optional string name = 2; */ com.google.protobuf.ByteString getNameBytes(); - // optional string string_value = 2; + // optional string string_value = 3; /** - * optional string string_value = 2; + * optional string string_value = 3; */ boolean hasStringValue(); /** - * optional string string_value = 2; + * optional string string_value = 3; */ java.lang.String getStringValue(); /** - * optional string string_value = 2; + * optional string string_value = 3; */ com.google.protobuf.ByteString getStringValueBytes(); - // optional double numerical_value = 3; + // optional double numeric_value = 4; /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - boolean hasNumericalValue(); + boolean hasNumericValue(); /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - double getNumericalValue(); + double getNumericValue(); - // optional bool boolean_value = 4; + // optional bool boolean_value = 5; /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ boolean hasBooleanValue(); /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ boolean getBooleanValue(); - // optional string string_event = 5; + // optional string string_event = 6; /** - * optional string string_event = 5; + * optional string string_event = 6; */ boolean hasStringEvent(); /** - * optional string string_event = 5; + * optional string string_event = 6; */ java.lang.String getStringEvent(); /** - * optional string string_event = 5; + * optional string string_event = 6; */ com.google.protobuf.ByteString getStringEventBytes(); - // optional double numerical_event = 6; + // optional double numeric_event = 7; /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - boolean hasNumericalEvent(); + boolean hasNumericEvent(); /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - double getNumericalEvent(); + double getNumericEvent(); - // optional bool boolean_event = 7; + // optional bool boolean_event = 8; /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ boolean hasBooleanEvent(); /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ boolean getBooleanEvent(); } @@ -1576,38 +1586,49 @@ public final class BinaryMessages { } break; } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } break; } case 18: { bitField0_ |= 0x00000002; - stringValue_ = input.readBytes(); + name_ = input.readBytes(); break; } - case 25: { + case 26: { bitField0_ |= 0x00000004; - numericalValue_ = input.readDouble(); + stringValue_ = input.readBytes(); break; } - case 32: { + case 33: { bitField0_ |= 0x00000008; - booleanValue_ = input.readBool(); + numericValue_ = input.readDouble(); break; } - case 42: { + case 40: { bitField0_ |= 0x00000010; - stringEvent_ = input.readBytes(); + booleanValue_ = input.readBool(); break; } - case 49: { + case 50: { bitField0_ |= 0x00000020; - numericalEvent_ = input.readDouble(); + stringEvent_ = input.readBytes(); break; } - case 56: { + case 57: { bitField0_ |= 0x00000040; + numericEvent_ = input.readDouble(); + break; + } + case 64: { + bitField0_ |= 0x00000080; booleanEvent_ = input.readBool(); break; } @@ -1650,18 +1671,152 @@ public final class BinaryMessages { return PARSER; } + /** + * Protobuf enum {@code openxc.TranslatedMessage.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STRING = 1; + */ + STRING(0, 1), + /** + * NUM = 2; + */ + NUM(1, 2), + /** + * BOOL = 3; + */ + BOOL(2, 3), + /** + * EVENTED_STRING = 4; + */ + EVENTED_STRING(3, 4), + /** + * EVENTED_NUM = 5; + */ + EVENTED_NUM(4, 5), + /** + * EVENTED_BOOL = 6; + */ + EVENTED_BOOL(5, 6), + ; + + /** + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + /** + * NUM = 2; + */ + public static final int NUM_VALUE = 2; + /** + * BOOL = 3; + */ + public static final int BOOL_VALUE = 3; + /** + * EVENTED_STRING = 4; + */ + public static final int EVENTED_STRING_VALUE = 4; + /** + * EVENTED_NUM = 5; + */ + public static final int EVENTED_NUM_VALUE = 5; + /** + * EVENTED_BOOL = 6; + */ + public static final int EVENTED_BOOL_VALUE = 6; + + + public final int getNumber() { return value; } + + public static Type valueOf(int value) { + switch (value) { + case 1: return STRING; + case 2: return NUM; + case 3: return BOOL; + case 4: return EVENTED_STRING; + case 5: return EVENTED_NUM; + case 6: return EVENTED_BOOL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type) + } + private int bitField0_; - // optional string name = 1; - public static final int NAME_FIELD_NUMBER = 1; + // optional .openxc.TranslatedMessage.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.TranslatedMessage.Type type_; + /** + * optional .openxc.TranslatedMessage.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.TranslatedMessage.Type type = 1; + */ + public com.openxc.BinaryMessages.TranslatedMessage.Type getType() { + return type_; + } + + // optional string name = 2; + public static final int NAME_FIELD_NUMBER = 2; private java.lang.Object name_; /** - * optional string name = 1; + * optional string name = 2; */ public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string name = 1; + * optional string name = 2; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -1678,7 +1833,7 @@ public final class BinaryMessages { } } /** - * optional string name = 1; + * optional string name = 2; */ public com.google.protobuf.ByteString getNameBytes() { @@ -1694,17 +1849,17 @@ public final class BinaryMessages { } } - // optional string string_value = 2; - public static final int STRING_VALUE_FIELD_NUMBER = 2; + // optional string string_value = 3; + public static final int STRING_VALUE_FIELD_NUMBER = 3; private java.lang.Object stringValue_; /** - * optional string string_value = 2; + * optional string string_value = 3; */ public boolean hasStringValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional string string_value = 2; + * optional string string_value = 3; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -1721,7 +1876,7 @@ public final class BinaryMessages { } } /** - * optional string string_value = 2; + * optional string string_value = 3; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -1737,49 +1892,49 @@ public final class BinaryMessages { } } - // optional double numerical_value = 3; - public static final int NUMERICAL_VALUE_FIELD_NUMBER = 3; - private double numericalValue_; + // optional double numeric_value = 4; + public static final int NUMERIC_VALUE_FIELD_NUMBER = 4; + private double numericValue_; /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - public boolean hasNumericalValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public boolean hasNumericValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - public double getNumericalValue() { - return numericalValue_; + public double getNumericValue() { + return numericValue_; } - // optional bool boolean_value = 4; - public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; + // optional bool boolean_value = 5; + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 5; private boolean booleanValue_; /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ public boolean getBooleanValue() { return booleanValue_; } - // optional string string_event = 5; - public static final int STRING_EVENT_FIELD_NUMBER = 5; + // optional string string_event = 6; + public static final int STRING_EVENT_FIELD_NUMBER = 6; private java.lang.Object stringEvent_; /** - * optional string string_event = 5; + * optional string string_event = 6; */ public boolean hasStringEvent() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional string string_event = 5; + * optional string string_event = 6; */ public java.lang.String getStringEvent() { java.lang.Object ref = stringEvent_; @@ -1796,7 +1951,7 @@ public final class BinaryMessages { } } /** - * optional string string_event = 5; + * optional string string_event = 6; */ public com.google.protobuf.ByteString getStringEventBytes() { @@ -1812,45 +1967,46 @@ public final class BinaryMessages { } } - // optional double numerical_event = 6; - public static final int NUMERICAL_EVENT_FIELD_NUMBER = 6; - private double numericalEvent_; + // optional double numeric_event = 7; + public static final int NUMERIC_EVENT_FIELD_NUMBER = 7; + private double numericEvent_; /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - public boolean hasNumericalEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public boolean hasNumericEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - public double getNumericalEvent() { - return numericalEvent_; + public double getNumericEvent() { + return numericEvent_; } - // optional bool boolean_event = 7; - public static final int BOOLEAN_EVENT_FIELD_NUMBER = 7; + // optional bool boolean_event = 8; + public static final int BOOLEAN_EVENT_FIELD_NUMBER = 8; private boolean booleanEvent_; /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ public boolean getBooleanEvent() { return booleanEvent_; } private void initFields() { + type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; name_ = ""; stringValue_ = ""; - numericalValue_ = 0D; + numericValue_ = 0D; booleanValue_ = false; stringEvent_ = ""; - numericalEvent_ = 0D; + numericEvent_ = 0D; booleanEvent_ = false; } private byte memoizedIsInitialized = -1; @@ -1866,25 +2022,28 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + output.writeEnum(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getStringValueBytes()); + output.writeBytes(2, getNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeDouble(3, numericalValue_); + output.writeBytes(3, getStringValueBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, booleanValue_); + output.writeDouble(4, numericValue_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getStringEventBytes()); + output.writeBool(5, booleanValue_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeDouble(6, numericalEvent_); + output.writeBytes(6, getStringEventBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBool(7, booleanEvent_); + output.writeDouble(7, numericEvent_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBool(8, booleanEvent_); } getUnknownFields().writeTo(output); } @@ -1897,31 +2056,35 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeEnumSize(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getStringValueBytes()); + .computeBytesSize(2, getNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, numericalValue_); + .computeBytesSize(3, getStringValueBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, booleanValue_); + .computeDoubleSize(4, numericValue_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getStringEventBytes()); + .computeBoolSize(5, booleanValue_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(6, numericalEvent_); + .computeBytesSize(6, getStringEventBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, booleanEvent_); + .computeDoubleSize(7, numericEvent_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, booleanEvent_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2039,20 +2202,22 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - name_ = ""; + type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; bitField0_ = (bitField0_ & ~0x00000001); - stringValue_ = ""; + name_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - numericalValue_ = 0D; + stringValue_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - booleanValue_ = false; + numericValue_ = 0D; bitField0_ = (bitField0_ & ~0x00000008); - stringEvent_ = ""; + booleanValue_ = false; bitField0_ = (bitField0_ & ~0x00000010); - numericalEvent_ = 0D; + stringEvent_ = ""; bitField0_ = (bitField0_ & ~0x00000020); - booleanEvent_ = false; + numericEvent_ = 0D; bitField0_ = (bitField0_ & ~0x00000040); + booleanEvent_ = false; + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -2084,30 +2249,34 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.name_ = name_; + result.type_ = type_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.stringValue_ = stringValue_; + result.name_ = name_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.numericalValue_ = numericalValue_; + result.stringValue_ = stringValue_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.booleanValue_ = booleanValue_; + result.numericValue_ = numericValue_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } - result.stringEvent_ = stringEvent_; + result.booleanValue_ = booleanValue_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } - result.numericalEvent_ = numericalEvent_; + result.stringEvent_ = stringEvent_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } + result.numericEvent_ = numericEvent_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } result.booleanEvent_ = booleanEvent_; result.bitField0_ = to_bitField0_; onBuilt(); @@ -2125,29 +2294,32 @@ public final class BinaryMessages { public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) { if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } if (other.hasName()) { - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; name_ = other.name_; onChanged(); } if (other.hasStringValue()) { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; stringValue_ = other.stringValue_; onChanged(); } - if (other.hasNumericalValue()) { - setNumericalValue(other.getNumericalValue()); + if (other.hasNumericValue()) { + setNumericValue(other.getNumericValue()); } if (other.hasBooleanValue()) { setBooleanValue(other.getBooleanValue()); } if (other.hasStringEvent()) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; stringEvent_ = other.stringEvent_; onChanged(); } - if (other.hasNumericalEvent()) { - setNumericalEvent(other.getNumericalEvent()); + if (other.hasNumericEvent()) { + setNumericEvent(other.getNumericEvent()); } if (other.hasBooleanEvent()) { setBooleanEvent(other.getBooleanEvent()); @@ -2179,16 +2351,52 @@ public final class BinaryMessages { } private int bitField0_; - // optional string name = 1; + // optional .openxc.TranslatedMessage.Type type = 1; + private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + /** + * optional .openxc.TranslatedMessage.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.TranslatedMessage.Type type = 1; + */ + public com.openxc.BinaryMessages.TranslatedMessage.Type getType() { + return type_; + } + /** + * optional .openxc.TranslatedMessage.Type type = 1; + */ + public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.TranslatedMessage.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + onChanged(); + return this; + } + + // optional string name = 2; private java.lang.Object name_ = ""; /** - * optional string name = 1; + * optional string name = 2; */ public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string name = 1; + * optional string name = 2; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -2202,7 +2410,7 @@ public final class BinaryMessages { } } /** - * optional string name = 1; + * optional string name = 2; */ public com.google.protobuf.ByteString getNameBytes() { @@ -2218,51 +2426,51 @@ public final class BinaryMessages { } } /** - * optional string name = 1; + * optional string name = 2; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; name_ = value; onChanged(); return this; } /** - * optional string name = 1; + * optional string name = 2; */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * optional string name = 1; + * optional string name = 2; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; name_ = value; onChanged(); return this; } - // optional string string_value = 2; + // optional string string_value = 3; private java.lang.Object stringValue_ = ""; /** - * optional string string_value = 2; + * optional string string_value = 3; */ public boolean hasStringValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional string string_value = 2; + * optional string string_value = 3; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -2276,7 +2484,7 @@ public final class BinaryMessages { } } /** - * optional string string_value = 2; + * optional string string_value = 3; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -2292,117 +2500,117 @@ public final class BinaryMessages { } } /** - * optional string string_value = 2; + * optional string string_value = 3; */ public Builder setStringValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; stringValue_ = value; onChanged(); return this; } /** - * optional string string_value = 2; + * optional string string_value = 3; */ public Builder clearStringValue() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); stringValue_ = getDefaultInstance().getStringValue(); onChanged(); return this; } /** - * optional string string_value = 2; + * optional string string_value = 3; */ public Builder setStringValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; stringValue_ = value; onChanged(); return this; } - // optional double numerical_value = 3; - private double numericalValue_ ; + // optional double numeric_value = 4; + private double numericValue_ ; /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - public boolean hasNumericalValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public boolean hasNumericValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - public double getNumericalValue() { - return numericalValue_; + public double getNumericValue() { + return numericValue_; } /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - public Builder setNumericalValue(double value) { - bitField0_ |= 0x00000004; - numericalValue_ = value; + public Builder setNumericValue(double value) { + bitField0_ |= 0x00000008; + numericValue_ = value; onChanged(); return this; } /** - * optional double numerical_value = 3; + * optional double numeric_value = 4; */ - public Builder clearNumericalValue() { - bitField0_ = (bitField0_ & ~0x00000004); - numericalValue_ = 0D; + public Builder clearNumericValue() { + bitField0_ = (bitField0_ & ~0x00000008); + numericValue_ = 0D; onChanged(); return this; } - // optional bool boolean_value = 4; + // optional bool boolean_value = 5; private boolean booleanValue_ ; /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ public boolean getBooleanValue() { return booleanValue_; } /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ public Builder setBooleanValue(boolean value) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; booleanValue_ = value; onChanged(); return this; } /** - * optional bool boolean_value = 4; + * optional bool boolean_value = 5; */ public Builder clearBooleanValue() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); booleanValue_ = false; onChanged(); return this; } - // optional string string_event = 5; + // optional string string_event = 6; private java.lang.Object stringEvent_ = ""; /** - * optional string string_event = 5; + * optional string string_event = 6; */ public boolean hasStringEvent() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional string string_event = 5; + * optional string string_event = 6; */ public java.lang.String getStringEvent() { java.lang.Object ref = stringEvent_; @@ -2416,7 +2624,7 @@ public final class BinaryMessages { } } /** - * optional string string_event = 5; + * optional string string_event = 6; */ public com.google.protobuf.ByteString getStringEventBytes() { @@ -2432,102 +2640,102 @@ public final class BinaryMessages { } } /** - * optional string string_event = 5; + * optional string string_event = 6; */ public Builder setStringEvent( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; stringEvent_ = value; onChanged(); return this; } /** - * optional string string_event = 5; + * optional string string_event = 6; */ public Builder clearStringEvent() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); stringEvent_ = getDefaultInstance().getStringEvent(); onChanged(); return this; } /** - * optional string string_event = 5; + * optional string string_event = 6; */ public Builder setStringEventBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; stringEvent_ = value; onChanged(); return this; } - // optional double numerical_event = 6; - private double numericalEvent_ ; + // optional double numeric_event = 7; + private double numericEvent_ ; /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - public boolean hasNumericalEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public boolean hasNumericEvent() { + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - public double getNumericalEvent() { - return numericalEvent_; + public double getNumericEvent() { + return numericEvent_; } /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - public Builder setNumericalEvent(double value) { - bitField0_ |= 0x00000020; - numericalEvent_ = value; + public Builder setNumericEvent(double value) { + bitField0_ |= 0x00000040; + numericEvent_ = value; onChanged(); return this; } /** - * optional double numerical_event = 6; + * optional double numeric_event = 7; */ - public Builder clearNumericalEvent() { - bitField0_ = (bitField0_ & ~0x00000020); - numericalEvent_ = 0D; + public Builder clearNumericEvent() { + bitField0_ = (bitField0_ & ~0x00000040); + numericEvent_ = 0D; onChanged(); return this; } - // optional bool boolean_event = 7; + // optional bool boolean_event = 8; private boolean booleanEvent_ ; /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ public boolean getBooleanEvent() { return booleanEvent_; } /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ public Builder setBooleanEvent(boolean value) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; booleanEvent_ = value; onChanged(); return this; } /** - * optional bool boolean_event = 7; + * optional bool boolean_event = 8; */ public Builder clearBooleanEvent() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); booleanEvent_ = false; onChanged(); return this; @@ -2574,12 +2782,16 @@ public final class BinaryMessages { "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" + "xc.TranslatedMessage\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + - "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\255\001\n\021T" + - "ranslatedMessage\022\014\n\004name\030\001 \001(\t\022\024\n\014string" + - "_value\030\002 \001(\t\022\027\n\017numerical_value\030\003 \001(\001\022\025\n" + - "\rboolean_value\030\004 \001(\010\022\024\n\014string_event\030\005 \001", - "(\t\022\027\n\017numerical_event\030\006 \001(\001\022\025\n\rboolean_e" + - "vent\030\007 \001(\010B\034\n\ncom.openxcB\016BinaryMessages" + "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\265\002\n\021T" + + "ranslatedMessage\022,\n\004type\030\001 \001(\0162\036.openxc." + + "TranslatedMessage.Type\022\014\n\004name\030\002 \001(\t\022\024\n\014" + + "string_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_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\013EVENT" + + "ED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxc" + + "B\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -2603,7 +2815,7 @@ public final class BinaryMessages { internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, - new java.lang.String[] { "Name", "StringValue", "NumericalValue", "BooleanValue", "StringEvent", "NumericalEvent", "BooleanEvent", }); + new java.lang.String[] { "Type", "Name", "StringValue", "NumericValue", "BooleanValue", "StringEvent", "NumericEvent", "BooleanEvent", }); return null; } }; diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 5b311a2e..9ec8f26b 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\"\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\"\xad\x01\n\x11TranslatedMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x17\n\x0fnumerical_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\x12\x14\n\x0cstring_event\x18\x05 \x01(\t\x12\x17\n\x0fnumerical_event\x18\x06 \x01(\x01\x12\x15\n\rboolean_event\x18\x07 \x01(\x08\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\"\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') @@ -38,6 +38,43 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( serialized_end=213, ) +_TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( + name='Type', + full_name='openxc.TranslatedMessage.Type', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='STRING', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NUM', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BOOL', index=2, number=3, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EVENTED_STRING', index=3, number=4, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EVENTED_NUM', index=4, number=5, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EVENTED_BOOL', index=5, number=6, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=494, + serialized_end=586, +) + _VEHICLEMESSAGE = _descriptor.Descriptor( name='VehicleMessage', @@ -132,50 +169,57 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedMessage.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + name='type', full_name='openxc.TranslatedMessage.type', 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, options=None), _descriptor.FieldDescriptor( - name='string_value', full_name='openxc.TranslatedMessage.string_value', index=1, + name='name', full_name='openxc.TranslatedMessage.name', index=1, number=2, 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, options=None), _descriptor.FieldDescriptor( - name='numerical_value', full_name='openxc.TranslatedMessage.numerical_value', index=2, - number=3, type=1, cpp_type=5, label=1, + name='string_value', full_name='openxc.TranslatedMessage.string_value', index=2, + number=3, 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, + options=None), + _descriptor.FieldDescriptor( + name='numeric_value', full_name='openxc.TranslatedMessage.numeric_value', index=3, + number=4, 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='boolean_value', full_name='openxc.TranslatedMessage.boolean_value', index=3, - number=4, type=8, cpp_type=7, label=1, + name='boolean_value', full_name='openxc.TranslatedMessage.boolean_value', index=4, + number=5, 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='string_event', full_name='openxc.TranslatedMessage.string_event', index=4, - number=5, type=9, cpp_type=9, label=1, + name='string_event', full_name='openxc.TranslatedMessage.string_event', index=5, + number=6, 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, options=None), _descriptor.FieldDescriptor( - name='numerical_event', full_name='openxc.TranslatedMessage.numerical_event', index=5, - number=6, type=1, cpp_type=5, label=1, + name='numeric_event', full_name='openxc.TranslatedMessage.numeric_event', 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='boolean_event', full_name='openxc.TranslatedMessage.boolean_event', index=6, - number=7, type=8, cpp_type=7, label=1, + name='boolean_event', full_name='openxc.TranslatedMessage.boolean_event', index=7, + number=8, 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, @@ -185,18 +229,21 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( ], nested_types=[], enum_types=[ + _TRANSLATEDMESSAGE_TYPE, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=277, - serialized_end=450, + serialized_end=586, ) _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_TYPE.containing_type = _VEHICLEMESSAGE; +_TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE +_TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE diff --git a/openxc.proto b/openxc.proto index 9f9046eb..6b79c36f 100644 --- a/openxc.proto +++ b/openxc.proto @@ -7,7 +7,6 @@ message VehicleMessage { enum Type { RAW = 1; TRANSLATED = 2; } optional Type type = 1; - optional RawMessage raw_message = 2; optional TranslatedMessage translated_message = 3; } @@ -19,15 +18,19 @@ message RawMessage { } message TranslatedMessage { - optional string name = 1; + enum Type { STRING = 1; NUM = 2; BOOL = 3; + EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} + + optional Type type = 1; + optional string name = 2; - optional string string_value = 2; - optional double numerical_value = 3; - optional bool boolean_value = 4; + optional string string_value = 3; + optional double numeric_value = 4; + optional bool boolean_value = 5; - optional string string_event = 5; - optional double numerical_event = 6; - optional bool boolean_event = 7; + optional string string_event = 6; + optional double numeric_event = 7; + optional bool boolean_event = 8; } // TODO we should also consider having an enum type, having each specific -- cgit 1.2.3-korg From 554f476ed5341773b87553b5b2668fdfd427b7a4 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 7 Jan 2014 15:01:34 -0500 Subject: Draft an idea of what the diagnostic request/response format will be. --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/README.md b/README.md index a56971ea..ba164192 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,81 @@ is sent as a JSON object, separated by newlines. The format of each object is: a hexidecimal number in a string. Many JSON parser cannot handle 64-bit integers, which is why we are not using a numerical data type. +## Diagnostic Messages + +### Requests + + {"bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "payload": "0x1234", + "frequency": 0} + +**bus** - the numerical identifier of the CAN bus where this request should be + sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). + +**id** - the CAN arbitration ID for the request. + +**mode** - the OBD-II mode of the request - 0x1 through 0xf (0x1 through 0xa + are the standardized modes). + +**pid** - (optional) the PID for the request, if applicable. + +**payload** - (optional) up to 7 bytes of data for the request's payload + represented as a hexidecimal number in a string. Many JSON parser cannot + handle 64-bit integers, which is why we are not using a numerical data type. + +**frequency** - (optional, defaults to 0) The frequency in Hz to send this + request. To send a single request, set this to 0 or leave it out. + +TODO it'd be nice to have the OBD-II PIDs built in, with the proper conversion +functions - that may need a different output format + +If you're just requesting a PID, you can use a simplified format for the +request: + + {"bus": 1, "id": 1234, "mode": 1, "pid": 5} + +### Responses + + {"bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "success": true, + "negative_response_code": 17, + "payload": "0x1234"} + +**bus** - the numerical identifier of the CAN bus where this response was + received. + +**id** - the CAN arbitration ID for this response. + +**mode** - the OBD-II mode of the original diagnostic request. + +**pid** - (optional) the PID for the request, if applicable. + +**success** - true if the response received was a positive response. If this + field is false, the remote node returned an error and the + `negative_response_code` field should be populated. + +**negative_response_code** - (optional) If requsted node returned an error, + `success` will be `false` and this field will contain the negative response + code (NRC). + +**payload** - (optional) up to 7 bytes of data returned in the response, + represented as a hexidecimal number in a string. Many JSON parser cannot + handle 64-bit integers, which is why we are not using a numerical data type. + +The response to a simple PID requset would look like this: + + {"bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} + +TODO again, it'd be nice to have the OBD-II PIDs built in, with the proper +conversion functions so the response here included the actual transformed value +of the pid and a human readable name + ## Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, -- cgit 1.2.3-korg From 6345fed4216116eb47bd4eda52a4256e71aa7669 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 17 Jan 2014 14:02:38 -0500 Subject: Update nanopb to 0.2.5 and fix max string length options. --- Makefile | 3 ++- gen/cpp/openxc.pb.c | 30 +++++++++++++++--------------- gen/cpp/openxc.pb.h | 6 +++--- libs/nanopb | 2 +- openxc.options | 5 +++-- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 4b1b6875..7b968e63 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ nanopb: proto - python libs/nanopb/generator/nanopb_generator.py -s max_size:100 -f openxc.options gen/cpp/openxc.pb + make -C libs/nanopb/generator/proto + python libs/nanopb/generator/nanopb_generator.py gen/cpp/openxc.pb -f openxc.options proto: openxc.proto @mkdir -p gen/java diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 1625254e..8451121a 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,33 +1,33 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.4-dev at Thu Oct 24 10:06:38 2013. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 14:02:23 2014. */ #include "openxc.pb.h" const pb_field_t openxc_VehicleMessage_fields[4] = { - 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( 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_LAST_FIELD }; const pb_field_t openxc_RawMessage_fields[4] = { - PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), - PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), + PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), + PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; const pb_field_t openxc_TranslatedMessage_fields[9] = { - PB_FIELD2( 1, ENUM , OPTIONAL, STATIC, FIRST, openxc_TranslatedMessage, type, type, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, name, type, 0), - PB_FIELD2( 3, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_value, name, 0), - PB_FIELD2( 4, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numeric_value, string_value, 0), - PB_FIELD2( 5, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_value, numeric_value, 0), - PB_FIELD2( 6, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), - PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numeric_event, string_event, 0), - PB_FIELD2( 8, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_event, numeric_event, 0), + PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_TranslatedMessage, type, type, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, name, type, 0), + PB_FIELD2( 3, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, string_value, name, 0), + PB_FIELD2( 4, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, numeric_value, string_value, 0), + PB_FIELD2( 5, BOOL , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, boolean_value, numeric_value, 0), + PB_FIELD2( 6, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), + PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, numeric_event, string_event, 0), + PB_FIELD2( 8, BOOL , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, boolean_event, numeric_event, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 81a0779d..bc845159 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.4-dev at Thu Oct 24 10:06:38 2013. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 14:02:23 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -86,8 +86,8 @@ extern const pb_field_t openxc_RawMessage_fields[4]; extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 368 -#define openxc_RawMessage_size 23 +#define openxc_VehicleMessage_size 373 +#define openxc_RawMessage_size 28 #define openxc_TranslatedMessage_size 334 #ifdef __cplusplus diff --git a/libs/nanopb b/libs/nanopb index 388d4de8..906c8283 160000 --- a/libs/nanopb +++ b/libs/nanopb @@ -1 +1 @@ -Subproject commit 388d4de833cf4e2127b2ab0489cb6b14ecc0cbb5 +Subproject commit 906c8283b5995eb7b27f4958a6a6502ae0deea07 diff --git a/openxc.options b/openxc.options index 1863c0d3..40ebed90 100644 --- a/openxc.options +++ b/openxc.options @@ -1,2 +1,3 @@ -# TODO this isn't working yet, so I'm defining it for everything in the Makefile -openxc_TranslatedMessage.name max_size:100 +openxc.TranslatedMessage.name max_size:100 +openxc.TranslatedMessage.string_value max_size:100 +openxc.TranslatedMessage.string_event max_size:100 -- cgit 1.2.3-korg From 40127285861b290ad596bf713cf6d21e7f2072c1 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 17 Jan 2014 14:12:42 -0500 Subject: Add a protobuf type for diagnostic message responses. --- gen/cpp/openxc.pb | 13 +- gen/cpp/openxc.pb.c | 17 +- gen/cpp/openxc.pb.h | 28 +- gen/java/com/openxc/BinaryMessages.java | 919 +++++++++++++++++++++++++++++++- gen/python/openxc_pb2.py | 87 ++- openxc.proto | 10 + 6 files changed, 1052 insertions(+), 22 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 88cf91aa..2267f21c 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -è +ü openxc.protoopenxc"¼ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -14,7 +14,16 @@ RawMessage bus ( message_id (  -data ("µ +data ("‘ +DiagnosticMessage +bus ( + +message_id (  +mode (  +pid (  +success ( +negative_response_code (  +payload ("µ TranslatedMessage, type (2.openxc.TranslatedMessage.Type name (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 8451121a..da616556 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 Fri Jan 17 14:02:23 2014. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 14:12:22 2014. */ #include "openxc.pb.h" @@ -19,6 +19,17 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; +const pb_field_t openxc_DiagnosticMessage_fields[8] = { + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticMessage, bus, bus, 0), + PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, message_id, bus, 0), + PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, mode, message_id, 0), + 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_LAST_FIELD +}; + const pb_field_t openxc_TranslatedMessage_fields[9] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_TranslatedMessage, type, type, 0), PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, name, type, 0), @@ -34,11 +45,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), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_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 bc845159..e4619ce1 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 Fri Jan 17 14:02:23 2014. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 14:12:22 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -25,6 +25,23 @@ typedef enum _openxc_TranslatedMessage_Type { } openxc_TranslatedMessage_Type; /* Struct definitions */ +typedef struct _openxc_DiagnosticMessage { + bool has_bus; + int32_t bus; + bool has_message_id; + uint32_t message_id; + bool has_mode; + uint32_t mode; + bool has_pid; + uint32_t pid; + bool has_success; + bool success; + bool has_negative_response_code; + uint32_t negative_response_code; + bool has_payload; + uint64_t payload; +} openxc_DiagnosticMessage; + typedef struct _openxc_RawMessage { bool has_bus; int32_t bus; @@ -65,6 +82,13 @@ typedef struct _openxc_VehicleMessage { /* Default values for struct fields */ /* Field tags (for use in manual encoding/decoding) */ +#define openxc_DiagnosticMessage_bus_tag 1 +#define openxc_DiagnosticMessage_message_id_tag 2 +#define openxc_DiagnosticMessage_mode_tag 3 +#define openxc_DiagnosticMessage_pid_tag 4 +#define openxc_DiagnosticMessage_success_tag 5 +#define openxc_DiagnosticMessage_negative_response_code_tag 6 +#define openxc_DiagnosticMessage_payload_tag 7 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -83,11 +107,13 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[4]; extern const pb_field_t openxc_RawMessage_fields[4]; +extern const pb_field_t openxc_DiagnosticMessage_fields[8]; extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ #define openxc_VehicleMessage_size 373 #define openxc_RawMessage_size 28 +#define openxc_DiagnosticMessage_size 48 #define openxc_TranslatedMessage_size 334 #ifdef __cplusplus diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 02f2579f..a22dfe1f 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1437,6 +1437,888 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.RawMessage) } + public interface DiagnosticMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional uint32 message_id = 2; + /** + * optional uint32 message_id = 2; + */ + boolean hasMessageId(); + /** + * optional uint32 message_id = 2; + */ + int getMessageId(); + + // optional uint32 mode = 3; + /** + * optional uint32 mode = 3; + */ + boolean hasMode(); + /** + * optional uint32 mode = 3; + */ + int getMode(); + + // optional uint32 pid = 4; + /** + * optional uint32 pid = 4; + */ + boolean hasPid(); + /** + * optional uint32 pid = 4; + */ + int getPid(); + + // optional bool success = 5; + /** + * optional bool success = 5; + */ + boolean hasSuccess(); + /** + * optional bool success = 5; + */ + boolean getSuccess(); + + // optional uint32 negative_response_code = 6; + /** + * optional uint32 negative_response_code = 6; + */ + boolean hasNegativeResponseCode(); + /** + * optional uint32 negative_response_code = 6; + */ + int getNegativeResponseCode(); + + // optional uint64 payload = 7; + /** + * optional uint64 payload = 7; + */ + boolean hasPayload(); + /** + * optional uint64 payload = 7; + */ + long getPayload(); + } + /** + * Protobuf type {@code openxc.DiagnosticMessage} + */ + public static final class DiagnosticMessage extends + com.google.protobuf.GeneratedMessage + implements DiagnosticMessageOrBuilder { + // Use DiagnosticMessage.newBuilder() to construct. + private DiagnosticMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private DiagnosticMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final DiagnosticMessage defaultInstance; + public static DiagnosticMessage getDefaultInstance() { + return defaultInstance; + } + + public DiagnosticMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DiagnosticMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + success_ = input.readBool(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + negativeResponseCode_ = input.readUInt32(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + payload_ = input.readUInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiagnosticMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional uint32 message_id = 2; + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + private int messageId_; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + + // optional uint32 mode = 3; + public static final int MODE_FIELD_NUMBER = 3; + private int mode_; + /** + * optional uint32 mode = 3; + */ + public boolean hasMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 mode = 3; + */ + public int getMode() { + return mode_; + } + + // optional uint32 pid = 4; + public static final int PID_FIELD_NUMBER = 4; + private int pid_; + /** + * optional uint32 pid = 4; + */ + public boolean hasPid() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 pid = 4; + */ + public int getPid() { + return pid_; + } + + // optional bool success = 5; + public static final int SUCCESS_FIELD_NUMBER = 5; + private boolean success_; + /** + * optional bool success = 5; + */ + public boolean hasSuccess() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bool success = 5; + */ + public boolean getSuccess() { + return success_; + } + + // optional uint32 negative_response_code = 6; + public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6; + private int negativeResponseCode_; + /** + * optional uint32 negative_response_code = 6; + */ + public boolean hasNegativeResponseCode() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional uint32 negative_response_code = 6; + */ + public int getNegativeResponseCode() { + return negativeResponseCode_; + } + + // optional uint64 payload = 7; + public static final int PAYLOAD_FIELD_NUMBER = 7; + private long payload_; + /** + * optional uint64 payload = 7; + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint64 payload = 7; + */ + public long getPayload() { + return payload_; + } + + private void initFields() { + bus_ = 0; + messageId_ = 0; + mode_ = 0; + pid_ = 0; + success_ = false; + negativeResponseCode_ = 0; + payload_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(3, mode_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt32(4, pid_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBool(5, success_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeUInt32(6, negativeResponseCode_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeUInt64(7, payload_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, mode_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, pid_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, success_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, negativeResponseCode_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(7, payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.DiagnosticMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DiagnosticMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.DiagnosticMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + messageId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + mode_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + pid_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + success_ = false; + bitField0_ = (bitField0_ & ~0x00000010); + negativeResponseCode_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + payload_ = 0L; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor; + } + + public com.openxc.BinaryMessages.DiagnosticMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.DiagnosticMessage build() { + com.openxc.BinaryMessages.DiagnosticMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.DiagnosticMessage buildPartial() { + com.openxc.BinaryMessages.DiagnosticMessage result = new com.openxc.BinaryMessages.DiagnosticMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.messageId_ = messageId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.mode_ = mode_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.pid_ = pid_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.success_ = success_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.negativeResponseCode_ = negativeResponseCode_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.payload_ = payload_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.DiagnosticMessage) { + return mergeFrom((com.openxc.BinaryMessages.DiagnosticMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticMessage other) { + if (other == com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasMessageId()) { + setMessageId(other.getMessageId()); + } + if (other.hasMode()) { + setMode(other.getMode()); + } + if (other.hasPid()) { + setPid(other.getPid()); + } + if (other.hasSuccess()) { + setSuccess(other.getSuccess()); + } + if (other.hasNegativeResponseCode()) { + setNegativeResponseCode(other.getNegativeResponseCode()); + } + if (other.hasPayload()) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.DiagnosticMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 bus = 1; + private int bus_ ; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + /** + * optional int32 bus = 1; + */ + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); + return this; + } + /** + * optional int32 bus = 1; + */ + public Builder clearBus() { + bitField0_ = (bitField0_ & ~0x00000001); + bus_ = 0; + onChanged(); + return this; + } + + // optional uint32 message_id = 2; + private int messageId_ ; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + /** + * optional uint32 message_id = 2; + */ + public Builder setMessageId(int value) { + bitField0_ |= 0x00000002; + messageId_ = value; + onChanged(); + return this; + } + /** + * optional uint32 message_id = 2; + */ + public Builder clearMessageId() { + bitField0_ = (bitField0_ & ~0x00000002); + messageId_ = 0; + onChanged(); + return this; + } + + // optional uint32 mode = 3; + private int mode_ ; + /** + * optional uint32 mode = 3; + */ + public boolean hasMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 mode = 3; + */ + public int getMode() { + return mode_; + } + /** + * optional uint32 mode = 3; + */ + public Builder setMode(int value) { + bitField0_ |= 0x00000004; + mode_ = value; + onChanged(); + return this; + } + /** + * optional uint32 mode = 3; + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000004); + mode_ = 0; + onChanged(); + return this; + } + + // optional uint32 pid = 4; + private int pid_ ; + /** + * optional uint32 pid = 4; + */ + public boolean hasPid() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 pid = 4; + */ + public int getPid() { + return pid_; + } + /** + * optional uint32 pid = 4; + */ + public Builder setPid(int value) { + bitField0_ |= 0x00000008; + pid_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pid = 4; + */ + public Builder clearPid() { + bitField0_ = (bitField0_ & ~0x00000008); + pid_ = 0; + onChanged(); + return this; + } + + // optional bool success = 5; + private boolean success_ ; + /** + * optional bool success = 5; + */ + public boolean hasSuccess() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bool success = 5; + */ + public boolean getSuccess() { + return success_; + } + /** + * optional bool success = 5; + */ + public Builder setSuccess(boolean value) { + bitField0_ |= 0x00000010; + success_ = value; + onChanged(); + return this; + } + /** + * optional bool success = 5; + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000010); + success_ = false; + onChanged(); + return this; + } + + // optional uint32 negative_response_code = 6; + private int negativeResponseCode_ ; + /** + * optional uint32 negative_response_code = 6; + */ + public boolean hasNegativeResponseCode() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional uint32 negative_response_code = 6; + */ + public int getNegativeResponseCode() { + return negativeResponseCode_; + } + /** + * optional uint32 negative_response_code = 6; + */ + public Builder setNegativeResponseCode(int value) { + bitField0_ |= 0x00000020; + negativeResponseCode_ = value; + onChanged(); + return this; + } + /** + * optional uint32 negative_response_code = 6; + */ + public Builder clearNegativeResponseCode() { + bitField0_ = (bitField0_ & ~0x00000020); + negativeResponseCode_ = 0; + onChanged(); + return this; + } + + // optional uint64 payload = 7; + private long payload_ ; + /** + * optional uint64 payload = 7; + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional uint64 payload = 7; + */ + public long getPayload() { + return payload_; + } + /** + * optional uint64 payload = 7; + */ + public Builder setPayload(long value) { + bitField0_ |= 0x00000040; + payload_ = value; + onChanged(); + return this; + } + /** + * optional uint64 payload = 7; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000040); + payload_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticMessage) + } + + static { + defaultInstance = new DiagnosticMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.DiagnosticMessage) + } + public interface TranslatedMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -2762,6 +3644,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_RawMessage_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_DiagnosticMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_DiagnosticMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_TranslatedMessage_descriptor; private static @@ -2782,16 +3669,20 @@ public final class BinaryMessages { "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" + "xc.TranslatedMessage\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + - "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\265\002\n\021T" + - "ranslatedMessage\022,\n\004type\030\001 \001(\0162\036.openxc." + - "TranslatedMessage.Type\022\014\n\004name\030\002 \001(\t\022\024\n\014" + - "string_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_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\013EVENT" + - "ED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxc" + - "B\016BinaryMessages" + "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\221\001\n\021D" + + "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" + + "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" + + "_value\030\005 \001(\010\022\024\n\014string_event\030\006 \001(\t\022\025\n\rnu" + + "meric_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\014" + + "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" + + "ages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -2810,8 +3701,14 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, new java.lang.String[] { "Bus", "MessageId", "Data", }); - internal_static_openxc_TranslatedMessage_descriptor = + internal_static_openxc_DiagnosticMessage_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_openxc_DiagnosticMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticMessage_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", }); + internal_static_openxc_TranslatedMessage_descriptor = + getDescriptor().getMessageTypes().get(3); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 9ec8f26b..59791cf2 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\"\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\"\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(\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') @@ -71,8 +71,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=494, - serialized_end=586, + serialized_start=642, + serialized_end=734, ) @@ -161,6 +161,76 @@ _RAWMESSAGE = _descriptor.Descriptor( ) +_DIAGNOSTICMESSAGE = _descriptor.Descriptor( + name='DiagnosticMessage', + full_name='openxc.DiagnosticMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.DiagnosticMessage.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='message_id', full_name='openxc.DiagnosticMessage.message_id', index=1, + number=2, type=13, cpp_type=3, 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='mode', full_name='openxc.DiagnosticMessage.mode', index=2, + number=3, type=13, cpp_type=3, 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='pid', full_name='openxc.DiagnosticMessage.pid', index=3, + number=4, type=13, cpp_type=3, 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='success', full_name='openxc.DiagnosticMessage.success', index=4, + number=5, 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='negative_response_code', full_name='openxc.DiagnosticMessage.negative_response_code', index=5, + number=6, type=13, cpp_type=3, 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='payload', full_name='openxc.DiagnosticMessage.payload', index=6, + number=7, type=4, cpp_type=4, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=277, + serialized_end=422, +) + + _TRANSLATEDMESSAGE = _descriptor.Descriptor( name='TranslatedMessage', full_name='openxc.TranslatedMessage', @@ -234,8 +304,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=277, - serialized_end=586, + serialized_start=425, + serialized_end=734, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -246,6 +316,7 @@ _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE _TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE +DESCRIPTOR.message_types_by_name['DiagnosticMessage'] = _DIAGNOSTICMESSAGE DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE class VehicleMessage(_message.Message): @@ -260,6 +331,12 @@ class RawMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.RawMessage) +class DiagnosticMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DIAGNOSTICMESSAGE + + # @@protoc_insertion_point(class_scope:openxc.DiagnosticMessage) + class TranslatedMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _TRANSLATEDMESSAGE diff --git a/openxc.proto b/openxc.proto index 6b79c36f..72cd33f6 100644 --- a/openxc.proto +++ b/openxc.proto @@ -17,6 +17,16 @@ message RawMessage { optional uint64 data = 3; } +message DiagnosticMessage { + optional int32 bus = 1; + optional uint32 message_id = 2; + optional uint32 mode = 3; + optional uint32 pid = 4; + optional bool success = 5; + optional uint32 negative_response_code = 6; + optional uint64 payload = 7; +} + message TranslatedMessage { enum Type { STRING = 1; NUM = 2; BOOL = 3; EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} -- cgit 1.2.3-korg From 59f06d99530676c638495d9cde0748f7653e33e5 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 17 Jan 2014 14:31:39 -0500 Subject: Store diagnostic response payload as a byte array in protobuf. --- gen/cpp/openxc.pb | 2 +- gen/cpp/openxc.pb.c | 4 +- gen/cpp/openxc.pb.h | 11 ++-- gen/java/com/openxc/BinaryMessages.java | 95 ++++++++++++++++++++++++--------- gen/python/openxc_pb2.py | 6 +-- openxc.options | 1 + openxc.proto | 4 +- 7 files changed, 87 insertions(+), 36 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 2267f21c..82bfdd4f 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -23,7 +23,7 @@ message_id (  pid (  success ( negative_response_code (  -payload ("µ +payload ( "µ TranslatedMessage, type (2.openxc.TranslatedMessage.Type name (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index da616556..7e2d390d 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 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" @@ -26,7 +26,7 @@ const pb_field_t openxc_DiagnosticMessage_fields[8] = { 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 }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index e4619ce1..f5f117e4 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 Fri Jan 17 14:12:22 2014. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 14:31:26 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -25,6 +25,11 @@ typedef enum _openxc_TranslatedMessage_Type { } openxc_TranslatedMessage_Type; /* Struct definitions */ +typedef struct { + size_t size; + uint8_t bytes[8]; +} openxc_DiagnosticMessage_payload_t; + typedef struct _openxc_DiagnosticMessage { bool has_bus; int32_t bus; @@ -39,7 +44,7 @@ typedef struct _openxc_DiagnosticMessage { bool has_negative_response_code; uint32_t negative_response_code; bool has_payload; - uint64_t payload; + openxc_DiagnosticMessage_payload_t payload; } openxc_DiagnosticMessage; typedef struct _openxc_RawMessage { @@ -113,7 +118,7 @@ extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ #define openxc_VehicleMessage_size 373 #define openxc_RawMessage_size 28 -#define openxc_DiagnosticMessage_size 48 +#define openxc_DiagnosticMessage_size 47 #define openxc_TranslatedMessage_size 334 #ifdef __cplusplus diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index a22dfe1f..749ed5a8 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1500,15 +1500,25 @@ public final class BinaryMessages { */ int getNegativeResponseCode(); - // optional uint64 payload = 7; + // optional bytes payload = 7; /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
*/ boolean hasPayload(); /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
*/ - long getPayload(); + com.google.protobuf.ByteString getPayload(); } /** * Protobuf type {@code openxc.DiagnosticMessage} @@ -1591,9 +1601,9 @@ public final class BinaryMessages { negativeResponseCode_ = input.readUInt32(); break; } - case 56: { + case 58: { bitField0_ |= 0x00000040; - payload_ = input.readUInt64(); + payload_ = input.readBytes(); break; } } @@ -1732,19 +1742,29 @@ public final class BinaryMessages { 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_; /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
*/ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
*/ - public long getPayload() { + public com.google.protobuf.ByteString getPayload() { return payload_; } @@ -1755,7 +1775,7 @@ public final class BinaryMessages { pid_ = 0; success_ = false; negativeResponseCode_ = 0; - payload_ = 0L; + payload_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1788,7 +1808,7 @@ public final class BinaryMessages { output.writeUInt32(6, negativeResponseCode_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt64(7, payload_); + output.writeBytes(7, payload_); } getUnknownFields().writeTo(output); } @@ -1825,7 +1845,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(7, payload_); + .computeBytesSize(7, payload_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1955,7 +1975,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); negativeResponseCode_ = 0; bitField0_ = (bitField0_ & ~0x00000020); - payload_ = 0L; + payload_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -2275,35 +2295,58 @@ public final class BinaryMessages { return this; } - // optional uint64 payload = 7; - private long payload_ ; + // optional bytes payload = 7; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
*/ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
*/ - public long getPayload() { + public com.google.protobuf.ByteString getPayload() { return payload_; } /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
*/ - 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; } /** - * optional uint64 payload = 7; + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
*/ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000040); - payload_ = 0L; + payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } @@ -3673,7 +3716,7 @@ public final class BinaryMessages { "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" + diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 59791cf2..62918919 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\"\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') @@ -212,8 +212,8 @@ _DIAGNOSTICMESSAGE = _descriptor.Descriptor( 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), diff --git a/openxc.options b/openxc.options index 40ebed90..75caabab 100644 --- a/openxc.options +++ b/openxc.options @@ -1,3 +1,4 @@ openxc.TranslatedMessage.name max_size:100 openxc.TranslatedMessage.string_value max_size:100 openxc.TranslatedMessage.string_event max_size:100 +openxc.DiagnosticMessage.payload max_size:8 diff --git a/openxc.proto b/openxc.proto index 72cd33f6..1b438539 100644 --- a/openxc.proto +++ b/openxc.proto @@ -24,7 +24,9 @@ message DiagnosticMessage { optional uint32 pid = 4; optional bool success = 5; optional uint32 negative_response_code = 6; - optional uint64 payload = 7; + // TODO we are capping this at 8 bytes for now - need to change when we + // support multi-frame responses + optional bytes payload = 7; } message TranslatedMessage { -- cgit 1.2.3-korg From ad6058e1fcaa780fe2f6537412fd6663df9f5cc6 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 17 Jan 2014 14:43:05 -0500 Subject: Add Diagnostic type within VehicleMessage supertype. --- gen/cpp/openxc.pb | 11 +- gen/cpp/openxc.pb.c | 9 +- gen/cpp/openxc.pb.h | 12 +- gen/java/com/openxc/BinaryMessages.java | 238 +++++++++++++++++++++++++++++--- gen/python/openxc_pb2.py | 36 +++-- openxc.proto | 3 +- 6 files changed, 266 insertions(+), 43 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 82bfdd4f..9d6271d1 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,14 +1,17 @@ -ü - openxc.protoopenxc"¼ +Ã + openxc.protoopenxc"ƒ VehicleMessage) type (2.openxc.VehicleMessage.Type' raw_message ( 2.openxc.RawMessage5 -translated_message ( 2.openxc.TranslatedMessage" +translated_message ( 2.openxc.TranslatedMessage5 +diagnostic_message ( 2.openxc.DiagnosticMessage"/ Type RAW -TRANSLATED"; +TRANSLATED + +DIAGNOSTIC"; RawMessage bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 7e2d390d..3c3958f1 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,14 +1,15 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.5 at Fri Jan 17 14:31:26 2014. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 14:40:08 2014. */ #include "openxc.pb.h" -const pb_field_t openxc_VehicleMessage_fields[4] = { +const pb_field_t openxc_VehicleMessage_fields[5] = { 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_message, translated_message, &openxc_DiagnosticMessage_fields), PB_LAST_FIELD }; @@ -45,11 +46,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), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, translated_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_openxc_TranslatedMessage) +STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, translated_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_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 f5f117e4..95276b45 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 Fri Jan 17 14:31:26 2014. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 14:40:08 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -12,7 +12,8 @@ extern "C" { /* Enum definitions */ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_RAW = 1, - openxc_VehicleMessage_Type_TRANSLATED = 2 + openxc_VehicleMessage_Type_TRANSLATED = 2, + openxc_VehicleMessage_Type_DIAGNOSTIC = 3 } openxc_VehicleMessage_Type; typedef enum _openxc_TranslatedMessage_Type { @@ -82,6 +83,8 @@ typedef struct _openxc_VehicleMessage { openxc_RawMessage raw_message; bool has_translated_message; openxc_TranslatedMessage translated_message; + bool has_diagnostic_message; + openxc_DiagnosticMessage diagnostic_message; } openxc_VehicleMessage; /* Default values for struct fields */ @@ -108,15 +111,16 @@ typedef struct _openxc_VehicleMessage { #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 +#define openxc_VehicleMessage_diagnostic_message_tag 4 /* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[4]; +extern const pb_field_t openxc_VehicleMessage_fields[5]; extern const pb_field_t openxc_RawMessage_fields[4]; extern const pb_field_t openxc_DiagnosticMessage_fields[8]; extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 373 +#define openxc_VehicleMessage_size 422 #define openxc_RawMessage_size 28 #define openxc_DiagnosticMessage_size 47 #define openxc_TranslatedMessage_size 334 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 749ed5a8..495925b1 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -48,6 +48,20 @@ public final class BinaryMessages { * optional .openxc.TranslatedMessage translated_message = 3; */ com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); + + // optional .openxc.DiagnosticMessage diagnostic_message = 4; + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + boolean hasDiagnosticMessage(); + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + com.openxc.BinaryMessages.DiagnosticMessage getDiagnosticMessage(); + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + com.openxc.BinaryMessages.DiagnosticMessageOrBuilder getDiagnosticMessageOrBuilder(); } /** * Protobuf type {@code openxc.VehicleMessage} @@ -137,6 +151,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; break; } + case 34: { + com.openxc.BinaryMessages.DiagnosticMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = diagnosticMessage_.toBuilder(); + } + diagnosticMessage_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diagnosticMessage_); + diagnosticMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -189,6 +216,10 @@ public final class BinaryMessages { * TRANSLATED = 2; */ TRANSLATED(1, 2), + /** + * DIAGNOSTIC = 3; + */ + DIAGNOSTIC(2, 3), ; /** @@ -199,6 +230,10 @@ public final class BinaryMessages { * TRANSLATED = 2; */ public static final int TRANSLATED_VALUE = 2; + /** + * DIAGNOSTIC = 3; + */ + public static final int DIAGNOSTIC_VALUE = 3; public final int getNumber() { return value; } @@ -207,6 +242,7 @@ public final class BinaryMessages { switch (value) { case 1: return RAW; case 2: return TRANSLATED; + case 3: return DIAGNOSTIC; default: return null; } } @@ -319,10 +355,33 @@ public final class BinaryMessages { return translatedMessage_; } + // optional .openxc.DiagnosticMessage diagnostic_message = 4; + public static final int DIAGNOSTIC_MESSAGE_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.DiagnosticMessage diagnosticMessage_; + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public boolean hasDiagnosticMessage() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public com.openxc.BinaryMessages.DiagnosticMessage getDiagnosticMessage() { + return diagnosticMessage_; + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public com.openxc.BinaryMessages.DiagnosticMessageOrBuilder getDiagnosticMessageOrBuilder() { + return diagnosticMessage_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -345,6 +404,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, translatedMessage_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, diagnosticMessage_); + } getUnknownFields().writeTo(output); } @@ -366,6 +428,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, translatedMessage_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, diagnosticMessage_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -476,6 +542,7 @@ public final class BinaryMessages { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRawMessageFieldBuilder(); getTranslatedMessageFieldBuilder(); + getDiagnosticMessageFieldBuilder(); } } private static Builder create() { @@ -498,6 +565,12 @@ public final class BinaryMessages { translatedMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + if (diagnosticMessageBuilder_ == null) { + diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + } else { + diagnosticMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -546,6 +619,14 @@ public final class BinaryMessages { } else { result.translatedMessage_ = translatedMessageBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (diagnosticMessageBuilder_ == null) { + result.diagnosticMessage_ = diagnosticMessage_; + } else { + result.diagnosticMessage_ = diagnosticMessageBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -571,6 +652,9 @@ public final class BinaryMessages { if (other.hasTranslatedMessage()) { mergeTranslatedMessage(other.getTranslatedMessage()); } + if (other.hasDiagnosticMessage()) { + mergeDiagnosticMessage(other.getDiagnosticMessage()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -868,6 +952,123 @@ public final class BinaryMessages { return translatedMessageBuilder_; } + // optional .openxc.DiagnosticMessage diagnostic_message = 4; + private com.openxc.BinaryMessages.DiagnosticMessage diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticMessage, com.openxc.BinaryMessages.DiagnosticMessage.Builder, com.openxc.BinaryMessages.DiagnosticMessageOrBuilder> diagnosticMessageBuilder_; + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public boolean hasDiagnosticMessage() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public com.openxc.BinaryMessages.DiagnosticMessage getDiagnosticMessage() { + if (diagnosticMessageBuilder_ == null) { + return diagnosticMessage_; + } else { + return diagnosticMessageBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public Builder setDiagnosticMessage(com.openxc.BinaryMessages.DiagnosticMessage value) { + if (diagnosticMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diagnosticMessage_ = value; + onChanged(); + } else { + diagnosticMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public Builder setDiagnosticMessage( + com.openxc.BinaryMessages.DiagnosticMessage.Builder builderForValue) { + if (diagnosticMessageBuilder_ == null) { + diagnosticMessage_ = builderForValue.build(); + onChanged(); + } else { + diagnosticMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public Builder mergeDiagnosticMessage(com.openxc.BinaryMessages.DiagnosticMessage value) { + if (diagnosticMessageBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + diagnosticMessage_ != com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance()) { + diagnosticMessage_ = + com.openxc.BinaryMessages.DiagnosticMessage.newBuilder(diagnosticMessage_).mergeFrom(value).buildPartial(); + } else { + diagnosticMessage_ = value; + } + onChanged(); + } else { + diagnosticMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public Builder clearDiagnosticMessage() { + if (diagnosticMessageBuilder_ == null) { + diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + onChanged(); + } else { + diagnosticMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public com.openxc.BinaryMessages.DiagnosticMessage.Builder getDiagnosticMessageBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDiagnosticMessageFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + public com.openxc.BinaryMessages.DiagnosticMessageOrBuilder getDiagnosticMessageOrBuilder() { + if (diagnosticMessageBuilder_ != null) { + return diagnosticMessageBuilder_.getMessageOrBuilder(); + } else { + return diagnosticMessage_; + } + } + /** + * optional .openxc.DiagnosticMessage diagnostic_message = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticMessage, com.openxc.BinaryMessages.DiagnosticMessage.Builder, com.openxc.BinaryMessages.DiagnosticMessageOrBuilder> + getDiagnosticMessageFieldBuilder() { + if (diagnosticMessageBuilder_ == null) { + diagnosticMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticMessage, com.openxc.BinaryMessages.DiagnosticMessage.Builder, com.openxc.BinaryMessages.DiagnosticMessageOrBuilder>( + diagnosticMessage_, + getParentForChildren(), + isClean()); + diagnosticMessage_ = null; + } + return diagnosticMessageBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) } @@ -3706,26 +3907,27 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\274\001\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\203\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\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" + - "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" + - "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\221\001\n\021D" + - "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(\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" + - "_value\030\005 \001(\010\022\024\n\014string_event\030\006 \001(\t\022\025\n\rnu" + - "meric_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\014" + - "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" + - "ages" + "xc.TranslatedMessage\0225\n\022diagnostic_messa" + + "ge\030\004 \001(\0132\031.openxc.DiagnosticMessage\"/\n\004T" + + "ype\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022\016\n\nDIAGNOST" + + "IC\020\003\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessa" + + "ge_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\221\001\n\021Diagnostic" + + "Message\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r", + "\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005" + + " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + + "payload\030\007 \001(\014\"\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" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -3737,7 +3939,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", }); + new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticMessage", }); 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 62918919..56d1539e 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\"\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') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x83\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\x35\n\x12\x64iagnostic_message\x18\x04 \x01(\x0b\x32\x19.openxc.DiagnosticMessage\"/\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(\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') @@ -31,11 +31,15 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( name='TRANSLATED', index=1, number=2, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='DIAGNOSTIC', index=2, number=3, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=182, - serialized_end=213, + serialized_start=237, + serialized_end=284, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -71,8 +75,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=642, - serialized_end=734, + serialized_start=713, + serialized_end=805, ) @@ -104,6 +108,13 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='diagnostic_message', full_name='openxc.VehicleMessage.diagnostic_message', index=3, + number=4, 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=[ ], @@ -115,7 +126,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=213, + serialized_end=284, ) @@ -156,8 +167,8 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=215, - serialized_end=274, + serialized_start=286, + serialized_end=345, ) @@ -226,8 +237,8 @@ _DIAGNOSTICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=277, - serialized_end=422, + serialized_start=348, + serialized_end=493, ) @@ -304,13 +315,14 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=425, - serialized_end=734, + serialized_start=496, + serialized_end=805, ) _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_message'].message_type = _DIAGNOSTICMESSAGE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE _TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; diff --git a/openxc.proto b/openxc.proto index 1b438539..cc135a6c 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,11 +4,12 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; TRANSLATED = 2; } + enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; } optional Type type = 1; optional RawMessage raw_message = 2; optional TranslatedMessage translated_message = 3; + optional DiagnosticMessage diagnostic_message = 4; } message RawMessage { -- cgit 1.2.3-korg From e7240a7c3837cec877d0d487a3f9ae66bc0395ae Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 17 Jan 2014 15:05:13 -0500 Subject: Ignore dirty submodules (generated files in nanopb). --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index aaa1a95c..a03da7b3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "libs/nanopb"] path = libs/nanopb url = https://code.google.com/p/nanopb/ + ignore = dirty -- cgit 1.2.3-korg From 6f4799ca62b964e5626d9b22c4d292e6bd378d57 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 17 Jan 2014 16:38:23 -0500 Subject: Store raw CAN payload in bytes instead of uint64_t. --- gen/cpp/openxc.pb | 2 +- gen/cpp/openxc.pb.c | 4 +-- gen/cpp/openxc.pb.h | 13 +++++--- gen/java/com/openxc/BinaryMessages.java | 55 +++++++++++++++++---------------- gen/python/openxc_pb2.py | 6 ++-- openxc.options | 1 + openxc.proto | 2 +- 7 files changed, 46 insertions(+), 37 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 9d6271d1..b4fd2f65 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -17,7 +17,7 @@ RawMessage bus ( message_id (  -data ("‘ +data ( "‘ DiagnosticMessage bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 3c3958f1..84c87c7c 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 Fri Jan 17 14:40:08 2014. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 16:33:23 2014. */ #include "openxc.pb.h" @@ -16,7 +16,7 @@ const pb_field_t openxc_VehicleMessage_fields[5] = { const pb_field_t openxc_RawMessage_fields[4] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD2( 3, UINT64 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), + PB_FIELD2( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 95276b45..879dbb80 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 Fri Jan 17 14:40:08 2014. */ +/* Generated by nanopb-0.2.5 at Fri Jan 17 16:33:23 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -48,13 +48,18 @@ typedef struct _openxc_DiagnosticMessage { openxc_DiagnosticMessage_payload_t payload; } openxc_DiagnosticMessage; +typedef struct { + size_t size; + uint8_t bytes[8]; +} openxc_RawMessage_data_t; + typedef struct _openxc_RawMessage { bool has_bus; int32_t bus; bool has_message_id; uint32_t message_id; bool has_data; - uint64_t data; + openxc_RawMessage_data_t data; } openxc_RawMessage; typedef struct _openxc_TranslatedMessage { @@ -120,8 +125,8 @@ extern const pb_field_t openxc_DiagnosticMessage_fields[8]; extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 422 -#define openxc_RawMessage_size 28 +#define openxc_VehicleMessage_size 421 +#define openxc_RawMessage_size 27 #define openxc_DiagnosticMessage_size 47 #define openxc_TranslatedMessage_size 334 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 495925b1..2962fb65 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1103,15 +1103,15 @@ public final class BinaryMessages { */ int getMessageId(); - // optional uint64 data = 3; + // optional bytes data = 3; /** - * optional uint64 data = 3; + * optional bytes data = 3; */ boolean hasData(); /** - * optional uint64 data = 3; + * optional bytes data = 3; */ - long getData(); + com.google.protobuf.ByteString getData(); } /** * Protobuf type {@code openxc.RawMessage} @@ -1174,9 +1174,9 @@ public final class BinaryMessages { messageId_ = input.readUInt32(); break; } - case 24: { + case 26: { bitField0_ |= 0x00000004; - data_ = input.readUInt64(); + data_ = input.readBytes(); break; } } @@ -1251,26 +1251,26 @@ public final class BinaryMessages { return messageId_; } - // optional uint64 data = 3; + // optional bytes data = 3; public static final int DATA_FIELD_NUMBER = 3; - private long data_; + private com.google.protobuf.ByteString data_; /** - * optional uint64 data = 3; + * optional bytes data = 3; */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional uint64 data = 3; + * optional bytes data = 3; */ - public long getData() { + public com.google.protobuf.ByteString getData() { return data_; } private void initFields() { bus_ = 0; messageId_ = 0; - data_ = 0L; + data_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1291,7 +1291,7 @@ public final class BinaryMessages { output.writeUInt32(2, messageId_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt64(3, data_); + output.writeBytes(3, data_); } getUnknownFields().writeTo(output); } @@ -1312,7 +1312,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, data_); + .computeBytesSize(3, data_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1434,7 +1434,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); messageId_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - data_ = 0L; + data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -1594,35 +1594,38 @@ public final class BinaryMessages { return this; } - // optional uint64 data = 3; - private long data_ ; + // optional bytes data = 3; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** - * optional uint64 data = 3; + * optional bytes data = 3; */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional uint64 data = 3; + * optional bytes data = 3; */ - public long getData() { + public com.google.protobuf.ByteString getData() { return data_; } /** - * optional uint64 data = 3; + * optional bytes data = 3; */ - public Builder setData(long value) { - bitField0_ |= 0x00000004; + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; data_ = value; onChanged(); return this; } /** - * optional uint64 data = 3; + * optional bytes data = 3; */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000004); - data_ = 0L; + data_ = getDefaultInstance().getData(); onChanged(); return this; } @@ -3915,7 +3918,7 @@ public final class BinaryMessages { "ge\030\004 \001(\0132\031.openxc.DiagnosticMessage\"/\n\004T" + "ype\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022\016\n\nDIAGNOST" + "IC\020\003\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessa" + - "ge_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\221\001\n\021Diagnostic" + + "ge_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\"\221\001\n\021Diagnostic" + "Message\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r", "\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005" + " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 56d1539e..182d5f2c 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\"\x83\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\x35\n\x12\x64iagnostic_message\x18\x04 \x01(\x0b\x32\x19.openxc.DiagnosticMessage\"/\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(\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') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x83\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\x35\n\x12\x64iagnostic_message\x18\x04 \x01(\x0b\x32\x19.openxc.DiagnosticMessage\"/\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\"\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') @@ -153,8 +153,8 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None), _descriptor.FieldDescriptor( name='data', full_name='openxc.RawMessage.data', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, + number=3, 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), diff --git a/openxc.options b/openxc.options index 75caabab..c1e4e01b 100644 --- a/openxc.options +++ b/openxc.options @@ -2,3 +2,4 @@ openxc.TranslatedMessage.name max_size:100 openxc.TranslatedMessage.string_value max_size:100 openxc.TranslatedMessage.string_event max_size:100 openxc.DiagnosticMessage.payload max_size:8 +openxc.RawMessage.data max_size:8 diff --git a/openxc.proto b/openxc.proto index cc135a6c..a825e1c3 100644 --- a/openxc.proto +++ b/openxc.proto @@ -15,7 +15,7 @@ message VehicleMessage { message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; - optional uint64 data = 3; + optional bytes data = 3; } message DiagnosticMessage { -- cgit 1.2.3-korg From a9e6edd6bc7952313997ec3cae5bfda3b2f62ee9 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 19 Feb 2014 16:05:59 -0500 Subject: Add a value field to diagnostic responses for parsed payloads. --- gen/cpp/openxc.pb | 7 ++- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 11 ++-- gen/java/com/openxc/BinaryMessages.java | 104 ++++++++++++++++++++++++++++---- gen/python/openxc_pb2.py | 19 ++++-- openxc.proto | 1 + 6 files changed, 121 insertions(+), 26 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index b4fd2f65..ead68af6 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Ã +Ò openxc.protoopenxc"ƒ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -17,7 +17,7 @@ RawMessage bus ( message_id (  -data ( "‘ +data ( "  DiagnosticMessage bus ( @@ -26,7 +26,8 @@ message_id (  pid (  success ( negative_response_code (  -payload ( "µ +payload (  +value ("µ TranslatedMessage, type (2.openxc.TranslatedMessage.Type name (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 84c87c7c..d473fd3b 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 Fri Jan 17 16:33:23 2014. */ +/* Generated by nanopb-0.2.5 at Wed Feb 19 14:35:41 2014. */ #include "openxc.pb.h" @@ -20,7 +20,7 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticMessage_fields[8] = { +const pb_field_t openxc_DiagnosticMessage_fields[9] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticMessage, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, message_id, bus, 0), PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, mode, message_id, 0), @@ -28,6 +28,7 @@ const pb_field_t openxc_DiagnosticMessage_fields[8] = { 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, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, payload, negative_response_code, 0), + PB_FIELD2( 8, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, value, payload, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 879dbb80..9e4c3a27 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 Fri Jan 17 16:33:23 2014. */ +/* Generated by nanopb-0.2.5 at Wed Feb 19 14:35:41 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -46,6 +46,8 @@ typedef struct _openxc_DiagnosticMessage { uint32_t negative_response_code; bool has_payload; openxc_DiagnosticMessage_payload_t payload; + bool has_value; + double value; } openxc_DiagnosticMessage; typedef struct { @@ -102,6 +104,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticMessage_success_tag 5 #define openxc_DiagnosticMessage_negative_response_code_tag 6 #define openxc_DiagnosticMessage_payload_tag 7 +#define openxc_DiagnosticMessage_value_tag 8 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -121,13 +124,13 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[5]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_DiagnosticMessage_fields[8]; +extern const pb_field_t openxc_DiagnosticMessage_fields[9]; extern const pb_field_t openxc_TranslatedMessage_fields[9]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 421 +#define openxc_VehicleMessage_size 430 #define openxc_RawMessage_size 27 -#define openxc_DiagnosticMessage_size 47 +#define openxc_DiagnosticMessage_size 56 #define openxc_TranslatedMessage_size 334 #ifdef __cplusplus diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 2962fb65..33936050 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1723,6 +1723,16 @@ public final class BinaryMessages { * */ com.google.protobuf.ByteString getPayload(); + + // optional double value = 8; + /** + * optional double value = 8; + */ + boolean hasValue(); + /** + * optional double value = 8; + */ + double getValue(); } /** * Protobuf type {@code openxc.DiagnosticMessage} @@ -1810,6 +1820,11 @@ public final class BinaryMessages { payload_ = input.readBytes(); break; } + case 65: { + bitField0_ |= 0x00000080; + value_ = input.readDouble(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -1972,6 +1987,22 @@ public final class BinaryMessages { return payload_; } + // optional double value = 8; + public static final int VALUE_FIELD_NUMBER = 8; + private double value_; + /** + * optional double value = 8; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional double value = 8; + */ + public double getValue() { + return value_; + } + private void initFields() { bus_ = 0; messageId_ = 0; @@ -1980,6 +2011,7 @@ public final class BinaryMessages { success_ = false; negativeResponseCode_ = 0; payload_ = com.google.protobuf.ByteString.EMPTY; + value_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2014,6 +2046,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBytes(7, payload_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeDouble(8, value_); + } getUnknownFields().writeTo(output); } @@ -2051,6 +2086,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeBytesSize(7, payload_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(8, value_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2181,6 +2220,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000020); payload_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); + value_ = 0D; + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -2237,6 +2278,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000040; } result.payload_ = payload_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2274,6 +2319,9 @@ public final class BinaryMessages { if (other.hasPayload()) { setPayload(other.getPayload()); } + if (other.hasValue()) { + setValue(other.getValue()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2555,6 +2603,39 @@ public final class BinaryMessages { return this; } + // optional double value = 8; + private double value_ ; + /** + * optional double value = 8; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional double value = 8; + */ + public double getValue() { + return value_; + } + /** + * optional double value = 8; + */ + public Builder setValue(double value) { + bitField0_ |= 0x00000080; + value_ = value; + onChanged(); + return this; + } + /** + * optional double value = 8; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000080); + value_ = 0D; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticMessage) } @@ -3918,19 +3999,20 @@ public final class BinaryMessages { "ge\030\004 \001(\0132\031.openxc.DiagnosticMessage\"/\n\004T" + "ype\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022\016\n\nDIAGNOST" + "IC\020\003\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessa" + - "ge_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\"\221\001\n\021Diagnostic" + + "ge_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\"\240\001\n\021Diagnostic" + "Message\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r", "\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005" + " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + - "payload\030\007 \001(\014\"\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" + "payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\265\002\n\021Transla" + + "tedMessage\022,\n\004type\030\001 \001(\0162\036.openxc.Transl" + + "atedMessage.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\rb" + + "oolean_value\030\005 \001(\010\022\024\n\014string_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\004B" + + "OOL\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\ncom.openxcB\016Bina" + + "ryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -3954,7 +4036,7 @@ public final class BinaryMessages { internal_static_openxc_DiagnosticMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_TranslatedMessage_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 182d5f2c..7600beef 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\"\x83\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\x35\n\x12\x64iagnostic_message\x18\x04 \x01(\x0b\x32\x19.openxc.DiagnosticMessage\"/\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\"\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') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x83\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\x35\n\x12\x64iagnostic_message\x18\x04 \x01(\x0b\x32\x19.openxc.DiagnosticMessage\"/\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\"\xa0\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\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') @@ -75,8 +75,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=713, - serialized_end=805, + serialized_start=728, + serialized_end=820, ) @@ -228,6 +228,13 @@ _DIAGNOSTICMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='value', full_name='openxc.DiagnosticMessage.value', 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), ], extensions=[ ], @@ -238,7 +245,7 @@ _DIAGNOSTICMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=348, - serialized_end=493, + serialized_end=508, ) @@ -315,8 +322,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=496, - serialized_end=805, + serialized_start=511, + serialized_end=820, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index a825e1c3..a562b49d 100644 --- a/openxc.proto +++ b/openxc.proto @@ -28,6 +28,7 @@ message DiagnosticMessage { // TODO we are capping this at 8 bytes for now - need to change when we // support multi-frame responses optional bytes payload = 7; + optional double value = 8; } message TranslatedMessage { -- cgit 1.2.3-korg From 929ab4bd49789e592e0192f3e5f4a06c499db135 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 28 Feb 2014 14:43:26 -0500 Subject: Add more optional fields to diag requests and responses. --- README.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ba164192..475ae215 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,9 @@ is sent as a JSON object, separated by newlines. The format of each object is: "mode": 1, "pid": 5, "payload": "0x1234", + "parse_payload": true, + "factor": 1.0, + "offset": 0, "frequency": 0} **bus** - the numerical identifier of the CAN bus where this request should be @@ -58,8 +61,8 @@ is sent as a JSON object, separated by newlines. The format of each object is: **id** - the CAN arbitration ID for the request. -**mode** - the OBD-II mode of the request - 0x1 through 0xf (0x1 through 0xa - are the standardized modes). +**mode** - the OBD-II mode of the request - 1 through 15 (1 through 9 are the + standardized modes). **pid** - (optional) the PID for the request, if applicable. @@ -67,6 +70,19 @@ is sent as a JSON object, separated by newlines. The format of each object is: represented as a hexidecimal number in a string. Many JSON parser cannot handle 64-bit integers, which is why we are not using a numerical data type. +**parse_payload** - (optional, false by default) if true, the complete payload in the + response message will be parsed as a number and returned in the 'value' field of + the response. The 'payload' field will be omitted in responses with a + 'value'. + +**factor** - (optional, 1.0 by default) if `parse_payload` is true, the value in + the payload will be multiplied by this factor before returning. The `factor` + is applied before the `offset`. + +**offset** - (optional, 0 by default) if `parse_payload` is true, this offset + will be added to the value in the payload before returning. The `offset` is + applied after the `factor`. + **frequency** - (optional, defaults to 0) The frequency in Hz to send this request. To send a single request, set this to 0 or leave it out. @@ -86,7 +102,8 @@ request: "pid": 5, "success": true, "negative_response_code": 17, - "payload": "0x1234"} + "payload": "0x1234", + "parsed_payload": 4660} **bus** - the numerical identifier of the CAN bus where this response was received. @@ -101,15 +118,21 @@ request: field is false, the remote node returned an error and the `negative_response_code` field should be populated. -**negative_response_code** - (optional) If requsted node returned an error, +**negative_response_code** - (optional) If requested node returned an error, `success` will be `false` and this field will contain the negative response code (NRC). +Finally, the `payload` and `value` fields are mutually exclusive: + **payload** - (optional) up to 7 bytes of data returned in the response, - represented as a hexidecimal number in a string. Many JSON parser cannot + represented as a hexadecimal number in a string. Many JSON parser cannot handle 64-bit integers, which is why we are not using a numerical data type. -The response to a simple PID requset would look like this: +**value** - (optional) if the response had a payload, this may be the + payload interpreted as an integer and transformed with a factor and offset + provided with the request. + +The response to a simple PID request would look like this: {"bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} -- cgit 1.2.3-korg From cbad38794215b77048a357948e329cb8277b6ba7 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 28 Feb 2014 14:47:09 -0500 Subject: Move 'frequency' field inside 'request' object of diag command. --- README.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 475ae215..a10fe88b 100644 --- a/README.md +++ b/README.md @@ -46,15 +46,23 @@ is sent as a JSON object, separated by newlines. The format of each object is: ### Requests - {"bus": 1, - "id": 1234, - "mode": 1, - "pid": 5, - "payload": "0x1234", - "parse_payload": true, - "factor": 1.0, - "offset": 0, - "frequency": 0} +A request to add or update a diagnostic request is sent to a vehicle interface +with this command format: + + { "command": "diagnostic_request", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "payload": "0x1234", + "parse_payload": true, + "factor": 1.0, + "offset": 0, + "frequency": 1 + } + } + } **bus** - the numerical identifier of the CAN bus where this request should be sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). @@ -89,8 +97,8 @@ is sent as a JSON object, separated by newlines. The format of each object is: TODO it'd be nice to have the OBD-II PIDs built in, with the proper conversion functions - that may need a different output format -If you're just requesting a PID, you can use a simplified format for the -request: +If you're just requesting a PID, you can use this minimal field set for the +`request` object: {"bus": 1, "id": 1234, "mode": 1, "pid": 5} -- cgit 1.2.3-korg From fba381d2003787a719252400487d3e6b9f2d1fdb Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 28 Feb 2014 14:48:36 -0500 Subject: Add details about updating diag requests. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index a10fe88b..2be7c10c 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,11 @@ with this command format: **frequency** - (optional, defaults to 0) The frequency in Hz to send this request. To send a single request, set this to 0 or leave it out. +The `bus+id+mode+pid` key is unique, so if you send a create request with that +key twice, it'll overwrite the existing one (i.e. it will change the frequency, +the only other parameter). To cancel a recurring request, send this command with +the frequency set to 0. + TODO it'd be nice to have the OBD-II PIDs built in, with the proper conversion functions - that may need a different output format -- cgit 1.2.3-korg From 37d7cb54624eaf3e674b700f706b53782489e764 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 3 Mar 2014 15:36:35 -0500 Subject: Add a draft protobuf format for diagnostic requests. --- gen/cpp/openxc.pb | 31 +- gen/cpp/openxc.pb.c | 45 +- gen/cpp/openxc.pb.h | 90 +- gen/java/com/openxc/BinaryMessages.java | 2133 ++++++++++++++++++++++++++++--- gen/python/openxc_pb2.py | 220 +++- openxc.options | 3 +- openxc.proto | 25 +- 7 files changed, 2314 insertions(+), 233 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index ead68af6..d4bd0a80 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,11 +1,11 @@ -Ò - openxc.protoopenxc"ƒ +« + openxc.protoopenxc"… VehicleMessage) type (2.openxc.VehicleMessage.Type' raw_message ( 2.openxc.RawMessage5 -translated_message ( 2.openxc.TranslatedMessage5 -diagnostic_message ( 2.openxc.DiagnosticMessage"/ +translated_message ( 2.openxc.TranslatedMessage7 +diagnostic_response ( 2.openxc.DiagnosticResponse"/ Type RAW @@ -17,8 +17,27 @@ RawMessage bus ( message_id (  -data ( "  -DiagnosticMessage +data ( "¦ +ControlCommand) +type (2.openxc.ControlCommand.Type5 +diagnostic_request ( 2.openxc.DiagnosticRequest"2 +Type +VERSION + DEVICE_ID + +DIAGNOSTIC"ª +DiagnosticRequest +bus ( + +message_id (  +mode (  +pid (  +payload (  + parse_payload ( +factor ( +offset ( + frequency ("¡ +DiagnosticResponse bus ( message_id (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index d473fd3b..8c663ef1 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 Wed Feb 19 14:35:41 2014. */ +/* Generated by nanopb-0.2.5 at Mon Mar 3 15:48:39 2014. */ #include "openxc.pb.h" @@ -9,7 +9,7 @@ const pb_field_t openxc_VehicleMessage_fields[5] = { 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_message, translated_message, &openxc_DiagnosticMessage_fields), + PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, translated_message, &openxc_DiagnosticResponse_fields), PB_LAST_FIELD }; @@ -20,15 +20,34 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticMessage_fields[9] = { - PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticMessage, bus, bus, 0), - PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, message_id, bus, 0), - PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, mode, message_id, 0), - 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, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, payload, negative_response_code, 0), - PB_FIELD2( 8, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticMessage, value, payload, 0), +const pb_field_t openxc_ControlCommand_fields[3] = { + PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), + PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticRequest_fields), + PB_LAST_FIELD +}; + +const pb_field_t openxc_DiagnosticRequest_fields[10] = { + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticRequest, bus, bus, 0), + PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, message_id, bus, 0), + PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, mode, message_id, 0), + 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, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, factor, parse_payload, 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_LAST_FIELD +}; + +const pb_field_t openxc_DiagnosticResponse_fields[9] = { + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticResponse, bus, bus, 0), + PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, message_id, bus, 0), + PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, mode, message_id, 0), + PB_FIELD2( 4, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, pid, mode, 0), + PB_FIELD2( 5, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, success, pid, 0), + PB_FIELD2( 6, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, negative_response_code, success, 0), + PB_FIELD2( 7, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, payload, negative_response_code, 0), + PB_FIELD2( 8, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, value, payload, 0), PB_LAST_FIELD }; @@ -47,11 +66,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_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_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_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_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_DiagnosticMessage_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_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 9e4c3a27..cfb0ef74 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 Wed Feb 19 14:35:41 2014. */ +/* Generated by nanopb-0.2.5 at Mon Mar 3 15:48:39 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -16,6 +16,12 @@ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_DIAGNOSTIC = 3 } openxc_VehicleMessage_Type; +typedef enum _openxc_ControlCommand_Type { + openxc_ControlCommand_Type_VERSION = 1, + openxc_ControlCommand_Type_DEVICE_ID = 2, + openxc_ControlCommand_Type_DIAGNOSTIC = 3 +} openxc_ControlCommand_Type; + typedef enum _openxc_TranslatedMessage_Type { openxc_TranslatedMessage_Type_STRING = 1, openxc_TranslatedMessage_Type_NUM = 2, @@ -29,9 +35,35 @@ typedef enum _openxc_TranslatedMessage_Type { typedef struct { size_t size; uint8_t bytes[8]; -} openxc_DiagnosticMessage_payload_t; +} openxc_DiagnosticRequest_payload_t; -typedef struct _openxc_DiagnosticMessage { +typedef struct _openxc_DiagnosticRequest { + bool has_bus; + int32_t bus; + bool has_message_id; + uint32_t message_id; + bool has_mode; + uint32_t mode; + bool has_pid; + uint32_t pid; + bool has_payload; + openxc_DiagnosticRequest_payload_t payload; + bool has_parse_payload; + bool parse_payload; + bool has_factor; + double factor; + bool has_offset; + double offset; + bool has_frequency; + double frequency; +} openxc_DiagnosticRequest; + +typedef struct { + size_t size; + uint8_t bytes[8]; +} openxc_DiagnosticResponse_payload_t; + +typedef struct _openxc_DiagnosticResponse { bool has_bus; int32_t bus; bool has_message_id; @@ -45,10 +77,10 @@ typedef struct _openxc_DiagnosticMessage { bool has_negative_response_code; uint32_t negative_response_code; bool has_payload; - openxc_DiagnosticMessage_payload_t payload; + openxc_DiagnosticResponse_payload_t payload; bool has_value; double value; -} openxc_DiagnosticMessage; +} openxc_DiagnosticResponse; typedef struct { size_t size; @@ -83,6 +115,13 @@ typedef struct _openxc_TranslatedMessage { bool boolean_event; } openxc_TranslatedMessage; +typedef struct _openxc_ControlCommand { + bool has_type; + openxc_ControlCommand_Type type; + bool has_diagnostic_request; + openxc_DiagnosticRequest diagnostic_request; +} openxc_ControlCommand; + typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; @@ -90,21 +129,30 @@ typedef struct _openxc_VehicleMessage { openxc_RawMessage raw_message; bool has_translated_message; openxc_TranslatedMessage translated_message; - bool has_diagnostic_message; - openxc_DiagnosticMessage diagnostic_message; + bool has_diagnostic_response; + openxc_DiagnosticResponse diagnostic_response; } openxc_VehicleMessage; /* Default values for struct fields */ /* Field tags (for use in manual encoding/decoding) */ -#define openxc_DiagnosticMessage_bus_tag 1 -#define openxc_DiagnosticMessage_message_id_tag 2 -#define openxc_DiagnosticMessage_mode_tag 3 -#define openxc_DiagnosticMessage_pid_tag 4 -#define openxc_DiagnosticMessage_success_tag 5 -#define openxc_DiagnosticMessage_negative_response_code_tag 6 -#define openxc_DiagnosticMessage_payload_tag 7 -#define openxc_DiagnosticMessage_value_tag 8 +#define openxc_DiagnosticRequest_bus_tag 1 +#define openxc_DiagnosticRequest_message_id_tag 2 +#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_factor_tag 7 +#define openxc_DiagnosticRequest_offset_tag 8 +#define openxc_DiagnosticRequest_frequency_tag 9 +#define openxc_DiagnosticResponse_bus_tag 1 +#define openxc_DiagnosticResponse_message_id_tag 2 +#define openxc_DiagnosticResponse_mode_tag 3 +#define openxc_DiagnosticResponse_pid_tag 4 +#define openxc_DiagnosticResponse_success_tag 5 +#define openxc_DiagnosticResponse_negative_response_code_tag 6 +#define openxc_DiagnosticResponse_payload_tag 7 +#define openxc_DiagnosticResponse_value_tag 8 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -116,21 +164,27 @@ typedef struct _openxc_VehicleMessage { #define openxc_TranslatedMessage_string_event_tag 6 #define openxc_TranslatedMessage_numeric_event_tag 7 #define openxc_TranslatedMessage_boolean_event_tag 8 +#define openxc_ControlCommand_type_tag 1 +#define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 -#define openxc_VehicleMessage_diagnostic_message_tag 4 +#define openxc_VehicleMessage_diagnostic_response_tag 4 /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[5]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_DiagnosticMessage_fields[9]; +extern const pb_field_t openxc_ControlCommand_fields[3]; +extern const pb_field_t openxc_DiagnosticRequest_fields[10]; +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_RawMessage_size 27 -#define openxc_DiagnosticMessage_size 56 +#define openxc_ControlCommand_size 76 +#define openxc_DiagnosticRequest_size 68 +#define openxc_DiagnosticResponse_size 56 #define openxc_TranslatedMessage_size 334 #ifdef __cplusplus diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 33936050..f1f47537 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -49,19 +49,19 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); - // optional .openxc.DiagnosticMessage diagnostic_message = 4; + // optional .openxc.DiagnosticResponse diagnostic_response = 4; /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - boolean hasDiagnosticMessage(); + boolean hasDiagnosticResponse(); /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - com.openxc.BinaryMessages.DiagnosticMessage getDiagnosticMessage(); + com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse(); /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - com.openxc.BinaryMessages.DiagnosticMessageOrBuilder getDiagnosticMessageOrBuilder(); + com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); } /** * Protobuf type {@code openxc.VehicleMessage} @@ -152,14 +152,14 @@ public final class BinaryMessages { break; } case 34: { - com.openxc.BinaryMessages.DiagnosticMessage.Builder subBuilder = null; + com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null; if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = diagnosticMessage_.toBuilder(); + subBuilder = diagnosticResponse_.toBuilder(); } - diagnosticMessage_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticMessage.PARSER, extensionRegistry); + diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(diagnosticMessage_); - diagnosticMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(diagnosticResponse_); + diagnosticResponse_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000008; break; @@ -355,33 +355,33 @@ public final class BinaryMessages { return translatedMessage_; } - // optional .openxc.DiagnosticMessage diagnostic_message = 4; - public static final int DIAGNOSTIC_MESSAGE_FIELD_NUMBER = 4; - private com.openxc.BinaryMessages.DiagnosticMessage diagnosticMessage_; + // optional .openxc.DiagnosticResponse diagnostic_response = 4; + public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_; /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public boolean hasDiagnosticMessage() { + public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public com.openxc.BinaryMessages.DiagnosticMessage getDiagnosticMessage() { - return diagnosticMessage_; + public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { + return diagnosticResponse_; } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public com.openxc.BinaryMessages.DiagnosticMessageOrBuilder getDiagnosticMessageOrBuilder() { - return diagnosticMessage_; + public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { + return diagnosticResponse_; } private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); - diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -405,7 +405,7 @@ public final class BinaryMessages { output.writeMessage(3, translatedMessage_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, diagnosticMessage_); + output.writeMessage(4, diagnosticResponse_); } getUnknownFields().writeTo(output); } @@ -430,7 +430,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, diagnosticMessage_); + .computeMessageSize(4, diagnosticResponse_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -542,7 +542,7 @@ public final class BinaryMessages { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRawMessageFieldBuilder(); getTranslatedMessageFieldBuilder(); - getDiagnosticMessageFieldBuilder(); + getDiagnosticResponseFieldBuilder(); } } private static Builder create() { @@ -565,10 +565,10 @@ public final class BinaryMessages { translatedMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); - if (diagnosticMessageBuilder_ == null) { - diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + if (diagnosticResponseBuilder_ == null) { + diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); } else { - diagnosticMessageBuilder_.clear(); + diagnosticResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; @@ -622,10 +622,10 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - if (diagnosticMessageBuilder_ == null) { - result.diagnosticMessage_ = diagnosticMessage_; + if (diagnosticResponseBuilder_ == null) { + result.diagnosticResponse_ = diagnosticResponse_; } else { - result.diagnosticMessage_ = diagnosticMessageBuilder_.build(); + result.diagnosticResponse_ = diagnosticResponseBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -652,8 +652,8 @@ public final class BinaryMessages { if (other.hasTranslatedMessage()) { mergeTranslatedMessage(other.getTranslatedMessage()); } - if (other.hasDiagnosticMessage()) { - mergeDiagnosticMessage(other.getDiagnosticMessage()); + if (other.hasDiagnosticResponse()) { + mergeDiagnosticResponse(other.getDiagnosticResponse()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -952,121 +952,121 @@ public final class BinaryMessages { return translatedMessageBuilder_; } - // optional .openxc.DiagnosticMessage diagnostic_message = 4; - private com.openxc.BinaryMessages.DiagnosticMessage diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + // optional .openxc.DiagnosticResponse diagnostic_response = 4; + private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticMessage, com.openxc.BinaryMessages.DiagnosticMessage.Builder, com.openxc.BinaryMessages.DiagnosticMessageOrBuilder> diagnosticMessageBuilder_; + com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_; /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public boolean hasDiagnosticMessage() { + public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public com.openxc.BinaryMessages.DiagnosticMessage getDiagnosticMessage() { - if (diagnosticMessageBuilder_ == null) { - return diagnosticMessage_; + public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { + if (diagnosticResponseBuilder_ == null) { + return diagnosticResponse_; } else { - return diagnosticMessageBuilder_.getMessage(); + return diagnosticResponseBuilder_.getMessage(); } } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public Builder setDiagnosticMessage(com.openxc.BinaryMessages.DiagnosticMessage value) { - if (diagnosticMessageBuilder_ == null) { + public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { + if (diagnosticResponseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - diagnosticMessage_ = value; + diagnosticResponse_ = value; onChanged(); } else { - diagnosticMessageBuilder_.setMessage(value); + diagnosticResponseBuilder_.setMessage(value); } bitField0_ |= 0x00000008; return this; } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public Builder setDiagnosticMessage( - com.openxc.BinaryMessages.DiagnosticMessage.Builder builderForValue) { - if (diagnosticMessageBuilder_ == null) { - diagnosticMessage_ = builderForValue.build(); + public Builder setDiagnosticResponse( + com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) { + if (diagnosticResponseBuilder_ == null) { + diagnosticResponse_ = builderForValue.build(); onChanged(); } else { - diagnosticMessageBuilder_.setMessage(builderForValue.build()); + diagnosticResponseBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public Builder mergeDiagnosticMessage(com.openxc.BinaryMessages.DiagnosticMessage value) { - if (diagnosticMessageBuilder_ == null) { + public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { + if (diagnosticResponseBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && - diagnosticMessage_ != com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance()) { - diagnosticMessage_ = - com.openxc.BinaryMessages.DiagnosticMessage.newBuilder(diagnosticMessage_).mergeFrom(value).buildPartial(); + diagnosticResponse_ != com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) { + diagnosticResponse_ = + com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(diagnosticResponse_).mergeFrom(value).buildPartial(); } else { - diagnosticMessage_ = value; + diagnosticResponse_ = value; } onChanged(); } else { - diagnosticMessageBuilder_.mergeFrom(value); + diagnosticResponseBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; return this; } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public Builder clearDiagnosticMessage() { - if (diagnosticMessageBuilder_ == null) { - diagnosticMessage_ = com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + public Builder clearDiagnosticResponse() { + if (diagnosticResponseBuilder_ == null) { + diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); onChanged(); } else { - diagnosticMessageBuilder_.clear(); + diagnosticResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public com.openxc.BinaryMessages.DiagnosticMessage.Builder getDiagnosticMessageBuilder() { + public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getDiagnosticMessageFieldBuilder().getBuilder(); + return getDiagnosticResponseFieldBuilder().getBuilder(); } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ - public com.openxc.BinaryMessages.DiagnosticMessageOrBuilder getDiagnosticMessageOrBuilder() { - if (diagnosticMessageBuilder_ != null) { - return diagnosticMessageBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { + if (diagnosticResponseBuilder_ != null) { + return diagnosticResponseBuilder_.getMessageOrBuilder(); } else { - return diagnosticMessage_; + return diagnosticResponse_; } } /** - * optional .openxc.DiagnosticMessage diagnostic_message = 4; + * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticMessage, com.openxc.BinaryMessages.DiagnosticMessage.Builder, com.openxc.BinaryMessages.DiagnosticMessageOrBuilder> - getDiagnosticMessageFieldBuilder() { - if (diagnosticMessageBuilder_ == null) { - diagnosticMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticMessage, com.openxc.BinaryMessages.DiagnosticMessage.Builder, com.openxc.BinaryMessages.DiagnosticMessageOrBuilder>( - diagnosticMessage_, + com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> + getDiagnosticResponseFieldBuilder() { + if (diagnosticResponseBuilder_ == null) { + diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>( + diagnosticResponse_, getParentForChildren(), isClean()); - diagnosticMessage_ = null; + diagnosticResponse_ = null; } - return diagnosticMessageBuilder_; + return diagnosticResponseBuilder_; } // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) @@ -1641,7 +1641,1782 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.RawMessage) } - public interface DiagnosticMessageOrBuilder + public interface ControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.ControlCommand.Type type = 1; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + boolean hasType(); + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + com.openxc.BinaryMessages.ControlCommand.Type getType(); + + // optional .openxc.DiagnosticRequest diagnostic_request = 2; + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + boolean hasDiagnosticRequest(); + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest(); + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder(); + } + /** + * Protobuf type {@code openxc.ControlCommand} + */ + public static final class ControlCommand extends + com.google.protobuf.GeneratedMessage + implements ControlCommandOrBuilder { + // Use ControlCommand.newBuilder() to construct. + private ControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ControlCommand defaultInstance; + public static ControlCommand getDefaultInstance() { + return defaultInstance; + } + + public ControlCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = diagnosticRequest_.toBuilder(); + } + diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diagnosticRequest_); + diagnosticRequest_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.ControlCommand.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * VERSION = 1; + */ + VERSION(0, 1), + /** + * DEVICE_ID = 2; + */ + DEVICE_ID(1, 2), + /** + * DIAGNOSTIC = 3; + */ + DIAGNOSTIC(2, 3), + ; + + /** + * VERSION = 1; + */ + public static final int VERSION_VALUE = 1; + /** + * DEVICE_ID = 2; + */ + public static final int DEVICE_ID_VALUE = 2; + /** + * DIAGNOSTIC = 3; + */ + public static final int DIAGNOSTIC_VALUE = 3; + + + public final int getNumber() { return value; } + + public static Type valueOf(int value) { + switch (value) { + case 1: return VERSION; + case 2: return DEVICE_ID; + case 3: return DIAGNOSTIC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) + } + + private int bitField0_; + // optional .openxc.ControlCommand.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.ControlCommand.Type type_; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public com.openxc.BinaryMessages.ControlCommand.Type getType() { + return type_; + } + + // optional .openxc.DiagnosticRequest diagnostic_request = 2; + public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_; + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public boolean hasDiagnosticRequest() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { + return diagnosticRequest_; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { + return diagnosticRequest_; + } + + private void initFields() { + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, diagnosticRequest_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, diagnosticRequest_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.ControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDiagnosticRequestFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bitField0_ = (bitField0_ & ~0x00000001); + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.ControlCommand build() { + com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.ControlCommand buildPartial() { + com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (diagnosticRequestBuilder_ == null) { + result.diagnosticRequest_ = diagnosticRequest_; + } else { + result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.ControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { + if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasDiagnosticRequest()) { + mergeDiagnosticRequest(other.getDiagnosticRequest()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.ControlCommand.Type type = 1; + private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public com.openxc.BinaryMessages.ControlCommand.Type getType() { + return type_; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + onChanged(); + return this; + } + + // optional .openxc.DiagnosticRequest diagnostic_request = 2; + private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_; + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public boolean hasDiagnosticRequest() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + return diagnosticRequest_; + } else { + return diagnosticRequestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (diagnosticRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diagnosticRequest_ = value; + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder setDiagnosticRequest( + com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = builderForValue.build(); + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (diagnosticRequestBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { + diagnosticRequest_ = + com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); + } else { + diagnosticRequest_ = value; + } + onChanged(); + } else { + diagnosticRequestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder clearDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + onChanged(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDiagnosticRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { + if (diagnosticRequestBuilder_ != null) { + return diagnosticRequestBuilder_.getMessageOrBuilder(); + } else { + return diagnosticRequest_; + } + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> + getDiagnosticRequestFieldBuilder() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( + diagnosticRequest_, + getParentForChildren(), + isClean()); + diagnosticRequest_ = null; + } + return diagnosticRequestBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) + } + + static { + defaultInstance = new ControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.ControlCommand) + } + + public interface DiagnosticRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional uint32 message_id = 2; + /** + * optional uint32 message_id = 2; + */ + boolean hasMessageId(); + /** + * optional uint32 message_id = 2; + */ + int getMessageId(); + + // optional uint32 mode = 3; + /** + * optional uint32 mode = 3; + */ + boolean hasMode(); + /** + * optional uint32 mode = 3; + */ + int getMode(); + + // optional uint32 pid = 4; + /** + * optional uint32 pid = 4; + */ + boolean hasPid(); + /** + * optional uint32 pid = 4; + */ + int getPid(); + + // optional bytes payload = 5; + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ + boolean hasPayload(); + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ + com.google.protobuf.ByteString getPayload(); + + // optional bool parse_payload = 6; + /** + * optional bool parse_payload = 6; + */ + boolean hasParsePayload(); + /** + * optional bool parse_payload = 6; + */ + boolean getParsePayload(); + + // optional double factor = 7; + /** + * optional double factor = 7; + */ + boolean hasFactor(); + /** + * optional double factor = 7; + */ + double getFactor(); + + // optional double offset = 8; + /** + * optional double offset = 8; + */ + boolean hasOffset(); + /** + * optional double offset = 8; + */ + double getOffset(); + + // optional double frequency = 9; + /** + * optional double frequency = 9; + */ + boolean hasFrequency(); + /** + * optional double frequency = 9; + */ + double getFrequency(); + } + /** + * Protobuf type {@code openxc.DiagnosticRequest} + */ + public static final class DiagnosticRequest extends + com.google.protobuf.GeneratedMessage + implements DiagnosticRequestOrBuilder { + // Use DiagnosticRequest.newBuilder() to construct. + private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final DiagnosticRequest defaultInstance; + public static DiagnosticRequest getDefaultInstance() { + return defaultInstance; + } + + public DiagnosticRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DiagnosticRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + payload_ = input.readBytes(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + parsePayload_ = input.readBool(); + break; + } + case 57: { + bitField0_ |= 0x00000040; + factor_ = input.readDouble(); + break; + } + case 65: { + bitField0_ |= 0x00000080; + offset_ = input.readDouble(); + break; + } + case 73: { + bitField0_ |= 0x00000100; + frequency_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiagnosticRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional uint32 message_id = 2; + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + private int messageId_; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + + // optional uint32 mode = 3; + public static final int MODE_FIELD_NUMBER = 3; + private int mode_; + /** + * optional uint32 mode = 3; + */ + public boolean hasMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 mode = 3; + */ + public int getMode() { + return mode_; + } + + // optional uint32 pid = 4; + public static final int PID_FIELD_NUMBER = 4; + private int pid_; + /** + * optional uint32 pid = 4; + */ + public boolean hasPid() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 pid = 4; + */ + public int getPid() { + return pid_; + } + + // optional bytes payload = 5; + public static final int PAYLOAD_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString payload_; + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + // optional bool parse_payload = 6; + public static final int PARSE_PAYLOAD_FIELD_NUMBER = 6; + private boolean parsePayload_; + /** + * optional bool parse_payload = 6; + */ + public boolean hasParsePayload() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool parse_payload = 6; + */ + public boolean getParsePayload() { + return parsePayload_; + } + + // optional double factor = 7; + public static final int FACTOR_FIELD_NUMBER = 7; + private double factor_; + /** + * optional double factor = 7; + */ + public boolean hasFactor() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional double factor = 7; + */ + public double getFactor() { + return factor_; + } + + // optional double offset = 8; + public static final int OFFSET_FIELD_NUMBER = 8; + private double offset_; + /** + * optional double offset = 8; + */ + public boolean hasOffset() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional double offset = 8; + */ + public double getOffset() { + return offset_; + } + + // optional double frequency = 9; + public static final int FREQUENCY_FIELD_NUMBER = 9; + private double frequency_; + /** + * optional double frequency = 9; + */ + public boolean hasFrequency() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional double frequency = 9; + */ + public double getFrequency() { + return frequency_; + } + + private void initFields() { + bus_ = 0; + messageId_ = 0; + mode_ = 0; + pid_ = 0; + payload_ = com.google.protobuf.ByteString.EMPTY; + parsePayload_ = false; + factor_ = 0D; + offset_ = 0D; + frequency_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(3, mode_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt32(4, pid_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, payload_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(6, parsePayload_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeDouble(7, factor_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeDouble(8, offset_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeDouble(9, frequency_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, messageId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, mode_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, pid_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, payload_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, parsePayload_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(7, factor_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(8, offset_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(9, frequency_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.DiagnosticRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + messageId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + mode_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + pid_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + payload_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + parsePayload_ = false; + bitField0_ = (bitField0_ & ~0x00000020); + factor_ = 0D; + bitField0_ = (bitField0_ & ~0x00000040); + offset_ = 0D; + bitField0_ = (bitField0_ & ~0x00000080); + frequency_ = 0D; + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; + } + + public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() { + return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.DiagnosticRequest build() { + com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() { + com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.messageId_ = messageId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.mode_ = mode_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.pid_ = pid_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.payload_ = payload_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.parsePayload_ = parsePayload_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.factor_ = factor_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.offset_ = offset_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.frequency_ = frequency_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) { + return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) { + if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasMessageId()) { + setMessageId(other.getMessageId()); + } + if (other.hasMode()) { + setMode(other.getMode()); + } + if (other.hasPid()) { + setPid(other.getPid()); + } + if (other.hasPayload()) { + setPayload(other.getPayload()); + } + if (other.hasParsePayload()) { + setParsePayload(other.getParsePayload()); + } + if (other.hasFactor()) { + setFactor(other.getFactor()); + } + if (other.hasOffset()) { + setOffset(other.getOffset()); + } + if (other.hasFrequency()) { + setFrequency(other.getFrequency()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 bus = 1; + private int bus_ ; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + /** + * optional int32 bus = 1; + */ + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); + return this; + } + /** + * optional int32 bus = 1; + */ + public Builder clearBus() { + bitField0_ = (bitField0_ & ~0x00000001); + bus_ = 0; + onChanged(); + return this; + } + + // optional uint32 message_id = 2; + private int messageId_ ; + /** + * optional uint32 message_id = 2; + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional uint32 message_id = 2; + */ + public int getMessageId() { + return messageId_; + } + /** + * optional uint32 message_id = 2; + */ + public Builder setMessageId(int value) { + bitField0_ |= 0x00000002; + messageId_ = value; + onChanged(); + return this; + } + /** + * optional uint32 message_id = 2; + */ + public Builder clearMessageId() { + bitField0_ = (bitField0_ & ~0x00000002); + messageId_ = 0; + onChanged(); + return this; + } + + // optional uint32 mode = 3; + private int mode_ ; + /** + * optional uint32 mode = 3; + */ + public boolean hasMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional uint32 mode = 3; + */ + public int getMode() { + return mode_; + } + /** + * optional uint32 mode = 3; + */ + public Builder setMode(int value) { + bitField0_ |= 0x00000004; + mode_ = value; + onChanged(); + return this; + } + /** + * optional uint32 mode = 3; + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000004); + mode_ = 0; + onChanged(); + return this; + } + + // optional uint32 pid = 4; + private int pid_ ; + /** + * optional uint32 pid = 4; + */ + public boolean hasPid() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional uint32 pid = 4; + */ + public int getPid() { + return pid_; + } + /** + * optional uint32 pid = 4; + */ + public Builder setPid(int value) { + bitField0_ |= 0x00000008; + pid_ = value; + onChanged(); + return this; + } + /** + * optional uint32 pid = 4; + */ + public Builder clearPid() { + bitField0_ = (bitField0_ & ~0x00000008); + pid_ = 0; + onChanged(); + return this; + } + + // optional bytes payload = 5; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + payload_ = value; + onChanged(); + return this; + } + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000010); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + // optional bool parse_payload = 6; + private boolean parsePayload_ ; + /** + * optional bool parse_payload = 6; + */ + public boolean hasParsePayload() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool parse_payload = 6; + */ + public boolean getParsePayload() { + return parsePayload_; + } + /** + * optional bool parse_payload = 6; + */ + public Builder setParsePayload(boolean value) { + bitField0_ |= 0x00000020; + parsePayload_ = value; + onChanged(); + return this; + } + /** + * optional bool parse_payload = 6; + */ + public Builder clearParsePayload() { + bitField0_ = (bitField0_ & ~0x00000020); + parsePayload_ = false; + onChanged(); + return this; + } + + // optional double factor = 7; + private double factor_ ; + /** + * optional double factor = 7; + */ + public boolean hasFactor() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional double factor = 7; + */ + public double getFactor() { + return factor_; + } + /** + * optional double factor = 7; + */ + public Builder setFactor(double value) { + bitField0_ |= 0x00000040; + factor_ = value; + onChanged(); + return this; + } + /** + * optional double factor = 7; + */ + public Builder clearFactor() { + bitField0_ = (bitField0_ & ~0x00000040); + factor_ = 0D; + onChanged(); + return this; + } + + // optional double offset = 8; + private double offset_ ; + /** + * optional double offset = 8; + */ + public boolean hasOffset() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional double offset = 8; + */ + public double getOffset() { + return offset_; + } + /** + * optional double offset = 8; + */ + public Builder setOffset(double value) { + bitField0_ |= 0x00000080; + offset_ = value; + onChanged(); + return this; + } + /** + * optional double offset = 8; + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000080); + offset_ = 0D; + onChanged(); + return this; + } + + // optional double frequency = 9; + private double frequency_ ; + /** + * optional double frequency = 9; + */ + public boolean hasFrequency() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional double frequency = 9; + */ + public double getFrequency() { + return frequency_; + } + /** + * optional double frequency = 9; + */ + public Builder setFrequency(double value) { + bitField0_ |= 0x00000100; + frequency_ = value; + onChanged(); + return this; + } + /** + * optional double frequency = 9; + */ + public Builder clearFrequency() { + bitField0_ = (bitField0_ & ~0x00000100); + frequency_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) + } + + static { + defaultInstance = new DiagnosticRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) + } + + public interface DiagnosticResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 bus = 1; @@ -1735,24 +3510,24 @@ public final class BinaryMessages { double getValue(); } /** - * Protobuf type {@code openxc.DiagnosticMessage} + * Protobuf type {@code openxc.DiagnosticResponse} */ - public static final class DiagnosticMessage extends + public static final class DiagnosticResponse extends com.google.protobuf.GeneratedMessage - implements DiagnosticMessageOrBuilder { - // Use DiagnosticMessage.newBuilder() to construct. - private DiagnosticMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements DiagnosticResponseOrBuilder { + // Use DiagnosticResponse.newBuilder() to construct. + private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private DiagnosticMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final DiagnosticMessage defaultInstance; - public static DiagnosticMessage getDefaultInstance() { + private static final DiagnosticResponse defaultInstance; + public static DiagnosticResponse getDefaultInstance() { return defaultInstance; } - public DiagnosticMessage getDefaultInstanceForType() { + public DiagnosticResponse getDefaultInstanceForType() { return defaultInstance; } @@ -1762,7 +3537,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private DiagnosticMessage( + private DiagnosticResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1839,28 +3614,28 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class); + com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DiagnosticMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnosticMessage(input, extensionRegistry); + return new DiagnosticResponse(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @@ -2102,53 +3877,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom( + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2157,7 +3932,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2169,24 +3944,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.DiagnosticMessage} + * Protobuf type {@code openxc.DiagnosticResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DiagnosticMessageOrBuilder { + implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class); + com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); } - // Construct using com.openxc.BinaryMessages.DiagnosticMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2231,23 +4006,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - public com.openxc.BinaryMessages.DiagnosticMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() { + return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); } - public com.openxc.BinaryMessages.DiagnosticMessage build() { - com.openxc.BinaryMessages.DiagnosticMessage result = buildPartial(); + public com.openxc.BinaryMessages.DiagnosticResponse build() { + com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.DiagnosticMessage buildPartial() { - com.openxc.BinaryMessages.DiagnosticMessage result = new com.openxc.BinaryMessages.DiagnosticMessage(this); + public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() { + com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2288,16 +4063,16 @@ public final class BinaryMessages { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.DiagnosticMessage) { - return mergeFrom((com.openxc.BinaryMessages.DiagnosticMessage)other); + if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) { + return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticMessage other) { - if (other == com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) { + if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } @@ -2334,11 +4109,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticMessage parsedMessage = null; + com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2636,15 +4411,15 @@ public final class BinaryMessages { return this; } - // @@protoc_insertion_point(builder_scope:openxc.DiagnosticMessage) + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse) } static { - defaultInstance = new DiagnosticMessage(true); + defaultInstance = new DiagnosticResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.DiagnosticMessage) + // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) } public interface TranslatedMessageOrBuilder @@ -3973,10 +5748,20 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_RawMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_DiagnosticMessage_descriptor; + internal_static_openxc_ControlCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_ControlCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_DiagnosticRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_DiagnosticRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_DiagnosticResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_DiagnosticMessage_fieldAccessorTable; + internal_static_openxc_DiagnosticResponse_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_TranslatedMessage_descriptor; private static @@ -3991,28 +5776,36 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\203\002\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\205\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\0225\n\022diagnostic_messa" + - "ge\030\004 \001(\0132\031.openxc.DiagnosticMessage\"/\n\004T" + - "ype\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022\016\n\nDIAGNOST" + - "IC\020\003\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessa" + - "ge_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\"\240\001\n\021Diagnostic" + - "Message\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r", - "\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005" + - " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + - "payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\265\002\n\021Transla" + - "tedMessage\022,\n\004type\030\001 \001(\0162\036.openxc.Transl" + - "atedMessage.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\rb" + - "oolean_value\030\005 \001(\010\022\024\n\014string_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\004B" + - "OOL\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\ncom.openxcB\016Bina" + - "ryMessages" + "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" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -4024,21 +5817,33 @@ 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", "DiagnosticMessage", }); + new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", }); internal_static_openxc_RawMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, new java.lang.String[] { "Bus", "MessageId", "Data", }); - internal_static_openxc_DiagnosticMessage_descriptor = + internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_openxc_DiagnosticMessage_fieldAccessorTable = new + internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticMessage_descriptor, + internal_static_openxc_ControlCommand_descriptor, + new java.lang.String[] { "Type", "DiagnosticRequest", }); + internal_static_openxc_DiagnosticRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + 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", "Factor", "Offset", "Frequency", }); + internal_static_openxc_DiagnosticResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticResponse_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(5); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 7600beef..017b0067 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\"\x83\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\x35\n\x12\x64iagnostic_message\x18\x04 \x01(\x0b\x32\x19.openxc.DiagnosticMessage\"/\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\"\xa0\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\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\"\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') @@ -38,8 +38,33 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=237, - serialized_end=284, + serialized_start=239, + serialized_end=286, +) + +_CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( + name='Type', + full_name='openxc.ControlCommand.Type', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='VERSION', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='DEVICE_ID', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='DIAGNOSTIC', index=2, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=466, + serialized_end=516, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -75,8 +100,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=728, - serialized_end=820, + serialized_start=1073, + serialized_end=1165, ) @@ -109,7 +134,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='diagnostic_message', full_name='openxc.VehicleMessage.diagnostic_message', index=3, + name='diagnostic_response', full_name='openxc.VehicleMessage.diagnostic_response', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -126,7 +151,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=284, + serialized_end=286, ) @@ -167,69 +192,189 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=286, - serialized_end=345, + serialized_start=288, + serialized_end=347, +) + + +_CONTROLCOMMAND = _descriptor.Descriptor( + name='ControlCommand', + full_name='openxc.ControlCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='openxc.ControlCommand.type', 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, + options=None), + _descriptor.FieldDescriptor( + name='diagnostic_request', full_name='openxc.ControlCommand.diagnostic_request', index=1, + number=2, 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=[ + ], + nested_types=[], + enum_types=[ + _CONTROLCOMMAND_TYPE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=350, + serialized_end=516, +) + + +_DIAGNOSTICREQUEST = _descriptor.Descriptor( + name='DiagnosticRequest', + full_name='openxc.DiagnosticRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.DiagnosticRequest.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='message_id', full_name='openxc.DiagnosticRequest.message_id', index=1, + number=2, type=13, cpp_type=3, 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='mode', full_name='openxc.DiagnosticRequest.mode', index=2, + number=3, type=13, cpp_type=3, 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='pid', full_name='openxc.DiagnosticRequest.pid', index=3, + number=4, type=13, cpp_type=3, 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='payload', full_name='openxc.DiagnosticRequest.payload', index=4, + number=5, 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), + _descriptor.FieldDescriptor( + name='parse_payload', full_name='openxc.DiagnosticRequest.parse_payload', 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='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='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='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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=519, + serialized_end=689, ) -_DIAGNOSTICMESSAGE = _descriptor.Descriptor( - name='DiagnosticMessage', - full_name='openxc.DiagnosticMessage', +_DIAGNOSTICRESPONSE = _descriptor.Descriptor( + name='DiagnosticResponse', + full_name='openxc.DiagnosticResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='bus', full_name='openxc.DiagnosticMessage.bus', index=0, + name='bus', full_name='openxc.DiagnosticResponse.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='message_id', full_name='openxc.DiagnosticMessage.message_id', index=1, + name='message_id', full_name='openxc.DiagnosticResponse.message_id', index=1, number=2, type=13, cpp_type=3, 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='mode', full_name='openxc.DiagnosticMessage.mode', index=2, + name='mode', full_name='openxc.DiagnosticResponse.mode', index=2, number=3, type=13, cpp_type=3, 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='pid', full_name='openxc.DiagnosticMessage.pid', index=3, + name='pid', full_name='openxc.DiagnosticResponse.pid', index=3, number=4, type=13, cpp_type=3, 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='success', full_name='openxc.DiagnosticMessage.success', index=4, + name='success', full_name='openxc.DiagnosticResponse.success', index=4, number=5, 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='negative_response_code', full_name='openxc.DiagnosticMessage.negative_response_code', index=5, + name='negative_response_code', full_name='openxc.DiagnosticResponse.negative_response_code', index=5, number=6, type=13, cpp_type=3, 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='payload', full_name='openxc.DiagnosticMessage.payload', index=6, + name='payload', full_name='openxc.DiagnosticResponse.payload', index=6, 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), _descriptor.FieldDescriptor( - name='value', full_name='openxc.DiagnosticMessage.value', index=7, + name='value', full_name='openxc.DiagnosticResponse.value', 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, @@ -244,8 +389,8 @@ _DIAGNOSTICMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=348, - serialized_end=508, + serialized_start=692, + serialized_end=853, ) @@ -322,20 +467,25 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=511, - serialized_end=820, + serialized_start=856, + serialized_end=1165, ) _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_message'].message_type = _DIAGNOSTICMESSAGE +_VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTICRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; +_CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE +_CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST +_CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE _TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE -DESCRIPTOR.message_types_by_name['DiagnosticMessage'] = _DIAGNOSTICMESSAGE +DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND +DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST +DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE class VehicleMessage(_message.Message): @@ -350,11 +500,23 @@ class RawMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.RawMessage) -class DiagnosticMessage(_message.Message): +class ControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _CONTROLCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.ControlCommand) + +class DiagnosticRequest(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DIAGNOSTICREQUEST + + # @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) + +class DiagnosticResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DIAGNOSTICMESSAGE + DESCRIPTOR = _DIAGNOSTICRESPONSE - # @@protoc_insertion_point(class_scope:openxc.DiagnosticMessage) + # @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) class TranslatedMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType diff --git a/openxc.options b/openxc.options index c1e4e01b..1f45bff7 100644 --- a/openxc.options +++ b/openxc.options @@ -1,5 +1,6 @@ openxc.TranslatedMessage.name max_size:100 openxc.TranslatedMessage.string_value max_size:100 openxc.TranslatedMessage.string_event max_size:100 -openxc.DiagnosticMessage.payload max_size:8 +openxc.DiagnosticResponse.payload max_size:8 +openxc.DiagnosticRequest.payload max_size:8 openxc.RawMessage.data max_size:8 diff --git a/openxc.proto b/openxc.proto index a562b49d..259bdfb4 100644 --- a/openxc.proto +++ b/openxc.proto @@ -9,7 +9,7 @@ message VehicleMessage { optional Type type = 1; optional RawMessage raw_message = 2; optional TranslatedMessage translated_message = 3; - optional DiagnosticMessage diagnostic_message = 4; + optional DiagnosticResponse diagnostic_response = 4; } message RawMessage { @@ -18,7 +18,28 @@ message RawMessage { optional bytes data = 3; } -message DiagnosticMessage { +message ControlCommand { + enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; } + + optional Type type = 1; + optional DiagnosticRequest diagnostic_request = 2; +} + +message DiagnosticRequest { + optional int32 bus = 1; + optional uint32 message_id = 2; + optional uint32 mode = 3; + optional uint32 pid = 4; + // 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 double factor = 7; + optional double offset = 8; + optional double frequency = 9; +} + +message DiagnosticResponse { optional int32 bus = 1; optional uint32 message_id = 2; optional uint32 mode = 3; -- cgit 1.2.3-korg From 5347f07163d737f6c6cfde9ad943c110b47e0963 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 4 Mar 2014 13:35:02 -0500 Subject: Move ControlCommand inside VehicleMessage so it can be on same stream. --- gen/cpp/openxc.pb | 10 +- gen/cpp/openxc.pb.c | 9 +- gen/cpp/openxc.pb.h | 12 +- gen/java/com/openxc/BinaryMessages.java | 257 ++++++++++++++++++++++++++++---- gen/python/openxc_pb2.py | 48 +++--- openxc.proto | 3 +- 6 files changed, 281 insertions(+), 58 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 { * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); + + // optional .openxc.ControlCommand control_command = 5; + /** + * optional .openxc.ControlCommand control_command = 5; + */ + boolean hasControlCommand(); + /** + * optional .openxc.ControlCommand control_command = 5; + */ + com.openxc.BinaryMessages.ControlCommand getControlCommand(); + /** + * optional .openxc.ControlCommand control_command = 5; + */ + 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 { * DIAGNOSTIC = 3; */ DIAGNOSTIC(2, 3), + /** + * CONTROL_COMMAND = 4; + */ + CONTROL_COMMAND(3, 4), ; /** @@ -234,6 +265,10 @@ public final class BinaryMessages { * DIAGNOSTIC = 3; */ public static final int DIAGNOSTIC_VALUE = 3; + /** + * CONTROL_COMMAND = 4; + */ + 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_; + /** + * optional .openxc.ControlCommand control_command = 5; + */ + public boolean hasControlCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + public com.openxc.BinaryMessages.ControlCommand getControlCommand() { + return controlCommand_; + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + 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_; + /** + * optional .openxc.ControlCommand control_command = 5; + */ + public boolean hasControlCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + public com.openxc.BinaryMessages.ControlCommand getControlCommand() { + if (controlCommandBuilder_ == null) { + return controlCommand_; + } else { + return controlCommandBuilder_.getMessage(); + } + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + 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; + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + 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; + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + 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; + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + public Builder clearControlCommand() { + if (controlCommandBuilder_ == null) { + controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + onChanged(); + } else { + controlCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getControlCommandFieldBuilder().getBuilder(); + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { + if (controlCommandBuilder_ != null) { + return controlCommandBuilder_.getMessageOrBuilder(); + } else { + return controlCommand_; + } + } + /** + * optional .openxc.ControlCommand control_command = 5; + */ + 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 diff --git a/openxc.proto b/openxc.proto index 259bdfb4..c6177de0 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,12 +4,13 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; } + enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; } optional Type type = 1; optional RawMessage raw_message = 2; optional TranslatedMessage translated_message = 3; optional DiagnosticResponse diagnostic_response = 4; + optional ControlCommand control_command = 5; } message RawMessage { -- cgit 1.2.3-korg From d12a24040584f3202ee9428bce56e5915954ffaf Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 4 Mar 2014 14:47:23 -0500 Subject: Remove duplicate generate files. --- gen/openxc.pb | 30 ------ gen/openxc.pb.c | 57 ----------- gen/openxc.pb.h | 100 ------------------ gen/openxc_pb2.py | 296 ------------------------------------------------------ 4 files changed, 483 deletions(-) delete mode 100644 gen/openxc.pb delete mode 100644 gen/openxc.pb.c delete mode 100644 gen/openxc.pb.h delete mode 100644 gen/openxc_pb2.py diff --git a/gen/openxc.pb b/gen/openxc.pb deleted file mode 100644 index e343eeb0..00000000 --- a/gen/openxc.pb +++ /dev/null @@ -1,30 +0,0 @@ - -Å - openxc.protoopenxc"Å -VehicleMessage) -type (2.openxc.VehicleMessage.Type' - raw_message ( 2.openxc.RawMessage7 -string_message ( 2.openxc.TranslatedStringMessage; -numerical_message ( 2 .openxc.TranslatedNumericMessage9 -boolean_message ( 2 .openxc.TranslatedBooleanMessage". -Type -RAW - -STRING -NUM -BOOL"; - -RawMessage -bus ( - -message_id (  -data ("6 -TranslatedStringMessage -name (  -value ( "7 -TranslatedNumericMessage -name (  -value ("7 -TranslatedBooleanMessage -name (  -value ( \ No newline at end of file diff --git a/gen/openxc.pb.c b/gen/openxc.pb.c deleted file mode 100644 index 19473b4d..00000000 --- a/gen/openxc.pb.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.4-dev at Tue Oct 1 16:50:34 2013. */ - -#include "openxc.pb.h" - - - -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, string_message, raw_message, &openxc_TranslatedStringMessage_fields), - PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, numerical_message, string_message, &openxc_TranslatedNumericMessage_fields), - PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, boolean_message, numerical_message, &openxc_TranslatedBooleanMessage_fields), - PB_LAST_FIELD -}; - -const pb_field_t openxc_RawMessage_fields[4] = { - PB_FIELD2( 1, INT32 , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0), - PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD2( 3, SINT64 , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_TranslatedStringMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedStringMessage, name, name, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC, OTHER, openxc_TranslatedStringMessage, value, name, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_TranslatedNumericMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedNumericMessage, name, name, 0), - PB_FIELD2( 2, DOUBLE , OPTIONAL, STATIC, OTHER, openxc_TranslatedNumericMessage, value, name, 0), - PB_LAST_FIELD -}; - -const pb_field_t openxc_TranslatedBooleanMessage_fields[3] = { - PB_FIELD2( 1, STRING , OPTIONAL, STATIC, FIRST, openxc_TranslatedBooleanMessage, name, name, 0), - PB_FIELD2( 2, BOOL , OPTIONAL, STATIC, OTHER, openxc_TranslatedBooleanMessage, value, name, 0), - PB_LAST_FIELD -}; - - -/* 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, string_message) < 256 && pb_membersize(openxc_VehicleMessage, numerical_message) < 256 && pb_membersize(openxc_VehicleMessage, boolean_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) -#endif - -#if !defined(PB_FIELD_32BIT) -STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, string_message) < 65536 && pb_membersize(openxc_VehicleMessage, numerical_message) < 65536 && pb_membersize(openxc_VehicleMessage, boolean_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage) -#endif - -/* On some platforms (such as AVR), double is really float. - * These are not directly supported by nanopb, but see example_avr_double. - * To get rid of this error, remove any double fields from your .proto. - */ -STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) - diff --git a/gen/openxc.pb.h b/gen/openxc.pb.h deleted file mode 100644 index 4923dcc0..00000000 --- a/gen/openxc.pb.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.2.4-dev at Tue Oct 1 16:50:34 2013. */ - -#ifndef _PB_OPENXC_PB_H_ -#define _PB_OPENXC_PB_H_ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Enum definitions */ -typedef enum _openxc_VehicleMessage_Type { - openxc_VehicleMessage_Type_RAW = 1, - openxc_VehicleMessage_Type_STRING = 2, - openxc_VehicleMessage_Type_NUM = 3, - openxc_VehicleMessage_Type_BOOL = 4 -} openxc_VehicleMessage_Type; - -/* Struct definitions */ -typedef struct _openxc_RawMessage { - bool has_bus; - int32_t bus; - bool has_message_id; - uint32_t message_id; - bool has_data; - int64_t data; -} openxc_RawMessage; - -typedef struct _openxc_TranslatedBooleanMessage { - bool has_name; - char name[100]; - bool has_value; - bool value; -} openxc_TranslatedBooleanMessage; - -typedef struct _openxc_TranslatedNumericMessage { - bool has_name; - char name[100]; - bool has_value; - double value; -} openxc_TranslatedNumericMessage; - -typedef struct _openxc_TranslatedStringMessage { - bool has_name; - char name[100]; - bool has_value; - char value[100]; -} openxc_TranslatedStringMessage; - -typedef struct _openxc_VehicleMessage { - bool has_type; - openxc_VehicleMessage_Type type; - bool has_raw_message; - openxc_RawMessage raw_message; - bool has_string_message; - openxc_TranslatedStringMessage string_message; - bool has_numerical_message; - openxc_TranslatedNumericMessage numerical_message; - bool has_boolean_message; - openxc_TranslatedBooleanMessage boolean_message; -} openxc_VehicleMessage; - -/* Default values for struct fields */ - -/* Field tags (for use in manual encoding/decoding) */ -#define openxc_RawMessage_bus_tag 1 -#define openxc_RawMessage_message_id_tag 2 -#define openxc_RawMessage_data_tag 3 -#define openxc_TranslatedBooleanMessage_name_tag 1 -#define openxc_TranslatedBooleanMessage_value_tag 2 -#define openxc_TranslatedNumericMessage_name_tag 1 -#define openxc_TranslatedNumericMessage_value_tag 2 -#define openxc_TranslatedStringMessage_name_tag 1 -#define openxc_TranslatedStringMessage_value_tag 2 -#define openxc_VehicleMessage_type_tag 1 -#define openxc_VehicleMessage_raw_message_tag 2 -#define openxc_VehicleMessage_string_message_tag 3 -#define openxc_VehicleMessage_numerical_message_tag 4 -#define openxc_VehicleMessage_boolean_message_tag 5 - -/* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[6]; -extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_TranslatedStringMessage_fields[3]; -extern const pb_field_t openxc_TranslatedNumericMessage_fields[3]; -extern const pb_field_t openxc_TranslatedBooleanMessage_fields[3]; - -/* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 457 -#define openxc_RawMessage_size 23 -#define openxc_TranslatedStringMessage_size 204 -#define openxc_TranslatedNumericMessage_size 111 -#define openxc_TranslatedBooleanMessage_size 104 - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/gen/openxc_pb2.py b/gen/openxc_pb2.py deleted file mode 100644 index ad379eb3..00000000 --- a/gen/openxc_pb2.py +++ /dev/null @@ -1,296 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: openxc.proto - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import descriptor_pb2 -# @@protoc_insertion_point(imports) - - - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='openxc.proto', - package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\xc5\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\x37\n\x0estring_message\x18\x03 \x01(\x0b\x32\x1f.openxc.TranslatedStringMessage\x12;\n\x11numerical_message\x18\x04 \x01(\x0b\x32 .openxc.TranslatedNumericMessage\x12\x39\n\x0f\x62oolean_message\x18\x05 \x01(\x0b\x32 .openxc.TranslatedBooleanMessage\".\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x07\n\x03NUM\x10\x03\x12\x08\n\x04\x42OOL\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(\x12\"6\n\x17TranslatedStringMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"7\n\x18TranslatedNumericMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01\"7\n\x18TranslatedBooleanMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08') - - - -_VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( - name='Type', - full_name='openxc.VehicleMessage.Type', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='RAW', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='STRING', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NUM', index=2, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BOOL', index=3, number=4, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=304, - serialized_end=350, -) - - -_VEHICLEMESSAGE = _descriptor.Descriptor( - name='VehicleMessage', - full_name='openxc.VehicleMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='type', full_name='openxc.VehicleMessage.type', 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, - options=None), - _descriptor.FieldDescriptor( - name='raw_message', full_name='openxc.VehicleMessage.raw_message', index=1, - number=2, 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), - _descriptor.FieldDescriptor( - name='string_message', full_name='openxc.VehicleMessage.string_message', index=2, - number=3, 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), - _descriptor.FieldDescriptor( - name='numerical_message', full_name='openxc.VehicleMessage.numerical_message', index=3, - number=4, 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), - _descriptor.FieldDescriptor( - name='boolean_message', full_name='openxc.VehicleMessage.boolean_message', 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=[ - ], - nested_types=[], - enum_types=[ - _VEHICLEMESSAGE_TYPE, - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=25, - serialized_end=350, -) - - -_RAWMESSAGE = _descriptor.Descriptor( - name='RawMessage', - full_name='openxc.RawMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='bus', full_name='openxc.RawMessage.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='message_id', full_name='openxc.RawMessage.message_id', index=1, - number=2, type=13, cpp_type=3, 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='data', full_name='openxc.RawMessage.data', index=2, - number=3, type=18, cpp_type=2, 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), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=352, - serialized_end=411, -) - - -_TRANSLATEDSTRINGMESSAGE = _descriptor.Descriptor( - name='TranslatedStringMessage', - full_name='openxc.TranslatedStringMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedStringMessage.name', index=0, - number=1, 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, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='openxc.TranslatedStringMessage.value', index=1, - number=2, 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, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=413, - serialized_end=467, -) - - -_TRANSLATEDNUMERICMESSAGE = _descriptor.Descriptor( - name='TranslatedNumericMessage', - full_name='openxc.TranslatedNumericMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedNumericMessage.name', index=0, - number=1, 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, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='openxc.TranslatedNumericMessage.value', index=1, - number=2, 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), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=469, - serialized_end=524, -) - - -_TRANSLATEDBOOLEANMESSAGE = _descriptor.Descriptor( - name='TranslatedBooleanMessage', - full_name='openxc.TranslatedBooleanMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedBooleanMessage.name', index=0, - number=1, 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, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='openxc.TranslatedBooleanMessage.value', index=1, - number=2, 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), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - serialized_start=526, - serialized_end=581, -) - -_VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE -_VEHICLEMESSAGE.fields_by_name['raw_message'].message_type = _RAWMESSAGE -_VEHICLEMESSAGE.fields_by_name['string_message'].message_type = _TRANSLATEDSTRINGMESSAGE -_VEHICLEMESSAGE.fields_by_name['numerical_message'].message_type = _TRANSLATEDNUMERICMESSAGE -_VEHICLEMESSAGE.fields_by_name['boolean_message'].message_type = _TRANSLATEDBOOLEANMESSAGE -_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; -DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE -DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE -DESCRIPTOR.message_types_by_name['TranslatedStringMessage'] = _TRANSLATEDSTRINGMESSAGE -DESCRIPTOR.message_types_by_name['TranslatedNumericMessage'] = _TRANSLATEDNUMERICMESSAGE -DESCRIPTOR.message_types_by_name['TranslatedBooleanMessage'] = _TRANSLATEDBOOLEANMESSAGE - -class VehicleMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _VEHICLEMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) - -class RawMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _RAWMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.RawMessage) - -class TranslatedStringMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDSTRINGMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.TranslatedStringMessage) - -class TranslatedNumericMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDNUMERICMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.TranslatedNumericMessage) - -class TranslatedBooleanMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDBOOLEANMESSAGE - - # @@protoc_insertion_point(class_scope:openxc.TranslatedBooleanMessage) - - -# @@protoc_insertion_point(module_scope) -- cgit 1.2.3-korg From 3e91f2023d1161432605aff4af6616a589e63b5c Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 4 Mar 2014 15:28:14 -0500 Subject: Condense string/number/bool trio into a field. --- gen/cpp/openxc.pb | 25 +- gen/cpp/openxc.pb.c | 24 +- gen/cpp/openxc.pb.h | 73 +- gen/java/com/openxc/BinaryMessages.java | 1608 +++++++++++++++++++++---------- gen/python/openxc_pb2.py | 112 ++- openxc.options | 3 +- openxc.proto | 19 +- 7 files changed, 1261 insertions(+), 603 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 50591abc..ada75a1f 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,6 @@ -ñ +Ø + openxc.protoopenxc"Ë VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -48,16 +49,22 @@ message_id (  success ( negative_response_code (  payload (  -value ("µ +value ("¢ + DynamicField' +type (2.openxc.DynamicField.Type + string_value (  + numeric_value ( + boolean_value ("% +Type + +STRING +NUM +BOOL"÷ TranslatedMessage, type (2.openxc.TranslatedMessage.Type -name (  - string_value (  - numeric_value ( - boolean_value ( - string_event (  - numeric_event ( - boolean_event ("\ +name ( # +value ( 2.openxc.DynamicField# +event ( 2.openxc.DynamicField"\ Type STRING diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 4f1fa5a3..72f1ce6a 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 Tue Mar 4 12:52:45 2014. */ +/* Generated by nanopb-0.2.5 at Tue Mar 4 15:25:22 2014. */ #include "openxc.pb.h" @@ -52,26 +52,30 @@ const pb_field_t openxc_DiagnosticResponse_fields[9] = { PB_LAST_FIELD }; -const pb_field_t openxc_TranslatedMessage_fields[9] = { +const pb_field_t openxc_DynamicField_fields[5] = { + PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_DynamicField, type, type, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_DynamicField, string_value, type, 0), + PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DynamicField, numeric_value, string_value, 0), + PB_FIELD2( 4, BOOL , OPTIONAL, STATIC , OTHER, openxc_DynamicField, boolean_value, numeric_value, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_TranslatedMessage_fields[5] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_TranslatedMessage, type, type, 0), PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, name, type, 0), - PB_FIELD2( 3, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, string_value, name, 0), - PB_FIELD2( 4, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, numeric_value, string_value, 0), - PB_FIELD2( 5, BOOL , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, boolean_value, numeric_value, 0), - PB_FIELD2( 6, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0), - PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, numeric_event, string_event, 0), - PB_FIELD2( 8, BOOL , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, boolean_event, numeric_event, 0), + PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, value, name, &openxc_DynamicField_fields), + PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, event, value, &openxc_DynamicField_fields), PB_LAST_FIELD }; /* 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_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) +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 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_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) +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 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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 3363d474..e9c01935 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 Tue Mar 4 12:52:45 2014. */ +/* Generated by nanopb-0.2.5 at Tue Mar 4 15:25:22 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -23,6 +23,12 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3 } openxc_ControlCommand_Type; +typedef enum _openxc_DynamicField_Type { + openxc_DynamicField_Type_STRING = 1, + openxc_DynamicField_Type_NUM = 2, + openxc_DynamicField_Type_BOOL = 3 +} openxc_DynamicField_Type; + typedef enum _openxc_TranslatedMessage_Type { openxc_TranslatedMessage_Type_STRING = 1, openxc_TranslatedMessage_Type_NUM = 2, @@ -83,6 +89,17 @@ typedef struct _openxc_DiagnosticResponse { double value; } openxc_DiagnosticResponse; +typedef struct _openxc_DynamicField { + bool has_type; + openxc_DynamicField_Type type; + bool has_string_value; + char string_value[100]; + bool has_numeric_value; + double numeric_value; + bool has_boolean_value; + bool boolean_value; +} openxc_DynamicField; + typedef struct { size_t size; uint8_t bytes[8]; @@ -97,25 +114,6 @@ typedef struct _openxc_RawMessage { openxc_RawMessage_data_t data; } openxc_RawMessage; -typedef struct _openxc_TranslatedMessage { - bool has_type; - openxc_TranslatedMessage_Type type; - bool has_name; - char name[100]; - bool has_string_value; - char string_value[100]; - bool has_numeric_value; - double numeric_value; - bool has_boolean_value; - bool boolean_value; - bool has_string_event; - char string_event[100]; - bool has_numeric_event; - double numeric_event; - bool has_boolean_event; - bool boolean_event; -} openxc_TranslatedMessage; - typedef struct _openxc_ControlCommand { bool has_type; openxc_ControlCommand_Type type; @@ -123,6 +121,17 @@ typedef struct _openxc_ControlCommand { openxc_DiagnosticRequest diagnostic_request; } openxc_ControlCommand; +typedef struct _openxc_TranslatedMessage { + bool has_type; + openxc_TranslatedMessage_Type type; + bool has_name; + char name[100]; + bool has_value; + openxc_DynamicField value; + bool has_event; + openxc_DynamicField event; +} openxc_TranslatedMessage; + typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; @@ -156,19 +165,19 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticResponse_negative_response_code_tag 6 #define openxc_DiagnosticResponse_payload_tag 7 #define openxc_DiagnosticResponse_value_tag 8 +#define openxc_DynamicField_type_tag 1 +#define openxc_DynamicField_string_value_tag 2 +#define openxc_DynamicField_numeric_value_tag 3 +#define openxc_DynamicField_boolean_value_tag 4 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 -#define openxc_TranslatedMessage_type_tag 1 -#define openxc_TranslatedMessage_name_tag 2 -#define openxc_TranslatedMessage_string_value_tag 3 -#define openxc_TranslatedMessage_numeric_value_tag 4 -#define openxc_TranslatedMessage_boolean_value_tag 5 -#define openxc_TranslatedMessage_string_event_tag 6 -#define openxc_TranslatedMessage_numeric_event_tag 7 -#define openxc_TranslatedMessage_boolean_event_tag 8 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 +#define openxc_TranslatedMessage_type_tag 1 +#define openxc_TranslatedMessage_name_tag 2 +#define openxc_TranslatedMessage_value_tag 3 +#define openxc_TranslatedMessage_event_tag 4 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -181,15 +190,17 @@ 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]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; -extern const pb_field_t openxc_TranslatedMessage_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 508 +#define openxc_VehicleMessage_size 524 #define openxc_RawMessage_size 27 #define openxc_ControlCommand_size 76 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 -#define openxc_TranslatedMessage_size 334 +#define openxc_DynamicField_size 119 +#define openxc_TranslatedMessage_size 350 #ifdef __cplusplus } /* extern "C" */ diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index dc44febc..28322449 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -4623,6 +4623,820 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) } + public interface DynamicFieldOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.DynamicField.Type type = 1; + /** + * optional .openxc.DynamicField.Type type = 1; + */ + boolean hasType(); + /** + * optional .openxc.DynamicField.Type type = 1; + */ + com.openxc.BinaryMessages.DynamicField.Type getType(); + + // optional string string_value = 2; + /** + * optional string string_value = 2; + */ + boolean hasStringValue(); + /** + * optional string string_value = 2; + */ + java.lang.String getStringValue(); + /** + * optional string string_value = 2; + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + // optional double numeric_value = 3; + /** + * optional double numeric_value = 3; + */ + boolean hasNumericValue(); + /** + * optional double numeric_value = 3; + */ + double getNumericValue(); + + // optional bool boolean_value = 4; + /** + * optional bool boolean_value = 4; + */ + boolean hasBooleanValue(); + /** + * optional bool boolean_value = 4; + */ + boolean getBooleanValue(); + } + /** + * Protobuf type {@code openxc.DynamicField} + */ + public static final class DynamicField extends + com.google.protobuf.GeneratedMessage + implements DynamicFieldOrBuilder { + // Use DynamicField.newBuilder() to construct. + private DynamicField(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final DynamicField defaultInstance; + public static DynamicField getDefaultInstance() { + return defaultInstance; + } + + public DynamicField getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DynamicField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + stringValue_ = input.readBytes(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + numericValue_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + booleanValue_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DynamicField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DynamicField(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.DynamicField.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STRING = 1; + */ + STRING(0, 1), + /** + * NUM = 2; + */ + NUM(1, 2), + /** + * BOOL = 3; + */ + BOOL(2, 3), + ; + + /** + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + /** + * NUM = 2; + */ + public static final int NUM_VALUE = 2; + /** + * BOOL = 3; + */ + public static final int BOOL_VALUE = 3; + + + public final int getNumber() { return value; } + + public static Type valueOf(int value) { + switch (value) { + case 1: return STRING; + case 2: return NUM; + case 3: return BOOL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type) + } + + private int bitField0_; + // optional .openxc.DynamicField.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.DynamicField.Type type_; + /** + * optional .openxc.DynamicField.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DynamicField.Type type = 1; + */ + public com.openxc.BinaryMessages.DynamicField.Type getType() { + return type_; + } + + // optional string string_value = 2; + public static final int STRING_VALUE_FIELD_NUMBER = 2; + private java.lang.Object stringValue_; + /** + * optional string string_value = 2; + */ + public boolean hasStringValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string string_value = 2; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringValue_ = s; + } + return s; + } + } + /** + * optional string string_value = 2; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional double numeric_value = 3; + public static final int NUMERIC_VALUE_FIELD_NUMBER = 3; + private double numericValue_; + /** + * optional double numeric_value = 3; + */ + public boolean hasNumericValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional double numeric_value = 3; + */ + public double getNumericValue() { + return numericValue_; + } + + // optional bool boolean_value = 4; + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; + private boolean booleanValue_; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; + } + + private void initFields() { + type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; + stringValue_ = ""; + numericValue_ = 0D; + booleanValue_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getStringValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, numericValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, booleanValue_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getStringValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, numericValue_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, booleanValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.DynamicField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DynamicField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DynamicField parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DynamicField parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DynamicField parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DynamicField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.DynamicField} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DynamicFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; + bitField0_ = (bitField0_ & ~0x00000001); + stringValue_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + numericValue_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + booleanValue_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; + } + + public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() { + return com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.DynamicField build() { + com.openxc.BinaryMessages.DynamicField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.DynamicField buildPartial() { + com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.stringValue_ = stringValue_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.numericValue_ = numericValue_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.booleanValue_ = booleanValue_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.DynamicField) { + return mergeFrom((com.openxc.BinaryMessages.DynamicField)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) { + if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasStringValue()) { + bitField0_ |= 0x00000002; + stringValue_ = other.stringValue_; + onChanged(); + } + if (other.hasNumericValue()) { + setNumericValue(other.getNumericValue()); + } + if (other.hasBooleanValue()) { + setBooleanValue(other.getBooleanValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.DynamicField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.DynamicField.Type type = 1; + private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; + /** + * optional .openxc.DynamicField.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DynamicField.Type type = 1; + */ + public com.openxc.BinaryMessages.DynamicField.Type getType() { + return type_; + } + /** + * optional .openxc.DynamicField.Type type = 1; + */ + public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DynamicField.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; + onChanged(); + return this; + } + + // optional string string_value = 2; + private java.lang.Object stringValue_ = ""; + /** + * optional string string_value = 2; + */ + public boolean hasStringValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string string_value = 2; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stringValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string string_value = 2; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string string_value = 2; + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + stringValue_ = value; + onChanged(); + return this; + } + /** + * optional string string_value = 2; + */ + public Builder clearStringValue() { + bitField0_ = (bitField0_ & ~0x00000002); + stringValue_ = getDefaultInstance().getStringValue(); + onChanged(); + return this; + } + /** + * optional string string_value = 2; + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + stringValue_ = value; + onChanged(); + return this; + } + + // optional double numeric_value = 3; + private double numericValue_ ; + /** + * optional double numeric_value = 3; + */ + public boolean hasNumericValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional double numeric_value = 3; + */ + public double getNumericValue() { + return numericValue_; + } + /** + * optional double numeric_value = 3; + */ + public Builder setNumericValue(double value) { + bitField0_ |= 0x00000004; + numericValue_ = value; + onChanged(); + return this; + } + /** + * optional double numeric_value = 3; + */ + public Builder clearNumericValue() { + bitField0_ = (bitField0_ & ~0x00000004); + numericValue_ = 0D; + onChanged(); + return this; + } + + // optional bool boolean_value = 4; + private boolean booleanValue_ ; + /** + * optional bool boolean_value = 4; + */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool boolean_value = 4; + */ + public boolean getBooleanValue() { + return booleanValue_; + } + /** + * optional bool boolean_value = 4; + */ + public Builder setBooleanValue(boolean value) { + bitField0_ |= 0x00000008; + booleanValue_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_value = 4; + */ + public Builder clearBooleanValue() { + bitField0_ = (bitField0_ & ~0x00000008); + booleanValue_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.DynamicField) + } + + static { + defaultInstance = new DynamicField(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.DynamicField) + } + public interface TranslatedMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -4651,75 +5465,33 @@ public final class BinaryMessages { com.google.protobuf.ByteString getNameBytes(); - // optional string string_value = 3; - /** - * optional string string_value = 3; - */ - boolean hasStringValue(); - /** - * optional string string_value = 3; - */ - java.lang.String getStringValue(); - /** - * optional string string_value = 3; - */ - com.google.protobuf.ByteString - getStringValueBytes(); - - // optional double numeric_value = 4; - /** - * optional double numeric_value = 4; - */ - boolean hasNumericValue(); - /** - * optional double numeric_value = 4; - */ - double getNumericValue(); - - // optional bool boolean_value = 5; - /** - * optional bool boolean_value = 5; - */ - boolean hasBooleanValue(); - /** - * optional bool boolean_value = 5; - */ - boolean getBooleanValue(); - - // optional string string_event = 6; + // optional .openxc.DynamicField value = 3; /** - * optional string string_event = 6; + * optional .openxc.DynamicField value = 3; */ - boolean hasStringEvent(); + boolean hasValue(); /** - * optional string string_event = 6; + * optional .openxc.DynamicField value = 3; */ - java.lang.String getStringEvent(); + com.openxc.BinaryMessages.DynamicField getValue(); /** - * optional string string_event = 6; + * optional .openxc.DynamicField value = 3; */ - com.google.protobuf.ByteString - getStringEventBytes(); + com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - // optional double numeric_event = 7; - /** - * optional double numeric_event = 7; - */ - boolean hasNumericEvent(); + // optional .openxc.DynamicField event = 4; /** - * optional double numeric_event = 7; + * optional .openxc.DynamicField event = 4; */ - double getNumericEvent(); - - // optional bool boolean_event = 8; + boolean hasEvent(); /** - * optional bool boolean_event = 8; + * optional .openxc.DynamicField event = 4; */ - boolean hasBooleanEvent(); + com.openxc.BinaryMessages.DynamicField getEvent(); /** - * optional bool boolean_event = 8; + * optional .openxc.DynamicField event = 4; */ - boolean getBooleanEvent(); + com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } /** * Protobuf type {@code openxc.TranslatedMessage} @@ -4789,33 +5561,29 @@ public final class BinaryMessages { break; } case 26: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } bitField0_ |= 0x00000004; - stringValue_ = input.readBytes(); break; } - case 33: { + case 34: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = event_.toBuilder(); + } + event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(event_); + event_ = subBuilder.buildPartial(); + } bitField0_ |= 0x00000008; - numericValue_ = input.readDouble(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - booleanValue_ = input.readBool(); - break; - } - case 50: { - bitField0_ |= 0x00000020; - stringEvent_ = input.readBytes(); - break; - } - case 57: { - bitField0_ |= 0x00000040; - numericEvent_ = input.readDouble(); - break; - } - case 64: { - bitField0_ |= 0x00000080; - booleanEvent_ = input.readBool(); break; } } @@ -5035,165 +5803,55 @@ public final class BinaryMessages { } } - // optional string string_value = 3; - public static final int STRING_VALUE_FIELD_NUMBER = 3; - private java.lang.Object stringValue_; + // optional .openxc.DynamicField value = 3; + public static final int VALUE_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.DynamicField value_; /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public boolean hasStringValue() { + public boolean hasValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stringValue_ = s; - } - return s; - } + public com.openxc.BinaryMessages.DynamicField getValue() { + return value_; } /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { + return value_; } - // optional double numeric_value = 4; - public static final int NUMERIC_VALUE_FIELD_NUMBER = 4; - private double numericValue_; + // optional .openxc.DynamicField event = 4; + public static final int EVENT_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.DynamicField event_; /** - * optional double numeric_value = 4; + * optional .openxc.DynamicField event = 4; */ - public boolean hasNumericValue() { + public boolean hasEvent() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional double numeric_value = 4; - */ - public double getNumericValue() { - return numericValue_; - } - - // optional bool boolean_value = 5; - public static final int BOOLEAN_VALUE_FIELD_NUMBER = 5; - private boolean booleanValue_; - /** - * optional bool boolean_value = 5; - */ - public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional bool boolean_value = 5; - */ - public boolean getBooleanValue() { - return booleanValue_; - } - - // optional string string_event = 6; - public static final int STRING_EVENT_FIELD_NUMBER = 6; - private java.lang.Object stringEvent_; - /** - * optional string string_event = 6; - */ - public boolean hasStringEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional string string_event = 6; - */ - public java.lang.String getStringEvent() { - java.lang.Object ref = stringEvent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stringEvent_ = s; - } - return s; - } - } - /** - * optional string string_event = 6; - */ - public com.google.protobuf.ByteString - getStringEventBytes() { - java.lang.Object ref = stringEvent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringEvent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional double numeric_event = 7; - public static final int NUMERIC_EVENT_FIELD_NUMBER = 7; - private double numericEvent_; - /** - * optional double numeric_event = 7; - */ - public boolean hasNumericEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional double numeric_event = 7; - */ - public double getNumericEvent() { - return numericEvent_; - } - - // optional bool boolean_event = 8; - public static final int BOOLEAN_EVENT_FIELD_NUMBER = 8; - private boolean booleanEvent_; - /** - * optional bool boolean_event = 8; + * optional .openxc.DynamicField event = 4; */ - public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public com.openxc.BinaryMessages.DynamicField getEvent() { + return event_; } /** - * optional bool boolean_event = 8; + * optional .openxc.DynamicField event = 4; */ - public boolean getBooleanEvent() { - return booleanEvent_; + public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { + return event_; } private void initFields() { type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; name_ = ""; - stringValue_ = ""; - numericValue_ = 0D; - booleanValue_ = false; - stringEvent_ = ""; - numericEvent_ = 0D; - booleanEvent_ = false; + value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -5214,22 +5872,10 @@ public final class BinaryMessages { output.writeBytes(2, getNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getStringValueBytes()); + output.writeMessage(3, value_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeDouble(4, numericValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBool(5, booleanValue_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(6, getStringEventBytes()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeDouble(7, numericEvent_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBool(8, booleanEvent_); + output.writeMessage(4, event_); } getUnknownFields().writeTo(output); } @@ -5238,39 +5884,23 @@ public final class BinaryMessages { public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getStringValueBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(4, numericValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, booleanValue_); + .computeEnumSize(1, type_.getNumber()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getStringEventBytes()); + .computeBytesSize(2, getNameBytes()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(7, numericEvent_); + .computeMessageSize(3, value_); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, booleanEvent_); + .computeMessageSize(4, event_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -5380,6 +6010,8 @@ public final class BinaryMessages { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getValueFieldBuilder(); + getEventFieldBuilder(); } } private static Builder create() { @@ -5392,18 +6024,18 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); name_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - stringValue_ = ""; + if (valueBuilder_ == null) { + value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + } else { + valueBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000004); - numericValue_ = 0D; + if (eventBuilder_ == null) { + event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + } else { + eventBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000008); - booleanValue_ = false; - bitField0_ = (bitField0_ & ~0x00000010); - stringEvent_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - numericEvent_ = 0D; - bitField0_ = (bitField0_ & ~0x00000040); - booleanEvent_ = false; - bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -5443,27 +6075,19 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.stringValue_ = stringValue_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.numericValue_ = numericValue_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.booleanValue_ = booleanValue_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.stringEvent_ = stringEvent_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.numericEvent_ = numericEvent_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; + if (eventBuilder_ == null) { + result.event_ = event_; + } else { + result.event_ = eventBuilder_.build(); } - result.booleanEvent_ = booleanEvent_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -5488,27 +6112,11 @@ public final class BinaryMessages { name_ = other.name_; onChanged(); } - if (other.hasStringValue()) { - bitField0_ |= 0x00000004; - stringValue_ = other.stringValue_; - onChanged(); - } - if (other.hasNumericValue()) { - setNumericValue(other.getNumericValue()); - } - if (other.hasBooleanValue()) { - setBooleanValue(other.getBooleanValue()); - } - if (other.hasStringEvent()) { - bitField0_ |= 0x00000020; - stringEvent_ = other.stringEvent_; - onChanged(); - } - if (other.hasNumericEvent()) { - setNumericEvent(other.getNumericEvent()); + if (other.hasValue()) { + mergeValue(other.getValue()); } - if (other.hasBooleanEvent()) { - setBooleanEvent(other.getBooleanEvent()); + if (other.hasEvent()) { + mergeEvent(other.getEvent()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -5647,284 +6255,238 @@ public final class BinaryMessages { return this; } - // optional string string_value = 3; - private java.lang.Object stringValue_ = ""; + // optional .openxc.DynamicField value = 3; + private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_; /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public boolean hasStringValue() { + public boolean hasValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - stringValue_ = s; - return s; + public com.openxc.BinaryMessages.DynamicField getValue() { + if (valueBuilder_ == null) { + return value_; } else { - return (java.lang.String) ref; + return valueBuilder_.getMessage(); } } /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringValue_ = b; - return b; + public Builder setValue(com.openxc.BinaryMessages.DynamicField value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + valueBuilder_.setMessage(value); } - } - /** - * optional string string_value = 3; - */ - public Builder setStringValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - stringValue_ = value; - onChanged(); + bitField0_ |= 0x00000004; return this; } /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public Builder clearStringValue() { - bitField0_ = (bitField0_ & ~0x00000004); - stringValue_ = getDefaultInstance().getStringValue(); - onChanged(); + public Builder setValue( + com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; return this; } /** - * optional string string_value = 3; + * optional .openxc.DynamicField value = 3; */ - public Builder setStringValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - stringValue_ = value; - onChanged(); + public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + value_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) { + value_ = + com.openxc.BinaryMessages.DynamicField.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; return this; } - - // optional double numeric_value = 4; - private double numericValue_ ; - /** - * optional double numeric_value = 4; - */ - public boolean hasNumericValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } /** - * optional double numeric_value = 4; + * optional .openxc.DynamicField value = 3; */ - public double getNumericValue() { - return numericValue_; - } - /** - * optional double numeric_value = 4; - */ - public Builder setNumericValue(double value) { - bitField0_ |= 0x00000008; - numericValue_ = value; - onChanged(); + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + onChanged(); + } else { + valueBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional double numeric_value = 4; + * optional .openxc.DynamicField value = 3; */ - public Builder clearNumericValue() { - bitField0_ = (bitField0_ & ~0x00000008); - numericValue_ = 0D; + public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() { + bitField0_ |= 0x00000004; onChanged(); - return this; - } - - // optional bool boolean_value = 5; - private boolean booleanValue_ ; - /** - * optional bool boolean_value = 5; - */ - public boolean hasBooleanValue() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional bool boolean_value = 5; - */ - public boolean getBooleanValue() { - return booleanValue_; + return getValueFieldBuilder().getBuilder(); } /** - * optional bool boolean_value = 5; + * optional .openxc.DynamicField value = 3; */ - public Builder setBooleanValue(boolean value) { - bitField0_ |= 0x00000010; - booleanValue_ = value; - onChanged(); - return this; + public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_; + } } /** - * optional bool boolean_value = 5; + * optional .openxc.DynamicField value = 3; */ - public Builder clearBooleanValue() { - bitField0_ = (bitField0_ & ~0x00000010); - booleanValue_ = false; - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( + value_, + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; } - // optional string string_event = 6; - private java.lang.Object stringEvent_ = ""; + // optional .openxc.DynamicField event = 4; + private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_; /** - * optional string string_event = 6; + * optional .openxc.DynamicField event = 4; */ - public boolean hasStringEvent() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public boolean hasEvent() { + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string string_event = 6; + * optional .openxc.DynamicField event = 4; */ - public java.lang.String getStringEvent() { - java.lang.Object ref = stringEvent_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - stringEvent_ = s; - return s; + public com.openxc.BinaryMessages.DynamicField getEvent() { + if (eventBuilder_ == null) { + return event_; } else { - return (java.lang.String) ref; + return eventBuilder_.getMessage(); } } /** - * optional string string_event = 6; + * optional .openxc.DynamicField event = 4; */ - public com.google.protobuf.ByteString - getStringEventBytes() { - java.lang.Object ref = stringEvent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringEvent_ = b; - return b; + public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + eventBuilder_.setMessage(value); } - } - /** - * optional string string_event = 6; - */ - public Builder setStringEvent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - stringEvent_ = value; - onChanged(); + bitField0_ |= 0x00000008; return this; } /** - * optional string string_event = 6; + * optional .openxc.DynamicField event = 4; */ - public Builder clearStringEvent() { - bitField0_ = (bitField0_ & ~0x00000020); - stringEvent_ = getDefaultInstance().getStringEvent(); - onChanged(); + public Builder setEvent( + com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; return this; } /** - * optional string string_event = 6; + * optional .openxc.DynamicField event = 4; */ - public Builder setStringEventBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - stringEvent_ = value; - onChanged(); + public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) { + if (eventBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + event_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) { + event_ = + com.openxc.BinaryMessages.DynamicField.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; return this; } - - // optional double numeric_event = 7; - private double numericEvent_ ; - /** - * optional double numeric_event = 7; - */ - public boolean hasNumericEvent() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional double numeric_event = 7; - */ - public double getNumericEvent() { - return numericEvent_; - } /** - * optional double numeric_event = 7; + * optional .openxc.DynamicField event = 4; */ - public Builder setNumericEvent(double value) { - bitField0_ |= 0x00000040; - numericEvent_ = value; - onChanged(); + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); + onChanged(); + } else { + eventBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } /** - * optional double numeric_event = 7; + * optional .openxc.DynamicField event = 4; */ - public Builder clearNumericEvent() { - bitField0_ = (bitField0_ & ~0x00000040); - numericEvent_ = 0D; + public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() { + bitField0_ |= 0x00000008; onChanged(); - return this; - } - - // optional bool boolean_event = 8; - private boolean booleanEvent_ ; - /** - * optional bool boolean_event = 8; - */ - public boolean hasBooleanEvent() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional bool boolean_event = 8; - */ - public boolean getBooleanEvent() { - return booleanEvent_; + return getEventFieldBuilder().getBuilder(); } /** - * optional bool boolean_event = 8; + * optional .openxc.DynamicField event = 4; */ - public Builder setBooleanEvent(boolean value) { - bitField0_ |= 0x00000080; - booleanEvent_ = value; - onChanged(); - return this; + public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_; + } } /** - * optional bool boolean_event = 8; + * optional .openxc.DynamicField event = 4; */ - public Builder clearBooleanEvent() { - bitField0_ = (bitField0_ & ~0x00000080); - booleanEvent_ = false; - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> + getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( + event_, + getParentForChildren(), + isClean()); + event_ = null; + } + return eventBuilder_; } // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) @@ -5963,6 +6525,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_DynamicField_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_DynamicField_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_TranslatedMessage_descriptor; private static @@ -6000,15 +6567,18 @@ public final class BinaryMessages { "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" + "\001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.ope" + + "nxc.DynamicField.Type\022\024\n\014string_value\030\002 " + + "\001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_va" + + "lue\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\004" + + "name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.Dynam", + "icField\022#\n\005event\030\004 \001(\0132\024.openxc.DynamicF" + + "ield\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOO" + + "L\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\ncom.openxcB\016Binary" + + "Messages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -6045,12 +6615,18 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); - internal_static_openxc_TranslatedMessage_descriptor = + internal_static_openxc_DynamicField_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_openxc_DynamicField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DynamicField_descriptor, + new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); + internal_static_openxc_TranslatedMessage_descriptor = + getDescriptor().getMessageTypes().get(6); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, - new java.lang.String[] { "Type", "Name", "StringValue", "NumericValue", "BooleanValue", "StringEvent", "NumericEvent", "BooleanEvent", }); + new java.lang.String[] { "Type", "Name", "Value", "Event", }); return null; } }; diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index d1ea5cff..00caddbf 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\"\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') + 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\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -71,6 +71,31 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( serialized_end=586, ) +_DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( + name='Type', + full_name='openxc.DynamicField.Type', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='STRING', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NUM', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BOOL', index=2, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1051, + serialized_end=1088, +) + _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='openxc.TranslatedMessage.Type', @@ -104,8 +129,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1143, - serialized_end=1235, + serialized_start=1246, + serialized_end=1338, ) @@ -405,66 +430,88 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( ) -_TRANSLATEDMESSAGE = _descriptor.Descriptor( - name='TranslatedMessage', - full_name='openxc.TranslatedMessage', +_DYNAMICFIELD = _descriptor.Descriptor( + name='DynamicField', + full_name='openxc.DynamicField', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='type', full_name='openxc.TranslatedMessage.type', index=0, + name='type', full_name='openxc.DynamicField.type', 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, options=None), _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedMessage.name', index=1, + name='string_value', full_name='openxc.DynamicField.string_value', index=1, number=2, 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, options=None), _descriptor.FieldDescriptor( - name='string_value', full_name='openxc.TranslatedMessage.string_value', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + name='numeric_value', full_name='openxc.DynamicField.numeric_value', index=2, + number=3, 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='numeric_value', full_name='openxc.TranslatedMessage.numeric_value', index=3, - number=4, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + name='boolean_value', full_name='openxc.DynamicField.boolean_value', index=3, + number=4, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _DYNAMICFIELD_TYPE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=926, + serialized_end=1088, +) + + +_TRANSLATEDMESSAGE = _descriptor.Descriptor( + name='TranslatedMessage', + full_name='openxc.TranslatedMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ _descriptor.FieldDescriptor( - name='boolean_value', full_name='openxc.TranslatedMessage.boolean_value', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, + name='type', full_name='openxc.TranslatedMessage.type', 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, options=None), _descriptor.FieldDescriptor( - name='string_event', full_name='openxc.TranslatedMessage.string_event', index=5, - number=6, type=9, cpp_type=9, label=1, + name='name', full_name='openxc.TranslatedMessage.name', index=1, + number=2, 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, options=None), _descriptor.FieldDescriptor( - name='numeric_event', full_name='openxc.TranslatedMessage.numeric_event', index=6, - number=7, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + name='value', full_name='openxc.TranslatedMessage.value', index=2, + number=3, 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), _descriptor.FieldDescriptor( - name='boolean_event', full_name='openxc.TranslatedMessage.boolean_event', index=7, - number=8, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, + name='event', full_name='openxc.TranslatedMessage.event', index=3, + number=4, 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), @@ -478,8 +525,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=926, - serialized_end=1235, + serialized_start=1091, + serialized_end=1338, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -491,13 +538,18 @@ _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; +_DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE +_DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE +_TRANSLATEDMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD +_TRANSLATEDMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD _TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE +DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE class VehicleMessage(_message.Message): @@ -530,6 +582,12 @@ class DiagnosticResponse(_message.Message): # @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) +class DynamicField(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DYNAMICFIELD + + # @@protoc_insertion_point(class_scope:openxc.DynamicField) + class TranslatedMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _TRANSLATEDMESSAGE diff --git a/openxc.options b/openxc.options index 1f45bff7..92b8f5b7 100644 --- a/openxc.options +++ b/openxc.options @@ -1,6 +1,5 @@ openxc.TranslatedMessage.name max_size:100 -openxc.TranslatedMessage.string_value max_size:100 -openxc.TranslatedMessage.string_event max_size:100 +openxc.DynamicField.string_value max_size:100 openxc.DiagnosticResponse.payload max_size:8 openxc.DiagnosticRequest.payload max_size:8 openxc.RawMessage.data max_size:8 diff --git a/openxc.proto b/openxc.proto index c6177de0..27ea931f 100644 --- a/openxc.proto +++ b/openxc.proto @@ -53,20 +53,23 @@ message DiagnosticResponse { optional double value = 8; } +message DynamicField { + enum Type { STRING = 1; NUM = 2; BOOL = 3; } + + optional Type type = 1; + optional string string_value = 2; + optional double numeric_value = 3; + optional bool boolean_value = 4; +} + message TranslatedMessage { enum Type { STRING = 1; NUM = 2; BOOL = 3; EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} optional Type type = 1; optional string name = 2; - - optional string string_value = 3; - optional double numeric_value = 4; - optional bool boolean_value = 5; - - optional string string_event = 6; - optional double numeric_event = 7; - optional bool boolean_event = 8; + optional DynamicField value = 3; + optional DynamicField event = 4; } // TODO we should also consider having an enum type, having each specific -- cgit 1.2.3-korg From 99f01a6d6da8012c297e2e7ccb2b8eaa69a9c4d1 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 6 Mar 2014 17:01:46 -0500 Subject: Add CommandResponse type to VehicleMessage (from VI to host). --- gen/cpp/openxc.pb | 16 +- gen/cpp/openxc.pb.c | 15 +- gen/cpp/openxc.pb.h | 23 +- gen/java/com/openxc/BinaryMessages.java | 1156 ++++++++++++++++++++++++++----- gen/python/openxc_pb2.py | 99 ++- openxc.options | 1 + openxc.proto | 9 +- 7 files changed, 1092 insertions(+), 227 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index ada75a1f..929e6a2c 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,20 +1,21 @@ -Ø - - 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/ -control_command ( 2.openxc.ControlCommand"D +control_command ( 2.openxc.ControlCommand1 +command_response ( 2.openxc.CommandResponse"Z Type RAW TRANSLATED DIAGNOSTIC -CONTROL_COMMAND"; +CONTROL_COMMAND +COMMAND_RESPONSE"; RawMessage bus ( @@ -28,7 +29,10 @@ message_id (  VERSION DEVICE_ID -DIAGNOSTIC"ª +DIAGNOSTIC"M +CommandResponse) +type (2.openxc.ControlCommand.Type +message ( "ª DiagnosticRequest bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 72f1ce6a..b4cace32 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,16 +1,17 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.5 at Tue Mar 4 15:25:22 2014. */ +/* Generated by nanopb-0.2.5 at Thu Mar 6 16:21:37 2014. */ #include "openxc.pb.h" -const pb_field_t openxc_VehicleMessage_fields[6] = { +const pb_field_t openxc_VehicleMessage_fields[7] = { 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_FIELD2( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, command_response, control_command, &openxc_CommandResponse_fields), PB_LAST_FIELD }; @@ -27,6 +28,12 @@ const pb_field_t openxc_ControlCommand_fields[3] = { PB_LAST_FIELD }; +const pb_field_t openxc_CommandResponse_fields[3] = { + PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), + PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), + PB_LAST_FIELD +}; + const pb_field_t openxc_DiagnosticRequest_fields[10] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticRequest, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, message_id, bus, 0), @@ -71,11 +78,11 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { /* 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_VehicleMessage, control_command) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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 e9c01935..5db13577 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 Tue Mar 4 15:25:22 2014. */ +/* Generated by nanopb-0.2.5 at Thu Mar 6 16:21:37 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -14,7 +14,8 @@ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_RAW = 1, openxc_VehicleMessage_Type_TRANSLATED = 2, openxc_VehicleMessage_Type_DIAGNOSTIC = 3, - openxc_VehicleMessage_Type_CONTROL_COMMAND = 4 + openxc_VehicleMessage_Type_CONTROL_COMMAND = 4, + openxc_VehicleMessage_Type_COMMAND_RESPONSE = 5 } openxc_VehicleMessage_Type; typedef enum _openxc_ControlCommand_Type { @@ -39,6 +40,13 @@ typedef enum _openxc_TranslatedMessage_Type { } openxc_TranslatedMessage_Type; /* Struct definitions */ +typedef struct _openxc_CommandResponse { + bool has_type; + openxc_ControlCommand_Type type; + bool has_message; + char message[128]; +} openxc_CommandResponse; + typedef struct { size_t size; uint8_t bytes[8]; @@ -143,11 +151,15 @@ typedef struct _openxc_VehicleMessage { openxc_DiagnosticResponse diagnostic_response; bool has_control_command; openxc_ControlCommand control_command; + bool has_command_response; + openxc_CommandResponse command_response; } openxc_VehicleMessage; /* Default values for struct fields */ /* Field tags (for use in manual encoding/decoding) */ +#define openxc_CommandResponse_type_tag 1 +#define openxc_CommandResponse_message_tag 2 #define openxc_DiagnosticRequest_bus_tag 1 #define openxc_DiagnosticRequest_message_id_tag 2 #define openxc_DiagnosticRequest_mode_tag 3 @@ -183,20 +195,23 @@ typedef struct _openxc_VehicleMessage { #define openxc_VehicleMessage_translated_message_tag 3 #define openxc_VehicleMessage_diagnostic_response_tag 4 #define openxc_VehicleMessage_control_command_tag 5 +#define openxc_VehicleMessage_command_response_tag 6 /* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[6]; +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[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; extern const pb_field_t openxc_DynamicField_fields[5]; extern const pb_field_t openxc_TranslatedMessage_fields[5]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 524 +#define openxc_VehicleMessage_size 664 #define openxc_RawMessage_size 27 #define openxc_ControlCommand_size 76 +#define openxc_CommandResponse_size 137 #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 28322449..922b8c5e 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -76,6 +76,20 @@ public final class BinaryMessages { * optional .openxc.ControlCommand control_command = 5; */ com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder(); + + // optional .openxc.CommandResponse command_response = 6; + /** + * optional .openxc.CommandResponse command_response = 6; + */ + boolean hasCommandResponse(); + /** + * optional .openxc.CommandResponse command_response = 6; + */ + com.openxc.BinaryMessages.CommandResponse getCommandResponse(); + /** + * optional .openxc.CommandResponse command_response = 6; + */ + com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder(); } /** * Protobuf type {@code openxc.VehicleMessage} @@ -191,6 +205,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; break; } + case 50: { + com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = commandResponse_.toBuilder(); + } + commandResponse_ = input.readMessage(com.openxc.BinaryMessages.CommandResponse.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commandResponse_); + commandResponse_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -251,6 +278,10 @@ public final class BinaryMessages { * CONTROL_COMMAND = 4; */ CONTROL_COMMAND(3, 4), + /** + * COMMAND_RESPONSE = 5; + */ + COMMAND_RESPONSE(4, 5), ; /** @@ -269,6 +300,10 @@ public final class BinaryMessages { * CONTROL_COMMAND = 4; */ public static final int CONTROL_COMMAND_VALUE = 4; + /** + * COMMAND_RESPONSE = 5; + */ + public static final int COMMAND_RESPONSE_VALUE = 5; public final int getNumber() { return value; } @@ -279,6 +314,7 @@ public final class BinaryMessages { case 2: return TRANSLATED; case 3: return DIAGNOSTIC; case 4: return CONTROL_COMMAND; + case 5: return COMMAND_RESPONSE; default: return null; } } @@ -435,12 +471,35 @@ public final class BinaryMessages { return controlCommand_; } + // optional .openxc.CommandResponse command_response = 6; + public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6; + private com.openxc.BinaryMessages.CommandResponse commandResponse_; + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public boolean hasCommandResponse() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { + return commandResponse_; + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { + return commandResponse_; + } + 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(); + commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -469,6 +528,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, controlCommand_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(6, commandResponse_); + } getUnknownFields().writeTo(output); } @@ -498,6 +560,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, controlCommand_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, commandResponse_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -610,6 +676,7 @@ public final class BinaryMessages { getTranslatedMessageFieldBuilder(); getDiagnosticResponseFieldBuilder(); getControlCommandFieldBuilder(); + getCommandResponseFieldBuilder(); } } private static Builder create() { @@ -644,6 +711,12 @@ public final class BinaryMessages { controlCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); + if (commandResponseBuilder_ == null) { + commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); + } else { + commandResponseBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -708,6 +781,14 @@ public final class BinaryMessages { } else { result.controlCommand_ = controlCommandBuilder_.build(); } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + if (commandResponseBuilder_ == null) { + result.commandResponse_ = commandResponse_; + } else { + result.commandResponse_ = commandResponseBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -739,6 +820,9 @@ public final class BinaryMessages { if (other.hasControlCommand()) { mergeControlCommand(other.getControlCommand()); } + if (other.hasCommandResponse()) { + mergeCommandResponse(other.getCommandResponse()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1270,6 +1354,123 @@ public final class BinaryMessages { return controlCommandBuilder_; } + // optional .openxc.CommandResponse command_response = 6; + private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_; + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public boolean hasCommandResponse() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { + if (commandResponseBuilder_ == null) { + return commandResponse_; + } else { + return commandResponseBuilder_.getMessage(); + } + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public Builder setCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { + if (commandResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commandResponse_ = value; + onChanged(); + } else { + commandResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public Builder setCommandResponse( + com.openxc.BinaryMessages.CommandResponse.Builder builderForValue) { + if (commandResponseBuilder_ == null) { + commandResponse_ = builderForValue.build(); + onChanged(); + } else { + commandResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public Builder mergeCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { + if (commandResponseBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + commandResponse_ != com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) { + commandResponse_ = + com.openxc.BinaryMessages.CommandResponse.newBuilder(commandResponse_).mergeFrom(value).buildPartial(); + } else { + commandResponse_ = value; + } + onChanged(); + } else { + commandResponseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public Builder clearCommandResponse() { + if (commandResponseBuilder_ == null) { + commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); + onChanged(); + } else { + commandResponseBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public com.openxc.BinaryMessages.CommandResponse.Builder getCommandResponseBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCommandResponseFieldBuilder().getBuilder(); + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { + if (commandResponseBuilder_ != null) { + return commandResponseBuilder_.getMessageOrBuilder(); + } else { + return commandResponse_; + } + } + /** + * optional .openxc.CommandResponse command_response = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> + getCommandResponseFieldBuilder() { + if (commandResponseBuilder_ == null) { + commandResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder>( + commandResponse_, + getParentForChildren(), + isClean()); + commandResponse_ = null; + } + return commandResponseBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) } @@ -2060,18 +2261,608 @@ public final class BinaryMessages { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } - return VALUES[desc.getIndex()]; + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) + } + + private int bitField0_; + // optional .openxc.ControlCommand.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.ControlCommand.Type type_; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public com.openxc.BinaryMessages.ControlCommand.Type getType() { + return type_; + } + + // optional .openxc.DiagnosticRequest diagnostic_request = 2; + public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_; + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public boolean hasDiagnosticRequest() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { + return diagnosticRequest_; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { + return diagnosticRequest_; + } + + private void initFields() { + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, diagnosticRequest_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, diagnosticRequest_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.ControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDiagnosticRequestFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bitField0_ = (bitField0_ & ~0x00000001); + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.ControlCommand build() { + com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.ControlCommand buildPartial() { + com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (diagnosticRequestBuilder_ == null) { + result.diagnosticRequest_ = diagnosticRequest_; + } else { + result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.ControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { + if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasDiagnosticRequest()) { + mergeDiagnosticRequest(other.getDiagnosticRequest()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.ControlCommand.Type type = 1; + private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public com.openxc.BinaryMessages.ControlCommand.Type getType() { + return type_; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + onChanged(); + return this; + } + + // optional .openxc.DiagnosticRequest diagnostic_request = 2; + private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_; + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public boolean hasDiagnosticRequest() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + return diagnosticRequest_; + } else { + return diagnosticRequestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (diagnosticRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diagnosticRequest_ = value; + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder setDiagnosticRequest( + com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = builderForValue.build(); + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (diagnosticRequestBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { + diagnosticRequest_ = + com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); + } else { + diagnosticRequest_ = value; + } + onChanged(); + } else { + diagnosticRequestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public Builder clearDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + onChanged(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDiagnosticRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { + if (diagnosticRequestBuilder_ != null) { + return diagnosticRequestBuilder_.getMessageOrBuilder(); + } else { + return diagnosticRequest_; + } + } + /** + * optional .openxc.DiagnosticRequest diagnostic_request = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> + getDiagnosticRequestFieldBuilder() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( + diagnosticRequest_, + getParentForChildren(), + isClean()); + diagnosticRequest_ = null; + } + return diagnosticRequestBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) + } + + static { + defaultInstance = new ControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.ControlCommand) + } + + public interface CommandResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.ControlCommand.Type type = 1; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + boolean hasType(); + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + com.openxc.BinaryMessages.ControlCommand.Type getType(); + + // optional string message = 2; + /** + * optional string message = 2; + */ + boolean hasMessage(); + /** + * optional string message = 2; + */ + java.lang.String getMessage(); + /** + * optional string message = 2; + */ + com.google.protobuf.ByteString + getMessageBytes(); + } + /** + * Protobuf type {@code openxc.CommandResponse} + */ + public static final class CommandResponse extends + com.google.protobuf.GeneratedMessage + implements CommandResponseOrBuilder { + // Use CommandResponse.newBuilder() to construct. + private CommandResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CommandResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final CommandResponse defaultInstance; + public static CommandResponse getDefaultInstance() { + return defaultInstance; + } + + public CommandResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CommandResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + message_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; + } - private final int index; - private final int value; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); + } - private Type(int index, int value) { - this.index = index; - this.value = value; + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CommandResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommandResponse(input, extensionRegistry); } + }; - // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } private int bitField0_; @@ -2091,31 +2882,52 @@ public final class BinaryMessages { return type_; } - // optional .openxc.DiagnosticRequest diagnostic_request = 2; - public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; - private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_; + // optional string message = 2; + public static final int MESSAGE_FIELD_NUMBER = 2; + private java.lang.Object message_; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public boolean hasDiagnosticRequest() { + public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { - return diagnosticRequest_; + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + message_ = s; + } + return s; + } } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { - return diagnosticRequest_; + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + message_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2133,7 +2945,7 @@ public final class BinaryMessages { output.writeEnum(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, diagnosticRequest_); + output.writeBytes(2, getMessageBytes()); } getUnknownFields().writeTo(output); } @@ -2150,7 +2962,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, diagnosticRequest_); + .computeBytesSize(2, getMessageBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2164,53 +2976,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.CommandResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.CommandResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.CommandResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.CommandResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2219,7 +3031,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.CommandResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2231,24 +3043,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.ControlCommand} + * Protobuf type {@code openxc.CommandResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + implements com.openxc.BinaryMessages.CommandResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); } - // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.CommandResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2260,7 +3072,6 @@ public final class BinaryMessages { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDiagnosticRequestFieldBuilder(); } } private static Builder create() { @@ -2271,11 +3082,7 @@ public final class BinaryMessages { super.clear(); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; bitField0_ = (bitField0_ & ~0x00000001); - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - } else { - diagnosticRequestBuilder_.clear(); - } + message_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2286,23 +3093,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } - public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() { + return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); } - public com.openxc.BinaryMessages.ControlCommand build() { - com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + public com.openxc.BinaryMessages.CommandResponse build() { + com.openxc.BinaryMessages.CommandResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.ControlCommand buildPartial() { - com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); + public com.openxc.BinaryMessages.CommandResponse buildPartial() { + com.openxc.BinaryMessages.CommandResponse result = new com.openxc.BinaryMessages.CommandResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2312,32 +3119,30 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (diagnosticRequestBuilder_ == null) { - result.diagnosticRequest_ = diagnosticRequest_; - } else { - result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); - } + result.message_ = message_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.ControlCommand) { - return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); + if (other instanceof com.openxc.BinaryMessages.CommandResponse) { + return mergeFrom((com.openxc.BinaryMessages.CommandResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { - if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) { + if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } - if (other.hasDiagnosticRequest()) { - mergeDiagnosticRequest(other.getDiagnosticRequest()); + if (other.hasMessage()) { + bitField0_ |= 0x00000002; + message_ = other.message_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2351,11 +3156,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + com.openxc.BinaryMessages.CommandResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.CommandResponse) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2402,132 +3207,89 @@ public final class BinaryMessages { return this; } - // optional .openxc.DiagnosticRequest diagnostic_request = 2; - private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_; + // optional string message = 2; + private java.lang.Object message_ = ""; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public boolean hasDiagnosticRequest() { + public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { - if (diagnosticRequestBuilder_ == null) { - return diagnosticRequest_; - } else { - return diagnosticRequestBuilder_.getMessage(); - } - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (diagnosticRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - diagnosticRequest_ = value; - onChanged(); + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + message_ = s; + return s; } else { - diagnosticRequestBuilder_.setMessage(value); + return (java.lang.String) ref; } - bitField0_ |= 0x00000002; - return this; } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public Builder setDiagnosticRequest( - com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = builderForValue.build(); - onChanged(); + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; } else { - diagnosticRequestBuilder_.setMessage(builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000002; - return this; } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (diagnosticRequestBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { - diagnosticRequest_ = - com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); - } else { - diagnosticRequest_ = value; - } - onChanged(); - } else { - diagnosticRequestBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + message_ = value; + onChanged(); return this; } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public Builder clearDiagnosticRequest() { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - onChanged(); - } else { - diagnosticRequestBuilder_.clear(); - } + public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); + message_ = getDefaultInstance().getMessage(); + onChanged(); return this; } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional string message = 2; */ - public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() { - bitField0_ |= 0x00000002; + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + message_ = value; onChanged(); - return getDiagnosticRequestFieldBuilder().getBuilder(); - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { - if (diagnosticRequestBuilder_ != null) { - return diagnosticRequestBuilder_.getMessageOrBuilder(); - } else { - return diagnosticRequest_; - } - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> - getDiagnosticRequestFieldBuilder() { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - diagnosticRequest_, - getParentForChildren(), - isClean()); - diagnosticRequest_ = null; - } - return diagnosticRequestBuilder_; + return this; } - // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.CommandResponse) } static { - defaultInstance = new ControlCommand(true); + defaultInstance = new CommandResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.ControlCommand) + // @@protoc_insertion_point(class_scope:openxc.CommandResponse) } public interface DiagnosticRequestOrBuilder @@ -6515,6 +7277,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_ControlCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_CommandResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_CommandResponse_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticRequest_descriptor; private static @@ -6544,41 +7311,44 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\313\002\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\224\003\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\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\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.ope" + - "nxc.DynamicField.Type\022\024\n\014string_value\030\002 " + - "\001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_va" + - "lue\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\004" + - "name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.Dynam", - "icField\022#\n\005event\030\004 \001(\0132\024.openxc.DynamicF" + - "ield\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOO" + - "L\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\ncom.openxcB\016Binary" + - "Messages" + "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" + + "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" + + "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", + "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + + "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + + "data\030\003 \001(\014\"\246\001\n\016ControlCommand\022)\n\004type\030\001 " + + "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" + + "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" + + "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + + "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" + + "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" + + "e\022\017\n\007message\030\002 \001(\t\"\252\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\016\n\006factor\030\007 \001(\001\022\016\n\006" + + "offset\030\010 \001(\001\022\021\n\tfrequency\030\t \001(\001\"\241\001\n\022Diag" + + "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i" + + "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" + + "ccess\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\014" + + "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" + + "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" + + "umeric_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.o" + + "penxc.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\004" + + "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + + "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + + "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -6590,7 +7360,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", "ControlCommand", }); + new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); internal_static_openxc_RawMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_RawMessage_fieldAccessorTable = new @@ -6603,26 +7373,32 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, new java.lang.String[] { "Type", "DiagnosticRequest", }); - internal_static_openxc_DiagnosticRequest_descriptor = + internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_openxc_CommandResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_CommandResponse_descriptor, + new java.lang.String[] { "Type", "Message", }); + internal_static_openxc_DiagnosticRequest_descriptor = + getDescriptor().getMessageTypes().get(4); 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", "Factor", "Offset", "Frequency", }); internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); internal_static_openxc_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 00caddbf..15efe4a5 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\"\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\"\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\"\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\"\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') @@ -39,11 +39,15 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( name='CONTROL_COMMAND', index=3, number=4, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='COMMAND_RESPONSE', index=4, number=5, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=288, - serialized_end=356, + serialized_start=339, + serialized_end=429, ) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( @@ -67,8 +71,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=536, - serialized_end=586, + serialized_start=609, + serialized_end=659, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -92,8 +96,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1051, - serialized_end=1088, + serialized_start=1203, + serialized_end=1240, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -129,8 +133,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1246, - serialized_end=1338, + serialized_start=1398, + serialized_end=1490, ) @@ -176,6 +180,13 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='command_response', full_name='openxc.VehicleMessage.command_response', index=5, + number=6, 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=[ ], @@ -187,7 +198,7 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=356, + serialized_end=429, ) @@ -228,8 +239,8 @@ _RAWMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=358, - serialized_end=417, + serialized_start=431, + serialized_end=490, ) @@ -264,8 +275,43 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=420, - serialized_end=586, + serialized_start=493, + serialized_end=659, +) + + +_COMMANDRESPONSE = _descriptor.Descriptor( + name='CommandResponse', + full_name='openxc.CommandResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='openxc.CommandResponse.type', 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, + options=None), + _descriptor.FieldDescriptor( + name='message', full_name='openxc.CommandResponse.message', index=1, + number=2, 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, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=661, + serialized_end=738, ) @@ -348,8 +394,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=589, - serialized_end=759, + serialized_start=741, + serialized_end=911, ) @@ -425,8 +471,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=762, - serialized_end=923, + serialized_start=914, + serialized_end=1075, ) @@ -475,8 +521,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=926, - serialized_end=1088, + serialized_start=1078, + serialized_end=1240, ) @@ -525,8 +571,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1091, - serialized_end=1338, + serialized_start=1243, + serialized_end=1490, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -534,10 +580,12 @@ _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.fields_by_name['command_response'].message_type = _COMMANDRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; +_COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE @@ -547,6 +595,7 @@ _TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND +DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD @@ -570,6 +619,12 @@ class ControlCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.ControlCommand) +class CommandResponse(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _COMMANDRESPONSE + + # @@protoc_insertion_point(class_scope:openxc.CommandResponse) + class DiagnosticRequest(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _DIAGNOSTICREQUEST diff --git a/openxc.options b/openxc.options index 92b8f5b7..fb9be627 100644 --- a/openxc.options +++ b/openxc.options @@ -1,5 +1,6 @@ openxc.TranslatedMessage.name max_size:100 openxc.DynamicField.string_value max_size:100 +openxc.CommandResponse.message max_size:128 openxc.DiagnosticResponse.payload max_size:8 openxc.DiagnosticRequest.payload max_size:8 openxc.RawMessage.data max_size:8 diff --git a/openxc.proto b/openxc.proto index 27ea931f..b7a1b22d 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,13 +4,15 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; } + enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; + COMMAND_RESPONSE = 5; } optional Type type = 1; optional RawMessage raw_message = 2; optional TranslatedMessage translated_message = 3; optional DiagnosticResponse diagnostic_response = 4; optional ControlCommand control_command = 5; + optional CommandResponse command_response = 6; } message RawMessage { @@ -26,6 +28,11 @@ message ControlCommand { optional DiagnosticRequest diagnostic_request = 2; } +message CommandResponse { + optional ControlCommand.Type type = 1; + optional string message = 2; +} + message DiagnosticRequest { optional int32 bus = 1; optional uint32 message_id = 2; -- cgit 1.2.3-korg From 6642105e16f6b52e51f08c376fbc349634588193 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 15 Mar 2014 12:54:35 -0400 Subject: Add 'name' and 'multiple_responses' fields to diag requests. --- README.md | 17 +- gen/cpp/openxc.pb | 15 +- gen/cpp/openxc.pb.c | 12 +- gen/cpp/openxc.pb.h | 22 +- gen/java/com/openxc/BinaryMessages.java | 401 +++++++++++++++++++++++++------- gen/python/openxc_pb2.py | 48 ++-- openxc.options | 1 + openxc.proto | 8 +- 8 files changed, 403 insertions(+), 121 deletions(-) diff --git a/README.md b/README.md index 2be7c10c..dcfee281 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,11 @@ with this command format: "pid": 5, "payload": "0x1234", "parse_payload": true, + "multiple_response": false, "factor": 1.0, "offset": 0, - "frequency": 1 + "frequency": 1, + "name": "my_pid" } } } @@ -83,6 +85,14 @@ with this command format: the response. The 'payload' field will be omitted in responses with a 'value'. +**multiple_response** - (optional, false by default) if true, request will stay + active for a full 100ms, even after receiving a diagnostic response message. + This is useful for requests to the functional broadcast arbitration ID + (`0x7df`) when you need to get responses from multiple modules. It's possible + to set this to `true` for non-broadcast requests, but in practice you won't + see any additional responses after the first and it will just take up memory + in the VI for longer. + **factor** - (optional, 1.0 by default) if `parse_payload` is true, the value in the payload will be multiplied by this factor before returning. The `factor` is applied before the `offset`. @@ -94,6 +104,11 @@ with this command format: **frequency** - (optional, defaults to 0) The frequency in Hz to send this request. To send a single request, set this to 0 or leave it out. +**name** - (optional, defaults to nothing) A human readable, string name for + this request. If provided, the response will have a `name` field (much like a + normal translated message) in place of the request details (i.e. the bus, + id, mode and pid). TODO elaborate on this. + The `bus+id+mode+pid` key is unique, so if you send a create request with that key twice, it'll overwrite the existing one (i.e. it will change the frequency, the only other parameter). To cancel a recurring request, send this command with diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 929e6a2c..54ddb8be 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -ð +š openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -32,7 +32,7 @@ message_id (  DIAGNOSTIC"M CommandResponse) type (2.openxc.ControlCommand.Type -message ( "ª +message ( "Ô DiagnosticRequest bus ( @@ -40,10 +40,13 @@ message_id (  mode (  pid (  payload (  - parse_payload ( -factor ( -offset ( - frequency ("¡ + parse_payload ( +multiple_responses ( +factor ( +offset ( + frequency + ( +name ( "¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index b4cace32..25ed2bbf 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 Thu Mar 6 16:21:37 2014. */ +/* Generated by nanopb-0.2.5 at Sat Mar 15 12:44:03 2014. */ #include "openxc.pb.h" @@ -34,16 +34,18 @@ const pb_field_t openxc_CommandResponse_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticRequest_fields[10] = { +const pb_field_t openxc_DiagnosticRequest_fields[12] = { 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, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, factor, parse_payload, 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( 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_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 5db13577..267f785c 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 Thu Mar 6 16:21:37 2014. */ +/* Generated by nanopb-0.2.5 at Sat Mar 15 12:44:03 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -65,12 +65,16 @@ typedef struct _openxc_DiagnosticRequest { openxc_DiagnosticRequest_payload_t payload; bool has_parse_payload; bool parse_payload; + bool has_multiple_responses; + bool multiple_responses; bool has_factor; double factor; bool has_offset; double offset; bool has_frequency; double frequency; + bool has_name; + char name[10]; } openxc_DiagnosticRequest; typedef struct { @@ -166,9 +170,11 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_pid_tag 4 #define openxc_DiagnosticRequest_payload_tag 5 #define openxc_DiagnosticRequest_parse_payload_tag 6 -#define openxc_DiagnosticRequest_factor_tag 7 -#define openxc_DiagnosticRequest_offset_tag 8 -#define openxc_DiagnosticRequest_frequency_tag 9 +#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_DiagnosticResponse_bus_tag 1 #define openxc_DiagnosticResponse_message_id_tag 2 #define openxc_DiagnosticResponse_mode_tag 3 @@ -202,17 +208,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[10]; +extern const pb_field_t openxc_DiagnosticRequest_fields[12]; 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 664 +#define openxc_VehicleMessage_size 678 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 76 +#define openxc_ControlCommand_size 90 #define openxc_CommandResponse_size 137 -#define openxc_DiagnosticRequest_size 68 +#define openxc_DiagnosticRequest_size 82 #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 922b8c5e..00f1fe09 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3365,35 +3365,60 @@ public final class BinaryMessages { */ boolean getParsePayload(); - // optional double factor = 7; + // optional bool multiple_responses = 7; /** - * optional double factor = 7; + * optional bool multiple_responses = 7; + */ + boolean hasMultipleResponses(); + /** + * optional bool multiple_responses = 7; + */ + boolean getMultipleResponses(); + + // optional double factor = 8; + /** + * optional double factor = 8; */ boolean hasFactor(); /** - * optional double factor = 7; + * optional double factor = 8; */ double getFactor(); - // optional double offset = 8; + // optional double offset = 9; /** - * optional double offset = 8; + * optional double offset = 9; */ boolean hasOffset(); /** - * optional double offset = 8; + * optional double offset = 9; */ double getOffset(); - // optional double frequency = 9; + // optional double frequency = 10; /** - * optional double frequency = 9; + * optional double frequency = 10; */ boolean hasFrequency(); /** - * optional double frequency = 9; + * optional double frequency = 10; */ double getFrequency(); + + // optional string name = 11; + /** + * optional string name = 11; + */ + boolean hasName(); + /** + * optional string name = 11; + */ + java.lang.String getName(); + /** + * optional string name = 11; + */ + com.google.protobuf.ByteString + getNameBytes(); } /** * Protobuf type {@code openxc.DiagnosticRequest} @@ -3476,21 +3501,31 @@ public final class BinaryMessages { parsePayload_ = input.readBool(); break; } - case 57: { + case 56: { bitField0_ |= 0x00000040; - factor_ = input.readDouble(); + multipleResponses_ = input.readBool(); break; } case 65: { bitField0_ |= 0x00000080; - offset_ = input.readDouble(); + factor_ = input.readDouble(); break; } case 73: { bitField0_ |= 0x00000100; + offset_ = input.readDouble(); + break; + } + case 81: { + bitField0_ |= 0x00000200; frequency_ = input.readDouble(); break; } + case 90: { + bitField0_ |= 0x00000400; + name_ = input.readBytes(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3637,54 +3672,113 @@ public final class BinaryMessages { return parsePayload_; } - // optional double factor = 7; - public static final int FACTOR_FIELD_NUMBER = 7; + // optional bool multiple_responses = 7; + public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 7; + private boolean multipleResponses_; + /** + * optional bool multiple_responses = 7; + */ + public boolean hasMultipleResponses() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool multiple_responses = 7; + */ + public boolean getMultipleResponses() { + return multipleResponses_; + } + + // optional double factor = 8; + public static final int FACTOR_FIELD_NUMBER = 8; private double factor_; /** - * optional double factor = 7; + * optional double factor = 8; */ public boolean hasFactor() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional double factor = 7; + * optional double factor = 8; */ public double getFactor() { return factor_; } - // optional double offset = 8; - public static final int OFFSET_FIELD_NUMBER = 8; + // optional double offset = 9; + public static final int OFFSET_FIELD_NUMBER = 9; private double offset_; /** - * optional double offset = 8; + * optional double offset = 9; */ public boolean hasOffset() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * optional double offset = 8; + * optional double offset = 9; */ public double getOffset() { return offset_; } - // optional double frequency = 9; - public static final int FREQUENCY_FIELD_NUMBER = 9; + // optional double frequency = 10; + public static final int FREQUENCY_FIELD_NUMBER = 10; private double frequency_; /** - * optional double frequency = 9; + * optional double frequency = 10; */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * optional double frequency = 9; + * optional double frequency = 10; */ public double getFrequency() { return frequency_; } + // optional string name = 11; + public static final int NAME_FIELD_NUMBER = 11; + private java.lang.Object name_; + /** + * optional string name = 11; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional string name = 11; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 11; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private void initFields() { bus_ = 0; messageId_ = 0; @@ -3692,9 +3786,11 @@ public final class BinaryMessages { pid_ = 0; payload_ = com.google.protobuf.ByteString.EMPTY; parsePayload_ = false; + multipleResponses_ = false; factor_ = 0D; offset_ = 0D; frequency_ = 0D; + name_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3727,13 +3823,19 @@ public final class BinaryMessages { output.writeBool(6, parsePayload_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeDouble(7, factor_); + output.writeBool(7, multipleResponses_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeDouble(8, offset_); + output.writeDouble(8, factor_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeDouble(9, frequency_); + output.writeDouble(9, offset_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeDouble(10, frequency_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBytes(11, getNameBytes()); } getUnknownFields().writeTo(output); } @@ -3770,15 +3872,23 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(7, factor_); + .computeBoolSize(7, multipleResponses_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(8, offset_); + .computeDoubleSize(8, factor_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(9, frequency_); + .computeDoubleSize(9, offset_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(10, frequency_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3908,12 +4018,16 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); parsePayload_ = false; bitField0_ = (bitField0_ & ~0x00000020); - factor_ = 0D; + multipleResponses_ = false; bitField0_ = (bitField0_ & ~0x00000040); - offset_ = 0D; + factor_ = 0D; bitField0_ = (bitField0_ & ~0x00000080); - frequency_ = 0D; + offset_ = 0D; bitField0_ = (bitField0_ & ~0x00000100); + frequency_ = 0D; + bitField0_ = (bitField0_ & ~0x00000200); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000400); return this; } @@ -3969,15 +4083,23 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } - result.factor_ = factor_; + result.multipleResponses_ = multipleResponses_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } - result.offset_ = offset_; + result.factor_ = factor_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } + result.offset_ = offset_; + 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(); return result; @@ -4012,6 +4134,9 @@ public final class BinaryMessages { if (other.hasParsePayload()) { setParsePayload(other.getParsePayload()); } + if (other.hasMultipleResponses()) { + setMultipleResponses(other.getMultipleResponses()); + } if (other.hasFactor()) { setFactor(other.getFactor()); } @@ -4021,6 +4146,11 @@ public final class BinaryMessages { if (other.hasFrequency()) { setFrequency(other.getFrequency()); } + if (other.hasName()) { + bitField0_ |= 0x00000400; + name_ = other.name_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4269,105 +4399,212 @@ public final class BinaryMessages { return this; } - // optional double factor = 7; + // optional bool multiple_responses = 7; + private boolean multipleResponses_ ; + /** + * optional bool multiple_responses = 7; + */ + public boolean hasMultipleResponses() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool multiple_responses = 7; + */ + public boolean getMultipleResponses() { + return multipleResponses_; + } + /** + * optional bool multiple_responses = 7; + */ + public Builder setMultipleResponses(boolean value) { + bitField0_ |= 0x00000040; + multipleResponses_ = value; + onChanged(); + return this; + } + /** + * optional bool multiple_responses = 7; + */ + public Builder clearMultipleResponses() { + bitField0_ = (bitField0_ & ~0x00000040); + multipleResponses_ = false; + onChanged(); + return this; + } + + // optional double factor = 8; private double factor_ ; /** - * optional double factor = 7; + * optional double factor = 8; */ public boolean hasFactor() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional double factor = 7; + * optional double factor = 8; */ public double getFactor() { return factor_; } /** - * optional double factor = 7; + * optional double factor = 8; */ public Builder setFactor(double value) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; factor_ = value; onChanged(); return this; } /** - * optional double factor = 7; + * optional double factor = 8; */ public Builder clearFactor() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); factor_ = 0D; onChanged(); return this; } - // optional double offset = 8; + // optional double offset = 9; private double offset_ ; /** - * optional double offset = 8; + * optional double offset = 9; */ public boolean hasOffset() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * optional double offset = 8; + * optional double offset = 9; */ public double getOffset() { return offset_; } /** - * optional double offset = 8; + * optional double offset = 9; */ public Builder setOffset(double value) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; offset_ = value; onChanged(); return this; } /** - * optional double offset = 8; + * optional double offset = 9; */ public Builder clearOffset() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); offset_ = 0D; onChanged(); return this; } - // optional double frequency = 9; + // optional double frequency = 10; private double frequency_ ; /** - * optional double frequency = 9; + * optional double frequency = 10; */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * optional double frequency = 9; + * optional double frequency = 10; */ public double getFrequency() { return frequency_; } /** - * optional double frequency = 9; + * optional double frequency = 10; */ public Builder setFrequency(double value) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; frequency_ = value; onChanged(); return this; } /** - * optional double frequency = 9; + * optional double frequency = 10; */ public Builder clearFrequency() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); frequency_ = 0D; onChanged(); return this; } + // optional string name = 11; + private java.lang.Object name_ = ""; + /** + * optional string name = 11; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional string name = 11; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 11; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 11; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 11; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000400); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 11; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + name_ = value; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } @@ -7329,26 +7566,28 @@ 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\"\252\001\n\021DiagnosticRequest" + + "e\022\017\n\007message\030\002 \001(\t\"\324\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\016\n\006factor\030\007 \001(\001\022\016\n\006" + - "offset\030\010 \001(\001\022\021\n\tfrequency\030\t \001(\001\"\241\001\n\022Diag" + - "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i" + - "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" + - "ccess\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\014" + - "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" + - "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" + - "umeric_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.o" + - "penxc.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\004" + - "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + - "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + - "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "\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" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7384,7 +7623,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", "Factor", "Offset", "Frequency", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "ParsePayload", "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 15efe4a5..7432b21e 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\"\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\"\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\"\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') @@ -96,8 +96,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1203, - serialized_end=1240, + serialized_start=1245, + serialized_end=1282, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -133,8 +133,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1398, - serialized_end=1490, + serialized_start=1440, + serialized_end=1532, ) @@ -365,26 +365,40 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - 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, + 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, 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=7, + name='factor', full_name='openxc.DiagnosticRequest.factor', 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='frequency', full_name='openxc.DiagnosticRequest.frequency', index=8, + name='offset', full_name='openxc.DiagnosticRequest.offset', 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, + has_default_value=False, default_value=unicode("", "utf-8"), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -395,7 +409,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=741, - serialized_end=911, + serialized_end=953, ) @@ -471,8 +485,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=914, - serialized_end=1075, + serialized_start=956, + serialized_end=1117, ) @@ -521,8 +535,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1078, - serialized_end=1240, + serialized_start=1120, + serialized_end=1282, ) @@ -571,8 +585,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1243, - serialized_end=1490, + serialized_start=1285, + serialized_end=1532, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.options b/openxc.options index fb9be627..80d0f9b0 100644 --- a/openxc.options +++ b/openxc.options @@ -2,5 +2,6 @@ openxc.TranslatedMessage.name max_size:100 openxc.DynamicField.string_value max_size:100 openxc.CommandResponse.message max_size:128 openxc.DiagnosticResponse.payload max_size:8 +openxc.DiagnosticRequest.name max_size:10 openxc.DiagnosticRequest.payload max_size:8 openxc.RawMessage.data max_size:8 diff --git a/openxc.proto b/openxc.proto index b7a1b22d..2deaf3bc 100644 --- a/openxc.proto +++ b/openxc.proto @@ -42,9 +42,11 @@ message DiagnosticRequest { // support multi-frame responses optional bytes payload = 5; optional bool parse_payload = 6; - optional double factor = 7; - optional double offset = 8; - optional double frequency = 9; + optional bool multiple_responses = 7; + optional double factor = 8; + optional double offset = 9; + optional double frequency = 10; + optional string name = 11; } message DiagnosticResponse { -- cgit 1.2.3-korg From 19b53e4dada2d696c3291bd77dd736cd5d3415bf Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 20 Mar 2014 14:44:58 -0400 Subject: Require byte arrays in JSON hex strings to have 2 chars per byte. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dcfee281..01ca5f39 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,9 @@ is sent as a JSON object, separated by newlines. The format of each object is: **data** - up to 8 bytes of data from the CAN message's payload, represented as a hexidecimal number in a string. Many JSON parser cannot handle 64-bit - integers, which is why we are not using a numerical data type. + integers, which is why we are not using a numerical data type. Each byte in + the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the + complete string must have an even number of characters. ## Diagnostic Messages @@ -79,6 +81,8 @@ with this command format: **payload** - (optional) up to 7 bytes of data for the request's payload represented as a hexidecimal number in a string. Many JSON parser cannot handle 64-bit integers, which is why we are not using a numerical data type. + Each byte in the string *must* be represented with 2 characters, e.g. `0x1` + is `0x01` - the complete string must have an even number of characters. **parse_payload** - (optional, false by default) if true, the complete payload in the response message will be parsed as a number and returned in the 'value' field of -- cgit 1.2.3-korg From fd65f19af900c2462fc337dcdc1c61ff3a4d3452 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 22 Mar 2014 14:27:33 -0400 Subject: Document command queries and responses. --- README.md | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 01ca5f39..0fe4b8df 100644 --- a/README.md +++ b/README.md @@ -118,9 +118,6 @@ key twice, it'll overwrite the existing one (i.e. it will change the frequency, the only other parameter). To cancel a recurring request, send this command with the frequency set to 0. -TODO it'd be nice to have the OBD-II PIDs built in, with the proper conversion -functions - that may need a different output format - If you're just requesting a PID, you can use this minimal field set for the `request` object: @@ -168,9 +165,33 @@ The response to a simple PID request would look like this: {"bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} -TODO again, it'd be nice to have the OBD-II PIDs built in, with the proper -conversion functions so the response here included the actual transformed value -of the pid and a human readable name +## Commands + +### Version Query + +The `version` command triggers the VI to inject a firmware version identifier +response into the outgoing data stream. + +**Request** + + { "command": "version"} + +**Response** + + { "command_response": "version", "message": "v6.0-dev (default)"} + +### Device ID Query + +The `device_id` command triggers the VI to inject a unique device ID (e.g. the +MAC address of an included Bluetooth module) into into the outgoing data stream. + +**Request** + + { "command": "device_id"} + +**Response** + + { "command_response": "device_id", "message": "0012345678"} ## Trace File Format -- cgit 1.2.3-korg From 38926291a49aa27a9ec7476e2347b2bca4e5a466 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 22 Mar 2014 16:05:33 -0400 Subject: Add 'success' field to example diagnostic response. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fe4b8df..65f0d198 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ Finally, the `payload` and `value` fields are mutually exclusive: The response to a simple PID request would look like this: - {"bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} + {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} ## Commands -- cgit 1.2.3-korg From 681e44f8e168cae7d63064d9029388bcceff1955 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 23 Mar 2014 16:05:53 -0400 Subject: Make negative diagnostic response format clearer. --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 65f0d198..3675d906 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ with this command format: "pid": 5, "payload": "0x1234", "parse_payload": true, - "multiple_response": false, + "multiple_responses": false, "factor": 1.0, "offset": 0, "frequency": 1, @@ -89,7 +89,7 @@ with this command format: the response. The 'payload' field will be omitted in responses with a 'value'. -**multiple_response** - (optional, false by default) if true, request will stay +**multiple_responses** - (optional, false by default) if true, request will stay active for a full 100ms, even after receiving a diagnostic response message. This is useful for requests to the functional broadcast arbitration ID (`0x7df`) when you need to get responses from multiple modules. It's possible @@ -125,14 +125,24 @@ If you're just requesting a PID, you can use this minimal field set for the ### Responses +The response to a successful request: + {"bus": 1, "id": 1234, "mode": 1, "pid": 5, "success": true, - "negative_response_code": 17, "payload": "0x1234", - "parsed_payload": 4660} + "value": 4660} + +and to an unsuccessful request, with the `negative_response_code` and no `pid` +echo: + + {"bus": 1, + "id": 1234, + "mode": 1, + "success": false, + "negative_response_code": 17} **bus** - the numerical identifier of the CAN bus where this response was received. -- cgit 1.2.3-korg From f3f00874c637bcd700ded55f39cee5b1a881bc7c Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 23 Mar 2014 16:26:33 -0400 Subject: Elaborate on 'name' field for diagnostic requests. --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3675d906..cef6ea37 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,15 @@ with this command format: Each byte in the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the complete string must have an even number of characters. -**parse_payload** - (optional, false by default) if true, the complete payload in the - response message will be parsed as a number and returned in the 'value' field of - the response. The 'payload' field will be omitted in responses with a - 'value'. +**parse_payload** - (optional, false by default) if `true`, the complete payload + in the response message will be parsed as a number and returned in the + `value` field of the response. The `payload` field will be omitted in + responses with a `value`. + +**name** - (optional, defaults to nothing) A human readable, string name for + this request. If provided, the response will have a `name` field (much like a + normal translated message) with this value in place of `bus`, `id`, `mode` and + `pid`. **multiple_responses** - (optional, false by default) if true, request will stay active for a full 100ms, even after receiving a diagnostic response message. @@ -108,11 +113,6 @@ with this command format: **frequency** - (optional, defaults to 0) The frequency in Hz to send this request. To send a single request, set this to 0 or leave it out. -**name** - (optional, defaults to nothing) A human readable, string name for - this request. If provided, the response will have a `name` field (much like a - normal translated message) in place of the request details (i.e. the bus, - id, mode and pid). TODO elaborate on this. - The `bus+id+mode+pid` key is unique, so if you send a create request with that key twice, it'll overwrite the existing one (i.e. it will change the frequency, the only other parameter). To cancel a recurring request, send this command with -- cgit 1.2.3-korg From 03a5af0f0978d372bb9e5668700ed39eb8c2fd83 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 26 Mar 2014 08:53:09 -0400 Subject: Remove parse_payload from diagnostic messages, it's not needed. --- gen/cpp/openxc.pb | 19 +- gen/cpp/openxc.pb.c | 15 +- gen/cpp/openxc.pb.h | 23 +-- gen/java/com/openxc/BinaryMessages.java | 346 ++++++++++++-------------------- gen/python/openxc_pb2.py | 47 ++--- 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; /** - * optional bool parse_payload = 6; - */ - boolean hasParsePayload(); - /** - * optional bool parse_payload = 6; - */ - boolean getParsePayload(); - - // optional bool multiple_responses = 7; - /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ boolean hasMultipleResponses(); /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ boolean getMultipleResponses(); - // optional double factor = 8; + // optional double factor = 7; /** - * optional double factor = 8; + * optional double factor = 7; */ boolean hasFactor(); /** - * optional double factor = 8; + * optional double factor = 7; */ double getFactor(); - // optional double offset = 9; + // optional double offset = 8; /** - * optional double offset = 9; + * optional double offset = 8; */ boolean hasOffset(); /** - * optional double offset = 9; + * optional double offset = 8; */ double getOffset(); - // optional double frequency = 10; + // optional double frequency = 9; /** - * optional double frequency = 10; + * optional double frequency = 9; */ boolean hasFrequency(); /** - * optional double frequency = 10; + * optional double frequency = 9; */ double getFrequency(); - // optional string name = 11; + // optional string name = 10; /** - * optional string name = 11; + * optional string name = 10; */ boolean hasName(); /** - * optional string name = 11; + * optional string name = 10; */ java.lang.String getName(); /** - * optional string name = 11; + * optional string name = 10; */ 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_; - /** - * optional bool parse_payload = 6; - */ - public boolean hasParsePayload() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional bool parse_payload = 6; - */ - 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_; /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ public boolean hasMultipleResponses() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ 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_; /** - * optional double factor = 8; + * optional double factor = 7; */ public boolean hasFactor() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional double factor = 8; + * optional double factor = 7; */ 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_; /** - * optional double offset = 9; + * optional double offset = 8; */ public boolean hasOffset() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional double offset = 9; + * optional double offset = 8; */ 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_; /** - * optional double frequency = 10; + * optional double frequency = 9; */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * optional double frequency = 10; + * optional double frequency = 9; */ 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_; /** - * optional string name = 11; + * optional string name = 10; */ public boolean hasName() { - return ((bitField0_ & 0x00000400) == 0x00000400); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * optional string name = 11; + * optional string name = 10; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -3763,7 +3732,7 @@ public final class BinaryMessages { } } /** - * optional string name = 11; + * optional string name = 10; */ 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_ ; - /** - * optional bool parse_payload = 6; - */ - public boolean hasParsePayload() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional bool parse_payload = 6; - */ - public boolean getParsePayload() { - return parsePayload_; - } - /** - * optional bool parse_payload = 6; - */ - public Builder setParsePayload(boolean value) { - bitField0_ |= 0x00000020; - parsePayload_ = value; - onChanged(); - return this; - } - /** - * optional bool parse_payload = 6; - */ - public Builder clearParsePayload() { - bitField0_ = (bitField0_ & ~0x00000020); - parsePayload_ = false; - onChanged(); - return this; - } - - // optional bool multiple_responses = 7; + // optional bool multiple_responses = 6; private boolean multipleResponses_ ; /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ public boolean hasMultipleResponses() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ public boolean getMultipleResponses() { return multipleResponses_; } /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ public Builder setMultipleResponses(boolean value) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; multipleResponses_ = value; onChanged(); return this; } /** - * optional bool multiple_responses = 7; + * optional bool multiple_responses = 6; */ 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_ ; /** - * optional double factor = 8; + * optional double factor = 7; */ public boolean hasFactor() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional double factor = 8; + * optional double factor = 7; */ public double getFactor() { return factor_; } /** - * optional double factor = 8; + * optional double factor = 7; */ public Builder setFactor(double value) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; factor_ = value; onChanged(); return this; } /** - * optional double factor = 8; + * optional double factor = 7; */ 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_ ; /** - * optional double offset = 9; + * optional double offset = 8; */ public boolean hasOffset() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional double offset = 9; + * optional double offset = 8; */ public double getOffset() { return offset_; } /** - * optional double offset = 9; + * optional double offset = 8; */ public Builder setOffset(double value) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; offset_ = value; onChanged(); return this; } /** - * optional double offset = 9; + * optional double offset = 8; */ 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_ ; /** - * optional double frequency = 10; + * optional double frequency = 9; */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * optional double frequency = 10; + * optional double frequency = 9; */ public double getFrequency() { return frequency_; } /** - * optional double frequency = 10; + * optional double frequency = 9; */ public Builder setFrequency(double value) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; frequency_ = value; onChanged(); return this; } /** - * optional double frequency = 10; + * optional double frequency = 9; */ 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_ = ""; /** - * optional string name = 11; + * optional string name = 10; */ public boolean hasName() { - return ((bitField0_ & 0x00000400) == 0x00000400); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * optional string name = 11; + * optional string name = 10; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -4554,7 +4473,7 @@ public final class BinaryMessages { } } /** - * optional string name = 11; + * optional string name = 10; */ public com.google.protobuf.ByteString getNameBytes() { @@ -4570,36 +4489,36 @@ public final class BinaryMessages { } } /** - * optional string name = 11; + * optional string name = 10; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; name_ = value; onChanged(); return this; } /** - * optional string name = 11; + * optional string name = 10; */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000200); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * optional string name = 11; + * optional string name = 10; */ 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 { -- cgit 1.2.3-korg From f1c1af529c32284c6b81a6ba4fcada464ce4401f Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 26 Mar 2014 10:48:29 -0400 Subject: Refactor diagnostic fields for decoding payload. --- README.md | 23 +- gen/cpp/openxc.pb | 17 +- gen/cpp/openxc.pb.c | 11 +- gen/cpp/openxc.pb.h | 28 +- gen/java/com/openxc/BinaryMessages.java | 452 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 69 +++-- openxc.proto | 9 +- 7 files changed, 316 insertions(+), 293 deletions(-) diff --git a/README.md b/README.md index cef6ea37..aa44b056 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ with this command format: "mode": 1, "pid": 5, "payload": "0x1234", - "parse_payload": true, "multiple_responses": false, "factor": 1.0, "offset": 0, @@ -84,11 +83,6 @@ with this command format: Each byte in the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the complete string must have an even number of characters. -**parse_payload** - (optional, false by default) if `true`, the complete payload - in the response message will be parsed as a number and returned in the - `value` field of the response. The `payload` field will be omitted in - responses with a `value`. - **name** - (optional, defaults to nothing) A human readable, string name for this request. If provided, the response will have a `name` field (much like a normal translated message) with this value in place of `bus`, `id`, `mode` and @@ -102,17 +96,15 @@ with this command format: see any additional responses after the first and it will just take up memory in the VI for longer. -**factor** - (optional, 1.0 by default) if `parse_payload` is true, the value in - the payload will be multiplied by this factor before returning. The `factor` - is applied before the `offset`. - -**offset** - (optional, 0 by default) if `parse_payload` is true, this offset - will be added to the value in the payload before returning. The `offset` is - applied after the `factor`. - **frequency** - (optional, defaults to 0) The frequency in Hz to send this request. To send a single request, set this to 0 or leave it out. +**decoded_type** - (optional, defaults to "obd2" if the request is a recognized +OBD-II mode 1 request, otherwise "none") If specified, the valid values are +`"none"` and `"obd2"`. If `obd2`, the payload will be decoded according to the +OBD-II specification and returned in the `value` field. Set this to `none` to +manually override the OBD-II decoding feature for a known PID. + The `bus+id+mode+pid` key is unique, so if you send a create request with that key twice, it'll overwrite the existing one (i.e. it will change the frequency, the only other parameter). To cancel a recurring request, send this command with @@ -168,8 +160,7 @@ Finally, the `payload` and `value` fields are mutually exclusive: handle 64-bit integers, which is why we are not using a numerical data type. **value** - (optional) if the response had a payload, this may be the - payload interpreted as an integer and transformed with a factor and offset - provided with the request. + payload interpreted as an integer. The response to a simple PID request would look like this: diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index f259bbac..da312337 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -ƒ +à openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -32,7 +32,7 @@ message_id (  DIAGNOSTIC"M CommandResponse) type (2.openxc.ControlCommand.Type -message ( "½ +message ( "ý DiagnosticRequest bus ( @@ -40,12 +40,13 @@ message_id (  mode (  pid (  payload (  -multiple_responses ( -factor ( -offset ( - frequency ( -name - ( "¡ +multiple_responses ( + frequency ( +name ( ; + decoded_type (2%.openxc.DiagnosticRequest.DecodedType"! + DecodedType +NONE +OBD2"¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index e62efad3..e3be2570 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 Mon Mar 24 17:19:53 2014. */ +/* Generated by nanopb-0.2.5 at Wed Mar 26 09:29:06 2014. */ #include "openxc.pb.h" @@ -34,17 +34,16 @@ const pb_field_t openxc_CommandResponse_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticRequest_fields[11] = { +const pb_field_t openxc_DiagnosticRequest_fields[10] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticRequest, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, message_id, bus, 0), PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, mode, message_id, 0), 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, 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_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, multiple_responses, 0), + PB_FIELD2( 8, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), + PB_FIELD2( 9, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, decoded_type, name, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 82ab9872..e70324f0 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 24 17:19:53 2014. */ +/* Generated by nanopb-0.2.5 at Wed Mar 26 09:29:06 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -24,6 +24,11 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3 } openxc_ControlCommand_Type; +typedef enum _openxc_DiagnosticRequest_DecodedType { + openxc_DiagnosticRequest_DecodedType_NONE = 1, + openxc_DiagnosticRequest_DecodedType_OBD2 = 2 +} openxc_DiagnosticRequest_DecodedType; + typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_STRING = 1, openxc_DynamicField_Type_NUM = 2, @@ -65,14 +70,12 @@ typedef struct _openxc_DiagnosticRequest { openxc_DiagnosticRequest_payload_t payload; bool has_multiple_responses; bool multiple_responses; - bool has_factor; - double factor; - bool has_offset; - double offset; bool has_frequency; double frequency; bool has_name; char name[10]; + bool has_decoded_type; + openxc_DiagnosticRequest_DecodedType decoded_type; } openxc_DiagnosticRequest; typedef struct { @@ -168,10 +171,9 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_pid_tag 4 #define openxc_DiagnosticRequest_payload_tag 5 #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_DiagnosticRequest_frequency_tag 7 +#define openxc_DiagnosticRequest_name_tag 8 +#define openxc_DiagnosticRequest_decoded_type_tag 9 #define openxc_DiagnosticResponse_bus_tag 1 #define openxc_DiagnosticResponse_message_id_tag 2 #define openxc_DiagnosticResponse_mode_tag 3 @@ -205,17 +207,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[11]; +extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; extern const pb_field_t openxc_DynamicField_fields[5]; extern const pb_field_t openxc_TranslatedMessage_fields[5]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 676 +#define openxc_VehicleMessage_size 664 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 88 +#define openxc_ControlCommand_size 76 #define openxc_CommandResponse_size 137 -#define openxc_DiagnosticRequest_size 80 +#define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 #define openxc_TranslatedMessage_size 350 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 687e0644..777acd03 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3365,50 +3365,40 @@ public final class BinaryMessages { */ boolean getMultipleResponses(); - // optional double factor = 7; + // optional double frequency = 7; /** - * optional double factor = 7; - */ - boolean hasFactor(); - /** - * optional double factor = 7; - */ - double getFactor(); - - // optional double offset = 8; - /** - * optional double offset = 8; - */ - boolean hasOffset(); - /** - * optional double offset = 8; - */ - double getOffset(); - - // optional double frequency = 9; - /** - * optional double frequency = 9; + * optional double frequency = 7; */ boolean hasFrequency(); /** - * optional double frequency = 9; + * optional double frequency = 7; */ double getFrequency(); - // optional string name = 10; + // optional string name = 8; /** - * optional string name = 10; + * optional string name = 8; */ boolean hasName(); /** - * optional string name = 10; + * optional string name = 8; */ java.lang.String getName(); /** - * optional string name = 10; + * optional string name = 8; */ com.google.protobuf.ByteString getNameBytes(); + + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + boolean hasDecodedType(); + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); } /** * Protobuf type {@code openxc.DiagnosticRequest} @@ -3493,22 +3483,23 @@ public final class BinaryMessages { } case 57: { bitField0_ |= 0x00000040; - factor_ = input.readDouble(); + frequency_ = input.readDouble(); break; } - case 65: { + case 66: { bitField0_ |= 0x00000080; - offset_ = input.readDouble(); - break; - } - case 73: { - bitField0_ |= 0x00000100; - frequency_ = input.readDouble(); + name_ = input.readBytes(); break; } - case 82: { - bitField0_ |= 0x00000200; - name_ = input.readBytes(); + case 72: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(9, rawValue); + } else { + bitField0_ |= 0x00000100; + decodedType_ = value; + } break; } } @@ -3550,6 +3541,88 @@ public final class BinaryMessages { return PARSER; } + /** + * Protobuf enum {@code openxc.DiagnosticRequest.DecodedType} + */ + public enum DecodedType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 1; + */ + NONE(0, 1), + /** + * OBD2 = 2; + */ + OBD2(1, 2), + ; + + /** + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + /** + * OBD2 = 2; + */ + public static final int OBD2_VALUE = 2; + + + public final int getNumber() { return value; } + + public static DecodedType valueOf(int value) { + switch (value) { + case 1: return NONE; + case 2: return OBD2; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DecodedType findValueByNumber(int number) { + return DecodedType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final DecodedType[] VALUES = values(); + + public static DecodedType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private DecodedType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) + } + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -3657,65 +3730,33 @@ public final class BinaryMessages { return multipleResponses_; } - // optional double factor = 7; - public static final int FACTOR_FIELD_NUMBER = 7; - private double factor_; - /** - * optional double factor = 7; - */ - public boolean hasFactor() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional double factor = 7; - */ - public double getFactor() { - return factor_; - } - - // optional double offset = 8; - public static final int OFFSET_FIELD_NUMBER = 8; - private double offset_; - /** - * optional double offset = 8; - */ - public boolean hasOffset() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional double offset = 8; - */ - public double getOffset() { - return offset_; - } - - // optional double frequency = 9; - public static final int FREQUENCY_FIELD_NUMBER = 9; + // optional double frequency = 7; + public static final int FREQUENCY_FIELD_NUMBER = 7; private double frequency_; /** - * optional double frequency = 9; + * optional double frequency = 7; */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional double frequency = 9; + * optional double frequency = 7; */ public double getFrequency() { return frequency_; } - // optional string name = 10; - public static final int NAME_FIELD_NUMBER = 10; + // optional string name = 8; + public static final int NAME_FIELD_NUMBER = 8; private java.lang.Object name_; /** - * optional string name = 10; + * optional string name = 8; */ public boolean hasName() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional string name = 10; + * optional string name = 8; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -3732,7 +3773,7 @@ public final class BinaryMessages { } } /** - * optional string name = 10; + * optional string name = 8; */ public com.google.protobuf.ByteString getNameBytes() { @@ -3748,6 +3789,22 @@ public final class BinaryMessages { } } + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + public static final int DECODED_TYPE_FIELD_NUMBER = 9; + private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_; + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + public boolean hasDecodedType() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { + return decodedType_; + } + private void initFields() { bus_ = 0; messageId_ = 0; @@ -3755,10 +3812,9 @@ public final class BinaryMessages { pid_ = 0; payload_ = com.google.protobuf.ByteString.EMPTY; multipleResponses_ = false; - factor_ = 0D; - offset_ = 0D; frequency_ = 0D; name_ = ""; + decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3791,16 +3847,13 @@ public final class BinaryMessages { output.writeBool(6, multipleResponses_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeDouble(7, factor_); + output.writeDouble(7, frequency_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeDouble(8, offset_); + output.writeBytes(8, getNameBytes()); } if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeDouble(9, frequency_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeBytes(10, getNameBytes()); + output.writeEnum(9, decodedType_.getNumber()); } getUnknownFields().writeTo(output); } @@ -3837,19 +3890,15 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(7, factor_); + .computeDoubleSize(7, frequency_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(8, offset_); + .computeBytesSize(8, getNameBytes()); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(9, frequency_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getNameBytes()); + .computeEnumSize(9, decodedType_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3979,14 +4028,12 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); multipleResponses_ = false; bitField0_ = (bitField0_ & ~0x00000020); - factor_ = 0D; + frequency_ = 0D; bitField0_ = (bitField0_ & ~0x00000040); - offset_ = 0D; + name_ = ""; bitField0_ = (bitField0_ & ~0x00000080); - frequency_ = 0D; + decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; bitField0_ = (bitField0_ & ~0x00000100); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4042,19 +4089,15 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } - result.factor_ = factor_; + result.frequency_ = frequency_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } - result.offset_ = offset_; + result.name_ = name_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } - result.frequency_ = frequency_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.name_ = name_; + result.decodedType_ = decodedType_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4089,20 +4132,17 @@ public final class BinaryMessages { if (other.hasMultipleResponses()) { setMultipleResponses(other.getMultipleResponses()); } - if (other.hasFactor()) { - setFactor(other.getFactor()); - } - if (other.hasOffset()) { - setOffset(other.getOffset()); - } if (other.hasFrequency()) { setFrequency(other.getFrequency()); } if (other.hasName()) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000080; name_ = other.name_; onChanged(); } + if (other.hasDecodedType()) { + setDecodedType(other.getDecodedType()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4351,115 +4391,49 @@ public final class BinaryMessages { return this; } - // optional double factor = 7; - private double factor_ ; - /** - * optional double factor = 7; - */ - public boolean hasFactor() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional double factor = 7; - */ - public double getFactor() { - return factor_; - } - /** - * optional double factor = 7; - */ - public Builder setFactor(double value) { - bitField0_ |= 0x00000040; - factor_ = value; - onChanged(); - return this; - } - /** - * optional double factor = 7; - */ - public Builder clearFactor() { - bitField0_ = (bitField0_ & ~0x00000040); - factor_ = 0D; - onChanged(); - return this; - } - - // optional double offset = 8; - private double offset_ ; - /** - * optional double offset = 8; - */ - public boolean hasOffset() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional double offset = 8; - */ - public double getOffset() { - return offset_; - } - /** - * optional double offset = 8; - */ - public Builder setOffset(double value) { - bitField0_ |= 0x00000080; - offset_ = value; - onChanged(); - return this; - } - /** - * optional double offset = 8; - */ - public Builder clearOffset() { - bitField0_ = (bitField0_ & ~0x00000080); - offset_ = 0D; - onChanged(); - return this; - } - - // optional double frequency = 9; + // optional double frequency = 7; private double frequency_ ; /** - * optional double frequency = 9; + * optional double frequency = 7; */ public boolean hasFrequency() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional double frequency = 9; + * optional double frequency = 7; */ public double getFrequency() { return frequency_; } /** - * optional double frequency = 9; + * optional double frequency = 7; */ public Builder setFrequency(double value) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000040; frequency_ = value; onChanged(); return this; } /** - * optional double frequency = 9; + * optional double frequency = 7; */ public Builder clearFrequency() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000040); frequency_ = 0D; onChanged(); return this; } - // optional string name = 10; + // optional string name = 8; private java.lang.Object name_ = ""; /** - * optional string name = 10; + * optional string name = 8; */ public boolean hasName() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional string name = 10; + * optional string name = 8; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -4473,7 +4447,7 @@ public final class BinaryMessages { } } /** - * optional string name = 10; + * optional string name = 8; */ public com.google.protobuf.ByteString getNameBytes() { @@ -4489,41 +4463,77 @@ public final class BinaryMessages { } } /** - * optional string name = 10; + * optional string name = 8; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000080; name_ = value; onChanged(); return this; } /** - * optional string name = 10; + * optional string name = 8; */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000080); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * optional string name = 10; + * optional string name = 8; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000080; name_ = value; onChanged(); return this; } + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + public boolean hasDecodedType() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { + return decodedType_; + } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + public Builder setDecodedType(com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + decodedType_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ + public Builder clearDecodedType() { + bitField0_ = (bitField0_ & ~0x00000100); + decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } @@ -7485,27 +7495,29 @@ 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\"\275\001\n\021DiagnosticRequest" + + "e\022\017\n\007message\030\002 \001(\t\"\375\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\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" + "\022multiple_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(\016" + + "2%.openxc.DiagnosticRequest.DecodedType\"" + + "!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022D" + + "iagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n" + + "\007success\030\005 \001(\010\022\036\n\026negative_response_code" + + "\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242" + + "\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.D", + "ynamicField.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\004BOO" + + "L\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.DynamicFie" + + "ld\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\014E" + + "VENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessa", + "ges" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7541,7 +7553,7 @@ public final class BinaryMessages { internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Factor", "Offset", "Frequency", "Name", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 1e2191d6..f8312303 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\"\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') + 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\"\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') @@ -75,6 +75,27 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( serialized_end=659, ) +_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( + name='DecodedType', + full_name='openxc.DiagnosticRequest.DecodedType', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='NONE', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='OBD2', index=1, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=961, + serialized_end=994, +) + _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='openxc.DynamicField.Type', @@ -96,8 +117,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1222, - serialized_end=1259, + serialized_start=1286, + serialized_end=1323, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -133,8 +154,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1417, - serialized_end=1509, + serialized_start=1481, + serialized_end=1573, ) @@ -365,30 +386,23 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='factor', full_name='openxc.DiagnosticRequest.factor', index=6, + name='frequency', full_name='openxc.DiagnosticRequest.frequency', 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='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='frequency', full_name='openxc.DiagnosticRequest.frequency', index=8, - number=9, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + name='name', full_name='openxc.DiagnosticRequest.name', index=7, + number=8, 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, options=None), _descriptor.FieldDescriptor( - 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"), + name='decoded_type', full_name='openxc.DiagnosticRequest.decoded_type', index=8, + number=9, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=1, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -397,12 +411,13 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( ], nested_types=[], enum_types=[ + _DIAGNOSTICREQUEST_DECODEDTYPE, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=741, - serialized_end=930, + serialized_end=994, ) @@ -478,8 +493,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=933, - serialized_end=1094, + serialized_start=997, + serialized_end=1158, ) @@ -528,8 +543,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1097, - serialized_end=1259, + serialized_start=1161, + serialized_end=1323, ) @@ -578,8 +593,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1262, - serialized_end=1509, + serialized_start=1326, + serialized_end=1573, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -593,6 +608,8 @@ _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE +_DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE +_DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index daccea2d..5b7e78b4 100644 --- a/openxc.proto +++ b/openxc.proto @@ -34,6 +34,8 @@ message CommandResponse { } message DiagnosticRequest { + enum DecodedType { NONE = 1; OBD2 = 2; } + optional int32 bus = 1; optional uint32 message_id = 2; optional uint32 mode = 3; @@ -42,10 +44,9 @@ message DiagnosticRequest { // support multi-frame responses optional bytes payload = 5; optional bool multiple_responses = 6; - optional double factor = 7; - optional double offset = 8; - optional double frequency = 9; - optional string name = 10; + optional double frequency = 7; + optional string name = 8; + optional DecodedType decoded_type = 9; } message DiagnosticResponse { -- cgit 1.2.3-korg From ab912b63e81209637f77f2e3eba23c5e75309dcb Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 26 Mar 2014 13:57:36 -0400 Subject: Clarify how diagnostic requests are identified, updated and cancelled. --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aa44b056..f67dad98 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,8 @@ with this command format: in the VI for longer. **frequency** - (optional, defaults to 0) The frequency in Hz to send this - request. To send a single request, set this to 0 or leave it out. + request. To send a single non-recurring request, set this to 0 or leave it + out. **decoded_type** - (optional, defaults to "obd2" if the request is a recognized OBD-II mode 1 request, otherwise "none") If specified, the valid values are @@ -105,10 +106,23 @@ OBD-II mode 1 request, otherwise "none") If specified, the valid values are OBD-II specification and returned in the `value` field. Set this to `none` to manually override the OBD-II decoding feature for a known PID. -The `bus+id+mode+pid` key is unique, so if you send a create request with that -key twice, it'll overwrite the existing one (i.e. it will change the frequency, -the only other parameter). To cancel a recurring request, send this command with -the frequency set to 0. +A diagnostic request's `bus`, `id`, `mode` and `pid` (or lack of a `pid`) +combine to create a unique key to identify a recurring request. This means that +you cannot simultaneosly have recurring requests at 2Hz and 5Hz for the same PID +from the same ID. + +If you send a new `diagnostic_request` command with a `bus + id + mode + pid` +key matching an existing recurring request, it will update it with whatever +other parameters you've provided (e.g. it will change the frequency if you +specify one). + +To cancel a recurring request, send a `diagnostic_request` command with the +matching request information (i.e. the `bus`, `id`, `mode` and `pid`) but a +frequency of 0. + +Non-recurring requests may have the same `bus+id+mode(+pid)` key as a recurring +request, and they will co-exist without issue. As soon as a non-recurring +request is either completed or times out, it is removed from the active list. If you're just requesting a PID, you can use this minimal field set for the `request` object: -- cgit 1.2.3-korg From 4a95199ecb9411d75fbf9038fe9490f153476fa8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 27 Mar 2014 11:38:33 -0400 Subject: Document delimiters for both formats. --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f67dad98..0ad8942d 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,22 @@ This specification is a part of the [OpenXC platform][OpenXC]. An OpenXC vehicle interface sends generic vehicle data over one or more output -interfaces (e.g. USB or Bluetooth) as JSON objects, separated by newlines. +interfaces (e.g. USB or Bluetooth) as JSON or Protocol Buffers (protobuf). -There are two valid message types - single valued and evented. +This document describes the JSON format and includes a high level description of +each type and field. Each JSON message published by a VI is delimited with a +`\0` character. + +The Protocol Buffer format is specified in the file `openxc.proto`. Those are +published using the standard length-delimited method (any protobuf library +should support this). + +## Single Valued There may not be a 1:1 relationship between input and output signals - i.e. raw engine timing CAN signals may be summarized in an "engine performance" metric on the abstract side of the interface. -## Single Valued - The expected format of a single valued message is: {"name": "steering_wheel_angle", "value": 45} -- cgit 1.2.3-korg From 5e0b413db0e57659bd6e654566d9aad5fc00e1e8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 27 Mar 2014 11:52:14 -0400 Subject: Clarify that 'newline' in trace file may or may not have \r. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0ad8942d..f26c5d1b 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,7 @@ discrete pieces of information in the measurement. ## Raw CAN Message format -An OpenXC vehicle interface may also output raw CAN messages. Each CAN message -is sent as a JSON object, separated by newlines. The format of each object is: +The format for a raw CAN message: {"bus": 1, "id": 1234, "value": "0x12345678"} @@ -217,7 +216,8 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. ## Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, -separated by newlines. +separated by newlines (which may be either `\r\n` or `\n`, depending on the +platform the trace file was recorded). The first line may be a metadata object, although this is optional: -- cgit 1.2.3-korg From b55b73d2d2353208dbf6bf982f288c281a017943 Mon Sep 17 00:00:00 2001 From: Erik Wilde Date: Tue, 8 Apr 2014 15:19:45 -0700 Subject: more gears with consumer vehicles now routinely having 8-speed gearboxes, gear_lever_position should go at least up to eighth, and maybe to be on the safe side even up to tenth. transmission_gear_position already went up to eighth, but for consistency it now also goes all the way up to tenth. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a56971ea..5b43032b 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,11 @@ manufacturers may support custom message names. * 1Hz, but sent immediately on change * transmission_gear_position * states: first, second, third, fourth, fifth, sixth, seventh, eighth, - reverse, neutral + ninth, tenth, reverse, neutral * 1Hz, but sent immediately on change * gear_lever_position * states: neutral, park, reverse, drive, sport, low, first, second, third, - fourth, fifth, sixth + fourth, fifth, sixth, seventh, eighth, ninth, tenth * 1Hz, but sent immediately on change * odometer * Numerical, km -- cgit 1.2.3-korg From 926725672103841912cb34a54bc87b2bd492fd8e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 13 Apr 2014 18:36:34 -0400 Subject: Add a quick list of the output from a build with OBD-II enabled. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index f26c5d1b..d23f4994 100644 --- a/README.md +++ b/README.md @@ -314,6 +314,27 @@ manufacturers may support custom message names. * numerical, -179.0 to 179.0 degrees with standard GPS accuracy * 1Hz +### Signals from Diagnostics Messages + +This set of signals is often retreived from OBD-II requests. The units can be +found in the [OBD-II standard](http://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01). + +* engine_load +* engine_coolant_temperature +* barometric_pressure +* commanded_throttle_position +* throttle_position +* fuel_level +* intake_air_temperature +* intake_manifold_pressure +* running_time +* fuel_pressure +* mass_airflow +* accelerator_pedal_position +* ethanol_fuel_percentage +* engine_oil_temperature +* engine_torque + License ======= -- cgit 1.2.3-korg From 4fa0f839fa036b276ae8698d84edab2d43271c16 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 13 Apr 2014 18:36:55 -0400 Subject: Bump copyright date. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d23f4994..f50ace39 100644 --- a/README.md +++ b/README.md @@ -338,7 +338,7 @@ found in the [OBD-II standard](http://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01) License ======= -Copyright (c) 2012-2013 Ford Motor Company +Copyright (c) 2012-2014 Ford Motor Company Licensed under the BSD license. -- cgit 1.2.3-korg From 9d8e52923c395cd7487c62850aeebff7b484828e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 29 Apr 2014 00:01:13 -0400 Subject: Add version to README. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1202c502..69de9bd1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # OpenXC Message Format Specification +Version: v0.2 + This specification is a part of the [OpenXC platform][OpenXC]. An OpenXC vehicle interface sends generic vehicle data over one or more output -- cgit 1.2.3-korg From 43f0abb2468b31d131b936ccf51844316426dc8a Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 29 Apr 2014 00:03:10 -0400 Subject: Bump to v0.3. --- CHANGELOG.md | 7 +++++++ README.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e40621ab..32f48535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # OpenXC Message Format Changelog +## v0.3 + +* Add diagnostic message request/response format. +* Officially add Protcol Buffer encoding. +* Change JSON delimiter to ```\0``` for both input and output. +* Officially document version and device ID commands. + ## v0.2 * Add a RAW can message format. diff --git a/README.md b/README.md index 69de9bd1..c17eb6de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenXC Message Format Specification -Version: v0.2 +Version: v0.3 This specification is a part of the [OpenXC platform][OpenXC]. -- cgit 1.2.3-korg From 5b6cdb5a31bd0863a21791491a60ea18a7c4e39f Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 29 Apr 2014 00:04:31 -0400 Subject: Bump to next dev release. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c17eb6de..9c5aeb88 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenXC Message Format Specification -Version: v0.3 +Version: v0.4-dev This specification is a part of the [OpenXC platform][OpenXC]. -- cgit 1.2.3-korg From 07f39f72a945b6f94aafa3f3370fcf35ab87618e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 24 May 2014 21:30:12 -0400 Subject: Fix typo in example for raw message format. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c17eb6de..edef8f8d 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ discrete pieces of information in the measurement. The format for a raw CAN message: - {"bus": 1, "id": 1234, "value": "0x12345678"} + {"bus": 1, "id": 1234, "data": "0x12345678"} **bus** - the numerical identifier of the CAN bus where this message originated, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). -- cgit 1.2.3-korg From e40ef7b8d0db0198ed6a77a446c7aa350271fa66 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 11 Jun 2014 23:28:53 -0400 Subject: Remove factor and offset from diag requests - left up to clients. --- CHANGELOG.md | 6 ++++++ README.md | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32f48535..66d73c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # OpenXC Message Format Changelog +## v0.3.1-dev + +* Removed factor and offset from diagnostic requests to minimize the number of + fields, and since this is such an uncommon use case and one that can be + handled by the client receiving the data. We may add them back in the future. + ## v0.3 * Add diagnostic message request/response format. diff --git a/README.md b/README.md index edef8f8d..b0647dae 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,6 @@ with this command format: "pid": 5, "payload": "0x1234", "multiple_responses": false, - "factor": 1.0, - "offset": 0, "frequency": 1, "name": "my_pid" } -- cgit 1.2.3-korg From 9e854584b0182c545ce80b256b236edf811e233a Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 25 Jun 2014 18:49:03 -0400 Subject: Make the protobuf format more clear in README. --- CHANGELOG.md | 2 +- README.md | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66d73c1f..a04b26f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # OpenXC Message Format Changelog -## v0.3.1-dev +## v0.4-dev * Removed factor and offset from diagnostic requests to minimize the number of fields, and since this is such an uncommon use case and one that can be diff --git a/README.md b/README.md index 9ff9b2ed..6c4e23b7 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,19 @@ This specification is a part of the [OpenXC platform][OpenXC]. An OpenXC vehicle interface sends generic vehicle data over one or more output interfaces (e.g. USB or Bluetooth) as JSON or Protocol Buffers (protobuf). -This document describes the JSON format and includes a high level description of -each type and field. Each JSON message published by a VI is delimited with a -`\0` character. +## Binary (Protocol Buffers) The Protocol Buffer format is specified in the file `openxc.proto`. Those are published using the standard length-delimited method (any protobuf library should support this). -## Single Valued +## JSON + +This document describes the JSON format and includes a high level description of +each type and field. Each JSON message published by a VI is delimited with a +`\0` character. + +### Single Valued There may not be a 1:1 relationship between input and output signals - i.e. raw engine timing CAN signals may be summarized in an "engine performance" metric on @@ -25,7 +29,7 @@ The expected format of a single valued message is: {"name": "steering_wheel_angle", "value": 45} -## Evented +### Evented The expected format of an event message is: @@ -34,7 +38,7 @@ The expected format of an event message is: This format is good for something like a button event, where there are two discrete pieces of information in the measurement. -## Raw CAN Message format +### Raw CAN Message format The format for a raw CAN message: @@ -51,9 +55,9 @@ The format for a raw CAN message: the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the complete string must have an even number of characters. -## Diagnostic Messages +### Diagnostic Messages -### Requests +#### Requests A request to add or update a diagnostic request is sent to a vehicle interface with this command format: @@ -134,7 +138,7 @@ If you're just requesting a PID, you can use this minimal field set for the {"bus": 1, "id": 1234, "mode": 1, "pid": 5} -### Responses +#### Responses The response to a successful request: @@ -185,9 +189,9 @@ The response to a simple PID request would look like this: {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} -## Commands +### Commands -### Version Query +#### Version Query The `version` command triggers the VI to inject a firmware version identifier response into the outgoing data stream. @@ -200,7 +204,7 @@ response into the outgoing data stream. { "command_response": "version", "message": "v6.0-dev (default)"} -### Device ID Query +#### Device ID Query The `device_id` command triggers the VI to inject a unique device ID (e.g. the MAC address of an included Bluetooth module) into into the outgoing data stream. @@ -213,7 +217,7 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. { "command_response": "device_id", "message": "0012345678"} -## Trace File Format +### Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, separated by newlines (which may be either `\r\n` or `\n`, depending on the -- cgit 1.2.3-korg From 9557c4b2a1107368b049d56419af38c9aa1e9434 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Wed, 25 Jun 2014 18:52:43 -0400 Subject: Add 'extras' field to JSON messages for custom data. --- CHANGELOG.md | 1 + README.md | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a04b26f8..3a393f1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Removed factor and offset from diagnostic requests to minimize the number of fields, and since this is such an uncommon use case and one that can be handled by the client receiving the data. We may add them back in the future. +* Add `extras` field to JSON messages. ## v0.3 diff --git a/README.md b/README.md index 6c4e23b7..fd32e900 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,20 @@ should support this). This document describes the JSON format and includes a high level description of each type and field. Each JSON message published by a VI is delimited with a -`\0` character. +`\0 ` character. + +### Extra Values + +Any of the following JSON objects may optionally include an `extras` +field. The value may be any valid JSON object or array. The client libraries +will do their best to parse this information into a generic format and pass it +to your application. For example: + + {"name": "steering_wheel_angle", "value": 45, + "extras": { + "calibrated": false + } + } ### Single Valued -- cgit 1.2.3-korg From 3b29964126040a3704f004381e0329da50e391b0 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 4 Aug 2014 21:36:47 -0400 Subject: Expand diagnostic mode field to a full byte's range. Fixed #10. --- CHANGELOG.md | 1 + README.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a393f1e..ed22556c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ fields, and since this is such an uncommon use case and one that can be handled by the client receiving the data. We may add them back in the future. * Add `extras` field to JSON messages. +* Expand range of mode field to a full byte (#10) ## v0.3 diff --git a/README.md b/README.md index fd32e900..3e496bd5 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,8 @@ with this command format: **id** - the CAN arbitration ID for the request. -**mode** - the OBD-II mode of the request - 1 through 15 (1 through 9 are the - standardized modes). +**mode** - the OBD-II mode of the request - 1 through 255 (1 through 9 are the + standardized modes and 0x22 is a common proprietary mode). **pid** - (optional) the PID for the request, if applicable. -- cgit 1.2.3-korg From 570048644e960862858dfd984c34f55f6b63144f Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 4 Aug 2014 21:41:35 -0400 Subject: Explain when to use JSON vs. binary. --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e496bd5..3e169709 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,13 @@ interfaces (e.g. USB or Bluetooth) as JSON or Protocol Buffers (protobuf). ## Binary (Protocol Buffers) -The Protocol Buffer format is specified in the file `openxc.proto`. Those are -published using the standard length-delimited method (any protobuf library -should support this). +The binary format is encoded using [Google Protocol +Buffers](https://code.google.com/p/protobuf/). The format is specified in the +file `openxc.proto`. Those are published using the standard length-delimited +method (any protobuf library should support this). + +The binary format is best if you need to maximize the amount of data that can be +sent from the VI, trading off flexibility for efficiency. ## JSON @@ -19,6 +23,9 @@ This document describes the JSON format and includes a high level description of each type and field. Each JSON message published by a VI is delimited with a `\0 ` character. +The JSON format is best for most developers, as it is fairly efficient and very +flexible. + ### Extra Values Any of the following JSON objects may optionally include an `extras` -- cgit 1.2.3-korg From aa4a2cd92afecf5ce6e3faba441d3b8758b5c372 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 4 Aug 2014 22:04:57 -0400 Subject: Require an 'action' in diagnostic requests. It wasn't very clean to try and infer a delete/create/update based on the value of the frequency field - this will require a little more code, but as they say in Python, explicit is better than implicit. Fixed https://github.com/openxc/openxc-message-format/issues/12 --- README.md | 118 ++++++++++++----- gen/cpp/openxc.pb | 17 ++- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 19 ++- gen/java/com/openxc/BinaryMessages.java | 223 +++++++++++++++++++++++++++++--- gen/python/openxc_pb2.py | 63 +++++++-- openxc.proto | 2 + 7 files changed, 372 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index 3e169709..ca401363 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ field. The value may be any valid JSON object or array. The client libraries will do their best to parse this information into a generic format and pass it to your application. For example: - {"name": "steering_wheel_angle", "value": 45, + {"name": "steering_wheel_angle", + "value": 45, "extras": { "calibrated": false } @@ -79,10 +80,11 @@ The format for a raw CAN message: #### Requests -A request to add or update a diagnostic request is sent to a vehicle interface -with this command format: +A diagnostic request is created, update and deleted with a JSON object like this +example: { "command": "diagnostic_request", + "action": "create", "request": { "bus": 1, "id": 1234, @@ -96,6 +98,83 @@ with this command format: } } +* The `command` must be `diagnostic_request.` +* The `action` must be included, and must be one of: + * `create` - create a new one-off or recurring diagnostic request. + * `update` - update an existing request. + * `delete` - delete an existing request. +* The details of the request must be included in the `request` field, using + the sub-fields defined below. + +A diagnostic request's `bus`, `id`, `mode` and `pid` (or lack of a `pid`) +combine to create a unique key to identify a request. These four fields will be +referred to as the key of the diagnostic request. For example, to create a +simple one-time diagnostic request: + + { "command": "diagnostic_request", + "action": "create", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5 + } + } + } + +Requests are completed after any responses are received (unless +`multiple_responses` is set), or the request has timed out after a certain +number of seconds. After a request is completed, you can re-`create` the same +key to make another request. + +Requests with a `frequency` are added as *recurring* requests, e.g. to add the +previous example as a recurring request at 1Hz: + + { "command": "diagnostic_request", + "action": "create", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "frequency": 1 + } + } + } + +To cancel a recurring request, send a `cancel` action with the same key, e.g.: + + { "command": "diagnostic_request", + "action": "delete", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5 + } + } + } + +To update one of the fields of a recurring request, send an `update` action with +the same key, plus the field to update. For example, to change the frequency of +the example request to 2Hz: + + { "command": "diagnostic_request", + "action": "update", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "frequency": 2 + } + } + } + +Simultaneous recurring requests for the same key at different rates (e.g. 1Hz +*and* 2Hz) is not supported. However, non-recurring ("one-off") requests may +exist in parallel with a recurring request for the same key. + **bus** - the numerical identifier of the CAN bus where this request should be sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). @@ -107,7 +186,7 @@ with this command format: **pid** - (optional) the PID for the request, if applicable. **payload** - (optional) up to 7 bytes of data for the request's payload - represented as a hexidecimal number in a string. Many JSON parser cannot + represented as a hexadecimal number in a string. Many JSON parser cannot handle 64-bit integers, which is why we are not using a numerical data type. Each byte in the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the complete string must have an even number of characters. @@ -125,9 +204,8 @@ with this command format: see any additional responses after the first and it will just take up memory in the VI for longer. -**frequency** - (optional, defaults to 0) The frequency in Hz to send this - request. To send a single non-recurring request, set this to 0 or leave it - out. +**frequency** - (optional) Make this request a recurring request, at a this + frequency in Hz. To send a single non-recurring request, leave this field out. **decoded_type** - (optional, defaults to "obd2" if the request is a recognized OBD-II mode 1 request, otherwise "none") If specified, the valid values are @@ -135,29 +213,6 @@ OBD-II mode 1 request, otherwise "none") If specified, the valid values are OBD-II specification and returned in the `value` field. Set this to `none` to manually override the OBD-II decoding feature for a known PID. -A diagnostic request's `bus`, `id`, `mode` and `pid` (or lack of a `pid`) -combine to create a unique key to identify a recurring request. This means that -you cannot simultaneosly have recurring requests at 2Hz and 5Hz for the same PID -from the same ID. - -If you send a new `diagnostic_request` command with a `bus + id + mode + pid` -key matching an existing recurring request, it will update it with whatever -other parameters you've provided (e.g. it will change the frequency if you -specify one). - -To cancel a recurring request, send a `diagnostic_request` command with the -matching request information (i.e. the `bus`, `id`, `mode` and `pid`) but a -frequency of 0. - -Non-recurring requests may have the same `bus+id+mode(+pid)` key as a recurring -request, and they will co-exist without issue. As soon as a non-recurring -request is either completed or times out, it is removed from the active list. - -If you're just requesting a PID, you can use this minimal field set for the -`request` object: - - {"bus": 1, "id": 1234, "mode": 1, "pid": 5} - #### Responses The response to a successful request: @@ -211,6 +266,9 @@ The response to a simple PID request would look like this: ### Commands +In addition to the `diagnostic_request` command described earlier, there are +other possible values for the `command` field. + #### Version Query The `version` command triggers the VI to inject a firmware version identifier diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index da312337..282e5818 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -à +£ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -32,7 +32,7 @@ message_id (  DIAGNOSTIC"M CommandResponse) type (2.openxc.ControlCommand.Type -message ( "ý +message ( "Ý DiagnosticRequest bus ( @@ -43,10 +43,19 @@ message_id (  multiple_responses ( frequency ( name ( ; - decoded_type (2%.openxc.DiagnosticRequest.DecodedType"! + decoded_type (2%.openxc.DiagnosticRequest.DecodedType0 +action + (2 .openxc.DiagnosticRequest.Action"! DecodedType NONE -OBD2"¡ +OBD2", +Action + +CREATE + +UPDATE + +DELETE"¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index e3be2570..24f4b3c6 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 Wed Mar 26 09:29:06 2014. */ +/* Generated by nanopb-0.2.5 at Mon Aug 4 23:15:59 2014. */ #include "openxc.pb.h" @@ -34,7 +34,7 @@ const pb_field_t openxc_CommandResponse_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticRequest_fields[10] = { +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), @@ -44,6 +44,7 @@ const pb_field_t openxc_DiagnosticRequest_fields[10] = { PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, multiple_responses, 0), PB_FIELD2( 8, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), PB_FIELD2( 9, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, decoded_type, name, 0), + PB_FIELD2( 10, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, action, decoded_type, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index e70324f0..d0c7da49 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 Wed Mar 26 09:29:06 2014. */ +/* Generated by nanopb-0.2.5 at Mon Aug 4 23:15:59 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -29,6 +29,12 @@ typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_OBD2 = 2 } openxc_DiagnosticRequest_DecodedType; +typedef enum _openxc_DiagnosticRequest_Action { + openxc_DiagnosticRequest_Action_CREATE = 1, + openxc_DiagnosticRequest_Action_UPDATE = 2, + openxc_DiagnosticRequest_Action_DELETE = 3 +} openxc_DiagnosticRequest_Action; + typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_STRING = 1, openxc_DynamicField_Type_NUM = 2, @@ -76,6 +82,8 @@ typedef struct _openxc_DiagnosticRequest { char name[10]; bool has_decoded_type; openxc_DiagnosticRequest_DecodedType decoded_type; + bool has_action; + openxc_DiagnosticRequest_Action action; } openxc_DiagnosticRequest; typedef struct { @@ -174,6 +182,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_frequency_tag 7 #define openxc_DiagnosticRequest_name_tag 8 #define openxc_DiagnosticRequest_decoded_type_tag 9 +#define openxc_DiagnosticRequest_action_tag 10 #define openxc_DiagnosticResponse_bus_tag 1 #define openxc_DiagnosticResponse_message_id_tag 2 #define openxc_DiagnosticResponse_mode_tag 3 @@ -207,17 +216,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[10]; +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 664 +#define openxc_VehicleMessage_size 670 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 76 +#define openxc_ControlCommand_size 82 #define openxc_CommandResponse_size 137 -#define openxc_DiagnosticRequest_size 68 +#define openxc_DiagnosticRequest_size 74 #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 777acd03..dbec8701 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3399,6 +3399,16 @@ public final class BinaryMessages { * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); + + // optional .openxc.DiagnosticRequest.Action action = 10; + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + boolean hasAction(); + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + com.openxc.BinaryMessages.DiagnosticRequest.Action getAction(); } /** * Protobuf type {@code openxc.DiagnosticRequest} @@ -3502,6 +3512,17 @@ public final class BinaryMessages { } break; } + case 80: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticRequest.Action value = com.openxc.BinaryMessages.DiagnosticRequest.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(10, rawValue); + } else { + bitField0_ |= 0x00000200; + action_ = value; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3623,6 +3644,97 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) } + /** + * Protobuf enum {@code openxc.DiagnosticRequest.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CREATE = 1; + */ + CREATE(0, 1), + /** + * UPDATE = 2; + */ + UPDATE(1, 2), + /** + * DELETE = 3; + */ + DELETE(2, 3), + ; + + /** + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * UPDATE = 2; + */ + public static final int UPDATE_VALUE = 2; + /** + * DELETE = 3; + */ + public static final int DELETE_VALUE = 3; + + + public final int getNumber() { return value; } + + public static Action valueOf(int value) { + switch (value) { + case 1: return CREATE; + case 2: return UPDATE; + case 3: return DELETE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(1); + } + + private static final Action[] VALUES = values(); + + public static Action valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Action(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.Action) + } + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -3805,6 +3917,22 @@ public final class BinaryMessages { return decodedType_; } + // optional .openxc.DiagnosticRequest.Action action = 10; + public static final int ACTION_FIELD_NUMBER = 10; + private com.openxc.BinaryMessages.DiagnosticRequest.Action action_; + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { + return action_; + } + private void initFields() { bus_ = 0; messageId_ = 0; @@ -3815,6 +3943,7 @@ public final class BinaryMessages { frequency_ = 0D; name_ = ""; decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3855,6 +3984,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeEnum(9, decodedType_.getNumber()); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeEnum(10, action_.getNumber()); + } getUnknownFields().writeTo(output); } @@ -3900,6 +4032,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeEnumSize(9, decodedType_.getNumber()); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, action_.getNumber()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -4034,6 +4170,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; bitField0_ = (bitField0_ & ~0x00000100); + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4098,6 +4236,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000100; } result.decodedType_ = decodedType_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.action_ = action_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4143,6 +4285,9 @@ public final class BinaryMessages { if (other.hasDecodedType()) { setDecodedType(other.getDecodedType()); } + if (other.hasAction()) { + setAction(other.getAction()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4534,6 +4679,42 @@ public final class BinaryMessages { return this; } + // optional .openxc.DiagnosticRequest.Action action = 10; + private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { + return action_; + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public Builder setAction(com.openxc.BinaryMessages.DiagnosticRequest.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DiagnosticRequest.Action action = 10; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000200); + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } @@ -7495,29 +7676,31 @@ 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\"\375\001\n\021DiagnosticRequest" + + "e\022\017\n\007message\030\002 \001(\t\"\335\002\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\032\n" + "\022multiple_responses\030\006 \001(\010\022\021\n\tfrequency\030\007" + " \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\016" + - "2%.openxc.DiagnosticRequest.DecodedType\"" + - "!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022D" + - "iagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n" + - "\007success\030\005 \001(\010\022\036\n\026negative_response_code" + - "\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242" + - "\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.D", - "ynamicField.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\004BOO" + - "L\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.DynamicFie" + - "ld\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\014E" + - "VENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessa", - "ges" + "2%.openxc.DiagnosticRequest.DecodedType\022" + + "0\n\006action\030\n \001(\0162 .openxc.DiagnosticReque" + + "st.Action\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OB" + + "D2\020\002\",\n\006Action\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n" + + "\n\006DELETE\020\003\"\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() { @@ -7553,7 +7736,7 @@ public final class BinaryMessages { internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", "Action", }); 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 f8312303..cf6e0145 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\"\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\"\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\"\xdd\x02\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\",\n\x06\x41\x63tion\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -92,8 +92,33 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=961, - serialized_end=994, + serialized_start=1011, + serialized_end=1044, +) + +_DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( + name='Action', + full_name='openxc.DiagnosticRequest.Action', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='CREATE', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UPDATE', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='DELETE', index=2, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1046, + serialized_end=1090, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -117,8 +142,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1286, - serialized_end=1323, + serialized_start=1382, + serialized_end=1419, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -154,8 +179,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1481, - serialized_end=1573, + serialized_start=1577, + serialized_end=1669, ) @@ -406,18 +431,26 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='action', full_name='openxc.DiagnosticRequest.action', index=9, + number=10, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=1, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], nested_types=[], enum_types=[ _DIAGNOSTICREQUEST_DECODEDTYPE, + _DIAGNOSTICREQUEST_ACTION, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=741, - serialized_end=994, + serialized_end=1090, ) @@ -493,8 +526,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=997, - serialized_end=1158, + serialized_start=1093, + serialized_end=1254, ) @@ -543,8 +576,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1161, - serialized_end=1323, + serialized_start=1257, + serialized_end=1419, ) @@ -593,8 +626,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1326, - serialized_end=1573, + serialized_start=1422, + serialized_end=1669, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -609,7 +642,9 @@ _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICR _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE +_DIAGNOSTICREQUEST.fields_by_name['action'].enum_type = _DIAGNOSTICREQUEST_ACTION _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; +_DIAGNOSTICREQUEST_ACTION.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 5b7e78b4..aa7f7344 100644 --- a/openxc.proto +++ b/openxc.proto @@ -35,6 +35,7 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } + enum Action { CREATE = 1; UPDATE = 2; DELETE = 3; } optional int32 bus = 1; optional uint32 message_id = 2; @@ -47,6 +48,7 @@ message DiagnosticRequest { optional double frequency = 7; optional string name = 8; optional DecodedType decoded_type = 9; + optional Action action = 10; } message DiagnosticResponse { -- cgit 1.2.3-korg From 3cd516b8f2925e82cff666a5c98ff30de507ca39 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 10 Aug 2014 21:51:13 -0400 Subject: Remove 'update' feature of diag request commands. --- README.md | 32 ++++----------- gen/cpp/openxc.pb | 15 +++---- gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 7 ++-- gen/java/com/openxc/BinaryMessages.java | 73 +++++++++++++++------------------ gen/python/openxc_pb2.py | 34 +++++++-------- openxc.proto | 2 +- 7 files changed, 65 insertions(+), 100 deletions(-) diff --git a/README.md b/README.md index ca401363..50c166b1 100644 --- a/README.md +++ b/README.md @@ -80,11 +80,10 @@ The format for a raw CAN message: #### Requests -A diagnostic request is created, update and deleted with a JSON object like this -example: +A diagnostic request is added or cancelled with a JSON object like this example: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -100,9 +99,8 @@ example: * The `command` must be `diagnostic_request.` * The `action` must be included, and must be one of: - * `create` - create a new one-off or recurring diagnostic request. - * `update` - update an existing request. - * `delete` - delete an existing request. + * `add` - create a new one-off or recurring diagnostic request. + * `cancel` - cancel an existing request. * The details of the request must be included in the `request` field, using the sub-fields defined below. @@ -112,7 +110,7 @@ referred to as the key of the diagnostic request. For example, to create a simple one-time diagnostic request: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -131,7 +129,7 @@ Requests with a `frequency` are added as *recurring* requests, e.g. to add the previous example as a recurring request at 1Hz: { "command": "diagnostic_request", - "action": "create", + "action": "add", "request": { "bus": 1, "id": 1234, @@ -145,7 +143,7 @@ previous example as a recurring request at 1Hz: To cancel a recurring request, send a `cancel` action with the same key, e.g.: { "command": "diagnostic_request", - "action": "delete", + "action": "cancel", "request": { "bus": 1, "id": 1234, @@ -155,22 +153,6 @@ To cancel a recurring request, send a `cancel` action with the same key, e.g.: } } -To update one of the fields of a recurring request, send an `update` action with -the same key, plus the field to update. For example, to change the frequency of -the example request to 2Hz: - - { "command": "diagnostic_request", - "action": "update", - "request": { - "bus": 1, - "id": 1234, - "mode": 1, - "pid": 5, - "frequency": 2 - } - } - } - Simultaneous recurring requests for the same key at different rates (e.g. 1Hz *and* 2Hz) is not supported. However, non-recurring ("one-off") requests may exist in parallel with a recurring request for the same key. diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 282e5818..719c9397 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -£ +” openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -32,7 +32,7 @@ message_id (  DIAGNOSTIC"M CommandResponse) type (2.openxc.ControlCommand.Type -message ( "Ý +message ( "Î DiagnosticRequest bus ( @@ -48,14 +48,11 @@ message_id (  (2 .openxc.DiagnosticRequest.Action"! DecodedType NONE -OBD2", -Action +OBD2" +Action +ADD -CREATE - -UPDATE - -DELETE"¡ +CANCEL"¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 24f4b3c6..ae44728e 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 Mon Aug 4 23:15:59 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 21:51:35 2014. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index d0c7da49..7cceffa2 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 Aug 4 23:15:59 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 21:51:35 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -30,9 +30,8 @@ typedef enum _openxc_DiagnosticRequest_DecodedType { } openxc_DiagnosticRequest_DecodedType; typedef enum _openxc_DiagnosticRequest_Action { - openxc_DiagnosticRequest_Action_CREATE = 1, - openxc_DiagnosticRequest_Action_UPDATE = 2, - openxc_DiagnosticRequest_Action_DELETE = 3 + openxc_DiagnosticRequest_Action_ADD = 1, + openxc_DiagnosticRequest_Action_CANCEL = 3 } openxc_DiagnosticRequest_Action; typedef enum _openxc_DynamicField_Type { diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index dbec8701..a30e70f4 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3650,40 +3650,31 @@ public final class BinaryMessages { public enum Action implements com.google.protobuf.ProtocolMessageEnum { /** - * CREATE = 1; + * ADD = 1; */ - CREATE(0, 1), + ADD(0, 1), /** - * UPDATE = 2; + * CANCEL = 3; */ - UPDATE(1, 2), - /** - * DELETE = 3; - */ - DELETE(2, 3), + CANCEL(1, 3), ; /** - * CREATE = 1; - */ - public static final int CREATE_VALUE = 1; - /** - * UPDATE = 2; + * ADD = 1; */ - public static final int UPDATE_VALUE = 2; + public static final int ADD_VALUE = 1; /** - * DELETE = 3; + * CANCEL = 3; */ - public static final int DELETE_VALUE = 3; + public static final int CANCEL_VALUE = 3; public final int getNumber() { return value; } public static Action valueOf(int value) { switch (value) { - case 1: return CREATE; - case 2: return UPDATE; - case 3: return DELETE; + case 1: return ADD; + case 3: return CANCEL; default: return null; } } @@ -3943,7 +3934,7 @@ public final class BinaryMessages { frequency_ = 0D; name_ = ""; decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4170,7 +4161,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; bitField0_ = (bitField0_ & ~0x00000100); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4680,7 +4671,7 @@ public final class BinaryMessages { } // optional .openxc.DiagnosticRequest.Action action = 10; - private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; /** * optional .openxc.DiagnosticRequest.Action action = 10; */ @@ -4710,7 +4701,7 @@ public final class BinaryMessages { */ public Builder clearAction() { bitField0_ = (bitField0_ & ~0x00000200); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.CREATE; + action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; onChanged(); return this; } @@ -7676,7 +7667,7 @@ 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\"\335\002\n\021DiagnosticRequest" + + "e\022\017\n\007message\030\002 \001(\t\"\316\002\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\032\n" + "\022multiple_responses\030\006 \001(\010\022\021\n\tfrequency\030\007" + @@ -7684,23 +7675,23 @@ public final class BinaryMessages { "2%.openxc.DiagnosticRequest.DecodedType\022" + "0\n\006action\030\n \001(\0162 .openxc.DiagnosticReque" + "st.Action\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OB" + - "D2\020\002\",\n\006Action\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n" + - "\n\006DELETE\020\003\"\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" + "D2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\003\"\241\001\n\022" + + "DiagnosticResponse\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\007success\030\005 \001(\010\022\036\n\026negative_response_cod", + "e\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"" + + "\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc." + + "DynamicField.Type\022\024\n\014string_value\030\002 \001(\t\022" + + "\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_value\030" + + "\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BO" + + "OL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\016" + + "2\036.openxc.TranslatedMessage.Type\022\014\n\004name" + + "\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicFi" + + "eld\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\014" + + "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" + + "ages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index cf6e0145..81a56c60 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\"\xdd\x02\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\",\n\x06\x41\x63tion\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\";\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\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\"\xce\x02\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -103,22 +103,18 @@ _DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='CREATE', index=0, number=1, + name='ADD', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='UPDATE', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DELETE', index=2, number=3, + name='CANCEL', index=1, number=3, options=None, type=None), ], containing_type=None, options=None, serialized_start=1046, - serialized_end=1090, + serialized_end=1075, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -142,8 +138,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1382, - serialized_end=1419, + serialized_start=1367, + serialized_end=1404, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -179,8 +175,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1577, - serialized_end=1669, + serialized_start=1562, + serialized_end=1654, ) @@ -450,7 +446,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=741, - serialized_end=1090, + serialized_end=1075, ) @@ -526,8 +522,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1093, - serialized_end=1254, + serialized_start=1078, + serialized_end=1239, ) @@ -576,8 +572,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1257, - serialized_end=1419, + serialized_start=1242, + serialized_end=1404, ) @@ -626,8 +622,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1422, - serialized_end=1669, + serialized_start=1407, + serialized_end=1654, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index aa7f7344..1f03b439 100644 --- a/openxc.proto +++ b/openxc.proto @@ -35,7 +35,7 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } - enum Action { CREATE = 1; UPDATE = 2; DELETE = 3; } + enum Action { ADD = 1; CANCEL = 3; } optional int32 bus = 1; optional uint32 message_id = 2; -- cgit 1.2.3-korg From fcb217ef4140319ee8557f849bbaf01ecfe92e6f Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 10 Aug 2014 22:05:11 -0400 Subject: Add a 'status' field to command responses. --- gen/cpp/openxc.pb | 7 +- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 11 ++- gen/java/com/openxc/BinaryMessages.java | 135 +++++++++++++++++++++++++------- gen/python/openxc_pb2.py | 43 +++++----- openxc.proto | 1 + 6 files changed, 148 insertions(+), 54 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 719c9397..e74bf809 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -” +¤ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -29,10 +29,11 @@ message_id (  VERSION DEVICE_ID -DIAGNOSTIC"M +DIAGNOSTIC"] CommandResponse) type (2.openxc.ControlCommand.Type -message ( "Î +message (  +status ("Î DiagnosticRequest bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ae44728e..e7fac5b5 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.5 at Sun Aug 10 21:51:35 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 22:03:53 2014. */ #include "openxc.pb.h" @@ -28,9 +28,10 @@ const pb_field_t openxc_ControlCommand_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_CommandResponse_fields[3] = { +const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), + PB_FIELD2( 3, BOOL , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, status, message, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 7cceffa2..40993335 100644 --- a/gen/cpp/openxc.pb.h +++ b/gen/cpp/openxc.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.2.5 at Sun Aug 10 21:51:35 2014. */ +/* Generated by nanopb-0.2.5 at Sun Aug 10 22:03:53 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -55,6 +55,8 @@ typedef struct _openxc_CommandResponse { openxc_ControlCommand_Type type; bool has_message; char message[128]; + bool has_status; + bool status; } openxc_CommandResponse; typedef struct { @@ -172,6 +174,7 @@ typedef struct _openxc_VehicleMessage { /* Field tags (for use in manual encoding/decoding) */ #define openxc_CommandResponse_type_tag 1 #define openxc_CommandResponse_message_tag 2 +#define openxc_CommandResponse_status_tag 3 #define openxc_DiagnosticRequest_bus_tag 1 #define openxc_DiagnosticRequest_message_id_tag 2 #define openxc_DiagnosticRequest_mode_tag 3 @@ -214,17 +217,17 @@ typedef struct _openxc_VehicleMessage { 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_CommandResponse_fields[4]; 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 670 +#define openxc_VehicleMessage_size 672 #define openxc_RawMessage_size 27 #define openxc_ControlCommand_size 82 -#define openxc_CommandResponse_size 137 +#define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 74 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index a30e70f4..1465301e 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2758,6 +2758,16 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getMessageBytes(); + + // optional bool status = 3; + /** + * optional bool status = 3; + */ + boolean hasStatus(); + /** + * optional bool status = 3; + */ + boolean getStatus(); } /** * Protobuf type {@code openxc.CommandResponse} @@ -2826,6 +2836,11 @@ public final class BinaryMessages { message_ = input.readBytes(); break; } + case 24: { + bitField0_ |= 0x00000004; + status_ = input.readBool(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2925,9 +2940,26 @@ public final class BinaryMessages { } } + // optional bool status = 3; + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + * optional bool status = 3; + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool status = 3; + */ + public boolean getStatus() { + return status_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; message_ = ""; + status_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2947,6 +2979,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getMessageBytes()); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, status_); + } getUnknownFields().writeTo(output); } @@ -2964,6 +2999,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getMessageBytes()); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -3084,6 +3123,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); message_ = ""; bitField0_ = (bitField0_ & ~0x00000002); + status_ = false; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -3120,6 +3161,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000002; } result.message_ = message_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.status_ = status_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3144,6 +3189,9 @@ public final class BinaryMessages { message_ = other.message_; onChanged(); } + if (other.hasStatus()) { + setStatus(other.getStatus()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -3281,6 +3329,39 @@ public final class BinaryMessages { return this; } + // optional bool status = 3; + private boolean status_ ; + /** + * optional bool status = 3; + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + * optional bool status = 3; + */ + public Builder setStatus(boolean value) { + bitField0_ |= 0x00000004; + status_ = value; + onChanged(); + return this; + } + /** + * optional bool status = 3; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + status_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.CommandResponse) } @@ -7665,33 +7746,33 @@ public final class BinaryMessages { "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" + "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" + "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + - "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" + + "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"]\n\017CommandResponse\022)" + "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" + - "e\022\017\n\007message\030\002 \001(\t\"\316\002\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\032\n" + - "\022multiple_responses\030\006 \001(\010\022\021\n\tfrequency\030\007" + - " \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\016" + - "2%.openxc.DiagnosticRequest.DecodedType\022" + - "0\n\006action\030\n \001(\0162 .openxc.DiagnosticReque" + - "st.Action\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OB" + - "D2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\003\"\241\001\n\022" + - "DiagnosticResponse\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\007success\030\005 \001(\010\022\036\n\026negative_response_cod", - "e\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"" + - "\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc." + - "DynamicField.Type\022\024\n\014string_value\030\002 \001(\t\022" + - "\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_value\030" + - "\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BO" + - "OL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\016" + - "2\036.openxc.TranslatedMessage.Type\022\014\n\004name" + - "\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicFi" + - "eld\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\014" + - "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" + - "ages" + "e\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\316\002\n\021D" + + "iagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage", + "_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007" + + "payload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(" + + "\010\022\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014de" + + "coded_type\030\t \001(\0162%.openxc.DiagnosticRequ" + + "est.DecodedType\0220\n\006action\030\n \001(\0162 .openxc" + + ".DiagnosticRequest.Action\"!\n\013DecodedType" + + "\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022" + + "\n\n\006CANCEL\020\003\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + + "s\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(" + + "\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negat", + "ive_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014" + + "\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type" + + "\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014str" + + "ing_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025" + + "\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020" + + "\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessa" + + "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + + "age.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024." + + "openxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.ope" + + "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003", + "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + + "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + + "enxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7721,7 +7802,7 @@ public final class BinaryMessages { internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, - new java.lang.String[] { "Type", "Message", }); + new java.lang.String[] { "Type", "Message", "Status", }); internal_static_openxc_DiagnosticRequest_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 81a56c60..15a6486a 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\"\xce\x02\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\";\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xa6\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xce\x02\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -92,8 +92,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1011, - serialized_end=1044, + serialized_start=1027, + serialized_end=1060, ) _DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( @@ -113,8 +113,8 @@ _DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1046, - serialized_end=1075, + serialized_start=1062, + serialized_end=1091, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -138,8 +138,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1367, - serialized_end=1404, + serialized_start=1383, + serialized_end=1420, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +175,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1562, - serialized_end=1654, + serialized_start=1578, + serialized_end=1670, ) @@ -343,6 +343,13 @@ _COMMANDRESPONSE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='status', full_name='openxc.CommandResponse.status', index=2, + number=3, 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), ], extensions=[ ], @@ -353,7 +360,7 @@ _COMMANDRESPONSE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=661, - serialized_end=738, + serialized_end=754, ) @@ -445,8 +452,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=741, - serialized_end=1075, + serialized_start=757, + serialized_end=1091, ) @@ -522,8 +529,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1078, - serialized_end=1239, + serialized_start=1094, + serialized_end=1255, ) @@ -572,8 +579,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1242, - serialized_end=1404, + serialized_start=1258, + serialized_end=1420, ) @@ -622,8 +629,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1407, - serialized_end=1654, + serialized_start=1423, + serialized_end=1670, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 1f03b439..071f2f25 100644 --- a/openxc.proto +++ b/openxc.proto @@ -31,6 +31,7 @@ message ControlCommand { message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; + optional bool status = 3; } message DiagnosticRequest { -- cgit 1.2.3-korg From 1430a2a202e37be476b7290c2018a1c0d64833d8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 11 Aug 2014 23:36:39 -0400 Subject: Move action field to ControlCommand in binary format. --- gen/cpp/openxc.pb | 25 +- gen/cpp/openxc.pb.c | 8 +- gen/cpp/openxc.pb.h | 24 +- gen/java/com/openxc/BinaryMessages.java | 406 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 84 +++---- openxc.proto | 4 +- 6 files changed, 275 insertions(+), 276 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index e74bf809..e2d67115 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -¤ +¡ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,19 +21,24 @@ RawMessage bus ( message_id (  -data ( "¦ +data ( "ô ControlCommand) type (2.openxc.ControlCommand.Type5 -diagnostic_request ( 2.openxc.DiagnosticRequest"2 +diagnostic_request ( 2.openxc.DiagnosticRequest- +action (2.openxc.ControlCommand.Action"2 Type VERSION DEVICE_ID -DIAGNOSTIC"] +DIAGNOSTIC" +Action +ADD + +CANCEL"] CommandResponse) type (2.openxc.ControlCommand.Type message (  -status ("Î +status ("ý DiagnosticRequest bus ( @@ -44,16 +49,10 @@ message_id (  multiple_responses ( frequency ( name ( ; - decoded_type (2%.openxc.DiagnosticRequest.DecodedType0 -action - (2 .openxc.DiagnosticRequest.Action"! + decoded_type (2%.openxc.DiagnosticRequest.DecodedType"! DecodedType NONE -OBD2" -Action -ADD - -CANCEL"¡ +OBD2"¡ DiagnosticResponse bus ( diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index e7fac5b5..5895ffc1 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.5 at Sun Aug 10 22:03:53 2014. */ +/* Generated by nanopb-0.2.5 at Mon Aug 11 23:26:24 2014. */ #include "openxc.pb.h" @@ -22,9 +22,10 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[3] = { +const pb_field_t openxc_ControlCommand_fields[4] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticRequest_fields), + PB_FIELD2( 3, ENUM , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, action, diagnostic_request, 0), PB_LAST_FIELD }; @@ -35,7 +36,7 @@ const pb_field_t openxc_CommandResponse_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_DiagnosticRequest_fields[11] = { +const pb_field_t openxc_DiagnosticRequest_fields[10] = { PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticRequest, bus, bus, 0), PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, message_id, bus, 0), PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, mode, message_id, 0), @@ -45,7 +46,6 @@ const pb_field_t openxc_DiagnosticRequest_fields[11] = { PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, multiple_responses, 0), PB_FIELD2( 8, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), PB_FIELD2( 9, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, decoded_type, name, 0), - PB_FIELD2( 10, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, action, decoded_type, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 40993335..b8b60574 100644 --- a/gen/cpp/openxc.pb.h +++ b/gen/cpp/openxc.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.2.5 at Sun Aug 10 22:03:53 2014. */ +/* Generated by nanopb-0.2.5 at Mon Aug 11 23:26:24 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -24,16 +24,16 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3 } openxc_ControlCommand_Type; +typedef enum _openxc_ControlCommand_Action { + openxc_ControlCommand_Action_ADD = 1, + openxc_ControlCommand_Action_CANCEL = 2 +} openxc_ControlCommand_Action; + typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, openxc_DiagnosticRequest_DecodedType_OBD2 = 2 } openxc_DiagnosticRequest_DecodedType; -typedef enum _openxc_DiagnosticRequest_Action { - openxc_DiagnosticRequest_Action_ADD = 1, - openxc_DiagnosticRequest_Action_CANCEL = 3 -} openxc_DiagnosticRequest_Action; - typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_STRING = 1, openxc_DynamicField_Type_NUM = 2, @@ -83,8 +83,6 @@ typedef struct _openxc_DiagnosticRequest { char name[10]; bool has_decoded_type; openxc_DiagnosticRequest_DecodedType decoded_type; - bool has_action; - openxc_DiagnosticRequest_Action action; } openxc_DiagnosticRequest; typedef struct { @@ -141,6 +139,8 @@ typedef struct _openxc_ControlCommand { openxc_ControlCommand_Type type; bool has_diagnostic_request; openxc_DiagnosticRequest diagnostic_request; + bool has_action; + openxc_ControlCommand_Action action; } openxc_ControlCommand; typedef struct _openxc_TranslatedMessage { @@ -184,7 +184,6 @@ typedef struct _openxc_VehicleMessage { #define openxc_DiagnosticRequest_frequency_tag 7 #define openxc_DiagnosticRequest_name_tag 8 #define openxc_DiagnosticRequest_decoded_type_tag 9 -#define openxc_DiagnosticRequest_action_tag 10 #define openxc_DiagnosticResponse_bus_tag 1 #define openxc_DiagnosticResponse_message_id_tag 2 #define openxc_DiagnosticResponse_mode_tag 3 @@ -202,6 +201,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_data_tag 3 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 +#define openxc_ControlCommand_action_tag 3 #define openxc_TranslatedMessage_type_tag 1 #define openxc_TranslatedMessage_name_tag 2 #define openxc_TranslatedMessage_value_tag 3 @@ -216,9 +216,9 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_ControlCommand_fields[3]; +extern const pb_field_t openxc_ControlCommand_fields[4]; extern const pb_field_t openxc_CommandResponse_fields[4]; -extern const pb_field_t openxc_DiagnosticRequest_fields[11]; +extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; extern const pb_field_t openxc_DynamicField_fields[5]; extern const pb_field_t openxc_TranslatedMessage_fields[5]; @@ -228,7 +228,7 @@ extern const pb_field_t openxc_TranslatedMessage_fields[5]; #define openxc_RawMessage_size 27 #define openxc_ControlCommand_size 82 #define openxc_CommandResponse_size 139 -#define openxc_DiagnosticRequest_size 74 +#define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 #define openxc_TranslatedMessage_size 350 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 1465301e..e331fcce 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2069,6 +2069,16 @@ public final class BinaryMessages { * optional .openxc.DiagnosticRequest diagnostic_request = 2; */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder(); + + // optional .openxc.ControlCommand.Action action = 3; + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + boolean hasAction(); + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + com.openxc.BinaryMessages.ControlCommand.Action getAction(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2145,6 +2155,17 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; break; } + case 24: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Action value = com.openxc.BinaryMessages.ControlCommand.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + action_ = value; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2275,6 +2296,88 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) } + /** + * Protobuf enum {@code openxc.ControlCommand.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ADD = 1; + */ + ADD(0, 1), + /** + * CANCEL = 2; + */ + CANCEL(1, 2), + ; + + /** + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + /** + * CANCEL = 2; + */ + public static final int CANCEL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static Action valueOf(int value) { + switch (value) { + case 1: return ADD; + case 2: return CANCEL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(1); + } + + private static final Action[] VALUES = values(); + + public static Action valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Action(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Action) + } + private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; @@ -2314,9 +2417,26 @@ public final class BinaryMessages { return diagnosticRequest_; } + // optional .openxc.ControlCommand.Action action = 3; + public static final int ACTION_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.ControlCommand.Action action_; + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public com.openxc.BinaryMessages.ControlCommand.Action getAction() { + return action_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2336,6 +2456,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, diagnosticRequest_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, action_.getNumber()); + } getUnknownFields().writeTo(output); } @@ -2353,6 +2476,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, diagnosticRequest_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, action_.getNumber()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2478,6 +2605,8 @@ public final class BinaryMessages { diagnosticRequestBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -2518,6 +2647,10 @@ public final class BinaryMessages { } else { result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.action_ = action_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2540,6 +2673,9 @@ public final class BinaryMessages { if (other.hasDiagnosticRequest()) { mergeDiagnosticRequest(other.getDiagnosticRequest()); } + if (other.hasAction()) { + setAction(other.getAction()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2720,6 +2856,42 @@ public final class BinaryMessages { return diagnosticRequestBuilder_; } + // optional .openxc.ControlCommand.Action action = 3; + private com.openxc.BinaryMessages.ControlCommand.Action action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public com.openxc.BinaryMessages.ControlCommand.Action getAction() { + return action_; + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public Builder setAction(com.openxc.BinaryMessages.ControlCommand.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.ControlCommand.Action action = 3; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000004); + action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -3480,16 +3652,6 @@ public final class BinaryMessages { * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); - - // optional .openxc.DiagnosticRequest.Action action = 10; - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - boolean hasAction(); - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - com.openxc.BinaryMessages.DiagnosticRequest.Action getAction(); } /** * Protobuf type {@code openxc.DiagnosticRequest} @@ -3593,17 +3755,6 @@ public final class BinaryMessages { } break; } - case 80: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticRequest.Action value = com.openxc.BinaryMessages.DiagnosticRequest.Action.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(10, rawValue); - } else { - bitField0_ |= 0x00000200; - action_ = value; - } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3725,88 +3876,6 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) } - /** - * Protobuf enum {@code openxc.DiagnosticRequest.Action} - */ - public enum Action - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ADD = 1; - */ - ADD(0, 1), - /** - * CANCEL = 3; - */ - CANCEL(1, 3), - ; - - /** - * ADD = 1; - */ - public static final int ADD_VALUE = 1; - /** - * CANCEL = 3; - */ - public static final int CANCEL_VALUE = 3; - - - public final int getNumber() { return value; } - - public static Action valueOf(int value) { - switch (value) { - case 1: return ADD; - case 3: return CANCEL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Action findValueByNumber(int number) { - return Action.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(1); - } - - private static final Action[] VALUES = values(); - - public static Action valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private Action(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.Action) - } - private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -3989,22 +4058,6 @@ public final class BinaryMessages { return decodedType_; } - // optional .openxc.DiagnosticRequest.Action action = 10; - public static final int ACTION_FIELD_NUMBER = 10; - private com.openxc.BinaryMessages.DiagnosticRequest.Action action_; - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { - return action_; - } - private void initFields() { bus_ = 0; messageId_ = 0; @@ -4015,7 +4068,6 @@ public final class BinaryMessages { frequency_ = 0D; name_ = ""; decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4056,9 +4108,6 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeEnum(9, decodedType_.getNumber()); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeEnum(10, action_.getNumber()); - } getUnknownFields().writeTo(output); } @@ -4104,10 +4153,6 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeEnumSize(9, decodedType_.getNumber()); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, action_.getNumber()); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -4242,8 +4287,6 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; bitField0_ = (bitField0_ & ~0x00000100); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; - bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -4308,10 +4351,6 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000100; } result.decodedType_ = decodedType_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.action_ = action_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4357,9 +4396,6 @@ public final class BinaryMessages { if (other.hasDecodedType()) { setDecodedType(other.getDecodedType()); } - if (other.hasAction()) { - setAction(other.getAction()); - } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4751,42 +4787,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DiagnosticRequest.Action action = 10; - private com.openxc.BinaryMessages.DiagnosticRequest.Action action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Action getAction() { - return action_; - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public Builder setAction(com.openxc.BinaryMessages.DiagnosticRequest.Action value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - action_ = value; - onChanged(); - return this; - } - /** - * optional .openxc.DiagnosticRequest.Action action = 10; - */ - public Builder clearAction() { - bitField0_ = (bitField0_ & ~0x00000200); - action_ = com.openxc.BinaryMessages.DiagnosticRequest.Action.ADD; - onChanged(); - return this; - } - // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } @@ -7742,37 +7742,37 @@ public final class BinaryMessages { "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "data\030\003 \001(\014\"\246\001\n\016ControlCommand\022)\n\004type\030\001 " + + "data\030\003 \001(\014\"\364\001\n\016ControlCommand\022)\n\004type\030\001 " + "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" + "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" + - "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + - "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"]\n\017CommandResponse\022)" + - "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" + - "e\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\316\002\n\021D" + - "iagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage", - "_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007" + - "payload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(" + - "\010\022\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014de" + - "coded_type\030\t \001(\0162%.openxc.DiagnosticRequ" + - "est.DecodedType\0220\n\006action\030\n \001(\0162 .openxc" + - ".DiagnosticRequest.Action\"!\n\013DecodedType" + - "\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\035\n\006Action\022\007\n\003ADD\020\001\022" + - "\n\n\006CANCEL\020\003\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + - "s\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(" + - "\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negat", - "ive_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014" + - "\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type" + - "\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014str" + - "ing_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025" + - "\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020" + - "\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessa" + - "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + - "age.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024." + - "openxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.ope" + - "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003", - "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + - "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + - "enxcB\016BinaryMessages" + "Request\022-\n\006action\030\003 \001(\0162\035.openxc.Control" + + "Command.Action\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tD" + + "EVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\035\n\006Action\022\007\n\003" + + "ADD\020\001\022\n\n\006CANCEL\020\002\"]\n\017CommandResponse\022)\n\004" + + "type\030\001 \001(\0162\033.openxc.ControlCommand.Type\022", + "\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Dia" + + "gnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i" + + "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007pa" + + "yload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022" + + "\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014deco" + + "ded_type\030\t \001(\0162%.openxc.DiagnosticReques" + + "t.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010" + + "\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001" + + " \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013" + + "\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative", + "_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n" + + "\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 " + + "\001(\0162\031.openxc.DynamicField.Type\022\024\n\014string" + + "_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rb" + + "oolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007" + + "\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessage\022" + + ",\n\004type\030\001 \001(\0162\036.openxc.TranslatedMessage" + + ".Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.ope" + + "nxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.openxc" + + ".DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM", + "\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVEN" + + "TED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openx" + + "cB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7796,7 +7796,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "Action", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_CommandResponse_fieldAccessorTable = new @@ -7808,7 +7808,7 @@ public final class BinaryMessages { internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", "Action", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 15a6486a..8d0a7975 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -13,7 +13,7 @@ from google.protobuf import descriptor_pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\";\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xa6\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xce\x02\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\x12\x30\n\x06\x61\x63tion\x18\n \x01(\x0e\x32 .openxc.DiagnosticRequest.Action\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x03\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x94\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0braw_message\x18\x02 \x01(\x0b\x32\x12.openxc.RawMessage\x12\x35\n\x12translated_message\x18\x03 \x01(\x0b\x32\x19.openxc.TranslatedMessage\x12\x37\n\x13\x64iagnostic_response\x18\x04 \x01(\x0b\x32\x1a.openxc.DiagnosticResponse\x12/\n\x0f\x63ontrol_command\x18\x05 \x01(\x0b\x32\x16.openxc.ControlCommand\x12\x31\n\x10\x63ommand_response\x18\x06 \x01(\x0b\x32\x17.openxc.CommandResponse\"Z\n\x04Type\x12\x07\n\x03RAW\x10\x01\x12\x0e\n\nTRANSLATED\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\";\n\nRawMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xf4\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12-\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1d.openxc.ControlCommand.Action\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -71,50 +71,50 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=609, - serialized_end=659, + serialized_start=656, + serialized_end=706, ) -_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( - name='DecodedType', - full_name='openxc.DiagnosticRequest.DecodedType', +_CONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( + name='Action', + full_name='openxc.ControlCommand.Action', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='NONE', index=0, number=1, + name='ADD', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='OBD2', index=1, number=2, + name='CANCEL', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1027, - serialized_end=1060, + serialized_start=708, + serialized_end=737, ) -_DIAGNOSTICREQUEST_ACTION = _descriptor.EnumDescriptor( - name='Action', - full_name='openxc.DiagnosticRequest.Action', +_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( + name='DecodedType', + full_name='openxc.DiagnosticRequest.DecodedType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='ADD', index=0, number=1, + name='NONE', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='CANCEL', index=1, number=3, + name='OBD2', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1062, - serialized_end=1091, + serialized_start=1055, + serialized_end=1088, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -138,8 +138,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1383, - serialized_end=1420, + serialized_start=1380, + serialized_end=1417, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +175,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1578, - serialized_end=1670, + serialized_start=1575, + serialized_end=1667, ) @@ -307,18 +307,26 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='action', full_name='openxc.ControlCommand.action', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=1, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], nested_types=[], enum_types=[ _CONTROLCOMMAND_TYPE, + _CONTROLCOMMAND_ACTION, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=659, + serialized_end=737, ) @@ -359,8 +367,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=661, - serialized_end=754, + serialized_start=739, + serialized_end=832, ) @@ -434,26 +442,18 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( - name='action', full_name='openxc.DiagnosticRequest.action', index=9, - number=10, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), ], extensions=[ ], nested_types=[], enum_types=[ _DIAGNOSTICREQUEST_DECODEDTYPE, - _DIAGNOSTICREQUEST_ACTION, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=757, - serialized_end=1091, + serialized_start=835, + serialized_end=1088, ) @@ -529,8 +529,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1094, - serialized_end=1255, + serialized_start=1091, + serialized_end=1252, ) @@ -579,8 +579,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1258, - serialized_end=1420, + serialized_start=1255, + serialized_end=1417, ) @@ -629,8 +629,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1423, - serialized_end=1670, + serialized_start=1420, + serialized_end=1667, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -642,12 +642,12 @@ _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPON _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST +_CONTROLCOMMAND.fields_by_name['action'].enum_type = _CONTROLCOMMAND_ACTION _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; +_CONTROLCOMMAND_ACTION.containing_type = _CONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE -_DIAGNOSTICREQUEST.fields_by_name['action'].enum_type = _DIAGNOSTICREQUEST_ACTION _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; -_DIAGNOSTICREQUEST_ACTION.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; _TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 071f2f25..937fe186 100644 --- a/openxc.proto +++ b/openxc.proto @@ -23,9 +23,11 @@ message RawMessage { message ControlCommand { enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; } + enum Action { ADD = 1; CANCEL = 2; } optional Type type = 1; optional DiagnosticRequest diagnostic_request = 2; + optional Action action = 3; } message CommandResponse { @@ -36,7 +38,6 @@ message CommandResponse { message DiagnosticRequest { enum DecodedType { NONE = 1; OBD2 = 2; } - enum Action { ADD = 1; CANCEL = 3; } optional int32 bus = 1; optional uint32 message_id = 2; @@ -49,7 +50,6 @@ message DiagnosticRequest { optional double frequency = 7; optional string name = 8; optional DecodedType decoded_type = 9; - optional Action action = 10; } message DiagnosticResponse { -- cgit 1.2.3-korg From ee93c3b20add6fb1bfda64a70c8d8325e3c138d7 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 4 Sep 2014 22:37:07 -0400 Subject: Note that 0x prefix on hex strings is optional. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 50c166b1..dd5651ed 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,8 @@ The format for a raw CAN message: a hexidecimal number in a string. Many JSON parser cannot handle 64-bit integers, which is why we are not using a numerical data type. Each byte in the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the - complete string must have an even number of characters. + complete string must have an even number of characters. The `0x` prefix is + optional. ### Diagnostic Messages @@ -162,7 +163,7 @@ exist in parallel with a recurring request for the same key. **id** - the CAN arbitration ID for the request. -**mode** - the OBD-II mode of the request - 1 through 255 (1 through 9 are the +**mode** - the OBD-II mode of the request - 0x1 through 0xff (1 through 9 are the standardized modes and 0x22 is a common proprietary mode). **pid** - (optional) the PID for the request, if applicable. @@ -171,7 +172,8 @@ exist in parallel with a recurring request for the same key. represented as a hexadecimal number in a string. Many JSON parser cannot handle 64-bit integers, which is why we are not using a numerical data type. Each byte in the string *must* be represented with 2 characters, e.g. `0x1` - is `0x01` - the complete string must have an even number of characters. + is `0x01` - the complete string must have an even number of characters. The + `0x` prefix is optional. **name** - (optional, defaults to nothing) A human readable, string name for this request. If provided, the response will have a `name` field (much like a -- cgit 1.2.3-korg From 0f55966a881c610e17b360c74273d8a933362212 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 5 Sep 2014 09:05:30 -0400 Subject: Move a TODO to issue #14. --- openxc.proto | 3 --- 1 file changed, 3 deletions(-) diff --git a/openxc.proto b/openxc.proto index 5b7e78b4..43f31993 100644 --- a/openxc.proto +++ b/openxc.proto @@ -80,6 +80,3 @@ message TranslatedMessage { optional DynamicField value = 3; optional DynamicField event = 4; } - -// TODO we should also consider having an enum type, having each specific -// message defined as a protobuf -- cgit 1.2.3-korg From 75ec5e7c6bf86b6af90168d8e39b3404f4ce6b1e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 16 Sep 2014 23:03:32 -0400 Subject: Re-build with nanopb v0.3.1. --- gen/cpp/openxc.pb.c | 111 ++++++++++++++++++++++++++++++---------------------- gen/cpp/openxc.pb.h | 43 +++++++++++++------- libs/nanopb | 2 +- 3 files changed, 94 insertions(+), 62 deletions(-) diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 5895ffc1..744c8bd2 100644 --- a/gen/cpp/openxc.pb.c +++ b/gen/cpp/openxc.pb.c @@ -1,95 +1,114 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.2.5 at Mon Aug 11 23:26:24 2014. */ +/* Generated by nanopb-0.3.1 at Tue Sep 16 23:03:27 2014. */ #include "openxc.pb.h" +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + const pb_field_t openxc_VehicleMessage_fields[7] = { - 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_FIELD2( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, command_response, control_command, &openxc_CommandResponse_fields), + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_VehicleMessage, type, type, 0), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, raw_message, type, &openxc_RawMessage_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, translated_message, &openxc_DiagnosticResponse_fields), + PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, control_command, diagnostic_response, &openxc_ControlCommand_fields), + PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, command_response, control_command, &openxc_CommandResponse_fields), PB_LAST_FIELD }; const pb_field_t openxc_RawMessage_fields[4] = { - PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), - PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD2( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), + PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), + PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), PB_LAST_FIELD }; const pb_field_t openxc_ControlCommand_fields[4] = { - PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), - PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticRequest_fields), - PB_FIELD2( 3, ENUM , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, action, diagnostic_request, 0), + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticRequest_fields), + PB_FIELD( 3, ENUM , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, action, diagnostic_request, 0), PB_LAST_FIELD }; const pb_field_t openxc_CommandResponse_fields[4] = { - PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), - PB_FIELD2( 3, BOOL , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, status, message, 0), + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), + PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), + PB_FIELD( 3, BOOL , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, status, message, 0), PB_LAST_FIELD }; const pb_field_t openxc_DiagnosticRequest_fields[10] = { - PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticRequest, bus, bus, 0), - PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, message_id, bus, 0), - PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, mode, message_id, 0), - 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, multiple_responses, payload, 0), - PB_FIELD2( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, multiple_responses, 0), - PB_FIELD2( 8, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), - PB_FIELD2( 9, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, decoded_type, name, 0), + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticRequest, bus, bus, 0), + PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, message_id, bus, 0), + PB_FIELD( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, mode, message_id, 0), + PB_FIELD( 4, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, pid, mode, 0), + PB_FIELD( 5, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, payload, pid, 0), + PB_FIELD( 6, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, multiple_responses, payload, 0), + PB_FIELD( 7, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, frequency, multiple_responses, 0), + PB_FIELD( 8, STRING , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, name, frequency, 0), + PB_FIELD( 9, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticRequest, decoded_type, name, 0), PB_LAST_FIELD }; const pb_field_t openxc_DiagnosticResponse_fields[9] = { - PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticResponse, bus, bus, 0), - PB_FIELD2( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, message_id, bus, 0), - PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, mode, message_id, 0), - PB_FIELD2( 4, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, pid, mode, 0), - PB_FIELD2( 5, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, success, pid, 0), - PB_FIELD2( 6, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, negative_response_code, success, 0), - PB_FIELD2( 7, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, payload, negative_response_code, 0), - PB_FIELD2( 8, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, value, payload, 0), + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_DiagnosticResponse, bus, bus, 0), + PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, message_id, bus, 0), + PB_FIELD( 3, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, mode, message_id, 0), + PB_FIELD( 4, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, pid, mode, 0), + PB_FIELD( 5, BOOL , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, success, pid, 0), + PB_FIELD( 6, UINT32 , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, negative_response_code, success, 0), + PB_FIELD( 7, BYTES , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, payload, negative_response_code, 0), + PB_FIELD( 8, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DiagnosticResponse, value, payload, 0), PB_LAST_FIELD }; const pb_field_t openxc_DynamicField_fields[5] = { - PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_DynamicField, type, type, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_DynamicField, string_value, type, 0), - PB_FIELD2( 3, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DynamicField, numeric_value, string_value, 0), - PB_FIELD2( 4, BOOL , OPTIONAL, STATIC , OTHER, openxc_DynamicField, boolean_value, numeric_value, 0), + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_DynamicField, type, type, 0), + PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_DynamicField, string_value, type, 0), + PB_FIELD( 3, DOUBLE , OPTIONAL, STATIC , OTHER, openxc_DynamicField, numeric_value, string_value, 0), + PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, openxc_DynamicField, boolean_value, numeric_value, 0), PB_LAST_FIELD }; const pb_field_t openxc_TranslatedMessage_fields[5] = { - PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_TranslatedMessage, type, type, 0), - PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, name, type, 0), - PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, value, name, &openxc_DynamicField_fields), - PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, event, value, &openxc_DynamicField_fields), + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_TranslatedMessage, type, type, 0), + PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, name, type, 0), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, value, name, &openxc_DynamicField_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, event, value, &openxc_DynamicField_fields), PB_LAST_FIELD }; /* 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_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif + /* On some platforms (such as AVR), double is really float. * These are not directly supported by nanopb, but see example_avr_double. * To get rid of this error, remove any double fields from your .proto. */ -STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) +PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index b8b60574..8729f228 100644 --- a/gen/cpp/openxc.pb.h +++ b/gen/cpp/openxc.pb.h @@ -1,10 +1,14 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.2.5 at Mon Aug 11 23:26:24 2014. */ +/* Generated by nanopb-0.3.1 at Tue Sep 16 23:03:27 2014. */ -#ifndef _PB_OPENXC_PB_H_ -#define _PB_OPENXC_PB_H_ +#ifndef PB_OPENXC_PB_H_INCLUDED +#define PB_OPENXC_PB_H_INCLUDED #include +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + #ifdef __cplusplus extern "C" { #endif @@ -59,10 +63,7 @@ typedef struct _openxc_CommandResponse { bool status; } openxc_CommandResponse; -typedef struct { - size_t size; - uint8_t bytes[8]; -} openxc_DiagnosticRequest_payload_t; +typedef PB_BYTES_ARRAY_T(8) openxc_DiagnosticRequest_payload_t; typedef struct _openxc_DiagnosticRequest { bool has_bus; @@ -85,10 +86,7 @@ typedef struct _openxc_DiagnosticRequest { openxc_DiagnosticRequest_DecodedType decoded_type; } openxc_DiagnosticRequest; -typedef struct { - size_t size; - uint8_t bytes[8]; -} openxc_DiagnosticResponse_payload_t; +typedef PB_BYTES_ARRAY_T(8) openxc_DiagnosticResponse_payload_t; typedef struct _openxc_DiagnosticResponse { bool has_bus; @@ -120,10 +118,7 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; -typedef struct { - size_t size; - uint8_t bytes[8]; -} openxc_RawMessage_data_t; +typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; typedef struct _openxc_RawMessage { bool has_bus; @@ -171,6 +166,24 @@ typedef struct _openxc_VehicleMessage { /* Default values for struct fields */ +/* Initializer values for message structs */ +#define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} +#define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} +#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticRequest_init_default, false, (openxc_ControlCommand_Action)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} +#define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} +#define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} +#define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} +#define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} +#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticRequest_init_zero, false, (openxc_ControlCommand_Action)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} +#define openxc_DynamicField_init_zero {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} +#define openxc_TranslatedMessage_init_zero {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} + /* Field tags (for use in manual encoding/decoding) */ #define openxc_CommandResponse_type_tag 1 #define openxc_CommandResponse_message_tag 2 diff --git a/libs/nanopb b/libs/nanopb index 906c8283..b947dc6e 160000 --- a/libs/nanopb +++ b/libs/nanopb @@ -1 +1 @@ -Subproject commit 906c8283b5995eb7b27f4958a6a6502ae0deea07 +Subproject commit b947dc6e2c0d63a29e83ebf9c8af450d2531aef2 -- cgit 1.2.3-korg From 625dae730013a4c59a1bd0bacc1f743676274e24 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 20 Sep 2014 21:47:09 -0400 Subject: Add passthrough command and refactor commands in binary format. The ControlCommand is now more like a VehicleMessage - it has a 'type' and many optional fields pointing to the various types. If the type is diagnostic, the client should look at the diagnostic_request field. --- README.md | 27 + gen/cpp/openxc.pb | 26 +- gen/cpp/openxc.pb.c | 22 +- gen/cpp/openxc.pb.h | 65 +- gen/java/com/openxc/BinaryMessages.java | 2074 +++++++++++++++++++++++++------ gen/python/openxc_pb2.py | 180 ++- openxc.proto | 30 +- 7 files changed, 1980 insertions(+), 444 deletions(-) diff --git a/README.md b/README.md index dd5651ed..feb40c44 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,33 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. { "command_response": "device_id", "message": "0012345678"} +#### Passthrough CAN Mode + +The `passthrough` command controls the passthrough mode for each of the CAN +buses. There are three passthrough modes: + +* `off` - Only the specified simple vehicle messages are processed and output + from the VI. +* `filtered` - If the CAN acceptance filter is not otherwise disabled, only the + pre-defined CAN messages (i.e. those compiled with the firmware) will be + output in the low-level CAN format from VI. +* `unfiltered` - All received CAN messages will be passed through from the bus + to the VI's output. + +**Request** + + { "command": "passthrough" + "bus": 1, + "mode": + } + +**Response** + +If the bus and mode in the request were recognized, the `status` field in the +response will be `true`. If `false`, the passthrough mode was not changed. + + { "command_response": "passthrough", "status": true} + ### Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index e2d67115..aa302360 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -¡ +ƒ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,20 +21,32 @@ RawMessage bus ( message_id (  -data ( "ô +data ( "‡ ControlCommand) -type (2.openxc.ControlCommand.Type5 -diagnostic_request ( 2.openxc.DiagnosticRequest- -action (2.openxc.ControlCommand.Action"2 +type (2.openxc.ControlCommand.Type< +diagnostic_request ( 2 .openxc.DiagnosticControlCommandG +passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommand"C Type VERSION DEVICE_ID -DIAGNOSTIC" +DIAGNOSTIC + PASSTHROUGH"ž +DiagnosticControlCommand* +request ( 2.openxc.DiagnosticRequest7 +action (2'.openxc.DiagnosticControlCommand.Action" Action ADD -CANCEL"] +CANCEL"« +PassthroughModeControlCommand +bus (C +mode (25.openxc.PassthroughModeControlCommand.PassthroughMode"8 +PassthroughMode +OFF +FILTERED + +UNFILTERED"] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 5895ffc1..8f9fc19c 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 Mon Aug 11 23:26:24 2014. */ +/* Generated by nanopb-0.2.5 at Sat Sep 20 21:48:43 2014. */ #include "openxc.pb.h" @@ -24,8 +24,20 @@ const pb_field_t openxc_RawMessage_fields[4] = { const pb_field_t openxc_ControlCommand_fields[4] = { PB_FIELD2( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), - PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticRequest_fields), - PB_FIELD2( 3, ENUM , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, action, diagnostic_request, 0), + PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), + PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), + PB_LAST_FIELD +}; + +const pb_field_t openxc_DiagnosticControlCommand_fields[3] = { + PB_FIELD2( 1, MESSAGE , OPTIONAL, STATIC , FIRST, openxc_DiagnosticControlCommand, request, request, &openxc_DiagnosticRequest_fields), + PB_FIELD2( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_DiagnosticControlCommand, action, request, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_PassthroughModeControlCommand_fields[3] = { + PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_PassthroughModeControlCommand, bus, bus, 0), + PB_FIELD2( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_PassthroughModeControlCommand, mode, bus, 0), PB_LAST_FIELD }; @@ -80,11 +92,11 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { /* 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_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_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 b8b60574..48002b14 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 Aug 11 23:26:24 2014. */ +/* Generated by nanopb-0.2.5 at Sat Sep 20 21:48:43 2014. */ #ifndef _PB_OPENXC_PB_H_ #define _PB_OPENXC_PB_H_ @@ -21,13 +21,20 @@ typedef enum _openxc_VehicleMessage_Type { typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, openxc_ControlCommand_Type_DEVICE_ID = 2, - openxc_ControlCommand_Type_DIAGNOSTIC = 3 + openxc_ControlCommand_Type_DIAGNOSTIC = 3, + openxc_ControlCommand_Type_PASSTHROUGH = 4 } openxc_ControlCommand_Type; -typedef enum _openxc_ControlCommand_Action { - openxc_ControlCommand_Action_ADD = 1, - openxc_ControlCommand_Action_CANCEL = 2 -} openxc_ControlCommand_Action; +typedef enum _openxc_DiagnosticControlCommand_Action { + openxc_DiagnosticControlCommand_Action_ADD = 1, + openxc_DiagnosticControlCommand_Action_CANCEL = 2 +} openxc_DiagnosticControlCommand_Action; + +typedef enum _openxc_PassthroughModeControlCommand_PassthroughMode { + openxc_PassthroughModeControlCommand_PassthroughMode_OFF = 1, + openxc_PassthroughModeControlCommand_PassthroughMode_FILTERED = 2, + openxc_PassthroughModeControlCommand_PassthroughMode_UNFILTERED = 3 +} openxc_PassthroughModeControlCommand_PassthroughMode; typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, @@ -120,6 +127,13 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; +typedef struct _openxc_PassthroughModeControlCommand { + bool has_bus; + int32_t bus; + bool has_mode; + openxc_PassthroughModeControlCommand_PassthroughMode mode; +} openxc_PassthroughModeControlCommand; + typedef struct { size_t size; uint8_t bytes[8]; @@ -134,14 +148,12 @@ typedef struct _openxc_RawMessage { openxc_RawMessage_data_t data; } openxc_RawMessage; -typedef struct _openxc_ControlCommand { - bool has_type; - openxc_ControlCommand_Type type; - bool has_diagnostic_request; - openxc_DiagnosticRequest diagnostic_request; +typedef struct _openxc_DiagnosticControlCommand { + bool has_request; + openxc_DiagnosticRequest request; bool has_action; - openxc_ControlCommand_Action action; -} openxc_ControlCommand; + openxc_DiagnosticControlCommand_Action action; +} openxc_DiagnosticControlCommand; typedef struct _openxc_TranslatedMessage { bool has_type; @@ -154,6 +166,15 @@ typedef struct _openxc_TranslatedMessage { openxc_DynamicField event; } openxc_TranslatedMessage; +typedef struct _openxc_ControlCommand { + bool has_type; + openxc_ControlCommand_Type type; + bool has_diagnostic_request; + openxc_DiagnosticControlCommand diagnostic_request; + bool has_passthrough_mode_request; + openxc_PassthroughModeControlCommand passthrough_mode_request; +} openxc_ControlCommand; + typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; @@ -196,16 +217,20 @@ 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_PassthroughModeControlCommand_bus_tag 1 +#define openxc_PassthroughModeControlCommand_mode_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 -#define openxc_ControlCommand_type_tag 1 -#define openxc_ControlCommand_diagnostic_request_tag 2 -#define openxc_ControlCommand_action_tag 3 +#define openxc_DiagnosticControlCommand_request_tag 1 +#define openxc_DiagnosticControlCommand_action_tag 2 #define openxc_TranslatedMessage_type_tag 1 #define openxc_TranslatedMessage_name_tag 2 #define openxc_TranslatedMessage_value_tag 3 #define openxc_TranslatedMessage_event_tag 4 +#define openxc_ControlCommand_type_tag 1 +#define openxc_ControlCommand_diagnostic_request_tag 2 +#define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -217,6 +242,8 @@ typedef struct _openxc_VehicleMessage { 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[4]; +extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; +extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; 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]; @@ -224,9 +251,11 @@ 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 672 +#define openxc_VehicleMessage_size 693 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 82 +#define openxc_ControlCommand_size 103 +#define openxc_DiagnosticControlCommand_size 76 +#define openxc_PassthroughModeControlCommand_size 17 #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 e331fcce..31e3249f 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2056,29 +2056,33 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - // optional .openxc.DiagnosticRequest diagnostic_request = 2; + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ boolean hasDiagnosticRequest(); /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ - com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest(); + com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest(); /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ - com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder(); + com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder(); - // optional .openxc.ControlCommand.Action action = 3; + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ - boolean hasAction(); + boolean hasPassthroughModeRequest(); + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest(); /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ - com.openxc.BinaryMessages.ControlCommand.Action getAction(); + com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2143,11 +2147,11 @@ public final class BinaryMessages { break; } case 18: { - com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = diagnosticRequest_.toBuilder(); } - diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); + diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticControlCommand.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(diagnosticRequest_); diagnosticRequest_ = subBuilder.buildPartial(); @@ -2155,15 +2159,17 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; break; } - case 24: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Action value = com.openxc.BinaryMessages.ControlCommand.Action.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - action_ = value; + case 26: { + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = passthroughModeRequest_.toBuilder(); + } + passthroughModeRequest_ = input.readMessage(com.openxc.BinaryMessages.PassthroughModeControlCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(passthroughModeRequest_); + passthroughModeRequest_ = subBuilder.buildPartial(); } + bitField0_ |= 0x00000004; break; } } @@ -2222,6 +2228,10 @@ public final class BinaryMessages { * DIAGNOSTIC = 3; */ DIAGNOSTIC(2, 3), + /** + * PASSTHROUGH = 4; + */ + PASSTHROUGH(3, 4), ; /** @@ -2236,6 +2246,10 @@ public final class BinaryMessages { * DIAGNOSTIC = 3; */ public static final int DIAGNOSTIC_VALUE = 3; + /** + * PASSTHROUGH = 4; + */ + public static final int PASSTHROUGH_VALUE = 4; public final int getNumber() { return value; } @@ -2245,6 +2259,7 @@ public final class BinaryMessages { case 1: return VERSION; case 2: return DEVICE_ID; case 3: return DIAGNOSTIC; + case 4: return PASSTHROUGH; default: return null; } } @@ -2296,88 +2311,6 @@ public final class BinaryMessages { // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) } - /** - * Protobuf enum {@code openxc.ControlCommand.Action} - */ - public enum Action - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ADD = 1; - */ - ADD(0, 1), - /** - * CANCEL = 2; - */ - CANCEL(1, 2), - ; - - /** - * ADD = 1; - */ - public static final int ADD_VALUE = 1; - /** - * CANCEL = 2; - */ - public static final int CANCEL_VALUE = 2; - - - public final int getNumber() { return value; } - - public static Action valueOf(int value) { - switch (value) { - case 1: return ADD; - case 2: return CANCEL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Action findValueByNumber(int number) { - return Action.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(1); - } - - private static final Action[] VALUES = values(); - - public static Action valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private Action(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Action) - } - private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; @@ -2395,48 +2328,1545 @@ public final class BinaryMessages { return type_; } - // optional .openxc.DiagnosticRequest diagnostic_request = 2; + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; - private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_; + private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { + return diagnosticRequest_; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { + return diagnosticRequest_; + } + + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + public static final int PASSTHROUGH_MODE_REQUEST_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_; + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public boolean hasPassthroughModeRequest() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { + return passthroughModeRequest_; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { + return passthroughModeRequest_; + } + + private void initFields() { + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, diagnosticRequest_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, passthroughModeRequest_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, diagnosticRequest_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, passthroughModeRequest_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.ControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.ControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDiagnosticRequestFieldBuilder(); + getPassthroughModeRequestFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bitField0_ = (bitField0_ & ~0x00000001); + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } else { + passthroughModeRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.ControlCommand build() { + com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.ControlCommand buildPartial() { + com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (diagnosticRequestBuilder_ == null) { + result.diagnosticRequest_ = diagnosticRequest_; + } else { + result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (passthroughModeRequestBuilder_ == null) { + result.passthroughModeRequest_ = passthroughModeRequest_; + } else { + result.passthroughModeRequest_ = passthroughModeRequestBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.ControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { + if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasDiagnosticRequest()) { + mergeDiagnosticRequest(other.getDiagnosticRequest()); + } + if (other.hasPassthroughModeRequest()) { + mergePassthroughModeRequest(other.getPassthroughModeRequest()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.ControlCommand.Type type = 1; + private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public com.openxc.BinaryMessages.ControlCommand.Type getType() { + return type_; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + onChanged(); + return this; + } + + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> diagnosticRequestBuilder_; + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public boolean hasDiagnosticRequest() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + return diagnosticRequest_; + } else { + return diagnosticRequestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { + if (diagnosticRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diagnosticRequest_ = value; + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder setDiagnosticRequest( + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder builderForValue) { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = builderForValue.build(); + onChanged(); + } else { + diagnosticRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { + if (diagnosticRequestBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) { + diagnosticRequest_ = + com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); + } else { + diagnosticRequest_ = value; + } + onChanged(); + } else { + diagnosticRequestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public Builder clearDiagnosticRequest() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + onChanged(); + } else { + diagnosticRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Builder getDiagnosticRequestBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDiagnosticRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { + if (diagnosticRequestBuilder_ != null) { + return diagnosticRequestBuilder_.getMessageOrBuilder(); + } else { + return diagnosticRequest_; + } + } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> + getDiagnosticRequestFieldBuilder() { + if (diagnosticRequestBuilder_ == null) { + diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder>( + diagnosticRequest_, + getParentForChildren(), + isClean()); + diagnosticRequest_ = null; + } + return diagnosticRequestBuilder_; + } + + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> passthroughModeRequestBuilder_; + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public boolean hasPassthroughModeRequest() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { + if (passthroughModeRequestBuilder_ == null) { + return passthroughModeRequest_; + } else { + return passthroughModeRequestBuilder_.getMessage(); + } + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder setPassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { + if (passthroughModeRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + passthroughModeRequest_ = value; + onChanged(); + } else { + passthroughModeRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder setPassthroughModeRequest( + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder builderForValue) { + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequest_ = builderForValue.build(); + onChanged(); + } else { + passthroughModeRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder mergePassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { + if (passthroughModeRequestBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + passthroughModeRequest_ != com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) { + passthroughModeRequest_ = + com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder(passthroughModeRequest_).mergeFrom(value).buildPartial(); + } else { + passthroughModeRequest_ = value; + } + onChanged(); + } else { + passthroughModeRequestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public Builder clearPassthroughModeRequest() { + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + onChanged(); + } else { + passthroughModeRequestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder getPassthroughModeRequestBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPassthroughModeRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { + if (passthroughModeRequestBuilder_ != null) { + return passthroughModeRequestBuilder_.getMessageOrBuilder(); + } else { + return passthroughModeRequest_; + } + } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> + getPassthroughModeRequestFieldBuilder() { + if (passthroughModeRequestBuilder_ == null) { + passthroughModeRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder>( + passthroughModeRequest_, + getParentForChildren(), + isClean()); + passthroughModeRequest_ = null; + } + return passthroughModeRequestBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) + } + + static { + defaultInstance = new ControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.ControlCommand) + } + + public interface DiagnosticControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.DiagnosticRequest request = 1; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + boolean hasRequest(); + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + com.openxc.BinaryMessages.DiagnosticRequest getRequest(); + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder(); + + // optional .openxc.DiagnosticControlCommand.Action action = 2; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + boolean hasAction(); + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction(); + } + /** + * Protobuf type {@code openxc.DiagnosticControlCommand} + */ + public static final class DiagnosticControlCommand extends + com.google.protobuf.GeneratedMessage + implements DiagnosticControlCommandOrBuilder { + // Use DiagnosticControlCommand.newBuilder() to construct. + private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private DiagnosticControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final DiagnosticControlCommand defaultInstance; + public static DiagnosticControlCommand getDefaultInstance() { + return defaultInstance; + } + + public DiagnosticControlCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DiagnosticControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = request_.toBuilder(); + } + request_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + action_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiagnosticControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.DiagnosticControlCommand.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ADD = 1; + */ + ADD(0, 1), + /** + * CANCEL = 2; + */ + CANCEL(1, 2), + ; + + /** + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + /** + * CANCEL = 2; + */ + public static final int CANCEL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static Action valueOf(int value) { + switch (value) { + case 1: return ADD; + case 2: return CANCEL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Action(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticControlCommand.Action) + } + + private int bitField0_; + // optional .openxc.DiagnosticRequest request = 1; + public static final int REQUEST_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.DiagnosticRequest request_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { + return request_; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { + return request_; + } + + // optional .openxc.DiagnosticControlCommand.Action action = 2; + public static final int ACTION_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { + return action_; + } + + private void initFields() { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, request_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, action_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, request_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, action_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.DiagnosticControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRequestFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (requestBuilder_ == null) { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + } else { + requestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.DiagnosticControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.DiagnosticControlCommand build() { + com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.DiagnosticControlCommand buildPartial() { + com.openxc.BinaryMessages.DiagnosticControlCommand result = new com.openxc.BinaryMessages.DiagnosticControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.action_ = action_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.DiagnosticControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.DiagnosticControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticControlCommand other) { + if (other == com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) return this; + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.hasAction()) { + setAction(other.getAction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.DiagnosticRequest request = 1; + private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { + if (requestBuilder_ == null) { + return request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest( + com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + request_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { + request_ = + com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(request_).mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + onChanged(); + } else { + requestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_; + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + return requestBuilder_; + } + + // optional .openxc.DiagnosticControlCommand.Action action = 2; + private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { + return action_; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000002); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) + } + + static { + defaultInstance = new DiagnosticControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + } + + public interface PassthroughModeControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + /** + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + */ + boolean hasMode(); + /** + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + */ + com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode(); + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class PassthroughModeControlCommand extends + com.google.protobuf.GeneratedMessage + implements PassthroughModeControlCommandOrBuilder { + // Use PassthroughModeControlCommand.newBuilder() to construct. + private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final PassthroughModeControlCommand defaultInstance; + public static PassthroughModeControlCommand getDefaultInstance() { + return defaultInstance; + } + + public PassthroughModeControlCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PassthroughModeControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + mode_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PassthroughModeControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PassthroughModeControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.PassthroughModeControlCommand.PassthroughMode} + */ + public enum PassthroughMode + implements com.google.protobuf.ProtocolMessageEnum { + /** + * OFF = 1; + */ + OFF(0, 1), + /** + * FILTERED = 2; + */ + FILTERED(1, 2), + /** + * UNFILTERED = 3; + */ + UNFILTERED(2, 3), + ; + + /** + * OFF = 1; + */ + public static final int OFF_VALUE = 1; + /** + * FILTERED = 2; + */ + public static final int FILTERED_VALUE = 2; + /** + * UNFILTERED = 3; + */ + public static final int UNFILTERED_VALUE = 3; + + + public final int getNumber() { return value; } + + public static PassthroughMode valueOf(int value) { + switch (value) { + case 1: return OFF; + case 2: return FILTERED; + case 3: return UNFILTERED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PassthroughMode findValueByNumber(int number) { + return PassthroughMode.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDescriptor().getEnumTypes().get(0); + } + + private static final PassthroughMode[] VALUES = values(); + + public static PassthroughMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private PassthroughMode(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.PassthroughModeControlCommand.PassthroughMode) + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; */ - public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { - return diagnosticRequest_; + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional int32 bus = 1; */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { - return diagnosticRequest_; + public int getBus() { + return bus_; } - // optional .openxc.ControlCommand.Action action = 3; - public static final int ACTION_FIELD_NUMBER = 3; - private com.openxc.BinaryMessages.ControlCommand.Action action_; + // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + public static final int MODE_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_; /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public boolean hasAction() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public boolean hasMode() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public com.openxc.BinaryMessages.ControlCommand.Action getAction() { - return action_; + public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { + return mode_; } private void initFields() { - type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + bus_ = 0; + mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2451,13 +3881,10 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); + output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, diagnosticRequest_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, action_.getNumber()); + output.writeEnum(2, mode_.getNumber()); } getUnknownFields().writeTo(output); } @@ -2470,15 +3897,11 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); + .computeInt32Size(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, diagnosticRequest_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, action_.getNumber()); + .computeEnumSize(2, mode_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2492,53 +3915,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.ControlCommand parseFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2547,7 +3970,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2559,24 +3982,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.ControlCommand} + * Protobuf type {@code openxc.PassthroughModeControlCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2588,7 +4011,6 @@ public final class BinaryMessages { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDiagnosticRequestFieldBuilder(); } } private static Builder create() { @@ -2597,16 +4019,10 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - } else { - diagnosticRequestBuilder_.clear(); - } + mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; bitField0_ = (bitField0_ & ~0x00000002); - action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -2616,65 +4032,54 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.ControlCommand build() { - com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.ControlCommand buildPartial() { - com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.type_ = type_; + result.bus_ = bus_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (diagnosticRequestBuilder_ == null) { - result.diagnosticRequest_ = diagnosticRequest_; - } else { - result.diagnosticRequest_ = diagnosticRequestBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.action_ = action_; + result.mode_ = mode_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.ControlCommand) { - return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); + if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { - if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasDiagnosticRequest()) { - mergeDiagnosticRequest(other.getDiagnosticRequest()); + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { + if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); } - if (other.hasAction()) { - setAction(other.getAction()); + if (other.hasMode()) { + setMode(other.getMode()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2688,11 +4093,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2703,204 +4108,84 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; - private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + // optional int32 bus = 1; + private int bus_ ; /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public boolean hasType() { + public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public com.openxc.BinaryMessages.ControlCommand.Type getType() { - return type_; + public int getBus() { + return bus_; } /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setBus(int value) { bitField0_ |= 0x00000001; - type_ = value; + bus_ = value; onChanged(); return this; } /** - * optional .openxc.ControlCommand.Type type = 1; + * optional int32 bus = 1; */ - public Builder clearType() { + public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + bus_ = 0; onChanged(); return this; } - // optional .openxc.DiagnosticRequest diagnostic_request = 2; - private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_; + // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public boolean hasDiagnosticRequest() { + public boolean hasMode() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() { - if (diagnosticRequestBuilder_ == null) { - return diagnosticRequest_; - } else { - return diagnosticRequestBuilder_.getMessage(); - } - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (diagnosticRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - diagnosticRequest_ = value; - onChanged(); - } else { - diagnosticRequestBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder setDiagnosticRequest( - com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = builderForValue.build(); - onChanged(); - } else { - diagnosticRequestBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (diagnosticRequestBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { - diagnosticRequest_ = - com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); - } else { - diagnosticRequest_ = value; - } - onChanged(); - } else { - diagnosticRequestBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public Builder clearDiagnosticRequest() { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - onChanged(); - } else { - diagnosticRequestBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDiagnosticRequestFieldBuilder().getBuilder(); - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() { - if (diagnosticRequestBuilder_ != null) { - return diagnosticRequestBuilder_.getMessageOrBuilder(); - } else { - return diagnosticRequest_; - } - } - /** - * optional .openxc.DiagnosticRequest diagnostic_request = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> - getDiagnosticRequestFieldBuilder() { - if (diagnosticRequestBuilder_ == null) { - diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - diagnosticRequest_, - getParentForChildren(), - isClean()); - diagnosticRequest_ = null; - } - return diagnosticRequestBuilder_; - } - - // optional .openxc.ControlCommand.Action action = 3; - private com.openxc.BinaryMessages.ControlCommand.Action action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; - /** - * optional .openxc.ControlCommand.Action action = 3; - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public com.openxc.BinaryMessages.ControlCommand.Action getAction() { - return action_; + public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { + return mode_; } /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public Builder setAction(com.openxc.BinaryMessages.ControlCommand.Action value) { + public Builder setMode(com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - action_ = value; + bitField0_ |= 0x00000002; + mode_ = value; onChanged(); return this; } /** - * optional .openxc.ControlCommand.Action action = 3; + * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; */ - public Builder clearAction() { - bitField0_ = (bitField0_ & ~0x00000004); - action_ = com.openxc.BinaryMessages.ControlCommand.Action.ADD; + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000002); + mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) } static { - defaultInstance = new ControlCommand(true); + defaultInstance = new PassthroughModeControlCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.ControlCommand) + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } public interface CommandResponseOrBuilder @@ -7696,6 +8981,16 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_ControlCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_DiagnosticControlCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_PassthroughModeControlCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -7742,37 +9037,46 @@ public final class BinaryMessages { "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "data\030\003 \001(\014\"\364\001\n\016ControlCommand\022)\n\004type\030\001 " + - "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" + - "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" + - "Request\022-\n\006action\030\003 \001(\0162\035.openxc.Control" + - "Command.Action\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tD" + - "EVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\035\n\006Action\022\007\n\003" + - "ADD\020\001\022\n\n\006CANCEL\020\002\"]\n\017CommandResponse\022)\n\004" + - "type\030\001 \001(\0162\033.openxc.ControlCommand.Type\022", - "\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Dia" + - "gnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i" + - "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007pa" + - "yload\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022" + - "\021\n\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014deco" + - "ded_type\030\t \001(\0162%.openxc.DiagnosticReques" + - "t.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010" + - "\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001" + - " \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013" + - "\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative", - "_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n" + - "\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 " + - "\001(\0162\031.openxc.DynamicField.Type\022\024\n\014string" + - "_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rb" + - "oolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007" + - "\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessage\022" + - ",\n\004type\030\001 \001(\0162\036.openxc.TranslatedMessage" + - ".Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.ope" + - "nxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.openxc" + - ".DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM", - "\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVEN" + - "TED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openx" + - "cB\016BinaryMessages" + "data\030\003 \001(\014\"\207\002\n\016ControlCommand\022)\n\004type\030\001 " + + "\001(\0162\033.openxc.ControlCommand.Type\022<\n\022diag" + + "nostic_request\030\002 \001(\0132 .openxc.Diagnostic" + + "ControlCommand\022G\n\030passthrough_mode_reque" + + "st\030\003 \001(\0132%.openxc.PassthroughModeControl" + + "Command\"C\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + + "D\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\"\236\001\n" + + "\030DiagnosticControlCommand\022*\n\007request\030\001 \001", + "(\0132\031.openxc.DiagnosticRequest\0227\n\006action\030" + + "\002 \001(\0162\'.openxc.DiagnosticControlCommand." + + "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"\253\001" + + "\n\035PassthroughModeControlCommand\022\013\n\003bus\030\001" + + " \001(\005\022C\n\004mode\030\002 \001(\01625.openxc.PassthroughM" + + "odeControlCommand.PassthroughMode\"8\n\017Pas" + + "sthroughMode\022\007\n\003OFF\020\001\022\014\n\010FILTERED\020\002\022\016\n\nU" + + "NFILTERED\020\003\"]\n\017CommandResponse\022)\n\004type\030\001" + + " \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007mes" + + "sage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\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\032\n\022multiple_responses\030\006 \001(\010\022\021\n\tfre" + + "quency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_ty" + + "pe\030\t \001(\0162%.openxc.DiagnosticRequest.Deco" + + "dedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2" + + "\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022" + + "\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030" + + "\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_respo" + + "nse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value", + "\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031." + + "openxc.DynamicField.Type\022\024\n\014string_value" + + "\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\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\004typ" + + "e\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.Dy" + + "namicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dynam" + + "icField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004" + + "BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NU", + "M\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bin" + + "aryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -7796,33 +9100,45 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "Action", }); - internal_static_openxc_CommandResponse_descriptor = + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", }); + internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticControlCommand_descriptor, + new java.lang.String[] { "Request", "Action", }); + internal_static_openxc_PassthroughModeControlCommand_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PassthroughModeControlCommand_descriptor, + new java.lang.String[] { "Bus", "Mode", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, new java.lang.String[] { "Type", "Message", "Status", }); internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(6); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); internal_static_openxc_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 8d0a7975..38be6b4a 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\"\xf4\x01\n\x0e\x43ontrolCommand\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x35\n\x12\x64iagnostic_request\x18\x02 \x01(\x0b\x32\x19.openxc.DiagnosticRequest\x12-\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1d.openxc.ControlCommand.Action\"2\n\x04Type\x12\x0b\n\x07VERSION\x10\x01\x12\r\n\tDEVICE_ID\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\"\x1d\n\x06\x41\x63tion\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x43\x41NCEL\x10\x02\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\xfd\x01\n\x11\x44iagnosticRequest\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x12\x1a\n\x12multiple_responses\x18\x06 \x01(\x08\x12\x11\n\tfrequency\x18\x07 \x01(\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12;\n\x0c\x64\x65\x63oded_type\x18\t \x01(\x0e\x32%.openxc.DiagnosticRequest.DecodedType\"!\n\x0b\x44\x65\x63odedType\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04OBD2\x10\x02\"\xa1\x01\n\x12\x44iagnosticResponse\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x12\n\nmessage_id\x18\x02 \x01(\r\x12\x0c\n\x04mode\x18\x03 \x01(\r\x12\x0b\n\x03pid\x18\x04 \x01(\r\x12\x0f\n\x07success\x18\x05 \x01(\x08\x12\x1e\n\x16negative_response_code\x18\x06 \x01(\r\x12\x0f\n\x07payload\x18\x07 \x01(\x0c\x12\r\n\x05value\x18\x08 \x01(\x01\"\xa2\x01\n\x0c\x44ynamicField\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.openxc.DynamicField.Type\x12\x14\n\x0cstring_value\x18\x02 \x01(\t\x12\x15\n\rnumeric_value\x18\x03 \x01(\x01\x12\x15\n\rboolean_value\x18\x04 \x01(\x08\"%\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\"\xf7\x01\n\x11TranslatedMessage\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.openxc.TranslatedMessage.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x04 \x01(\x0b\x32\x14.openxc.DynamicField\"\\\n\x04Type\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03NUM\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x12\n\x0e\x45VENTED_STRING\x10\x04\x12\x0f\n\x0b\x45VENTED_NUM\x10\x05\x12\x10\n\x0c\x45VENTED_BOOL\x10\x06\x42\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + 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\"\x87\x02\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\"C\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\"\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\"\xab\x01\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.openxc.PassthroughModeControlCommand.PassthroughMode\"8\n\x0fPassthroughMode\x12\x07\n\x03OFF\x10\x01\x12\x0c\n\x08\x46ILTERED\x10\x02\x12\x0e\n\nUNFILTERED\x10\x03\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\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') @@ -68,16 +68,20 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='PASSTHROUGH', index=3, number=4, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=656, - serialized_end=706, + serialized_start=689, + serialized_end=756, ) -_CONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( +_DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( name='Action', - full_name='openxc.ControlCommand.Action', + full_name='openxc.DiagnosticControlCommand.Action', filename=None, file=DESCRIPTOR, values=[ @@ -92,8 +96,33 @@ _CONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=708, - serialized_end=737, + serialized_start=888, + serialized_end=917, +) + +_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE = _descriptor.EnumDescriptor( + name='PassthroughMode', + full_name='openxc.PassthroughModeControlCommand.PassthroughMode', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='OFF', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FILTERED', index=1, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UNFILTERED', index=2, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1035, + serialized_end=1091, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -113,8 +142,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1055, - serialized_end=1088, + serialized_start=1409, + serialized_end=1442, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -138,8 +167,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1380, - serialized_end=1417, + serialized_start=1734, + serialized_end=1771, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +204,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1575, - serialized_end=1667, + serialized_start=1929, + serialized_end=2021, ) @@ -308,9 +337,9 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='action', full_name='openxc.ControlCommand.action', index=2, - number=3, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=1, + name='passthrough_mode_request', full_name='openxc.ControlCommand.passthrough_mode_request', index=2, + number=3, 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), @@ -320,13 +349,84 @@ _CONTROLCOMMAND = _descriptor.Descriptor( nested_types=[], enum_types=[ _CONTROLCOMMAND_TYPE, - _CONTROLCOMMAND_ACTION, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=737, + serialized_end=756, +) + + +_DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( + name='DiagnosticControlCommand', + full_name='openxc.DiagnosticControlCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='request', full_name='openxc.DiagnosticControlCommand.request', index=0, + number=1, 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), + _descriptor.FieldDescriptor( + name='action', full_name='openxc.DiagnosticControlCommand.action', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=1, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _DIAGNOSTICCONTROLCOMMAND_ACTION, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=759, + serialized_end=917, +) + + +_PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( + name='PassthroughModeControlCommand', + full_name='openxc.PassthroughModeControlCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.PassthroughModeControlCommand.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='mode', full_name='openxc.PassthroughModeControlCommand.mode', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=1, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=920, + serialized_end=1091, ) @@ -367,8 +467,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=739, - serialized_end=832, + serialized_start=1093, + serialized_end=1186, ) @@ -452,8 +552,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=835, - serialized_end=1088, + serialized_start=1189, + serialized_end=1442, ) @@ -529,8 +629,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1091, - serialized_end=1252, + serialized_start=1445, + serialized_end=1606, ) @@ -579,8 +679,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1255, - serialized_end=1417, + serialized_start=1609, + serialized_end=1771, ) @@ -629,8 +729,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1420, - serialized_end=1667, + serialized_start=1774, + serialized_end=2021, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -641,10 +741,14 @@ _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE -_CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICREQUEST -_CONTROLCOMMAND.fields_by_name['action'].enum_type = _CONTROLCOMMAND_ACTION +_CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND +_CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; -_CONTROLCOMMAND_ACTION.containing_type = _CONTROLCOMMAND; +_DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST +_DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION +_DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND; +_PASSTHROUGHMODECONTROLCOMMAND.fields_by_name['mode'].enum_type = _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE +_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE.containing_type = _PASSTHROUGHMODECONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; @@ -657,6 +761,8 @@ _TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND +DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND +DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -681,6 +787,18 @@ class ControlCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.ControlCommand) +class DiagnosticControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + +class PassthroughModeControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index 937fe186..fd61b6c8 100644 --- a/openxc.proto +++ b/openxc.proto @@ -22,12 +22,34 @@ message RawMessage { } message ControlCommand { - enum Type { VERSION = 1; DEVICE_ID = 2; DIAGNOSTIC = 3; } - enum Action { ADD = 1; CANCEL = 2; } + enum Type { + VERSION = 1; + DEVICE_ID = 2; + DIAGNOSTIC = 3; + PASSTHROUGH = 4; + } optional Type type = 1; - optional DiagnosticRequest diagnostic_request = 2; - optional Action action = 3; + optional DiagnosticControlCommand diagnostic_request = 2; + optional PassthroughModeControlCommand passthrough_mode_request = 3; +} + +message DiagnosticControlCommand { + enum Action { ADD = 1; CANCEL = 2; } + + optional DiagnosticRequest request = 1; + optional Action action = 2; +} + +message PassthroughModeControlCommand { + enum PassthroughMode { + OFF = 1; + FILTERED = 2; + UNFILTERED = 3; + } + + optional int32 bus = 1; + optional PassthroughMode mode = 2; } message CommandResponse { -- cgit 1.2.3-korg From ef7c7dc0afab46f0e2e5eb8b051e769fb7a1a6b5 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 20 Sep 2014 22:56:37 -0400 Subject: Simplify passthrough command to just a boolean. --- README.md | 18 +-- gen/cpp/openxc.pb | 13 +- gen/cpp/openxc.pb.c | 4 +- gen/cpp/openxc.pb.h | 24 ++-- gen/java/com/openxc/BinaryMessages.java | 229 +++++++++----------------------- gen/python/openxc_pb2.py | 72 +++------- openxc.proto | 8 +- 7 files changed, 108 insertions(+), 260 deletions(-) diff --git a/README.md b/README.md index feb40c44..258fb532 100644 --- a/README.md +++ b/README.md @@ -281,22 +281,18 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. #### Passthrough CAN Mode -The `passthrough` command controls the passthrough mode for each of the CAN -buses. There are three passthrough modes: - -* `off` - Only the specified simple vehicle messages are processed and output - from the VI. -* `filtered` - If the CAN acceptance filter is not otherwise disabled, only the - pre-defined CAN messages (i.e. those compiled with the firmware) will be - output in the low-level CAN format from VI. -* `unfiltered` - All received CAN messages will be passed through from the bus - to the VI's output. +The `passthrough` command controls whether low-level CAN messages are passed +through from the CAN bus through the VI to the output stream. If the CAN +acceptance filter is in bypass mode and passthrough is enabled, the output +stream will include all received CAN messages. If the bypass filter is enabled, +only those CAN messages that have been pre-defined in the firmware are +forwarded. **Request** { "command": "passthrough" "bus": 1, - "mode": + "enabled": true } **Response** diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index aa302360..90fe8778 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -ƒ +” openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -38,15 +38,10 @@ DIAGNOSTIC Action ADD -CANCEL"« +CANCEL"= PassthroughModeControlCommand -bus (C -mode (25.openxc.PassthroughModeControlCommand.PassthroughMode"8 -PassthroughMode -OFF -FILTERED - -UNFILTERED"] +bus ( +enabled ("] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 2ca5768c..f11ad592 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 20 21:59:09 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 20 22:56:34 2014. */ #include "openxc.pb.h" @@ -41,7 +41,7 @@ const pb_field_t openxc_DiagnosticControlCommand_fields[3] = { const pb_field_t openxc_PassthroughModeControlCommand_fields[3] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_PassthroughModeControlCommand, bus, bus, 0), - PB_FIELD( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_PassthroughModeControlCommand, mode, bus, 0), + PB_FIELD( 2, BOOL , OPTIONAL, STATIC , OTHER, openxc_PassthroughModeControlCommand, enabled, bus, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 555a672e..4c86b880 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 20 21:59:09 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 20 22:56:34 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -34,12 +34,6 @@ typedef enum _openxc_DiagnosticControlCommand_Action { openxc_DiagnosticControlCommand_Action_CANCEL = 2 } openxc_DiagnosticControlCommand_Action; -typedef enum _openxc_PassthroughModeControlCommand_PassthroughMode { - openxc_PassthroughModeControlCommand_PassthroughMode_OFF = 1, - openxc_PassthroughModeControlCommand_PassthroughMode_FILTERED = 2, - openxc_PassthroughModeControlCommand_PassthroughMode_UNFILTERED = 3 -} openxc_PassthroughModeControlCommand_PassthroughMode; - typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, openxc_DiagnosticRequest_DecodedType_OBD2 = 2 @@ -128,8 +122,8 @@ typedef struct _openxc_DynamicField { typedef struct _openxc_PassthroughModeControlCommand { bool has_bus; int32_t bus; - bool has_mode; - openxc_PassthroughModeControlCommand_PassthroughMode mode; + bool has_enabled; + bool enabled; } openxc_PassthroughModeControlCommand; typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; @@ -192,7 +186,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} #define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default} #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} -#define openxc_PassthroughModeControlCommand_init_default {false, 0, false, (openxc_PassthroughModeControlCommand_PassthroughMode)0} +#define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 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} @@ -202,7 +196,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} #define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero} #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} -#define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, (openxc_PassthroughModeControlCommand_PassthroughMode)0} +#define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 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} @@ -235,7 +229,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_numeric_value_tag 3 #define openxc_DynamicField_boolean_value_tag 4 #define openxc_PassthroughModeControlCommand_bus_tag 1 -#define openxc_PassthroughModeControlCommand_mode_tag 2 +#define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -268,11 +262,11 @@ 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 693 +#define openxc_VehicleMessage_size 689 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 103 +#define openxc_ControlCommand_size 99 #define openxc_DiagnosticControlCommand_size 76 -#define openxc_PassthroughModeControlCommand_size 17 +#define openxc_PassthroughModeControlCommand_size 13 #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 31e3249f..4d83a4d9 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -3624,15 +3624,15 @@ public final class BinaryMessages { */ int getBus(); - // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + // optional bool enabled = 2; /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - boolean hasMode(); + boolean hasEnabled(); /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode(); + boolean getEnabled(); } /** * Protobuf type {@code openxc.PassthroughModeControlCommand} @@ -3691,14 +3691,8 @@ public final class BinaryMessages { break; } case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - mode_ = value; - } + bitField0_ |= 0x00000002; + enabled_ = input.readBool(); break; } } @@ -3740,97 +3734,6 @@ public final class BinaryMessages { return PARSER; } - /** - * Protobuf enum {@code openxc.PassthroughModeControlCommand.PassthroughMode} - */ - public enum PassthroughMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - * OFF = 1; - */ - OFF(0, 1), - /** - * FILTERED = 2; - */ - FILTERED(1, 2), - /** - * UNFILTERED = 3; - */ - UNFILTERED(2, 3), - ; - - /** - * OFF = 1; - */ - public static final int OFF_VALUE = 1; - /** - * FILTERED = 2; - */ - public static final int FILTERED_VALUE = 2; - /** - * UNFILTERED = 3; - */ - public static final int UNFILTERED_VALUE = 3; - - - public final int getNumber() { return value; } - - public static PassthroughMode valueOf(int value) { - switch (value) { - case 1: return OFF; - case 2: return FILTERED; - case 3: return UNFILTERED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PassthroughMode findValueByNumber(int number) { - return PassthroughMode.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDescriptor().getEnumTypes().get(0); - } - - private static final PassthroughMode[] VALUES = values(); - - public static PassthroughMode valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private PassthroughMode(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.PassthroughModeControlCommand.PassthroughMode) - } - private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -3848,25 +3751,25 @@ public final class BinaryMessages { return bus_; } - // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; - public static final int MODE_FIELD_NUMBER = 2; - private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_; + // optional bool enabled = 2; + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_; /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public boolean hasMode() { + public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { - return mode_; + public boolean getEnabled() { + return enabled_; } private void initFields() { bus_ = 0; - mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + enabled_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3884,7 +3787,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, mode_.getNumber()); + output.writeBool(2, enabled_); } getUnknownFields().writeTo(output); } @@ -3901,7 +3804,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, mode_.getNumber()); + .computeBoolSize(2, enabled_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4021,7 +3924,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + enabled_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4058,7 +3961,7 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.mode_ = mode_; + result.enabled_ = enabled_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4078,8 +3981,8 @@ public final class BinaryMessages { if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasMode()) { - setMode(other.getMode()); + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4141,38 +4044,35 @@ public final class BinaryMessages { return this; } - // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; - private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + // optional bool enabled = 2; + private boolean enabled_ ; /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public boolean hasMode() { + public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() { - return mode_; + public boolean getEnabled() { + return enabled_; } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public Builder setMode(com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setEnabled(boolean value) { bitField0_ |= 0x00000002; - mode_ = value; + enabled_ = value; onChanged(); return this; } /** - * optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2; + * optional bool enabled = 2; */ - public Builder clearMode() { + public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000002); - mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF; + enabled_ = false; onChanged(); return this; } @@ -9047,36 +8947,33 @@ public final class BinaryMessages { "\030DiagnosticControlCommand\022*\n\007request\030\001 \001", "(\0132\031.openxc.DiagnosticRequest\0227\n\006action\030" + "\002 \001(\0162\'.openxc.DiagnosticControlCommand." + - "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"\253\001" + - "\n\035PassthroughModeControlCommand\022\013\n\003bus\030\001" + - " \001(\005\022C\n\004mode\030\002 \001(\01625.openxc.PassthroughM" + - "odeControlCommand.PassthroughMode\"8\n\017Pas" + - "sthroughMode\022\007\n\003OFF\020\001\022\014\n\010FILTERED\020\002\022\016\n\nU" + - "NFILTERED\020\003\"]\n\017CommandResponse\022)\n\004type\030\001" + - " \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007mes" + - "sage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\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\032\n\022multiple_responses\030\006 \001(\010\022\021\n\tfre" + - "quency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_ty" + - "pe\030\t \001(\0162%.openxc.DiagnosticRequest.Deco" + - "dedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2" + - "\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022" + - "\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030" + - "\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_respo" + - "nse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value", - "\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031." + - "openxc.DynamicField.Type\022\024\n\014string_value" + - "\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\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\004typ" + - "e\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.Dy" + - "namicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dynam" + - "icField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004" + - "BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NU", - "M\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bin" + - "aryMessages" + "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n" + + "\035PassthroughModeControlCommand\022\013\n\003bus\030\001 " + + "\001(\005\022\017\n\007enabled\030\002 \001(\010\"]\n\017CommandResponse\022" + + ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + + "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + + "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + + "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + + "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + + "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + + "s\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(" + + "\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negat" + + "ive_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014" + + "\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type" + + "\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014str" + + "ing_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025", + "\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020" + + "\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessa" + + "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + + "age.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024." + + "openxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.ope" + + "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + + "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + + "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + + "enxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -9112,7 +9009,7 @@ public final class BinaryMessages { internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PassthroughModeControlCommand_descriptor, - new java.lang.String[] { "Bus", "Mode", }); + new java.lang.String[] { "Bus", "Enabled", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_CommandResponse_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 38be6b4a..d5f50ad2 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\"\x87\x02\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\"C\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\"\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\"\xab\x01\n\x1dPassthroughModeControlCommand\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.openxc.PassthroughModeControlCommand.PassthroughMode\"8\n\x0fPassthroughMode\x12\x07\n\x03OFF\x10\x01\x12\x0c\n\x08\x46ILTERED\x10\x02\x12\x0e\n\nUNFILTERED\x10\x03\"]\n\x0f\x43ommandResponse\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.ControlCommand.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\x08\"\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\"\x87\x02\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\"C\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\"\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\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') @@ -100,31 +100,6 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( serialized_end=917, ) -_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE = _descriptor.EnumDescriptor( - name='PassthroughMode', - full_name='openxc.PassthroughModeControlCommand.PassthroughMode', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='OFF', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='FILTERED', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='UNFILTERED', index=2, number=3, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1035, - serialized_end=1091, -) - _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( name='DecodedType', full_name='openxc.DiagnosticRequest.DecodedType', @@ -142,8 +117,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1409, - serialized_end=1442, + serialized_start=1298, + serialized_end=1331, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -167,8 +142,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1734, - serialized_end=1771, + serialized_start=1623, + serialized_end=1660, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -204,8 +179,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1929, - serialized_end=2021, + serialized_start=1818, + serialized_end=1910, ) @@ -409,9 +384,9 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='mode', full_name='openxc.PassthroughModeControlCommand.mode', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=1, + name='enabled', full_name='openxc.PassthroughModeControlCommand.enabled', index=1, + number=2, 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), @@ -420,13 +395,12 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=920, - serialized_end=1091, + serialized_start=919, + serialized_end=980, ) @@ -467,8 +441,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1093, - serialized_end=1186, + serialized_start=982, + serialized_end=1075, ) @@ -552,8 +526,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1189, - serialized_end=1442, + serialized_start=1078, + serialized_end=1331, ) @@ -629,8 +603,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1445, - serialized_end=1606, + serialized_start=1334, + serialized_end=1495, ) @@ -679,8 +653,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1609, - serialized_end=1771, + serialized_start=1498, + serialized_end=1660, ) @@ -729,8 +703,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1774, - serialized_end=2021, + serialized_start=1663, + serialized_end=1910, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -747,8 +721,6 @@ _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION _DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND; -_PASSTHROUGHMODECONTROLCOMMAND.fields_by_name['mode'].enum_type = _PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE -_PASSTHROUGHMODECONTROLCOMMAND_PASSTHROUGHMODE.containing_type = _PASSTHROUGHMODECONTROLCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; diff --git a/openxc.proto b/openxc.proto index fd61b6c8..1be1df8a 100644 --- a/openxc.proto +++ b/openxc.proto @@ -42,14 +42,8 @@ message DiagnosticControlCommand { } message PassthroughModeControlCommand { - enum PassthroughMode { - OFF = 1; - FILTERED = 2; - UNFILTERED = 3; - } - optional int32 bus = 1; - optional PassthroughMode mode = 2; + optional bool enabled = 2; } message CommandResponse { -- cgit 1.2.3-korg From 8416597aecd8b3e97a016e9240d9b3fa640c0a07 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 21 Sep 2014 17:19:21 -0400 Subject: Deprecate "translated" and "raw" verbiage. Partway towards #16 but need to updated the binary format, too. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dd5651ed..542952de 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,9 @@ to your application. For example: } } -### Single Valued +### Simple Vehicle Message -There may not be a 1:1 relationship between input and output signals - i.e. raw +There may not be a 1:1 relationship between input and output signals - i.e. engine timing CAN signals may be summarized in an "engine performance" metric on the abstract side of the interface. @@ -50,7 +50,7 @@ The expected format of a single valued message is: {"name": "steering_wheel_angle", "value": 45} -### Evented +### Evented Simple Vehicle Message The expected format of an event message is: @@ -59,7 +59,7 @@ The expected format of an event message is: This format is good for something like a button event, where there are two discrete pieces of information in the measurement. -### Raw CAN Message format +### CAN Message The format for a raw CAN message: @@ -177,7 +177,7 @@ exist in parallel with a recurring request for the same key. **name** - (optional, defaults to nothing) A human readable, string name for this request. If provided, the response will have a `name` field (much like a - normal translated message) with this value in place of `bus`, `id`, `mode` and + simple vehicle message) with this value in place of `bus`, `id`, `mode` and `pid`. **multiple_responses** - (optional, false by default) if true, request will stay -- cgit 1.2.3-korg From 397b27846f0ba22d62274dd0780e6870e7a67eed Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 21 Sep 2014 17:20:50 -0400 Subject: Add missing comma in example. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 258fb532..e1523ab4 100644 --- a/README.md +++ b/README.md @@ -290,7 +290,7 @@ forwarded. **Request** - { "command": "passthrough" + { "command": "passthrough", "bus": 1, "enabled": true } -- cgit 1.2.3-korg From 31c5f5de1980a68159b116090cee0072c47365da Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 18:41:24 -0400 Subject: Add a control command to control AF bypass status. See openxc/vi-firmware#301. --- README.md | 30 +- gen/cpp/openxc.pb | 15 +- gen/cpp/openxc.pb.c | 15 +- gen/cpp/openxc.pb.h | 31 +- gen/java/com/openxc/BinaryMessages.java | 1183 ++++++++++++++++++++++++------- gen/python/openxc_pb2.py | 106 ++- openxc.proto | 7 + 7 files changed, 1098 insertions(+), 289 deletions(-) diff --git a/README.md b/README.md index e1523ab4..daed2935 100644 --- a/README.md +++ b/README.md @@ -297,11 +297,37 @@ forwarded. **Response** -If the bus and mode in the request were recognized, the `status` field in the -response will be `true`. If `false`, the passthrough mode was not changed. +If the bus in the request was valid and the passthrough mode was changed, the +`status` field in the response will be `true`. If `false`, the passthrough mode +was not changed. { "command_response": "passthrough", "status": true} +#### Acceptance Filter Bypass + +The `af_bypass` command controls whether the CAN message acceptance filter is +bypassed for each CAN controller. By default, hardware acceptance filter (AF) is +enabled in the VI - only previously defined CAN message IDs will be received. +Send this command with `bypass: true` to force the filters to bypassed. + +If `passthrough` mode is also enabled, when the AF is bypassed, the output will +include all CAN messages received. + +**Request** + + { "command": "af_bypass", + "bus": 1, + "bypass": true + } + +**Response** + +If the bus in the request was valid and the AF mode was changed, the `status` +field in the response will be `true`. If `false`, the passthrough mode was not +changed. + + { "command_response": "af_bypass", "status": true} + ### Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 90fe8778..c4000c36 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -” +Á openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,17 +21,19 @@ RawMessage bus ( message_id (  -data ( "‡ +data ( "ö ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG -passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommand"C +passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO + acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand"a Type VERSION DEVICE_ID DIAGNOSTIC - PASSTHROUGH"ž + PASSTHROUGH +ACCEPTANCE_FILTER_BYPASS"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -41,7 +43,10 @@ DIAGNOSTIC CANCEL"= PassthroughModeControlCommand bus ( -enabled ("] +enabled ("< +AcceptanceFilterBypassCommand +bus ( +bypass ("] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index f11ad592..6799e99b 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 20 22:56:34 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:18:56 2014. */ #include "openxc.pb.h" @@ -26,10 +26,11 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[4] = { +const pb_field_t openxc_ControlCommand_fields[5] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), PB_LAST_FIELD }; @@ -45,6 +46,12 @@ const pb_field_t openxc_PassthroughModeControlCommand_fields[3] = { PB_LAST_FIELD }; +const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3] = { + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_AcceptanceFilterBypassCommand, bus, bus, 0), + PB_FIELD( 2, BOOL , OPTIONAL, STATIC , OTHER, openxc_AcceptanceFilterBypassCommand, bypass, bus, 0), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -103,7 +110,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -114,7 +121,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 4c86b880..f3efb782 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 20 22:56:34 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:18:56 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -26,7 +26,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, openxc_ControlCommand_Type_DEVICE_ID = 2, openxc_ControlCommand_Type_DIAGNOSTIC = 3, - openxc_ControlCommand_Type_PASSTHROUGH = 4 + openxc_ControlCommand_Type_PASSTHROUGH = 4, + openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -55,6 +56,13 @@ typedef enum _openxc_TranslatedMessage_Type { } openxc_TranslatedMessage_Type; /* Struct definitions */ +typedef struct _openxc_AcceptanceFilterBypassCommand { + bool has_bus; + int32_t bus; + bool has_bypass; + bool bypass; +} openxc_AcceptanceFilterBypassCommand; + typedef struct _openxc_CommandResponse { bool has_type; openxc_ControlCommand_Type type; @@ -162,6 +170,8 @@ typedef struct _openxc_ControlCommand { openxc_DiagnosticControlCommand diagnostic_request; bool has_passthrough_mode_request; openxc_PassthroughModeControlCommand passthrough_mode_request; + bool has_acceptance_filter_bypass_command; + openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -184,9 +194,10 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} #define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default} +#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default} #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_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} @@ -194,9 +205,10 @@ typedef struct _openxc_VehicleMessage { #define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} #define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero} +#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero} #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_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} @@ -204,6 +216,8 @@ typedef struct _openxc_VehicleMessage { #define openxc_TranslatedMessage_init_zero {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ +#define openxc_AcceptanceFilterBypassCommand_bus_tag 1 +#define openxc_AcceptanceFilterBypassCommand_bypass_tag 2 #define openxc_CommandResponse_type_tag 1 #define openxc_CommandResponse_message_tag 2 #define openxc_CommandResponse_status_tag 3 @@ -242,6 +256,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 +#define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -252,9 +267,10 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_ControlCommand_fields[4]; +extern const pb_field_t openxc_ControlCommand_fields[5]; 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_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -262,11 +278,12 @@ 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 689 +#define openxc_VehicleMessage_size 704 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 99 +#define openxc_ControlCommand_size 114 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 +#define openxc_AcceptanceFilterBypassCommand_size 13 #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 4d83a4d9..e46cab69 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2083,6 +2083,20 @@ public final class BinaryMessages { * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); + + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + boolean hasAcceptanceFilterBypassCommand(); + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand(); + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2172,6 +2186,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; break; } + case 34: { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = acceptanceFilterBypassCommand_.toBuilder(); + } + acceptanceFilterBypassCommand_ = input.readMessage(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acceptanceFilterBypassCommand_); + acceptanceFilterBypassCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2232,6 +2259,10 @@ public final class BinaryMessages { * PASSTHROUGH = 4; */ PASSTHROUGH(3, 4), + /** + * ACCEPTANCE_FILTER_BYPASS = 5; + */ + ACCEPTANCE_FILTER_BYPASS(4, 5), ; /** @@ -2250,6 +2281,10 @@ public final class BinaryMessages { * PASSTHROUGH = 4; */ public static final int PASSTHROUGH_VALUE = 4; + /** + * ACCEPTANCE_FILTER_BYPASS = 5; + */ + public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; public final int getNumber() { return value; } @@ -2260,6 +2295,7 @@ public final class BinaryMessages { case 2: return DEVICE_ID; case 3: return DIAGNOSTIC; case 4: return PASSTHROUGH; + case 5: return ACCEPTANCE_FILTER_BYPASS; default: return null; } } @@ -2372,10 +2408,33 @@ public final class BinaryMessages { return passthroughModeRequest_; } + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + public static final int ACCEPTANCE_FILTER_BYPASS_COMMAND_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public boolean hasAcceptanceFilterBypassCommand() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { + return acceptanceFilterBypassCommand_; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { + return acceptanceFilterBypassCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2398,6 +2457,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, passthroughModeRequest_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, acceptanceFilterBypassCommand_); + } getUnknownFields().writeTo(output); } @@ -2419,6 +2481,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, passthroughModeRequest_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, acceptanceFilterBypassCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2529,6 +2595,7 @@ public final class BinaryMessages { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getDiagnosticRequestFieldBuilder(); getPassthroughModeRequestFieldBuilder(); + getAcceptanceFilterBypassCommandFieldBuilder(); } } private static Builder create() { @@ -2551,6 +2618,12 @@ public final class BinaryMessages { passthroughModeRequestBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + } else { + acceptanceFilterBypassCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -2599,6 +2672,14 @@ public final class BinaryMessages { } else { result.passthroughModeRequest_ = passthroughModeRequestBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (acceptanceFilterBypassCommandBuilder_ == null) { + result.acceptanceFilterBypassCommand_ = acceptanceFilterBypassCommand_; + } else { + result.acceptanceFilterBypassCommand_ = acceptanceFilterBypassCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2624,6 +2705,9 @@ public final class BinaryMessages { if (other.hasPassthroughModeRequest()) { mergePassthroughModeRequest(other.getPassthroughModeRequest()); } + if (other.hasAcceptanceFilterBypassCommand()) { + mergeAcceptanceFilterBypassCommand(other.getAcceptanceFilterBypassCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2921,6 +3005,123 @@ public final class BinaryMessages { return passthroughModeRequestBuilder_; } + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> acceptanceFilterBypassCommandBuilder_; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public boolean hasAcceptanceFilterBypassCommand() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { + if (acceptanceFilterBypassCommandBuilder_ == null) { + return acceptanceFilterBypassCommand_; + } else { + return acceptanceFilterBypassCommandBuilder_.getMessage(); + } + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder setAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { + if (acceptanceFilterBypassCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceptanceFilterBypassCommand_ = value; + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder setAcceptanceFilterBypassCommand( + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder builderForValue) { + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommand_ = builderForValue.build(); + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder mergeAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { + if (acceptanceFilterBypassCommandBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + acceptanceFilterBypassCommand_ != com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) { + acceptanceFilterBypassCommand_ = + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder(acceptanceFilterBypassCommand_).mergeFrom(value).buildPartial(); + } else { + acceptanceFilterBypassCommand_ = value; + } + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public Builder clearAcceptanceFilterBypassCommand() { + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + onChanged(); + } else { + acceptanceFilterBypassCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder getAcceptanceFilterBypassCommandBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getAcceptanceFilterBypassCommandFieldBuilder().getBuilder(); + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { + if (acceptanceFilterBypassCommandBuilder_ != null) { + return acceptanceFilterBypassCommandBuilder_.getMessageOrBuilder(); + } else { + return acceptanceFilterBypassCommand_; + } + } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> + getAcceptanceFilterBypassCommandFieldBuilder() { + if (acceptanceFilterBypassCommandBuilder_ == null) { + acceptanceFilterBypassCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder>( + acceptanceFilterBypassCommand_, + getParentForChildren(), + isClean()); + acceptanceFilterBypassCommand_ = null; + } + return acceptanceFilterBypassCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -3432,11 +3633,575 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; + com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .openxc.DiagnosticRequest request = 1; + private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { + if (requestBuilder_ == null) { + return request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder setRequest( + com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { + if (requestBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + request_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { + request_ = + com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(request_).mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); + onChanged(); + } else { + requestBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_; + } + } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + return requestBuilder_; + } + + // optional .openxc.DiagnosticControlCommand.Action action = 2; + private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { + return action_; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + action_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000002); + action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) + } + + static { + defaultInstance = new DiagnosticControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + } + + public interface PassthroughModeControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional bool enabled = 2; + /** + * optional bool enabled = 2; + */ + boolean hasEnabled(); + /** + * optional bool enabled = 2; + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class PassthroughModeControlCommand extends + com.google.protobuf.GeneratedMessage + implements PassthroughModeControlCommandOrBuilder { + // Use PassthroughModeControlCommand.newBuilder() to construct. + private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final PassthroughModeControlCommand defaultInstance; + public static PassthroughModeControlCommand getDefaultInstance() { + return defaultInstance; + } + + public PassthroughModeControlCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PassthroughModeControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + enabled_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PassthroughModeControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PassthroughModeControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional bool enabled = 2; + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_; + /** + * optional bool enabled = 2; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool enabled = 2; + */ + public boolean getEnabled() { + return enabled_; + } + + private void initFields() { + bus_ = 0; + enabled_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, enabled_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.enabled_ = enabled_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { + if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -3447,171 +4212,84 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DiagnosticRequest request = 1; - private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; + // optional int32 bus = 1; + private int bus_ ; /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public boolean hasRequest() { + public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { - if (requestBuilder_ == null) { - return request_; - } else { - return requestBuilder_.getMessage(); - } - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (requestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - request_ = value; - onChanged(); - } else { - requestBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public Builder setRequest( - com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { - if (requestBuilder_ == null) { - request_ = builderForValue.build(); - onChanged(); - } else { - requestBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; + public int getBus() { + return bus_; } /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { - if (requestBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - request_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) { - request_ = - com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(request_).mergeFrom(value).buildPartial(); - } else { - request_ = value; - } - onChanged(); - } else { - requestBuilder_.mergeFrom(value); - } + public Builder setBus(int value) { bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); return this; } /** - * optional .openxc.DiagnosticRequest request = 1; + * optional int32 bus = 1; */ - public Builder clearRequest() { - if (requestBuilder_ == null) { - request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); - onChanged(); - } else { - requestBuilder_.clear(); - } + public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { - bitField0_ |= 0x00000001; + bus_ = 0; onChanged(); - return getRequestFieldBuilder().getBuilder(); - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { - if (requestBuilder_ != null) { - return requestBuilder_.getMessageOrBuilder(); - } else { - return request_; - } - } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> - getRequestFieldBuilder() { - if (requestBuilder_ == null) { - requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - request_, - getParentForChildren(), - isClean()); - request_ = null; - } - return requestBuilder_; + return this; } - // optional .openxc.DiagnosticControlCommand.Action action = 2; - private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + // optional bool enabled = 2; + private boolean enabled_ ; /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public boolean hasAction() { + public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { - return action_; + public boolean getEnabled() { + return enabled_; } /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setEnabled(boolean value) { bitField0_ |= 0x00000002; - action_ = value; + enabled_ = value; onChanged(); return this; } /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; + * optional bool enabled = 2; */ - public Builder clearAction() { + public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000002); - action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + enabled_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) } static { - defaultInstance = new DiagnosticControlCommand(true); + defaultInstance = new PassthroughModeControlCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } - public interface PassthroughModeControlCommandOrBuilder + public interface AcceptanceFilterBypassCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 bus = 1; @@ -3624,35 +4302,35 @@ public final class BinaryMessages { */ int getBus(); - // optional bool enabled = 2; + // optional bool bypass = 2; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - boolean hasEnabled(); + boolean hasBypass(); /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - boolean getEnabled(); + boolean getBypass(); } /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ - public static final class PassthroughModeControlCommand extends + public static final class AcceptanceFilterBypassCommand extends com.google.protobuf.GeneratedMessage - implements PassthroughModeControlCommandOrBuilder { - // Use PassthroughModeControlCommand.newBuilder() to construct. - private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + implements AcceptanceFilterBypassCommandOrBuilder { + // Use AcceptanceFilterBypassCommand.newBuilder() to construct. + private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final PassthroughModeControlCommand defaultInstance; - public static PassthroughModeControlCommand getDefaultInstance() { + private static final AcceptanceFilterBypassCommand defaultInstance; + public static AcceptanceFilterBypassCommand getDefaultInstance() { return defaultInstance; } - public PassthroughModeControlCommand getDefaultInstanceForType() { + public AcceptanceFilterBypassCommand getDefaultInstanceForType() { return defaultInstance; } @@ -3662,7 +4340,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private PassthroughModeControlCommand( + private AcceptanceFilterBypassCommand( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3692,7 +4370,7 @@ public final class BinaryMessages { } case 16: { bitField0_ |= 0x00000002; - enabled_ = input.readBool(); + bypass_ = input.readBool(); break; } } @@ -3709,28 +4387,28 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PassthroughModeControlCommand parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AcceptanceFilterBypassCommand parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PassthroughModeControlCommand(input, extensionRegistry); + return new AcceptanceFilterBypassCommand(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @@ -3751,25 +4429,25 @@ public final class BinaryMessages { return bus_; } - // optional bool enabled = 2; - public static final int ENABLED_FIELD_NUMBER = 2; - private boolean enabled_; + // optional bool bypass = 2; + public static final int BYPASS_FIELD_NUMBER = 2; + private boolean bypass_; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean hasEnabled() { + public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean getEnabled() { - return enabled_; + public boolean getBypass() { + return bypass_; } private void initFields() { bus_ = 0; - enabled_ = false; + bypass_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3787,7 +4465,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, enabled_); + output.writeBool(2, bypass_); } getUnknownFields().writeTo(output); } @@ -3804,7 +4482,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, enabled_); + .computeBoolSize(2, bypass_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3818,53 +4496,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3873,7 +4551,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -3885,24 +4563,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3924,7 +4602,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - enabled_ = false; + bypass_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -3935,23 +4613,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -3961,28 +4639,28 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.enabled_ = enabled_; + result.bypass_ = bypass_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { - return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { + return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { - if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { + if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasEnabled()) { - setEnabled(other.getEnabled()); + if (other.hasBypass()) { + setBypass(other.getBypass()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -3996,11 +4674,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -4044,48 +4722,48 @@ public final class BinaryMessages { return this; } - // optional bool enabled = 2; - private boolean enabled_ ; + // optional bool bypass = 2; + private boolean bypass_ ; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean hasEnabled() { + public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean getEnabled() { - return enabled_; + public boolean getBypass() { + return bypass_; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder setEnabled(boolean value) { + public Builder setBypass(boolean value) { bitField0_ |= 0x00000002; - enabled_ = value; + bypass_ = value; onChanged(); return this; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder clearEnabled() { + public Builder clearBypass() { bitField0_ = (bitField0_ & ~0x00000002); - enabled_ = false; + bypass_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) } static { - defaultInstance = new PassthroughModeControlCommand(true); + defaultInstance = new AcceptanceFilterBypassCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } public interface CommandResponseOrBuilder @@ -8891,6 +9569,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -8937,43 +9620,47 @@ public final class BinaryMessages { "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "data\030\003 \001(\014\"\207\002\n\016ControlCommand\022)\n\004type\030\001 " + + "data\030\003 \001(\014\"\366\002\n\016ControlCommand\022)\n\004type\030\001 " + "\001(\0162\033.openxc.ControlCommand.Type\022<\n\022diag" + "nostic_request\030\002 \001(\0132 .openxc.Diagnostic" + "ControlCommand\022G\n\030passthrough_mode_reque" + "st\030\003 \001(\0132%.openxc.PassthroughModeControl" + - "Command\"C\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" + - "D\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\"\236\001\n" + - "\030DiagnosticControlCommand\022*\n\007request\030\001 \001", - "(\0132\031.openxc.DiagnosticRequest\0227\n\006action\030" + - "\002 \001(\0162\'.openxc.DiagnosticControlCommand." + - "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n" + - "\035PassthroughModeControlCommand\022\013\n\003bus\030\001 " + - "\001(\005\022\017\n\007enabled\030\002 \001(\010\"]\n\017CommandResponse\022" + - ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + - "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + - "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + - "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + - "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + - "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu" + - "s\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(" + - "\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negat" + - "ive_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014" + - "\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type" + - "\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014str" + - "ing_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025", - "\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020" + - "\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessa" + - "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + - "age.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024." + - "openxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.ope" + - "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + - "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + - "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + - "enxcB\016BinaryMessages" + "Command\022O\n acceptance_filter_bypass_comm" + + "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + + "sCommand\"a\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_", + "ID\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n" + + "\030ACCEPTANCE_FILTER_BYPASS\020\005\"\236\001\n\030Diagnost" + + "icControlCommand\022*\n\007request\030\001 \001(\0132\031.open" + + "xc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'.o" + + "penxc.DiagnosticControlCommand.Action\"\035\n" + + "\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passthro" + + "ughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007en" + + "abled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassCom" + + "mand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"]\n\017Com" + + "mandResponse\022)\n\004type\030\001 \001(\0162\033.openxc.Cont", + "rolCommand.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006stat" + + "us\030\003 \001(\010\"\375\001\n\021DiagnosticRequest\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\tfrequency\030\007 \001(\001\022\014\n\004na" + + "me\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\0162%.openxc." + + "DiagnosticRequest.DecodedType\"!\n\013Decoded" + + "Type\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticR" + + "esponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r" + + "\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005", + " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + + "payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014Dynamic" + + "Field\022\'\n\004type\030\001 \001(\0162\031.openxc.DynamicFiel" + + "d.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\004Ty" + + "pe\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021Tr" + + "anslatedMessage\022,\n\004type\030\001 \001(\0162\036.openxc.T" + + "ranslatedMessage.Type\022\014\n\004name\030\002 \001(\t\022#\n\005v" + + "alue\030\003 \001(\0132\024.openxc.DynamicField\022#\n\005even" + + "t\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\014EVENTED_BOO" + + "L\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -8997,7 +9684,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new @@ -9010,32 +9697,38 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PassthroughModeControlCommand_descriptor, new java.lang.String[] { "Bus", "Enabled", }); - internal_static_openxc_CommandResponse_descriptor = + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, + new java.lang.String[] { "Bus", "Bypass", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(6); internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, new java.lang.String[] { "Type", "Message", "Status", }); internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); internal_static_openxc_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index d5f50ad2..63f7a650 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\"\x87\x02\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\"C\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\"\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\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\"\xf6\x02\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\"a\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\"\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\"]\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') @@ -72,11 +72,15 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='PASSTHROUGH', index=3, number=4, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='ACCEPTANCE_FILTER_BYPASS', index=4, number=5, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=689, - serialized_end=756, + serialized_start=770, + serialized_end=867, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -96,8 +100,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=888, - serialized_end=917, + serialized_start=999, + serialized_end=1028, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -117,8 +121,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1298, - serialized_end=1331, + serialized_start=1471, + serialized_end=1504, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -142,8 +146,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1623, - serialized_end=1660, + serialized_start=1796, + serialized_end=1833, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -179,8 +183,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1818, - serialized_end=1910, + serialized_start=1991, + serialized_end=2083, ) @@ -318,6 +322,13 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='acceptance_filter_bypass_command', full_name='openxc.ControlCommand.acceptance_filter_bypass_command', index=3, + number=4, 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=[ ], @@ -329,7 +340,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=756, + serialized_end=867, ) @@ -364,8 +375,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=759, - serialized_end=917, + serialized_start=870, + serialized_end=1028, ) @@ -399,8 +410,43 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=919, - serialized_end=980, + serialized_start=1030, + serialized_end=1091, +) + + +_ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( + name='AcceptanceFilterBypassCommand', + full_name='openxc.AcceptanceFilterBypassCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='bus', full_name='openxc.AcceptanceFilterBypassCommand.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='bypass', full_name='openxc.AcceptanceFilterBypassCommand.bypass', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1093, + serialized_end=1153, ) @@ -441,8 +487,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=982, - serialized_end=1075, + serialized_start=1155, + serialized_end=1248, ) @@ -526,8 +572,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1078, - serialized_end=1331, + serialized_start=1251, + serialized_end=1504, ) @@ -603,8 +649,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1334, - serialized_end=1495, + serialized_start=1507, + serialized_end=1668, ) @@ -653,8 +699,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1498, - serialized_end=1660, + serialized_start=1671, + serialized_end=1833, ) @@ -703,8 +749,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1663, - serialized_end=1910, + serialized_start=1836, + serialized_end=2083, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -717,6 +763,7 @@ _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND +_CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type = _ACCEPTANCEFILTERBYPASSCOMMAND _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION @@ -735,6 +782,7 @@ DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND +DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -771,6 +819,12 @@ class PassthroughModeControlCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) +class AcceptanceFilterBypassCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index 1be1df8a..c7f75913 100644 --- a/openxc.proto +++ b/openxc.proto @@ -27,11 +27,13 @@ message ControlCommand { DEVICE_ID = 2; DIAGNOSTIC = 3; PASSTHROUGH = 4; + ACCEPTANCE_FILTER_BYPASS = 5; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; + optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; } message DiagnosticControlCommand { @@ -46,6 +48,11 @@ message PassthroughModeControlCommand { optional bool enabled = 2; } +message AcceptanceFilterBypassCommand { + optional int32 bus = 1; + optional bool bypass = 2; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 1.2.3-korg From edf010f735fcb8ace870b07b71db06c2c7cf2476 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 19:43:42 -0400 Subject: Update compiled files. --- gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 6799e99b..39c6a348 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:18:56 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:43:38 2014. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index f3efb782..85b711d5 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:18:56 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:43:38 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED -- cgit 1.2.3-korg From e3162f7da4b6b5ad422bccdb9b2a4e1b144ab9c9 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 19:56:21 -0400 Subject: Add a command to change message format while running. --- README.md | 22 + gen/cpp/openxc.pb | 19 +- gen/cpp/openxc.pb.c | 15 +- gen/cpp/openxc.pb.h | 36 +- gen/java/com/openxc/BinaryMessages.java | 1128 ++++++++++++++++++++++++++----- gen/python/openxc_pb2.py | 134 +++- openxc.proto | 12 + 7 files changed, 1151 insertions(+), 215 deletions(-) diff --git a/README.md b/README.md index daed2935..719fb0e8 100644 --- a/README.md +++ b/README.md @@ -328,6 +328,28 @@ changed. { "command_response": "af_bypass", "status": true} +#### Message Format Control + +The `message_format` command determines the format for output data from the VI +and also the expected format of commands sent to the VI. + +Valid formats are `json` and `binary`. + +**Request** + + { "command": "message_format", + "bus": 1, + "format": "json" + } + +**Response** + +If the format was changed successfully, the `status` in the response will be +`true`. The response will be in the new message format. + + { "command_response": "message_format", "status": true} + + ### Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index c4000c36..dfad822b 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Á +œ openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,19 +21,21 @@ RawMessage bus ( message_id (  -data ( "ö +data ( "È ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO - acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand"a + acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand< +message_format_command ( 2.openxc.MessageFormatCommand"u Type VERSION DEVICE_ID DIAGNOSTIC PASSTHROUGH -ACCEPTANCE_FILTER_BYPASS"ž +ACCEPTANCE_FILTER_BYPASS +MESSAGE_FORMAT"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -46,7 +48,14 @@ DIAGNOSTIC enabled ("< AcceptanceFilterBypassCommand bus ( -bypass ("] +bypass ("† +MessageFormatCommand +bus (: +format (2*.openxc.MessageFormatCommand.MessageFormat"% + MessageFormat +JSON + +BINARY"] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 39c6a348..3fd1b4ab 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:43:38 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:56:19 2014. */ #include "openxc.pb.h" @@ -26,11 +26,12 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[5] = { +const pb_field_t openxc_ControlCommand_fields[6] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), + PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, message_format_command, acceptance_filter_bypass_command, &openxc_MessageFormatCommand_fields), PB_LAST_FIELD }; @@ -52,6 +53,12 @@ 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), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -110,7 +117,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, message_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -121,7 +128,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, message_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 85b711d5..792aa935 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:43:38 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 19:56:19 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -27,7 +27,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DEVICE_ID = 2, openxc_ControlCommand_Type_DIAGNOSTIC = 3, openxc_ControlCommand_Type_PASSTHROUGH = 4, - openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5 + openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, + openxc_ControlCommand_Type_MESSAGE_FORMAT = 6 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -35,6 +36,11 @@ typedef enum _openxc_DiagnosticControlCommand_Action { openxc_DiagnosticControlCommand_Action_CANCEL = 2 } openxc_DiagnosticControlCommand_Action; +typedef enum _openxc_MessageFormatCommand_MessageFormat { + openxc_MessageFormatCommand_MessageFormat_JSON = 1, + openxc_MessageFormatCommand_MessageFormat_BINARY = 2 +} openxc_MessageFormatCommand_MessageFormat; + typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, openxc_DiagnosticRequest_DecodedType_OBD2 = 2 @@ -127,6 +133,13 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; +typedef struct _openxc_MessageFormatCommand { + bool has_bus; + int32_t bus; + bool has_format; + openxc_MessageFormatCommand_MessageFormat format; +} openxc_MessageFormatCommand; + typedef struct _openxc_PassthroughModeControlCommand { bool has_bus; int32_t bus; @@ -172,6 +185,8 @@ typedef struct _openxc_ControlCommand { openxc_PassthroughModeControlCommand passthrough_mode_request; bool has_acceptance_filter_bypass_command; openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; + bool has_message_format_command; + openxc_MessageFormatCommand message_format_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -194,10 +209,11 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} #define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default} +#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_MessageFormatCommand_init_default} #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_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} @@ -205,10 +221,11 @@ typedef struct _openxc_VehicleMessage { #define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} #define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero} +#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_MessageFormatCommand_init_zero} #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_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} @@ -242,6 +259,8 @@ 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_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_RawMessage_bus_tag 1 @@ -257,6 +276,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 +#define openxc_ControlCommand_message_format_command_tag 5 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -267,10 +287,11 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_ControlCommand_fields[5]; +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_CommandResponse_fields[4]; extern const pb_field_t openxc_DiagnosticRequest_fields[10]; extern const pb_field_t openxc_DiagnosticResponse_fields[9]; @@ -278,12 +299,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 704 +#define openxc_VehicleMessage_size 724 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 114 +#define openxc_ControlCommand_size 133 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 +#define openxc_MessageFormatCommand_size 17 #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 e46cab69..7a745c5c 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2097,6 +2097,20 @@ public final class BinaryMessages { * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); + + // optional .openxc.MessageFormatCommand message_format_command = 5; + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + boolean hasMessageFormatCommand(); + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand(); + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2199,6 +2213,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; break; } + case 42: { + com.openxc.BinaryMessages.MessageFormatCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = messageFormatCommand_.toBuilder(); + } + messageFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.MessageFormatCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(messageFormatCommand_); + messageFormatCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2263,6 +2290,10 @@ public final class BinaryMessages { * ACCEPTANCE_FILTER_BYPASS = 5; */ ACCEPTANCE_FILTER_BYPASS(4, 5), + /** + * MESSAGE_FORMAT = 6; + */ + MESSAGE_FORMAT(5, 6), ; /** @@ -2285,6 +2316,10 @@ public final class BinaryMessages { * ACCEPTANCE_FILTER_BYPASS = 5; */ public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; + /** + * MESSAGE_FORMAT = 6; + */ + public static final int MESSAGE_FORMAT_VALUE = 6; public final int getNumber() { return value; } @@ -2296,6 +2331,7 @@ public final class BinaryMessages { case 3: return DIAGNOSTIC; case 4: return PASSTHROUGH; case 5: return ACCEPTANCE_FILTER_BYPASS; + case 6: return MESSAGE_FORMAT; default: return null; } } @@ -2430,11 +2466,34 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } + // optional .openxc.MessageFormatCommand message_format_command = 5; + public static final int MESSAGE_FORMAT_COMMAND_FIELD_NUMBER = 5; + private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_; + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public boolean hasMessageFormatCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { + return messageFormatCommand_; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { + return messageFormatCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2460,6 +2519,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(4, acceptanceFilterBypassCommand_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, messageFormatCommand_); + } getUnknownFields().writeTo(output); } @@ -2485,6 +2547,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, acceptanceFilterBypassCommand_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, messageFormatCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2596,6 +2662,7 @@ public final class BinaryMessages { getDiagnosticRequestFieldBuilder(); getPassthroughModeRequestFieldBuilder(); getAcceptanceFilterBypassCommandFieldBuilder(); + getMessageFormatCommandFieldBuilder(); } } private static Builder create() { @@ -2624,6 +2691,12 @@ public final class BinaryMessages { acceptanceFilterBypassCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + if (messageFormatCommandBuilder_ == null) { + messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + } else { + messageFormatCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -2680,6 +2753,14 @@ public final class BinaryMessages { } else { result.acceptanceFilterBypassCommand_ = acceptanceFilterBypassCommandBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (messageFormatCommandBuilder_ == null) { + result.messageFormatCommand_ = messageFormatCommand_; + } else { + result.messageFormatCommand_ = messageFormatCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2708,6 +2789,9 @@ public final class BinaryMessages { if (other.hasAcceptanceFilterBypassCommand()) { mergeAcceptanceFilterBypassCommand(other.getAcceptanceFilterBypassCommand()); } + if (other.hasMessageFormatCommand()) { + mergeMessageFormatCommand(other.getMessageFormatCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -3122,6 +3206,123 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_; } + // optional .openxc.MessageFormatCommand message_format_command = 5; + private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> messageFormatCommandBuilder_; + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public boolean hasMessageFormatCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { + if (messageFormatCommandBuilder_ == null) { + return messageFormatCommand_; + } else { + return messageFormatCommandBuilder_.getMessage(); + } + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder setMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { + if (messageFormatCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + messageFormatCommand_ = value; + onChanged(); + } else { + messageFormatCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder setMessageFormatCommand( + com.openxc.BinaryMessages.MessageFormatCommand.Builder builderForValue) { + if (messageFormatCommandBuilder_ == null) { + messageFormatCommand_ = builderForValue.build(); + onChanged(); + } else { + messageFormatCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder mergeMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { + if (messageFormatCommandBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + messageFormatCommand_ != com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) { + messageFormatCommand_ = + com.openxc.BinaryMessages.MessageFormatCommand.newBuilder(messageFormatCommand_).mergeFrom(value).buildPartial(); + } else { + messageFormatCommand_ = value; + } + onChanged(); + } else { + messageFormatCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public Builder clearMessageFormatCommand() { + if (messageFormatCommandBuilder_ == null) { + messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + onChanged(); + } else { + messageFormatCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommand.Builder getMessageFormatCommandBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMessageFormatCommandFieldBuilder().getBuilder(); + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { + if (messageFormatCommandBuilder_ != null) { + return messageFormatCommandBuilder_.getMessageOrBuilder(); + } else { + return messageFormatCommand_; + } + } + /** + * optional .openxc.MessageFormatCommand message_format_command = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> + getMessageFormatCommandFieldBuilder() { + if (messageFormatCommandBuilder_ == null) { + messageFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder>( + messageFormatCommand_, + getParentForChildren(), + isClean()); + messageFormatCommand_ = null; + } + return messageFormatCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -4054,18 +4255,495 @@ public final class BinaryMessages { throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + bus_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.bus_ = bus_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.enabled_ = enabled_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { + return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { + if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + if (other.hasBus()) { + setBus(other.getBus()); + } + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 bus = 1; + private int bus_ ; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + /** + * optional int32 bus = 1; + */ + public Builder setBus(int value) { + bitField0_ |= 0x00000001; + bus_ = value; + onChanged(); + return this; + } + /** + * optional int32 bus = 1; + */ + public Builder clearBus() { + bitField0_ = (bitField0_ & ~0x00000001); + bus_ = 0; + onChanged(); + return this; + } + + // optional bool enabled = 2; + private boolean enabled_ ; + /** + * optional bool enabled = 2; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool enabled = 2; + */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 2; + */ + public Builder setEnabled(boolean value) { + bitField0_ |= 0x00000002; + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 2; + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) + } + + static { + defaultInstance = new PassthroughModeControlCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + } + + public interface AcceptanceFilterBypassCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ + boolean hasBus(); + /** + * optional int32 bus = 1; + */ + int getBus(); + + // optional bool bypass = 2; + /** + * optional bool bypass = 2; + */ + boolean hasBypass(); + /** + * optional bool bypass = 2; + */ + boolean getBypass(); + } + /** + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + */ + public static final class AcceptanceFilterBypassCommand extends + com.google.protobuf.GeneratedMessage + implements AcceptanceFilterBypassCommandOrBuilder { + // Use AcceptanceFilterBypassCommand.newBuilder() to construct. + private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AcceptanceFilterBypassCommand defaultInstance; + public static AcceptanceFilterBypassCommand getDefaultInstance() { + return defaultInstance; + } + + public AcceptanceFilterBypassCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AcceptanceFilterBypassCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + bypass_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AcceptanceFilterBypassCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcceptanceFilterBypassCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 bus = 1; + public static final int BUS_FIELD_NUMBER = 1; + private int bus_; + /** + * optional int32 bus = 1; + */ + public boolean hasBus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 bus = 1; + */ + public int getBus() { + return bus_; + } + + // optional bool bypass = 2; + public static final int BYPASS_FIELD_NUMBER = 2; + private boolean bypass_; + /** + * optional bool bypass = 2; + */ + public boolean hasBypass() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool bypass = 2; + */ + public boolean getBypass() { + return bypass_; + } + + private void initFields() { + bus_ = 0; + bypass_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, bypass_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, bus_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, bypass_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4074,7 +4752,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -4086,24 +4764,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4125,7 +4803,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - enabled_ = false; + bypass_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4136,23 +4814,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -4162,28 +4840,28 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.enabled_ = enabled_; + result.bypass_ = bypass_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { - return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); + if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { + return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { - if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { + if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasEnabled()) { - setEnabled(other.getEnabled()); + if (other.hasBypass()) { + setBypass(other.getBypass()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4197,11 +4875,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -4245,51 +4923,51 @@ public final class BinaryMessages { return this; } - // optional bool enabled = 2; - private boolean enabled_ ; + // optional bool bypass = 2; + private boolean bypass_ ; /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean hasEnabled() { + public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public boolean getEnabled() { - return enabled_; + public boolean getBypass() { + return bypass_; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder setEnabled(boolean value) { + public Builder setBypass(boolean value) { bitField0_ |= 0x00000002; - enabled_ = value; + bypass_ = value; onChanged(); return this; } /** - * optional bool enabled = 2; + * optional bool bypass = 2; */ - public Builder clearEnabled() { + public Builder clearBypass() { bitField0_ = (bitField0_ & ~0x00000002); - enabled_ = false; + bypass_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) } static { - defaultInstance = new PassthroughModeControlCommand(true); + defaultInstance = new AcceptanceFilterBypassCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - public interface AcceptanceFilterBypassCommandOrBuilder + public interface MessageFormatCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 bus = 1; @@ -4302,35 +4980,35 @@ public final class BinaryMessages { */ int getBus(); - // optional bool bypass = 2; + // optional .openxc.MessageFormatCommand.MessageFormat format = 2; /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - boolean hasBypass(); + boolean hasFormat(); /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - boolean getBypass(); + com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat(); } /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + * Protobuf type {@code openxc.MessageFormatCommand} */ - public static final class AcceptanceFilterBypassCommand extends + public static final class MessageFormatCommand extends com.google.protobuf.GeneratedMessage - implements AcceptanceFilterBypassCommandOrBuilder { - // Use AcceptanceFilterBypassCommand.newBuilder() to construct. - private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + implements MessageFormatCommandOrBuilder { + // Use MessageFormatCommand.newBuilder() to construct. + private MessageFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private MessageFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final AcceptanceFilterBypassCommand defaultInstance; - public static AcceptanceFilterBypassCommand getDefaultInstance() { + private static final MessageFormatCommand defaultInstance; + public static MessageFormatCommand getDefaultInstance() { return defaultInstance; } - public AcceptanceFilterBypassCommand getDefaultInstanceForType() { + public MessageFormatCommand getDefaultInstanceForType() { return defaultInstance; } @@ -4340,7 +5018,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private AcceptanceFilterBypassCommand( + private MessageFormatCommand( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4369,8 +5047,14 @@ public final class BinaryMessages { break; } case 16: { - bitField0_ |= 0x00000002; - bypass_ = input.readBool(); + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + format_ = value; + } break; } } @@ -4387,31 +5071,113 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public AcceptanceFilterBypassCommand parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public MessageFormatCommand parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceptanceFilterBypassCommand(input, extensionRegistry); + return new MessageFormatCommand(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } + /** + * Protobuf enum {@code openxc.MessageFormatCommand.MessageFormat} + */ + public enum MessageFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + * JSON = 1; + */ + JSON(0, 1), + /** + * BINARY = 2; + */ + BINARY(1, 2), + ; + + /** + * JSON = 1; + */ + public static final int JSON_VALUE = 1; + /** + * BINARY = 2; + */ + public static final int BINARY_VALUE = 2; + + + public final int getNumber() { return value; } + + public static MessageFormat valueOf(int value) { + switch (value) { + case 1: return JSON; + case 2: return BINARY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MessageFormat findValueByNumber(int number) { + return MessageFormat.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.MessageFormatCommand.getDescriptor().getEnumTypes().get(0); + } + + private static final MessageFormat[] VALUES = values(); + + public static MessageFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private MessageFormat(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.MessageFormatCommand.MessageFormat) + } + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -4429,25 +5195,25 @@ public final class BinaryMessages { return bus_; } - // optional bool bypass = 2; - public static final int BYPASS_FIELD_NUMBER = 2; - private boolean bypass_; + // optional .openxc.MessageFormatCommand.MessageFormat format = 2; + public static final int FORMAT_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_; /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean hasBypass() { + public boolean hasFormat() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean getBypass() { - return bypass_; + public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + return format_; } private void initFields() { bus_ = 0; - bypass_ = false; + format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4465,7 +5231,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, bypass_); + output.writeEnum(2, format_.getNumber()); } getUnknownFields().writeTo(output); } @@ -4482,7 +5248,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, bypass_); + .computeEnumSize(2, format_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4496,53 +5262,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( + public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4551,7 +5317,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.MessageFormatCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -4563,24 +5329,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + * Protobuf type {@code openxc.MessageFormatCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { + implements com.openxc.BinaryMessages.MessageFormatCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.MessageFormatCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4602,7 +5368,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - bypass_ = false; + format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4613,23 +5379,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; } - public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.MessageFormatCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); + public com.openxc.BinaryMessages.MessageFormatCommand build() { + com.openxc.BinaryMessages.MessageFormatCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); + public com.openxc.BinaryMessages.MessageFormatCommand buildPartial() { + com.openxc.BinaryMessages.MessageFormatCommand result = new com.openxc.BinaryMessages.MessageFormatCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -4639,28 +5405,28 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.bypass_ = bypass_; + result.format_ = format_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { - return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); + if (other instanceof com.openxc.BinaryMessages.MessageFormatCommand) { + return mergeFrom((com.openxc.BinaryMessages.MessageFormatCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { - if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; + 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.hasBypass()) { - setBypass(other.getBypass()); + if (other.hasFormat()) { + setFormat(other.getFormat()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4674,11 +5440,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; + com.openxc.BinaryMessages.MessageFormatCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.MessageFormatCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -4722,48 +5488,51 @@ public final class BinaryMessages { return this; } - // optional bool bypass = 2; - private boolean bypass_ ; + // optional .openxc.MessageFormatCommand.MessageFormat format = 2; + private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean hasBypass() { + public boolean hasFormat() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public boolean getBypass() { - return bypass_; + public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + return format_; } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public Builder setBypass(boolean value) { + public Builder setFormat(com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value) { + if (value == null) { + throw new NullPointerException(); + } bitField0_ |= 0x00000002; - bypass_ = value; + format_ = value; onChanged(); return this; } /** - * optional bool bypass = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 2; */ - public Builder clearBypass() { + public Builder clearFormat() { bitField0_ = (bitField0_ & ~0x00000002); - bypass_ = false; + format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) + // @@protoc_insertion_point(builder_scope:openxc.MessageFormatCommand) } static { - defaultInstance = new AcceptanceFilterBypassCommand(true); + defaultInstance = new MessageFormatCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) + // @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) } public interface CommandResponseOrBuilder @@ -9574,6 +10343,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_MessageFormatCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_MessageFormatCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -9620,47 +10394,53 @@ public final class BinaryMessages { "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "data\030\003 \001(\014\"\366\002\n\016ControlCommand\022)\n\004type\030\001 " + + "data\030\003 \001(\014\"\310\003\n\016ControlCommand\022)\n\004type\030\001 " + "\001(\0162\033.openxc.ControlCommand.Type\022<\n\022diag" + "nostic_request\030\002 \001(\0132 .openxc.Diagnostic" + "ControlCommand\022G\n\030passthrough_mode_reque" + "st\030\003 \001(\0132%.openxc.PassthroughModeControl" + "Command\022O\n acceptance_filter_bypass_comm" + "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + - "sCommand\"a\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_", - "ID\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n" + - "\030ACCEPTANCE_FILTER_BYPASS\020\005\"\236\001\n\030Diagnost" + - "icControlCommand\022*\n\007request\030\001 \001(\0132\031.open" + - "xc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'.o" + - "penxc.DiagnosticControlCommand.Action\"\035\n" + - "\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passthro" + - "ughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007en" + - "abled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassCom" + - "mand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"]\n\017Com" + - "mandResponse\022)\n\004type\030\001 \001(\0162\033.openxc.Cont", - "rolCommand.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006stat" + - "us\030\003 \001(\010\"\375\001\n\021DiagnosticRequest\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\tfrequency\030\007 \001(\001\022\014\n\004na" + - "me\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\0162%.openxc." + - "DiagnosticRequest.DecodedType\"!\n\013Decoded" + - "Type\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticR" + - "esponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r" + - "\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005", - " \001(\010\022\036\n\026negative_response_code\030\006 \001(\r\022\017\n\007" + - "payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014Dynamic" + - "Field\022\'\n\004type\030\001 \001(\0162\031.openxc.DynamicFiel" + - "d.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\004Ty" + - "pe\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021Tr" + - "anslatedMessage\022,\n\004type\030\001 \001(\0162\036.openxc.T" + - "ranslatedMessage.Type\022\014\n\004name\030\002 \001(\t\022#\n\005v" + - "alue\030\003 \001(\0132\024.openxc.DynamicField\022#\n\005even" + - "t\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\014EVENTED_BOO" + - "L\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "sCommand\022<\n\026message_format_command\030\005 \001(\013", + "2\034.openxc.MessageFormatCommand\"u\n\004Type\022\013" + + "\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC" + + "\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER" + + "_BYPASS\020\005\022\022\n\016MESSAGE_FORMAT\020\006\"\236\001\n\030Diagno" + + "sticControlCommand\022*\n\007request\030\001 \001(\0132\031.op" + + "enxc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'" + + ".openxc.DiagnosticControlCommand.Action\"" + + "\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" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -9684,7 +10464,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "MessageFormatCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new @@ -9703,32 +10483,38 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, new java.lang.String[] { "Bus", "Bypass", }); - internal_static_openxc_CommandResponse_descriptor = + internal_static_openxc_MessageFormatCommand_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_openxc_MessageFormatCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_MessageFormatCommand_descriptor, + new java.lang.String[] { "Bus", "Format", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, new java.lang.String[] { "Type", "Message", "Status", }); internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); internal_static_openxc_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 63f7a650..5488b5bb 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\"\xf6\x02\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\"a\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\"\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\"]\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\"\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') @@ -76,11 +76,15 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='ACCEPTANCE_FILTER_BYPASS', index=4, number=5, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='MESSAGE_FORMAT', index=5, number=6, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=770, - serialized_end=867, + serialized_start=832, + serialized_end=949, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -100,8 +104,29 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=999, - serialized_end=1028, + serialized_start=1081, + serialized_end=1110, +) + +_MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor( + name='MessageFormat', + full_name='openxc.MessageFormatCommand.MessageFormat', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='JSON', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BINARY', index=1, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1335, + serialized_end=1372, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -121,8 +146,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1471, - serialized_end=1504, + serialized_start=1690, + serialized_end=1723, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -146,8 +171,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1796, - serialized_end=1833, + serialized_start=2015, + serialized_end=2052, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -183,8 +208,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1991, - serialized_end=2083, + serialized_start=2210, + serialized_end=2302, ) @@ -329,6 +354,13 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='message_format_command', full_name='openxc.ControlCommand.message_format_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=[ ], @@ -340,7 +372,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=867, + serialized_end=949, ) @@ -375,8 +407,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=870, - serialized_end=1028, + serialized_start=952, + serialized_end=1110, ) @@ -410,8 +442,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1030, - serialized_end=1091, + serialized_start=1112, + serialized_end=1173, ) @@ -445,8 +477,44 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1093, - serialized_end=1153, + serialized_start=1175, + serialized_end=1235, +) + + +_MESSAGEFORMATCOMMAND = _descriptor.Descriptor( + name='MessageFormatCommand', + full_name='openxc.MessageFormatCommand', + filename=None, + file=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, + has_default_value=False, default_value=1, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _MESSAGEFORMATCOMMAND_MESSAGEFORMAT, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1238, + serialized_end=1372, ) @@ -487,8 +555,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1155, - serialized_end=1248, + serialized_start=1374, + serialized_end=1467, ) @@ -572,8 +640,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1251, - serialized_end=1504, + serialized_start=1470, + serialized_end=1723, ) @@ -649,8 +717,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1507, - serialized_end=1668, + serialized_start=1726, + serialized_end=1887, ) @@ -699,8 +767,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1671, - serialized_end=1833, + serialized_start=1890, + serialized_end=2052, ) @@ -749,8 +817,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1836, - serialized_end=2083, + serialized_start=2055, + serialized_end=2302, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -764,10 +832,13 @@ _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type = _ACCEPTANCEFILTERBYPASSCOMMAND +_CONTROLCOMMAND.fields_by_name['message_format_command'].message_type = _MESSAGEFORMATCOMMAND _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION _DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND; +_MESSAGEFORMATCOMMAND.fields_by_name['format'].enum_type = _MESSAGEFORMATCOMMAND_MESSAGEFORMAT +_MESSAGEFORMATCOMMAND_MESSAGEFORMAT.containing_type = _MESSAGEFORMATCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; @@ -783,6 +854,7 @@ DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND +DESCRIPTOR.message_types_by_name['MessageFormatCommand'] = _MESSAGEFORMATCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -825,6 +897,12 @@ class AcceptanceFilterBypassCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) +class MessageFormatCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _MESSAGEFORMATCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index c7f75913..97a6ebb6 100644 --- a/openxc.proto +++ b/openxc.proto @@ -28,12 +28,14 @@ message ControlCommand { DIAGNOSTIC = 3; PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; + MESSAGE_FORMAT = 6; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + optional MessageFormatCommand message_format_command = 5; } message DiagnosticControlCommand { @@ -53,6 +55,16 @@ message AcceptanceFilterBypassCommand { optional bool bypass = 2; } +message MessageFormatCommand { + enum MessageFormat { + JSON = 1; + BINARY = 2; + } + + optional int32 bus = 1; + optional MessageFormat format = 2; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 1.2.3-korg From f0a579dc1f45a8f373703968987f4bdd33192e16 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 20:07:03 -0400 Subject: Return response to set message format command in original format. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 719fb0e8..350cd24e 100644 --- a/README.md +++ b/README.md @@ -345,7 +345,8 @@ Valid formats are `json` and `binary`. **Response** If the format was changed successfully, the `status` in the response will be -`true`. The response will be in the new message format. +`true`. The response will be in the original message format, and all subsequent +messages will be in the new format. { "command_response": "message_format", "status": true} -- cgit 1.2.3-korg From d383e4cbc0bc89cd3bc3b69b0aa3ffc1862e9607 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 20:17:48 -0400 Subject: Remove unnecessary 'bus' field from message format command. --- README.md | 1 - gen/cpp/openxc.pb | 9 +- gen/cpp/openxc.pb.c | 7 +- gen/cpp/openxc.pb.h | 19 ++-- gen/java/com/openxc/BinaryMessages.java | 182 +++++++++----------------------- gen/python/openxc_pb2.py | 53 ++++------ openxc.proto | 3 +- 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; - /** - * optional int32 bus = 1; - */ - boolean hasBus(); - /** - * optional int32 bus = 1; - */ - int getBus(); - - // optional .openxc.MessageFormatCommand.MessageFormat format = 2; + // optional .openxc.MessageFormatCommand.MessageFormat format = 1; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ boolean hasFormat(); /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ 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_; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - 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_; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public boolean hasFormat() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ 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_ ; - /** - * optional int32 bus = 1; - */ - public boolean hasBus() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 bus = 1; - */ - public int getBus() { - return bus_; - } - /** - * optional int32 bus = 1; - */ - public Builder setBus(int value) { - bitField0_ |= 0x00000001; - bus_ = value; - onChanged(); - return this; - } - /** - * optional int32 bus = 1; - */ - 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; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public boolean hasFormat() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { return format_; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ public Builder setFormat(com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; format_ = value; onChanged(); return this; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 2; + * optional .openxc.MessageFormatCommand.MessageFormat format = 1; */ 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 { -- cgit 1.2.3-korg From 1e8b40f719ac43ea53e414e311d9387757630de6 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 20:40:22 -0400 Subject: Standardize names for payload format. --- README.md | 12 +- gen/cpp/openxc.pb | 19 +- gen/cpp/openxc.pb.c | 12 +- gen/cpp/openxc.pb.h | 42 +-- gen/java/com/openxc/BinaryMessages.java | 438 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 74 +++--- openxc.proto | 12 +- 7 files changed, 304 insertions(+), 305 deletions(-) diff --git a/README.md b/README.md index 2cde1305..e127543f 100644 --- a/README.md +++ b/README.md @@ -328,16 +328,16 @@ changed. { "command_response": "af_bypass", "status": true} -#### Message Format Control +#### Payload Format Control -The `message_format` command determines the format for output data from the VI -and also the expected format of commands sent to the VI. +The `payload_format` command determines the format for output data from the VI +and the expected format of commands sent to the VI. -Valid formats are `json` and `binary`. +Valid formats are `json` and `protobuf`. **Request** - { "command": "message_format", + { "command": "payload_format", "format": "json" } @@ -347,7 +347,7 @@ If the format was changed successfully, the `status` in the response will be `true`. The response will be in the original message format, and all subsequent messages will be in the new format. - { "command_response": "message_format", "status": true} + { "command_response": "payload_format", "status": true} ### Trace File Format diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 5b90df96..716d2689 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Ž + openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -27,7 +27,7 @@ message_id (  diagnostic_request ( 2 .openxc.DiagnosticControlCommandG passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand< -message_format_command ( 2.openxc.MessageFormatCommand"u +payload_format_command ( 2.openxc.PayloadFormatCommand"u Type VERSION DEVICE_ID @@ -35,7 +35,7 @@ message_id (  DIAGNOSTIC PASSTHROUGH ACCEPTANCE_FILTER_BYPASS -MESSAGE_FORMAT"ž +PAYLOAD_FORMAT"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -48,13 +48,12 @@ DIAGNOSTIC enabled ("< AcceptanceFilterBypassCommand bus ( -bypass ("y -MessageFormatCommand: -format (2*.openxc.MessageFormatCommand.MessageFormat"% - MessageFormat -JSON - -BINARY"] +bypass ("{ +PayloadFormatCommand: +format (2*.openxc.PayloadFormatCommand.PayloadFormat"' + PayloadFormat +JSON +PROTOBUF"] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 0c04bc4f..ffc0ec66 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 20:17:56 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 21:46:00 2014. */ #include "openxc.pb.h" @@ -31,7 +31,7 @@ const pb_field_t openxc_ControlCommand_fields[6] = { PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), - PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, message_format_command, acceptance_filter_bypass_command, &openxc_MessageFormatCommand_fields), + PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, payload_format_command, acceptance_filter_bypass_command, &openxc_PayloadFormatCommand_fields), PB_LAST_FIELD }; @@ -53,8 +53,8 @@ const pb_field_t openxc_AcceptanceFilterBypassCommand_fields[3] = { PB_LAST_FIELD }; -const pb_field_t openxc_MessageFormatCommand_fields[2] = { - PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_MessageFormatCommand, format, format, 0), +const pb_field_t openxc_PayloadFormatCommand_fields[2] = { + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_PayloadFormatCommand, format, format, 0), PB_LAST_FIELD }; @@ -116,7 +116,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, message_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -127,7 +127,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, message_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_MessageFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 2091dfaf..2df9a94b 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 20:17:56 2014. */ +/* Generated by nanopb-0.3.1 at Sat Sep 27 21:46:00 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -28,7 +28,7 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3, openxc_ControlCommand_Type_PASSTHROUGH = 4, openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, - openxc_ControlCommand_Type_MESSAGE_FORMAT = 6 + openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -36,10 +36,10 @@ typedef enum _openxc_DiagnosticControlCommand_Action { openxc_DiagnosticControlCommand_Action_CANCEL = 2 } openxc_DiagnosticControlCommand_Action; -typedef enum _openxc_MessageFormatCommand_MessageFormat { - openxc_MessageFormatCommand_MessageFormat_JSON = 1, - openxc_MessageFormatCommand_MessageFormat_BINARY = 2 -} openxc_MessageFormatCommand_MessageFormat; +typedef enum _openxc_PayloadFormatCommand_PayloadFormat { + openxc_PayloadFormatCommand_PayloadFormat_JSON = 1, + openxc_PayloadFormatCommand_PayloadFormat_PROTOBUF = 2 +} openxc_PayloadFormatCommand_PayloadFormat; typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, @@ -133,11 +133,6 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; -typedef struct _openxc_MessageFormatCommand { - bool has_format; - openxc_MessageFormatCommand_MessageFormat format; -} openxc_MessageFormatCommand; - typedef struct _openxc_PassthroughModeControlCommand { bool has_bus; int32_t bus; @@ -145,6 +140,11 @@ typedef struct _openxc_PassthroughModeControlCommand { bool enabled; } openxc_PassthroughModeControlCommand; +typedef struct _openxc_PayloadFormatCommand { + bool has_format; + openxc_PayloadFormatCommand_PayloadFormat format; +} openxc_PayloadFormatCommand; + typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; typedef struct _openxc_RawMessage { @@ -183,8 +183,8 @@ typedef struct _openxc_ControlCommand { openxc_PassthroughModeControlCommand passthrough_mode_request; bool has_acceptance_filter_bypass_command; openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; - bool has_message_format_command; - openxc_MessageFormatCommand message_format_command; + bool has_payload_format_command; + openxc_PayloadFormatCommand payload_format_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -207,11 +207,11 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} #define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_MessageFormatCommand_init_default} +#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default} #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, (openxc_MessageFormatCommand_MessageFormat)0} +#define openxc_PayloadFormatCommand_init_default {false, (openxc_PayloadFormatCommand_PayloadFormat)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} @@ -219,11 +219,11 @@ typedef struct _openxc_VehicleMessage { #define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} #define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_MessageFormatCommand_init_zero} +#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero} #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, (openxc_MessageFormatCommand_MessageFormat)0} +#define openxc_PayloadFormatCommand_init_zero {false, (openxc_PayloadFormatCommand_PayloadFormat)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} @@ -257,9 +257,9 @@ 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_format_tag 1 #define openxc_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 +#define openxc_PayloadFormatCommand_format_tag 1 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -273,7 +273,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 -#define openxc_ControlCommand_message_format_command_tag 5 +#define openxc_ControlCommand_payload_format_command_tag 5 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -288,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[2]; +extern const pb_field_t openxc_PayloadFormatCommand_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]; @@ -302,7 +302,7 @@ extern const pb_field_t openxc_TranslatedMessage_fields[5]; #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 -#define openxc_MessageFormatCommand_size 6 +#define openxc_PayloadFormatCommand_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 902b0c30..bf424fbc 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2098,19 +2098,19 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); - // optional .openxc.MessageFormatCommand message_format_command = 5; + // optional .openxc.PayloadFormatCommand payload_format_command = 5; /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - boolean hasMessageFormatCommand(); + boolean hasPayloadFormatCommand(); /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand(); + com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand(); /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder(); + com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2214,14 +2214,14 @@ public final class BinaryMessages { break; } case 42: { - com.openxc.BinaryMessages.MessageFormatCommand.Builder subBuilder = null; + com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = null; if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = messageFormatCommand_.toBuilder(); + subBuilder = payloadFormatCommand_.toBuilder(); } - messageFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.MessageFormatCommand.PARSER, extensionRegistry); + payloadFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.PayloadFormatCommand.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(messageFormatCommand_); - messageFormatCommand_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(payloadFormatCommand_); + payloadFormatCommand_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000010; break; @@ -2291,9 +2291,9 @@ public final class BinaryMessages { */ ACCEPTANCE_FILTER_BYPASS(4, 5), /** - * MESSAGE_FORMAT = 6; + * PAYLOAD_FORMAT = 6; */ - MESSAGE_FORMAT(5, 6), + PAYLOAD_FORMAT(5, 6), ; /** @@ -2317,9 +2317,9 @@ public final class BinaryMessages { */ public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; /** - * MESSAGE_FORMAT = 6; + * PAYLOAD_FORMAT = 6; */ - public static final int MESSAGE_FORMAT_VALUE = 6; + public static final int PAYLOAD_FORMAT_VALUE = 6; public final int getNumber() { return value; } @@ -2331,7 +2331,7 @@ public final class BinaryMessages { case 3: return DIAGNOSTIC; case 4: return PASSTHROUGH; case 5: return ACCEPTANCE_FILTER_BYPASS; - case 6: return MESSAGE_FORMAT; + case 6: return PAYLOAD_FORMAT; default: return null; } } @@ -2466,26 +2466,26 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } - // optional .openxc.MessageFormatCommand message_format_command = 5; - public static final int MESSAGE_FORMAT_COMMAND_FIELD_NUMBER = 5; - private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_; + // optional .openxc.PayloadFormatCommand payload_format_command = 5; + public static final int PAYLOAD_FORMAT_COMMAND_FIELD_NUMBER = 5; + private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_; /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public boolean hasMessageFormatCommand() { + public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { - return messageFormatCommand_; + public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { + return payloadFormatCommand_; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { - return messageFormatCommand_; + public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { + return payloadFormatCommand_; } private void initFields() { @@ -2493,7 +2493,7 @@ public final class BinaryMessages { diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); - messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2520,7 +2520,7 @@ public final class BinaryMessages { output.writeMessage(4, acceptanceFilterBypassCommand_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(5, messageFormatCommand_); + output.writeMessage(5, payloadFormatCommand_); } getUnknownFields().writeTo(output); } @@ -2549,7 +2549,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, messageFormatCommand_); + .computeMessageSize(5, payloadFormatCommand_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2662,7 +2662,7 @@ public final class BinaryMessages { getDiagnosticRequestFieldBuilder(); getPassthroughModeRequestFieldBuilder(); getAcceptanceFilterBypassCommandFieldBuilder(); - getMessageFormatCommandFieldBuilder(); + getPayloadFormatCommandFieldBuilder(); } } private static Builder create() { @@ -2691,10 +2691,10 @@ public final class BinaryMessages { acceptanceFilterBypassCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); - if (messageFormatCommandBuilder_ == null) { - messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } else { - messageFormatCommandBuilder_.clear(); + payloadFormatCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; @@ -2756,10 +2756,10 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } - if (messageFormatCommandBuilder_ == null) { - result.messageFormatCommand_ = messageFormatCommand_; + if (payloadFormatCommandBuilder_ == null) { + result.payloadFormatCommand_ = payloadFormatCommand_; } else { - result.messageFormatCommand_ = messageFormatCommandBuilder_.build(); + result.payloadFormatCommand_ = payloadFormatCommandBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -2789,8 +2789,8 @@ public final class BinaryMessages { if (other.hasAcceptanceFilterBypassCommand()) { mergeAcceptanceFilterBypassCommand(other.getAcceptanceFilterBypassCommand()); } - if (other.hasMessageFormatCommand()) { - mergeMessageFormatCommand(other.getMessageFormatCommand()); + if (other.hasPayloadFormatCommand()) { + mergePayloadFormatCommand(other.getPayloadFormatCommand()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -3206,121 +3206,121 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_; } - // optional .openxc.MessageFormatCommand message_format_command = 5; - private com.openxc.BinaryMessages.MessageFormatCommand messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + // optional .openxc.PayloadFormatCommand payload_format_command = 5; + private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> messageFormatCommandBuilder_; + com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> payloadFormatCommandBuilder_; /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public boolean hasMessageFormatCommand() { + public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommand getMessageFormatCommand() { - if (messageFormatCommandBuilder_ == null) { - return messageFormatCommand_; + public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { + if (payloadFormatCommandBuilder_ == null) { + return payloadFormatCommand_; } else { - return messageFormatCommandBuilder_.getMessage(); + return payloadFormatCommandBuilder_.getMessage(); } } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder setMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { - if (messageFormatCommandBuilder_ == null) { + public Builder setPayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { + if (payloadFormatCommandBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - messageFormatCommand_ = value; + payloadFormatCommand_ = value; onChanged(); } else { - messageFormatCommandBuilder_.setMessage(value); + payloadFormatCommandBuilder_.setMessage(value); } bitField0_ |= 0x00000010; return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder setMessageFormatCommand( - com.openxc.BinaryMessages.MessageFormatCommand.Builder builderForValue) { - if (messageFormatCommandBuilder_ == null) { - messageFormatCommand_ = builderForValue.build(); + public Builder setPayloadFormatCommand( + com.openxc.BinaryMessages.PayloadFormatCommand.Builder builderForValue) { + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommand_ = builderForValue.build(); onChanged(); } else { - messageFormatCommandBuilder_.setMessage(builderForValue.build()); + payloadFormatCommandBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder mergeMessageFormatCommand(com.openxc.BinaryMessages.MessageFormatCommand value) { - if (messageFormatCommandBuilder_ == null) { + public Builder mergePayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { + if (payloadFormatCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && - messageFormatCommand_ != com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) { - messageFormatCommand_ = - com.openxc.BinaryMessages.MessageFormatCommand.newBuilder(messageFormatCommand_).mergeFrom(value).buildPartial(); + payloadFormatCommand_ != com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance()) { + payloadFormatCommand_ = + com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder(payloadFormatCommand_).mergeFrom(value).buildPartial(); } else { - messageFormatCommand_ = value; + payloadFormatCommand_ = value; } onChanged(); } else { - messageFormatCommandBuilder_.mergeFrom(value); + payloadFormatCommandBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public Builder clearMessageFormatCommand() { - if (messageFormatCommandBuilder_ == null) { - messageFormatCommand_ = com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + public Builder clearPayloadFormatCommand() { + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); onChanged(); } else { - messageFormatCommandBuilder_.clear(); + payloadFormatCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommand.Builder getMessageFormatCommandBuilder() { + public com.openxc.BinaryMessages.PayloadFormatCommand.Builder getPayloadFormatCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getMessageFormatCommandFieldBuilder().getBuilder(); + return getPayloadFormatCommandFieldBuilder().getBuilder(); } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ - public com.openxc.BinaryMessages.MessageFormatCommandOrBuilder getMessageFormatCommandOrBuilder() { - if (messageFormatCommandBuilder_ != null) { - return messageFormatCommandBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { + if (payloadFormatCommandBuilder_ != null) { + return payloadFormatCommandBuilder_.getMessageOrBuilder(); } else { - return messageFormatCommand_; + return payloadFormatCommand_; } } /** - * optional .openxc.MessageFormatCommand message_format_command = 5; + * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder> - getMessageFormatCommandFieldBuilder() { - if (messageFormatCommandBuilder_ == null) { - messageFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.MessageFormatCommand, com.openxc.BinaryMessages.MessageFormatCommand.Builder, com.openxc.BinaryMessages.MessageFormatCommandOrBuilder>( - messageFormatCommand_, + com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> + getPayloadFormatCommandFieldBuilder() { + if (payloadFormatCommandBuilder_ == null) { + payloadFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder>( + payloadFormatCommand_, getParentForChildren(), isClean()); - messageFormatCommand_ = null; + payloadFormatCommand_ = null; } - return messageFormatCommandBuilder_; + return payloadFormatCommandBuilder_; } // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) @@ -4967,38 +4967,38 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - public interface MessageFormatCommandOrBuilder + public interface PayloadFormatCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .openxc.MessageFormatCommand.MessageFormat format = 1; + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ boolean hasFormat(); /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat(); + com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat(); } /** - * Protobuf type {@code openxc.MessageFormatCommand} + * Protobuf type {@code openxc.PayloadFormatCommand} */ - public static final class MessageFormatCommand extends + public static final class PayloadFormatCommand extends com.google.protobuf.GeneratedMessage - implements MessageFormatCommandOrBuilder { - // Use MessageFormatCommand.newBuilder() to construct. - private MessageFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + implements PayloadFormatCommandOrBuilder { + // Use PayloadFormatCommand.newBuilder() to construct. + private PayloadFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private MessageFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private PayloadFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final MessageFormatCommand defaultInstance; - public static MessageFormatCommand getDefaultInstance() { + private static final PayloadFormatCommand defaultInstance; + public static PayloadFormatCommand getDefaultInstance() { return defaultInstance; } - public MessageFormatCommand getDefaultInstanceForType() { + public PayloadFormatCommand getDefaultInstanceForType() { return defaultInstance; } @@ -5008,7 +5008,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private MessageFormatCommand( + private PayloadFormatCommand( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5033,7 +5033,7 @@ public final class BinaryMessages { } case 8: { int rawValue = input.readEnum(); - com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.valueOf(rawValue); + com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { @@ -5056,44 +5056,44 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); + com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public MessageFormatCommand parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PayloadFormatCommand parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MessageFormatCommand(input, extensionRegistry); + return new PayloadFormatCommand(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } /** - * Protobuf enum {@code openxc.MessageFormatCommand.MessageFormat} + * Protobuf enum {@code openxc.PayloadFormatCommand.PayloadFormat} */ - public enum MessageFormat + public enum PayloadFormat implements com.google.protobuf.ProtocolMessageEnum { /** * JSON = 1; */ JSON(0, 1), /** - * BINARY = 2; + * PROTOBUF = 2; */ - BINARY(1, 2), + PROTOBUF(1, 2), ; /** @@ -5101,30 +5101,30 @@ public final class BinaryMessages { */ public static final int JSON_VALUE = 1; /** - * BINARY = 2; + * PROTOBUF = 2; */ - public static final int BINARY_VALUE = 2; + public static final int PROTOBUF_VALUE = 2; public final int getNumber() { return value; } - public static MessageFormat valueOf(int value) { + public static PayloadFormat valueOf(int value) { switch (value) { case 1: return JSON; - case 2: return BINARY; + case 2: return PROTOBUF; default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap + private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MessageFormat findValueByNumber(int number) { - return MessageFormat.valueOf(number); + new com.google.protobuf.Internal.EnumLiteMap() { + public PayloadFormat findValueByNumber(int number) { + return PayloadFormat.valueOf(number); } }; @@ -5138,12 +5138,12 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.openxc.BinaryMessages.MessageFormatCommand.getDescriptor().getEnumTypes().get(0); + return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor().getEnumTypes().get(0); } - private static final MessageFormat[] VALUES = values(); + private static final PayloadFormat[] VALUES = values(); - public static MessageFormat valueOf( + public static PayloadFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( @@ -5155,33 +5155,33 @@ public final class BinaryMessages { private final int index; private final int value; - private MessageFormat(int index, int value) { + private PayloadFormat(int index, int value) { this.index = index; this.value = value; } - // @@protoc_insertion_point(enum_scope:openxc.MessageFormatCommand.MessageFormat) + // @@protoc_insertion_point(enum_scope:openxc.PayloadFormatCommand.PayloadFormat) } private int bitField0_; - // optional .openxc.MessageFormatCommand.MessageFormat format = 1; + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; public static final int FORMAT_FIELD_NUMBER = 1; - private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_; + private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } private void initFields() { - format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -5223,53 +5223,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(byte[] data) + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseDelimitedFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.MessageFormatCommand parseFrom( + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5278,7 +5278,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.MessageFormatCommand prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.PayloadFormatCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -5290,24 +5290,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.MessageFormatCommand} + * Protobuf type {@code openxc.PayloadFormatCommand} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.MessageFormatCommandOrBuilder { + implements com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.MessageFormatCommand.class, com.openxc.BinaryMessages.MessageFormatCommand.Builder.class); + com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); } - // Construct using com.openxc.BinaryMessages.MessageFormatCommand.newBuilder() + // Construct using com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5327,7 +5327,7 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -5338,23 +5338,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_MessageFormatCommand_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - public com.openxc.BinaryMessages.MessageFormatCommand getDefaultInstanceForType() { - return com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance(); + public com.openxc.BinaryMessages.PayloadFormatCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } - public com.openxc.BinaryMessages.MessageFormatCommand build() { - com.openxc.BinaryMessages.MessageFormatCommand result = buildPartial(); + public com.openxc.BinaryMessages.PayloadFormatCommand build() { + com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.MessageFormatCommand buildPartial() { - com.openxc.BinaryMessages.MessageFormatCommand result = new com.openxc.BinaryMessages.MessageFormatCommand(this); + public com.openxc.BinaryMessages.PayloadFormatCommand buildPartial() { + com.openxc.BinaryMessages.PayloadFormatCommand result = new com.openxc.BinaryMessages.PayloadFormatCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -5367,16 +5367,16 @@ public final class BinaryMessages { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.MessageFormatCommand) { - return mergeFrom((com.openxc.BinaryMessages.MessageFormatCommand)other); + if (other instanceof com.openxc.BinaryMessages.PayloadFormatCommand) { + return mergeFrom((com.openxc.BinaryMessages.PayloadFormatCommand)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.MessageFormatCommand other) { - if (other == com.openxc.BinaryMessages.MessageFormatCommand.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.PayloadFormatCommand other) { + if (other == com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance()) return this; if (other.hasFormat()) { setFormat(other.getFormat()); } @@ -5392,11 +5392,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.MessageFormatCommand parsedMessage = null; + com.openxc.BinaryMessages.PayloadFormatCommand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.MessageFormatCommand) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.PayloadFormatCommand) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -5407,24 +5407,24 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.MessageFormatCommand.MessageFormat format = 1; - private com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - public com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat getFormat() { + public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ - public Builder setFormat(com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat value) { + public Builder setFormat(com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value) { if (value == null) { throw new NullPointerException(); } @@ -5434,24 +5434,24 @@ public final class BinaryMessages { return this; } /** - * optional .openxc.MessageFormatCommand.MessageFormat format = 1; + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ public Builder clearFormat() { bitField0_ = (bitField0_ & ~0x00000001); - format_ = com.openxc.BinaryMessages.MessageFormatCommand.MessageFormat.JSON; + format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.MessageFormatCommand) + // @@protoc_insertion_point(builder_scope:openxc.PayloadFormatCommand) } static { - defaultInstance = new MessageFormatCommand(true); + defaultInstance = new PayloadFormatCommand(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) + // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } public interface CommandResponseOrBuilder @@ -10263,10 +10263,10 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_MessageFormatCommand_descriptor; + internal_static_openxc_PayloadFormatCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_MessageFormatCommand_fieldAccessorTable; + internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -10320,45 +10320,45 @@ public final class BinaryMessages { "st\030\003 \001(\0132%.openxc.PassthroughModeControl" + "Command\022O\n acceptance_filter_bypass_comm" + "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + - "sCommand\022<\n\026message_format_command\030\005 \001(\013", - "2\034.openxc.MessageFormatCommand\"u\n\004Type\022\013" + + "sCommand\022<\n\026payload_format_command\030\005 \001(\013", + "2\034.openxc.PayloadFormatCommand\"u\n\004Type\022\013" + "\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC" + "\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER" + - "_BYPASS\020\005\022\022\n\016MESSAGE_FORMAT\020\006\"\236\001\n\030Diagno" + + "_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\"\236\001\n\030Diagno" + "sticControlCommand\022*\n\007request\030\001 \001(\0132\031.op" + "enxc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'" + ".openxc.DiagnosticControlCommand.Action\"" + "\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\"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" + "ommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024P" + + "ayloadFormatCommand\022:\n\006format\030\001 \001(\0162*.op" + + "enxc.PayloadFormatCommand.PayloadFormat\"" + + "\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002" + + "\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.open" + + "xc.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" + + "\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\022mu" + + "ltiple_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%." + + "openxc.DiagnosticRequest.DecodedType\"!\n\013" + + "DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diag" + + "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i" + + "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" + + "ccess\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\014" + + "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" + + "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" + + "umeric_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.o" + + "penxc.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\004" + + "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + + "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + + "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10382,7 +10382,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "MessageFormatCommand", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new @@ -10401,11 +10401,11 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, new java.lang.String[] { "Bus", "Bypass", }); - internal_static_openxc_MessageFormatCommand_descriptor = + internal_static_openxc_PayloadFormatCommand_descriptor = getDescriptor().getMessageTypes().get(6); - internal_static_openxc_MessageFormatCommand_fieldAccessorTable = new + internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_MessageFormatCommand_descriptor, + internal_static_openxc_PayloadFormatCommand_descriptor, new java.lang.String[] { "Format", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(7); diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index c5d42154..35e63518 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\"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') + 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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\"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\x0ePAYLOAD_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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\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') @@ -77,7 +77,7 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( options=None, type=None), _descriptor.EnumValueDescriptor( - name='MESSAGE_FORMAT', index=5, number=6, + name='PAYLOAD_FORMAT', index=5, number=6, options=None, type=None), ], @@ -108,9 +108,9 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( serialized_end=1110, ) -_MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor( - name='MessageFormat', - full_name='openxc.MessageFormatCommand.MessageFormat', +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( + name='PayloadFormat', + full_name='openxc.PayloadFormatCommand.PayloadFormat', filename=None, file=DESCRIPTOR, values=[ @@ -119,14 +119,14 @@ _MESSAGEFORMATCOMMAND_MESSAGEFORMAT = _descriptor.EnumDescriptor( options=None, type=None), _descriptor.EnumValueDescriptor( - name='BINARY', index=1, number=2, + name='PROTOBUF', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=1321, - serialized_end=1358, + serialized_end=1360, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -146,8 +146,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1676, - serialized_end=1709, + serialized_start=1678, + serialized_end=1711, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -171,8 +171,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2001, - serialized_end=2038, + serialized_start=2003, + serialized_end=2040, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -208,8 +208,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2196, - serialized_end=2288, + serialized_start=2198, + serialized_end=2290, ) @@ -355,7 +355,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='message_format_command', full_name='openxc.ControlCommand.message_format_command', index=4, + name='payload_format_command', full_name='openxc.ControlCommand.payload_format_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, @@ -482,15 +482,15 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( ) -_MESSAGEFORMATCOMMAND = _descriptor.Descriptor( - name='MessageFormatCommand', - full_name='openxc.MessageFormatCommand', +_PAYLOADFORMATCOMMAND = _descriptor.Descriptor( + name='PayloadFormatCommand', + full_name='openxc.PayloadFormatCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='format', full_name='openxc.MessageFormatCommand.format', index=0, + name='format', full_name='openxc.PayloadFormatCommand.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, @@ -501,13 +501,13 @@ _MESSAGEFORMATCOMMAND = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _MESSAGEFORMATCOMMAND_MESSAGEFORMAT, + _PAYLOADFORMATCOMMAND_PAYLOADFORMAT, ], options=None, is_extendable=False, extension_ranges=[], serialized_start=1237, - serialized_end=1358, + serialized_end=1360, ) @@ -548,8 +548,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1360, - serialized_end=1453, + serialized_start=1362, + serialized_end=1455, ) @@ -633,8 +633,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1456, - serialized_end=1709, + serialized_start=1458, + serialized_end=1711, ) @@ -710,8 +710,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1712, - serialized_end=1873, + serialized_start=1714, + serialized_end=1875, ) @@ -760,8 +760,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1876, - serialized_end=2038, + serialized_start=1878, + serialized_end=2040, ) @@ -810,8 +810,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2041, - serialized_end=2288, + serialized_start=2043, + serialized_end=2290, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -825,13 +825,13 @@ _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type = _ACCEPTANCEFILTERBYPASSCOMMAND -_CONTROLCOMMAND.fields_by_name['message_format_command'].message_type = _MESSAGEFORMATCOMMAND +_CONTROLCOMMAND.fields_by_name['payload_format_command'].message_type = _PAYLOADFORMATCOMMAND _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION _DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND; -_MESSAGEFORMATCOMMAND.fields_by_name['format'].enum_type = _MESSAGEFORMATCOMMAND_MESSAGEFORMAT -_MESSAGEFORMATCOMMAND_MESSAGEFORMAT.containing_type = _MESSAGEFORMATCOMMAND; +_PAYLOADFORMATCOMMAND.fields_by_name['format'].enum_type = _PAYLOADFORMATCOMMAND_PAYLOADFORMAT +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT.containing_type = _PAYLOADFORMATCOMMAND; _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; @@ -847,7 +847,7 @@ DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND -DESCRIPTOR.message_types_by_name['MessageFormatCommand'] = _MESSAGEFORMATCOMMAND +DESCRIPTOR.message_types_by_name['PayloadFormatCommand'] = _PAYLOADFORMATCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -890,11 +890,11 @@ class AcceptanceFilterBypassCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) -class MessageFormatCommand(_message.Message): +class PayloadFormatCommand(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _MESSAGEFORMATCOMMAND + DESCRIPTOR = _PAYLOADFORMATCOMMAND - # @@protoc_insertion_point(class_scope:openxc.MessageFormatCommand) + # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType diff --git a/openxc.proto b/openxc.proto index e0264c6b..f54c0906 100644 --- a/openxc.proto +++ b/openxc.proto @@ -28,14 +28,14 @@ message ControlCommand { DIAGNOSTIC = 3; PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; - MESSAGE_FORMAT = 6; + PAYLOAD_FORMAT = 6; } optional Type type = 1; optional DiagnosticControlCommand diagnostic_request = 2; optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - optional MessageFormatCommand message_format_command = 5; + optional PayloadFormatCommand payload_format_command = 5; } message DiagnosticControlCommand { @@ -55,13 +55,13 @@ message AcceptanceFilterBypassCommand { optional bool bypass = 2; } -message MessageFormatCommand { - enum MessageFormat { +message PayloadFormatCommand { + enum PayloadFormat { JSON = 1; - BINARY = 2; + PROTOBUF = 2; } - optional MessageFormat format = 1; + optional PayloadFormat format = 1; } message CommandResponse { -- cgit 1.2.3-korg From 68ce7c57c76496efb28c385428b0e2d797d8df74 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 29 Sep 2014 21:52:34 -0400 Subject: Add a command to enable/disable pre-defined OBD-II requests. See openxc/vi-firmware#303. --- README.md | 23 +- gen/cpp/openxc.pb | 14 +- gen/cpp/openxc.pb.c | 14 +- gen/cpp/openxc.pb.h | 28 +- gen/java/com/openxc/BinaryMessages.java | 703 ++++++++++++++++++++++++++++++-- gen/python/openxc_pb2.py | 111 +++-- openxc.proto | 6 + 7 files changed, 805 insertions(+), 94 deletions(-) diff --git a/README.md b/README.md index e127543f..4b0c32bc 100644 --- a/README.md +++ b/README.md @@ -349,6 +349,27 @@ messages will be in the new format. { "command_response": "payload_format", "status": true} +#### Automatic Pre-Defined OBD-II PID Requests + +The `predefined_obd2` command enables and disables the querying for and +translating of a set of pre-defined OBD-II PIDs from the attached vehicle. When +enabled, the VI will query the vehicle to see if these PIDs are claimed to be +supported and for those that are, it will set up recurring requests. The +responses will be output as simple vehicle messages, with the names defined in +the "Signals Defined from Diagnostic Messages" section below. + +**Request** + + { "command": "predefined_obd2", + "enabled": true + } + +**Response** + +f the predefined requests were enabled or disabled successfully, the `status` in +the response will be `true`. + + { "command_response": "predefined_obd2", "status": true} ### Trace File Format @@ -451,7 +472,7 @@ manufacturers may support custom message names. * numerical, -179.0 to 179.0 degrees with standard GPS accuracy * 1Hz -### Signals from Diagnostics Messages +### Signals from Diagnostic Messages This set of signals is often retreived from OBD-II requests. The units can be found in the [OBD-II standard](http://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01). diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 716d2689..eef93e61 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ - +² openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -21,13 +21,14 @@ RawMessage bus ( message_id (  -data ( "È +data ( "¸ ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG passthrough_mode_request ( 2%.openxc.PassthroughModeControlCommandO acceptance_filter_bypass_command ( 2%.openxc.AcceptanceFilterBypassCommand< -payload_format_command ( 2.openxc.PayloadFormatCommand"u +payload_format_command ( 2.openxc.PayloadFormatCommandO + predefined_obd2_requests_command ( 2%.openxc.PredefinedObd2RequestsCommand"“ Type VERSION DEVICE_ID @@ -35,7 +36,8 @@ message_id (  DIAGNOSTIC PASSTHROUGH ACCEPTANCE_FILTER_BYPASS -PAYLOAD_FORMAT"ž +PAYLOAD_FORMAT +PREDEFINED_OBD2_REQUESTS"ž DiagnosticControlCommand* request ( 2.openxc.DiagnosticRequest7 action (2'.openxc.DiagnosticControlCommand.Action" @@ -53,7 +55,9 @@ DIAGNOSTIC format (2*.openxc.PayloadFormatCommand.PayloadFormat"' PayloadFormat JSON -PROTOBUF"] +PROTOBUF"0 +PredefinedObd2RequestsCommand +enabled ("] CommandResponse) type (2.openxc.ControlCommand.Type message (  diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ffc0ec66..ac31b7ec 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 21:46:00 2014. */ +/* Generated by nanopb-0.3.1 at Mon Sep 29 21:53:25 2014. */ #include "openxc.pb.h" @@ -26,12 +26,13 @@ const pb_field_t openxc_RawMessage_fields[4] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[6] = { +const pb_field_t openxc_ControlCommand_fields[7] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, payload_format_command, acceptance_filter_bypass_command, &openxc_PayloadFormatCommand_fields), + PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, predefined_obd2_requests_command, payload_format_command, &openxc_PredefinedObd2RequestsCommand_fields), PB_LAST_FIELD }; @@ -58,6 +59,11 @@ const pb_field_t openxc_PayloadFormatCommand_fields[2] = { PB_LAST_FIELD }; +const pb_field_t openxc_PredefinedObd2RequestsCommand_fields[2] = { + PB_FIELD( 1, BOOL , OPTIONAL, STATIC , FIRST, openxc_PredefinedObd2RequestsCommand, enabled, enabled, 0), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -116,7 +122,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -127,7 +133,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 2df9a94b..4af15de9 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 21:46:00 2014. */ +/* Generated by nanopb-0.3.1 at Mon Sep 29 21:53:25 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -28,7 +28,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_DIAGNOSTIC = 3, openxc_ControlCommand_Type_PASSTHROUGH = 4, openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, - openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6 + openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6, + openxc_ControlCommand_Type_PREDEFINED_OBD2_REQUESTS = 7 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -145,6 +146,11 @@ typedef struct _openxc_PayloadFormatCommand { openxc_PayloadFormatCommand_PayloadFormat format; } openxc_PayloadFormatCommand; +typedef struct _openxc_PredefinedObd2RequestsCommand { + bool has_enabled; + bool enabled; +} openxc_PredefinedObd2RequestsCommand; + typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; typedef struct _openxc_RawMessage { @@ -185,6 +191,8 @@ typedef struct _openxc_ControlCommand { openxc_AcceptanceFilterBypassCommand acceptance_filter_bypass_command; bool has_payload_format_command; openxc_PayloadFormatCommand payload_format_command; + bool has_predefined_obd2_requests_command; + openxc_PredefinedObd2RequestsCommand predefined_obd2_requests_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -207,11 +215,12 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} #define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default} +#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default} #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_PayloadFormatCommand_init_default {false, (openxc_PayloadFormatCommand_PayloadFormat)0} +#define openxc_PredefinedObd2RequestsCommand_init_default {false, 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} @@ -219,11 +228,12 @@ typedef struct _openxc_VehicleMessage { #define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} #define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} -#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero} +#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero} #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_PayloadFormatCommand_init_zero {false, (openxc_PayloadFormatCommand_PayloadFormat)0} +#define openxc_PredefinedObd2RequestsCommand_init_zero {false, 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} @@ -260,6 +270,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_PayloadFormatCommand_format_tag 1 +#define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 @@ -274,6 +285,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 #define openxc_ControlCommand_payload_format_command_tag 5 +#define openxc_ControlCommand_predefined_obd2_requests_command_tag 6 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_raw_message_tag 2 #define openxc_VehicleMessage_translated_message_tag 3 @@ -284,11 +296,12 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; extern const pb_field_t openxc_RawMessage_fields[4]; -extern const pb_field_t openxc_ControlCommand_fields[6]; +extern const pb_field_t openxc_ControlCommand_fields[7]; 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_PayloadFormatCommand_fields[2]; +extern const pb_field_t openxc_PredefinedObd2RequestsCommand_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]; @@ -296,13 +309,14 @@ 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 712 +#define openxc_VehicleMessage_size 716 #define openxc_RawMessage_size 27 -#define openxc_ControlCommand_size 122 +#define openxc_ControlCommand_size 126 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 #define openxc_PayloadFormatCommand_size 6 +#define openxc_PredefinedObd2RequestsCommand_size 2 #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 bf424fbc..b3d1be43 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -2111,6 +2111,20 @@ public final class BinaryMessages { * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); + + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + boolean hasPredefinedObd2RequestsCommand(); + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand(); + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder(); } /** * Protobuf type {@code openxc.ControlCommand} @@ -2226,6 +2240,19 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; break; } + case 50: { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = predefinedObd2RequestsCommand_.toBuilder(); + } + predefinedObd2RequestsCommand_ = input.readMessage(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(predefinedObd2RequestsCommand_); + predefinedObd2RequestsCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2294,6 +2321,10 @@ public final class BinaryMessages { * PAYLOAD_FORMAT = 6; */ PAYLOAD_FORMAT(5, 6), + /** + * PREDEFINED_OBD2_REQUESTS = 7; + */ + PREDEFINED_OBD2_REQUESTS(6, 7), ; /** @@ -2320,6 +2351,10 @@ public final class BinaryMessages { * PAYLOAD_FORMAT = 6; */ public static final int PAYLOAD_FORMAT_VALUE = 6; + /** + * PREDEFINED_OBD2_REQUESTS = 7; + */ + public static final int PREDEFINED_OBD2_REQUESTS_VALUE = 7; public final int getNumber() { return value; } @@ -2332,6 +2367,7 @@ public final class BinaryMessages { case 4: return PASSTHROUGH; case 5: return ACCEPTANCE_FILTER_BYPASS; case 6: return PAYLOAD_FORMAT; + case 7: return PREDEFINED_OBD2_REQUESTS; default: return null; } } @@ -2488,12 +2524,35 @@ public final class BinaryMessages { return payloadFormatCommand_; } + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + public static final int PREDEFINED_OBD2_REQUESTS_COMMAND_FIELD_NUMBER = 6; + private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public boolean hasPredefinedObd2RequestsCommand() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { + return predefinedObd2RequestsCommand_; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { + return predefinedObd2RequestsCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); + predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2522,6 +2581,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, payloadFormatCommand_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(6, predefinedObd2RequestsCommand_); + } getUnknownFields().writeTo(output); } @@ -2551,6 +2613,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, payloadFormatCommand_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, predefinedObd2RequestsCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2663,6 +2729,7 @@ public final class BinaryMessages { getPassthroughModeRequestFieldBuilder(); getAcceptanceFilterBypassCommandFieldBuilder(); getPayloadFormatCommandFieldBuilder(); + getPredefinedObd2RequestsCommandFieldBuilder(); } } private static Builder create() { @@ -2697,6 +2764,12 @@ public final class BinaryMessages { payloadFormatCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + } else { + predefinedObd2RequestsCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -2761,6 +2834,14 @@ public final class BinaryMessages { } else { result.payloadFormatCommand_ = payloadFormatCommandBuilder_.build(); } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + if (predefinedObd2RequestsCommandBuilder_ == null) { + result.predefinedObd2RequestsCommand_ = predefinedObd2RequestsCommand_; + } else { + result.predefinedObd2RequestsCommand_ = predefinedObd2RequestsCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2792,6 +2873,9 @@ public final class BinaryMessages { if (other.hasPayloadFormatCommand()) { mergePayloadFormatCommand(other.getPayloadFormatCommand()); } + if (other.hasPredefinedObd2RequestsCommand()) { + mergePredefinedObd2RequestsCommand(other.getPredefinedObd2RequestsCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -3323,6 +3407,123 @@ public final class BinaryMessages { return payloadFormatCommandBuilder_; } + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> predefinedObd2RequestsCommandBuilder_; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public boolean hasPredefinedObd2RequestsCommand() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { + if (predefinedObd2RequestsCommandBuilder_ == null) { + return predefinedObd2RequestsCommand_; + } else { + return predefinedObd2RequestsCommandBuilder_.getMessage(); + } + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder setPredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { + if (predefinedObd2RequestsCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predefinedObd2RequestsCommand_ = value; + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder setPredefinedObd2RequestsCommand( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder builderForValue) { + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommand_ = builderForValue.build(); + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder mergePredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { + if (predefinedObd2RequestsCommandBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + predefinedObd2RequestsCommand_ != com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance()) { + predefinedObd2RequestsCommand_ = + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder(predefinedObd2RequestsCommand_).mergeFrom(value).buildPartial(); + } else { + predefinedObd2RequestsCommand_ = value; + } + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public Builder clearPredefinedObd2RequestsCommand() { + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + onChanged(); + } else { + predefinedObd2RequestsCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder getPredefinedObd2RequestsCommandBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPredefinedObd2RequestsCommandFieldBuilder().getBuilder(); + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { + if (predefinedObd2RequestsCommandBuilder_ != null) { + return predefinedObd2RequestsCommandBuilder_.getMessageOrBuilder(); + } else { + return predefinedObd2RequestsCommand_; + } + } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> + getPredefinedObd2RequestsCommandFieldBuilder() { + if (predefinedObd2RequestsCommandBuilder_ == null) { + predefinedObd2RequestsCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder>( + predefinedObd2RequestsCommand_, + getParentForChildren(), + isClean()); + predefinedObd2RequestsCommand_ = null; + } + return predefinedObd2RequestsCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -5454,6 +5655,402 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } + public interface PredefinedObd2RequestsCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bool enabled = 1; + /** + * optional bool enabled = 1; + */ + boolean hasEnabled(); + /** + * optional bool enabled = 1; + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} + */ + public static final class PredefinedObd2RequestsCommand extends + com.google.protobuf.GeneratedMessage + implements PredefinedObd2RequestsCommandOrBuilder { + // Use PredefinedObd2RequestsCommand.newBuilder() to construct. + private PredefinedObd2RequestsCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private PredefinedObd2RequestsCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final PredefinedObd2RequestsCommand defaultInstance; + public static PredefinedObd2RequestsCommand getDefaultInstance() { + return defaultInstance; + } + + public PredefinedObd2RequestsCommand getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PredefinedObd2RequestsCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + enabled_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PredefinedObd2RequestsCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredefinedObd2RequestsCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional bool enabled = 1; + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_; + /** + * optional bool enabled = 1; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool enabled = 1; + */ + public boolean getEnabled() { + return enabled_; + } + + private void initFields() { + enabled_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + } + + // Construct using com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + enabled_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + } + + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand build() { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildPartial() { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = new com.openxc.BinaryMessages.PredefinedObd2RequestsCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.enabled_ = enabled_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) { + return mergeFrom((com.openxc.BinaryMessages.PredefinedObd2RequestsCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand other) { + if (other == com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance()) return this; + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional bool enabled = 1; + private boolean enabled_ ; + /** + * optional bool enabled = 1; + */ + public boolean hasEnabled() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool enabled = 1; + */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 1; + */ + public Builder setEnabled(boolean value) { + bitField0_ |= 0x00000001; + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 1; + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.PredefinedObd2RequestsCommand) + } + + static { + defaultInstance = new PredefinedObd2RequestsCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) + } + public interface CommandResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -10267,6 +10864,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -10313,7 +10915,7 @@ public final class BinaryMessages { "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "data\030\003 \001(\014\"\310\003\n\016ControlCommand\022)\n\004type\030\001 " + + "data\030\003 \001(\014\"\270\004\n\016ControlCommand\022)\n\004type\030\001 " + "\001(\0162\033.openxc.ControlCommand.Type\022<\n\022diag" + "nostic_request\030\002 \001(\0132 .openxc.Diagnostic" + "ControlCommand\022G\n\030passthrough_mode_reque" + @@ -10321,44 +10923,49 @@ public final class BinaryMessages { "Command\022O\n acceptance_filter_bypass_comm" + "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + "sCommand\022<\n\026payload_format_command\030\005 \001(\013", - "2\034.openxc.PayloadFormatCommand\"u\n\004Type\022\013" + - "\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC" + - "\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER" + - "_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\"\236\001\n\030Diagno" + - "sticControlCommand\022*\n\007request\030\001 \001(\0132\031.op" + - "enxc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'" + - ".openxc.DiagnosticControlCommand.Action\"" + - "\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\"{\n\024P" + - "ayloadFormatCommand\022:\n\006format\030\001 \001(\0162*.op" + - "enxc.PayloadFormatCommand.PayloadFormat\"" + - "\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002" + - "\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.open" + - "xc.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" + - "\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\022mu" + - "ltiple_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%." + - "openxc.DiagnosticRequest.DecodedType\"!\n\013" + - "DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diag" + - "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i" + - "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" + - "ccess\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\014" + - "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" + - "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" + - "umeric_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.o" + - "penxc.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\004" + - "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + - "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + - "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "2\034.openxc.PayloadFormatCommand\022O\n predef" + + "ined_obd2_requests_command\030\006 \001(\0132%.openx" + + "c.PredefinedObd2RequestsCommand\"\223\001\n\004Type" + + "\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOST" + + "IC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILT" + + "ER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDE" + + "FINED_OBD2_REQUESTS\020\007\"\236\001\n\030DiagnosticCont" + + "rolCommand\022*\n\007request\030\001 \001(\0132\031.openxc.Dia" + + "gnosticRequest\0227\n\006action\030\002 \001(\0162\'.openxc." + + "DiagnosticControlCommand.Action\"\035\n\006Actio", + "n\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughMod" + + "eControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030" + + "\002 \001(\010\"<\n\035AcceptanceFilterBypassCommand\022\013" + + "\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadFo" + + "rmatCommand\022:\n\006format\030\001 \001(\0162*.openxc.Pay" + + "loadFormatCommand.PayloadFormat\"\'\n\rPaylo" + + "adFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035Pred" + + "efinedObd2RequestsCommand\022\017\n\007enabled\030\001 \001" + + "(\010\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.op" + + "enxc.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\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\022" + + "multiple_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" + + "%.openxc.DiagnosticRequest.DecodedType\"!" + + "\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\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" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10382,7 +10989,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new @@ -10407,32 +11014,38 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PayloadFormatCommand_descriptor, new java.lang.String[] { "Format", }); - internal_static_openxc_CommandResponse_descriptor = + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, + new java.lang.String[] { "Enabled", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, new java.lang.String[] { "Type", "Message", "Status", }); internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); internal_static_openxc_TranslatedMessage_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_openxc_TranslatedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_TranslatedMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 35e63518..140bc4b9 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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\"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\x0ePAYLOAD_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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\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\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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') @@ -80,11 +80,15 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='PAYLOAD_FORMAT', index=5, number=6, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='PREDEFINED_OBD2_REQUESTS', index=6, number=7, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=832, - serialized_end=949, + serialized_start=914, + serialized_end=1061, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -104,8 +108,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1081, - serialized_end=1110, + serialized_start=1193, + serialized_end=1222, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -125,8 +129,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1321, - serialized_end=1360, + serialized_start=1433, + serialized_end=1472, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -146,8 +150,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1678, - serialized_end=1711, + serialized_start=1840, + serialized_end=1873, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -171,8 +175,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2003, - serialized_end=2040, + serialized_start=2165, + serialized_end=2202, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -208,8 +212,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2198, - serialized_end=2290, + serialized_start=2360, + serialized_end=2452, ) @@ -361,6 +365,13 @@ _CONTROLCOMMAND = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='predefined_obd2_requests_command', full_name='openxc.ControlCommand.predefined_obd2_requests_command', index=5, + number=6, 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=[ ], @@ -372,7 +383,7 @@ _CONTROLCOMMAND = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=493, - serialized_end=949, + serialized_end=1061, ) @@ -407,8 +418,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=952, - serialized_end=1110, + serialized_start=1064, + serialized_end=1222, ) @@ -442,8 +453,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1112, - serialized_end=1173, + serialized_start=1224, + serialized_end=1285, ) @@ -477,8 +488,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1175, - serialized_end=1235, + serialized_start=1287, + serialized_end=1347, ) @@ -506,8 +517,36 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1237, - serialized_end=1360, + serialized_start=1349, + serialized_end=1472, +) + + +_PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( + name='PredefinedObd2RequestsCommand', + full_name='openxc.PredefinedObd2RequestsCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='enabled', full_name='openxc.PredefinedObd2RequestsCommand.enabled', index=0, + number=1, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1474, + serialized_end=1522, ) @@ -548,8 +587,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1362, - serialized_end=1455, + serialized_start=1524, + serialized_end=1617, ) @@ -633,8 +672,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1458, - serialized_end=1711, + serialized_start=1620, + serialized_end=1873, ) @@ -710,8 +749,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1714, - serialized_end=1875, + serialized_start=1876, + serialized_end=2037, ) @@ -760,8 +799,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1878, - serialized_end=2040, + serialized_start=2040, + serialized_end=2202, ) @@ -810,8 +849,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2043, - serialized_end=2290, + serialized_start=2205, + serialized_end=2452, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -826,6 +865,7 @@ _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICC _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type = _ACCEPTANCEFILTERBYPASSCOMMAND _CONTROLCOMMAND.fields_by_name['payload_format_command'].message_type = _PAYLOADFORMATCOMMAND +_CONTROLCOMMAND.fields_by_name['predefined_obd2_requests_command'].message_type = _PREDEFINEDOBD2REQUESTSCOMMAND _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION @@ -848,6 +888,7 @@ DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTRO DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND DESCRIPTOR.message_types_by_name['PayloadFormatCommand'] = _PAYLOADFORMATCOMMAND +DESCRIPTOR.message_types_by_name['PredefinedObd2RequestsCommand'] = _PREDEFINEDOBD2REQUESTSCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -896,6 +937,12 @@ class PayloadFormatCommand(_message.Message): # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) +class PredefinedObd2RequestsCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) + class CommandResponse(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index f54c0906..c2b7f7c2 100644 --- a/openxc.proto +++ b/openxc.proto @@ -29,6 +29,7 @@ message ControlCommand { PASSTHROUGH = 4; ACCEPTANCE_FILTER_BYPASS = 5; PAYLOAD_FORMAT = 6; + PREDEFINED_OBD2_REQUESTS = 7; } optional Type type = 1; @@ -36,6 +37,7 @@ message ControlCommand { optional PassthroughModeControlCommand passthrough_mode_request = 3; optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; optional PayloadFormatCommand payload_format_command = 5; + optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; } message DiagnosticControlCommand { @@ -64,6 +66,10 @@ message PayloadFormatCommand { optional PayloadFormat format = 1; } +message PredefinedObd2RequestsCommand { + optional bool enabled = 1; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 1.2.3-korg From ab2066f086fa6cec7a29c019f51933023d4d5419 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 21:27:24 -0400 Subject: Move JSON spec to a separate file to keep the length down. --- JSON.mkd | 349 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 371 +++----------------------------------------------------------- 2 files changed, 364 insertions(+), 356 deletions(-) create mode 100644 JSON.mkd diff --git a/JSON.mkd b/JSON.mkd new file mode 100644 index 00000000..4704574c --- /dev/null +++ b/JSON.mkd @@ -0,0 +1,349 @@ +# OpenXC JSON Message Format + +Each JSON message published by a VI is delimited with a `\0 ` character. + +## Extra Values + +Any of the following JSON objects may optionally include an `extras` +field. The value may be any valid JSON object or array. The client libraries +will do their best to parse this information into a generic format and pass it +to your application. For example: + + {"name": "steering_wheel_angle", + "value": 45, + "extras": { + "calibrated": false + } + } + +## Single Valued + +There may not be a 1:1 relationship between input and output signals - i.e. raw +engine timing CAN signals may be summarized in an "engine performance" metric on +the abstract side of the interface. + +The expected format of a single valued message is: + + {"name": "steering_wheel_angle", "value": 45} + +## Evented + +The expected format of an event message is: + + {"name": "button_event", "value": "up", "event": "pressed"} + +This format is good for something like a button event, where there are two +discrete pieces of information in the measurement. + +## Raw CAN Message format + +The format for a raw CAN message: + + {"bus": 1, "id": 1234, "data": "0x12345678"} + +**bus** - the numerical identifier of the CAN bus where this message originated, + most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). + +**id** - the CAN message ID + +**data** - up to 8 bytes of data from the CAN message's payload, represented as + a hexidecimal number in a string. Many JSON parser cannot handle 64-bit + integers, which is why we are not using a numerical data type. Each byte in + the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the + complete string must have an even number of characters. The `0x` prefix is + optional. + +## Diagnostic Messages + +### Requests + +A diagnostic request is added or cancelled with a JSON object like this example: + + { "command": "diagnostic_request", + "action": "add", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "payload": "0x1234", + "multiple_responses": false, + "frequency": 1, + "name": "my_pid" + } + } + } + +* The `command` must be `diagnostic_request.` +* The `action` must be included, and must be one of: + * `add` - create a new one-off or recurring diagnostic request. + * `cancel` - cancel an existing request. +* The details of the request must be included in the `request` field, using + the sub-fields defined below. + +A diagnostic request's `bus`, `id`, `mode` and `pid` (or lack of a `pid`) +combine to create a unique key to identify a request. These four fields will be +referred to as the key of the diagnostic request. For example, to create a +simple one-time diagnostic request: + + { "command": "diagnostic_request", + "action": "add", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5 + } + } + } + +Requests are completed after any responses are received (unless +`multiple_responses` is set), or the request has timed out after a certain +number of seconds. After a request is completed, you can re-`create` the same +key to make another request. + +Requests with a `frequency` are added as *recurring* requests, e.g. to add the +previous example as a recurring request at 1Hz: + + { "command": "diagnostic_request", + "action": "add", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "frequency": 1 + } + } + } + +To cancel a recurring request, send a `cancel` action with the same key, e.g.: + + { "command": "diagnostic_request", + "action": "cancel", + "request": { + "bus": 1, + "id": 1234, + "mode": 1, + "pid": 5 + } + } + } + +Simultaneous recurring requests for the same key at different rates (e.g. 1Hz +*and* 2Hz) is not supported. However, non-recurring ("one-off") requests may +exist in parallel with a recurring request for the same key. + +**bus** - the numerical identifier of the CAN bus where this request should be + sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). + +**id** - the CAN arbitration ID for the request. + +**mode** - the OBD-II mode of the request - 0x1 through 0xff (1 through 9 are the + standardized modes and 0x22 is a common proprietary mode). + +**pid** - (optional) the PID for the request, if applicable. + +**payload** - (optional) up to 7 bytes of data for the request's payload + represented as a hexadecimal number in a string. Many JSON parser cannot + handle 64-bit integers, which is why we are not using a numerical data type. + Each byte in the string *must* be represented with 2 characters, e.g. `0x1` + is `0x01` - the complete string must have an even number of characters. The + `0x` prefix is optional. + +**name** - (optional, defaults to nothing) A human readable, string name for + this request. If provided, the response will have a `name` field (much like a + normal translated message) with this value in place of `bus`, `id`, `mode` and + `pid`. + +**multiple_responses** - (optional, false by default) if true, request will stay + active for a full 100ms, even after receiving a diagnostic response message. + This is useful for requests to the functional broadcast arbitration ID + (`0x7df`) when you need to get responses from multiple modules. It's possible + to set this to `true` for non-broadcast requests, but in practice you won't + see any additional responses after the first and it will just take up memory + in the VI for longer. + +**frequency** - (optional) Make this request a recurring request, at a this + frequency in Hz. To send a single non-recurring request, leave this field out. + +**decoded_type** - (optional, defaults to "obd2" if the request is a recognized +OBD-II mode 1 request, otherwise "none") If specified, the valid values are +`"none"` and `"obd2"`. If `obd2`, the payload will be decoded according to the +OBD-II specification and returned in the `value` field. Set this to `none` to +manually override the OBD-II decoding feature for a known PID. + +### Responses + +The response to a successful request: + + {"bus": 1, + "id": 1234, + "mode": 1, + "pid": 5, + "success": true, + "payload": "0x1234", + "value": 4660} + +and to an unsuccessful request, with the `negative_response_code` and no `pid` +echo: + + {"bus": 1, + "id": 1234, + "mode": 1, + "success": false, + "negative_response_code": 17} + +**bus** - the numerical identifier of the CAN bus where this response was + received. + +**id** - the CAN arbitration ID for this response. + +**mode** - the OBD-II mode of the original diagnostic request. + +**pid** - (optional) the PID for the request, if applicable. + +**success** - true if the response received was a positive response. If this + field is false, the remote node returned an error and the + `negative_response_code` field should be populated. + +**negative_response_code** - (optional) If requested node returned an error, + `success` will be `false` and this field will contain the negative response + code (NRC). + +Finally, the `payload` and `value` fields are mutually exclusive: + +**payload** - (optional) up to 7 bytes of data returned in the response, + represented as a hexadecimal number in a string. Many JSON parser cannot + handle 64-bit integers, which is why we are not using a numerical data type. + +**value** - (optional) if the response had a payload, this may be the + payload interpreted as an integer. + +The response to a simple PID request would look like this: + + {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} + +## Commands + +In addition to the `diagnostic_request` command described earlier, there are +other possible values for the `command` field. + +### Version Query + +The `version` command triggers the VI to inject a firmware version identifier +response into the outgoing data stream. + +**Request** + + { "command": "version"} + +**Response** + + { "command_response": "version", "message": "v6.0-dev (default)"} + +### Device ID Query + +The `device_id` command triggers the VI to inject a unique device ID (e.g. the +MAC address of an included Bluetooth module) into into the outgoing data stream. + +**Request** + + { "command": "device_id"} + +**Response** + + { "command_response": "device_id", "message": "0012345678"} + +### Passthrough CAN Mode + +The `passthrough` command controls whether low-level CAN messages are passed +through from the CAN bus through the VI to the output stream. If the CAN +acceptance filter is in bypass mode and passthrough is enabled, the output +stream will include all received CAN messages. If the bypass filter is enabled, +only those CAN messages that have been pre-defined in the firmware are +forwarded. + +**Request** + + { "command": "passthrough", + "bus": 1, + "enabled": true + } + +**Response** + +If the bus in the request was valid and the passthrough mode was changed, the +`status` field in the response will be `true`. If `false`, the passthrough mode +was not changed. + + { "command_response": "passthrough", "status": true} + +### Acceptance Filter Bypass + +The `af_bypass` command controls whether the CAN message acceptance filter is +bypassed for each CAN controller. By default, hardware acceptance filter (AF) is +enabled in the VI - only previously defined CAN message IDs will be received. +Send this command with `bypass: true` to force the filters to bypassed. + +If `passthrough` mode is also enabled, when the AF is bypassed, the output will +include all CAN messages received. + +**Request** + + { "command": "af_bypass", + "bus": 1, + "bypass": true + } + +**Response** + +If the bus in the request was valid and the AF mode was changed, the `status` +field in the response will be `true`. If `false`, the passthrough mode was not +changed. + + { "command_response": "af_bypass", "status": true} + +### Payload Format Control + +The `payload_format` command determines the format for output data from the VI +and the expected format of commands sent to the VI. + +Valid formats are `json` and `protobuf`. + +**Request** + + { "command": "payload_format", + "format": "json" + } + +**Response** + +If the format was changed successfully, the `status` in the response will be +`true`. The response will be in the original message format, and all subsequent +messages will be in the new format. + + { "command_response": "payload_format", "status": true} + +### Automatic Pre-Defined OBD-II PID Requests + +The `predefined_obd2` command enables and disables the querying for and +translating of a set of pre-defined OBD-II PIDs from the attached vehicle. When +enabled, the VI will query the vehicle to see if these PIDs are claimed to be +supported and for those that are, it will set up recurring requests. The +responses will be output as simple vehicle messages, with the names defined in +the "Signals Defined from Diagnostic Messages" section below. + +**Request** + + { "command": "predefined_obd2", + "enabled": true + } + +**Response** + +f the predefined requests were enabled or disabled successfully, the `status` in +the response will be `true`. + + { "command_response": "predefined_obd2", "status": true} + diff --git a/README.md b/README.md index 4b0c32bc..29baa3a3 100644 --- a/README.md +++ b/README.md @@ -7,371 +7,30 @@ This specification is a part of the [OpenXC platform][OpenXC]. An OpenXC vehicle interface sends generic vehicle data over one or more output interfaces (e.g. USB or Bluetooth) as JSON or Protocol Buffers (protobuf). -## Binary (Protocol Buffers) - -The binary format is encoded using [Google Protocol -Buffers](https://code.google.com/p/protobuf/). The format is specified in the -file `openxc.proto`. Those are published using the standard length-delimited -method (any protobuf library should support this). - -The binary format is best if you need to maximize the amount of data that can be -sent from the VI, trading off flexibility for efficiency. - ## JSON -This document describes the JSON format and includes a high level description of -each type and field. Each JSON message published by a VI is delimited with a -`\0 ` character. +The JSON format is the most flexible and easiest to use. The format is fully +specified in the [JSON.mkd](JSON.mkd) file in this repository. +a more flexible option than binary, but is less compact and +therefore takes more bandwidth and processing power. The JSON format is best for most developers, as it is fairly efficient and very flexible. -### Extra Values - -Any of the following JSON objects may optionally include an `extras` -field. The value may be any valid JSON object or array. The client libraries -will do their best to parse this information into a generic format and pass it -to your application. For example: - - {"name": "steering_wheel_angle", - "value": 45, - "extras": { - "calibrated": false - } - } - -### Single Valued - -There may not be a 1:1 relationship between input and output signals - i.e. raw -engine timing CAN signals may be summarized in an "engine performance" metric on -the abstract side of the interface. - -The expected format of a single valued message is: - - {"name": "steering_wheel_angle", "value": 45} - -### Evented - -The expected format of an event message is: - - {"name": "button_event", "value": "up", "event": "pressed"} - -This format is good for something like a button event, where there are two -discrete pieces of information in the measurement. - -### Raw CAN Message format - -The format for a raw CAN message: - - {"bus": 1, "id": 1234, "data": "0x12345678"} - -**bus** - the numerical identifier of the CAN bus where this message originated, - most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). - -**id** - the CAN message ID - -**data** - up to 8 bytes of data from the CAN message's payload, represented as - a hexidecimal number in a string. Many JSON parser cannot handle 64-bit - integers, which is why we are not using a numerical data type. Each byte in - the string *must* be represented with 2 characters, e.g. `0x1` is `0x01` - the - complete string must have an even number of characters. The `0x` prefix is - optional. - -### Diagnostic Messages - -#### Requests - -A diagnostic request is added or cancelled with a JSON object like this example: - - { "command": "diagnostic_request", - "action": "add", - "request": { - "bus": 1, - "id": 1234, - "mode": 1, - "pid": 5, - "payload": "0x1234", - "multiple_responses": false, - "frequency": 1, - "name": "my_pid" - } - } - } - -* The `command` must be `diagnostic_request.` -* The `action` must be included, and must be one of: - * `add` - create a new one-off or recurring diagnostic request. - * `cancel` - cancel an existing request. -* The details of the request must be included in the `request` field, using - the sub-fields defined below. - -A diagnostic request's `bus`, `id`, `mode` and `pid` (or lack of a `pid`) -combine to create a unique key to identify a request. These four fields will be -referred to as the key of the diagnostic request. For example, to create a -simple one-time diagnostic request: - - { "command": "diagnostic_request", - "action": "add", - "request": { - "bus": 1, - "id": 1234, - "mode": 1, - "pid": 5 - } - } - } - -Requests are completed after any responses are received (unless -`multiple_responses` is set), or the request has timed out after a certain -number of seconds. After a request is completed, you can re-`create` the same -key to make another request. - -Requests with a `frequency` are added as *recurring* requests, e.g. to add the -previous example as a recurring request at 1Hz: - - { "command": "diagnostic_request", - "action": "add", - "request": { - "bus": 1, - "id": 1234, - "mode": 1, - "pid": 5, - "frequency": 1 - } - } - } - -To cancel a recurring request, send a `cancel` action with the same key, e.g.: - - { "command": "diagnostic_request", - "action": "cancel", - "request": { - "bus": 1, - "id": 1234, - "mode": 1, - "pid": 5 - } - } - } - -Simultaneous recurring requests for the same key at different rates (e.g. 1Hz -*and* 2Hz) is not supported. However, non-recurring ("one-off") requests may -exist in parallel with a recurring request for the same key. - -**bus** - the numerical identifier of the CAN bus where this request should be - sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). - -**id** - the CAN arbitration ID for the request. - -**mode** - the OBD-II mode of the request - 0x1 through 0xff (1 through 9 are the - standardized modes and 0x22 is a common proprietary mode). - -**pid** - (optional) the PID for the request, if applicable. - -**payload** - (optional) up to 7 bytes of data for the request's payload - represented as a hexadecimal number in a string. Many JSON parser cannot - handle 64-bit integers, which is why we are not using a numerical data type. - Each byte in the string *must* be represented with 2 characters, e.g. `0x1` - is `0x01` - the complete string must have an even number of characters. The - `0x` prefix is optional. - -**name** - (optional, defaults to nothing) A human readable, string name for - this request. If provided, the response will have a `name` field (much like a - normal translated message) with this value in place of `bus`, `id`, `mode` and - `pid`. - -**multiple_responses** - (optional, false by default) if true, request will stay - active for a full 100ms, even after receiving a diagnostic response message. - This is useful for requests to the functional broadcast arbitration ID - (`0x7df`) when you need to get responses from multiple modules. It's possible - to set this to `true` for non-broadcast requests, but in practice you won't - see any additional responses after the first and it will just take up memory - in the VI for longer. - -**frequency** - (optional) Make this request a recurring request, at a this - frequency in Hz. To send a single non-recurring request, leave this field out. - -**decoded_type** - (optional, defaults to "obd2" if the request is a recognized -OBD-II mode 1 request, otherwise "none") If specified, the valid values are -`"none"` and `"obd2"`. If `obd2`, the payload will be decoded according to the -OBD-II specification and returned in the `value` field. Set this to `none` to -manually override the OBD-II decoding feature for a known PID. - -#### Responses - -The response to a successful request: - - {"bus": 1, - "id": 1234, - "mode": 1, - "pid": 5, - "success": true, - "payload": "0x1234", - "value": 4660} - -and to an unsuccessful request, with the `negative_response_code` and no `pid` -echo: - - {"bus": 1, - "id": 1234, - "mode": 1, - "success": false, - "negative_response_code": 17} - -**bus** - the numerical identifier of the CAN bus where this response was - received. - -**id** - the CAN arbitration ID for this response. - -**mode** - the OBD-II mode of the original diagnostic request. - -**pid** - (optional) the PID for the request, if applicable. - -**success** - true if the response received was a positive response. If this - field is false, the remote node returned an error and the - `negative_response_code` field should be populated. - -**negative_response_code** - (optional) If requested node returned an error, - `success` will be `false` and this field will contain the negative response - code (NRC). - -Finally, the `payload` and `value` fields are mutually exclusive: - -**payload** - (optional) up to 7 bytes of data returned in the response, - represented as a hexadecimal number in a string. Many JSON parser cannot - handle 64-bit integers, which is why we are not using a numerical data type. - -**value** - (optional) if the response had a payload, this may be the - payload interpreted as an integer. - -The response to a simple PID request would look like this: - - {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} - -### Commands - -In addition to the `diagnostic_request` command described earlier, there are -other possible values for the `command` field. - -#### Version Query - -The `version` command triggers the VI to inject a firmware version identifier -response into the outgoing data stream. - -**Request** - - { "command": "version"} - -**Response** - - { "command_response": "version", "message": "v6.0-dev (default)"} - -#### Device ID Query - -The `device_id` command triggers the VI to inject a unique device ID (e.g. the -MAC address of an included Bluetooth module) into into the outgoing data stream. - -**Request** - - { "command": "device_id"} - -**Response** - - { "command_response": "device_id", "message": "0012345678"} - -#### Passthrough CAN Mode - -The `passthrough` command controls whether low-level CAN messages are passed -through from the CAN bus through the VI to the output stream. If the CAN -acceptance filter is in bypass mode and passthrough is enabled, the output -stream will include all received CAN messages. If the bypass filter is enabled, -only those CAN messages that have been pre-defined in the firmware are -forwarded. - -**Request** - - { "command": "passthrough", - "bus": 1, - "enabled": true - } - -**Response** - -If the bus in the request was valid and the passthrough mode was changed, the -`status` field in the response will be `true`. If `false`, the passthrough mode -was not changed. - - { "command_response": "passthrough", "status": true} - -#### Acceptance Filter Bypass - -The `af_bypass` command controls whether the CAN message acceptance filter is -bypassed for each CAN controller. By default, hardware acceptance filter (AF) is -enabled in the VI - only previously defined CAN message IDs will be received. -Send this command with `bypass: true` to force the filters to bypassed. - -If `passthrough` mode is also enabled, when the AF is bypassed, the output will -include all CAN messages received. - -**Request** - - { "command": "af_bypass", - "bus": 1, - "bypass": true - } - -**Response** - -If the bus in the request was valid and the AF mode was changed, the `status` -field in the response will be `true`. If `false`, the passthrough mode was not -changed. - - { "command_response": "af_bypass", "status": true} - -#### Payload Format Control - -The `payload_format` command determines the format for output data from the VI -and the expected format of commands sent to the VI. - -Valid formats are `json` and `protobuf`. - -**Request** - - { "command": "payload_format", - "format": "json" - } - -**Response** - -If the format was changed successfully, the `status` in the response will be -`true`. The response will be in the original message format, and all subsequent -messages will be in the new format. - - { "command_response": "payload_format", "status": true} - -#### Automatic Pre-Defined OBD-II PID Requests - -The `predefined_obd2` command enables and disables the querying for and -translating of a set of pre-defined OBD-II PIDs from the attached vehicle. When -enabled, the VI will query the vehicle to see if these PIDs are claimed to be -supported and for those that are, it will set up recurring requests. The -responses will be output as simple vehicle messages, with the names defined in -the "Signals Defined from Diagnostic Messages" section below. - -**Request** - - { "command": "predefined_obd2", - "enabled": true - } +## Binary (Protocol Buffers) -**Response** +The binary format is encoded using [Google Protocol +Buffers](https://code.google.com/p/protobuf/). The format is specified in the +file [openxc.proto](openxc.proto). The descriptions of the messages can be foud +in the JSON specs - the binary format mirrors this. -f the predefined requests were enabled or disabled successfully, the `status` in -the response will be `true`. +The binary messages are published by the VI using the standard length-delimited +method (any protobuf library should support this). - { "command_response": "predefined_obd2", "status": true} +The binary format is best if you need to maximize the amount of data that can be +sent from the VI, trading off flexibility for efficiency. -### Trace File Format +## Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, separated by newlines (which may be either `\r\n` or `\n`, depending on the @@ -472,7 +131,7 @@ manufacturers may support custom message names. * numerical, -179.0 to 179.0 degrees with standard GPS accuracy * 1Hz -### Signals from Diagnostic Messages +## Signals from Diagnostic Messages This set of signals is often retreived from OBD-II requests. The units can be found in the [OBD-II standard](http://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01). -- cgit 1.2.3-korg From f340bc6909f84a83dbb8a4d7ca3ba1002b31b110 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 21:30:28 -0400 Subject: Add a field to CAN messages to explicitly set the frame format. See openxc/vi-firmware:230. --- JSON.mkd | 4 + gen/cpp/openxc.pb | 10 +- gen/cpp/openxc.pb.c | 5 +- gen/cpp/openxc.pb.h | 20 ++- gen/java/com/openxc/BinaryMessages.java | 282 ++++++++++++++++++++++++++------ gen/python/openxc_pb2.py | 105 +++++++----- openxc.proto | 5 + 7 files changed, 329 insertions(+), 102 deletions(-) diff --git a/JSON.mkd b/JSON.mkd index 4704574c..804efa45 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -53,6 +53,10 @@ The format for a raw CAN message: complete string must have an even number of characters. The `0x` prefix is optional. +**format** - (optional) explicitly set the frame format for the CAN message, one + of `standard` or `extended`. If the `id` is greater than `0x7ff`, the extended + frame format will be selected automatically. + ## Diagnostic Messages ### Requests diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index eef93e61..66f214fe 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -² +Ž openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -15,13 +15,17 @@ TRANSLATED DIAGNOSTIC CONTROL_COMMAND -COMMAND_RESPONSE"; +COMMAND_RESPONSE"– RawMessage bus ( message_id (  -data ( "¸ +data ( . +format (2.openxc.RawMessage.FrameFormat") + FrameFormat +STANDARD +EXTENDED"¸ ControlCommand) type (2.openxc.ControlCommand.Type< diagnostic_request ( 2 .openxc.DiagnosticControlCommandG diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ac31b7ec..3a5ca0ff 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 Mon Sep 29 21:53:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 21:30:25 2014. */ #include "openxc.pb.h" @@ -19,10 +19,11 @@ const pb_field_t openxc_VehicleMessage_fields[7] = { PB_LAST_FIELD }; -const pb_field_t openxc_RawMessage_fields[4] = { +const pb_field_t openxc_RawMessage_fields[5] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), + PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_RawMessage, format, data, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 4af15de9..5f11ec1b 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 Mon Sep 29 21:53:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 21:30:25 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -22,6 +22,11 @@ typedef enum _openxc_VehicleMessage_Type { openxc_VehicleMessage_Type_COMMAND_RESPONSE = 5 } openxc_VehicleMessage_Type; +typedef enum _openxc_RawMessage_FrameFormat { + openxc_RawMessage_FrameFormat_STANDARD = 1, + openxc_RawMessage_FrameFormat_EXTENDED = 2 +} openxc_RawMessage_FrameFormat; + typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, openxc_ControlCommand_Type_DEVICE_ID = 2, @@ -160,6 +165,8 @@ typedef struct _openxc_RawMessage { uint32_t message_id; bool has_data; openxc_RawMessage_data_t data; + bool has_format; + openxc_RawMessage_FrameFormat format; } openxc_RawMessage; typedef struct _openxc_DiagnosticControlCommand { @@ -214,7 +221,7 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} -#define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}} +#define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}, false, (openxc_RawMessage_FrameFormat)0} #define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default} #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} @@ -227,7 +234,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} #define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} -#define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}} +#define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}, false, (openxc_RawMessage_FrameFormat)0} #define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero} #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} @@ -274,6 +281,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 +#define openxc_RawMessage_format_tag 4 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 #define openxc_TranslatedMessage_type_tag 1 @@ -295,7 +303,7 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; -extern const pb_field_t openxc_RawMessage_fields[4]; +extern const pb_field_t openxc_RawMessage_fields[5]; extern const pb_field_t openxc_ControlCommand_fields[7]; extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; @@ -309,8 +317,8 @@ 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 716 -#define openxc_RawMessage_size 27 +#define openxc_VehicleMessage_size 722 +#define openxc_RawMessage_size 33 #define openxc_ControlCommand_size 126 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index b3d1be43..0937ef5d 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1514,6 +1514,16 @@ public final class BinaryMessages { * optional bytes data = 3; */ com.google.protobuf.ByteString getData(); + + // optional .openxc.RawMessage.FrameFormat format = 4; + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + boolean hasFormat(); + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat(); } /** * Protobuf type {@code openxc.RawMessage} @@ -1581,6 +1591,17 @@ public final class BinaryMessages { data_ = input.readBytes(); break; } + case 32: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.RawMessage.FrameFormat value = com.openxc.BinaryMessages.RawMessage.FrameFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + format_ = value; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -1620,6 +1641,88 @@ public final class BinaryMessages { return PARSER; } + /** + * Protobuf enum {@code openxc.RawMessage.FrameFormat} + */ + public enum FrameFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STANDARD = 1; + */ + STANDARD(0, 1), + /** + * EXTENDED = 2; + */ + EXTENDED(1, 2), + ; + + /** + * STANDARD = 1; + */ + public static final int STANDARD_VALUE = 1; + /** + * EXTENDED = 2; + */ + public static final int EXTENDED_VALUE = 2; + + + public final int getNumber() { return value; } + + public static FrameFormat valueOf(int value) { + switch (value) { + case 1: return STANDARD; + case 2: return EXTENDED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FrameFormat findValueByNumber(int number) { + return FrameFormat.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.RawMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final FrameFormat[] VALUES = values(); + + public static FrameFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private FrameFormat(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.RawMessage.FrameFormat) + } + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; @@ -1669,10 +1772,27 @@ public final class BinaryMessages { return data_; } + // optional .openxc.RawMessage.FrameFormat format = 4; + public static final int FORMAT_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat format_; + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public boolean hasFormat() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { + return format_; + } + private void initFields() { bus_ = 0; messageId_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; + format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1695,6 +1815,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, data_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, format_.getNumber()); + } getUnknownFields().writeTo(output); } @@ -1716,6 +1839,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, data_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, format_.getNumber()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -1838,6 +1965,8 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); + format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1878,6 +2007,10 @@ public final class BinaryMessages { to_bitField0_ |= 0x00000004; } result.data_ = data_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.format_ = format_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1903,6 +2036,9 @@ public final class BinaryMessages { if (other.hasData()) { setData(other.getData()); } + if (other.hasFormat()) { + setFormat(other.getFormat()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2032,6 +2168,42 @@ public final class BinaryMessages { return this; } + // optional .openxc.RawMessage.FrameFormat format = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public boolean hasFormat() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { + return format_; + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public Builder setFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + format_ = value; + onChanged(); + return this; + } + /** + * optional .openxc.RawMessage.FrameFormat format = 4; + */ + public Builder clearFormat() { + bitField0_ = (bitField0_ & ~0x00000008); + format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.RawMessage) } @@ -10913,59 +11085,61 @@ public final class BinaryMessages { "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" + "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" + "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", - "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" + - "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "data\030\003 \001(\014\"\270\004\n\016ControlCommand\022)\n\004type\030\001 " + - "\001(\0162\033.openxc.ControlCommand.Type\022<\n\022diag" + - "nostic_request\030\002 \001(\0132 .openxc.Diagnostic" + - "ControlCommand\022G\n\030passthrough_mode_reque" + - "st\030\003 \001(\0132%.openxc.PassthroughModeControl" + - "Command\022O\n acceptance_filter_bypass_comm" + - "and\030\004 \001(\0132%.openxc.AcceptanceFilterBypas" + - "sCommand\022<\n\026payload_format_command\030\005 \001(\013", - "2\034.openxc.PayloadFormatCommand\022O\n predef" + - "ined_obd2_requests_command\030\006 \001(\0132%.openx" + - "c.PredefinedObd2RequestsCommand\"\223\001\n\004Type" + - "\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOST" + - "IC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILT" + - "ER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDE" + - "FINED_OBD2_REQUESTS\020\007\"\236\001\n\030DiagnosticCont" + - "rolCommand\022*\n\007request\030\001 \001(\0132\031.openxc.Dia" + - "gnosticRequest\0227\n\006action\030\002 \001(\0162\'.openxc." + - "DiagnosticControlCommand.Action\"\035\n\006Actio", - "n\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughMod" + - "eControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030" + - "\002 \001(\010\"<\n\035AcceptanceFilterBypassCommand\022\013" + - "\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadFo" + - "rmatCommand\022:\n\006format\030\001 \001(\0162*.openxc.Pay" + - "loadFormatCommand.PayloadFormat\"\'\n\rPaylo" + - "adFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035Pred" + - "efinedObd2RequestsCommand\022\017\n\007enabled\030\001 \001" + - "(\010\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.op" + - "enxc.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\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\022" + - "multiple_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" + - "%.openxc.DiagnosticRequest.DecodedType\"!" + - "\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\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" + "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\226\001\n\nRawMes" + + "sage\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\022.\n\006format\030\004 \001(\0162\036.openxc.Raw" + + "Message.FrameFormat\")\n\013FrameFormat\022\014\n\010ST" + + "ANDARD\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016ControlComman" + + "d\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCommand." + + "Type\022<\n\022diagnostic_request\030\002 \001(\0132 .openx" + + "c.DiagnosticControlCommand\022G\n\030passthroug" + + "h_mode_request\030\003 \001(\0132%.openxc.Passthroug" + + "hModeControlCommand\022O\n acceptance_filter", + "_bypass_command\030\004 \001(\0132%.openxc.Acceptanc" + + "eFilterBypassCommand\022<\n\026payload_format_c" + + "ommand\030\005 \001(\0132\034.openxc.PayloadFormatComma" + + "nd\022O\n predefined_obd2_requests_command\030\006" + + " \001(\0132%.openxc.PredefinedObd2RequestsComm" + + "and\"\223\001\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002" + + "\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACC" + + "EPTANCE_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMA" + + "T\020\006\022\034\n\030PREDEFINED_OBD2_REQUESTS\020\007\"\236\001\n\030Di" + + "agnosticControlCommand\022*\n\007request\030\001 \001(\0132", + "\031.openxc.DiagnosticRequest\0227\n\006action\030\002 \001" + + "(\0162\'.openxc.DiagnosticControlCommand.Act" + + "ion\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Pa" + + "ssthroughModeControlCommand\022\013\n\003bus\030\001 \001(\005" + + "\022\017\n\007enabled\030\002 \001(\010\"<\n\035AcceptanceFilterByp" + + "assCommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"" + + "{\n\024PayloadFormatCommand\022:\n\006format\030\001 \001(\0162" + + "*.openxc.PayloadFormatCommand.PayloadFor" + + "mat\"\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOB" + + "UF\020\002\"0\n\035PredefinedObd2RequestsCommand\022\017\n", + "\007enabled\030\001 \001(\010\"]\n\017CommandResponse\022)\n\004typ" + + "e\030\001 \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007" + + "message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagno" + + "sticRequest\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\007paylo" + + "ad\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022\021\n\t" + + "frequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded" + + "_type\030\t \001(\0162%.openxc.DiagnosticRequest.D" + + "ecodedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004O" + + "BD2\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\003p" + + "id\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_re" + + "sponse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005va" + + "lue\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\016" + + "2\031.openxc.DynamicField.Type\022\024\n\014string_va" + + "lue\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rbool" + + "ean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003N" + + "UM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004" + + "type\030\001 \001(\0162\036.openxc.TranslatedMessage.Ty" + + "pe\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.Dy" + + "namicField\"\\\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\ncom.openxcB\016" + + "BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10983,7 +11157,7 @@ public final class BinaryMessages { internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", }); + new java.lang.String[] { "Bus", "MessageId", "Data", "Format", }); internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_openxc_ControlCommand_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 140bc4b9..b2721d33 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\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"\x96\x01\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\x12.\n\x06\x66ormat\x18\x04 \x01(\x0e\x32\x1e.openxc.RawMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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') @@ -50,6 +50,27 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( serialized_end=429, ) +_RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( + name='FrameFormat', + full_name='openxc.RawMessage.FrameFormat', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='STANDARD', index=0, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EXTENDED', index=1, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=541, + serialized_end=582, +) + _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='openxc.ControlCommand.Type', @@ -87,8 +108,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=914, - serialized_end=1061, + serialized_start=1006, + serialized_end=1153, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -108,8 +129,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1193, - serialized_end=1222, + serialized_start=1285, + serialized_end=1314, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -129,8 +150,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1433, - serialized_end=1472, + serialized_start=1525, + serialized_end=1564, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -150,8 +171,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1840, - serialized_end=1873, + serialized_start=1932, + serialized_end=1965, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -175,8 +196,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2165, - serialized_end=2202, + serialized_start=2257, + serialized_end=2294, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -212,8 +233,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2360, - serialized_end=2452, + serialized_start=2452, + serialized_end=2544, ) @@ -309,17 +330,25 @@ _RAWMESSAGE = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + _descriptor.FieldDescriptor( + name='format', full_name='openxc.RawMessage.format', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=1, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], nested_types=[], enum_types=[ + _RAWMESSAGE_FRAMEFORMAT, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=431, - serialized_end=490, + serialized_start=432, + serialized_end=582, ) @@ -382,8 +411,8 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=493, - serialized_end=1061, + serialized_start=585, + serialized_end=1153, ) @@ -418,8 +447,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1064, - serialized_end=1222, + serialized_start=1156, + serialized_end=1314, ) @@ -453,8 +482,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1224, - serialized_end=1285, + serialized_start=1316, + serialized_end=1377, ) @@ -488,8 +517,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1287, - serialized_end=1347, + serialized_start=1379, + serialized_end=1439, ) @@ -517,8 +546,8 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1349, - serialized_end=1472, + serialized_start=1441, + serialized_end=1564, ) @@ -545,8 +574,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1474, - serialized_end=1522, + serialized_start=1566, + serialized_end=1614, ) @@ -587,8 +616,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1524, - serialized_end=1617, + serialized_start=1616, + serialized_end=1709, ) @@ -672,8 +701,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1620, - serialized_end=1873, + serialized_start=1712, + serialized_end=1965, ) @@ -749,8 +778,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1876, - serialized_end=2037, + serialized_start=1968, + serialized_end=2129, ) @@ -799,8 +828,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2040, - serialized_end=2202, + serialized_start=2132, + serialized_end=2294, ) @@ -849,8 +878,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2205, - serialized_end=2452, + serialized_start=2297, + serialized_end=2544, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -860,6 +889,8 @@ _VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTIC _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; +_RAWMESSAGE.fields_by_name['format'].enum_type = _RAWMESSAGE_FRAMEFORMAT +_RAWMESSAGE_FRAMEFORMAT.containing_type = _RAWMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND diff --git a/openxc.proto b/openxc.proto index c2b7f7c2..3b23be5c 100644 --- a/openxc.proto +++ b/openxc.proto @@ -16,9 +16,14 @@ message VehicleMessage { } message RawMessage { + enum FrameFormat { + STANDARD = 1; + EXTENDED = 2; + } optional int32 bus = 1; optional uint32 message_id = 2; optional bytes data = 3; + optional FrameFormat format = 4; } message ControlCommand { -- cgit 1.2.3-korg From 28c895ef2fc4e152c506b0965d8f1830f848870e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 22:07:13 -0400 Subject: Give frame format field a more specific name. --- gen/cpp/openxc.pb | 8 +- gen/cpp/openxc.pb.c | 4 +- gen/cpp/openxc.pb.h | 8 +- gen/java/com/openxc/BinaryMessages.java | 178 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 80 +++++++------- openxc.proto | 2 +- 6 files changed, 140 insertions(+), 140 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 66f214fe..e89c2537 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -Ž +” openxc.protoopenxc"” VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -15,14 +15,14 @@ TRANSLATED DIAGNOSTIC CONTROL_COMMAND -COMMAND_RESPONSE"– +COMMAND_RESPONSE"œ RawMessage bus ( message_id (  -data ( . -format (2.openxc.RawMessage.FrameFormat") +data ( 4 + frame_format (2.openxc.RawMessage.FrameFormat") FrameFormat STANDARD EXTENDED"¸ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 3a5ca0ff..a99c7ddf 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 Mon Oct 6 21:30:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 22:07:24 2014. */ #include "openxc.pb.h" @@ -23,7 +23,7 @@ const pb_field_t openxc_RawMessage_fields[5] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), - PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_RawMessage, format, data, 0), + PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_RawMessage, frame_format, data, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 5f11ec1b..ca87e0bc 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 Mon Oct 6 21:30:25 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 22:07:24 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -165,8 +165,8 @@ typedef struct _openxc_RawMessage { uint32_t message_id; bool has_data; openxc_RawMessage_data_t data; - bool has_format; - openxc_RawMessage_FrameFormat format; + bool has_frame_format; + openxc_RawMessage_FrameFormat frame_format; } openxc_RawMessage; typedef struct _openxc_DiagnosticControlCommand { @@ -281,7 +281,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_RawMessage_bus_tag 1 #define openxc_RawMessage_message_id_tag 2 #define openxc_RawMessage_data_tag 3 -#define openxc_RawMessage_format_tag 4 +#define openxc_RawMessage_frame_format_tag 4 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 #define openxc_TranslatedMessage_type_tag 1 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 0937ef5d..2e3cd56f 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1515,15 +1515,15 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getData(); - // optional .openxc.RawMessage.FrameFormat format = 4; + // optional .openxc.RawMessage.FrameFormat frame_format = 4; /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - boolean hasFormat(); + boolean hasFrameFormat(); /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat(); + com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat(); } /** * Protobuf type {@code openxc.RawMessage} @@ -1598,7 +1598,7 @@ public final class BinaryMessages { unknownFields.mergeVarintField(4, rawValue); } else { bitField0_ |= 0x00000008; - format_ = value; + frameFormat_ = value; } break; } @@ -1772,27 +1772,27 @@ public final class BinaryMessages { return data_; } - // optional .openxc.RawMessage.FrameFormat format = 4; - public static final int FORMAT_FIELD_NUMBER = 4; - private com.openxc.BinaryMessages.RawMessage.FrameFormat format_; + // optional .openxc.RawMessage.FrameFormat frame_format = 4; + public static final int FRAME_FORMAT_FIELD_NUMBER = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_; /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public boolean hasFormat() { + public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { - return format_; + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + return frameFormat_; } private void initFields() { bus_ = 0; messageId_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; - format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1816,7 +1816,7 @@ public final class BinaryMessages { output.writeBytes(3, data_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, format_.getNumber()); + output.writeEnum(4, frameFormat_.getNumber()); } getUnknownFields().writeTo(output); } @@ -1841,7 +1841,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, format_.getNumber()); + .computeEnumSize(4, frameFormat_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1965,7 +1965,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); - format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -2010,7 +2010,7 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.format_ = format_; + result.frameFormat_ = frameFormat_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2036,8 +2036,8 @@ public final class BinaryMessages { if (other.hasData()) { setData(other.getData()); } - if (other.hasFormat()) { - setFormat(other.getFormat()); + if (other.hasFrameFormat()) { + setFrameFormat(other.getFrameFormat()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2168,38 +2168,38 @@ public final class BinaryMessages { return this; } - // optional .openxc.RawMessage.FrameFormat format = 4; - private com.openxc.BinaryMessages.RawMessage.FrameFormat format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + // optional .openxc.RawMessage.FrameFormat frame_format = 4; + private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public boolean hasFormat() { + public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFormat() { - return format_; + public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + return frameFormat_; } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public Builder setFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { + public Builder setFrameFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; - format_ = value; + frameFormat_ = value; onChanged(); return this; } /** - * optional .openxc.RawMessage.FrameFormat format = 4; + * optional .openxc.RawMessage.FrameFormat frame_format = 4; */ - public Builder clearFormat() { + public Builder clearFrameFormat() { bitField0_ = (bitField0_ & ~0x00000008); - format_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; onChanged(); return this; } @@ -11085,61 +11085,61 @@ public final class BinaryMessages { "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" + "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" + "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", - "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\226\001\n\nRawMes" + + "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\234\001\n\nRawMes" + "sage\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\022.\n\006format\030\004 \001(\0162\036.openxc.Raw" + - "Message.FrameFormat\")\n\013FrameFormat\022\014\n\010ST" + - "ANDARD\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016ControlComman" + - "d\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCommand." + - "Type\022<\n\022diagnostic_request\030\002 \001(\0132 .openx" + - "c.DiagnosticControlCommand\022G\n\030passthroug" + - "h_mode_request\030\003 \001(\0132%.openxc.Passthroug" + - "hModeControlCommand\022O\n acceptance_filter", - "_bypass_command\030\004 \001(\0132%.openxc.Acceptanc" + - "eFilterBypassCommand\022<\n\026payload_format_c" + - "ommand\030\005 \001(\0132\034.openxc.PayloadFormatComma" + - "nd\022O\n predefined_obd2_requests_command\030\006" + - " \001(\0132%.openxc.PredefinedObd2RequestsComm" + - "and\"\223\001\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002" + - "\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACC" + - "EPTANCE_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMA" + - "T\020\006\022\034\n\030PREDEFINED_OBD2_REQUESTS\020\007\"\236\001\n\030Di" + - "agnosticControlCommand\022*\n\007request\030\001 \001(\0132", - "\031.openxc.DiagnosticRequest\0227\n\006action\030\002 \001" + - "(\0162\'.openxc.DiagnosticControlCommand.Act" + - "ion\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Pa" + - "ssthroughModeControlCommand\022\013\n\003bus\030\001 \001(\005" + - "\022\017\n\007enabled\030\002 \001(\010\"<\n\035AcceptanceFilterByp" + - "assCommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"" + - "{\n\024PayloadFormatCommand\022:\n\006format\030\001 \001(\0162" + - "*.openxc.PayloadFormatCommand.PayloadFor" + - "mat\"\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOB" + - "UF\020\002\"0\n\035PredefinedObd2RequestsCommand\022\017\n", - "\007enabled\030\001 \001(\010\"]\n\017CommandResponse\022)\n\004typ" + - "e\030\001 \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007" + - "message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagno" + - "sticRequest\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\007paylo" + - "ad\030\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022\021\n\t" + - "frequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded" + - "_type\030\t \001(\0162%.openxc.DiagnosticRequest.D" + - "ecodedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004O" + - "BD2\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\003p" + - "id\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_re" + - "sponse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005va" + - "lue\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\016" + - "2\031.openxc.DynamicField.Type\022\024\n\014string_va" + - "lue\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rbool" + - "ean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003N" + - "UM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004" + - "type\030\001 \001(\0162\036.openxc.TranslatedMessage.Ty" + - "pe\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.Dy" + - "namicField\"\\\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\ncom.openxcB\016" + - "BinaryMessages" + "\004data\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.open" + + "xc.RawMessage.FrameFormat\")\n\013FrameFormat" + + "\022\014\n\010STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016Control" + + "Command\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCo" + + "mmand.Type\022<\n\022diagnostic_request\030\002 \001(\0132 " + + ".openxc.DiagnosticControlCommand\022G\n\030pass" + + "through_mode_request\030\003 \001(\0132%.openxc.Pass" + + "throughModeControlCommand\022O\n acceptance_", + "filter_bypass_command\030\004 \001(\0132%.openxc.Acc" + + "eptanceFilterBypassCommand\022<\n\026payload_fo" + + "rmat_command\030\005 \001(\0132\034.openxc.PayloadForma" + + "tCommand\022O\n predefined_obd2_requests_com" + + "mand\030\006 \001(\0132%.openxc.PredefinedObd2Reques" + + "tsCommand\"\223\001\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVIC" + + "E_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022" + + "\034\n\030ACCEPTANCE_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD" + + "_FORMAT\020\006\022\034\n\030PREDEFINED_OBD2_REQUESTS\020\007\"" + + "\236\001\n\030DiagnosticControlCommand\022*\n\007request\030", + "\001 \001(\0132\031.openxc.DiagnosticRequest\0227\n\006acti" + + "on\030\002 \001(\0162\'.openxc.DiagnosticControlComma" + + "nd.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002" + + "\"=\n\035PassthroughModeControlCommand\022\013\n\003bus" + + "\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035AcceptanceFil" + + "terBypassCommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030" + + "\002 \001(\010\"{\n\024PayloadFormatCommand\022:\n\006format\030" + + "\001 \001(\0162*.openxc.PayloadFormatCommand.Payl" + + "oadFormat\"\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010" + + "PROTOBUF\020\002\"0\n\035PredefinedObd2RequestsComm", + "and\022\017\n\007enabled\030\001 \001(\010\"]\n\017CommandResponse\022" + + ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + + "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + + "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + + "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + + "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + + "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + + "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu", + "s\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(" + + "\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negat" + + "ive_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014" + + "\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type" + + "\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014str" + + "ing_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025" + + "\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020" + + "\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessa" + + "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + + "age.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.", + "openxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.ope" + + "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + + "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + + "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + + "enxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11157,7 +11157,7 @@ public final class BinaryMessages { internal_static_openxc_RawMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RawMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", "Format", }); + new java.lang.String[] { "Bus", "MessageId", "Data", "FrameFormat", }); internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_openxc_ControlCommand_fieldAccessorTable = new diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index b2721d33..d69dcb5a 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\"\x96\x01\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\x12.\n\x06\x66ormat\x18\x04 \x01(\x0e\x32\x1e.openxc.RawMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"\x9c\x01\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\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.RawMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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') @@ -67,8 +67,8 @@ _RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=541, - serialized_end=582, + serialized_start=547, + serialized_end=588, ) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( @@ -108,8 +108,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1006, - serialized_end=1153, + serialized_start=1012, + serialized_end=1159, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -129,8 +129,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1285, - serialized_end=1314, + serialized_start=1291, + serialized_end=1320, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -150,8 +150,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1525, - serialized_end=1564, + serialized_start=1531, + serialized_end=1570, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -171,8 +171,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1932, - serialized_end=1965, + serialized_start=1938, + serialized_end=1971, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -196,8 +196,8 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2257, - serialized_end=2294, + serialized_start=2263, + serialized_end=2300, ) _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( @@ -233,8 +233,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2452, - serialized_end=2544, + serialized_start=2458, + serialized_end=2550, ) @@ -331,7 +331,7 @@ _RAWMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='format', full_name='openxc.RawMessage.format', index=3, + name='frame_format', full_name='openxc.RawMessage.frame_format', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, message_type=None, enum_type=None, containing_type=None, @@ -348,7 +348,7 @@ _RAWMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=432, - serialized_end=582, + serialized_end=588, ) @@ -411,8 +411,8 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=585, - serialized_end=1153, + serialized_start=591, + serialized_end=1159, ) @@ -447,8 +447,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1156, - serialized_end=1314, + serialized_start=1162, + serialized_end=1320, ) @@ -482,8 +482,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1316, - serialized_end=1377, + serialized_start=1322, + serialized_end=1383, ) @@ -517,8 +517,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1379, - serialized_end=1439, + serialized_start=1385, + serialized_end=1445, ) @@ -546,8 +546,8 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1441, - serialized_end=1564, + serialized_start=1447, + serialized_end=1570, ) @@ -574,8 +574,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1566, - serialized_end=1614, + serialized_start=1572, + serialized_end=1620, ) @@ -616,8 +616,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1616, - serialized_end=1709, + serialized_start=1622, + serialized_end=1715, ) @@ -701,8 +701,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1712, - serialized_end=1965, + serialized_start=1718, + serialized_end=1971, ) @@ -778,8 +778,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1968, - serialized_end=2129, + serialized_start=1974, + serialized_end=2135, ) @@ -828,8 +828,8 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2132, - serialized_end=2294, + serialized_start=2138, + serialized_end=2300, ) @@ -878,8 +878,8 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2297, - serialized_end=2544, + serialized_start=2303, + serialized_end=2550, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -889,7 +889,7 @@ _VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTIC _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; -_RAWMESSAGE.fields_by_name['format'].enum_type = _RAWMESSAGE_FRAMEFORMAT +_RAWMESSAGE.fields_by_name['frame_format'].enum_type = _RAWMESSAGE_FRAMEFORMAT _RAWMESSAGE_FRAMEFORMAT.containing_type = _RAWMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND diff --git a/openxc.proto b/openxc.proto index 3b23be5c..3c0a51d4 100644 --- a/openxc.proto +++ b/openxc.proto @@ -23,7 +23,7 @@ message RawMessage { optional int32 bus = 1; optional uint32 message_id = 2; optional bytes data = 3; - optional FrameFormat format = 4; + optional FrameFormat frame_format = 4; } message ControlCommand { -- cgit 1.2.3-korg From 9e84f7713ab25ddb69e6f46cf34285a09ee9e28b Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:12:02 -0400 Subject: Deprecate "translated" and "raw" names in binary format. Fixed #16. --- gen/cpp/openxc.pb | 24 +- gen/cpp/openxc.pb.c | 32 +- gen/cpp/openxc.pb.h | 109 ++--- gen/java/com/openxc/BinaryMessages.java | 825 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 164 +++---- openxc.proto | 10 +- 6 files changed, 578 insertions(+), 586 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index e89c2537..88993ab5 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,28 +1,28 @@ -” - openxc.protoopenxc"” +€ + openxc.protoopenxc"ˆ VehicleMessage) type (2.openxc.VehicleMessage.Type' - raw_message ( 2.openxc.RawMessage5 -translated_message ( 2.openxc.TranslatedMessage7 + can_message ( 2.openxc.CanMessage- +simple_message ( 2.openxc.SimpleMessage7 diagnostic_response ( 2.openxc.DiagnosticResponse/ control_command ( 2.openxc.ControlCommand1 -command_response ( 2.openxc.CommandResponse"Z +command_response ( 2.openxc.CommandResponse"V Type -RAW +CAN -TRANSLATED +SIMPLE DIAGNOSTIC CONTROL_COMMAND COMMAND_RESPONSE"œ -RawMessage +CanMessage bus ( message_id (  data ( 4 - frame_format (2.openxc.RawMessage.FrameFormat") + frame_format (2.openxc.CanMessage.FrameFormat") FrameFormat STANDARD EXTENDED"¸ @@ -99,9 +99,9 @@ message_id (  STRING NUM -BOOL"÷ -TranslatedMessage, -type (2.openxc.TranslatedMessage.Type +BOOL"ï + SimpleMessage( +type (2.openxc.SimpleMessage.Type name ( # value ( 2.openxc.DynamicField# event ( 2.openxc.DynamicField"\ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index a99c7ddf..b9d6d955 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 Mon Oct 6 22:07:24 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:12:27 2014. */ #include "openxc.pb.h" @@ -11,19 +11,19 @@ const pb_field_t openxc_VehicleMessage_fields[7] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_VehicleMessage, type, type, 0), - PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, raw_message, type, &openxc_RawMessage_fields), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields), - PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, translated_message, &openxc_DiagnosticResponse_fields), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, can_message, type, &openxc_CanMessage_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, simple_message, can_message, &openxc_SimpleMessage_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, simple_message, &openxc_DiagnosticResponse_fields), PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, control_command, diagnostic_response, &openxc_ControlCommand_fields), PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, command_response, control_command, &openxc_CommandResponse_fields), PB_LAST_FIELD }; -const pb_field_t openxc_RawMessage_fields[5] = { - PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_RawMessage, bus, bus, 0), - PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_RawMessage, message_id, bus, 0), - PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_RawMessage, data, message_id, 0), - PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_RawMessage, frame_format, data, 0), +const pb_field_t openxc_CanMessage_fields[5] = { + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_CanMessage, bus, bus, 0), + PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_CanMessage, message_id, bus, 0), + PB_FIELD( 3, BYTES , OPTIONAL, CALLBACK, OTHER, openxc_CanMessage, data, message_id, 0), + PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_CanMessage, frame_format, data, 0), PB_LAST_FIELD }; @@ -105,11 +105,11 @@ const pb_field_t openxc_DynamicField_fields[5] = { PB_LAST_FIELD }; -const pb_field_t openxc_TranslatedMessage_fields[5] = { - PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_TranslatedMessage, type, type, 0), - PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, name, type, 0), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, value, name, &openxc_DynamicField_fields), - PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_TranslatedMessage, event, value, &openxc_DynamicField_fields), +const pb_field_t openxc_SimpleMessage_fields[5] = { + PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_SimpleMessage, type, type, 0), + PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, openxc_SimpleMessage, name, type, 0), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, value, name, &openxc_DynamicField_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, event, value, &openxc_DynamicField_fields), PB_LAST_FIELD }; @@ -123,7 +123,7 @@ const pb_field_t openxc_TranslatedMessage_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_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_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_TranslatedMessage, value) < 65536 && pb_membersize(openxc_TranslatedMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && pb_membersize(openxc_VehicleMessage, simple_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_SimpleMessage, value) < 65536 && pb_membersize(openxc_SimpleMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -134,7 +134,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_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_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_TranslatedMessage, value) < 256 && pb_membersize(openxc_TranslatedMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_TranslatedMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 256 && pb_membersize(openxc_VehicleMessage, simple_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_SimpleMessage, value) < 256 && pb_membersize(openxc_SimpleMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index ca87e0bc..38107b33 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 Mon Oct 6 22:07:24 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:12:27 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -15,17 +15,17 @@ extern "C" { /* Enum definitions */ typedef enum _openxc_VehicleMessage_Type { - openxc_VehicleMessage_Type_RAW = 1, - openxc_VehicleMessage_Type_TRANSLATED = 2, + openxc_VehicleMessage_Type_CAN = 1, + openxc_VehicleMessage_Type_SIMPLE = 2, openxc_VehicleMessage_Type_DIAGNOSTIC = 3, openxc_VehicleMessage_Type_CONTROL_COMMAND = 4, openxc_VehicleMessage_Type_COMMAND_RESPONSE = 5 } openxc_VehicleMessage_Type; -typedef enum _openxc_RawMessage_FrameFormat { - openxc_RawMessage_FrameFormat_STANDARD = 1, - openxc_RawMessage_FrameFormat_EXTENDED = 2 -} openxc_RawMessage_FrameFormat; +typedef enum _openxc_CanMessage_FrameFormat { + openxc_CanMessage_FrameFormat_STANDARD = 1, + openxc_CanMessage_FrameFormat_EXTENDED = 2 +} openxc_CanMessage_FrameFormat; typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_VERSION = 1, @@ -58,14 +58,14 @@ typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_BOOL = 3 } openxc_DynamicField_Type; -typedef enum _openxc_TranslatedMessage_Type { - openxc_TranslatedMessage_Type_STRING = 1, - openxc_TranslatedMessage_Type_NUM = 2, - openxc_TranslatedMessage_Type_BOOL = 3, - openxc_TranslatedMessage_Type_EVENTED_STRING = 4, - openxc_TranslatedMessage_Type_EVENTED_NUM = 5, - openxc_TranslatedMessage_Type_EVENTED_BOOL = 6 -} openxc_TranslatedMessage_Type; +typedef enum _openxc_SimpleMessage_Type { + openxc_SimpleMessage_Type_STRING = 1, + openxc_SimpleMessage_Type_NUM = 2, + openxc_SimpleMessage_Type_BOOL = 3, + openxc_SimpleMessage_Type_EVENTED_STRING = 4, + openxc_SimpleMessage_Type_EVENTED_NUM = 5, + openxc_SimpleMessage_Type_EVENTED_BOOL = 6 +} openxc_SimpleMessage_Type; /* Struct definitions */ typedef struct _openxc_AcceptanceFilterBypassCommand { @@ -75,6 +75,16 @@ typedef struct _openxc_AcceptanceFilterBypassCommand { bool bypass; } openxc_AcceptanceFilterBypassCommand; +typedef struct _openxc_CanMessage { + bool has_bus; + int32_t bus; + bool has_message_id; + uint32_t message_id; + pb_callback_t data; + bool has_frame_format; + openxc_CanMessage_FrameFormat frame_format; +} openxc_CanMessage; + typedef struct _openxc_CommandResponse { bool has_type; openxc_ControlCommand_Type type; @@ -156,19 +166,6 @@ typedef struct _openxc_PredefinedObd2RequestsCommand { bool enabled; } openxc_PredefinedObd2RequestsCommand; -typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t; - -typedef struct _openxc_RawMessage { - bool has_bus; - int32_t bus; - bool has_message_id; - uint32_t message_id; - bool has_data; - openxc_RawMessage_data_t data; - bool has_frame_format; - openxc_RawMessage_FrameFormat frame_format; -} openxc_RawMessage; - typedef struct _openxc_DiagnosticControlCommand { bool has_request; openxc_DiagnosticRequest request; @@ -176,16 +173,15 @@ typedef struct _openxc_DiagnosticControlCommand { openxc_DiagnosticControlCommand_Action action; } openxc_DiagnosticControlCommand; -typedef struct _openxc_TranslatedMessage { +typedef struct _openxc_SimpleMessage { bool has_type; - openxc_TranslatedMessage_Type type; - bool has_name; - char name[100]; + openxc_SimpleMessage_Type type; + pb_callback_t name; bool has_value; openxc_DynamicField value; bool has_event; openxc_DynamicField event; -} openxc_TranslatedMessage; +} openxc_SimpleMessage; typedef struct _openxc_ControlCommand { bool has_type; @@ -205,10 +201,10 @@ typedef struct _openxc_ControlCommand { typedef struct _openxc_VehicleMessage { bool has_type; openxc_VehicleMessage_Type type; - bool has_raw_message; - openxc_RawMessage raw_message; - bool has_translated_message; - openxc_TranslatedMessage translated_message; + bool has_can_message; + openxc_CanMessage can_message; + bool has_simple_message; + openxc_SimpleMessage simple_message; bool has_diagnostic_response; openxc_DiagnosticResponse diagnostic_response; bool has_control_command; @@ -220,8 +216,8 @@ typedef struct _openxc_VehicleMessage { /* Default values for struct fields */ /* Initializer values for message structs */ -#define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} -#define openxc_RawMessage_init_default {false, 0, false, 0, false, {0, {0}}, false, (openxc_RawMessage_FrameFormat)0} +#define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_default, false, openxc_SimpleMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} +#define openxc_CanMessage_init_default {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_FrameFormat)0} #define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default} #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} @@ -232,9 +228,9 @@ typedef struct _openxc_VehicleMessage { #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} #define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_TranslatedMessage_init_default {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} -#define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} -#define openxc_RawMessage_init_zero {false, 0, false, 0, false, {0, {0}}, false, (openxc_RawMessage_FrameFormat)0} +#define openxc_SimpleMessage_init_default {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} +#define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} +#define openxc_CanMessage_init_zero {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_FrameFormat)0} #define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero} #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} @@ -245,11 +241,15 @@ typedef struct _openxc_VehicleMessage { #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} #define openxc_DynamicField_init_zero {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_TranslatedMessage_init_zero {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} +#define openxc_SimpleMessage_init_zero {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define openxc_AcceptanceFilterBypassCommand_bus_tag 1 #define openxc_AcceptanceFilterBypassCommand_bypass_tag 2 +#define openxc_CanMessage_bus_tag 1 +#define openxc_CanMessage_message_id_tag 2 +#define openxc_CanMessage_data_tag 3 +#define openxc_CanMessage_frame_format_tag 4 #define openxc_CommandResponse_type_tag 1 #define openxc_CommandResponse_message_tag 2 #define openxc_CommandResponse_status_tag 3 @@ -278,16 +278,12 @@ typedef struct _openxc_VehicleMessage { #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_PayloadFormatCommand_format_tag 1 #define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 -#define openxc_RawMessage_bus_tag 1 -#define openxc_RawMessage_message_id_tag 2 -#define openxc_RawMessage_data_tag 3 -#define openxc_RawMessage_frame_format_tag 4 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 -#define openxc_TranslatedMessage_type_tag 1 -#define openxc_TranslatedMessage_name_tag 2 -#define openxc_TranslatedMessage_value_tag 3 -#define openxc_TranslatedMessage_event_tag 4 +#define openxc_SimpleMessage_type_tag 1 +#define openxc_SimpleMessage_name_tag 2 +#define openxc_SimpleMessage_value_tag 3 +#define openxc_SimpleMessage_event_tag 4 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 @@ -295,15 +291,15 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_payload_format_command_tag 5 #define openxc_ControlCommand_predefined_obd2_requests_command_tag 6 #define openxc_VehicleMessage_type_tag 1 -#define openxc_VehicleMessage_raw_message_tag 2 -#define openxc_VehicleMessage_translated_message_tag 3 +#define openxc_VehicleMessage_can_message_tag 2 +#define openxc_VehicleMessage_simple_message_tag 3 #define openxc_VehicleMessage_diagnostic_response_tag 4 #define openxc_VehicleMessage_control_command_tag 5 #define openxc_VehicleMessage_command_response_tag 6 /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[7]; -extern const pb_field_t openxc_RawMessage_fields[5]; +extern const pb_field_t openxc_CanMessage_fields[5]; extern const pb_field_t openxc_ControlCommand_fields[7]; extern const pb_field_t openxc_DiagnosticControlCommand_fields[3]; extern const pb_field_t openxc_PassthroughModeControlCommand_fields[3]; @@ -314,11 +310,9 @@ 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]; extern const pb_field_t openxc_DynamicField_fields[5]; -extern const pb_field_t openxc_TranslatedMessage_fields[5]; +extern const pb_field_t openxc_SimpleMessage_fields[5]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 722 -#define openxc_RawMessage_size 33 #define openxc_ControlCommand_size 126 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 @@ -329,7 +323,6 @@ extern const pb_field_t openxc_TranslatedMessage_fields[5]; #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 -#define openxc_TranslatedMessage_size 350 #ifdef __cplusplus } /* extern "C" */ diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 2e3cd56f..cb49929c 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -21,33 +21,33 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.VehicleMessage.Type getType(); - // optional .openxc.RawMessage raw_message = 2; + // optional .openxc.CanMessage can_message = 2; /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - boolean hasRawMessage(); + boolean hasCanMessage(); /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - com.openxc.BinaryMessages.RawMessage getRawMessage(); + com.openxc.BinaryMessages.CanMessage getCanMessage(); /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder(); + com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder(); - // optional .openxc.TranslatedMessage translated_message = 3; + // optional .openxc.SimpleMessage simple_message = 3; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - boolean hasTranslatedMessage(); + boolean hasSimpleMessage(); /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage(); + com.openxc.BinaryMessages.SimpleMessage getSimpleMessage(); /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder(); + com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder(); // optional .openxc.DiagnosticResponse diagnostic_response = 4; /** @@ -154,27 +154,27 @@ public final class BinaryMessages { break; } case 18: { - com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null; + com.openxc.BinaryMessages.CanMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = rawMessage_.toBuilder(); + subBuilder = canMessage_.toBuilder(); } - rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry); + canMessage_ = input.readMessage(com.openxc.BinaryMessages.CanMessage.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(rawMessage_); - rawMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(canMessage_); + canMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000002; break; } case 26: { - com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null; + com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = translatedMessage_.toBuilder(); + subBuilder = simpleMessage_.toBuilder(); } - translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry); + simpleMessage_ = input.readMessage(com.openxc.BinaryMessages.SimpleMessage.PARSER, extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(translatedMessage_); - translatedMessage_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(simpleMessage_); + simpleMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; @@ -263,13 +263,13 @@ public final class BinaryMessages { public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** - * RAW = 1; + * CAN = 1; */ - RAW(0, 1), + CAN(0, 1), /** - * TRANSLATED = 2; + * SIMPLE = 2; */ - TRANSLATED(1, 2), + SIMPLE(1, 2), /** * DIAGNOSTIC = 3; */ @@ -285,13 +285,13 @@ public final class BinaryMessages { ; /** - * RAW = 1; + * CAN = 1; */ - public static final int RAW_VALUE = 1; + public static final int CAN_VALUE = 1; /** - * TRANSLATED = 2; + * SIMPLE = 2; */ - public static final int TRANSLATED_VALUE = 2; + public static final int SIMPLE_VALUE = 2; /** * DIAGNOSTIC = 3; */ @@ -310,8 +310,8 @@ public final class BinaryMessages { public static Type valueOf(int value) { switch (value) { - case 1: return RAW; - case 2: return TRANSLATED; + case 1: return CAN; + case 2: return SIMPLE; case 3: return DIAGNOSTIC; case 4: return CONTROL_COMMAND; case 5: return COMMAND_RESPONSE; @@ -383,48 +383,48 @@ public final class BinaryMessages { return type_; } - // optional .openxc.RawMessage raw_message = 2; - public static final int RAW_MESSAGE_FIELD_NUMBER = 2; - private com.openxc.BinaryMessages.RawMessage rawMessage_; + // optional .openxc.CanMessage can_message = 2; + public static final int CAN_MESSAGE_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.CanMessage canMessage_; /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public boolean hasRawMessage() { + public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessage getRawMessage() { - return rawMessage_; + public com.openxc.BinaryMessages.CanMessage getCanMessage() { + return canMessage_; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() { - return rawMessage_; + public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { + return canMessage_; } - // optional .openxc.TranslatedMessage translated_message = 3; - public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3; - private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_; + // optional .openxc.SimpleMessage simple_message = 3; + public static final int SIMPLE_MESSAGE_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.SimpleMessage simpleMessage_; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public boolean hasTranslatedMessage() { + public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { - return translatedMessage_; + public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { + return simpleMessage_; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - return translatedMessage_; + public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { + return simpleMessage_; } // optional .openxc.DiagnosticResponse diagnostic_response = 4; @@ -494,9 +494,9 @@ public final class BinaryMessages { } private void initFields() { - type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; - rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; + canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); + simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); @@ -517,10 +517,10 @@ public final class BinaryMessages { output.writeEnum(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, rawMessage_); + output.writeMessage(2, canMessage_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, translatedMessage_); + output.writeMessage(3, simpleMessage_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(4, diagnosticResponse_); @@ -546,11 +546,11 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rawMessage_); + .computeMessageSize(2, canMessage_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, translatedMessage_); + .computeMessageSize(3, simpleMessage_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream @@ -672,8 +672,8 @@ public final class BinaryMessages { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRawMessageFieldBuilder(); - getTranslatedMessageFieldBuilder(); + getCanMessageFieldBuilder(); + getSimpleMessageFieldBuilder(); getDiagnosticResponseFieldBuilder(); getControlCommandFieldBuilder(); getCommandResponseFieldBuilder(); @@ -685,18 +685,18 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; bitField0_ = (bitField0_ & ~0x00000001); - if (rawMessageBuilder_ == null) { - rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + if (canMessageBuilder_ == null) { + canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); } else { - rawMessageBuilder_.clear(); + canMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); - if (translatedMessageBuilder_ == null) { - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + if (simpleMessageBuilder_ == null) { + simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); } else { - translatedMessageBuilder_.clear(); + simpleMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); if (diagnosticResponseBuilder_ == null) { @@ -752,18 +752,18 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (rawMessageBuilder_ == null) { - result.rawMessage_ = rawMessage_; + if (canMessageBuilder_ == null) { + result.canMessage_ = canMessage_; } else { - result.rawMessage_ = rawMessageBuilder_.build(); + result.canMessage_ = canMessageBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (translatedMessageBuilder_ == null) { - result.translatedMessage_ = translatedMessage_; + if (simpleMessageBuilder_ == null) { + result.simpleMessage_ = simpleMessage_; } else { - result.translatedMessage_ = translatedMessageBuilder_.build(); + result.simpleMessage_ = simpleMessageBuilder_.build(); } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; @@ -808,11 +808,11 @@ public final class BinaryMessages { if (other.hasType()) { setType(other.getType()); } - if (other.hasRawMessage()) { - mergeRawMessage(other.getRawMessage()); + if (other.hasCanMessage()) { + mergeCanMessage(other.getCanMessage()); } - if (other.hasTranslatedMessage()) { - mergeTranslatedMessage(other.getTranslatedMessage()); + if (other.hasSimpleMessage()) { + mergeSimpleMessage(other.getSimpleMessage()); } if (other.hasDiagnosticResponse()) { mergeDiagnosticResponse(other.getDiagnosticResponse()); @@ -851,7 +851,7 @@ public final class BinaryMessages { private int bitField0_; // optional .openxc.VehicleMessage.Type type = 1; - private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; /** * optional .openxc.VehicleMessage.Type type = 1; */ @@ -881,243 +881,243 @@ public final class BinaryMessages { */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW; + type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; onChanged(); return this; } - // optional .openxc.RawMessage raw_message = 2; - private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + // optional .openxc.CanMessage can_message = 2; + private com.openxc.BinaryMessages.CanMessage canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_; + com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> canMessageBuilder_; /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public boolean hasRawMessage() { + public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessage getRawMessage() { - if (rawMessageBuilder_ == null) { - return rawMessage_; + public com.openxc.BinaryMessages.CanMessage getCanMessage() { + if (canMessageBuilder_ == null) { + return canMessage_; } else { - return rawMessageBuilder_.getMessage(); + return canMessageBuilder_.getMessage(); } } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) { - if (rawMessageBuilder_ == null) { + public Builder setCanMessage(com.openxc.BinaryMessages.CanMessage value) { + if (canMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - rawMessage_ = value; + canMessage_ = value; onChanged(); } else { - rawMessageBuilder_.setMessage(value); + canMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder setRawMessage( - com.openxc.BinaryMessages.RawMessage.Builder builderForValue) { - if (rawMessageBuilder_ == null) { - rawMessage_ = builderForValue.build(); + public Builder setCanMessage( + com.openxc.BinaryMessages.CanMessage.Builder builderForValue) { + if (canMessageBuilder_ == null) { + canMessage_ = builderForValue.build(); onChanged(); } else { - rawMessageBuilder_.setMessage(builderForValue.build()); + canMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) { - if (rawMessageBuilder_ == null) { + public Builder mergeCanMessage(com.openxc.BinaryMessages.CanMessage value) { + if (canMessageBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && - rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) { - rawMessage_ = - com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial(); + canMessage_ != com.openxc.BinaryMessages.CanMessage.getDefaultInstance()) { + canMessage_ = + com.openxc.BinaryMessages.CanMessage.newBuilder(canMessage_).mergeFrom(value).buildPartial(); } else { - rawMessage_ = value; + canMessage_ = value; } onChanged(); } else { - rawMessageBuilder_.mergeFrom(value); + canMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public Builder clearRawMessage() { - if (rawMessageBuilder_ == null) { - rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + public Builder clearCanMessage() { + if (canMessageBuilder_ == null) { + canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); onChanged(); } else { - rawMessageBuilder_.clear(); + canMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() { + public com.openxc.BinaryMessages.CanMessage.Builder getCanMessageBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRawMessageFieldBuilder().getBuilder(); + return getCanMessageFieldBuilder().getBuilder(); } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ - public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() { - if (rawMessageBuilder_ != null) { - return rawMessageBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { + if (canMessageBuilder_ != null) { + return canMessageBuilder_.getMessageOrBuilder(); } else { - return rawMessage_; + return canMessage_; } } /** - * optional .openxc.RawMessage raw_message = 2; + * optional .openxc.CanMessage can_message = 2; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> - getRawMessageFieldBuilder() { - if (rawMessageBuilder_ == null) { - rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>( - rawMessage_, + com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> + getCanMessageFieldBuilder() { + if (canMessageBuilder_ == null) { + canMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder>( + canMessage_, getParentForChildren(), isClean()); - rawMessage_ = null; + canMessage_ = null; } - return rawMessageBuilder_; + return canMessageBuilder_; } - // optional .openxc.TranslatedMessage translated_message = 3; - private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + // optional .openxc.SimpleMessage simple_message = 3; + private com.openxc.BinaryMessages.SimpleMessage simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_; + com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> simpleMessageBuilder_; /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public boolean hasTranslatedMessage() { + public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - return translatedMessage_; + public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { + if (simpleMessageBuilder_ == null) { + return simpleMessage_; } else { - return translatedMessageBuilder_.getMessage(); + return simpleMessageBuilder_.getMessage(); } } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { + public Builder setSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { + if (simpleMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - translatedMessage_ = value; + simpleMessage_ = value; onChanged(); } else { - translatedMessageBuilder_.setMessage(value); + simpleMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder setTranslatedMessage( - com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = builderForValue.build(); + public Builder setSimpleMessage( + com.openxc.BinaryMessages.SimpleMessage.Builder builderForValue) { + if (simpleMessageBuilder_ == null) { + simpleMessage_ = builderForValue.build(); onChanged(); } else { - translatedMessageBuilder_.setMessage(builderForValue.build()); + simpleMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) { - if (translatedMessageBuilder_ == null) { + public Builder mergeSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { + if (simpleMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && - translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) { - translatedMessage_ = - com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial(); + simpleMessage_ != com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) { + simpleMessage_ = + com.openxc.BinaryMessages.SimpleMessage.newBuilder(simpleMessage_).mergeFrom(value).buildPartial(); } else { - translatedMessage_ = value; + simpleMessage_ = value; } onChanged(); } else { - translatedMessageBuilder_.mergeFrom(value); + simpleMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public Builder clearTranslatedMessage() { - if (translatedMessageBuilder_ == null) { - translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + public Builder clearSimpleMessage() { + if (simpleMessageBuilder_ == null) { + simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); onChanged(); } else { - translatedMessageBuilder_.clear(); + simpleMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() { + public com.openxc.BinaryMessages.SimpleMessage.Builder getSimpleMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getTranslatedMessageFieldBuilder().getBuilder(); + return getSimpleMessageFieldBuilder().getBuilder(); } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ - public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() { - if (translatedMessageBuilder_ != null) { - return translatedMessageBuilder_.getMessageOrBuilder(); + public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { + if (simpleMessageBuilder_ != null) { + return simpleMessageBuilder_.getMessageOrBuilder(); } else { - return translatedMessage_; + return simpleMessage_; } } /** - * optional .openxc.TranslatedMessage translated_message = 3; + * optional .openxc.SimpleMessage simple_message = 3; */ private com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> - getTranslatedMessageFieldBuilder() { - if (translatedMessageBuilder_ == null) { - translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>( - translatedMessage_, + com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> + getSimpleMessageFieldBuilder() { + if (simpleMessageBuilder_ == null) { + simpleMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder>( + simpleMessage_, getParentForChildren(), isClean()); - translatedMessage_ = null; + simpleMessage_ = null; } - return translatedMessageBuilder_; + return simpleMessageBuilder_; } // optional .openxc.DiagnosticResponse diagnostic_response = 4; @@ -1482,7 +1482,7 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - public interface RawMessageOrBuilder + public interface CanMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 bus = 1; @@ -1515,35 +1515,35 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getData(); - // optional .openxc.RawMessage.FrameFormat frame_format = 4; + // optional .openxc.CanMessage.FrameFormat frame_format = 4; /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ boolean hasFrameFormat(); /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat(); + com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat(); } /** - * Protobuf type {@code openxc.RawMessage} + * Protobuf type {@code openxc.CanMessage} */ - public static final class RawMessage extends + public static final class CanMessage extends com.google.protobuf.GeneratedMessage - implements RawMessageOrBuilder { - // Use RawMessage.newBuilder() to construct. - private RawMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements CanMessageOrBuilder { + // Use CanMessage.newBuilder() to construct. + private CanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private CanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final RawMessage defaultInstance; - public static RawMessage getDefaultInstance() { + private static final CanMessage defaultInstance; + public static CanMessage getDefaultInstance() { return defaultInstance; } - public RawMessage getDefaultInstanceForType() { + public CanMessage getDefaultInstanceForType() { return defaultInstance; } @@ -1553,7 +1553,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private RawMessage( + private CanMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1593,7 +1593,7 @@ public final class BinaryMessages { } case 32: { int rawValue = input.readEnum(); - com.openxc.BinaryMessages.RawMessage.FrameFormat value = com.openxc.BinaryMessages.RawMessage.FrameFormat.valueOf(rawValue); + com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(4, rawValue); } else { @@ -1616,33 +1616,33 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RawMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CanMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RawMessage(input, extensionRegistry); + return new CanMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } /** - * Protobuf enum {@code openxc.RawMessage.FrameFormat} + * Protobuf enum {@code openxc.CanMessage.FrameFormat} */ public enum FrameFormat implements com.google.protobuf.ProtocolMessageEnum { @@ -1698,7 +1698,7 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.openxc.BinaryMessages.RawMessage.getDescriptor().getEnumTypes().get(0); + return com.openxc.BinaryMessages.CanMessage.getDescriptor().getEnumTypes().get(0); } private static final FrameFormat[] VALUES = values(); @@ -1720,7 +1720,7 @@ public final class BinaryMessages { this.value = value; } - // @@protoc_insertion_point(enum_scope:openxc.RawMessage.FrameFormat) + // @@protoc_insertion_point(enum_scope:openxc.CanMessage.FrameFormat) } private int bitField0_; @@ -1772,19 +1772,19 @@ public final class BinaryMessages { return data_; } - // optional .openxc.RawMessage.FrameFormat frame_format = 4; + // optional .openxc.CanMessage.FrameFormat frame_format = 4; public static final int FRAME_FORMAT_FIELD_NUMBER = 4; - private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_; + private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_; /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } @@ -1792,7 +1792,7 @@ public final class BinaryMessages { bus_ = 0; messageId_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; - frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1855,53 +1855,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.CanMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.CanMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.RawMessage parseFrom( + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1910,7 +1910,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.CanMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1922,24 +1922,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.RawMessage} + * Protobuf type {@code openxc.CanMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.RawMessageOrBuilder { + implements com.openxc.BinaryMessages.CanMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class); + com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.CanMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1965,7 +1965,7 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); - frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1976,23 +1976,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.RawMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.CanMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.RawMessage build() { - com.openxc.BinaryMessages.RawMessage result = buildPartial(); + public com.openxc.BinaryMessages.CanMessage build() { + com.openxc.BinaryMessages.CanMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.RawMessage buildPartial() { - com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this); + public com.openxc.BinaryMessages.CanMessage buildPartial() { + com.openxc.BinaryMessages.CanMessage result = new com.openxc.BinaryMessages.CanMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2017,16 +2017,16 @@ public final class BinaryMessages { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.RawMessage) { - return mergeFrom((com.openxc.BinaryMessages.RawMessage)other); + if (other instanceof com.openxc.BinaryMessages.CanMessage) { + return mergeFrom((com.openxc.BinaryMessages.CanMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) { - if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.CanMessage other) { + if (other == com.openxc.BinaryMessages.CanMessage.getDefaultInstance()) return this; if (other.hasBus()) { setBus(other.getBus()); } @@ -2051,11 +2051,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.RawMessage parsedMessage = null; + com.openxc.BinaryMessages.CanMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.CanMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2168,24 +2168,24 @@ public final class BinaryMessages { return this; } - // optional .openxc.RawMessage.FrameFormat frame_format = 4; - private com.openxc.BinaryMessages.RawMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + // optional .openxc.CanMessage.FrameFormat frame_format = 4; + private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - public com.openxc.BinaryMessages.RawMessage.FrameFormat getFrameFormat() { + public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ - public Builder setFrameFormat(com.openxc.BinaryMessages.RawMessage.FrameFormat value) { + public Builder setFrameFormat(com.openxc.BinaryMessages.CanMessage.FrameFormat value) { if (value == null) { throw new NullPointerException(); } @@ -2195,24 +2195,24 @@ public final class BinaryMessages { return this; } /** - * optional .openxc.RawMessage.FrameFormat frame_format = 4; + * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ public Builder clearFrameFormat() { bitField0_ = (bitField0_ & ~0x00000008); - frameFormat_ = com.openxc.BinaryMessages.RawMessage.FrameFormat.STANDARD; + frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:openxc.RawMessage) + // @@protoc_insertion_point(builder_scope:openxc.CanMessage) } static { - defaultInstance = new RawMessage(true); + defaultInstance = new CanMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.RawMessage) + // @@protoc_insertion_point(class_scope:openxc.CanMessage) } public interface ControlCommandOrBuilder @@ -9938,18 +9938,18 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DynamicField) } - public interface TranslatedMessageOrBuilder + public interface SimpleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .openxc.TranslatedMessage.Type type = 1; + // optional .openxc.SimpleMessage.Type type = 1; /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ boolean hasType(); /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - com.openxc.BinaryMessages.TranslatedMessage.Type getType(); + com.openxc.BinaryMessages.SimpleMessage.Type getType(); // optional string name = 2; /** @@ -9995,24 +9995,24 @@ public final class BinaryMessages { com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } /** - * Protobuf type {@code openxc.TranslatedMessage} + * Protobuf type {@code openxc.SimpleMessage} */ - public static final class TranslatedMessage extends + public static final class SimpleMessage extends com.google.protobuf.GeneratedMessage - implements TranslatedMessageOrBuilder { - // Use TranslatedMessage.newBuilder() to construct. - private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + implements SimpleMessageOrBuilder { + // Use SimpleMessage.newBuilder() to construct. + private SimpleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private SimpleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final TranslatedMessage defaultInstance; - public static TranslatedMessage getDefaultInstance() { + private static final SimpleMessage defaultInstance; + public static SimpleMessage getDefaultInstance() { return defaultInstance; } - public TranslatedMessage getDefaultInstanceForType() { + public SimpleMessage getDefaultInstanceForType() { return defaultInstance; } @@ -10022,7 +10022,7 @@ public final class BinaryMessages { getUnknownFields() { return this.unknownFields; } - private TranslatedMessage( + private SimpleMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -10047,7 +10047,7 @@ public final class BinaryMessages { } case 8: { int rawValue = input.readEnum(); - com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue); + com.openxc.BinaryMessages.SimpleMessage.Type value = com.openxc.BinaryMessages.SimpleMessage.Type.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { @@ -10101,33 +10101,33 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TranslatedMessage parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslatedMessage(input, extensionRegistry); + return new SimpleMessage(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } /** - * Protobuf enum {@code openxc.TranslatedMessage.Type} + * Protobuf enum {@code openxc.SimpleMessage.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { @@ -10219,7 +10219,7 @@ public final class BinaryMessages { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0); + return com.openxc.BinaryMessages.SimpleMessage.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); @@ -10241,23 +10241,23 @@ public final class BinaryMessages { this.value = value; } - // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type) + // @@protoc_insertion_point(enum_scope:openxc.SimpleMessage.Type) } private int bitField0_; - // optional .openxc.TranslatedMessage.Type type = 1; + // optional .openxc.SimpleMessage.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; - private com.openxc.BinaryMessages.TranslatedMessage.Type type_; + private com.openxc.BinaryMessages.SimpleMessage.Type type_; /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - public com.openxc.BinaryMessages.TranslatedMessage.Type getType() { + public com.openxc.BinaryMessages.SimpleMessage.Type getType() { return type_; } @@ -10349,7 +10349,7 @@ public final class BinaryMessages { } private void initFields() { - type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; name_ = ""; value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -10415,53 +10415,53 @@ public final class BinaryMessages { return super.writeReplace(); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data) + public static com.openxc.BinaryMessages.SimpleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.SimpleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input) + public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.openxc.BinaryMessages.TranslatedMessage parseFrom( + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10470,7 +10470,7 @@ public final class BinaryMessages { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) { + public static Builder newBuilder(com.openxc.BinaryMessages.SimpleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10482,24 +10482,24 @@ public final class BinaryMessages { return builder; } /** - * Protobuf type {@code openxc.TranslatedMessage} + * Protobuf type {@code openxc.SimpleMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder { + implements com.openxc.BinaryMessages.SimpleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class); + com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); } - // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder() + // Construct using com.openxc.BinaryMessages.SimpleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -10521,7 +10521,7 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; bitField0_ = (bitField0_ & ~0x00000001); name_ = ""; bitField0_ = (bitField0_ & ~0x00000002); @@ -10546,23 +10546,23 @@ public final class BinaryMessages { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() { - return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance(); + public com.openxc.BinaryMessages.SimpleMessage getDefaultInstanceForType() { + return com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); } - public com.openxc.BinaryMessages.TranslatedMessage build() { - com.openxc.BinaryMessages.TranslatedMessage result = buildPartial(); + public com.openxc.BinaryMessages.SimpleMessage build() { + com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.openxc.BinaryMessages.TranslatedMessage buildPartial() { - com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this); + public com.openxc.BinaryMessages.SimpleMessage buildPartial() { + com.openxc.BinaryMessages.SimpleMessage result = new com.openxc.BinaryMessages.SimpleMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -10595,16 +10595,16 @@ public final class BinaryMessages { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) { - return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other); + if (other instanceof com.openxc.BinaryMessages.SimpleMessage) { + return mergeFrom((com.openxc.BinaryMessages.SimpleMessage)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) { - if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this; + public Builder mergeFrom(com.openxc.BinaryMessages.SimpleMessage other) { + if (other == com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } @@ -10631,11 +10631,11 @@ public final class BinaryMessages { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null; + com.openxc.BinaryMessages.SimpleMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage(); + parsedMessage = (com.openxc.BinaryMessages.SimpleMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -10646,24 +10646,24 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.TranslatedMessage.Type type = 1; - private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + // optional .openxc.SimpleMessage.Type type = 1; + private com.openxc.BinaryMessages.SimpleMessage.Type type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - public com.openxc.BinaryMessages.TranslatedMessage.Type getType() { + public com.openxc.BinaryMessages.SimpleMessage.Type getType() { return type_; } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ - public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) { + public Builder setType(com.openxc.BinaryMessages.SimpleMessage.Type value) { if (value == null) { throw new NullPointerException(); } @@ -10673,11 +10673,11 @@ public final class BinaryMessages { return this; } /** - * optional .openxc.TranslatedMessage.Type type = 1; + * optional .openxc.SimpleMessage.Type type = 1; */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING; + type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; onChanged(); return this; } @@ -10990,15 +10990,15 @@ public final class BinaryMessages { return eventBuilder_; } - // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage) + // @@protoc_insertion_point(builder_scope:openxc.SimpleMessage) } static { - defaultInstance = new TranslatedMessage(true); + defaultInstance = new SimpleMessage(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) + // @@protoc_insertion_point(class_scope:openxc.SimpleMessage) } private static com.google.protobuf.Descriptors.Descriptor @@ -11007,10 +11007,10 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_VehicleMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_RawMessage_descriptor; + internal_static_openxc_CanMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_RawMessage_fieldAccessorTable; + internal_static_openxc_CanMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_ControlCommand_descriptor; private static @@ -11062,10 +11062,10 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DynamicField_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor - internal_static_openxc_TranslatedMessage_descriptor; + internal_static_openxc_SimpleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_openxc_TranslatedMessage_fieldAccessorTable; + internal_static_openxc_SimpleMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -11075,71 +11075,70 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\224\003\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\210\003\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\022/\n" + - "\017control_command\030\005 \001(\0132\026.openxc.ControlC" + - "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" + - "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" + - "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO", - "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\234\001\n\nRawMes" + - "sage\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\0224\n\014frame_format\030\004 \001(\0162\036.open" + - "xc.RawMessage.FrameFormat\")\n\013FrameFormat" + - "\022\014\n\010STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016Control" + - "Command\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCo" + - "mmand.Type\022<\n\022diagnostic_request\030\002 \001(\0132 " + - ".openxc.DiagnosticControlCommand\022G\n\030pass" + - "through_mode_request\030\003 \001(\0132%.openxc.Pass" + - "throughModeControlCommand\022O\n acceptance_", - "filter_bypass_command\030\004 \001(\0132%.openxc.Acc" + - "eptanceFilterBypassCommand\022<\n\026payload_fo" + - "rmat_command\030\005 \001(\0132\034.openxc.PayloadForma" + - "tCommand\022O\n predefined_obd2_requests_com" + - "mand\030\006 \001(\0132%.openxc.PredefinedObd2Reques" + - "tsCommand\"\223\001\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVIC" + - "E_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022" + - "\034\n\030ACCEPTANCE_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD" + - "_FORMAT\020\006\022\034\n\030PREDEFINED_OBD2_REQUESTS\020\007\"" + - "\236\001\n\030DiagnosticControlCommand\022*\n\007request\030", - "\001 \001(\0132\031.openxc.DiagnosticRequest\0227\n\006acti" + - "on\030\002 \001(\0162\'.openxc.DiagnosticControlComma" + - "nd.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002" + - "\"=\n\035PassthroughModeControlCommand\022\013\n\003bus" + - "\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035AcceptanceFil" + - "terBypassCommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030" + - "\002 \001(\010\"{\n\024PayloadFormatCommand\022:\n\006format\030" + - "\001 \001(\0162*.openxc.PayloadFormatCommand.Payl" + - "oadFormat\"\'\n\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010" + - "PROTOBUF\020\002\"0\n\035PredefinedObd2RequestsComm", - "and\022\017\n\007enabled\030\001 \001(\010\"]\n\017CommandResponse\022" + - ")\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Ty" + - "pe\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021" + - "DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" + - "e_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014d" + - "ecoded_type\030\t \001(\0162%.openxc.DiagnosticReq" + - "uest.DecodedType\"!\n\013DecodedType\022\010\n\004NONE\020" + - "\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bu", - "s\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(" + - "\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negat" + - "ive_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014" + - "\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type" + - "\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014str" + - "ing_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025" + - "\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020" + - "\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessa" + - "ge\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMess" + - "age.Type\022\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.", - "openxc.DynamicField\022#\n\005event\030\004 \001(\0132\024.ope" + - "nxc.DynamicField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003" + - "NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013E" + - "VENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.op" + - "enxcB\016BinaryMessages" + "Type\022\'\n\013can_message\030\002 \001(\0132\022.openxc.CanMe" + + "ssage\022-\n\016simple_message\030\003 \001(\0132\025.openxc.S" + + "impleMessage\0227\n\023diagnostic_response\030\004 \001(" + + "\0132\032.openxc.DiagnosticResponse\022/\n\017control" + + "_command\030\005 \001(\0132\026.openxc.ControlCommand\0221" + + "\n\020command_response\030\006 \001(\0132\027.openxc.Comman" + + "dResponse\"V\n\004Type\022\007\n\003CAN\020\001\022\n\n\006SIMPLE\020\002\022\016" + + "\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_COMMAND\020\004\022\024\n\020C", + "OMMAND_RESPONSE\020\005\"\234\001\n\nCanMessage\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\022" + + "4\n\014frame_format\030\004 \001(\0162\036.openxc.CanMessag" + + "e.FrameFormat\")\n\013FrameFormat\022\014\n\010STANDARD" + + "\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016ControlCommand\022)\n\004t" + + "ype\030\001 \001(\0162\033.openxc.ControlCommand.Type\022<" + + "\n\022diagnostic_request\030\002 \001(\0132 .openxc.Diag" + + "nosticControlCommand\022G\n\030passthrough_mode" + + "_request\030\003 \001(\0132%.openxc.PassthroughModeC" + + "ontrolCommand\022O\n acceptance_filter_bypas", + "s_command\030\004 \001(\0132%.openxc.AcceptanceFilte" + + "rBypassCommand\022<\n\026payload_format_command" + + "\030\005 \001(\0132\034.openxc.PayloadFormatCommand\022O\n " + + "predefined_obd2_requests_command\030\006 \001(\0132%" + + ".openxc.PredefinedObd2RequestsCommand\"\223\001" + + "\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDI" + + "AGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANC" + + "E_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n" + + "\030PREDEFINED_OBD2_REQUESTS\020\007\"\236\001\n\030Diagnost" + + "icControlCommand\022*\n\007request\030\001 \001(\0132\031.open", + "xc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'.o" + + "penxc.DiagnosticControlCommand.Action\"\035\n" + + "\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passthro" + + "ughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007en" + + "abled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassCom" + + "mand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024Pay" + + "loadFormatCommand\022:\n\006format\030\001 \001(\0162*.open" + + "xc.PayloadFormatCommand.PayloadFormat\"\'\n" + + "\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0" + + "\n\035PredefinedObd2RequestsCommand\022\017\n\007enabl", + "ed\030\001 \001(\010\"]\n\017CommandResponse\022)\n\004type\030\001 \001(" + + "\0162\033.openxc.ControlCommand.Type\022\017\n\007messag" + + "e\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021DiagnosticRe" + + "quest\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\tfreque" + + "ncy\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030" + + "\t \001(\0162%.openxc.DiagnosticRequest.Decoded" + + "Type\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"" + + "\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\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\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.ope" + + "nxc.DynamicField.Type\022\024\n\014string_value\030\002 " + + "\001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_va" + + "lue\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010" + + "\n\004BOOL\020\003\"\357\001\n\rSimpleMessage\022(\n\004type\030\001 \001(\016" + + "2\032.openxc.SimpleMessage.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\004" + + "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + + "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + + "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11151,12 +11150,12 @@ 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", "ControlCommand", "CommandResponse", }); - internal_static_openxc_RawMessage_descriptor = + new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); + internal_static_openxc_CanMessage_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_openxc_RawMessage_fieldAccessorTable = new + internal_static_openxc_CanMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_RawMessage_descriptor, + internal_static_openxc_CanMessage_descriptor, new java.lang.String[] { "Bus", "MessageId", "Data", "FrameFormat", }); internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); @@ -11218,11 +11217,11 @@ public final class BinaryMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); - internal_static_openxc_TranslatedMessage_descriptor = + internal_static_openxc_SimpleMessage_descriptor = getDescriptor().getMessageTypes().get(12); - internal_static_openxc_TranslatedMessage_fieldAccessorTable = new + internal_static_openxc_SimpleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_TranslatedMessage_descriptor, + internal_static_openxc_SimpleMessage_descriptor, new java.lang.String[] { "Type", "Name", "Value", "Event", }); return null; } diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index d69dcb5a..8b1ee796 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\"\x9c\x01\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\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.RawMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x9c\x01\n\nCanMessage\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\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"\xef\x01\n\rSimpleMessage\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.openxc.SimpleMessage.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') @@ -24,11 +24,11 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( - name='RAW', index=0, number=1, + name='CAN', index=0, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( - name='TRANSLATED', index=1, number=2, + name='SIMPLE', index=1, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( @@ -46,13 +46,13 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=339, - serialized_end=429, + serialized_start=331, + serialized_end=417, ) -_RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( +_CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( name='FrameFormat', - full_name='openxc.RawMessage.FrameFormat', + full_name='openxc.CanMessage.FrameFormat', filename=None, file=DESCRIPTOR, values=[ @@ -67,8 +67,8 @@ _RAWMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=547, - serialized_end=588, + serialized_start=535, + serialized_end=576, ) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( @@ -108,8 +108,8 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1012, - serialized_end=1159, + serialized_start=1000, + serialized_end=1147, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( @@ -129,8 +129,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1291, - serialized_end=1320, + serialized_start=1279, + serialized_end=1308, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( @@ -150,8 +150,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1531, - serialized_end=1570, + serialized_start=1519, + serialized_end=1558, ) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( @@ -171,8 +171,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1938, - serialized_end=1971, + serialized_start=1926, + serialized_end=1959, ) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( @@ -196,13 +196,13 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2263, - serialized_end=2300, + serialized_start=2251, + serialized_end=2288, ) -_TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( +_SIMPLEMESSAGE_TYPE = _descriptor.EnumDescriptor( name='Type', - full_name='openxc.TranslatedMessage.Type', + full_name='openxc.SimpleMessage.Type', filename=None, file=DESCRIPTOR, values=[ @@ -233,8 +233,8 @@ _TRANSLATEDMESSAGE_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2458, - serialized_end=2550, + serialized_start=2438, + serialized_end=2530, ) @@ -253,14 +253,14 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='raw_message', full_name='openxc.VehicleMessage.raw_message', index=1, + name='can_message', full_name='openxc.VehicleMessage.can_message', index=1, number=2, 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), _descriptor.FieldDescriptor( - name='translated_message', full_name='openxc.VehicleMessage.translated_message', index=2, + name='simple_message', full_name='openxc.VehicleMessage.simple_message', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -298,40 +298,40 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=429, + serialized_end=417, ) -_RAWMESSAGE = _descriptor.Descriptor( - name='RawMessage', - full_name='openxc.RawMessage', +_CANMESSAGE = _descriptor.Descriptor( + name='CanMessage', + full_name='openxc.CanMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='bus', full_name='openxc.RawMessage.bus', index=0, + name='bus', full_name='openxc.CanMessage.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='message_id', full_name='openxc.RawMessage.message_id', index=1, + name='message_id', full_name='openxc.CanMessage.message_id', index=1, number=2, type=13, cpp_type=3, 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='data', full_name='openxc.RawMessage.data', index=2, + name='data', full_name='openxc.CanMessage.data', index=2, number=3, 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), _descriptor.FieldDescriptor( - name='frame_format', full_name='openxc.RawMessage.frame_format', index=3, + name='frame_format', full_name='openxc.CanMessage.frame_format', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, message_type=None, enum_type=None, containing_type=None, @@ -342,13 +342,13 @@ _RAWMESSAGE = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _RAWMESSAGE_FRAMEFORMAT, + _CANMESSAGE_FRAMEFORMAT, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=432, - serialized_end=588, + serialized_start=420, + serialized_end=576, ) @@ -411,8 +411,8 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=591, - serialized_end=1159, + serialized_start=579, + serialized_end=1147, ) @@ -447,8 +447,8 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1162, - serialized_end=1320, + serialized_start=1150, + serialized_end=1308, ) @@ -482,8 +482,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1322, - serialized_end=1383, + serialized_start=1310, + serialized_end=1371, ) @@ -517,8 +517,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1385, - serialized_end=1445, + serialized_start=1373, + serialized_end=1433, ) @@ -546,8 +546,8 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1447, - serialized_end=1570, + serialized_start=1435, + serialized_end=1558, ) @@ -574,8 +574,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1572, - serialized_end=1620, + serialized_start=1560, + serialized_end=1608, ) @@ -616,8 +616,8 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1622, - serialized_end=1715, + serialized_start=1610, + serialized_end=1703, ) @@ -701,8 +701,8 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1718, - serialized_end=1971, + serialized_start=1706, + serialized_end=1959, ) @@ -778,8 +778,8 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1974, - serialized_end=2135, + serialized_start=1962, + serialized_end=2123, ) @@ -828,41 +828,41 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2138, - serialized_end=2300, + serialized_start=2126, + serialized_end=2288, ) -_TRANSLATEDMESSAGE = _descriptor.Descriptor( - name='TranslatedMessage', - full_name='openxc.TranslatedMessage', +_SIMPLEMESSAGE = _descriptor.Descriptor( + name='SimpleMessage', + full_name='openxc.SimpleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='type', full_name='openxc.TranslatedMessage.type', index=0, + name='type', full_name='openxc.SimpleMessage.type', 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, options=None), _descriptor.FieldDescriptor( - name='name', full_name='openxc.TranslatedMessage.name', index=1, + name='name', full_name='openxc.SimpleMessage.name', index=1, number=2, 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, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.TranslatedMessage.value', index=2, + name='value', full_name='openxc.SimpleMessage.value', index=2, number=3, 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), _descriptor.FieldDescriptor( - name='event', full_name='openxc.TranslatedMessage.event', index=3, + name='event', full_name='openxc.SimpleMessage.event', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -873,24 +873,24 @@ _TRANSLATEDMESSAGE = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _TRANSLATEDMESSAGE_TYPE, + _SIMPLEMESSAGE_TYPE, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=2303, - serialized_end=2550, + serialized_start=2291, + serialized_end=2530, ) _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['can_message'].message_type = _CANMESSAGE +_VEHICLEMESSAGE.fields_by_name['simple_message'].message_type = _SIMPLEMESSAGE _VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTICRESPONSE _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE _VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; -_RAWMESSAGE.fields_by_name['frame_format'].enum_type = _RAWMESSAGE_FRAMEFORMAT -_RAWMESSAGE_FRAMEFORMAT.containing_type = _RAWMESSAGE; +_CANMESSAGE.fields_by_name['frame_format'].enum_type = _CANMESSAGE_FRAMEFORMAT +_CANMESSAGE_FRAMEFORMAT.containing_type = _CANMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND @@ -908,12 +908,12 @@ _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; -_TRANSLATEDMESSAGE.fields_by_name['type'].enum_type = _TRANSLATEDMESSAGE_TYPE -_TRANSLATEDMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD -_TRANSLATEDMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD -_TRANSLATEDMESSAGE_TYPE.containing_type = _TRANSLATEDMESSAGE; +_SIMPLEMESSAGE.fields_by_name['type'].enum_type = _SIMPLEMESSAGE_TYPE +_SIMPLEMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD +_SIMPLEMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD +_SIMPLEMESSAGE_TYPE.containing_type = _SIMPLEMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE -DESCRIPTOR.message_types_by_name['RawMessage'] = _RAWMESSAGE +DESCRIPTOR.message_types_by_name['CanMessage'] = _CANMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND DESCRIPTOR.message_types_by_name['DiagnosticControlCommand'] = _DIAGNOSTICCONTROLCOMMAND DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGHMODECONTROLCOMMAND @@ -924,7 +924,7 @@ DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD -DESCRIPTOR.message_types_by_name['TranslatedMessage'] = _TRANSLATEDMESSAGE +DESCRIPTOR.message_types_by_name['SimpleMessage'] = _SIMPLEMESSAGE class VehicleMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType @@ -932,11 +932,11 @@ class VehicleMessage(_message.Message): # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) -class RawMessage(_message.Message): +class CanMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _RAWMESSAGE + DESCRIPTOR = _CANMESSAGE - # @@protoc_insertion_point(class_scope:openxc.RawMessage) + # @@protoc_insertion_point(class_scope:openxc.CanMessage) class ControlCommand(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType @@ -998,11 +998,11 @@ class DynamicField(_message.Message): # @@protoc_insertion_point(class_scope:openxc.DynamicField) -class TranslatedMessage(_message.Message): +class SimpleMessage(_message.Message): __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _TRANSLATEDMESSAGE + DESCRIPTOR = _SIMPLEMESSAGE - # @@protoc_insertion_point(class_scope:openxc.TranslatedMessage) + # @@protoc_insertion_point(class_scope:openxc.SimpleMessage) DESCRIPTOR.has_options = True diff --git a/openxc.proto b/openxc.proto index 3c0a51d4..3becaa5c 100644 --- a/openxc.proto +++ b/openxc.proto @@ -4,18 +4,18 @@ option java_package = "com.openxc"; option java_outer_classname = "BinaryMessages"; message VehicleMessage { - enum Type { RAW = 1; TRANSLATED = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; + enum Type { CAN = 1; SIMPLE = 2; DIAGNOSTIC = 3; CONTROL_COMMAND = 4; COMMAND_RESPONSE = 5; } optional Type type = 1; - optional RawMessage raw_message = 2; - optional TranslatedMessage translated_message = 3; + optional CanMessage can_message = 2; + optional SimpleMessage simple_message = 3; optional DiagnosticResponse diagnostic_response = 4; optional ControlCommand control_command = 5; optional CommandResponse command_response = 6; } -message RawMessage { +message CanMessage { enum FrameFormat { STANDARD = 1; EXTENDED = 2; @@ -119,7 +119,7 @@ message DynamicField { optional bool boolean_value = 4; } -message TranslatedMessage { +message SimpleMessage { enum Type { STRING = 1; NUM = 2; BOOL = 3; EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} -- cgit 1.2.3-korg From e47f58b38d86e6aefd1b8f2fba2fc9dba3eae702 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:14:03 -0400 Subject: Mention 'status' field in all command response JSON examples. Fixed #13. --- JSON.mkd | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/JSON.mkd b/JSON.mkd index 7bf0ce5a..71546bc9 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -179,7 +179,16 @@ manually override the OBD-II decoding feature for a known PID. ### Responses -The response to a successful request: +Requests to add or cancel a diagnostic request are first acknowledged by the VI, +before any responses to the request are returned. The response uses the standard +command response format: + + { "command_response": "diagnostic_request", "status": true} + +**status** - true if the request was successfully created or cancelled. + +When a node on the network response to the request and the result is published +by the VI, the result looks like: {"bus": 1, "id": 1234, @@ -233,6 +242,17 @@ The response to a simple PID request would look like this: In addition to the `diagnostic_request` command described earlier, there are other possible values for the `command` field. +All commands immediately return a `command_response`, e.g.: + + { "command_response": "version", "message": "v6.0-dev (default)", "status": true} + +**command_response** - an echo of the command this is a ACKing. + +**status** - true if the command was understood and performed succesfully. + +**message** - (optional) a string message from the VI, e.g. to return a version + descriptor or error message. + ### Version Query The `version` command triggers the VI to inject a firmware version identifier @@ -244,7 +264,7 @@ response into the outgoing data stream. **Response** - { "command_response": "version", "message": "v6.0-dev (default)"} + { "command_response": "version", "message": "v6.0-dev (default)", "status": true} ### Device ID Query @@ -257,7 +277,7 @@ MAC address of an included Bluetooth module) into into the outgoing data stream. **Response** - { "command_response": "device_id", "message": "0012345678"} + { "command_response": "device_id", "message": "0012345678", "status": true} ### Passthrough CAN Mode -- cgit 1.2.3-korg From 58dfea8e7562588b3dfc71e07c3c8736187e29dc Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:20:36 -0400 Subject: Give diagnostic request field a more specific name. Fixed #18. --- JSON.mkd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/JSON.mkd b/JSON.mkd index 71546bc9..43f7ea9c 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -65,7 +65,7 @@ A diagnostic request is added or cancelled with a JSON object like this example: { "command": "diagnostic_request", "action": "add", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, @@ -92,7 +92,7 @@ simple one-time diagnostic request: { "command": "diagnostic_request", "action": "add", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, @@ -111,7 +111,7 @@ previous example as a recurring request at 1Hz: { "command": "diagnostic_request", "action": "add", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, @@ -125,7 +125,7 @@ To cancel a recurring request, send a `cancel` action with the same key, e.g.: { "command": "diagnostic_request", "action": "cancel", - "request": { + "diagnostic_request": { "bus": 1, "id": 1234, "mode": 1, -- cgit 1.2.3-korg From 9682309b7d7450235bea95841f7442e6712db379 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:23:29 -0400 Subject: Use more specific 'message_id' in JSON, not just 'id'. There often isn't enough context to know if it's the message ID or a transaction ID or something else. Fixed #20. --- JSON.mkd | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/JSON.mkd b/JSON.mkd index 43f7ea9c..e07d0600 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -39,12 +39,12 @@ discrete pieces of information in the measurement. The format for a plain CAN message: - {"bus": 1, "id": 1234, "data": "0x12345678"} + {"bus": 1, "message_id": 1234, "data": "0x12345678"} **bus** - the numerical identifier of the CAN bus where this message originated, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). -**id** - the CAN message ID +**message_id** - the CAN message ID **data** - up to 8 bytes of data from the CAN message's payload, represented as a hexidecimal number in a string. Many JSON parser cannot handle 64-bit @@ -67,7 +67,7 @@ A diagnostic request is added or cancelled with a JSON object like this example: "action": "add", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5, "payload": "0x1234", @@ -94,7 +94,7 @@ simple one-time diagnostic request: "action": "add", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5 } @@ -113,7 +113,7 @@ previous example as a recurring request at 1Hz: "action": "add", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5, "frequency": 1 @@ -127,7 +127,7 @@ To cancel a recurring request, send a `cancel` action with the same key, e.g.: "action": "cancel", "diagnostic_request": { "bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5 } @@ -141,7 +141,7 @@ exist in parallel with a recurring request for the same key. **bus** - the numerical identifier of the CAN bus where this request should be sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). -**id** - the CAN arbitration ID for the request. +**message_id** - the CAN message ID for the request. **mode** - the OBD-II mode of the request - 0x1 through 0xff (1 through 9 are the standardized modes and 0x22 is a common proprietary mode). @@ -162,7 +162,7 @@ exist in parallel with a recurring request for the same key. **multiple_responses** - (optional, false by default) if true, request will stay active for a full 100ms, even after receiving a diagnostic response message. - This is useful for requests to the functional broadcast arbitration ID + This is useful for requests to the functional broadcast message ID (`0x7df`) when you need to get responses from multiple modules. It's possible to set this to `true` for non-broadcast requests, but in practice you won't see any additional responses after the first and it will just take up memory @@ -191,7 +191,7 @@ When a node on the network response to the request and the result is published by the VI, the result looks like: {"bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "pid": 5, "success": true, @@ -202,7 +202,7 @@ and to an unsuccessful request, with the `negative_response_code` and no `pid` echo: {"bus": 1, - "id": 1234, + "message_id": 1234, "mode": 1, "success": false, "negative_response_code": 17} @@ -210,7 +210,7 @@ echo: **bus** - the numerical identifier of the CAN bus where this response was received. -**id** - the CAN arbitration ID for this response. +**message_id** - the CAN message ID for this response. **mode** - the OBD-II mode of the original diagnostic request. @@ -235,7 +235,7 @@ Finally, the `payload` and `value` fields are mutually exclusive: The response to a simple PID request would look like this: - {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} + {"success": true, "bus": 1, "message_id": 1234, "mode": 1, "pid": 5, "payload": "0x2"} ## Commands -- cgit 1.2.3-korg From d17a9c7988b05e70607d1eb823fbe160d0a4c506 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 6 Oct 2014 23:25:13 -0400 Subject: Remove redundant 'type' field from binary SimpleVehicleMessage. You can figure out the type based on the value and event DynamicFields. Fixed #19. --- gen/cpp/openxc.pb | 21 +- gen/cpp/openxc.pb.c | 11 +- gen/cpp/openxc.pb.h | 26 +- gen/java/com/openxc/BinaryMessages.java | 413 ++++++++------------------------ gen/python/openxc_pb2.py | 65 +---- openxc.proto | 10 +- 6 files changed, 131 insertions(+), 415 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 88993ab5..a4716cee 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -€ +÷ openxc.protoopenxc"ˆ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -99,19 +99,10 @@ message_id (  STRING NUM -BOOL"ï - SimpleMessage( -type (2.openxc.SimpleMessage.Type -name ( # -value ( 2.openxc.DynamicField# -event ( 2.openxc.DynamicField"\ -Type - -STRING -NUM -BOOL -EVENTED_STRING - EVENTED_NUM - EVENTED_BOOLB +BOOL"g + SimpleMessage +name ( # +value ( 2.openxc.DynamicField# +event ( 2.openxc.DynamicFieldB com.openxcBBinaryMessages \ No newline at end of file diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index b9d6d955..ccde431b 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 Mon Oct 6 23:12:27 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:25:12 2014. */ #include "openxc.pb.h" @@ -105,11 +105,10 @@ const pb_field_t openxc_DynamicField_fields[5] = { PB_LAST_FIELD }; -const pb_field_t openxc_SimpleMessage_fields[5] = { - PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_SimpleMessage, type, type, 0), - PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, openxc_SimpleMessage, name, type, 0), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, value, name, &openxc_DynamicField_fields), - PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, event, value, &openxc_DynamicField_fields), +const pb_field_t openxc_SimpleMessage_fields[4] = { + PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, openxc_SimpleMessage, name, name, 0), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, value, name, &openxc_DynamicField_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, event, value, &openxc_DynamicField_fields), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 38107b33..5b36bd4a 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 Mon Oct 6 23:12:27 2014. */ +/* Generated by nanopb-0.3.1 at Mon Oct 6 23:25:12 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -58,15 +58,6 @@ typedef enum _openxc_DynamicField_Type { openxc_DynamicField_Type_BOOL = 3 } openxc_DynamicField_Type; -typedef enum _openxc_SimpleMessage_Type { - openxc_SimpleMessage_Type_STRING = 1, - openxc_SimpleMessage_Type_NUM = 2, - openxc_SimpleMessage_Type_BOOL = 3, - openxc_SimpleMessage_Type_EVENTED_STRING = 4, - openxc_SimpleMessage_Type_EVENTED_NUM = 5, - openxc_SimpleMessage_Type_EVENTED_BOOL = 6 -} openxc_SimpleMessage_Type; - /* Struct definitions */ typedef struct _openxc_AcceptanceFilterBypassCommand { bool has_bus; @@ -174,8 +165,6 @@ typedef struct _openxc_DiagnosticControlCommand { } openxc_DiagnosticControlCommand; typedef struct _openxc_SimpleMessage { - bool has_type; - openxc_SimpleMessage_Type type; pb_callback_t name; bool has_value; openxc_DynamicField value; @@ -228,7 +217,7 @@ typedef struct _openxc_VehicleMessage { #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} #define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_SimpleMessage_init_default {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} +#define openxc_SimpleMessage_init_default {{{NULL}, NULL}, false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} #define openxc_CanMessage_init_zero {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_FrameFormat)0} #define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero} @@ -241,7 +230,7 @@ typedef struct _openxc_VehicleMessage { #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} #define openxc_DynamicField_init_zero {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_SimpleMessage_init_zero {false, (openxc_SimpleMessage_Type)0, {{NULL}, NULL}, false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} +#define openxc_SimpleMessage_init_zero {{{NULL}, NULL}, false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define openxc_AcceptanceFilterBypassCommand_bus_tag 1 @@ -280,10 +269,9 @@ typedef struct _openxc_VehicleMessage { #define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 -#define openxc_SimpleMessage_type_tag 1 -#define openxc_SimpleMessage_name_tag 2 -#define openxc_SimpleMessage_value_tag 3 -#define openxc_SimpleMessage_event_tag 4 +#define openxc_SimpleMessage_name_tag 1 +#define openxc_SimpleMessage_value_tag 2 +#define openxc_SimpleMessage_event_tag 3 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 @@ -310,7 +298,7 @@ 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]; extern const pb_field_t openxc_DynamicField_fields[5]; -extern const pb_field_t openxc_SimpleMessage_fields[5]; +extern const pb_field_t openxc_SimpleMessage_fields[4]; /* Maximum encoded size of messages (where known) */ #define openxc_ControlCommand_size 126 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index cb49929c..c495c7a6 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -9941,56 +9941,46 @@ public final class BinaryMessages { public interface SimpleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .openxc.SimpleMessage.Type type = 1; + // optional string name = 1; /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - boolean hasType(); - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - com.openxc.BinaryMessages.SimpleMessage.Type getType(); - - // optional string name = 2; - /** - * optional string name = 2; + * optional string name = 1; */ boolean hasName(); /** - * optional string name = 2; + * optional string name = 1; */ java.lang.String getName(); /** - * optional string name = 2; + * optional string name = 1; */ com.google.protobuf.ByteString getNameBytes(); - // optional .openxc.DynamicField value = 3; + // optional .openxc.DynamicField value = 2; /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ boolean hasValue(); /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ com.openxc.BinaryMessages.DynamicField getValue(); /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - // optional .openxc.DynamicField event = 4; + // optional .openxc.DynamicField event = 3; /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ boolean hasEvent(); /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ com.openxc.BinaryMessages.DynamicField getEvent(); /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } @@ -10045,25 +10035,14 @@ public final class BinaryMessages { } break; } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.SimpleMessage.Type value = com.openxc.BinaryMessages.SimpleMessage.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; + case 10: { + bitField0_ |= 0x00000001; name_ = input.readBytes(); break; } - case 26: { + case 18: { com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = value_.toBuilder(); } value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); @@ -10071,12 +10050,12 @@ public final class BinaryMessages { subBuilder.mergeFrom(value_); value_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; break; } - case 34: { + case 26: { com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = event_.toBuilder(); } event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); @@ -10084,7 +10063,7 @@ public final class BinaryMessages { subBuilder.mergeFrom(event_); event_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; break; } } @@ -10126,152 +10105,18 @@ public final class BinaryMessages { return PARSER; } - /** - * Protobuf enum {@code openxc.SimpleMessage.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - * STRING = 1; - */ - STRING(0, 1), - /** - * NUM = 2; - */ - NUM(1, 2), - /** - * BOOL = 3; - */ - BOOL(2, 3), - /** - * EVENTED_STRING = 4; - */ - EVENTED_STRING(3, 4), - /** - * EVENTED_NUM = 5; - */ - EVENTED_NUM(4, 5), - /** - * EVENTED_BOOL = 6; - */ - EVENTED_BOOL(5, 6), - ; - - /** - * STRING = 1; - */ - public static final int STRING_VALUE = 1; - /** - * NUM = 2; - */ - public static final int NUM_VALUE = 2; - /** - * BOOL = 3; - */ - public static final int BOOL_VALUE = 3; - /** - * EVENTED_STRING = 4; - */ - public static final int EVENTED_STRING_VALUE = 4; - /** - * EVENTED_NUM = 5; - */ - public static final int EVENTED_NUM_VALUE = 5; - /** - * EVENTED_BOOL = 6; - */ - public static final int EVENTED_BOOL_VALUE = 6; - - - public final int getNumber() { return value; } - - public static Type valueOf(int value) { - switch (value) { - case 1: return STRING; - case 2: return NUM; - case 3: return BOOL; - case 4: return EVENTED_STRING; - case 5: return EVENTED_NUM; - case 6: return EVENTED_BOOL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.openxc.BinaryMessages.SimpleMessage.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private Type(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:openxc.SimpleMessage.Type) - } - private int bitField0_; - // optional .openxc.SimpleMessage.Type type = 1; - public static final int TYPE_FIELD_NUMBER = 1; - private com.openxc.BinaryMessages.SimpleMessage.Type type_; - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public com.openxc.BinaryMessages.SimpleMessage.Type getType() { - return type_; - } - - // optional string name = 2; - public static final int NAME_FIELD_NUMBER = 2; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; /** - * optional string name = 2; + * optional string name = 1; */ public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string name = 2; + * optional string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -10288,7 +10133,7 @@ public final class BinaryMessages { } } /** - * optional string name = 2; + * optional string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { @@ -10304,52 +10149,51 @@ public final class BinaryMessages { } } - // optional .openxc.DynamicField value = 3; - public static final int VALUE_FIELD_NUMBER = 3; + // optional .openxc.DynamicField value = 2; + public static final int VALUE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DynamicField value_; /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public boolean hasValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicField getValue() { return value_; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { return value_; } - // optional .openxc.DynamicField event = 4; - public static final int EVENT_FIELD_NUMBER = 4; + // optional .openxc.DynamicField event = 3; + public static final int EVENT_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.DynamicField event_; /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public boolean hasEvent() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicField getEvent() { return event_; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { return event_; } private void initFields() { - type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; name_ = ""; value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -10367,16 +10211,13 @@ public final class BinaryMessages { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); + output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameBytes()); + output.writeMessage(2, value_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, value_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, event_); + output.writeMessage(3, event_); } getUnknownFields().writeTo(output); } @@ -10389,19 +10230,15 @@ public final class BinaryMessages { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); + .computeBytesSize(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); + .computeMessageSize(2, value_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, value_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, event_); + .computeMessageSize(3, event_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -10521,22 +10358,20 @@ public final class BinaryMessages { public Builder clear() { super.clear(); - type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; - bitField0_ = (bitField0_ & ~0x00000001); name_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); if (valueBuilder_ == null) { value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } else { valueBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); if (eventBuilder_ == null) { event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } else { eventBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -10568,21 +10403,17 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.type_ = type_; + result.name_ = name_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.name_ = name_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } if (valueBuilder_ == null) { result.value_ = value_; } else { result.value_ = valueBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; } if (eventBuilder_ == null) { result.event_ = event_; @@ -10605,11 +10436,8 @@ public final class BinaryMessages { public Builder mergeFrom(com.openxc.BinaryMessages.SimpleMessage other) { if (other == com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } if (other.hasName()) { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } @@ -10646,52 +10474,16 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.SimpleMessage.Type type = 1; - private com.openxc.BinaryMessages.SimpleMessage.Type type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public com.openxc.BinaryMessages.SimpleMessage.Type getType() { - return type_; - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public Builder setType(com.openxc.BinaryMessages.SimpleMessage.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - /** - * optional .openxc.SimpleMessage.Type type = 1; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.openxc.BinaryMessages.SimpleMessage.Type.STRING; - onChanged(); - return this; - } - - // optional string name = 2; + // optional string name = 1; private java.lang.Object name_ = ""; /** - * optional string name = 2; + * optional string name = 1; */ public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string name = 2; + * optional string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -10705,7 +10497,7 @@ public final class BinaryMessages { } } /** - * optional string name = 2; + * optional string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { @@ -10721,53 +10513,53 @@ public final class BinaryMessages { } } /** - * optional string name = 2; + * optional string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } /** - * optional string name = 2; + * optional string name = 1; */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * optional string name = 2; + * optional string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } - // optional .openxc.DynamicField value = 3; + // optional .openxc.DynamicField value = 2; private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_; /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public boolean hasValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicField getValue() { if (valueBuilder_ == null) { @@ -10777,7 +10569,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder setValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { @@ -10789,11 +10581,11 @@ public final class BinaryMessages { } else { valueBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder setValue( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { @@ -10803,15 +10595,15 @@ public final class BinaryMessages { } else { valueBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && + if (((bitField0_ & 0x00000002) == 0x00000002) && value_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) { value_ = com.openxc.BinaryMessages.DynamicField.newBuilder(value_).mergeFrom(value).buildPartial(); @@ -10822,11 +10614,11 @@ public final class BinaryMessages { } else { valueBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public Builder clearValue() { if (valueBuilder_ == null) { @@ -10835,19 +10627,19 @@ public final class BinaryMessages { } else { valueBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); return this; } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return getValueFieldBuilder().getBuilder(); } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { if (valueBuilder_ != null) { @@ -10857,7 +10649,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField value = 3; + * optional .openxc.DynamicField value = 2; */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> @@ -10873,18 +10665,18 @@ public final class BinaryMessages { return valueBuilder_; } - // optional .openxc.DynamicField event = 4; + // optional .openxc.DynamicField event = 3; private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_; /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public boolean hasEvent() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicField getEvent() { if (eventBuilder_ == null) { @@ -10894,7 +10686,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { @@ -10906,11 +10698,11 @@ public final class BinaryMessages { } else { eventBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder setEvent( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { @@ -10920,15 +10712,15 @@ public final class BinaryMessages { } else { eventBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && + if (((bitField0_ & 0x00000004) == 0x00000004) && event_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) { event_ = com.openxc.BinaryMessages.DynamicField.newBuilder(event_).mergeFrom(value).buildPartial(); @@ -10939,11 +10731,11 @@ public final class BinaryMessages { } else { eventBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public Builder clearEvent() { if (eventBuilder_ == null) { @@ -10952,19 +10744,19 @@ public final class BinaryMessages { } else { eventBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); return this; } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return getEventFieldBuilder().getBuilder(); } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { if (eventBuilder_ != null) { @@ -10974,7 +10766,7 @@ public final class BinaryMessages { } } /** - * optional .openxc.DynamicField event = 4; + * optional .openxc.DynamicField event = 3; */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> @@ -11132,13 +10924,10 @@ public final class BinaryMessages { "nxc.DynamicField.Type\022\024\n\014string_value\030\002 " + "\001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_va" + "lue\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010" + - "\n\004BOOL\020\003\"\357\001\n\rSimpleMessage\022(\n\004type\030\001 \001(\016" + - "2\032.openxc.SimpleMessage.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\004" + - "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" + - "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" + - "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages" + "\n\004BOOL\020\003\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022" + + "#\n\005value\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005" + + "event\030\003 \001(\0132\024.openxc.DynamicFieldB\034\n\ncom", + ".openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11222,7 +11011,7 @@ public final class BinaryMessages { internal_static_openxc_SimpleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_SimpleMessage_descriptor, - new java.lang.String[] { "Type", "Name", "Value", "Event", }); + new java.lang.String[] { "Name", "Value", "Event", }); return null; } }; diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 8b1ee796..4c5ff5c8 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\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x9c\x01\n\nCanMessage\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\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"\xef\x01\n\rSimpleMessage\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.openxc.SimpleMessage.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\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x9c\x01\n\nCanMessage\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\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -200,43 +200,6 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( serialized_end=2288, ) -_SIMPLEMESSAGE_TYPE = _descriptor.EnumDescriptor( - name='Type', - full_name='openxc.SimpleMessage.Type', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='STRING', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NUM', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BOOL', index=2, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_STRING', index=3, number=4, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_NUM', index=4, number=5, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTED_BOOL', index=5, number=6, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2438, - serialized_end=2530, -) - _VEHICLEMESSAGE = _descriptor.Descriptor( name='VehicleMessage', @@ -841,29 +804,22 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='type', full_name='openxc.SimpleMessage.type', 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, - options=None), - _descriptor.FieldDescriptor( - name='name', full_name='openxc.SimpleMessage.name', index=1, - number=2, type=9, cpp_type=9, label=1, + name='name', full_name='openxc.SimpleMessage.name', index=0, + number=1, 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, options=None), _descriptor.FieldDescriptor( - name='value', full_name='openxc.SimpleMessage.value', index=2, - number=3, type=11, cpp_type=10, label=1, + name='value', full_name='openxc.SimpleMessage.value', index=1, + number=2, 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), _descriptor.FieldDescriptor( - name='event', full_name='openxc.SimpleMessage.event', index=3, - number=4, type=11, cpp_type=10, label=1, + name='event', full_name='openxc.SimpleMessage.event', index=2, + number=3, 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, @@ -873,13 +829,12 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( ], nested_types=[], enum_types=[ - _SIMPLEMESSAGE_TYPE, ], options=None, is_extendable=False, extension_ranges=[], - serialized_start=2291, - serialized_end=2530, + serialized_start=2290, + serialized_end=2393, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -908,10 +863,8 @@ _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST _DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE _DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; -_SIMPLEMESSAGE.fields_by_name['type'].enum_type = _SIMPLEMESSAGE_TYPE _SIMPLEMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD _SIMPLEMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD -_SIMPLEMESSAGE_TYPE.containing_type = _SIMPLEMESSAGE; DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE DESCRIPTOR.message_types_by_name['CanMessage'] = _CANMESSAGE DESCRIPTOR.message_types_by_name['ControlCommand'] = _CONTROLCOMMAND diff --git a/openxc.proto b/openxc.proto index 3becaa5c..252f214b 100644 --- a/openxc.proto +++ b/openxc.proto @@ -120,13 +120,9 @@ message DynamicField { } message SimpleMessage { - enum Type { STRING = 1; NUM = 2; BOOL = 3; - EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;} - - optional Type type = 1; - optional string name = 2; - optional DynamicField value = 3; - optional DynamicField event = 4; + optional string name = 1; + optional DynamicField value = 2; + optional DynamicField event = 3; } // TODO we should also consider having an enum type, having each specific -- cgit 1.2.3-korg From ac419150640dcbc1afc4bc693b9e53fa4dd8fa8d Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 14 Oct 2014 14:03:14 -0400 Subject: Update protobuf options to use new field names. --- gen/cpp/openxc.pb.c | 6 +++--- gen/cpp/openxc.pb.h | 21 ++++++++++++++------- openxc.options | 4 ++-- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ccde431b..6017fec4 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 Mon Oct 6 23:25:12 2014. */ +/* Generated by nanopb-0.3.1 at Tue Oct 14 14:03:21 2014. */ #include "openxc.pb.h" @@ -22,7 +22,7 @@ const pb_field_t openxc_VehicleMessage_fields[7] = { const pb_field_t openxc_CanMessage_fields[5] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_CanMessage, bus, bus, 0), PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_CanMessage, message_id, bus, 0), - PB_FIELD( 3, BYTES , OPTIONAL, CALLBACK, OTHER, openxc_CanMessage, data, message_id, 0), + PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_CanMessage, data, message_id, 0), PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_CanMessage, frame_format, data, 0), PB_LAST_FIELD }; @@ -106,7 +106,7 @@ const pb_field_t openxc_DynamicField_fields[5] = { }; const pb_field_t openxc_SimpleMessage_fields[4] = { - PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, openxc_SimpleMessage, name, name, 0), + PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, openxc_SimpleMessage, name, name, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, value, name, &openxc_DynamicField_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_SimpleMessage, event, value, &openxc_DynamicField_fields), PB_LAST_FIELD diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 5b36bd4a..2e17a3de 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 Mon Oct 6 23:25:12 2014. */ +/* Generated by nanopb-0.3.1 at Tue Oct 14 14:03:21 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -66,12 +66,15 @@ typedef struct _openxc_AcceptanceFilterBypassCommand { bool bypass; } openxc_AcceptanceFilterBypassCommand; +typedef PB_BYTES_ARRAY_T(8) openxc_CanMessage_data_t; + typedef struct _openxc_CanMessage { bool has_bus; int32_t bus; bool has_message_id; uint32_t message_id; - pb_callback_t data; + bool has_data; + openxc_CanMessage_data_t data; bool has_frame_format; openxc_CanMessage_FrameFormat frame_format; } openxc_CanMessage; @@ -165,7 +168,8 @@ typedef struct _openxc_DiagnosticControlCommand { } openxc_DiagnosticControlCommand; typedef struct _openxc_SimpleMessage { - pb_callback_t name; + bool has_name; + char name[100]; bool has_value; openxc_DynamicField value; bool has_event; @@ -206,7 +210,7 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_default, false, openxc_SimpleMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} -#define openxc_CanMessage_init_default {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_FrameFormat)0} +#define openxc_CanMessage_init_default {false, 0, false, 0, false, {0, {0}}, false, (openxc_CanMessage_FrameFormat)0} #define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default} #define openxc_DiagnosticControlCommand_init_default {false, openxc_DiagnosticRequest_init_default, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_default {false, 0, false, 0} @@ -217,9 +221,9 @@ typedef struct _openxc_VehicleMessage { #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} #define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_SimpleMessage_init_default {{{NULL}, NULL}, false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} +#define openxc_SimpleMessage_init_default {false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} -#define openxc_CanMessage_init_zero {false, 0, false, 0, {{NULL}, NULL}, false, (openxc_CanMessage_FrameFormat)0} +#define openxc_CanMessage_init_zero {false, 0, false, 0, false, {0, {0}}, false, (openxc_CanMessage_FrameFormat)0} #define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero} #define openxc_DiagnosticControlCommand_init_zero {false, openxc_DiagnosticRequest_init_zero, false, (openxc_DiagnosticControlCommand_Action)0} #define openxc_PassthroughModeControlCommand_init_zero {false, 0, false, 0} @@ -230,7 +234,7 @@ typedef struct _openxc_VehicleMessage { #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} #define openxc_DynamicField_init_zero {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} -#define openxc_SimpleMessage_init_zero {{{NULL}, NULL}, false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} +#define openxc_SimpleMessage_init_zero {false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define openxc_AcceptanceFilterBypassCommand_bus_tag 1 @@ -301,6 +305,8 @@ extern const pb_field_t openxc_DynamicField_fields[5]; extern const pb_field_t openxc_SimpleMessage_fields[4]; /* Maximum encoded size of messages (where known) */ +#define openxc_VehicleMessage_size 716 +#define openxc_CanMessage_size 33 #define openxc_ControlCommand_size 126 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 @@ -311,6 +317,7 @@ extern const pb_field_t openxc_SimpleMessage_fields[4]; #define openxc_DiagnosticRequest_size 68 #define openxc_DiagnosticResponse_size 56 #define openxc_DynamicField_size 119 +#define openxc_SimpleMessage_size 344 #ifdef __cplusplus } /* extern "C" */ diff --git a/openxc.options b/openxc.options index 80d0f9b0..5a018795 100644 --- a/openxc.options +++ b/openxc.options @@ -1,7 +1,7 @@ -openxc.TranslatedMessage.name max_size:100 +openxc.SimpleMessage.name max_size:100 openxc.DynamicField.string_value max_size:100 openxc.CommandResponse.message max_size:128 openxc.DiagnosticResponse.payload max_size:8 openxc.DiagnosticRequest.name max_size:10 openxc.DiagnosticRequest.payload max_size:8 -openxc.RawMessage.data max_size:8 +openxc.CanMessage.data max_size:8 -- cgit 1.2.3-korg From 585f075459597ce481d75bafba7ea1fbe2ab2256 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 28 Oct 2014 22:36:07 -0400 Subject: Specify the response when no device ID is known. --- JSON.mkd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/JSON.mkd b/JSON.mkd index e07d0600..298117b7 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -271,6 +271,8 @@ response into the outgoing data stream. The `device_id` command triggers the VI to inject a unique device ID (e.g. the MAC address of an included Bluetooth module) into into the outgoing data stream. +If no device ID is available, the response message will be "Unknown". + **Request** { "command": "device_id"} -- cgit 1.2.3-korg From b8f82bd6b22237928d16cfb5e97a9bcf30919698 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Thu, 6 Nov 2014 23:04:07 -0500 Subject: Update changelog. --- CHANGELOG.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed22556c..78db26e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,28 @@ ## v0.4-dev -* Removed factor and offset from diagnostic requests to minimize the number of +* BREAKING: Removed factor and offset from diagnostic requests to minimize the number of fields, and since this is such an uncommon use case and one that can be handled by the client receiving the data. We may add them back in the future. -* Add `extras` field to JSON messages. -* Expand range of mode field to a full byte (#10) +* BREAKING: Require an 'action' to diagnostic request commands, e.g. cancel or add. +* BREAKING: Rename "raw" messages to the more precise "CAN messages". +* BREAKING: Rename "translated" messages to "simple messages". +* BREAKING: Rename CAN message ID field from just `id` to `message_id` to be + standard across all other types +* BREAKING: Remove redundant `type` field from simple messages (formerly + translated messages). The type can be inferred implicitly through the types of + the value and event fields. +* Feature: Add a command for controlling CAN message passthrough. +* Feature: Add a command for controlling CAN controller acceptance filter bypass. +* Feature: Add a command to change the payload format. +* Feature: Add a command to control whether pre-defined, recurring OBD-II + requests are enabled. +* Improvement: Add `extras` field to JSON messages. +* Improvement: Add an optional 'status' field to all command responses. +* Improvement: Build protobuf generated files with nanopb v0.3.1. +* Improvement: Allow explicitly setting CAN message frame format (i.e. standard + or extended frame). +* Fix: Expand range of mode field to a full byte (#10) ## v0.3 -- cgit 1.2.3-korg From 75bc6db24e48f4b577f68a4e27cace82ff8e442c Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 7 Nov 2014 08:57:03 -0500 Subject: Back off change to CAN message ID for backwards compatibility. I don't think this change is worth breaking compatibility with exiting trace files. The meaning of an ID is much more clean when inside a CAN message object, so that's why I think it make sense to be different than the "id" inside a diagnostic request. --- CHANGELOG.md | 2 - JSON.mkd | 4 +- gen/cpp/openxc.pb | 8 +- gen/cpp/openxc.pb.c | 6 +- gen/cpp/openxc.pb.h | 8 +- gen/java/com/openxc/BinaryMessages.java | 821 ++++++++++++++------------------ gen/python/openxc_pb2.py | 261 ++++++---- openxc.proto | 2 +- 8 files changed, 539 insertions(+), 573 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78db26e0..550b5b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,6 @@ * BREAKING: Require an 'action' to diagnostic request commands, e.g. cancel or add. * BREAKING: Rename "raw" messages to the more precise "CAN messages". * BREAKING: Rename "translated" messages to "simple messages". -* BREAKING: Rename CAN message ID field from just `id` to `message_id` to be - standard across all other types * BREAKING: Remove redundant `type` field from simple messages (formerly translated messages). The type can be inferred implicitly through the types of the value and event fields. diff --git a/JSON.mkd b/JSON.mkd index 298117b7..069f74b4 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -39,12 +39,12 @@ discrete pieces of information in the measurement. The format for a plain CAN message: - {"bus": 1, "message_id": 1234, "data": "0x12345678"} + {"bus": 1, "id": 1234, "data": "0x12345678"} **bus** - the numerical identifier of the CAN bus where this message originated, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers). -**message_id** - the CAN message ID +**id** - the CAN message ID **data** - up to 8 bytes of data from the CAN message's payload, represented as a hexidecimal number in a string. Many JSON parser cannot handle 64-bit diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index a4716cee..3fc2f805 100644 --- a/gen/cpp/openxc.pb +++ b/gen/cpp/openxc.pb @@ -1,5 +1,5 @@ -÷ +ï openxc.protoopenxc"ˆ VehicleMessage) type (2.openxc.VehicleMessage.Type' @@ -15,12 +15,12 @@ DIAGNOSTIC CONTROL_COMMAND -COMMAND_RESPONSE"œ +COMMAND_RESPONSE"” CanMessage -bus ( +bus ( -message_id (  +id (  data ( 4 frame_format (2.openxc.CanMessage.FrameFormat") FrameFormat diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 6017fec4..6fc70703 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 Tue Oct 14 14:03:21 2014. */ +/* Generated by nanopb-0.3.1 at Fri Nov 7 08:56:52 2014. */ #include "openxc.pb.h" @@ -21,8 +21,8 @@ const pb_field_t openxc_VehicleMessage_fields[7] = { const pb_field_t openxc_CanMessage_fields[5] = { PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, openxc_CanMessage, bus, bus, 0), - PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_CanMessage, message_id, bus, 0), - PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_CanMessage, data, message_id, 0), + PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_CanMessage, id, bus, 0), + PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, openxc_CanMessage, data, id, 0), PB_FIELD( 4, ENUM , OPTIONAL, STATIC , OTHER, openxc_CanMessage, frame_format, data, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 2e17a3de..a99a91fc 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 Tue Oct 14 14:03:21 2014. */ +/* Generated by nanopb-0.3.1 at Fri Nov 7 08:56:52 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -71,8 +71,8 @@ typedef PB_BYTES_ARRAY_T(8) openxc_CanMessage_data_t; typedef struct _openxc_CanMessage { bool has_bus; int32_t bus; - bool has_message_id; - uint32_t message_id; + bool has_id; + uint32_t id; bool has_data; openxc_CanMessage_data_t data; bool has_frame_format; @@ -240,7 +240,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_AcceptanceFilterBypassCommand_bus_tag 1 #define openxc_AcceptanceFilterBypassCommand_bypass_tag 2 #define openxc_CanMessage_bus_tag 1 -#define openxc_CanMessage_message_id_tag 2 +#define openxc_CanMessage_id_tag 2 #define openxc_CanMessage_data_tag 3 #define openxc_CanMessage_frame_format_tag 4 #define openxc_CommandResponse_type_tag 1 diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index c495c7a6..60dbfb8e 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -8,10 +8,10 @@ public final class BinaryMessages { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface VehicleMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface VehicleMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.VehicleMessage) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.VehicleMessage.Type type = 1; /** * optional .openxc.VehicleMessage.Type type = 1; */ @@ -21,7 +21,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.VehicleMessage.Type getType(); - // optional .openxc.CanMessage can_message = 2; /** * optional .openxc.CanMessage can_message = 2; */ @@ -35,7 +34,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder(); - // optional .openxc.SimpleMessage simple_message = 3; /** * optional .openxc.SimpleMessage simple_message = 3; */ @@ -49,7 +47,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder(); - // optional .openxc.DiagnosticResponse diagnostic_response = 4; /** * optional .openxc.DiagnosticResponse diagnostic_response = 4; */ @@ -63,7 +60,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); - // optional .openxc.ControlCommand control_command = 5; /** * optional .openxc.ControlCommand control_command = 5; */ @@ -77,7 +73,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder(); - // optional .openxc.CommandResponse command_response = 6; /** * optional .openxc.CommandResponse command_response = 6; */ @@ -95,8 +90,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.VehicleMessage} */ public static final class VehicleMessage extends - com.google.protobuf.GeneratedMessage - implements VehicleMessageOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.VehicleMessage) + VehicleMessageOrBuilder { // Use VehicleMessage.newBuilder() to construct. private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -367,7 +363,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.VehicleMessage.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_; /** @@ -383,7 +378,6 @@ public final class BinaryMessages { return type_; } - // optional .openxc.CanMessage can_message = 2; public static final int CAN_MESSAGE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.CanMessage canMessage_; /** @@ -405,7 +399,6 @@ public final class BinaryMessages { return canMessage_; } - // optional .openxc.SimpleMessage simple_message = 3; public static final int SIMPLE_MESSAGE_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_; /** @@ -427,7 +420,6 @@ public final class BinaryMessages { return simpleMessage_; } - // optional .openxc.DiagnosticResponse diagnostic_response = 4; public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_; /** @@ -449,7 +441,6 @@ 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_; /** @@ -471,7 +462,6 @@ public final class BinaryMessages { return controlCommand_; } - // optional .openxc.CommandResponse command_response = 6; public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_; /** @@ -504,7 +494,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -646,8 +637,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.VehicleMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.VehicleMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.VehicleMessage) + com.openxc.BinaryMessages.VehicleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; @@ -850,7 +842,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.VehicleMessage.Type type = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; /** * optional .openxc.VehicleMessage.Type type = 1; @@ -886,7 +877,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.CanMessage can_message = 2; private com.openxc.BinaryMessages.CanMessage canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> canMessageBuilder_; @@ -995,7 +985,7 @@ public final class BinaryMessages { if (canMessageBuilder_ == null) { canMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder>( - canMessage_, + getCanMessage(), getParentForChildren(), isClean()); canMessage_ = null; @@ -1003,7 +993,6 @@ public final class BinaryMessages { return canMessageBuilder_; } - // optional .openxc.SimpleMessage simple_message = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> simpleMessageBuilder_; @@ -1112,7 +1101,7 @@ public final class BinaryMessages { if (simpleMessageBuilder_ == null) { simpleMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder>( - simpleMessage_, + getSimpleMessage(), getParentForChildren(), isClean()); simpleMessage_ = null; @@ -1120,7 +1109,6 @@ public final class BinaryMessages { return simpleMessageBuilder_; } - // optional .openxc.DiagnosticResponse diagnostic_response = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_; @@ -1229,7 +1217,7 @@ public final class BinaryMessages { if (diagnosticResponseBuilder_ == null) { diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>( - diagnosticResponse_, + getDiagnosticResponse(), getParentForChildren(), isClean()); diagnosticResponse_ = null; @@ -1237,7 +1225,6 @@ 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_; @@ -1346,7 +1333,7 @@ public final class BinaryMessages { if (controlCommandBuilder_ == null) { controlCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder>( - controlCommand_, + getControlCommand(), getParentForChildren(), isClean()); controlCommand_ = null; @@ -1354,7 +1341,6 @@ public final class BinaryMessages { return controlCommandBuilder_; } - // optional .openxc.CommandResponse command_response = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_; @@ -1463,7 +1449,7 @@ public final class BinaryMessages { if (commandResponseBuilder_ == null) { commandResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder>( - commandResponse_, + getCommandResponse(), getParentForChildren(), isClean()); commandResponse_ = null; @@ -1482,10 +1468,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - public interface CanMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CanMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.CanMessage) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -1495,17 +1481,15 @@ public final class BinaryMessages { */ int getBus(); - // optional uint32 message_id = 2; /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - boolean hasMessageId(); + boolean hasId(); /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - int getMessageId(); + int getId(); - // optional bytes data = 3; /** * optional bytes data = 3; */ @@ -1515,7 +1499,6 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getData(); - // optional .openxc.CanMessage.FrameFormat frame_format = 4; /** * optional .openxc.CanMessage.FrameFormat frame_format = 4; */ @@ -1529,8 +1512,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CanMessage} */ public static final class CanMessage extends - com.google.protobuf.GeneratedMessage - implements CanMessageOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.CanMessage) + CanMessageOrBuilder { // Use CanMessage.newBuilder() to construct. private CanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -1583,7 +1567,7 @@ public final class BinaryMessages { } case 16: { bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); + id_ = input.readUInt32(); break; } case 26: { @@ -1724,7 +1708,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -1740,23 +1723,21 @@ public final class BinaryMessages { return bus_; } - // optional uint32 message_id = 2; - public static final int MESSAGE_ID_FIELD_NUMBER = 2; - private int messageId_; + public static final int ID_FIELD_NUMBER = 2; + private int id_; /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public boolean hasMessageId() { + public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public int getMessageId() { - return messageId_; + public int getId() { + return id_; } - // optional bytes data = 3; public static final int DATA_FIELD_NUMBER = 3; private com.google.protobuf.ByteString data_; /** @@ -1772,7 +1753,6 @@ public final class BinaryMessages { return data_; } - // optional .openxc.CanMessage.FrameFormat frame_format = 4; public static final int FRAME_FORMAT_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_; /** @@ -1790,14 +1770,15 @@ public final class BinaryMessages { private void initFields() { bus_ = 0; - messageId_ = 0; + id_ = 0; data_ = com.google.protobuf.ByteString.EMPTY; frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -1810,7 +1791,7 @@ public final class BinaryMessages { output.writeInt32(1, bus_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, messageId_); + output.writeUInt32(2, id_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, data_); @@ -1833,7 +1814,7 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, messageId_); + .computeUInt32Size(2, id_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream @@ -1925,8 +1906,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CanMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.CanMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.CanMessage) + com.openxc.BinaryMessages.CanMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; @@ -1961,7 +1943,7 @@ public final class BinaryMessages { super.clear(); bus_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - messageId_ = 0; + id_ = 0; bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); @@ -2002,7 +1984,7 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.messageId_ = messageId_; + result.id_ = id_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } @@ -2030,8 +2012,8 @@ public final class BinaryMessages { if (other.hasBus()) { setBus(other.getBus()); } - if (other.hasMessageId()) { - setMessageId(other.getMessageId()); + if (other.hasId()) { + setId(other.getId()); } if (other.hasData()) { setData(other.getData()); @@ -2066,7 +2048,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -2099,40 +2080,38 @@ public final class BinaryMessages { return this; } - // optional uint32 message_id = 2; - private int messageId_ ; + private int id_ ; /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public boolean hasMessageId() { + public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public int getMessageId() { - return messageId_; + public int getId() { + return id_; } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public Builder setMessageId(int value) { + public Builder setId(int value) { bitField0_ |= 0x00000002; - messageId_ = value; + id_ = value; onChanged(); return this; } /** - * optional uint32 message_id = 2; + * optional uint32 id = 2; */ - public Builder clearMessageId() { + public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000002); - messageId_ = 0; + id_ = 0; onChanged(); return this; } - // optional bytes data = 3; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes data = 3; @@ -2168,7 +2147,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.CanMessage.FrameFormat frame_format = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; /** * optional .openxc.CanMessage.FrameFormat frame_format = 4; @@ -2215,10 +2193,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.CanMessage) } - public interface ControlCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface ControlCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.ControlCommand) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.ControlCommand.Type type = 1; /** * optional .openxc.ControlCommand.Type type = 1; */ @@ -2228,7 +2206,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; /** * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; */ @@ -2242,7 +2219,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder(); - // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; /** * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; */ @@ -2256,7 +2232,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); - // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; /** * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; */ @@ -2270,7 +2245,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); - // optional .openxc.PayloadFormatCommand payload_format_command = 5; /** * optional .openxc.PayloadFormatCommand payload_format_command = 5; */ @@ -2284,7 +2258,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); - // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; /** * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; */ @@ -2302,8 +2275,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.ControlCommand} */ public static final class ControlCommand extends - com.google.protobuf.GeneratedMessage - implements ControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.ControlCommand) + ControlCommandOrBuilder { // Use ControlCommand.newBuilder() to construct. private ControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -2592,7 +2566,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; /** @@ -2608,7 +2581,6 @@ public final class BinaryMessages { return type_; } - // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_; /** @@ -2630,7 +2602,6 @@ public final class BinaryMessages { return diagnosticRequest_; } - // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; public static final int PASSTHROUGH_MODE_REQUEST_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_; /** @@ -2652,7 +2623,6 @@ public final class BinaryMessages { return passthroughModeRequest_; } - // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; public static final int ACCEPTANCE_FILTER_BYPASS_COMMAND_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_; /** @@ -2674,7 +2644,6 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } - // optional .openxc.PayloadFormatCommand payload_format_command = 5; public static final int PAYLOAD_FORMAT_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_; /** @@ -2696,7 +2665,6 @@ public final class BinaryMessages { return payloadFormatCommand_; } - // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; public static final int PREDEFINED_OBD2_REQUESTS_COMMAND_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_; /** @@ -2729,7 +2697,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -2871,8 +2840,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.ControlCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.ControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.ControlCommand) + com.openxc.BinaryMessages.ControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; @@ -3075,7 +3045,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; /** * optional .openxc.ControlCommand.Type type = 1; @@ -3111,7 +3080,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> diagnosticRequestBuilder_; @@ -3220,7 +3188,7 @@ public final class BinaryMessages { if (diagnosticRequestBuilder_ == null) { diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder>( - diagnosticRequest_, + getDiagnosticRequest(), getParentForChildren(), isClean()); diagnosticRequest_ = null; @@ -3228,7 +3196,6 @@ public final class BinaryMessages { return diagnosticRequestBuilder_; } - // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> passthroughModeRequestBuilder_; @@ -3337,7 +3304,7 @@ public final class BinaryMessages { if (passthroughModeRequestBuilder_ == null) { passthroughModeRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder>( - passthroughModeRequest_, + getPassthroughModeRequest(), getParentForChildren(), isClean()); passthroughModeRequest_ = null; @@ -3345,7 +3312,6 @@ public final class BinaryMessages { return passthroughModeRequestBuilder_; } - // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> acceptanceFilterBypassCommandBuilder_; @@ -3454,7 +3420,7 @@ public final class BinaryMessages { if (acceptanceFilterBypassCommandBuilder_ == null) { acceptanceFilterBypassCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder>( - acceptanceFilterBypassCommand_, + getAcceptanceFilterBypassCommand(), getParentForChildren(), isClean()); acceptanceFilterBypassCommand_ = null; @@ -3462,7 +3428,6 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_; } - // optional .openxc.PayloadFormatCommand payload_format_command = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> payloadFormatCommandBuilder_; @@ -3571,7 +3536,7 @@ public final class BinaryMessages { if (payloadFormatCommandBuilder_ == null) { payloadFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder>( - payloadFormatCommand_, + getPayloadFormatCommand(), getParentForChildren(), isClean()); payloadFormatCommand_ = null; @@ -3579,7 +3544,6 @@ public final class BinaryMessages { return payloadFormatCommandBuilder_; } - // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> predefinedObd2RequestsCommandBuilder_; @@ -3688,7 +3652,7 @@ public final class BinaryMessages { if (predefinedObd2RequestsCommandBuilder_ == null) { predefinedObd2RequestsCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder>( - predefinedObd2RequestsCommand_, + getPredefinedObd2RequestsCommand(), getParentForChildren(), isClean()); predefinedObd2RequestsCommand_ = null; @@ -3707,10 +3671,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.ControlCommand) } - public interface DiagnosticControlCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DiagnosticControlCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DiagnosticControlCommand) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.DiagnosticRequest request = 1; /** * optional .openxc.DiagnosticRequest request = 1; */ @@ -3724,7 +3688,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder(); - // optional .openxc.DiagnosticControlCommand.Action action = 2; /** * optional .openxc.DiagnosticControlCommand.Action action = 2; */ @@ -3738,8 +3701,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticControlCommand} */ public static final class DiagnosticControlCommand extends - com.google.protobuf.GeneratedMessage - implements DiagnosticControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DiagnosticControlCommand) + DiagnosticControlCommandOrBuilder { // Use DiagnosticControlCommand.newBuilder() to construct. private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -3931,7 +3895,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DiagnosticRequest request = 1; public static final int REQUEST_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_; /** @@ -3953,7 +3916,6 @@ public final class BinaryMessages { return request_; } - // optional .openxc.DiagnosticControlCommand.Action action = 2; public static final int ACTION_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_; /** @@ -3976,7 +3938,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -4090,8 +4053,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticControlCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DiagnosticControlCommand) + com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; @@ -4222,7 +4186,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DiagnosticRequest request = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; @@ -4331,7 +4294,7 @@ public final class BinaryMessages { if (requestBuilder_ == null) { requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - request_, + getRequest(), getParentForChildren(), isClean()); request_ = null; @@ -4339,7 +4302,6 @@ public final class BinaryMessages { return requestBuilder_; } - // optional .openxc.DiagnosticControlCommand.Action action = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; /** * optional .openxc.DiagnosticControlCommand.Action action = 2; @@ -4386,10 +4348,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) } - public interface PassthroughModeControlCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PassthroughModeControlCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.PassthroughModeControlCommand) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -4399,7 +4361,6 @@ public final class BinaryMessages { */ int getBus(); - // optional bool enabled = 2; /** * optional bool enabled = 2; */ @@ -4413,8 +4374,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PassthroughModeControlCommand} */ public static final class PassthroughModeControlCommand extends - com.google.protobuf.GeneratedMessage - implements PassthroughModeControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.PassthroughModeControlCommand) + PassthroughModeControlCommandOrBuilder { // Use PassthroughModeControlCommand.newBuilder() to construct. private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -4510,7 +4472,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -4526,7 +4487,6 @@ public final class BinaryMessages { return bus_; } - // optional bool enabled = 2; public static final int ENABLED_FIELD_NUMBER = 2; private boolean enabled_; /** @@ -4549,7 +4509,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -4663,8 +4624,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PassthroughModeControlCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.PassthroughModeControlCommand) + com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; @@ -4786,7 +4748,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -4819,7 +4780,6 @@ public final class BinaryMessages { return this; } - // optional bool enabled = 2; private boolean enabled_ ; /** * optional bool enabled = 2; @@ -4863,10 +4823,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } - public interface AcceptanceFilterBypassCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface AcceptanceFilterBypassCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.AcceptanceFilterBypassCommand) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -4876,7 +4836,6 @@ public final class BinaryMessages { */ int getBus(); - // optional bool bypass = 2; /** * optional bool bypass = 2; */ @@ -4890,8 +4849,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class AcceptanceFilterBypassCommand extends - com.google.protobuf.GeneratedMessage - implements AcceptanceFilterBypassCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.AcceptanceFilterBypassCommand) + AcceptanceFilterBypassCommandOrBuilder { // Use AcceptanceFilterBypassCommand.newBuilder() to construct. private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -4987,7 +4947,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -5003,7 +4962,6 @@ public final class BinaryMessages { return bus_; } - // optional bool bypass = 2; public static final int BYPASS_FIELD_NUMBER = 2; private boolean bypass_; /** @@ -5026,7 +4984,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -5140,8 +5099,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.AcceptanceFilterBypassCommand) + com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; @@ -5263,7 +5223,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -5296,7 +5255,6 @@ public final class BinaryMessages { return this; } - // optional bool bypass = 2; private boolean bypass_ ; /** * optional bool bypass = 2; @@ -5340,10 +5298,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - public interface PayloadFormatCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PayloadFormatCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.PayloadFormatCommand) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; /** * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; */ @@ -5357,8 +5315,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PayloadFormatCommand} */ public static final class PayloadFormatCommand extends - com.google.protobuf.GeneratedMessage - implements PayloadFormatCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.PayloadFormatCommand) + PayloadFormatCommandOrBuilder { // Use PayloadFormatCommand.newBuilder() to construct. private PayloadFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -5537,7 +5496,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; public static final int FORMAT_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_; /** @@ -5559,7 +5517,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -5666,8 +5625,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PayloadFormatCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.PayloadFormatCommand) + com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; @@ -5780,7 +5740,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; /** * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; @@ -5827,10 +5786,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } - public interface PredefinedObd2RequestsCommandOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PredefinedObd2RequestsCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.PredefinedObd2RequestsCommand) + com.google.protobuf.MessageOrBuilder { - // optional bool enabled = 1; /** * optional bool enabled = 1; */ @@ -5844,8 +5803,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} */ public static final class PredefinedObd2RequestsCommand extends - com.google.protobuf.GeneratedMessage - implements PredefinedObd2RequestsCommandOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.PredefinedObd2RequestsCommand) + PredefinedObd2RequestsCommandOrBuilder { // Use PredefinedObd2RequestsCommand.newBuilder() to construct. private PredefinedObd2RequestsCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -5936,7 +5896,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional bool enabled = 1; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_; /** @@ -5958,7 +5917,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -6065,8 +6025,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.PredefinedObd2RequestsCommand) + com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; @@ -6179,7 +6140,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional bool enabled = 1; private boolean enabled_ ; /** * optional bool enabled = 1; @@ -6223,10 +6183,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) } - public interface CommandResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CommandResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.CommandResponse) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.ControlCommand.Type type = 1; /** * optional .openxc.ControlCommand.Type type = 1; */ @@ -6236,7 +6196,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - // optional string message = 2; /** * optional string message = 2; */ @@ -6251,7 +6210,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getMessageBytes(); - // optional bool status = 3; /** * optional bool status = 3; */ @@ -6265,8 +6223,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CommandResponse} */ public static final class CommandResponse extends - com.google.protobuf.GeneratedMessage - implements CommandResponseOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.CommandResponse) + CommandResponseOrBuilder { // Use CommandResponse.newBuilder() to construct. private CommandResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -6324,8 +6283,9 @@ public final class BinaryMessages { break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - message_ = input.readBytes(); + message_ = bs; break; } case 24: { @@ -6373,7 +6333,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; /** @@ -6389,7 +6348,6 @@ public final class BinaryMessages { return type_; } - // optional string message = 2; public static final int MESSAGE_FIELD_NUMBER = 2; private java.lang.Object message_; /** @@ -6432,7 +6390,6 @@ public final class BinaryMessages { } } - // optional bool status = 3; public static final int STATUS_FIELD_NUMBER = 3; private boolean status_; /** @@ -6456,7 +6413,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -6577,8 +6535,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.CommandResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.CommandResponseOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.CommandResponse) + com.openxc.BinaryMessages.CommandResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; @@ -6711,7 +6670,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; /** * optional .openxc.ControlCommand.Type type = 1; @@ -6747,7 +6705,6 @@ public final class BinaryMessages { return this; } - // optional string message = 2; private java.lang.Object message_ = ""; /** * optional string message = 2; @@ -6761,9 +6718,12 @@ public final class BinaryMessages { public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - message_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + message_ = s; + } return s; } else { return (java.lang.String) ref; @@ -6821,7 +6781,6 @@ public final class BinaryMessages { return this; } - // optional bool status = 3; private boolean status_ ; /** * optional bool status = 3; @@ -6865,10 +6824,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.CommandResponse) } - public interface DiagnosticRequestOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DiagnosticRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DiagnosticRequest) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -6878,7 +6837,6 @@ public final class BinaryMessages { */ int getBus(); - // optional uint32 message_id = 2; /** * optional uint32 message_id = 2; */ @@ -6888,7 +6846,6 @@ public final class BinaryMessages { */ int getMessageId(); - // optional uint32 mode = 3; /** * optional uint32 mode = 3; */ @@ -6898,7 +6855,6 @@ public final class BinaryMessages { */ int getMode(); - // optional uint32 pid = 4; /** * optional uint32 pid = 4; */ @@ -6908,7 +6864,6 @@ public final class BinaryMessages { */ int getPid(); - // optional bytes payload = 5; /** * optional bytes payload = 5; * @@ -6928,7 +6883,6 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getPayload(); - // optional bool multiple_responses = 6; /** * optional bool multiple_responses = 6; */ @@ -6938,7 +6892,6 @@ public final class BinaryMessages { */ boolean getMultipleResponses(); - // optional double frequency = 7; /** * optional double frequency = 7; */ @@ -6948,7 +6901,6 @@ public final class BinaryMessages { */ double getFrequency(); - // optional string name = 8; /** * optional string name = 8; */ @@ -6963,7 +6915,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getNameBytes(); - // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; /** * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; */ @@ -6977,8 +6928,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticRequest} */ public static final class DiagnosticRequest extends - com.google.protobuf.GeneratedMessage - implements DiagnosticRequestOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DiagnosticRequest) + DiagnosticRequestOrBuilder { // Use DiagnosticRequest.newBuilder() to construct. private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -7060,8 +7012,9 @@ public final class BinaryMessages { break; } case 66: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - name_ = input.readBytes(); + name_ = bs; break; } case 72: { @@ -7197,7 +7150,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -7213,7 +7165,6 @@ public final class BinaryMessages { return bus_; } - // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; /** @@ -7229,7 +7180,6 @@ public final class BinaryMessages { return messageId_; } - // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; /** @@ -7245,7 +7195,6 @@ public final class BinaryMessages { return mode_; } - // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; /** @@ -7261,7 +7210,6 @@ public final class BinaryMessages { return pid_; } - // optional bytes payload = 5; public static final int PAYLOAD_FIELD_NUMBER = 5; private com.google.protobuf.ByteString payload_; /** @@ -7287,7 +7235,6 @@ public final class BinaryMessages { return payload_; } - // optional bool multiple_responses = 6; public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6; private boolean multipleResponses_; /** @@ -7303,7 +7250,6 @@ public final class BinaryMessages { return multipleResponses_; } - // optional double frequency = 7; public static final int FREQUENCY_FIELD_NUMBER = 7; private double frequency_; /** @@ -7319,7 +7265,6 @@ public final class BinaryMessages { return frequency_; } - // optional string name = 8; public static final int NAME_FIELD_NUMBER = 8; private java.lang.Object name_; /** @@ -7362,7 +7307,6 @@ public final class BinaryMessages { } } - // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; public static final int DECODED_TYPE_FIELD_NUMBER = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_; /** @@ -7392,7 +7336,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -7555,8 +7500,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DiagnosticRequest) + com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; @@ -7743,7 +7689,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -7776,7 +7721,6 @@ public final class BinaryMessages { return this; } - // optional uint32 message_id = 2; private int messageId_ ; /** * optional uint32 message_id = 2; @@ -7809,7 +7753,6 @@ public final class BinaryMessages { return this; } - // optional uint32 mode = 3; private int mode_ ; /** * optional uint32 mode = 3; @@ -7842,7 +7785,6 @@ public final class BinaryMessages { return this; } - // optional uint32 pid = 4; private int pid_ ; /** * optional uint32 pid = 4; @@ -7875,7 +7817,6 @@ public final class BinaryMessages { return this; } - // optional bytes payload = 5; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes payload = 5; @@ -7931,7 +7872,6 @@ public final class BinaryMessages { return this; } - // optional bool multiple_responses = 6; private boolean multipleResponses_ ; /** * optional bool multiple_responses = 6; @@ -7964,7 +7904,6 @@ public final class BinaryMessages { return this; } - // optional double frequency = 7; private double frequency_ ; /** * optional double frequency = 7; @@ -7997,7 +7936,6 @@ public final class BinaryMessages { return this; } - // optional string name = 8; private java.lang.Object name_ = ""; /** * optional string name = 8; @@ -8011,9 +7949,12 @@ public final class BinaryMessages { public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } return s; } else { return (java.lang.String) ref; @@ -8071,7 +8012,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; /** * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; @@ -8118,10 +8058,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) } - public interface DiagnosticResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DiagnosticResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DiagnosticResponse) + com.google.protobuf.MessageOrBuilder { - // optional int32 bus = 1; /** * optional int32 bus = 1; */ @@ -8131,7 +8071,6 @@ public final class BinaryMessages { */ int getBus(); - // optional uint32 message_id = 2; /** * optional uint32 message_id = 2; */ @@ -8141,7 +8080,6 @@ public final class BinaryMessages { */ int getMessageId(); - // optional uint32 mode = 3; /** * optional uint32 mode = 3; */ @@ -8151,7 +8089,6 @@ public final class BinaryMessages { */ int getMode(); - // optional uint32 pid = 4; /** * optional uint32 pid = 4; */ @@ -8161,7 +8098,6 @@ public final class BinaryMessages { */ int getPid(); - // optional bool success = 5; /** * optional bool success = 5; */ @@ -8171,7 +8107,6 @@ public final class BinaryMessages { */ boolean getSuccess(); - // optional uint32 negative_response_code = 6; /** * optional uint32 negative_response_code = 6; */ @@ -8181,7 +8116,6 @@ public final class BinaryMessages { */ int getNegativeResponseCode(); - // optional bytes payload = 7; /** * optional bytes payload = 7; * @@ -8201,7 +8135,6 @@ public final class BinaryMessages { */ com.google.protobuf.ByteString getPayload(); - // optional double value = 8; /** * optional double value = 8; */ @@ -8215,8 +8148,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticResponse} */ public static final class DiagnosticResponse extends - com.google.protobuf.GeneratedMessage - implements DiagnosticResponseOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DiagnosticResponse) + DiagnosticResponseOrBuilder { // Use DiagnosticResponse.newBuilder() to construct. private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -8342,7 +8276,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; /** @@ -8358,7 +8291,6 @@ public final class BinaryMessages { return bus_; } - // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; /** @@ -8374,7 +8306,6 @@ public final class BinaryMessages { return messageId_; } - // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; /** @@ -8390,7 +8321,6 @@ public final class BinaryMessages { return mode_; } - // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; /** @@ -8406,7 +8336,6 @@ public final class BinaryMessages { return pid_; } - // optional bool success = 5; public static final int SUCCESS_FIELD_NUMBER = 5; private boolean success_; /** @@ -8422,7 +8351,6 @@ public final class BinaryMessages { return success_; } - // optional uint32 negative_response_code = 6; public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6; private int negativeResponseCode_; /** @@ -8438,7 +8366,6 @@ public final class BinaryMessages { return negativeResponseCode_; } - // optional bytes payload = 7; public static final int PAYLOAD_FIELD_NUMBER = 7; private com.google.protobuf.ByteString payload_; /** @@ -8464,7 +8391,6 @@ public final class BinaryMessages { return payload_; } - // optional double value = 8; public static final int VALUE_FIELD_NUMBER = 8; private double value_; /** @@ -8493,7 +8419,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -8649,8 +8576,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DiagnosticResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DiagnosticResponse) + com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; @@ -8826,7 +8754,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional int32 bus = 1; private int bus_ ; /** * optional int32 bus = 1; @@ -8859,7 +8786,6 @@ public final class BinaryMessages { return this; } - // optional uint32 message_id = 2; private int messageId_ ; /** * optional uint32 message_id = 2; @@ -8892,7 +8818,6 @@ public final class BinaryMessages { return this; } - // optional uint32 mode = 3; private int mode_ ; /** * optional uint32 mode = 3; @@ -8925,7 +8850,6 @@ public final class BinaryMessages { return this; } - // optional uint32 pid = 4; private int pid_ ; /** * optional uint32 pid = 4; @@ -8958,7 +8882,6 @@ public final class BinaryMessages { return this; } - // optional bool success = 5; private boolean success_ ; /** * optional bool success = 5; @@ -8991,7 +8914,6 @@ public final class BinaryMessages { return this; } - // optional uint32 negative_response_code = 6; private int negativeResponseCode_ ; /** * optional uint32 negative_response_code = 6; @@ -9024,7 +8946,6 @@ public final class BinaryMessages { return this; } - // optional bytes payload = 7; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes payload = 7; @@ -9080,7 +9001,6 @@ public final class BinaryMessages { return this; } - // optional double value = 8; private double value_ ; /** * optional double value = 8; @@ -9124,10 +9044,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) } - public interface DynamicFieldOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DynamicFieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.DynamicField) + com.google.protobuf.MessageOrBuilder { - // optional .openxc.DynamicField.Type type = 1; /** * optional .openxc.DynamicField.Type type = 1; */ @@ -9137,7 +9057,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DynamicField.Type getType(); - // optional string string_value = 2; /** * optional string string_value = 2; */ @@ -9152,7 +9071,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getStringValueBytes(); - // optional double numeric_value = 3; /** * optional double numeric_value = 3; */ @@ -9162,7 +9080,6 @@ public final class BinaryMessages { */ double getNumericValue(); - // optional bool boolean_value = 4; /** * optional bool boolean_value = 4; */ @@ -9176,8 +9093,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DynamicField} */ public static final class DynamicField extends - com.google.protobuf.GeneratedMessage - implements DynamicFieldOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.DynamicField) + DynamicFieldOrBuilder { // Use DynamicField.newBuilder() to construct. private DynamicField(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -9235,8 +9153,9 @@ public final class BinaryMessages { break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - stringValue_ = input.readBytes(); + stringValue_ = bs; break; } case 25: { @@ -9380,7 +9299,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DynamicField.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DynamicField.Type type_; /** @@ -9396,7 +9314,6 @@ public final class BinaryMessages { return type_; } - // optional string string_value = 2; public static final int STRING_VALUE_FIELD_NUMBER = 2; private java.lang.Object stringValue_; /** @@ -9439,7 +9356,6 @@ public final class BinaryMessages { } } - // optional double numeric_value = 3; public static final int NUMERIC_VALUE_FIELD_NUMBER = 3; private double numericValue_; /** @@ -9455,7 +9371,6 @@ public final class BinaryMessages { return numericValue_; } - // optional bool boolean_value = 4; public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; private boolean booleanValue_; /** @@ -9480,7 +9395,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -9608,8 +9524,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.DynamicField} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.DynamicFieldOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.DynamicField) + com.openxc.BinaryMessages.DynamicFieldOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; @@ -9751,7 +9668,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional .openxc.DynamicField.Type type = 1; private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; /** * optional .openxc.DynamicField.Type type = 1; @@ -9787,7 +9703,6 @@ public final class BinaryMessages { return this; } - // optional string string_value = 2; private java.lang.Object stringValue_ = ""; /** * optional string string_value = 2; @@ -9801,9 +9716,12 @@ public final class BinaryMessages { public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - stringValue_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringValue_ = s; + } return s; } else { return (java.lang.String) ref; @@ -9861,7 +9779,6 @@ public final class BinaryMessages { return this; } - // optional double numeric_value = 3; private double numericValue_ ; /** * optional double numeric_value = 3; @@ -9894,7 +9811,6 @@ public final class BinaryMessages { return this; } - // optional bool boolean_value = 4; private boolean booleanValue_ ; /** * optional bool boolean_value = 4; @@ -9938,10 +9854,10 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.DynamicField) } - public interface SimpleMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface SimpleMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:openxc.SimpleMessage) + com.google.protobuf.MessageOrBuilder { - // optional string name = 1; /** * optional string name = 1; */ @@ -9956,7 +9872,6 @@ public final class BinaryMessages { com.google.protobuf.ByteString getNameBytes(); - // optional .openxc.DynamicField value = 2; /** * optional .openxc.DynamicField value = 2; */ @@ -9970,7 +9885,6 @@ public final class BinaryMessages { */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - // optional .openxc.DynamicField event = 3; /** * optional .openxc.DynamicField event = 3; */ @@ -9988,8 +9902,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.SimpleMessage} */ public static final class SimpleMessage extends - com.google.protobuf.GeneratedMessage - implements SimpleMessageOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:openxc.SimpleMessage) + SimpleMessageOrBuilder { // Use SimpleMessage.newBuilder() to construct. private SimpleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -10036,8 +9951,9 @@ public final class BinaryMessages { break; } case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - name_ = input.readBytes(); + name_ = bs; break; } case 18: { @@ -10106,7 +10022,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional string name = 1; public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; /** @@ -10149,7 +10064,6 @@ public final class BinaryMessages { } } - // optional .openxc.DynamicField value = 2; public static final int VALUE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DynamicField value_; /** @@ -10171,7 +10085,6 @@ public final class BinaryMessages { return value_; } - // optional .openxc.DynamicField event = 3; public static final int EVENT_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.DynamicField event_; /** @@ -10201,7 +10114,8 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -10322,8 +10236,9 @@ public final class BinaryMessages { * Protobuf type {@code openxc.SimpleMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.openxc.BinaryMessages.SimpleMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:openxc.SimpleMessage) + com.openxc.BinaryMessages.SimpleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; @@ -10474,7 +10389,6 @@ public final class BinaryMessages { } private int bitField0_; - // optional string name = 1; private java.lang.Object name_ = ""; /** * optional string name = 1; @@ -10488,9 +10402,12 @@ public final class BinaryMessages { public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } return s; } else { return (java.lang.String) ref; @@ -10548,7 +10465,6 @@ public final class BinaryMessages { return this; } - // optional .openxc.DynamicField value = 2; private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_; @@ -10657,7 +10573,7 @@ public final class BinaryMessages { if (valueBuilder_ == null) { valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( - value_, + getValue(), getParentForChildren(), isClean()); value_ = null; @@ -10665,7 +10581,6 @@ public final class BinaryMessages { return valueBuilder_; } - // optional .openxc.DynamicField event = 3; private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_; @@ -10774,7 +10689,7 @@ public final class BinaryMessages { if (eventBuilder_ == null) { eventBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( - event_, + getEvent(), getParentForChildren(), isClean()); event_ = null; @@ -10793,67 +10708,67 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.SimpleMessage) } - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_VehicleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_VehicleMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CanMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_CanMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_ControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_ControlCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PassthroughModeControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PayloadFormatCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_CommandResponse_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticRequest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticResponse_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DynamicField_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DynamicField_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_openxc_SimpleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -10877,148 +10792,148 @@ public final class BinaryMessages { "\n\020command_response\030\006 \001(\0132\027.openxc.Comman" + "dResponse\"V\n\004Type\022\007\n\003CAN\020\001\022\n\n\006SIMPLE\020\002\022\016" + "\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_COMMAND\020\004\022\024\n\020C", - "OMMAND_RESPONSE\020\005\"\234\001\n\nCanMessage\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\022" + - "4\n\014frame_format\030\004 \001(\0162\036.openxc.CanMessag" + - "e.FrameFormat\")\n\013FrameFormat\022\014\n\010STANDARD" + - "\020\001\022\014\n\010EXTENDED\020\002\"\270\004\n\016ControlCommand\022)\n\004t" + - "ype\030\001 \001(\0162\033.openxc.ControlCommand.Type\022<" + - "\n\022diagnostic_request\030\002 \001(\0132 .openxc.Diag" + - "nosticControlCommand\022G\n\030passthrough_mode" + - "_request\030\003 \001(\0132%.openxc.PassthroughModeC" + - "ontrolCommand\022O\n acceptance_filter_bypas", - "s_command\030\004 \001(\0132%.openxc.AcceptanceFilte" + - "rBypassCommand\022<\n\026payload_format_command" + - "\030\005 \001(\0132\034.openxc.PayloadFormatCommand\022O\n " + - "predefined_obd2_requests_command\030\006 \001(\0132%" + - ".openxc.PredefinedObd2RequestsCommand\"\223\001" + - "\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDI" + - "AGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANC" + - "E_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n" + - "\030PREDEFINED_OBD2_REQUESTS\020\007\"\236\001\n\030Diagnost" + - "icControlCommand\022*\n\007request\030\001 \001(\0132\031.open", - "xc.DiagnosticRequest\0227\n\006action\030\002 \001(\0162\'.o" + - "penxc.DiagnosticControlCommand.Action\"\035\n" + - "\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035Passthro" + - "ughModeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007en" + - "abled\030\002 \001(\010\"<\n\035AcceptanceFilterBypassCom" + - "mand\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024Pay" + - "loadFormatCommand\022:\n\006format\030\001 \001(\0162*.open" + - "xc.PayloadFormatCommand.PayloadFormat\"\'\n" + - "\rPayloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0" + - "\n\035PredefinedObd2RequestsCommand\022\017\n\007enabl", - "ed\030\001 \001(\010\"]\n\017CommandResponse\022)\n\004type\030\001 \001(" + - "\0162\033.openxc.ControlCommand.Type\022\017\n\007messag" + - "e\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021DiagnosticRe" + - "quest\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\tfreque" + - "ncy\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030" + - "\t \001(\0162%.openxc.DiagnosticRequest.Decoded" + - "Type\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"" + - "\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\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\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.ope" + - "nxc.DynamicField.Type\022\024\n\014string_value\030\002 " + - "\001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_va" + - "lue\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010" + - "\n\004BOOL\020\003\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022" + - "#\n\005value\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005" + - "event\030\003 \001(\0132\024.openxc.DynamicFieldB\034\n\ncom", - ".openxcB\016BinaryMessages" + "OMMAND_RESPONSE\020\005\"\224\001\n\nCanMessage\022\013\n\003bus\030" + + "\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\0224\n\014frame" + + "_format\030\004 \001(\0162\036.openxc.CanMessage.FrameF" + + "ormat\")\n\013FrameFormat\022\014\n\010STANDARD\020\001\022\014\n\010EX" + + "TENDED\020\002\"\270\004\n\016ControlCommand\022)\n\004type\030\001 \001(" + + "\0162\033.openxc.ControlCommand.Type\022<\n\022diagno" + + "stic_request\030\002 \001(\0132 .openxc.DiagnosticCo" + + "ntrolCommand\022G\n\030passthrough_mode_request" + + "\030\003 \001(\0132%.openxc.PassthroughModeControlCo" + + "mmand\022O\n acceptance_filter_bypass_comman", + "d\030\004 \001(\0132%.openxc.AcceptanceFilterBypassC" + + "ommand\022<\n\026payload_format_command\030\005 \001(\0132\034" + + ".openxc.PayloadFormatCommand\022O\n predefin" + + "ed_obd2_requests_command\030\006 \001(\0132%.openxc." + + "PredefinedObd2RequestsCommand\"\223\001\n\004Type\022\013" + + "\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC" + + "\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER" + + "_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFI" + + "NED_OBD2_REQUESTS\020\007\"\236\001\n\030DiagnosticContro" + + "lCommand\022*\n\007request\030\001 \001(\0132\031.openxc.Diagn", + "osticRequest\0227\n\006action\030\002 \001(\0162\'.openxc.Di" + + "agnosticControlCommand.Action\"\035\n\006Action\022" + + "\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughModeC" + + "ontrolCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 " + + "\001(\010\"<\n\035AcceptanceFilterBypassCommand\022\013\n\003" + + "bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadForm" + + "atCommand\022:\n\006format\030\001 \001(\0162*.openxc.Paylo" + + "adFormatCommand.PayloadFormat\"\'\n\rPayload" + + "Format\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035Predef" + + "inedObd2RequestsCommand\022\017\n\007enabled\030\001 \001(\010", + "\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.open" + + "xc.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" + + "\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\022mu" + + "ltiple_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%." + + "openxc.DiagnosticRequest.DecodedType\"!\n\013" + + "DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diag" + + "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i", + "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" + + "ccess\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\014" + + "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" + + "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" + + "umeric_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" + + "\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n\005value" + + "\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005event\030\003 " + + "\001(\0132\024.openxc.DynamicFieldB\034\n\ncom.openxcB", + "\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_openxc_VehicleMessage_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_openxc_VehicleMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_VehicleMessage_descriptor, - new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); - internal_static_openxc_CanMessage_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_openxc_CanMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_CanMessage_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Data", "FrameFormat", }); - internal_static_openxc_ControlCommand_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_openxc_ControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", }); - internal_static_openxc_DiagnosticControlCommand_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticControlCommand_descriptor, - new java.lang.String[] { "Request", "Action", }); - internal_static_openxc_PassthroughModeControlCommand_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PassthroughModeControlCommand_descriptor, - new java.lang.String[] { "Bus", "Enabled", }); - internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, - new java.lang.String[] { "Bus", "Bypass", }); - internal_static_openxc_PayloadFormatCommand_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PayloadFormatCommand_descriptor, - new java.lang.String[] { "Format", }); - internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, - new java.lang.String[] { "Enabled", }); - internal_static_openxc_CommandResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_openxc_CommandResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_CommandResponse_descriptor, - new java.lang.String[] { "Type", "Message", "Status", }); - internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); - internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticResponse_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); - internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_openxc_DynamicField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DynamicField_descriptor, - new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); - internal_static_openxc_SimpleMessage_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_openxc_SimpleMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_SimpleMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); + internal_static_openxc_VehicleMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_openxc_VehicleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_VehicleMessage_descriptor, + new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); + internal_static_openxc_CanMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_openxc_CanMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_CanMessage_descriptor, + new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }); + internal_static_openxc_ControlCommand_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_openxc_ControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_ControlCommand_descriptor, + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", }); + internal_static_openxc_DiagnosticControlCommand_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticControlCommand_descriptor, + new java.lang.String[] { "Request", "Action", }); + internal_static_openxc_PassthroughModeControlCommand_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PassthroughModeControlCommand_descriptor, + new java.lang.String[] { "Bus", "Enabled", }); + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, + new java.lang.String[] { "Bus", "Bypass", }); + internal_static_openxc_PayloadFormatCommand_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PayloadFormatCommand_descriptor, + new java.lang.String[] { "Format", }); + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, + new java.lang.String[] { "Enabled", }); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_openxc_CommandResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_CommandResponse_descriptor, + new java.lang.String[] { "Type", "Message", "Status", }); + internal_static_openxc_DiagnosticRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticRequest_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); + internal_static_openxc_DiagnosticResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticResponse_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); + internal_static_openxc_DynamicField_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_openxc_DynamicField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DynamicField_descriptor, + new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); + internal_static_openxc_SimpleMessage_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_openxc_SimpleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_SimpleMessage_descriptor, + new java.lang.String[] { "Name", "Value", "Event", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 4c5ff5c8..21ec4bd8 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -1,19 +1,26 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: openxc.proto +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) +_sym_db = _symbol_database.Default() + DESCRIPTOR = _descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x9c\x01\n\nCanMessage\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\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb=_b('\n\x0copenxc.proto\x12\x06openxc\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') +) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -49,6 +56,7 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( serialized_start=331, serialized_end=417, ) +_sym_db.RegisterEnumDescriptor(_VEHICLEMESSAGE_TYPE) _CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( name='FrameFormat', @@ -67,9 +75,10 @@ _CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=535, - serialized_end=576, + serialized_start=527, + serialized_end=568, ) +_sym_db.RegisterEnumDescriptor(_CANMESSAGE_FRAMEFORMAT) _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='Type', @@ -108,9 +117,10 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1000, - serialized_end=1147, + serialized_start=992, + serialized_end=1139, ) +_sym_db.RegisterEnumDescriptor(_CONTROLCOMMAND_TYPE) _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( name='Action', @@ -129,9 +139,10 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1279, - serialized_end=1308, + serialized_start=1271, + serialized_end=1300, ) +_sym_db.RegisterEnumDescriptor(_DIAGNOSTICCONTROLCOMMAND_ACTION) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( name='PayloadFormat', @@ -150,9 +161,10 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1519, - serialized_end=1558, + serialized_start=1511, + serialized_end=1550, ) +_sym_db.RegisterEnumDescriptor(_PAYLOADFORMATCOMMAND_PAYLOADFORMAT) _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( name='DecodedType', @@ -171,9 +183,10 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1926, - serialized_end=1959, + serialized_start=1918, + serialized_end=1951, ) +_sym_db.RegisterEnumDescriptor(_DIAGNOSTICREQUEST_DECODEDTYPE) _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( name='Type', @@ -196,9 +209,10 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2251, - serialized_end=2288, + serialized_start=2243, + serialized_end=2280, ) +_sym_db.RegisterEnumDescriptor(_DYNAMICFIELD_TYPE) _VEHICLEMESSAGE = _descriptor.Descriptor( @@ -260,6 +274,8 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], + oneofs=[ + ], serialized_start=25, serialized_end=417, ) @@ -280,7 +296,7 @@ _CANMESSAGE = _descriptor.Descriptor( is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='message_id', full_name='openxc.CanMessage.message_id', index=1, + name='id', full_name='openxc.CanMessage.id', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -289,7 +305,7 @@ _CANMESSAGE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='data', full_name='openxc.CanMessage.data', index=2, number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value="", + has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -310,8 +326,10 @@ _CANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], + oneofs=[ + ], serialized_start=420, - serialized_end=576, + serialized_end=568, ) @@ -374,8 +392,10 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=579, - serialized_end=1147, + oneofs=[ + ], + serialized_start=571, + serialized_end=1139, ) @@ -410,8 +430,10 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1150, - serialized_end=1308, + oneofs=[ + ], + serialized_start=1142, + serialized_end=1300, ) @@ -445,8 +467,10 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1310, - serialized_end=1371, + oneofs=[ + ], + serialized_start=1302, + serialized_end=1363, ) @@ -480,8 +504,10 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1373, - serialized_end=1433, + oneofs=[ + ], + serialized_start=1365, + serialized_end=1425, ) @@ -509,8 +535,10 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1435, - serialized_end=1558, + oneofs=[ + ], + serialized_start=1427, + serialized_end=1550, ) @@ -537,8 +565,10 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1560, - serialized_end=1608, + oneofs=[ + ], + serialized_start=1552, + serialized_end=1600, ) @@ -559,7 +589,7 @@ _COMMANDRESPONSE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='message', full_name='openxc.CommandResponse.message', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -579,8 +609,10 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1610, - serialized_end=1703, + oneofs=[ + ], + serialized_start=1602, + serialized_end=1695, ) @@ -622,7 +654,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticRequest.payload', index=4, number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value="", + has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -643,7 +675,7 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='name', full_name='openxc.DiagnosticRequest.name', index=7, number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -664,8 +696,10 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1706, - serialized_end=1959, + oneofs=[ + ], + serialized_start=1698, + serialized_end=1951, ) @@ -721,7 +755,7 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticResponse.payload', index=6, number=7, type=12, cpp_type=9, label=1, - has_default_value=False, default_value="", + has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -741,8 +775,10 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1962, - serialized_end=2123, + oneofs=[ + ], + serialized_start=1954, + serialized_end=2115, ) @@ -763,7 +799,7 @@ _DYNAMICFIELD = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='string_value', full_name='openxc.DynamicField.string_value', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -791,8 +827,10 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2126, - serialized_end=2288, + oneofs=[ + ], + serialized_start=2118, + serialized_end=2280, ) @@ -806,7 +844,7 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='name', full_name='openxc.SimpleMessage.name', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=unicode("", "utf-8"), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -833,8 +871,10 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2290, - serialized_end=2393, + oneofs=[ + ], + serialized_start=2282, + serialized_end=2385, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -843,26 +883,26 @@ _VEHICLEMESSAGE.fields_by_name['simple_message'].message_type = _SIMPLEMESSAGE _VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTICRESPONSE _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE -_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; +_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE _CANMESSAGE.fields_by_name['frame_format'].enum_type = _CANMESSAGE_FRAMEFORMAT -_CANMESSAGE_FRAMEFORMAT.containing_type = _CANMESSAGE; +_CANMESSAGE_FRAMEFORMAT.containing_type = _CANMESSAGE _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type = _ACCEPTANCEFILTERBYPASSCOMMAND _CONTROLCOMMAND.fields_by_name['payload_format_command'].message_type = _PAYLOADFORMATCOMMAND _CONTROLCOMMAND.fields_by_name['predefined_obd2_requests_command'].message_type = _PREDEFINEDOBD2REQUESTSCOMMAND -_CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; +_CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION -_DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND; +_DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND _PAYLOADFORMATCOMMAND.fields_by_name['format'].enum_type = _PAYLOADFORMATCOMMAND_PAYLOADFORMAT -_PAYLOADFORMATCOMMAND_PAYLOADFORMAT.containing_type = _PAYLOADFORMATCOMMAND; +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT.containing_type = _PAYLOADFORMATCOMMAND _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE -_DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; +_DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE -_DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; +_DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD _SIMPLEMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD _SIMPLEMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE @@ -879,85 +919,98 @@ DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['SimpleMessage'] = _SIMPLEMESSAGE -class VehicleMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _VEHICLEMESSAGE - +VehicleMessage = _reflection.GeneratedProtocolMessageType('VehicleMessage', (_message.Message,), dict( + DESCRIPTOR = _VEHICLEMESSAGE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) + )) +_sym_db.RegisterMessage(VehicleMessage) -class CanMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _CANMESSAGE - +CanMessage = _reflection.GeneratedProtocolMessageType('CanMessage', (_message.Message,), dict( + DESCRIPTOR = _CANMESSAGE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.CanMessage) + )) +_sym_db.RegisterMessage(CanMessage) -class ControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _CONTROLCOMMAND - +ControlCommand = _reflection.GeneratedProtocolMessageType('ControlCommand', (_message.Message,), dict( + DESCRIPTOR = _CONTROLCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.ControlCommand) + )) +_sym_db.RegisterMessage(ControlCommand) -class DiagnosticControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND - +DiagnosticControlCommand = _reflection.GeneratedProtocolMessageType('DiagnosticControlCommand', (_message.Message,), dict( + DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) + )) +_sym_db.RegisterMessage(DiagnosticControlCommand) -class PassthroughModeControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND - +PassthroughModeControlCommand = _reflection.GeneratedProtocolMessageType('PassthroughModeControlCommand', (_message.Message,), dict( + DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) + )) +_sym_db.RegisterMessage(PassthroughModeControlCommand) -class AcceptanceFilterBypassCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND - +AcceptanceFilterBypassCommand = _reflection.GeneratedProtocolMessageType('AcceptanceFilterBypassCommand', (_message.Message,), dict( + DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) + )) +_sym_db.RegisterMessage(AcceptanceFilterBypassCommand) -class PayloadFormatCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _PAYLOADFORMATCOMMAND - +PayloadFormatCommand = _reflection.GeneratedProtocolMessageType('PayloadFormatCommand', (_message.Message,), dict( + DESCRIPTOR = _PAYLOADFORMATCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) + )) +_sym_db.RegisterMessage(PayloadFormatCommand) -class PredefinedObd2RequestsCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND - +PredefinedObd2RequestsCommand = _reflection.GeneratedProtocolMessageType('PredefinedObd2RequestsCommand', (_message.Message,), dict( + DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) + )) +_sym_db.RegisterMessage(PredefinedObd2RequestsCommand) -class CommandResponse(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _COMMANDRESPONSE - +CommandResponse = _reflection.GeneratedProtocolMessageType('CommandResponse', (_message.Message,), dict( + DESCRIPTOR = _COMMANDRESPONSE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.CommandResponse) + )) +_sym_db.RegisterMessage(CommandResponse) -class DiagnosticRequest(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DIAGNOSTICREQUEST - +DiagnosticRequest = _reflection.GeneratedProtocolMessageType('DiagnosticRequest', (_message.Message,), dict( + DESCRIPTOR = _DIAGNOSTICREQUEST, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) + )) +_sym_db.RegisterMessage(DiagnosticRequest) -class DiagnosticResponse(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DIAGNOSTICRESPONSE - +DiagnosticResponse = _reflection.GeneratedProtocolMessageType('DiagnosticResponse', (_message.Message,), dict( + DESCRIPTOR = _DIAGNOSTICRESPONSE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) + )) +_sym_db.RegisterMessage(DiagnosticResponse) -class DynamicField(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _DYNAMICFIELD - +DynamicField = _reflection.GeneratedProtocolMessageType('DynamicField', (_message.Message,), dict( + DESCRIPTOR = _DYNAMICFIELD, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.DynamicField) + )) +_sym_db.RegisterMessage(DynamicField) -class SimpleMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - DESCRIPTOR = _SIMPLEMESSAGE - +SimpleMessage = _reflection.GeneratedProtocolMessageType('SimpleMessage', (_message.Message,), dict( + DESCRIPTOR = _SIMPLEMESSAGE, + __module__ = 'openxc_pb2' # @@protoc_insertion_point(class_scope:openxc.SimpleMessage) + )) +_sym_db.RegisterMessage(SimpleMessage) DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), '\n\ncom.openxcB\016BinaryMessages') +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\ncom.openxcB\016BinaryMessages')) # @@protoc_insertion_point(module_scope) diff --git a/openxc.proto b/openxc.proto index 252f214b..6bf15674 100644 --- a/openxc.proto +++ b/openxc.proto @@ -21,7 +21,7 @@ message CanMessage { EXTENDED = 2; } optional int32 bus = 1; - optional uint32 message_id = 2; + optional uint32 id = 2; optional bytes data = 3; optional FrameFormat frame_format = 4; } -- cgit 1.2.3-korg From 3a12d5a93e9430d8bd9ddbb214c9f95ff37fa3b6 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 15 Nov 2014 12:01:26 -0500 Subject: Bump to v0.4 for release. --- CHANGELOG.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 550b5b53..fd4505dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # OpenXC Message Format Changelog -## v0.4-dev +## v0.4 * BREAKING: Removed factor and offset from diagnostic requests to minimize the number of fields, and since this is such an uncommon use case and one that can be diff --git a/README.md b/README.md index 29baa3a3..b078bf0b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenXC Message Format Specification -Version: v0.4-dev +Version: v0.4 This specification is a part of the [OpenXC platform][OpenXC]. -- cgit 1.2.3-korg From be2e20347d928b92b1fdfe674d5d5c31bf60fbfd Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 15 Nov 2014 12:03:47 -0500 Subject: Bump to next development release. --- CHANGELOG.md | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd4505dc..981eaced 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # OpenXC Message Format Changelog +## v0.5.0-dev + ## v0.4 * BREAKING: Removed factor and offset from diagnostic requests to minimize the number of diff --git a/README.md b/README.md index b078bf0b..8700cdfe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenXC Message Format Specification -Version: v0.4 +Version: v0.5.0-dev This specification is a part of the [OpenXC platform][OpenXC]. -- cgit 1.2.3-korg From 3bb427338bc52b59921504727e77160b72242f3b Mon Sep 17 00:00:00 2001 From: mgiannikouris Date: Mon, 1 Dec 2014 23:02:22 -0500 Subject: added uptime field to VehicleMessage --- gen/cpp/openxc.pb | Bin 2418 -> 3304 bytes gen/cpp/openxc.pb.c | 43 +- gen/cpp/openxc.pb.h | 103 +- gen/java/com/openxc/BinaryMessages.java | 9840 ++++++++++++++++--------------- gen/python/openxc_pb2.py | 765 ++- openxc.options | 3 + openxc.proto | 39 + 7 files changed, 5920 insertions(+), 4873 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 3fc2f805..28afa0b9 100644 Binary files a/gen/cpp/openxc.pb and b/gen/cpp/openxc.pb differ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 6fc70703..ed4609db 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 Fri Nov 7 08:56:52 2014. */ +/* Generated by nanopb-0.3.1 at Tue Dec 2 03:06:57 2014. */ #include "openxc.pb.h" @@ -9,13 +9,14 @@ -const pb_field_t openxc_VehicleMessage_fields[7] = { +const pb_field_t openxc_VehicleMessage_fields[8] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_VehicleMessage, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, can_message, type, &openxc_CanMessage_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, simple_message, can_message, &openxc_SimpleMessage_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, simple_message, &openxc_DiagnosticResponse_fields), PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, control_command, diagnostic_response, &openxc_ControlCommand_fields), PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, command_response, control_command, &openxc_CommandResponse_fields), + PB_FIELD( 7, UINT32 , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, uptime, command_response, 0), PB_LAST_FIELD }; @@ -27,13 +28,14 @@ const pb_field_t openxc_CanMessage_fields[5] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[7] = { +const pb_field_t openxc_ControlCommand_fields[8] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, acceptance_filter_bypass_command, passthrough_mode_request, &openxc_AcceptanceFilterBypassCommand_fields), PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, payload_format_command, acceptance_filter_bypass_command, &openxc_PayloadFormatCommand_fields), PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, predefined_obd2_requests_command, payload_format_command, &openxc_PredefinedObd2RequestsCommand_fields), + PB_FIELD( 7, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, modem_configuration_command, predefined_obd2_requests_command, &openxc_ModemConfigurationCommand_fields), PB_LAST_FIELD }; @@ -65,6 +67,37 @@ const pb_field_t openxc_PredefinedObd2RequestsCommand_fields[2] = { PB_LAST_FIELD }; +const pb_field_t openxc_NetworkOperatorSettings_fields[4] = { + PB_FIELD( 1, BOOL , OPTIONAL, STATIC , FIRST, openxc_NetworkOperatorSettings, allowDataRoaming, allowDataRoaming, 0), + PB_FIELD( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_NetworkOperatorSettings, operatorSelectMode, allowDataRoaming, 0), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_NetworkOperatorSettings, networkDescriptor, operatorSelectMode, &openxc_NetworkOperatorSettings_NetworkDescriptor_fields), + PB_LAST_FIELD +}; + +const pb_field_t openxc_NetworkOperatorSettings_NetworkDescriptor_fields[3] = { + PB_FIELD( 1, UINT32 , OPTIONAL, STATIC , FIRST, openxc_NetworkOperatorSettings_NetworkDescriptor, PLMN, PLMN, 0), + PB_FIELD( 2, ENUM , OPTIONAL, STATIC , OTHER, openxc_NetworkOperatorSettings_NetworkDescriptor, networkType, PLMN, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_NetworkDataSettings_fields[2] = { + PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, openxc_NetworkDataSettings, APN, APN, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_ServerConnectSettings_fields[3] = { + PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, openxc_ServerConnectSettings, host, host, 0), + PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, openxc_ServerConnectSettings, port, host, 0), + PB_LAST_FIELD +}; + +const pb_field_t openxc_ModemConfigurationCommand_fields[4] = { + PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, openxc_ModemConfigurationCommand, networkOperatorSettings, networkOperatorSettings, &openxc_NetworkOperatorSettings_fields), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ModemConfigurationCommand, networkDataSettings, networkOperatorSettings, &openxc_NetworkDataSettings_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ModemConfigurationCommand, serverConnectSettings, networkDataSettings, &openxc_ServerConnectSettings_fields), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -122,7 +155,7 @@ const pb_field_t openxc_SimpleMessage_fields[4] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && pb_membersize(openxc_VehicleMessage, simple_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_SimpleMessage, value) < 65536 && pb_membersize(openxc_SimpleMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && pb_membersize(openxc_VehicleMessage, simple_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_ControlCommand, modem_configuration_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_NetworkOperatorSettings, networkDescriptor) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, networkOperatorSettings) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, networkDataSettings) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, serverConnectSettings) < 65536 && pb_membersize(openxc_SimpleMessage, value) < 65536 && pb_membersize(openxc_SimpleMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_NetworkOperatorSettings_openxc_NetworkOperatorSettings_NetworkDescriptor_openxc_NetworkDataSettings_openxc_ServerConnectSettings_openxc_ModemConfigurationCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -133,7 +166,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 256 && pb_membersize(openxc_VehicleMessage, simple_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_SimpleMessage, value) < 256 && pb_membersize(openxc_SimpleMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 256 && pb_membersize(openxc_VehicleMessage, simple_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_ControlCommand, modem_configuration_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_NetworkOperatorSettings, networkDescriptor) < 256 && pb_membersize(openxc_ModemConfigurationCommand, networkOperatorSettings) < 256 && pb_membersize(openxc_ModemConfigurationCommand, networkDataSettings) < 256 && pb_membersize(openxc_ModemConfigurationCommand, serverConnectSettings) < 256 && pb_membersize(openxc_SimpleMessage, value) < 256 && pb_membersize(openxc_SimpleMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_NetworkOperatorSettings_openxc_NetworkOperatorSettings_NetworkDescriptor_openxc_NetworkDataSettings_openxc_ServerConnectSettings_openxc_ModemConfigurationCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index a99a91fc..2975d4d9 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 Fri Nov 7 08:56:52 2014. */ +/* Generated by nanopb-0.3.1 at Tue Dec 2 03:06:57 2014. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -34,7 +34,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_PASSTHROUGH = 4, openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6, - openxc_ControlCommand_Type_PREDEFINED_OBD2_REQUESTS = 7 + openxc_ControlCommand_Type_PREDEFINED_OBD2_REQUESTS = 7, + openxc_ControlCommand_Type_MODEM_CONFIGURATION = 8 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -47,6 +48,19 @@ typedef enum _openxc_PayloadFormatCommand_PayloadFormat { openxc_PayloadFormatCommand_PayloadFormat_PROTOBUF = 2 } openxc_PayloadFormatCommand_PayloadFormat; +typedef enum _openxc_NetworkOperatorSettings_OperatorSelectMode { + openxc_NetworkOperatorSettings_OperatorSelectMode_AUTOMATIC = 0, + openxc_NetworkOperatorSettings_OperatorSelectMode_MANUAL = 1, + openxc_NetworkOperatorSettings_OperatorSelectMode_DEREGISTER = 2, + openxc_NetworkOperatorSettings_OperatorSelectMode_SET_ONLY = 3, + openxc_NetworkOperatorSettings_OperatorSelectMode_MANUAL_AUTOMATIC = 4 +} openxc_NetworkOperatorSettings_OperatorSelectMode; + +typedef enum _openxc_NetworkOperatorSettings_NetworkDescriptor_NetworkType { + openxc_NetworkOperatorSettings_NetworkDescriptor_NetworkType_GSM = 0, + openxc_NetworkOperatorSettings_NetworkDescriptor_NetworkType_UTRAN = 2 +} openxc_NetworkOperatorSettings_NetworkDescriptor_NetworkType; + typedef enum _openxc_DiagnosticRequest_DecodedType { openxc_DiagnosticRequest_DecodedType_NONE = 1, openxc_DiagnosticRequest_DecodedType_OBD2 = 2 @@ -59,6 +73,10 @@ typedef enum _openxc_DynamicField_Type { } openxc_DynamicField_Type; /* Struct definitions */ +typedef struct _openxc_NetworkDataSettings { + pb_callback_t APN; +} openxc_NetworkDataSettings; + typedef struct _openxc_AcceptanceFilterBypassCommand { bool has_bus; int32_t bus; @@ -143,6 +161,13 @@ typedef struct _openxc_DynamicField { bool boolean_value; } openxc_DynamicField; +typedef struct _openxc_NetworkOperatorSettings_NetworkDescriptor { + bool has_PLMN; + uint32_t PLMN; + bool has_networkType; + openxc_NetworkOperatorSettings_NetworkDescriptor_NetworkType networkType; +} openxc_NetworkOperatorSettings_NetworkDescriptor; + typedef struct _openxc_PassthroughModeControlCommand { bool has_bus; int32_t bus; @@ -160,6 +185,13 @@ typedef struct _openxc_PredefinedObd2RequestsCommand { bool enabled; } openxc_PredefinedObd2RequestsCommand; +typedef struct _openxc_ServerConnectSettings { + bool has_host; + char host[128]; + bool has_port; + uint32_t port; +} openxc_ServerConnectSettings; + typedef struct _openxc_DiagnosticControlCommand { bool has_request; openxc_DiagnosticRequest request; @@ -167,6 +199,15 @@ typedef struct _openxc_DiagnosticControlCommand { openxc_DiagnosticControlCommand_Action action; } openxc_DiagnosticControlCommand; +typedef struct _openxc_NetworkOperatorSettings { + bool has_allowDataRoaming; + bool allowDataRoaming; + bool has_operatorSelectMode; + openxc_NetworkOperatorSettings_OperatorSelectMode operatorSelectMode; + bool has_networkDescriptor; + openxc_NetworkOperatorSettings_NetworkDescriptor networkDescriptor; +} openxc_NetworkOperatorSettings; + typedef struct _openxc_SimpleMessage { bool has_name; char name[100]; @@ -176,6 +217,15 @@ typedef struct _openxc_SimpleMessage { openxc_DynamicField event; } openxc_SimpleMessage; +typedef struct _openxc_ModemConfigurationCommand { + bool has_networkOperatorSettings; + openxc_NetworkOperatorSettings networkOperatorSettings; + bool has_networkDataSettings; + openxc_NetworkDataSettings networkDataSettings; + bool has_serverConnectSettings; + openxc_ServerConnectSettings serverConnectSettings; +} openxc_ModemConfigurationCommand; + typedef struct _openxc_ControlCommand { bool has_type; openxc_ControlCommand_Type type; @@ -189,6 +239,8 @@ typedef struct _openxc_ControlCommand { openxc_PayloadFormatCommand payload_format_command; bool has_predefined_obd2_requests_command; openxc_PredefinedObd2RequestsCommand predefined_obd2_requests_command; + bool has_modem_configuration_command; + openxc_ModemConfigurationCommand modem_configuration_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -204,32 +256,44 @@ typedef struct _openxc_VehicleMessage { openxc_ControlCommand control_command; bool has_command_response; openxc_CommandResponse command_response; + bool has_uptime; + uint32_t uptime; } openxc_VehicleMessage; /* Default values for struct fields */ /* Initializer values for message structs */ -#define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_default, false, openxc_SimpleMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default} +#define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_default, false, openxc_SimpleMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default, false, 0} #define openxc_CanMessage_init_default {false, 0, false, 0, false, {0, {0}}, false, (openxc_CanMessage_FrameFormat)0} -#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default} +#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default, false, openxc_ModemConfigurationCommand_init_default} #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_PayloadFormatCommand_init_default {false, (openxc_PayloadFormatCommand_PayloadFormat)0} #define openxc_PredefinedObd2RequestsCommand_init_default {false, 0} +#define openxc_NetworkOperatorSettings_init_default {false, 0, false, (openxc_NetworkOperatorSettings_OperatorSelectMode)0, false, openxc_NetworkOperatorSettings_NetworkDescriptor_init_default} +#define openxc_NetworkOperatorSettings_NetworkDescriptor_init_default {false, 0, false, (openxc_NetworkOperatorSettings_NetworkDescriptor_NetworkType)0} +#define openxc_NetworkDataSettings_init_default {{{NULL}, NULL}} +#define openxc_ServerConnectSettings_init_default {false, "", false, 0} +#define openxc_ModemConfigurationCommand_init_default {false, openxc_NetworkOperatorSettings_init_default, false, openxc_NetworkDataSettings_init_default, false, openxc_ServerConnectSettings_init_default} #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} #define openxc_DynamicField_init_default {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0} #define openxc_SimpleMessage_init_default {false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} -#define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero} +#define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero, false, 0} #define openxc_CanMessage_init_zero {false, 0, false, 0, false, {0, {0}}, false, (openxc_CanMessage_FrameFormat)0} -#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero} +#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero, false, openxc_ModemConfigurationCommand_init_zero} #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_PayloadFormatCommand_init_zero {false, (openxc_PayloadFormatCommand_PayloadFormat)0} #define openxc_PredefinedObd2RequestsCommand_init_zero {false, 0} +#define openxc_NetworkOperatorSettings_init_zero {false, 0, false, (openxc_NetworkOperatorSettings_OperatorSelectMode)0, false, openxc_NetworkOperatorSettings_NetworkDescriptor_init_zero} +#define openxc_NetworkOperatorSettings_NetworkDescriptor_init_zero {false, 0, false, (openxc_NetworkOperatorSettings_NetworkDescriptor_NetworkType)0} +#define openxc_NetworkDataSettings_init_zero {{{NULL}, NULL}} +#define openxc_ServerConnectSettings_init_zero {false, "", false, 0} +#define openxc_ModemConfigurationCommand_init_zero {false, openxc_NetworkOperatorSettings_init_zero, false, openxc_NetworkDataSettings_init_zero, false, openxc_ServerConnectSettings_init_zero} #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} @@ -237,6 +301,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_SimpleMessage_init_zero {false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero} /* Field tags (for use in manual encoding/decoding) */ +#define openxc_NetworkDataSettings_APN_tag 1 #define openxc_AcceptanceFilterBypassCommand_bus_tag 1 #define openxc_AcceptanceFilterBypassCommand_bypass_tag 2 #define openxc_CanMessage_bus_tag 1 @@ -267,37 +332,54 @@ 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_NetworkOperatorSettings_NetworkDescriptor_PLMN_tag 1 +#define openxc_NetworkOperatorSettings_NetworkDescriptor_networkType_tag 2 #define openxc_PassthroughModeControlCommand_bus_tag 1 #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_PayloadFormatCommand_format_tag 1 #define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 +#define openxc_ServerConnectSettings_host_tag 1 +#define openxc_ServerConnectSettings_port_tag 2 #define openxc_DiagnosticControlCommand_request_tag 1 #define openxc_DiagnosticControlCommand_action_tag 2 +#define openxc_NetworkOperatorSettings_allowDataRoaming_tag 1 +#define openxc_NetworkOperatorSettings_operatorSelectMode_tag 2 +#define openxc_NetworkOperatorSettings_networkDescriptor_tag 3 #define openxc_SimpleMessage_name_tag 1 #define openxc_SimpleMessage_value_tag 2 #define openxc_SimpleMessage_event_tag 3 +#define openxc_ModemConfigurationCommand_networkOperatorSettings_tag 1 +#define openxc_ModemConfigurationCommand_networkDataSettings_tag 2 +#define openxc_ModemConfigurationCommand_serverConnectSettings_tag 3 #define openxc_ControlCommand_type_tag 1 #define openxc_ControlCommand_diagnostic_request_tag 2 #define openxc_ControlCommand_passthrough_mode_request_tag 3 #define openxc_ControlCommand_acceptance_filter_bypass_command_tag 4 #define openxc_ControlCommand_payload_format_command_tag 5 #define openxc_ControlCommand_predefined_obd2_requests_command_tag 6 +#define openxc_ControlCommand_modem_configuration_command_tag 7 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_can_message_tag 2 #define openxc_VehicleMessage_simple_message_tag 3 #define openxc_VehicleMessage_diagnostic_response_tag 4 #define openxc_VehicleMessage_control_command_tag 5 #define openxc_VehicleMessage_command_response_tag 6 +#define openxc_VehicleMessage_uptime_tag 7 /* Struct field encoding specification for nanopb */ -extern const pb_field_t openxc_VehicleMessage_fields[7]; +extern const pb_field_t openxc_VehicleMessage_fields[8]; extern const pb_field_t openxc_CanMessage_fields[5]; -extern const pb_field_t openxc_ControlCommand_fields[7]; +extern const pb_field_t openxc_ControlCommand_fields[8]; 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_PayloadFormatCommand_fields[2]; extern const pb_field_t openxc_PredefinedObd2RequestsCommand_fields[2]; +extern const pb_field_t openxc_NetworkOperatorSettings_fields[4]; +extern const pb_field_t openxc_NetworkOperatorSettings_NetworkDescriptor_fields[3]; +extern const pb_field_t openxc_NetworkDataSettings_fields[2]; +extern const pb_field_t openxc_ServerConnectSettings_fields[3]; +extern const pb_field_t openxc_ModemConfigurationCommand_fields[4]; 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]; @@ -305,14 +387,15 @@ extern const pb_field_t openxc_DynamicField_fields[5]; extern const pb_field_t openxc_SimpleMessage_fields[4]; /* Maximum encoded size of messages (where known) */ -#define openxc_VehicleMessage_size 716 #define openxc_CanMessage_size 33 -#define openxc_ControlCommand_size 126 #define openxc_DiagnosticControlCommand_size 76 #define openxc_PassthroughModeControlCommand_size 13 #define openxc_AcceptanceFilterBypassCommand_size 13 #define openxc_PayloadFormatCommand_size 6 #define openxc_PredefinedObd2RequestsCommand_size 2 +#define openxc_NetworkOperatorSettings_size 22 +#define openxc_NetworkOperatorSettings_NetworkDescriptor_size 12 +#define openxc_ServerConnectSettings_size 137 #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 60dbfb8e..ef02ba8f 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -8,302 +8,88 @@ public final class BinaryMessages { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface VehicleMessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.VehicleMessage) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ + public interface VehicleMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.VehicleMessage.Type type = 1; boolean hasType(); - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ com.openxc.BinaryMessages.VehicleMessage.Type getType(); - - /** - * optional .openxc.CanMessage can_message = 2; - */ + + // optional .openxc.CanMessage can_message = 2; boolean hasCanMessage(); - /** - * optional .openxc.CanMessage can_message = 2; - */ com.openxc.BinaryMessages.CanMessage getCanMessage(); - /** - * optional .openxc.CanMessage can_message = 2; - */ com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder(); - - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ + + // optional .openxc.SimpleMessage simple_message = 3; boolean hasSimpleMessage(); - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ com.openxc.BinaryMessages.SimpleMessage getSimpleMessage(); - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder(); - - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ + + // optional .openxc.DiagnosticResponse diagnostic_response = 4; boolean hasDiagnosticResponse(); - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse(); - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); - - /** - * optional .openxc.ControlCommand control_command = 5; - */ + + // optional .openxc.ControlCommand control_command = 5; boolean hasControlCommand(); - /** - * optional .openxc.ControlCommand control_command = 5; - */ com.openxc.BinaryMessages.ControlCommand getControlCommand(); - /** - * optional .openxc.ControlCommand control_command = 5; - */ com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder(); - - /** - * optional .openxc.CommandResponse command_response = 6; - */ + + // optional .openxc.CommandResponse command_response = 6; boolean hasCommandResponse(); - /** - * optional .openxc.CommandResponse command_response = 6; - */ com.openxc.BinaryMessages.CommandResponse getCommandResponse(); - /** - * optional .openxc.CommandResponse command_response = 6; - */ com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder(); + + // optional uint32 uptime = 7; + boolean hasUptime(); + int getUptime(); } - /** - * Protobuf type {@code openxc.VehicleMessage} - */ public static final class VehicleMessage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.VehicleMessage) - VehicleMessageOrBuilder { + com.google.protobuf.GeneratedMessage + implements VehicleMessageOrBuilder { // Use VehicleMessage.newBuilder() to construct. - private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + private VehicleMessage(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private VehicleMessage(boolean noInit) {} + private static final VehicleMessage defaultInstance; public static VehicleMessage getDefaultInstance() { return defaultInstance; } - + public VehicleMessage getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private VehicleMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.openxc.BinaryMessages.CanMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = canMessage_.toBuilder(); - } - canMessage_ = input.readMessage(com.openxc.BinaryMessages.CanMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(canMessage_); - canMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = simpleMessage_.toBuilder(); - } - simpleMessage_ = input.readMessage(com.openxc.BinaryMessages.SimpleMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(simpleMessage_); - simpleMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 34: { - com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = diagnosticResponse_.toBuilder(); - } - diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diagnosticResponse_); - diagnosticResponse_ = subBuilder.buildPartial(); - } - 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; - } - case 50: { - com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - subBuilder = commandResponse_.toBuilder(); - } - commandResponse_ = input.readMessage(com.openxc.BinaryMessages.CommandResponse.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(commandResponse_); - commandResponse_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public VehicleMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VehicleMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.VehicleMessage.Type} - */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * CAN = 1; - */ CAN(0, 1), - /** - * SIMPLE = 2; - */ SIMPLE(1, 2), - /** - * DIAGNOSTIC = 3; - */ DIAGNOSTIC(2, 3), - /** - * CONTROL_COMMAND = 4; - */ CONTROL_COMMAND(3, 4), - /** - * COMMAND_RESPONSE = 5; - */ COMMAND_RESPONSE(4, 5), ; - - /** - * CAN = 1; - */ + public static final int CAN_VALUE = 1; - /** - * SIMPLE = 2; - */ public static final int SIMPLE_VALUE = 2; - /** - * DIAGNOSTIC = 3; - */ public static final int DIAGNOSTIC_VALUE = 3; - /** - * CONTROL_COMMAND = 4; - */ public static final int CONTROL_COMMAND_VALUE = 4; - /** - * COMMAND_RESPONSE = 5; - */ public static final int COMMAND_RESPONSE_VALUE = 5; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return CAN; @@ -314,7 +100,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -326,7 +112,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -339,9 +125,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = values(); - + + private static final Type[] VALUES = { + CAN, SIMPLE, DIAGNOSTIC, CONTROL_COMMAND, COMMAND_RESPONSE, + }; + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -350,139 +138,104 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type) } - + private int bitField0_; + // optional .openxc.VehicleMessage.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public com.openxc.BinaryMessages.VehicleMessage.Type getType() { return type_; } - + + // optional .openxc.CanMessage can_message = 2; public static final int CAN_MESSAGE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.CanMessage canMessage_; - /** - * optional .openxc.CanMessage can_message = 2; - */ public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessage getCanMessage() { return canMessage_; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { return canMessage_; } - + + // optional .openxc.SimpleMessage simple_message = 3; public static final int SIMPLE_MESSAGE_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_; - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { return simpleMessage_; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { return simpleMessage_; } - + + // optional .openxc.DiagnosticResponse diagnostic_response = 4; public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_; - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { return diagnosticResponse_; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { return diagnosticResponse_; } - + + // optional .openxc.ControlCommand control_command = 5; public static final int CONTROL_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.ControlCommand controlCommand_; - /** - * optional .openxc.ControlCommand control_command = 5; - */ public boolean hasControlCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommand getControlCommand() { return controlCommand_; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { return controlCommand_; } - + + // optional .openxc.CommandResponse command_response = 6; public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_; - /** - * optional .openxc.CommandResponse command_response = 6; - */ public boolean hasCommandResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { return commandResponse_; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { return commandResponse_; } - + + // optional uint32 uptime = 7; + public static final int UPTIME_FIELD_NUMBER = 7; + private int uptime_; + public boolean hasUptime() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public int getUptime() { + return uptime_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); @@ -490,17 +243,17 @@ public final class BinaryMessages { diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); + uptime_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -522,14 +275,17 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeMessage(6, commandResponse_); } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeUInt32(7, uptime_); + } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -555,110 +311,121 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, commandResponse_); } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, uptime_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.VehicleMessage} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.VehicleMessage) - com.openxc.BinaryMessages.VehicleMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.VehicleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -674,7 +441,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; @@ -709,22 +476,24 @@ public final class BinaryMessages { commandResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); + uptime_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; + return com.openxc.BinaryMessages.VehicleMessage.getDescriptor(); } - + public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.VehicleMessage build() { com.openxc.BinaryMessages.VehicleMessage result = buildPartial(); if (!result.isInitialized()) { @@ -732,7 +501,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.VehicleMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.VehicleMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.VehicleMessage buildPartial() { com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this); int from_bitField0_ = bitField0_; @@ -781,11 +560,15 @@ public final class BinaryMessages { } else { result.commandResponse_ = commandResponseBuilder_.build(); } + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.uptime_ = uptime_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.VehicleMessage) { return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other); @@ -794,7 +577,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) { if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this; if (other.hasType()) { @@ -815,49 +598,115 @@ public final class BinaryMessages { if (other.hasCommandResponse()) { mergeCommandResponse(other.getCommandResponse()); } + if (other.hasUptime()) { + setUptime(other.getUptime()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.VehicleMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.CanMessage.Builder subBuilder = com.openxc.BinaryMessages.CanMessage.newBuilder(); + if (hasCanMessage()) { + subBuilder.mergeFrom(getCanMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setCanMessage(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = com.openxc.BinaryMessages.SimpleMessage.newBuilder(); + if (hasSimpleMessage()) { + subBuilder.mergeFrom(getSimpleMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setSimpleMessage(subBuilder.buildPartial()); + break; + } + case 34: { + com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(); + if (hasDiagnosticResponse()) { + subBuilder.mergeFrom(getDiagnosticResponse()); + } + input.readMessage(subBuilder, extensionRegistry); + setDiagnosticResponse(subBuilder.buildPartial()); + break; + } + case 42: { + com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = com.openxc.BinaryMessages.ControlCommand.newBuilder(); + if (hasControlCommand()) { + subBuilder.mergeFrom(getControlCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setControlCommand(subBuilder.buildPartial()); + break; + } + case 50: { + com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = com.openxc.BinaryMessages.CommandResponse.newBuilder(); + if (hasCommandResponse()) { + subBuilder.mergeFrom(getCommandResponse()); + } + input.readMessage(subBuilder, extensionRegistry); + setCommandResponse(subBuilder.buildPartial()); + break; + } + case 56: { + bitField0_ |= 0x00000040; + uptime_ = input.readUInt32(); + break; + } } } - return this; } + private int bitField0_; - + + // optional .openxc.VehicleMessage.Type type = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public com.openxc.BinaryMessages.VehicleMessage.Type getType() { return type_; } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) { if (value == null) { throw new NullPointerException(); @@ -867,28 +716,20 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; onChanged(); return this; } - + + // optional .openxc.CanMessage can_message = 2; private com.openxc.BinaryMessages.CanMessage canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> canMessageBuilder_; - /** - * optional .openxc.CanMessage can_message = 2; - */ public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessage getCanMessage() { if (canMessageBuilder_ == null) { return canMessage_; @@ -896,9 +737,6 @@ public final class BinaryMessages { return canMessageBuilder_.getMessage(); } } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder setCanMessage(com.openxc.BinaryMessages.CanMessage value) { if (canMessageBuilder_ == null) { if (value == null) { @@ -912,9 +750,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder setCanMessage( com.openxc.BinaryMessages.CanMessage.Builder builderForValue) { if (canMessageBuilder_ == null) { @@ -926,9 +761,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder mergeCanMessage(com.openxc.BinaryMessages.CanMessage value) { if (canMessageBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -945,9 +777,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder clearCanMessage() { if (canMessageBuilder_ == null) { canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); @@ -958,17 +787,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessage.Builder getCanMessageBuilder() { bitField0_ |= 0x00000002; onChanged(); return getCanMessageFieldBuilder().getBuilder(); } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { if (canMessageBuilder_ != null) { return canMessageBuilder_.getMessageOrBuilder(); @@ -976,35 +799,27 @@ public final class BinaryMessages { return canMessage_; } } - /** - * optional .openxc.CanMessage can_message = 2; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> getCanMessageFieldBuilder() { if (canMessageBuilder_ == null) { canMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder>( - getCanMessage(), + canMessage_, getParentForChildren(), isClean()); canMessage_ = null; } return canMessageBuilder_; } - + + // optional .openxc.SimpleMessage simple_message = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> simpleMessageBuilder_; - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { if (simpleMessageBuilder_ == null) { return simpleMessage_; @@ -1012,9 +827,6 @@ public final class BinaryMessages { return simpleMessageBuilder_.getMessage(); } } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder setSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { if (simpleMessageBuilder_ == null) { if (value == null) { @@ -1028,9 +840,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder setSimpleMessage( com.openxc.BinaryMessages.SimpleMessage.Builder builderForValue) { if (simpleMessageBuilder_ == null) { @@ -1042,9 +851,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder mergeSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { if (simpleMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -1061,9 +867,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder clearSimpleMessage() { if (simpleMessageBuilder_ == null) { simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); @@ -1074,17 +877,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessage.Builder getSimpleMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); return getSimpleMessageFieldBuilder().getBuilder(); } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { if (simpleMessageBuilder_ != null) { return simpleMessageBuilder_.getMessageOrBuilder(); @@ -1092,35 +889,27 @@ public final class BinaryMessages { return simpleMessage_; } } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> getSimpleMessageFieldBuilder() { if (simpleMessageBuilder_ == null) { simpleMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder>( - getSimpleMessage(), + simpleMessage_, getParentForChildren(), isClean()); simpleMessage_ = null; } return simpleMessageBuilder_; } - + + // optional .openxc.DiagnosticResponse diagnostic_response = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_; - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { if (diagnosticResponseBuilder_ == null) { return diagnosticResponse_; @@ -1128,9 +917,6 @@ public final class BinaryMessages { return diagnosticResponseBuilder_.getMessage(); } } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { if (diagnosticResponseBuilder_ == null) { if (value == null) { @@ -1144,9 +930,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder setDiagnosticResponse( com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) { if (diagnosticResponseBuilder_ == null) { @@ -1158,9 +941,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { if (diagnosticResponseBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && @@ -1177,9 +957,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder clearDiagnosticResponse() { if (diagnosticResponseBuilder_ == null) { diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); @@ -1190,17 +967,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() { bitField0_ |= 0x00000008; onChanged(); return getDiagnosticResponseFieldBuilder().getBuilder(); } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { if (diagnosticResponseBuilder_ != null) { return diagnosticResponseBuilder_.getMessageOrBuilder(); @@ -1208,35 +979,27 @@ public final class BinaryMessages { return diagnosticResponse_; } } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> getDiagnosticResponseFieldBuilder() { if (diagnosticResponseBuilder_ == null) { diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>( - getDiagnosticResponse(), + diagnosticResponse_, getParentForChildren(), isClean()); diagnosticResponse_ = null; } 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_; - /** - * optional .openxc.ControlCommand control_command = 5; - */ public boolean hasControlCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommand getControlCommand() { if (controlCommandBuilder_ == null) { return controlCommand_; @@ -1244,9 +1007,6 @@ public final class BinaryMessages { return controlCommandBuilder_.getMessage(); } } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) { if (controlCommandBuilder_ == null) { if (value == null) { @@ -1260,9 +1020,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder setControlCommand( com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) { if (controlCommandBuilder_ == null) { @@ -1274,9 +1031,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder mergeControlCommand(com.openxc.BinaryMessages.ControlCommand value) { if (controlCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && @@ -1293,9 +1047,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder clearControlCommand() { if (controlCommandBuilder_ == null) { controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); @@ -1306,17 +1057,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); return getControlCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { if (controlCommandBuilder_ != null) { return controlCommandBuilder_.getMessageOrBuilder(); @@ -1324,35 +1069,27 @@ public final class BinaryMessages { return controlCommand_; } } - /** - * optional .openxc.ControlCommand control_command = 5; - */ 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>( - getControlCommand(), + controlCommand_, getParentForChildren(), isClean()); controlCommand_ = null; } return controlCommandBuilder_; } - + + // optional .openxc.CommandResponse command_response = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_; - /** - * optional .openxc.CommandResponse command_response = 6; - */ public boolean hasCommandResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { if (commandResponseBuilder_ == null) { return commandResponse_; @@ -1360,9 +1097,6 @@ public final class BinaryMessages { return commandResponseBuilder_.getMessage(); } } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder setCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { if (commandResponseBuilder_ == null) { if (value == null) { @@ -1376,9 +1110,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder setCommandResponse( com.openxc.BinaryMessages.CommandResponse.Builder builderForValue) { if (commandResponseBuilder_ == null) { @@ -1390,9 +1121,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder mergeCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { if (commandResponseBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && @@ -1409,9 +1137,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder clearCommandResponse() { if (commandResponseBuilder_ == null) { commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); @@ -1422,17 +1147,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000020); return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponse.Builder getCommandResponseBuilder() { bitField0_ |= 0x00000020; onChanged(); return getCommandResponseFieldBuilder().getBuilder(); } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { if (commandResponseBuilder_ != null) { return commandResponseBuilder_.getMessageOrBuilder(); @@ -1440,218 +1159,111 @@ public final class BinaryMessages { return commandResponse_; } } - /** - * optional .openxc.CommandResponse command_response = 6; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> getCommandResponseFieldBuilder() { if (commandResponseBuilder_ == null) { commandResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder>( - getCommandResponse(), + commandResponse_, getParentForChildren(), isClean()); commandResponse_ = null; } return commandResponseBuilder_; } - + + // optional uint32 uptime = 7; + private int uptime_ ; + public boolean hasUptime() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public int getUptime() { + return uptime_; + } + public Builder setUptime(int value) { + bitField0_ |= 0x00000040; + uptime_ = value; + onChanged(); + return this; + } + public Builder clearUptime() { + bitField0_ = (bitField0_ & ~0x00000040); + uptime_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) } - + static { defaultInstance = new VehicleMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - - public interface CanMessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.CanMessage) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 bus = 1; - */ + + public interface CanMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - - /** - * optional uint32 id = 2; - */ + + // optional uint32 id = 2; boolean hasId(); - /** - * optional uint32 id = 2; - */ int getId(); - - /** - * optional bytes data = 3; - */ + + // optional bytes data = 3; boolean hasData(); - /** - * optional bytes data = 3; - */ com.google.protobuf.ByteString getData(); - - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ + + // optional .openxc.CanMessage.FrameFormat frame_format = 4; boolean hasFrameFormat(); - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat(); } - /** - * Protobuf type {@code openxc.CanMessage} - */ public static final class CanMessage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.CanMessage) - CanMessageOrBuilder { + com.google.protobuf.GeneratedMessage + implements CanMessageOrBuilder { // Use CanMessage.newBuilder() to construct. - private CanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + private CanMessage(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private CanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private CanMessage(boolean noInit) {} + private static final CanMessage defaultInstance; public static CanMessage getDefaultInstance() { return defaultInstance; } - + public CanMessage getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - private CanMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - id_ = input.readUInt32(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - data_ = input.readBytes(); - break; - } - case 32: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - frameFormat_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; - } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CanMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CanMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.CanMessage.FrameFormat} - */ + public enum FrameFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * STANDARD = 1; - */ STANDARD(0, 1), - /** - * EXTENDED = 2; - */ EXTENDED(1, 2), ; - - /** - * STANDARD = 1; - */ + public static final int STANDARD_VALUE = 1; - /** - * EXTENDED = 2; - */ public static final int EXTENDED_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static FrameFormat valueOf(int value) { switch (value) { case 1: return STANDARD; @@ -1659,7 +1271,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -1671,7 +1283,7 @@ public final class BinaryMessages { return FrameFormat.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -1684,9 +1296,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.CanMessage.getDescriptor().getEnumTypes().get(0); } - - private static final FrameFormat[] VALUES = values(); - + + private static final FrameFormat[] VALUES = { + STANDARD, EXTENDED, + }; + public static FrameFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -1695,79 +1309,59 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private FrameFormat(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.CanMessage.FrameFormat) } - + private int bitField0_; + // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + + // optional uint32 id = 2; public static final int ID_FIELD_NUMBER = 2; private int id_; - /** - * optional uint32 id = 2; - */ public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 id = 2; - */ public int getId() { return id_; } - + + // optional bytes data = 3; public static final int DATA_FIELD_NUMBER = 3; private com.google.protobuf.ByteString data_; - /** - * optional bytes data = 3; - */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bytes data = 3; - */ public com.google.protobuf.ByteString getData() { return data_; } - + + // optional .openxc.CanMessage.FrameFormat frame_format = 4; public static final int FRAME_FORMAT_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_; - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } - + private void initFields() { bus_ = 0; id_ = 0; @@ -1777,13 +1371,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -1801,12 +1394,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -1828,106 +1421,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.CanMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.CanMessage} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.CanMessage) - com.openxc.BinaryMessages.CanMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.CanMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.CanMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -1938,7 +1538,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -1951,20 +1551,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; + return com.openxc.BinaryMessages.CanMessage.getDescriptor(); } - + public com.openxc.BinaryMessages.CanMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.CanMessage build() { com.openxc.BinaryMessages.CanMessage result = buildPartial(); if (!result.isInitialized()) { @@ -1972,7 +1572,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.CanMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.CanMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.CanMessage buildPartial() { com.openxc.BinaryMessages.CanMessage result = new com.openxc.BinaryMessages.CanMessage(this); int from_bitField0_ = bitField0_; @@ -1997,7 +1607,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.CanMessage) { return mergeFrom((com.openxc.BinaryMessages.CanMessage)other); @@ -2006,7 +1616,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.CanMessage other) { if (other == com.openxc.BinaryMessages.CanMessage.getDefaultInstance()) return this; if (other.hasBus()) { @@ -2024,110 +1634,116 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.CanMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.CanMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + id_ = input.readUInt32(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + data_ = input.readBytes(); + break; + } + case 32: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + frameFormat_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + + // optional uint32 id = 2; private int id_ ; - /** - * optional uint32 id = 2; - */ public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 id = 2; - */ public int getId() { return id_; } - /** - * optional uint32 id = 2; - */ public Builder setId(int value) { bitField0_ |= 0x00000002; id_ = value; onChanged(); return this; } - /** - * optional uint32 id = 2; - */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000002); id_ = 0; onChanged(); return this; } - + + // optional bytes data = 3; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes data = 3; - */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bytes data = 3; - */ public com.google.protobuf.ByteString getData() { return data_; } - /** - * optional bytes data = 3; - */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -2137,32 +1753,21 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional bytes data = 3; - */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000004); data_ = getDefaultInstance().getData(); onChanged(); return this; } - + + // optional .openxc.CanMessage.FrameFormat frame_format = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public Builder setFrameFormat(com.openxc.BinaryMessages.CanMessage.FrameFormat value) { if (value == null) { throw new NullPointerException(); @@ -2172,339 +1777,113 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public Builder clearFrameFormat() { bitField0_ = (bitField0_ & ~0x00000008); frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.CanMessage) } - + static { defaultInstance = new CanMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.CanMessage) } - - public interface ControlCommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.ControlCommand) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .openxc.ControlCommand.Type type = 1; - */ + + public interface ControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.ControlCommand.Type type = 1; boolean hasType(); - /** - * optional .openxc.ControlCommand.Type type = 1; - */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ + + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; boolean hasDiagnosticRequest(); - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest(); - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder(); - - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ + + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; boolean hasPassthroughModeRequest(); - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest(); - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); - - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ + + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; boolean hasAcceptanceFilterBypassCommand(); - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand(); - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); - - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ + + // optional .openxc.PayloadFormatCommand payload_format_command = 5; boolean hasPayloadFormatCommand(); - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand(); - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); - - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ + + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; boolean hasPredefinedObd2RequestsCommand(); - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand(); - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder(); + + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + boolean hasModemConfigurationCommand(); + com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand(); + com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder(); } - /** - * Protobuf type {@code openxc.ControlCommand} - */ public static final class ControlCommand extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.ControlCommand) - ControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage + implements ControlCommandOrBuilder { // Use ControlCommand.newBuilder() to construct. - private ControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private ControlCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private ControlCommand(boolean noInit) {} + private static final ControlCommand defaultInstance; public static ControlCommand getDefaultInstance() { return defaultInstance; } - + public ControlCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ControlCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = diagnosticRequest_.toBuilder(); - } - diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticControlCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diagnosticRequest_); - diagnosticRequest_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = passthroughModeRequest_.toBuilder(); - } - passthroughModeRequest_ = input.readMessage(com.openxc.BinaryMessages.PassthroughModeControlCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(passthroughModeRequest_); - passthroughModeRequest_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 34: { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = acceptanceFilterBypassCommand_.toBuilder(); - } - acceptanceFilterBypassCommand_ = input.readMessage(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(acceptanceFilterBypassCommand_); - acceptanceFilterBypassCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 42: { - com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = payloadFormatCommand_.toBuilder(); - } - payloadFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.PayloadFormatCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(payloadFormatCommand_); - payloadFormatCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 50: { - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - subBuilder = predefinedObd2RequestsCommand_.toBuilder(); - } - predefinedObd2RequestsCommand_ = input.readMessage(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(predefinedObd2RequestsCommand_); - predefinedObd2RequestsCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ControlCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ControlCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.ControlCommand.Type} - */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * VERSION = 1; - */ VERSION(0, 1), - /** - * DEVICE_ID = 2; - */ DEVICE_ID(1, 2), - /** - * DIAGNOSTIC = 3; - */ DIAGNOSTIC(2, 3), - /** - * PASSTHROUGH = 4; - */ PASSTHROUGH(3, 4), - /** - * ACCEPTANCE_FILTER_BYPASS = 5; - */ ACCEPTANCE_FILTER_BYPASS(4, 5), - /** - * PAYLOAD_FORMAT = 6; - */ PAYLOAD_FORMAT(5, 6), - /** - * PREDEFINED_OBD2_REQUESTS = 7; - */ PREDEFINED_OBD2_REQUESTS(6, 7), + MODEM_CONFIGURATION(7, 8), ; - - /** - * VERSION = 1; - */ + public static final int VERSION_VALUE = 1; - /** - * DEVICE_ID = 2; - */ public static final int DEVICE_ID_VALUE = 2; - /** - * DIAGNOSTIC = 3; - */ public static final int DIAGNOSTIC_VALUE = 3; - /** - * PASSTHROUGH = 4; - */ public static final int PASSTHROUGH_VALUE = 4; - /** - * ACCEPTANCE_FILTER_BYPASS = 5; - */ public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; - /** - * PAYLOAD_FORMAT = 6; - */ public static final int PAYLOAD_FORMAT_VALUE = 6; - /** - * PREDEFINED_OBD2_REQUESTS = 7; - */ public static final int PREDEFINED_OBD2_REQUESTS_VALUE = 7; - - + public static final int MODEM_CONFIGURATION_VALUE = 8; + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return VERSION; @@ -2514,10 +1893,11 @@ public final class BinaryMessages { case 5: return ACCEPTANCE_FILTER_BYPASS; case 6: return PAYLOAD_FORMAT; case 7: return PREDEFINED_OBD2_REQUESTS; + case 8: return MODEM_CONFIGURATION; default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -2529,7 +1909,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -2542,9 +1922,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = values(); - + + private static final Type[] VALUES = { + VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, + }; + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -2553,139 +1935,107 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) } - + private int bitField0_; + // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - + + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_; - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { return diagnosticRequest_; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { return diagnosticRequest_; } - + + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; public static final int PASSTHROUGH_MODE_REQUEST_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_; - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public boolean hasPassthroughModeRequest() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { return passthroughModeRequest_; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { return passthroughModeRequest_; } - + + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; public static final int ACCEPTANCE_FILTER_BYPASS_COMMAND_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_; - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public boolean hasAcceptanceFilterBypassCommand() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { return acceptanceFilterBypassCommand_; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { return acceptanceFilterBypassCommand_; } - + + // optional .openxc.PayloadFormatCommand payload_format_command = 5; public static final int PAYLOAD_FORMAT_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_; - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { return payloadFormatCommand_; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { return payloadFormatCommand_; } - + + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; public static final int PREDEFINED_OBD2_REQUESTS_COMMAND_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_; - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public boolean hasPredefinedObd2RequestsCommand() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { return predefinedObd2RequestsCommand_; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { return predefinedObd2RequestsCommand_; } - + + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + public static final int MODEM_CONFIGURATION_COMMAND_FIELD_NUMBER = 7; + private com.openxc.BinaryMessages.ModemConfigurationCommand modemConfigurationCommand_; + public boolean hasModemConfigurationCommand() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand() { + return modemConfigurationCommand_; + } + public com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder() { + return modemConfigurationCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); @@ -2693,17 +2043,17 @@ public final class BinaryMessages { acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); + modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -2725,14 +2075,17 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeMessage(6, predefinedObd2RequestsCommand_); } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(7, modemConfigurationCommand_); + } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -2758,110 +2111,121 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, predefinedObd2RequestsCommand_); } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, modemConfigurationCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.ControlCommand} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.ControlCommand) - com.openxc.BinaryMessages.ControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.ControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -2872,12 +2236,13 @@ public final class BinaryMessages { getAcceptanceFilterBypassCommandFieldBuilder(); getPayloadFormatCommandFieldBuilder(); getPredefinedObd2RequestsCommandFieldBuilder(); + getModemConfigurationCommandFieldBuilder(); } } private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; @@ -2912,22 +2277,28 @@ public final class BinaryMessages { predefinedObd2RequestsCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); + if (modemConfigurationCommandBuilder_ == null) { + modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); + } else { + modemConfigurationCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.ControlCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.ControlCommand build() { com.openxc.BinaryMessages.ControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -2935,7 +2306,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.ControlCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.ControlCommand buildPartial() { com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); int from_bitField0_ = bitField0_; @@ -2984,11 +2365,19 @@ public final class BinaryMessages { } else { result.predefinedObd2RequestsCommand_ = predefinedObd2RequestsCommandBuilder_.build(); } - result.bitField0_ = to_bitField0_; - onBuilt(); + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + if (modemConfigurationCommandBuilder_ == null) { + result.modemConfigurationCommand_ = modemConfigurationCommand_; + } else { + result.modemConfigurationCommand_ = modemConfigurationCommandBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.ControlCommand) { return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); @@ -2997,7 +2386,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; if (other.hasType()) { @@ -3018,49 +2407,119 @@ public final class BinaryMessages { if (other.hasPredefinedObd2RequestsCommand()) { mergePredefinedObd2RequestsCommand(other.getPredefinedObd2RequestsCommand()); } + if (other.hasModemConfigurationCommand()) { + mergeModemConfigurationCommand(other.getModemConfigurationCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.ControlCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder(); + if (hasDiagnosticRequest()) { + subBuilder.mergeFrom(getDiagnosticRequest()); + } + input.readMessage(subBuilder, extensionRegistry); + setDiagnosticRequest(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder(); + if (hasPassthroughModeRequest()) { + subBuilder.mergeFrom(getPassthroughModeRequest()); + } + input.readMessage(subBuilder, extensionRegistry); + setPassthroughModeRequest(subBuilder.buildPartial()); + break; + } + case 34: { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder(); + if (hasAcceptanceFilterBypassCommand()) { + subBuilder.mergeFrom(getAcceptanceFilterBypassCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setAcceptanceFilterBypassCommand(subBuilder.buildPartial()); + break; + } + case 42: { + com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder(); + if (hasPayloadFormatCommand()) { + subBuilder.mergeFrom(getPayloadFormatCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setPayloadFormatCommand(subBuilder.buildPartial()); + break; + } + case 50: { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder(); + if (hasPredefinedObd2RequestsCommand()) { + subBuilder.mergeFrom(getPredefinedObd2RequestsCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setPredefinedObd2RequestsCommand(subBuilder.buildPartial()); + break; + } + case 58: { + com.openxc.BinaryMessages.ModemConfigurationCommand.Builder subBuilder = com.openxc.BinaryMessages.ModemConfigurationCommand.newBuilder(); + if (hasModemConfigurationCommand()) { + subBuilder.mergeFrom(getModemConfigurationCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setModemConfigurationCommand(subBuilder.buildPartial()); + break; + } } } - return this; } + private int bitField0_; - + + // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { if (value == null) { throw new NullPointerException(); @@ -3070,28 +2529,20 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; onChanged(); return this; } - + + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> diagnosticRequestBuilder_; - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { if (diagnosticRequestBuilder_ == null) { return diagnosticRequest_; @@ -3099,9 +2550,6 @@ public final class BinaryMessages { return diagnosticRequestBuilder_.getMessage(); } } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { if (diagnosticRequestBuilder_ == null) { if (value == null) { @@ -3115,9 +2563,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder setDiagnosticRequest( com.openxc.BinaryMessages.DiagnosticControlCommand.Builder builderForValue) { if (diagnosticRequestBuilder_ == null) { @@ -3129,9 +2574,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { if (diagnosticRequestBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -3148,9 +2590,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder clearDiagnosticRequest() { if (diagnosticRequestBuilder_ == null) { diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); @@ -3161,17 +2600,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Builder getDiagnosticRequestBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDiagnosticRequestFieldBuilder().getBuilder(); } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { if (diagnosticRequestBuilder_ != null) { return diagnosticRequestBuilder_.getMessageOrBuilder(); @@ -3179,35 +2612,27 @@ public final class BinaryMessages { return diagnosticRequest_; } } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> getDiagnosticRequestFieldBuilder() { if (diagnosticRequestBuilder_ == null) { diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder>( - getDiagnosticRequest(), + diagnosticRequest_, getParentForChildren(), isClean()); diagnosticRequest_ = null; } return diagnosticRequestBuilder_; } - + + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> passthroughModeRequestBuilder_; - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public boolean hasPassthroughModeRequest() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { if (passthroughModeRequestBuilder_ == null) { return passthroughModeRequest_; @@ -3215,9 +2640,6 @@ public final class BinaryMessages { return passthroughModeRequestBuilder_.getMessage(); } } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder setPassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { if (passthroughModeRequestBuilder_ == null) { if (value == null) { @@ -3231,9 +2653,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder setPassthroughModeRequest( com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder builderForValue) { if (passthroughModeRequestBuilder_ == null) { @@ -3245,9 +2664,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder mergePassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { if (passthroughModeRequestBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -3264,9 +2680,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder clearPassthroughModeRequest() { if (passthroughModeRequestBuilder_ == null) { passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); @@ -3277,17 +2690,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder getPassthroughModeRequestBuilder() { bitField0_ |= 0x00000004; onChanged(); return getPassthroughModeRequestFieldBuilder().getBuilder(); } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { if (passthroughModeRequestBuilder_ != null) { return passthroughModeRequestBuilder_.getMessageOrBuilder(); @@ -3295,35 +2702,27 @@ public final class BinaryMessages { return passthroughModeRequest_; } } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> getPassthroughModeRequestFieldBuilder() { if (passthroughModeRequestBuilder_ == null) { passthroughModeRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder>( - getPassthroughModeRequest(), + passthroughModeRequest_, getParentForChildren(), isClean()); passthroughModeRequest_ = null; } return passthroughModeRequestBuilder_; } - + + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> acceptanceFilterBypassCommandBuilder_; - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public boolean hasAcceptanceFilterBypassCommand() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { if (acceptanceFilterBypassCommandBuilder_ == null) { return acceptanceFilterBypassCommand_; @@ -3331,9 +2730,6 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_.getMessage(); } } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder setAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { if (acceptanceFilterBypassCommandBuilder_ == null) { if (value == null) { @@ -3347,9 +2743,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder setAcceptanceFilterBypassCommand( com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder builderForValue) { if (acceptanceFilterBypassCommandBuilder_ == null) { @@ -3361,9 +2754,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder mergeAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { if (acceptanceFilterBypassCommandBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && @@ -3380,9 +2770,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder clearAcceptanceFilterBypassCommand() { if (acceptanceFilterBypassCommandBuilder_ == null) { acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); @@ -3393,17 +2780,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder getAcceptanceFilterBypassCommandBuilder() { bitField0_ |= 0x00000008; onChanged(); return getAcceptanceFilterBypassCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { if (acceptanceFilterBypassCommandBuilder_ != null) { return acceptanceFilterBypassCommandBuilder_.getMessageOrBuilder(); @@ -3411,35 +2792,27 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> getAcceptanceFilterBypassCommandFieldBuilder() { if (acceptanceFilterBypassCommandBuilder_ == null) { acceptanceFilterBypassCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder>( - getAcceptanceFilterBypassCommand(), + acceptanceFilterBypassCommand_, getParentForChildren(), isClean()); acceptanceFilterBypassCommand_ = null; } return acceptanceFilterBypassCommandBuilder_; } - + + // optional .openxc.PayloadFormatCommand payload_format_command = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> payloadFormatCommandBuilder_; - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { if (payloadFormatCommandBuilder_ == null) { return payloadFormatCommand_; @@ -3447,9 +2820,6 @@ public final class BinaryMessages { return payloadFormatCommandBuilder_.getMessage(); } } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder setPayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { if (payloadFormatCommandBuilder_ == null) { if (value == null) { @@ -3463,9 +2833,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder setPayloadFormatCommand( com.openxc.BinaryMessages.PayloadFormatCommand.Builder builderForValue) { if (payloadFormatCommandBuilder_ == null) { @@ -3477,9 +2844,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder mergePayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { if (payloadFormatCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && @@ -3496,9 +2860,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder clearPayloadFormatCommand() { if (payloadFormatCommandBuilder_ == null) { payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); @@ -3509,17 +2870,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommand.Builder getPayloadFormatCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); return getPayloadFormatCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { if (payloadFormatCommandBuilder_ != null) { return payloadFormatCommandBuilder_.getMessageOrBuilder(); @@ -3527,35 +2882,27 @@ public final class BinaryMessages { return payloadFormatCommand_; } } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> getPayloadFormatCommandFieldBuilder() { if (payloadFormatCommandBuilder_ == null) { payloadFormatCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder>( - getPayloadFormatCommand(), + payloadFormatCommand_, getParentForChildren(), isClean()); payloadFormatCommand_ = null; } return payloadFormatCommandBuilder_; } - + + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> predefinedObd2RequestsCommandBuilder_; - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public boolean hasPredefinedObd2RequestsCommand() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { if (predefinedObd2RequestsCommandBuilder_ == null) { return predefinedObd2RequestsCommand_; @@ -3563,9 +2910,6 @@ public final class BinaryMessages { return predefinedObd2RequestsCommandBuilder_.getMessage(); } } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder setPredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { if (predefinedObd2RequestsCommandBuilder_ == null) { if (value == null) { @@ -3579,9 +2923,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder setPredefinedObd2RequestsCommand( com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder builderForValue) { if (predefinedObd2RequestsCommandBuilder_ == null) { @@ -3593,9 +2934,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder mergePredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { if (predefinedObd2RequestsCommandBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && @@ -3612,9 +2950,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder clearPredefinedObd2RequestsCommand() { if (predefinedObd2RequestsCommandBuilder_ == null) { predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); @@ -3625,17 +2960,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000020); return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder getPredefinedObd2RequestsCommandBuilder() { bitField0_ |= 0x00000020; onChanged(); return getPredefinedObd2RequestsCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { if (predefinedObd2RequestsCommandBuilder_ != null) { return predefinedObd2RequestsCommandBuilder_.getMessageOrBuilder(); @@ -3643,202 +2972,173 @@ public final class BinaryMessages { return predefinedObd2RequestsCommand_; } } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> getPredefinedObd2RequestsCommandFieldBuilder() { if (predefinedObd2RequestsCommandBuilder_ == null) { predefinedObd2RequestsCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder>( - getPredefinedObd2RequestsCommand(), + predefinedObd2RequestsCommand_, getParentForChildren(), isClean()); predefinedObd2RequestsCommand_ = null; } return predefinedObd2RequestsCommandBuilder_; } - + + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + private com.openxc.BinaryMessages.ModemConfigurationCommand modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ModemConfigurationCommand, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder, com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder> modemConfigurationCommandBuilder_; + public boolean hasModemConfigurationCommand() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand() { + if (modemConfigurationCommandBuilder_ == null) { + return modemConfigurationCommand_; + } else { + return modemConfigurationCommandBuilder_.getMessage(); + } + } + public Builder setModemConfigurationCommand(com.openxc.BinaryMessages.ModemConfigurationCommand value) { + if (modemConfigurationCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modemConfigurationCommand_ = value; + onChanged(); + } else { + modemConfigurationCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder setModemConfigurationCommand( + com.openxc.BinaryMessages.ModemConfigurationCommand.Builder builderForValue) { + if (modemConfigurationCommandBuilder_ == null) { + modemConfigurationCommand_ = builderForValue.build(); + onChanged(); + } else { + modemConfigurationCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder mergeModemConfigurationCommand(com.openxc.BinaryMessages.ModemConfigurationCommand value) { + if (modemConfigurationCommandBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040) && + modemConfigurationCommand_ != com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance()) { + modemConfigurationCommand_ = + com.openxc.BinaryMessages.ModemConfigurationCommand.newBuilder(modemConfigurationCommand_).mergeFrom(value).buildPartial(); + } else { + modemConfigurationCommand_ = value; + } + onChanged(); + } else { + modemConfigurationCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder clearModemConfigurationCommand() { + if (modemConfigurationCommandBuilder_ == null) { + modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); + onChanged(); + } else { + modemConfigurationCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + public com.openxc.BinaryMessages.ModemConfigurationCommand.Builder getModemConfigurationCommandBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getModemConfigurationCommandFieldBuilder().getBuilder(); + } + public com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder() { + if (modemConfigurationCommandBuilder_ != null) { + return modemConfigurationCommandBuilder_.getMessageOrBuilder(); + } else { + return modemConfigurationCommand_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ModemConfigurationCommand, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder, com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder> + getModemConfigurationCommandFieldBuilder() { + if (modemConfigurationCommandBuilder_ == null) { + modemConfigurationCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ModemConfigurationCommand, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder, com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder>( + modemConfigurationCommand_, + getParentForChildren(), + isClean()); + modemConfigurationCommand_ = null; + } + return modemConfigurationCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } - + static { defaultInstance = new ControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.ControlCommand) } - - public interface DiagnosticControlCommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.DiagnosticControlCommand) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .openxc.DiagnosticRequest request = 1; - */ + + public interface DiagnosticControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.DiagnosticRequest request = 1; boolean hasRequest(); - /** - * optional .openxc.DiagnosticRequest request = 1; - */ com.openxc.BinaryMessages.DiagnosticRequest getRequest(); - /** - * optional .openxc.DiagnosticRequest request = 1; - */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder(); - - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ + + // optional .openxc.DiagnosticControlCommand.Action action = 2; boolean hasAction(); - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction(); } - /** - * Protobuf type {@code openxc.DiagnosticControlCommand} - */ public static final class DiagnosticControlCommand extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.DiagnosticControlCommand) - DiagnosticControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage + implements DiagnosticControlCommandOrBuilder { // Use DiagnosticControlCommand.newBuilder() to construct. - private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private DiagnosticControlCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DiagnosticControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DiagnosticControlCommand(boolean noInit) {} + private static final DiagnosticControlCommand defaultInstance; public static DiagnosticControlCommand getDefaultInstance() { return defaultInstance; } - + public DiagnosticControlCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DiagnosticControlCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = request_.toBuilder(); - } - request_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(request_); - request_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - action_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DiagnosticControlCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnosticControlCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.DiagnosticControlCommand.Action} - */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { - /** - * ADD = 1; - */ ADD(0, 1), - /** - * CANCEL = 2; - */ CANCEL(1, 2), ; - - /** - * ADD = 1; - */ + public static final int ADD_VALUE = 1; - /** - * CANCEL = 2; - */ public static final int CANCEL_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static Action valueOf(int value) { switch (value) { case 1: return ADD; @@ -3846,7 +3146,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -3858,7 +3158,7 @@ public final class BinaryMessages { return Action.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -3871,9 +3171,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor().getEnumTypes().get(0); } - - private static final Action[] VALUES = values(); - + + private static final Action[] VALUES = { + ADD, CANCEL, + }; + public static Action valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -3882,55 +3184,42 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Action(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticControlCommand.Action) } - + private int bitField0_; + // optional .openxc.DiagnosticRequest request = 1; public static final int REQUEST_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_; - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public boolean hasRequest() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { return request_; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { return request_; } - + + // optional .openxc.DiagnosticControlCommand.Action action = 2; public static final int ACTION_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_; - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public boolean hasAction() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { return action_; } - + private void initFields() { request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; @@ -3938,13 +3227,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -3956,12 +3244,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -3975,106 +3263,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DiagnosticControlCommand} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.DiagnosticControlCommand) - com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4086,7 +3381,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); if (requestBuilder_ == null) { @@ -4099,20 +3394,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.DiagnosticControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticControlCommand build() { com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -4120,7 +3415,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DiagnosticControlCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DiagnosticControlCommand buildPartial() { com.openxc.BinaryMessages.DiagnosticControlCommand result = new com.openxc.BinaryMessages.DiagnosticControlCommand(this); int from_bitField0_ = bitField0_; @@ -4141,7 +3446,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticControlCommand) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticControlCommand)other); @@ -4150,7 +3455,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticControlCommand other) { if (other == com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) return this; if (other.hasRequest()) { @@ -4162,42 +3467,67 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(); + if (hasRequest()) { + subBuilder.mergeFrom(getRequest()); + } + input.readMessage(subBuilder, extensionRegistry); + setRequest(subBuilder.buildPartial()); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + action_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + + // optional .openxc.DiagnosticRequest request = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public boolean hasRequest() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { if (requestBuilder_ == null) { return request_; @@ -4205,9 +3535,6 @@ public final class BinaryMessages { return requestBuilder_.getMessage(); } } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { if (requestBuilder_ == null) { if (value == null) { @@ -4221,9 +3548,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder setRequest( com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { if (requestBuilder_ == null) { @@ -4235,9 +3559,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { if (requestBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -4254,9 +3575,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder clearRequest() { if (requestBuilder_ == null) { request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); @@ -4267,17 +3585,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); return getRequestFieldBuilder().getBuilder(); } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { if (requestBuilder_ != null) { return requestBuilder_.getMessageOrBuilder(); @@ -4285,39 +3597,28 @@ public final class BinaryMessages { return request_; } } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> getRequestFieldBuilder() { if (requestBuilder_ == null) { requestBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>( - getRequest(), + request_, getParentForChildren(), isClean()); request_ = null; } return requestBuilder_; } - + + // optional .openxc.DiagnosticControlCommand.Action action = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public boolean hasAction() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { return action_; } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { if (value == null) { throw new NullPointerException(); @@ -4327,181 +3628,84 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public Builder clearAction() { bitField0_ = (bitField0_ & ~0x00000002); action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) } - + static { defaultInstance = new DiagnosticControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) } - - public interface PassthroughModeControlCommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.PassthroughModeControlCommand) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 bus = 1; - */ + + public interface PassthroughModeControlCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - - /** - * optional bool enabled = 2; - */ + + // optional bool enabled = 2; boolean hasEnabled(); - /** - * optional bool enabled = 2; - */ boolean getEnabled(); } - /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} - */ public static final class PassthroughModeControlCommand extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.PassthroughModeControlCommand) - PassthroughModeControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage + implements PassthroughModeControlCommandOrBuilder { // Use PassthroughModeControlCommand.newBuilder() to construct. - private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private PassthroughModeControlCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private PassthroughModeControlCommand(boolean noInit) {} + private static final PassthroughModeControlCommand defaultInstance; public static PassthroughModeControlCommand getDefaultInstance() { return defaultInstance; } - + public PassthroughModeControlCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - private PassthroughModeControlCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - enabled_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; - } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PassthroughModeControlCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PassthroughModeControlCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; } - + private int bitField0_; + // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + + // optional bool enabled = 2; public static final int ENABLED_FIELD_NUMBER = 2; private boolean enabled_; - /** - * optional bool enabled = 2; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool enabled = 2; - */ public boolean getEnabled() { return enabled_; } - + private void initFields() { bus_ = 0; enabled_ = false; @@ -4509,13 +3713,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -4527,12 +3730,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -4546,106 +3749,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.PassthroughModeControlCommand) - com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4656,7 +3866,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -4665,20 +3875,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -4686,7 +3896,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.PassthroughModeControlCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); int from_bitField0_ = bitField0_; @@ -4703,7 +3923,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); @@ -4712,7 +3932,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; if (other.hasBus()) { @@ -4724,259 +3944,163 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + enabled_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + + // optional bool enabled = 2; private boolean enabled_ ; - /** - * optional bool enabled = 2; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool enabled = 2; - */ public boolean getEnabled() { return enabled_; } - /** - * optional bool enabled = 2; - */ public Builder setEnabled(boolean value) { bitField0_ |= 0x00000002; enabled_ = value; onChanged(); return this; } - /** - * optional bool enabled = 2; - */ public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000002); enabled_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) } - + static { defaultInstance = new PassthroughModeControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } - - public interface AcceptanceFilterBypassCommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.AcceptanceFilterBypassCommand) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 bus = 1; - */ + + public interface AcceptanceFilterBypassCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - - /** - * optional bool bypass = 2; - */ + + // optional bool bypass = 2; boolean hasBypass(); - /** - * optional bool bypass = 2; - */ boolean getBypass(); } - /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} - */ public static final class AcceptanceFilterBypassCommand extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.AcceptanceFilterBypassCommand) - AcceptanceFilterBypassCommandOrBuilder { + com.google.protobuf.GeneratedMessage + implements AcceptanceFilterBypassCommandOrBuilder { // Use AcceptanceFilterBypassCommand.newBuilder() to construct. - private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private AcceptanceFilterBypassCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private AcceptanceFilterBypassCommand(boolean noInit) {} + private static final AcceptanceFilterBypassCommand defaultInstance; public static AcceptanceFilterBypassCommand getDefaultInstance() { return defaultInstance; } - + public AcceptanceFilterBypassCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AcceptanceFilterBypassCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - bypass_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public AcceptanceFilterBypassCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceptanceFilterBypassCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; } - + private int bitField0_; + // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + + // optional bool bypass = 2; public static final int BYPASS_FIELD_NUMBER = 2; private boolean bypass_; - /** - * optional bool bypass = 2; - */ public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool bypass = 2; - */ public boolean getBypass() { return bypass_; } - + private void initFields() { bus_ = 0; bypass_ = false; @@ -4984,13 +4108,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5002,12 +4125,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5021,106 +4144,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.AcceptanceFilterBypassCommand) - com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5131,7 +4261,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -5140,20 +4270,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); if (!result.isInitialized()) { @@ -5161,7 +4291,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); int from_bitField0_ = bitField0_; @@ -5178,7 +4318,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); @@ -5187,7 +4327,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; if (other.hasBus()) { @@ -5199,247 +4339,150 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + bypass_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + + // optional bool bypass = 2; private boolean bypass_ ; - /** - * optional bool bypass = 2; - */ public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool bypass = 2; - */ public boolean getBypass() { return bypass_; } - /** - * optional bool bypass = 2; - */ public Builder setBypass(boolean value) { bitField0_ |= 0x00000002; bypass_ = value; onChanged(); return this; } - /** - * optional bool bypass = 2; - */ public Builder clearBypass() { bitField0_ = (bitField0_ & ~0x00000002); bypass_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) } - + static { defaultInstance = new AcceptanceFilterBypassCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - - public interface PayloadFormatCommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.PayloadFormatCommand) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ + + public interface PayloadFormatCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; boolean hasFormat(); - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat(); } - /** - * Protobuf type {@code openxc.PayloadFormatCommand} - */ public static final class PayloadFormatCommand extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.PayloadFormatCommand) - PayloadFormatCommandOrBuilder { + com.google.protobuf.GeneratedMessage + implements PayloadFormatCommandOrBuilder { // Use PayloadFormatCommand.newBuilder() to construct. - private PayloadFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private PayloadFormatCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private PayloadFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private PayloadFormatCommand(boolean noInit) {} + private static final PayloadFormatCommand defaultInstance; public static PayloadFormatCommand getDefaultInstance() { return defaultInstance; } - + public PayloadFormatCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PayloadFormatCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - format_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PayloadFormatCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PayloadFormatCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code openxc.PayloadFormatCommand.PayloadFormat} - */ + public enum PayloadFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * JSON = 1; - */ JSON(0, 1), - /** - * PROTOBUF = 2; - */ PROTOBUF(1, 2), ; - - /** - * JSON = 1; - */ + public static final int JSON_VALUE = 1; - /** - * PROTOBUF = 2; - */ public static final int PROTOBUF_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static PayloadFormat valueOf(int value) { switch (value) { case 1: return JSON; @@ -5447,7 +4490,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -5459,7 +4502,7 @@ public final class BinaryMessages { return PayloadFormat.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -5472,9 +4515,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor().getEnumTypes().get(0); } - - private static final PayloadFormat[] VALUES = values(); - + + private static final PayloadFormat[] VALUES = { + JSON, PROTOBUF, + }; + public static PayloadFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -5483,47 +4528,41 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private PayloadFormat(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.PayloadFormatCommand.PayloadFormat) } - + private int bitField0_; + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; public static final int FORMAT_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_; - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } - + private void initFields() { format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5532,12 +4571,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5547,106 +4586,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PayloadFormatCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.PayloadFormatCommand} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.PayloadFormatCommand) - com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5657,27 +4703,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; + return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.PayloadFormatCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PayloadFormatCommand build() { com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); if (!result.isInitialized()) { @@ -5685,7 +4731,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.PayloadFormatCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.PayloadFormatCommand buildPartial() { com.openxc.BinaryMessages.PayloadFormatCommand result = new com.openxc.BinaryMessages.PayloadFormatCommand(this); int from_bitField0_ = bitField0_; @@ -5698,7 +4754,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PayloadFormatCommand) { return mergeFrom((com.openxc.BinaryMessages.PayloadFormatCommand)other); @@ -5707,7 +4763,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PayloadFormatCommand other) { if (other == com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance()) return this; if (other.hasFormat()) { @@ -5716,46 +4772,59 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PayloadFormatCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PayloadFormatCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + format_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public Builder setFormat(com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value) { if (value == null) { throw new NullPointerException(); @@ -5765,165 +4834,82 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public Builder clearFormat() { bitField0_ = (bitField0_ & ~0x00000001); format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PayloadFormatCommand) } - + static { defaultInstance = new PayloadFormatCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } - - public interface PredefinedObd2RequestsCommandOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.PredefinedObd2RequestsCommand) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool enabled = 1; - */ + + public interface PredefinedObd2RequestsCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bool enabled = 1; boolean hasEnabled(); - /** - * optional bool enabled = 1; - */ boolean getEnabled(); } - /** - * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} - */ public static final class PredefinedObd2RequestsCommand extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.PredefinedObd2RequestsCommand) - PredefinedObd2RequestsCommandOrBuilder { + com.google.protobuf.GeneratedMessage + implements PredefinedObd2RequestsCommandOrBuilder { // Use PredefinedObd2RequestsCommand.newBuilder() to construct. - private PredefinedObd2RequestsCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private PredefinedObd2RequestsCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private PredefinedObd2RequestsCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private PredefinedObd2RequestsCommand(boolean noInit) {} + private static final PredefinedObd2RequestsCommand defaultInstance; public static PredefinedObd2RequestsCommand getDefaultInstance() { return defaultInstance; } - + public PredefinedObd2RequestsCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PredefinedObd2RequestsCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - enabled_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PredefinedObd2RequestsCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PredefinedObd2RequestsCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; } - + private int bitField0_; + // optional bool enabled = 1; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_; - /** - * optional bool enabled = 1; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional bool enabled = 1; - */ public boolean getEnabled() { return enabled_; } - + private void initFields() { enabled_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5932,12 +4918,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5947,106 +4933,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.PredefinedObd2RequestsCommand) - com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6057,27 +5050,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); enabled_ = false; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand build() { com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); if (!result.isInitialized()) { @@ -6085,7 +5078,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildPartial() { com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = new com.openxc.BinaryMessages.PredefinedObd2RequestsCommand(this); int from_bitField0_ = bitField0_; @@ -6098,7 +5101,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) { return mergeFrom((com.openxc.BinaryMessages.PredefinedObd2RequestsCommand)other); @@ -6107,7 +5110,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand other) { if (other == com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance()) return this; if (other.hasEnabled()) { @@ -6116,295 +5119,2788 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + enabled_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + + // optional bool enabled = 1; private boolean enabled_ ; - /** - * optional bool enabled = 1; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional bool enabled = 1; - */ public boolean getEnabled() { return enabled_; } - /** - * optional bool enabled = 1; - */ public Builder setEnabled(boolean value) { bitField0_ |= 0x00000001; enabled_ = value; onChanged(); return this; } - /** - * optional bool enabled = 1; - */ public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000001); enabled_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PredefinedObd2RequestsCommand) } - + static { defaultInstance = new PredefinedObd2RequestsCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) } - - public interface CommandResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.CommandResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .openxc.ControlCommand.Type type = 1; - */ - boolean hasType(); - /** - * optional .openxc.ControlCommand.Type type = 1; - */ - com.openxc.BinaryMessages.ControlCommand.Type getType(); - - /** - * optional string message = 2; - */ - boolean hasMessage(); - /** - * optional string message = 2; - */ - java.lang.String getMessage(); - /** - * optional string message = 2; - */ - com.google.protobuf.ByteString - getMessageBytes(); - - /** - * optional bool status = 3; - */ - boolean hasStatus(); - /** - * optional bool status = 3; - */ - boolean getStatus(); + + public interface NetworkOperatorSettingsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bool allowDataRoaming = 1; + boolean hasAllowDataRoaming(); + boolean getAllowDataRoaming(); + + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + boolean hasOperatorSelectMode(); + com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode(); + + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + boolean hasNetworkDescriptor(); + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor(); + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder(); } - /** - * Protobuf type {@code openxc.CommandResponse} - */ - public static final class CommandResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.CommandResponse) - CommandResponseOrBuilder { - // Use CommandResponse.newBuilder() to construct. - private CommandResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + public static final class NetworkOperatorSettings extends + com.google.protobuf.GeneratedMessage + implements NetworkOperatorSettingsOrBuilder { + // Use NetworkOperatorSettings.newBuilder() to construct. + private NetworkOperatorSettings(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private CommandResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CommandResponse defaultInstance; - public static CommandResponse getDefaultInstance() { + private NetworkOperatorSettings(boolean noInit) {} + + private static final NetworkOperatorSettings defaultInstance; + public static NetworkOperatorSettings getDefaultInstance() { return defaultInstance; } - - public CommandResponse getDefaultInstanceForType() { + + public NetworkOperatorSettings getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CommandResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - message_ = bs; - break; - } - case 24: { - bitField0_ |= 0x00000004; - status_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CommandResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CommandResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private com.openxc.BinaryMessages.ControlCommand.Type type_; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ - public com.openxc.BinaryMessages.ControlCommand.Type getType() { - return type_; - } - - public static final int MESSAGE_FIELD_NUMBER = 2; - private java.lang.Object message_; - /** - * optional string message = 2; - */ - public boolean hasMessage() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable; } - /** - * optional string message = 2; - */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - message_ = s; + + public enum OperatorSelectMode + implements com.google.protobuf.ProtocolMessageEnum { + AUTOMATIC(0, 0), + MANUAL(1, 1), + DEREGISTER(2, 2), + SET_ONLY(3, 3), + MANUAL_AUTOMATIC(4, 4), + ; + + public static final int AUTOMATIC_VALUE = 0; + public static final int MANUAL_VALUE = 1; + public static final int DEREGISTER_VALUE = 2; + public static final int SET_ONLY_VALUE = 3; + public static final int MANUAL_AUTOMATIC_VALUE = 4; + + + public final int getNumber() { return value; } + + public static OperatorSelectMode valueOf(int value) { + switch (value) { + case 0: return AUTOMATIC; + case 1: return MANUAL; + case 2: return DEREGISTER; + case 3: return SET_ONLY; + case 4: return MANUAL_AUTOMATIC; + default: return null; } - return s; } - } - /** - * optional string message = 2; - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OperatorSelectMode findValueByNumber(int number) { + return OperatorSelectMode.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.NetworkOperatorSettings.getDescriptor().getEnumTypes().get(0); + } + + private static final OperatorSelectMode[] VALUES = { + AUTOMATIC, MANUAL, DEREGISTER, SET_ONLY, MANUAL_AUTOMATIC, + }; + + public static OperatorSelectMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private OperatorSelectMode(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.NetworkOperatorSettings.OperatorSelectMode) + } + + public interface NetworkDescriptorOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional uint32 PLMN = 1; + boolean hasPLMN(); + int getPLMN(); + + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + boolean hasNetworkType(); + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType(); + } + public static final class NetworkDescriptor extends + com.google.protobuf.GeneratedMessage + implements NetworkDescriptorOrBuilder { + // Use NetworkDescriptor.newBuilder() to construct. + private NetworkDescriptor(Builder builder) { + super(builder); + } + private NetworkDescriptor(boolean noInit) {} + + private static final NetworkDescriptor defaultInstance; + public static NetworkDescriptor getDefaultInstance() { + return defaultInstance; + } + + public NetworkDescriptor getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable; + } + + public enum NetworkType + implements com.google.protobuf.ProtocolMessageEnum { + GSM(0, 0), + UTRAN(1, 2), + ; + + public static final int GSM_VALUE = 0; + public static final int UTRAN_VALUE = 2; + + + public final int getNumber() { return value; } + + public static NetworkType valueOf(int value) { + switch (value) { + case 0: return GSM; + case 2: return UTRAN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NetworkType findValueByNumber(int number) { + return NetworkType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDescriptor().getEnumTypes().get(0); + } + + private static final NetworkType[] VALUES = { + GSM, UTRAN, + }; + + public static NetworkType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private NetworkType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType) + } + + private int bitField0_; + // optional uint32 PLMN = 1; + public static final int PLMN_FIELD_NUMBER = 1; + private int pLMN_; + public boolean hasPLMN() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getPLMN() { + return pLMN_; + } + + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + public static final int NETWORKTYPE_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType_; + public boolean hasNetworkType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType() { + return networkType_; + } + + private void initFields() { + pLMN_ = 0; + networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, pLMN_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, networkType_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, pLMN_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, networkType_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable; + } + + // Construct using com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + pLMN_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDescriptor(); + } + + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getDefaultInstanceForType() { + return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor build() { + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor buildPartial() { + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = new com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.pLMN_ = pLMN_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.networkType_ = networkType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor) { + return mergeFrom((com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor other) { + if (other == com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance()) return this; + if (other.hasPLMN()) { + setPLMN(other.getPLMN()); + } + if (other.hasNetworkType()) { + setNetworkType(other.getNetworkType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + pLMN_ = input.readUInt32(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + networkType_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional uint32 PLMN = 1; + private int pLMN_ ; + public boolean hasPLMN() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getPLMN() { + return pLMN_; + } + public Builder setPLMN(int value) { + bitField0_ |= 0x00000001; + pLMN_ = value; + onChanged(); + return this; + } + public Builder clearPLMN() { + bitField0_ = (bitField0_ & ~0x00000001); + pLMN_ = 0; + onChanged(); + return this; + } + + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; + public boolean hasNetworkType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType() { + return networkType_; + } + public Builder setNetworkType(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + networkType_ = value; + onChanged(); + return this; + } + public Builder clearNetworkType() { + bitField0_ = (bitField0_ & ~0x00000002); + networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) + } + + static { + defaultInstance = new NetworkDescriptor(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) + } + + private int bitField0_; + // optional bool allowDataRoaming = 1; + public static final int ALLOWDATAROAMING_FIELD_NUMBER = 1; + private boolean allowDataRoaming_; + public boolean hasAllowDataRoaming() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getAllowDataRoaming() { + return allowDataRoaming_; + } + + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + public static final int OPERATORSELECTMODE_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode_; + public boolean hasOperatorSelectMode() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode() { + return operatorSelectMode_; + } + + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + public static final int NETWORKDESCRIPTOR_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor networkDescriptor_; + public boolean hasNetworkDescriptor() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor() { + return networkDescriptor_; + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder() { + return networkDescriptor_; + } + + private void initFields() { + allowDataRoaming_ = false; + operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; + networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, allowDataRoaming_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, operatorSelectMode_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, networkDescriptor_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, allowDataRoaming_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, operatorSelectMode_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, networkDescriptor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.NetworkOperatorSettings prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable; + } + + // Construct using com.openxc.BinaryMessages.NetworkOperatorSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNetworkDescriptorFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + allowDataRoaming_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; + bitField0_ = (bitField0_ & ~0x00000002); + if (networkDescriptorBuilder_ == null) { + networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); + } else { + networkDescriptorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.NetworkOperatorSettings.getDescriptor(); + } + + public com.openxc.BinaryMessages.NetworkOperatorSettings getDefaultInstanceForType() { + return com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.NetworkOperatorSettings build() { + com.openxc.BinaryMessages.NetworkOperatorSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.openxc.BinaryMessages.NetworkOperatorSettings buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.NetworkOperatorSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.openxc.BinaryMessages.NetworkOperatorSettings buildPartial() { + com.openxc.BinaryMessages.NetworkOperatorSettings result = new com.openxc.BinaryMessages.NetworkOperatorSettings(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.allowDataRoaming_ = allowDataRoaming_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.operatorSelectMode_ = operatorSelectMode_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (networkDescriptorBuilder_ == null) { + result.networkDescriptor_ = networkDescriptor_; + } else { + result.networkDescriptor_ = networkDescriptorBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.NetworkOperatorSettings) { + return mergeFrom((com.openxc.BinaryMessages.NetworkOperatorSettings)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkOperatorSettings other) { + if (other == com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance()) return this; + if (other.hasAllowDataRoaming()) { + setAllowDataRoaming(other.getAllowDataRoaming()); + } + if (other.hasOperatorSelectMode()) { + setOperatorSelectMode(other.getOperatorSelectMode()); + } + if (other.hasNetworkDescriptor()) { + mergeNetworkDescriptor(other.getNetworkDescriptor()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + allowDataRoaming_ = input.readBool(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + operatorSelectMode_ = value; + } + break; + } + case 26: { + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder subBuilder = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.newBuilder(); + if (hasNetworkDescriptor()) { + subBuilder.mergeFrom(getNetworkDescriptor()); + } + input.readMessage(subBuilder, extensionRegistry); + setNetworkDescriptor(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional bool allowDataRoaming = 1; + private boolean allowDataRoaming_ ; + public boolean hasAllowDataRoaming() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getAllowDataRoaming() { + return allowDataRoaming_; + } + public Builder setAllowDataRoaming(boolean value) { + bitField0_ |= 0x00000001; + allowDataRoaming_ = value; + onChanged(); + return this; + } + public Builder clearAllowDataRoaming() { + bitField0_ = (bitField0_ & ~0x00000001); + allowDataRoaming_ = false; + onChanged(); + return this; + } + + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + private com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; + public boolean hasOperatorSelectMode() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode() { + return operatorSelectMode_; + } + public Builder setOperatorSelectMode(com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + operatorSelectMode_ = value; + onChanged(); + return this; + } + public Builder clearOperatorSelectMode() { + bitField0_ = (bitField0_ & ~0x00000002); + operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; + onChanged(); + return this; + } + + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder> networkDescriptorBuilder_; + public boolean hasNetworkDescriptor() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor() { + if (networkDescriptorBuilder_ == null) { + return networkDescriptor_; + } else { + return networkDescriptorBuilder_.getMessage(); + } + } + public Builder setNetworkDescriptor(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor value) { + if (networkDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkDescriptor_ = value; + onChanged(); + } else { + networkDescriptorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setNetworkDescriptor( + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder builderForValue) { + if (networkDescriptorBuilder_ == null) { + networkDescriptor_ = builderForValue.build(); + onChanged(); + } else { + networkDescriptorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeNetworkDescriptor(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor value) { + if (networkDescriptorBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + networkDescriptor_ != com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance()) { + networkDescriptor_ = + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.newBuilder(networkDescriptor_).mergeFrom(value).buildPartial(); + } else { + networkDescriptor_ = value; + } + onChanged(); + } else { + networkDescriptorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearNetworkDescriptor() { + if (networkDescriptorBuilder_ == null) { + networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); + onChanged(); + } else { + networkDescriptorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder getNetworkDescriptorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNetworkDescriptorFieldBuilder().getBuilder(); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder() { + if (networkDescriptorBuilder_ != null) { + return networkDescriptorBuilder_.getMessageOrBuilder(); + } else { + return networkDescriptor_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder> + getNetworkDescriptorFieldBuilder() { + if (networkDescriptorBuilder_ == null) { + networkDescriptorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder>( + networkDescriptor_, + getParentForChildren(), + isClean()); + networkDescriptor_ = null; + } + return networkDescriptorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.NetworkOperatorSettings) + } + + static { + defaultInstance = new NetworkOperatorSettings(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings) + } + + public interface NetworkDataSettingsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string APN = 1; + boolean hasAPN(); + String getAPN(); + } + public static final class NetworkDataSettings extends + com.google.protobuf.GeneratedMessage + implements NetworkDataSettingsOrBuilder { + // Use NetworkDataSettings.newBuilder() to construct. + private NetworkDataSettings(Builder builder) { + super(builder); + } + private NetworkDataSettings(boolean noInit) {} + + private static final NetworkDataSettings defaultInstance; + public static NetworkDataSettings getDefaultInstance() { + return defaultInstance; + } + + public NetworkDataSettings getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable; + } + + private int bitField0_; + // optional string APN = 1; + public static final int APN_FIELD_NUMBER = 1; + private java.lang.Object aPN_; + public boolean hasAPN() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getAPN() { + java.lang.Object ref = aPN_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + aPN_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getAPNBytes() { + java.lang.Object ref = aPN_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + aPN_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + aPN_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getAPNBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getAPNBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.NetworkDataSettings prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable; + } + + // Construct using com.openxc.BinaryMessages.NetworkDataSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + aPN_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.NetworkDataSettings.getDescriptor(); + } + + public com.openxc.BinaryMessages.NetworkDataSettings getDefaultInstanceForType() { + return com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.NetworkDataSettings build() { + com.openxc.BinaryMessages.NetworkDataSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.openxc.BinaryMessages.NetworkDataSettings buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.NetworkDataSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.openxc.BinaryMessages.NetworkDataSettings buildPartial() { + com.openxc.BinaryMessages.NetworkDataSettings result = new com.openxc.BinaryMessages.NetworkDataSettings(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.aPN_ = aPN_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.NetworkDataSettings) { + return mergeFrom((com.openxc.BinaryMessages.NetworkDataSettings)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkDataSettings other) { + if (other == com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance()) return this; + if (other.hasAPN()) { + setAPN(other.getAPN()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + aPN_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string APN = 1; + private java.lang.Object aPN_ = ""; + public boolean hasAPN() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getAPN() { + java.lang.Object ref = aPN_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + aPN_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setAPN(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + aPN_ = value; + onChanged(); + return this; + } + public Builder clearAPN() { + bitField0_ = (bitField0_ & ~0x00000001); + aPN_ = getDefaultInstance().getAPN(); + onChanged(); + return this; + } + void setAPN(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + aPN_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:openxc.NetworkDataSettings) + } + + static { + defaultInstance = new NetworkDataSettings(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.NetworkDataSettings) + } + + public interface ServerConnectSettingsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string host = 1; + boolean hasHost(); + String getHost(); + + // optional uint32 port = 2; + boolean hasPort(); + int getPort(); + } + public static final class ServerConnectSettings extends + com.google.protobuf.GeneratedMessage + implements ServerConnectSettingsOrBuilder { + // Use ServerConnectSettings.newBuilder() to construct. + private ServerConnectSettings(Builder builder) { + super(builder); + } + private ServerConnectSettings(boolean noInit) {} + + private static final ServerConnectSettings defaultInstance; + public static ServerConnectSettings getDefaultInstance() { + return defaultInstance; + } + + public ServerConnectSettings getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable; + } + + private int bitField0_; + // optional string host = 1; + public static final int HOST_FIELD_NUMBER = 1; + private java.lang.Object host_; + public boolean hasHost() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getHost() { + java.lang.Object ref = host_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + host_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional uint32 port = 2; + public static final int PORT_FIELD_NUMBER = 2; + private int port_; + public boolean hasPort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPort() { + return port_; + } + + private void initFields() { + host_ = ""; + port_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getHostBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, port_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getHostBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, port_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.ServerConnectSettings prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable; + } + + // Construct using com.openxc.BinaryMessages.ServerConnectSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + host_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + port_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.ServerConnectSettings.getDescriptor(); + } + + public com.openxc.BinaryMessages.ServerConnectSettings getDefaultInstanceForType() { + return com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.ServerConnectSettings build() { + com.openxc.BinaryMessages.ServerConnectSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.openxc.BinaryMessages.ServerConnectSettings buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.ServerConnectSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.openxc.BinaryMessages.ServerConnectSettings buildPartial() { + com.openxc.BinaryMessages.ServerConnectSettings result = new com.openxc.BinaryMessages.ServerConnectSettings(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.host_ = host_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.port_ = port_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.ServerConnectSettings) { + return mergeFrom((com.openxc.BinaryMessages.ServerConnectSettings)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.ServerConnectSettings other) { + if (other == com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance()) return this; + if (other.hasHost()) { + setHost(other.getHost()); + } + if (other.hasPort()) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + host_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + port_ = input.readUInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional string host = 1; + private java.lang.Object host_ = ""; + public boolean hasHost() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + host_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setHost(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + host_ = value; + onChanged(); + return this; + } + public Builder clearHost() { + bitField0_ = (bitField0_ & ~0x00000001); + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + void setHost(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + host_ = value; + onChanged(); + } + + // optional uint32 port = 2; + private int port_ ; + public boolean hasPort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPort() { + return port_; + } + public Builder setPort(int value) { + bitField0_ |= 0x00000002; + port_ = value; + onChanged(); + return this; + } + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.ServerConnectSettings) + } + + static { + defaultInstance = new ServerConnectSettings(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.ServerConnectSettings) + } + + public interface ModemConfigurationCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + boolean hasNetworkOperatorSettings(); + com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings(); + com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder(); + + // optional .openxc.NetworkDataSettings networkDataSettings = 2; + boolean hasNetworkDataSettings(); + com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings(); + com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder(); + + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; + boolean hasServerConnectSettings(); + com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings(); + com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder(); + } + public static final class ModemConfigurationCommand extends + com.google.protobuf.GeneratedMessage + implements ModemConfigurationCommandOrBuilder { + // Use ModemConfigurationCommand.newBuilder() to construct. + private ModemConfigurationCommand(Builder builder) { + super(builder); + } + private ModemConfigurationCommand(boolean noInit) {} + + private static final ModemConfigurationCommand defaultInstance; + public static ModemConfigurationCommand getDefaultInstance() { + return defaultInstance; + } + + public ModemConfigurationCommand getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; + } + + private int bitField0_; + // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + public static final int NETWORKOPERATORSETTINGS_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.NetworkOperatorSettings networkOperatorSettings_; + public boolean hasNetworkOperatorSettings() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings() { + return networkOperatorSettings_; + } + public com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder() { + return networkOperatorSettings_; + } + + // optional .openxc.NetworkDataSettings networkDataSettings = 2; + public static final int NETWORKDATASETTINGS_FIELD_NUMBER = 2; + private com.openxc.BinaryMessages.NetworkDataSettings networkDataSettings_; + public boolean hasNetworkDataSettings() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings() { + return networkDataSettings_; + } + public com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder() { + return networkDataSettings_; + } + + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; + public static final int SERVERCONNECTSETTINGS_FIELD_NUMBER = 3; + private com.openxc.BinaryMessages.ServerConnectSettings serverConnectSettings_; + public boolean hasServerConnectSettings() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings() { + return serverConnectSettings_; + } + public com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder() { + return serverConnectSettings_; + } + + private void initFields() { + networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); + networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); + serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, networkOperatorSettings_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, networkDataSettings_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, serverConnectSettings_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, networkOperatorSettings_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, networkDataSettings_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, serverConnectSettings_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.ModemConfigurationCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; + } + + // Construct using com.openxc.BinaryMessages.ModemConfigurationCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNetworkOperatorSettingsFieldBuilder(); + getNetworkDataSettingsFieldBuilder(); + getServerConnectSettingsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (networkOperatorSettingsBuilder_ == null) { + networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); + } else { + networkOperatorSettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (networkDataSettingsBuilder_ == null) { + networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); + } else { + networkDataSettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (serverConnectSettingsBuilder_ == null) { + serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); + } else { + serverConnectSettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.ModemConfigurationCommand.getDescriptor(); + } + + public com.openxc.BinaryMessages.ModemConfigurationCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.ModemConfigurationCommand build() { + com.openxc.BinaryMessages.ModemConfigurationCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.openxc.BinaryMessages.ModemConfigurationCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.ModemConfigurationCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.openxc.BinaryMessages.ModemConfigurationCommand buildPartial() { + com.openxc.BinaryMessages.ModemConfigurationCommand result = new com.openxc.BinaryMessages.ModemConfigurationCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (networkOperatorSettingsBuilder_ == null) { + result.networkOperatorSettings_ = networkOperatorSettings_; + } else { + result.networkOperatorSettings_ = networkOperatorSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (networkDataSettingsBuilder_ == null) { + result.networkDataSettings_ = networkDataSettings_; + } else { + result.networkDataSettings_ = networkDataSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (serverConnectSettingsBuilder_ == null) { + result.serverConnectSettings_ = serverConnectSettings_; + } else { + result.serverConnectSettings_ = serverConnectSettingsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.ModemConfigurationCommand) { + return mergeFrom((com.openxc.BinaryMessages.ModemConfigurationCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.ModemConfigurationCommand other) { + if (other == com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance()) return this; + if (other.hasNetworkOperatorSettings()) { + mergeNetworkOperatorSettings(other.getNetworkOperatorSettings()); + } + if (other.hasNetworkDataSettings()) { + mergeNetworkDataSettings(other.getNetworkDataSettings()); + } + if (other.hasServerConnectSettings()) { + mergeServerConnectSettings(other.getServerConnectSettings()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.openxc.BinaryMessages.NetworkOperatorSettings.Builder subBuilder = com.openxc.BinaryMessages.NetworkOperatorSettings.newBuilder(); + if (hasNetworkOperatorSettings()) { + subBuilder.mergeFrom(getNetworkOperatorSettings()); + } + input.readMessage(subBuilder, extensionRegistry); + setNetworkOperatorSettings(subBuilder.buildPartial()); + break; + } + case 18: { + com.openxc.BinaryMessages.NetworkDataSettings.Builder subBuilder = com.openxc.BinaryMessages.NetworkDataSettings.newBuilder(); + if (hasNetworkDataSettings()) { + subBuilder.mergeFrom(getNetworkDataSettings()); + } + input.readMessage(subBuilder, extensionRegistry); + setNetworkDataSettings(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.ServerConnectSettings.Builder subBuilder = com.openxc.BinaryMessages.ServerConnectSettings.newBuilder(); + if (hasServerConnectSettings()) { + subBuilder.mergeFrom(getServerConnectSettings()); + } + input.readMessage(subBuilder, extensionRegistry); + setServerConnectSettings(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + private com.openxc.BinaryMessages.NetworkOperatorSettings networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkOperatorSettings, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder, com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder> networkOperatorSettingsBuilder_; + public boolean hasNetworkOperatorSettings() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings() { + if (networkOperatorSettingsBuilder_ == null) { + return networkOperatorSettings_; + } else { + return networkOperatorSettingsBuilder_.getMessage(); + } + } + public Builder setNetworkOperatorSettings(com.openxc.BinaryMessages.NetworkOperatorSettings value) { + if (networkOperatorSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkOperatorSettings_ = value; + onChanged(); + } else { + networkOperatorSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setNetworkOperatorSettings( + com.openxc.BinaryMessages.NetworkOperatorSettings.Builder builderForValue) { + if (networkOperatorSettingsBuilder_ == null) { + networkOperatorSettings_ = builderForValue.build(); + onChanged(); + } else { + networkOperatorSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeNetworkOperatorSettings(com.openxc.BinaryMessages.NetworkOperatorSettings value) { + if (networkOperatorSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + networkOperatorSettings_ != com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance()) { + networkOperatorSettings_ = + com.openxc.BinaryMessages.NetworkOperatorSettings.newBuilder(networkOperatorSettings_).mergeFrom(value).buildPartial(); + } else { + networkOperatorSettings_ = value; + } + onChanged(); + } else { + networkOperatorSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearNetworkOperatorSettings() { + if (networkOperatorSettingsBuilder_ == null) { + networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); + onChanged(); + } else { + networkOperatorSettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.Builder getNetworkOperatorSettingsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNetworkOperatorSettingsFieldBuilder().getBuilder(); + } + public com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder() { + if (networkOperatorSettingsBuilder_ != null) { + return networkOperatorSettingsBuilder_.getMessageOrBuilder(); + } else { + return networkOperatorSettings_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkOperatorSettings, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder, com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder> + getNetworkOperatorSettingsFieldBuilder() { + if (networkOperatorSettingsBuilder_ == null) { + networkOperatorSettingsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkOperatorSettings, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder, com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder>( + networkOperatorSettings_, + getParentForChildren(), + isClean()); + networkOperatorSettings_ = null; + } + return networkOperatorSettingsBuilder_; + } + + // optional .openxc.NetworkDataSettings networkDataSettings = 2; + private com.openxc.BinaryMessages.NetworkDataSettings networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkDataSettings, com.openxc.BinaryMessages.NetworkDataSettings.Builder, com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder> networkDataSettingsBuilder_; + public boolean hasNetworkDataSettings() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings() { + if (networkDataSettingsBuilder_ == null) { + return networkDataSettings_; + } else { + return networkDataSettingsBuilder_.getMessage(); + } + } + public Builder setNetworkDataSettings(com.openxc.BinaryMessages.NetworkDataSettings value) { + if (networkDataSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkDataSettings_ = value; + onChanged(); + } else { + networkDataSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setNetworkDataSettings( + com.openxc.BinaryMessages.NetworkDataSettings.Builder builderForValue) { + if (networkDataSettingsBuilder_ == null) { + networkDataSettings_ = builderForValue.build(); + onChanged(); + } else { + networkDataSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeNetworkDataSettings(com.openxc.BinaryMessages.NetworkDataSettings value) { + if (networkDataSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + networkDataSettings_ != com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance()) { + networkDataSettings_ = + com.openxc.BinaryMessages.NetworkDataSettings.newBuilder(networkDataSettings_).mergeFrom(value).buildPartial(); + } else { + networkDataSettings_ = value; + } + onChanged(); + } else { + networkDataSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearNetworkDataSettings() { + if (networkDataSettingsBuilder_ == null) { + networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); + onChanged(); + } else { + networkDataSettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.openxc.BinaryMessages.NetworkDataSettings.Builder getNetworkDataSettingsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNetworkDataSettingsFieldBuilder().getBuilder(); + } + public com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder() { + if (networkDataSettingsBuilder_ != null) { + return networkDataSettingsBuilder_.getMessageOrBuilder(); + } else { + return networkDataSettings_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkDataSettings, com.openxc.BinaryMessages.NetworkDataSettings.Builder, com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder> + getNetworkDataSettingsFieldBuilder() { + if (networkDataSettingsBuilder_ == null) { + networkDataSettingsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.NetworkDataSettings, com.openxc.BinaryMessages.NetworkDataSettings.Builder, com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder>( + networkDataSettings_, + getParentForChildren(), + isClean()); + networkDataSettings_ = null; + } + return networkDataSettingsBuilder_; + } + + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; + private com.openxc.BinaryMessages.ServerConnectSettings serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ServerConnectSettings, com.openxc.BinaryMessages.ServerConnectSettings.Builder, com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder> serverConnectSettingsBuilder_; + public boolean hasServerConnectSettings() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings() { + if (serverConnectSettingsBuilder_ == null) { + return serverConnectSettings_; + } else { + return serverConnectSettingsBuilder_.getMessage(); + } + } + public Builder setServerConnectSettings(com.openxc.BinaryMessages.ServerConnectSettings value) { + if (serverConnectSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serverConnectSettings_ = value; + onChanged(); + } else { + serverConnectSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setServerConnectSettings( + com.openxc.BinaryMessages.ServerConnectSettings.Builder builderForValue) { + if (serverConnectSettingsBuilder_ == null) { + serverConnectSettings_ = builderForValue.build(); + onChanged(); + } else { + serverConnectSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeServerConnectSettings(com.openxc.BinaryMessages.ServerConnectSettings value) { + if (serverConnectSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + serverConnectSettings_ != com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance()) { + serverConnectSettings_ = + com.openxc.BinaryMessages.ServerConnectSettings.newBuilder(serverConnectSettings_).mergeFrom(value).buildPartial(); + } else { + serverConnectSettings_ = value; + } + onChanged(); + } else { + serverConnectSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearServerConnectSettings() { + if (serverConnectSettingsBuilder_ == null) { + serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); + onChanged(); + } else { + serverConnectSettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.openxc.BinaryMessages.ServerConnectSettings.Builder getServerConnectSettingsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getServerConnectSettingsFieldBuilder().getBuilder(); + } + public com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder() { + if (serverConnectSettingsBuilder_ != null) { + return serverConnectSettingsBuilder_.getMessageOrBuilder(); + } else { + return serverConnectSettings_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ServerConnectSettings, com.openxc.BinaryMessages.ServerConnectSettings.Builder, com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder> + getServerConnectSettingsFieldBuilder() { + if (serverConnectSettingsBuilder_ == null) { + serverConnectSettingsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.ServerConnectSettings, com.openxc.BinaryMessages.ServerConnectSettings.Builder, com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder>( + serverConnectSettings_, + getParentForChildren(), + isClean()); + serverConnectSettings_ = null; + } + return serverConnectSettingsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:openxc.ModemConfigurationCommand) + } + + static { + defaultInstance = new ModemConfigurationCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) + } + + public interface CommandResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.ControlCommand.Type type = 1; + boolean hasType(); + com.openxc.BinaryMessages.ControlCommand.Type getType(); + + // optional string message = 2; + boolean hasMessage(); + String getMessage(); + + // optional bool status = 3; + boolean hasStatus(); + boolean getStatus(); + } + public static final class CommandResponse extends + com.google.protobuf.GeneratedMessage + implements CommandResponseOrBuilder { + // Use CommandResponse.newBuilder() to construct. + private CommandResponse(Builder builder) { + super(builder); + } + private CommandResponse(boolean noInit) {} + + private static final CommandResponse defaultInstance; + public static CommandResponse getDefaultInstance() { + return defaultInstance; + } + + public CommandResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable; + } + + private int bitField0_; + // optional .openxc.ControlCommand.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.openxc.BinaryMessages.ControlCommand.Type type_; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.openxc.BinaryMessages.ControlCommand.Type getType() { + return type_; + } + + // optional string message = 2; + public static final int MESSAGE_FIELD_NUMBER = 2; + private java.lang.Object message_; + public boolean hasMessage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + message_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + + // optional bool status = 3; public static final int STATUS_FIELD_NUMBER = 3; private boolean status_; - /** - * optional bool status = 3; - */ public boolean hasStatus() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bool status = 3; - */ public boolean getStatus() { return status_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; message_ = ""; @@ -6413,13 +7909,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -6434,12 +7929,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6457,106 +7952,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.CommandResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.CommandResponse} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.CommandResponse) - com.openxc.BinaryMessages.CommandResponseOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.CommandResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.CommandResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6567,7 +8069,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; @@ -6578,20 +8080,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; + return com.openxc.BinaryMessages.CommandResponse.getDescriptor(); } - + public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() { return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); } - + public com.openxc.BinaryMessages.CommandResponse build() { com.openxc.BinaryMessages.CommandResponse result = buildPartial(); if (!result.isInitialized()) { @@ -6599,7 +8101,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.CommandResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.CommandResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.CommandResponse buildPartial() { com.openxc.BinaryMessages.CommandResponse result = new com.openxc.BinaryMessages.CommandResponse(this); int from_bitField0_ = bitField0_; @@ -6620,7 +8132,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.CommandResponse) { return mergeFrom((com.openxc.BinaryMessages.CommandResponse)other); @@ -6629,16 +8141,14 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) { if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasMessage()) { - bitField0_ |= 0x00000002; - message_ = other.message_; - onChanged(); + setMessage(other.getMessage()); } if (other.hasStatus()) { setStatus(other.getStatus()); @@ -6646,46 +8156,69 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.CommandResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.CommandResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + message_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + status_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + + // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { if (value == null) { throw new NullPointerException(); @@ -6695,61 +8228,29 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; onChanged(); return this; } - + + // optional string message = 2; private java.lang.Object message_ = ""; - /** - * optional string message = 2; - */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string message = 2; - */ - public java.lang.String getMessage() { + public String getMessage() { java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - message_ = s; - } + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + message_ = s; return s; } else { - return (java.lang.String) ref; + return (String) ref; } } - /** - * optional string message = 2; - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string message = 2; - */ - public Builder setMessage( - java.lang.String value) { + public Builder setMessage(String value) { if (value == null) { throw new NullPointerException(); } @@ -6758,342 +8259,129 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string message = 2; - */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } - /** - * optional string message = 2; - */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + void setMessage(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; message_ = value; onChanged(); - return this; } - + + // optional bool status = 3; private boolean status_ ; - /** - * optional bool status = 3; - */ public boolean hasStatus() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bool status = 3; - */ public boolean getStatus() { return status_; } - /** - * optional bool status = 3; - */ public Builder setStatus(boolean value) { bitField0_ |= 0x00000004; status_ = value; onChanged(); return this; } - /** - * optional bool status = 3; - */ public Builder clearStatus() { bitField0_ = (bitField0_ & ~0x00000004); status_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.CommandResponse) } - + static { defaultInstance = new CommandResponse(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.CommandResponse) } - - public interface DiagnosticRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.DiagnosticRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 bus = 1; - */ + + public interface DiagnosticRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - - /** - * optional uint32 message_id = 2; - */ + + // optional uint32 message_id = 2; boolean hasMessageId(); - /** - * optional uint32 message_id = 2; - */ int getMessageId(); - - /** - * optional uint32 mode = 3; - */ + + // optional uint32 mode = 3; boolean hasMode(); - /** - * optional uint32 mode = 3; - */ int getMode(); - - /** - * optional uint32 pid = 4; - */ + + // optional uint32 pid = 4; boolean hasPid(); - /** - * optional uint32 pid = 4; - */ int getPid(); - - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ + + // optional bytes payload = 5; boolean hasPayload(); - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ com.google.protobuf.ByteString getPayload(); - - /** - * optional bool multiple_responses = 6; - */ + + // optional bool multiple_responses = 6; boolean hasMultipleResponses(); - /** - * optional bool multiple_responses = 6; - */ boolean getMultipleResponses(); - - /** - * optional double frequency = 7; - */ + + // optional double frequency = 7; boolean hasFrequency(); - /** - * optional double frequency = 7; - */ double getFrequency(); - - /** - * optional string name = 8; - */ + + // optional string name = 8; boolean hasName(); - /** - * optional string name = 8; - */ - java.lang.String getName(); - /** - * optional string name = 8; - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ + String getName(); + + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; boolean hasDecodedType(); - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); } - /** - * Protobuf type {@code openxc.DiagnosticRequest} - */ public static final class DiagnosticRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.DiagnosticRequest) - DiagnosticRequestOrBuilder { + com.google.protobuf.GeneratedMessage + implements DiagnosticRequestOrBuilder { // Use DiagnosticRequest.newBuilder() to construct. - private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + private DiagnosticRequest(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DiagnosticRequest(boolean noInit) {} + private static final DiagnosticRequest defaultInstance; public static DiagnosticRequest getDefaultInstance() { return defaultInstance; } - + public DiagnosticRequest getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DiagnosticRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - mode_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - pid_ = input.readUInt32(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - payload_ = input.readBytes(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - multipleResponses_ = input.readBool(); - break; - } - case 57: { - bitField0_ |= 0x00000040; - frequency_ = input.readDouble(); - break; - } - case 66: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000080; - name_ = bs; - break; - } - case 72: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(9, rawValue); - } else { - bitField0_ |= 0x00000100; - decodedType_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DiagnosticRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnosticRequest(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.DiagnosticRequest.DecodedType} - */ + public enum DecodedType implements com.google.protobuf.ProtocolMessageEnum { - /** - * NONE = 1; - */ NONE(0, 1), - /** - * OBD2 = 2; - */ OBD2(1, 2), ; - - /** - * NONE = 1; - */ + public static final int NONE_VALUE = 1; - /** - * OBD2 = 2; - */ public static final int OBD2_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static DecodedType valueOf(int value) { switch (value) { case 1: return NONE; @@ -7101,7 +8389,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -7113,7 +8401,7 @@ public final class BinaryMessages { return DecodedType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -7126,9 +8414,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(0); } - - private static final DecodedType[] VALUES = values(); - + + private static final DecodedType[] VALUES = { + NONE, OBD2, + }; + public static DecodedType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -7137,191 +8427,131 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private DecodedType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) } - + private int bitField0_; + // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + + // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - + + // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - + + // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - + + // optional bytes payload = 5; public static final int PAYLOAD_FIELD_NUMBER = 5; private com.google.protobuf.ByteString payload_; - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - + + // optional bool multiple_responses = 6; public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6; private boolean multipleResponses_; - /** - * optional bool multiple_responses = 6; - */ public boolean hasMultipleResponses() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional bool multiple_responses = 6; - */ public boolean getMultipleResponses() { return multipleResponses_; } - + + // optional double frequency = 7; public static final int FREQUENCY_FIELD_NUMBER = 7; private double frequency_; - /** - * optional double frequency = 7; - */ public boolean hasFrequency() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional double frequency = 7; - */ public double getFrequency() { return frequency_; } - + + // optional string name = 8; public static final int NAME_FIELD_NUMBER = 8; private java.lang.Object name_; - /** - * optional string name = 8; - */ public boolean hasName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional string name = 8; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { name_ = s; } return s; } } - /** - * optional string name = 8; - */ - public com.google.protobuf.ByteString - getNameBytes() { + private com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; public static final int DECODED_TYPE_FIELD_NUMBER = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_; - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public boolean hasDecodedType() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { return decodedType_; } - + private void initFields() { bus_ = 0; messageId_ = 0; @@ -7336,13 +8566,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -7375,12 +8604,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -7422,106 +8651,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DiagnosticRequest} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.DiagnosticRequest) - com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -7532,7 +8768,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -7555,20 +8791,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000100); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; + return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor(); } - + public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticRequest build() { com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial(); if (!result.isInitialized()) { @@ -7576,7 +8812,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DiagnosticRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() { com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this); int from_bitField0_ = bitField0_; @@ -7621,7 +8867,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other); @@ -7630,7 +8876,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) { if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this; if (other.hasBus()) { @@ -7655,9 +8901,7 @@ public final class BinaryMessages { setFrequency(other.getFrequency()); } if (other.hasName()) { - bitField0_ |= 0x00000080; - name_ = other.name_; - onChanged(); + setName(other.getName()); } if (other.hasDecodedType()) { setDecodedType(other.getDecodedType()); @@ -7665,189 +8909,183 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + payload_ = input.readBytes(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + multipleResponses_ = input.readBool(); + break; + } + case 57: { + bitField0_ |= 0x00000040; + frequency_ = input.readDouble(); + break; + } + case 66: { + bitField0_ |= 0x00000080; + name_ = input.readBytes(); + break; + } + case 72: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(9, rawValue); + } else { + bitField0_ |= 0x00000100; + decodedType_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + + // optional uint32 message_id = 2; private int messageId_ ; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - /** - * optional uint32 message_id = 2; - */ public Builder setMessageId(int value) { bitField0_ |= 0x00000002; messageId_ = value; onChanged(); return this; } - /** - * optional uint32 message_id = 2; - */ public Builder clearMessageId() { bitField0_ = (bitField0_ & ~0x00000002); messageId_ = 0; onChanged(); return this; } - + + // optional uint32 mode = 3; private int mode_ ; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - /** - * optional uint32 mode = 3; - */ public Builder setMode(int value) { bitField0_ |= 0x00000004; mode_ = value; onChanged(); return this; } - /** - * optional uint32 mode = 3; - */ public Builder clearMode() { bitField0_ = (bitField0_ & ~0x00000004); mode_ = 0; onChanged(); return this; } - + + // optional uint32 pid = 4; private int pid_ ; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - /** - * optional uint32 pid = 4; - */ public Builder setPid(int value) { bitField0_ |= 0x00000008; pid_ = value; onChanged(); return this; } - /** - * optional uint32 pid = 4; - */ public Builder clearPid() { bitField0_ = (bitField0_ & ~0x00000008); pid_ = 0; onChanged(); return this; } - + + // optional bytes payload = 5; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -7857,130 +9095,71 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000010); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } - + + // optional bool multiple_responses = 6; private boolean multipleResponses_ ; - /** - * optional bool multiple_responses = 6; - */ public boolean hasMultipleResponses() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional bool multiple_responses = 6; - */ public boolean getMultipleResponses() { return multipleResponses_; } - /** - * optional bool multiple_responses = 6; - */ public Builder setMultipleResponses(boolean value) { bitField0_ |= 0x00000020; multipleResponses_ = value; onChanged(); return this; } - /** - * optional bool multiple_responses = 6; - */ public Builder clearMultipleResponses() { bitField0_ = (bitField0_ & ~0x00000020); multipleResponses_ = false; onChanged(); return this; } - + + // optional double frequency = 7; private double frequency_ ; - /** - * optional double frequency = 7; - */ public boolean hasFrequency() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional double frequency = 7; - */ public double getFrequency() { return frequency_; } - /** - * optional double frequency = 7; - */ public Builder setFrequency(double value) { bitField0_ |= 0x00000040; frequency_ = value; onChanged(); return this; } - /** - * optional double frequency = 7; - */ public Builder clearFrequency() { bitField0_ = (bitField0_ & ~0x00000040); frequency_ = 0D; onChanged(); return this; } - + + // optional string name = 8; private java.lang.Object name_ = ""; - /** - * optional string name = 8; - */ public boolean hasName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional string name = 8; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; return s; } else { - return (java.lang.String) ref; + return (String) ref; } } - /** - * optional string name = 8; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 8; - */ - public Builder setName( - java.lang.String value) { + public Builder setName(String value) { if (value == null) { throw new NullPointerException(); } @@ -7989,45 +9168,26 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string name = 8; - */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000080); name_ = getDefaultInstance().getName(); onChanged(); return this; } - /** - * optional string name = 8; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000080; name_ = value; onChanged(); - return this; } - + + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public boolean hasDecodedType() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { return decodedType_; } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public Builder setDecodedType(com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value) { if (value == null) { throw new NullPointerException(); @@ -8037,375 +9197,168 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public Builder clearDecodedType() { bitField0_ = (bitField0_ & ~0x00000100); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } - + static { defaultInstance = new DiagnosticRequest(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) } - - public interface DiagnosticResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.DiagnosticResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 bus = 1; - */ + + public interface DiagnosticResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 bus = 1; boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - - /** - * optional uint32 message_id = 2; - */ + + // optional uint32 message_id = 2; boolean hasMessageId(); - /** - * optional uint32 message_id = 2; - */ int getMessageId(); - - /** - * optional uint32 mode = 3; - */ + + // optional uint32 mode = 3; boolean hasMode(); - /** - * optional uint32 mode = 3; - */ int getMode(); - - /** - * optional uint32 pid = 4; - */ + + // optional uint32 pid = 4; boolean hasPid(); - /** - * optional uint32 pid = 4; - */ int getPid(); - - /** - * optional bool success = 5; - */ + + // optional bool success = 5; boolean hasSuccess(); - /** - * optional bool success = 5; - */ boolean getSuccess(); - - /** - * optional uint32 negative_response_code = 6; - */ + + // optional uint32 negative_response_code = 6; boolean hasNegativeResponseCode(); - /** - * optional uint32 negative_response_code = 6; - */ int getNegativeResponseCode(); - - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ + + // optional bytes payload = 7; boolean hasPayload(); - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ com.google.protobuf.ByteString getPayload(); - - /** - * optional double value = 8; - */ + + // optional double value = 8; boolean hasValue(); - /** - * optional double value = 8; - */ double getValue(); } - /** - * Protobuf type {@code openxc.DiagnosticResponse} - */ public static final class DiagnosticResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.DiagnosticResponse) - DiagnosticResponseOrBuilder { + com.google.protobuf.GeneratedMessage + implements DiagnosticResponseOrBuilder { // Use DiagnosticResponse.newBuilder() to construct. - private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private DiagnosticResponse(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DiagnosticResponse(boolean noInit) {} + private static final DiagnosticResponse defaultInstance; public static DiagnosticResponse getDefaultInstance() { return defaultInstance; } - + public DiagnosticResponse getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DiagnosticResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - mode_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - pid_ = input.readUInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - success_ = input.readBool(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - negativeResponseCode_ = input.readUInt32(); - break; - } - case 58: { - bitField0_ |= 0x00000040; - payload_ = input.readBytes(); - break; - } - case 65: { - bitField0_ |= 0x00000080; - value_ = input.readDouble(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DiagnosticResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnosticResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable; } - + private int bitField0_; + // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + + // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - + + // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - + + // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - + + // optional bool success = 5; public static final int SUCCESS_FIELD_NUMBER = 5; private boolean success_; - /** - * optional bool success = 5; - */ public boolean hasSuccess() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bool success = 5; - */ public boolean getSuccess() { return success_; } - + + // optional uint32 negative_response_code = 6; public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6; private int negativeResponseCode_; - /** - * optional uint32 negative_response_code = 6; - */ public boolean hasNegativeResponseCode() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional uint32 negative_response_code = 6; - */ public int getNegativeResponseCode() { return negativeResponseCode_; } - + + // optional bytes payload = 7; public static final int PAYLOAD_FIELD_NUMBER = 7; private com.google.protobuf.ByteString payload_; - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - + + // optional double value = 8; public static final int VALUE_FIELD_NUMBER = 8; private double value_; - /** - * optional double value = 8; - */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional double value = 8; - */ public double getValue() { return value_; } - + private void initFields() { bus_ = 0; messageId_ = 0; @@ -8419,13 +9372,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -8455,12 +9407,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -8498,106 +9450,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DiagnosticResponse} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.DiagnosticResponse) - com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -8608,7 +9567,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -8629,20 +9588,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; + return com.openxc.BinaryMessages.DiagnosticResponse.getDescriptor(); } - + public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticResponse build() { com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial(); if (!result.isInitialized()) { @@ -8650,7 +9609,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DiagnosticResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() { com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this); int from_bitField0_ = bitField0_; @@ -8691,7 +9660,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other); @@ -8700,7 +9669,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) { if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this; if (other.hasBus()) { @@ -8730,253 +9699,214 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + success_ = input.readBool(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + negativeResponseCode_ = input.readUInt32(); + break; + } + case 58: { + bitField0_ |= 0x00000040; + payload_ = input.readBytes(); + break; + } + case 65: { + bitField0_ |= 0x00000080; + value_ = input.readDouble(); + break; + } } } - return this; } + private int bitField0_; - + + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + + // optional uint32 message_id = 2; private int messageId_ ; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - /** - * optional uint32 message_id = 2; - */ public Builder setMessageId(int value) { bitField0_ |= 0x00000002; messageId_ = value; onChanged(); return this; } - /** - * optional uint32 message_id = 2; - */ public Builder clearMessageId() { bitField0_ = (bitField0_ & ~0x00000002); messageId_ = 0; onChanged(); return this; } - + + // optional uint32 mode = 3; private int mode_ ; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - /** - * optional uint32 mode = 3; - */ public Builder setMode(int value) { bitField0_ |= 0x00000004; mode_ = value; onChanged(); return this; } - /** - * optional uint32 mode = 3; - */ public Builder clearMode() { bitField0_ = (bitField0_ & ~0x00000004); mode_ = 0; onChanged(); return this; } - + + // optional uint32 pid = 4; private int pid_ ; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - /** - * optional uint32 pid = 4; - */ public Builder setPid(int value) { bitField0_ |= 0x00000008; pid_ = value; onChanged(); return this; } - /** - * optional uint32 pid = 4; - */ public Builder clearPid() { bitField0_ = (bitField0_ & ~0x00000008); pid_ = 0; onChanged(); return this; } - + + // optional bool success = 5; private boolean success_ ; - /** - * optional bool success = 5; - */ public boolean hasSuccess() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bool success = 5; - */ public boolean getSuccess() { return success_; } - /** - * optional bool success = 5; - */ public Builder setSuccess(boolean value) { bitField0_ |= 0x00000010; success_ = value; onChanged(); return this; } - /** - * optional bool success = 5; - */ public Builder clearSuccess() { bitField0_ = (bitField0_ & ~0x00000010); success_ = false; onChanged(); return this; } - + + // optional uint32 negative_response_code = 6; private int negativeResponseCode_ ; - /** - * optional uint32 negative_response_code = 6; - */ public boolean hasNegativeResponseCode() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional uint32 negative_response_code = 6; - */ public int getNegativeResponseCode() { return negativeResponseCode_; } - /** - * optional uint32 negative_response_code = 6; - */ public Builder setNegativeResponseCode(int value) { bitField0_ |= 0x00000020; negativeResponseCode_ = value; onChanged(); return this; } - /** - * optional uint32 negative_response_code = 6; - */ public Builder clearNegativeResponseCode() { bitField0_ = (bitField0_ & ~0x00000020); negativeResponseCode_ = 0; onChanged(); return this; } - + + // optional bytes payload = 7; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -8986,262 +9916,106 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000040); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } - + + // optional double value = 8; private double value_ ; - /** - * optional double value = 8; - */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional double value = 8; - */ public double getValue() { return value_; } - /** - * optional double value = 8; - */ public Builder setValue(double value) { bitField0_ |= 0x00000080; value_ = value; onChanged(); return this; } - /** - * optional double value = 8; - */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000080); value_ = 0D; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse) } - + static { defaultInstance = new DiagnosticResponse(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) } - - public interface DynamicFieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.DynamicField) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .openxc.DynamicField.Type type = 1; - */ + + public interface DynamicFieldOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .openxc.DynamicField.Type type = 1; boolean hasType(); - /** - * optional .openxc.DynamicField.Type type = 1; - */ com.openxc.BinaryMessages.DynamicField.Type getType(); - - /** - * optional string string_value = 2; - */ + + // optional string string_value = 2; boolean hasStringValue(); - /** - * optional string string_value = 2; - */ - java.lang.String getStringValue(); - /** - * optional string string_value = 2; - */ - com.google.protobuf.ByteString - getStringValueBytes(); - - /** - * optional double numeric_value = 3; - */ + String getStringValue(); + + // optional double numeric_value = 3; boolean hasNumericValue(); - /** - * optional double numeric_value = 3; - */ double getNumericValue(); - - /** - * optional bool boolean_value = 4; - */ + + // optional bool boolean_value = 4; boolean hasBooleanValue(); - /** - * optional bool boolean_value = 4; - */ boolean getBooleanValue(); } - /** - * Protobuf type {@code openxc.DynamicField} - */ public static final class DynamicField extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.DynamicField) - DynamicFieldOrBuilder { + com.google.protobuf.GeneratedMessage + implements DynamicFieldOrBuilder { // Use DynamicField.newBuilder() to construct. - private DynamicField(com.google.protobuf.GeneratedMessage.Builder builder) { + private DynamicField(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DynamicField(boolean noInit) {} + private static final DynamicField defaultInstance; public static DynamicField getDefaultInstance() { return defaultInstance; } - + public DynamicField getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DynamicField( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - stringValue_ = bs; - break; - } - case 25: { - bitField0_ |= 0x00000004; - numericValue_ = input.readDouble(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - booleanValue_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DynamicField parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DynamicField(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; } - - /** - * Protobuf enum {@code openxc.DynamicField.Type} - */ + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable; + } + public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * STRING = 1; - */ STRING(0, 1), - /** - * NUM = 2; - */ NUM(1, 2), - /** - * BOOL = 3; - */ BOOL(2, 3), ; - - /** - * STRING = 1; - */ + public static final int STRING_VALUE = 1; - /** - * NUM = 2; - */ public static final int NUM_VALUE = 2; - /** - * BOOL = 3; - */ public static final int BOOL_VALUE = 3; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return STRING; @@ -9250,7 +10024,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -9262,7 +10036,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -9275,9 +10049,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = values(); - + + private static final Type[] VALUES = { + STRING, NUM, BOOL, + }; + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -9286,106 +10062,81 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type) } - + private int bitField0_; + // optional .openxc.DynamicField.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DynamicField.Type type_; - /** - * optional .openxc.DynamicField.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public com.openxc.BinaryMessages.DynamicField.Type getType() { return type_; } - + + // optional string string_value = 2; public static final int STRING_VALUE_FIELD_NUMBER = 2; private java.lang.Object stringValue_; - /** - * optional string string_value = 2; - */ public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string string_value = 2; - */ - public java.lang.String getStringValue() { + public String getStringValue() { java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { stringValue_ = s; } return s; } } - /** - * optional string string_value = 2; - */ - public com.google.protobuf.ByteString - getStringValueBytes() { + private com.google.protobuf.ByteString getStringValueBytes() { java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); stringValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + + // optional double numeric_value = 3; public static final int NUMERIC_VALUE_FIELD_NUMBER = 3; private double numericValue_; - /** - * optional double numeric_value = 3; - */ public boolean hasNumericValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional double numeric_value = 3; - */ public double getNumericValue() { return numericValue_; } - + + // optional bool boolean_value = 4; public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; private boolean booleanValue_; - /** - * optional bool boolean_value = 4; - */ public boolean hasBooleanValue() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional bool boolean_value = 4; - */ public boolean getBooleanValue() { return booleanValue_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; stringValue_ = ""; @@ -9395,13 +10146,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -9419,12 +10169,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -9446,106 +10196,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DynamicField} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.DynamicField) - com.openxc.BinaryMessages.DynamicFieldOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.DynamicFieldOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -9556,7 +10313,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; @@ -9569,20 +10326,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; + return com.openxc.BinaryMessages.DynamicField.getDescriptor(); } - + public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() { return com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DynamicField build() { com.openxc.BinaryMessages.DynamicField result = buildPartial(); if (!result.isInitialized()) { @@ -9590,7 +10347,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DynamicField buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DynamicField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DynamicField buildPartial() { com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this); int from_bitField0_ = bitField0_; @@ -9615,7 +10382,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DynamicField) { return mergeFrom((com.openxc.BinaryMessages.DynamicField)other); @@ -9624,16 +10391,14 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) { if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasStringValue()) { - bitField0_ |= 0x00000002; - stringValue_ = other.stringValue_; - onChanged(); + setStringValue(other.getStringValue()); } if (other.hasNumericValue()) { setNumericValue(other.getNumericValue()); @@ -9644,46 +10409,74 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DynamicField parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + stringValue_ = input.readBytes(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + numericValue_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + booleanValue_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + + // optional .openxc.DynamicField.Type type = 1; private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; - /** - * optional .openxc.DynamicField.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public com.openxc.BinaryMessages.DynamicField.Type getType() { return type_; } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) { if (value == null) { throw new NullPointerException(); @@ -9693,61 +10486,29 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; onChanged(); return this; } - + + // optional string string_value = 2; private java.lang.Object stringValue_ = ""; - /** - * optional string string_value = 2; - */ public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string string_value = 2; - */ - public java.lang.String getStringValue() { + public String getStringValue() { java.lang.Object ref = stringValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stringValue_ = s; - } + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + stringValue_ = s; return s; } else { - return (java.lang.String) ref; - } - } - /** - * optional string string_value = 2; - */ - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + return (String) ref; } } - /** - * optional string string_value = 2; - */ - public Builder setStringValue( - java.lang.String value) { + public Builder setStringValue(String value) { if (value == null) { throw new NullPointerException(); } @@ -9756,356 +10517,175 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string string_value = 2; - */ public Builder clearStringValue() { bitField0_ = (bitField0_ & ~0x00000002); stringValue_ = getDefaultInstance().getStringValue(); onChanged(); return this; } - /** - * optional string string_value = 2; - */ - public Builder setStringValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + void setStringValue(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; stringValue_ = value; onChanged(); - return this; } - + + // optional double numeric_value = 3; private double numericValue_ ; - /** - * optional double numeric_value = 3; - */ public boolean hasNumericValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional double numeric_value = 3; - */ public double getNumericValue() { return numericValue_; } - /** - * optional double numeric_value = 3; - */ public Builder setNumericValue(double value) { bitField0_ |= 0x00000004; numericValue_ = value; onChanged(); return this; } - /** - * optional double numeric_value = 3; - */ public Builder clearNumericValue() { bitField0_ = (bitField0_ & ~0x00000004); numericValue_ = 0D; onChanged(); return this; } - + + // optional bool boolean_value = 4; private boolean booleanValue_ ; - /** - * optional bool boolean_value = 4; - */ public boolean hasBooleanValue() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional bool boolean_value = 4; - */ public boolean getBooleanValue() { return booleanValue_; } - /** - * optional bool boolean_value = 4; - */ public Builder setBooleanValue(boolean value) { bitField0_ |= 0x00000008; booleanValue_ = value; onChanged(); return this; } - /** - * optional bool boolean_value = 4; - */ public Builder clearBooleanValue() { bitField0_ = (bitField0_ & ~0x00000008); booleanValue_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DynamicField) } - + static { defaultInstance = new DynamicField(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DynamicField) } - - public interface SimpleMessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:openxc.SimpleMessage) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - */ + + public interface SimpleMessageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional .openxc.DynamicField value = 2; - */ + String getName(); + + // optional .openxc.DynamicField value = 2; boolean hasValue(); - /** - * optional .openxc.DynamicField value = 2; - */ com.openxc.BinaryMessages.DynamicField getValue(); - /** - * optional .openxc.DynamicField value = 2; - */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - - /** - * optional .openxc.DynamicField event = 3; - */ + + // optional .openxc.DynamicField event = 3; boolean hasEvent(); - /** - * optional .openxc.DynamicField event = 3; - */ com.openxc.BinaryMessages.DynamicField getEvent(); - /** - * optional .openxc.DynamicField event = 3; - */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } - /** - * Protobuf type {@code openxc.SimpleMessage} - */ public static final class SimpleMessage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:openxc.SimpleMessage) - SimpleMessageOrBuilder { + com.google.protobuf.GeneratedMessage + implements SimpleMessageOrBuilder { // Use SimpleMessage.newBuilder() to construct. - private SimpleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + private SimpleMessage(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private SimpleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private SimpleMessage(boolean noInit) {} + private static final SimpleMessage defaultInstance; public static SimpleMessage getDefaultInstance() { return defaultInstance; } - + public SimpleMessage getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SimpleMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - name_ = bs; - break; - } - case 18: { - com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SimpleMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SimpleMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable; } - + private int bitField0_; + // optional string name = 1; public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; - /** - * optional string name = 1; - */ public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string name = 1; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { name_ = s; } return s; } } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { + private com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + + // optional .openxc.DynamicField value = 2; public static final int VALUE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DynamicField value_; - /** - * optional .openxc.DynamicField value = 2; - */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicField getValue() { return value_; } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { return value_; } - + + // optional .openxc.DynamicField event = 3; public static final int EVENT_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.DynamicField event_; - /** - * optional .openxc.DynamicField event = 3; - */ public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicField getEvent() { return event_; } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { return event_; } - + private void initFields() { name_ = ""; value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -10114,13 +10694,12 @@ public final class BinaryMessages { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + if (isInitialized != -1) return isInitialized == 1; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -10135,12 +10714,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -10158,106 +10737,113 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.SimpleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.SimpleMessage} - */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:openxc.SimpleMessage) - com.openxc.BinaryMessages.SimpleMessageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.SimpleMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.SimpleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -10270,7 +10856,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); name_ = ""; @@ -10289,20 +10875,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; + return com.openxc.BinaryMessages.SimpleMessage.getDescriptor(); } - + public com.openxc.BinaryMessages.SimpleMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.SimpleMessage build() { com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); if (!result.isInitialized()) { @@ -10310,7 +10896,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.SimpleMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.SimpleMessage buildPartial() { com.openxc.BinaryMessages.SimpleMessage result = new com.openxc.BinaryMessages.SimpleMessage(this); int from_bitField0_ = bitField0_; @@ -10339,7 +10935,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.SimpleMessage) { return mergeFrom((com.openxc.BinaryMessages.SimpleMessage)other); @@ -10348,13 +10944,11 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.SimpleMessage other) { if (other == com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) return this; if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); + setName(other.getName()); } if (other.hasValue()) { mergeValue(other.getValue()); @@ -10365,75 +10959,79 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.SimpleMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.SimpleMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = com.openxc.BinaryMessages.DynamicField.newBuilder(); + if (hasValue()) { + subBuilder.mergeFrom(getValue()); + } + input.readMessage(subBuilder, extensionRegistry); + setValue(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = com.openxc.BinaryMessages.DynamicField.newBuilder(); + if (hasEvent()) { + subBuilder.mergeFrom(getEvent()); + } + input.readMessage(subBuilder, extensionRegistry); + setEvent(subBuilder.buildPartial()); + break; + } } } - return this; } + private int bitField0_; - + + // optional string name = 1; private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string name = 1; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; return s; } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + return (String) ref; } } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { + public Builder setName(String value) { if (value == null) { throw new NullPointerException(); } @@ -10442,41 +11040,25 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string name = 1; - */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; name_ = value; onChanged(); - return this; } - + + // optional .openxc.DynamicField value = 2; private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_; - /** - * optional .openxc.DynamicField value = 2; - */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicField getValue() { if (valueBuilder_ == null) { return value_; @@ -10484,9 +11066,6 @@ public final class BinaryMessages { return valueBuilder_.getMessage(); } } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder setValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { if (value == null) { @@ -10500,9 +11079,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder setValue( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { if (valueBuilder_ == null) { @@ -10514,9 +11090,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -10533,9 +11106,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder clearValue() { if (valueBuilder_ == null) { value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -10546,17 +11116,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() { bitField0_ |= 0x00000002; onChanged(); return getValueFieldBuilder().getBuilder(); } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { if (valueBuilder_ != null) { return valueBuilder_.getMessageOrBuilder(); @@ -10564,35 +11128,27 @@ public final class BinaryMessages { return value_; } } - /** - * optional .openxc.DynamicField value = 2; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> getValueFieldBuilder() { if (valueBuilder_ == null) { valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( - getValue(), + value_, getParentForChildren(), isClean()); value_ = null; } return valueBuilder_; } - + + // optional .openxc.DynamicField event = 3; private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_; - /** - * optional .openxc.DynamicField event = 3; - */ public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicField getEvent() { if (eventBuilder_ == null) { return event_; @@ -10600,9 +11156,6 @@ public final class BinaryMessages { return eventBuilder_.getMessage(); } } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { if (value == null) { @@ -10616,9 +11169,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder setEvent( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { if (eventBuilder_ == null) { @@ -10630,9 +11180,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -10649,9 +11196,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder clearEvent() { if (eventBuilder_ == null) { event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -10662,17 +11206,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() { bitField0_ |= 0x00000004; onChanged(); return getEventFieldBuilder().getBuilder(); } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { if (eventBuilder_ != null) { return eventBuilder_.getMessageOrBuilder(); @@ -10680,100 +11218,122 @@ public final class BinaryMessages { return event_; } } - /** - * optional .openxc.DynamicField event = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> getEventFieldBuilder() { if (eventBuilder_ == null) { eventBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>( - getEvent(), + event_, getParentForChildren(), isClean()); event_ = null; } return eventBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.SimpleMessage) } - + static { defaultInstance = new SimpleMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.SimpleMessage) } - - private static final com.google.protobuf.Descriptors.Descriptor + + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_VehicleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_VehicleMessage_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CanMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_CanMessage_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_ControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_ControlCommand_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PassthroughModeControlCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PayloadFormatCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_NetworkOperatorSettings_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_NetworkDataSettings_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_NetworkDataSettings_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_ServerConnectSettings_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_ServerConnectSettings_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_ModemConfigurationCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_CommandResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DiagnosticResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DiagnosticResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_DynamicField_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_DynamicField_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_SimpleMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_SimpleMessage_fieldAccessorTable; - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -10782,7 +11342,7 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\210\003\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\230\003\n\016VehicleMessag" + "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." + "Type\022\'\n\013can_message\030\002 \001(\0132\022.openxc.CanMe" + "ssage\022-\n\016simple_message\030\003 \001(\0132\025.openxc.S" + @@ -10790,151 +11350,239 @@ public final class BinaryMessages { "\0132\032.openxc.DiagnosticResponse\022/\n\017control" + "_command\030\005 \001(\0132\026.openxc.ControlCommand\0221" + "\n\020command_response\030\006 \001(\0132\027.openxc.Comman" + - "dResponse\"V\n\004Type\022\007\n\003CAN\020\001\022\n\n\006SIMPLE\020\002\022\016" + - "\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_COMMAND\020\004\022\024\n\020C", - "OMMAND_RESPONSE\020\005\"\224\001\n\nCanMessage\022\013\n\003bus\030" + - "\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\0224\n\014frame" + - "_format\030\004 \001(\0162\036.openxc.CanMessage.FrameF" + - "ormat\")\n\013FrameFormat\022\014\n\010STANDARD\020\001\022\014\n\010EX" + - "TENDED\020\002\"\270\004\n\016ControlCommand\022)\n\004type\030\001 \001(" + - "\0162\033.openxc.ControlCommand.Type\022<\n\022diagno" + - "stic_request\030\002 \001(\0132 .openxc.DiagnosticCo" + - "ntrolCommand\022G\n\030passthrough_mode_request" + - "\030\003 \001(\0132%.openxc.PassthroughModeControlCo" + - "mmand\022O\n acceptance_filter_bypass_comman", - "d\030\004 \001(\0132%.openxc.AcceptanceFilterBypassC" + - "ommand\022<\n\026payload_format_command\030\005 \001(\0132\034" + - ".openxc.PayloadFormatCommand\022O\n predefin" + - "ed_obd2_requests_command\030\006 \001(\0132%.openxc." + - "PredefinedObd2RequestsCommand\"\223\001\n\004Type\022\013" + - "\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC" + - "\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER" + - "_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFI" + - "NED_OBD2_REQUESTS\020\007\"\236\001\n\030DiagnosticContro" + - "lCommand\022*\n\007request\030\001 \001(\0132\031.openxc.Diagn", - "osticRequest\0227\n\006action\030\002 \001(\0162\'.openxc.Di" + - "agnosticControlCommand.Action\"\035\n\006Action\022" + - "\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughModeC" + - "ontrolCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 " + - "\001(\010\"<\n\035AcceptanceFilterBypassCommand\022\013\n\003" + - "bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadForm" + - "atCommand\022:\n\006format\030\001 \001(\0162*.openxc.Paylo" + - "adFormatCommand.PayloadFormat\"\'\n\rPayload" + - "Format\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035Predef" + - "inedObd2RequestsCommand\022\017\n\007enabled\030\001 \001(\010", - "\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.open" + - "xc.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" + - "\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\022mu" + - "ltiple_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%." + - "openxc.DiagnosticRequest.DecodedType\"!\n\013" + - "DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diag" + - "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i", - "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" + - "ccess\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\014" + - "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" + - "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" + - "umeric_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" + - "\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n\005value" + - "\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005event\030\003 " + - "\001(\0132\024.openxc.DynamicFieldB\034\n\ncom.openxcB", - "\016BinaryMessages" + "dResponse\022\016\n\006uptime\030\007 \001(\r\"V\n\004Type\022\007\n\003CAN" + + "\020\001\022\n\n\006SIMPLE\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTRO", + "L_COMMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\224\001\n\nCa" + + "nMessage\022\013\n\003bus\030\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004dat" + + "a\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.openxc.C" + + "anMessage.FrameFormat\")\n\013FrameFormat\022\014\n\010" + + "STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\231\005\n\016ControlComm" + + "and\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComman" + + "d.Type\022<\n\022diagnostic_request\030\002 \001(\0132 .ope" + + "nxc.DiagnosticControlCommand\022G\n\030passthro" + + "ugh_mode_request\030\003 \001(\0132%.openxc.Passthro" + + "ughModeControlCommand\022O\n acceptance_filt", + "er_bypass_command\030\004 \001(\0132%.openxc.Accepta" + + "nceFilterBypassCommand\022<\n\026payload_format" + + "_command\030\005 \001(\0132\034.openxc.PayloadFormatCom" + + "mand\022O\n predefined_obd2_requests_command" + + "\030\006 \001(\0132%.openxc.PredefinedObd2RequestsCo" + + "mmand\022F\n\033modem_configuration_command\030\007 \001" + + "(\0132!.openxc.ModemConfigurationCommand\"\254\001" + + "\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDI" + + "AGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANC" + + "E_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n", + "\030PREDEFINED_OBD2_REQUESTS\020\007\022\027\n\023MODEM_CON" + + "FIGURATION\020\010\"\236\001\n\030DiagnosticControlComman" + + "d\022*\n\007request\030\001 \001(\0132\031.openxc.DiagnosticRe" + + "quest\0227\n\006action\030\002 \001(\0162\'.openxc.Diagnosti" + + "cControlCommand.Action\"\035\n\006Action\022\007\n\003ADD\020" + + "\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughModeControlC" + + "ommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035" + + "AcceptanceFilterBypassCommand\022\013\n\003bus\030\001 \001" + + "(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadFormatComma" + + "nd\022:\n\006format\030\001 \001(\0162*.openxc.PayloadForma", + "tCommand.PayloadFormat\"\'\n\rPayloadFormat\022" + + "\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035PredefinedObd" + + "2RequestsCommand\022\017\n\007enabled\030\001 \001(\010\"\321\003\n\027Ne" + + "tworkOperatorSettings\022\030\n\020allowDataRoamin" + + "g\030\001 \001(\010\022N\n\022operatorSelectMode\030\002 \001(\01622.op" + + "enxc.NetworkOperatorSettings.OperatorSel" + + "ectMode\022L\n\021networkDescriptor\030\003 \001(\01321.ope" + + "nxc.NetworkOperatorSettings.NetworkDescr" + + "iptor\032\230\001\n\021NetworkDescriptor\022\014\n\004PLMN\030\001 \001(" + + "\r\022R\n\013networkType\030\002 \001(\0162=.openxc.NetworkO", + "peratorSettings.NetworkDescriptor.Networ" + + "kType\"!\n\013NetworkType\022\007\n\003GSM\020\000\022\t\n\005UTRAN\020\002" + + "\"c\n\022OperatorSelectMode\022\r\n\tAUTOMATIC\020\000\022\n\n" + + "\006MANUAL\020\001\022\016\n\nDEREGISTER\020\002\022\014\n\010SET_ONLY\020\003\022" + + "\024\n\020MANUAL_AUTOMATIC\020\004\"\"\n\023NetworkDataSett" + + "ings\022\013\n\003APN\030\001 \001(\t\"3\n\025ServerConnectSettin" + + "gs\022\014\n\004host\030\001 \001(\t\022\014\n\004port\030\002 \001(\r\"\325\001\n\031Modem" + + "ConfigurationCommand\022@\n\027networkOperatorS" + + "ettings\030\001 \001(\0132\037.openxc.NetworkOperatorSe" + + "ttings\0228\n\023networkDataSettings\030\002 \001(\0132\033.op", + "enxc.NetworkDataSettings\022<\n\025serverConnec" + + "tSettings\030\003 \001(\0132\035.openxc.ServerConnectSe" + + "ttings\"]\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\021DiagnosticRequ" + + "est\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + + "mode\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\tfrequenc" + + "y\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t " + + "\001(\0162%.openxc.DiagnosticRequest.DecodedTy", + "pe\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001" + + "\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmes" + + "sage_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_c" + + "ode\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.openx" + + "c.DynamicField.Type\022\024\n\014string_value\030\002 \001(" + + "\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_valu" + + "e\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004" + + "BOOL\020\003\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n", + "\005value\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005ev" + + "ent\030\003 \001(\0132\024.openxc.DynamicFieldB\034\n\ncom.o" + + "penxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_openxc_VehicleMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_openxc_VehicleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_VehicleMessage_descriptor, + new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", "Uptime", }, + com.openxc.BinaryMessages.VehicleMessage.class, + com.openxc.BinaryMessages.VehicleMessage.Builder.class); + internal_static_openxc_CanMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_openxc_CanMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_CanMessage_descriptor, + new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }, + com.openxc.BinaryMessages.CanMessage.class, + com.openxc.BinaryMessages.CanMessage.Builder.class); + internal_static_openxc_ControlCommand_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_openxc_ControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_ControlCommand_descriptor, + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", "ModemConfigurationCommand", }, + com.openxc.BinaryMessages.ControlCommand.class, + com.openxc.BinaryMessages.ControlCommand.Builder.class); + internal_static_openxc_DiagnosticControlCommand_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticControlCommand_descriptor, + new java.lang.String[] { "Request", "Action", }, + com.openxc.BinaryMessages.DiagnosticControlCommand.class, + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + internal_static_openxc_PassthroughModeControlCommand_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PassthroughModeControlCommand_descriptor, + new java.lang.String[] { "Bus", "Enabled", }, + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, + new java.lang.String[] { "Bus", "Bypass", }, + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + internal_static_openxc_PayloadFormatCommand_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PayloadFormatCommand_descriptor, + new java.lang.String[] { "Format", }, + com.openxc.BinaryMessages.PayloadFormatCommand.class, + com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, + new java.lang.String[] { "Enabled", }, + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + internal_static_openxc_NetworkOperatorSettings_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_NetworkOperatorSettings_descriptor, + new java.lang.String[] { "AllowDataRoaming", "OperatorSelectMode", "NetworkDescriptor", }, + com.openxc.BinaryMessages.NetworkOperatorSettings.class, + com.openxc.BinaryMessages.NetworkOperatorSettings.Builder.class); + internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor = + internal_static_openxc_NetworkOperatorSettings_descriptor.getNestedTypes().get(0); + internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor, + new java.lang.String[] { "PLMN", "NetworkType", }, + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.class, + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder.class); + internal_static_openxc_NetworkDataSettings_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_openxc_NetworkDataSettings_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_NetworkDataSettings_descriptor, + new java.lang.String[] { "APN", }, + com.openxc.BinaryMessages.NetworkDataSettings.class, + com.openxc.BinaryMessages.NetworkDataSettings.Builder.class); + internal_static_openxc_ServerConnectSettings_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_openxc_ServerConnectSettings_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_ServerConnectSettings_descriptor, + new java.lang.String[] { "Host", "Port", }, + com.openxc.BinaryMessages.ServerConnectSettings.class, + com.openxc.BinaryMessages.ServerConnectSettings.Builder.class); + internal_static_openxc_ModemConfigurationCommand_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_ModemConfigurationCommand_descriptor, + new java.lang.String[] { "NetworkOperatorSettings", "NetworkDataSettings", "ServerConnectSettings", }, + com.openxc.BinaryMessages.ModemConfigurationCommand.class, + com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_openxc_CommandResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_CommandResponse_descriptor, + new java.lang.String[] { "Type", "Message", "Status", }, + com.openxc.BinaryMessages.CommandResponse.class, + com.openxc.BinaryMessages.CommandResponse.Builder.class); + internal_static_openxc_DiagnosticRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticRequest_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }, + com.openxc.BinaryMessages.DiagnosticRequest.class, + com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); + internal_static_openxc_DiagnosticResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DiagnosticResponse_descriptor, + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }, + com.openxc.BinaryMessages.DiagnosticResponse.class, + com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); + internal_static_openxc_DynamicField_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_openxc_DynamicField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_DynamicField_descriptor, + new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }, + com.openxc.BinaryMessages.DynamicField.class, + com.openxc.BinaryMessages.DynamicField.Builder.class); + internal_static_openxc_SimpleMessage_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_openxc_SimpleMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_SimpleMessage_descriptor, + new java.lang.String[] { "Name", "Value", "Event", }, + com.openxc.BinaryMessages.SimpleMessage.class, + com.openxc.BinaryMessages.SimpleMessage.Builder.class); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); - internal_static_openxc_VehicleMessage_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_openxc_VehicleMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_VehicleMessage_descriptor, - new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", }); - internal_static_openxc_CanMessage_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_openxc_CanMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_CanMessage_descriptor, - new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }); - internal_static_openxc_ControlCommand_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_openxc_ControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", }); - internal_static_openxc_DiagnosticControlCommand_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticControlCommand_descriptor, - new java.lang.String[] { "Request", "Action", }); - internal_static_openxc_PassthroughModeControlCommand_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PassthroughModeControlCommand_descriptor, - new java.lang.String[] { "Bus", "Enabled", }); - internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, - new java.lang.String[] { "Bus", "Bypass", }); - internal_static_openxc_PayloadFormatCommand_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PayloadFormatCommand_descriptor, - new java.lang.String[] { "Format", }); - internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, - new java.lang.String[] { "Enabled", }); - internal_static_openxc_CommandResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_openxc_CommandResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_CommandResponse_descriptor, - new java.lang.String[] { "Type", "Message", "Status", }); - internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); - internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DiagnosticResponse_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); - internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_openxc_DynamicField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_DynamicField_descriptor, - new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); - internal_static_openxc_SimpleMessage_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_openxc_SimpleMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_openxc_SimpleMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }); } - + // @@protoc_insertion_point(outer_class_scope) } diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 21ec4bd8..b63c713f 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -1,269 +1,318 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: openxc.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database + +from google.protobuf import descriptor +from google.protobuf import message +from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) -_sym_db = _symbol_database.Default() - - -DESCRIPTOR = _descriptor.FileDescriptor( +DESCRIPTOR = descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb=_b('\n\x0copenxc.proto\x12\x06openxc\"\x88\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xb8\x04\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\"\x93\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') -) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x99\x05\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\"\xac\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') -_VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( +_VEHICLEMESSAGE_TYPE = descriptor.EnumDescriptor( name='Type', full_name='openxc.VehicleMessage.Type', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='CAN', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='SIMPLE', index=1, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='CONTROL_COMMAND', index=3, number=4, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='COMMAND_RESPONSE', index=4, number=5, options=None, type=None), ], containing_type=None, options=None, - serialized_start=331, - serialized_end=417, + serialized_start=347, + serialized_end=433, ) -_sym_db.RegisterEnumDescriptor(_VEHICLEMESSAGE_TYPE) -_CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( +_CANMESSAGE_FRAMEFORMAT = descriptor.EnumDescriptor( name='FrameFormat', full_name='openxc.CanMessage.FrameFormat', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='STANDARD', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='EXTENDED', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=527, - serialized_end=568, + serialized_start=543, + serialized_end=584, ) -_sym_db.RegisterEnumDescriptor(_CANMESSAGE_FRAMEFORMAT) -_CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( +_CONTROLCOMMAND_TYPE = descriptor.EnumDescriptor( name='Type', full_name='openxc.ControlCommand.Type', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='VERSION', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='DEVICE_ID', index=1, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PASSTHROUGH', index=3, number=4, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='ACCEPTANCE_FILTER_BYPASS', index=4, number=5, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PAYLOAD_FORMAT', index=5, number=6, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PREDEFINED_OBD2_REQUESTS', index=6, number=7, options=None, type=None), + descriptor.EnumValueDescriptor( + name='MODEM_CONFIGURATION', index=7, number=8, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=992, - serialized_end=1139, + serialized_start=1080, + serialized_end=1252, ) -_sym_db.RegisterEnumDescriptor(_CONTROLCOMMAND_TYPE) -_DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( +_DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( name='Action', full_name='openxc.DiagnosticControlCommand.Action', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='ADD', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='CANCEL', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1271, - serialized_end=1300, + serialized_start=1384, + serialized_end=1413, ) -_sym_db.RegisterEnumDescriptor(_DIAGNOSTICCONTROLCOMMAND_ACTION) -_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( name='PayloadFormat', full_name='openxc.PayloadFormatCommand.PayloadFormat', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='JSON', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PROTOBUF', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1511, - serialized_end=1550, + serialized_start=1624, + serialized_end=1663, +) + +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescriptor( + name='NetworkType', + full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType', + filename=None, + file=DESCRIPTOR, + values=[ + descriptor.EnumValueDescriptor( + name='GSM', index=0, number=0, + options=None, + type=None), + descriptor.EnumValueDescriptor( + name='UTRAN', index=1, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=2047, + serialized_end=2080, +) + +_NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( + name='OperatorSelectMode', + full_name='openxc.NetworkOperatorSettings.OperatorSelectMode', + filename=None, + file=DESCRIPTOR, + values=[ + descriptor.EnumValueDescriptor( + name='AUTOMATIC', index=0, number=0, + options=None, + type=None), + descriptor.EnumValueDescriptor( + name='MANUAL', index=1, number=1, + options=None, + type=None), + descriptor.EnumValueDescriptor( + name='DEREGISTER', index=2, number=2, + options=None, + type=None), + descriptor.EnumValueDescriptor( + name='SET_ONLY', index=3, number=3, + options=None, + type=None), + descriptor.EnumValueDescriptor( + name='MANUAL_AUTOMATIC', index=4, number=4, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=2082, + serialized_end=2181, ) -_sym_db.RegisterEnumDescriptor(_PAYLOADFORMATCOMMAND_PAYLOADFORMAT) -_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( +_DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( name='DecodedType', full_name='openxc.DiagnosticRequest.DecodedType', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='NONE', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='OBD2', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1918, - serialized_end=1951, + serialized_start=2804, + serialized_end=2837, ) -_sym_db.RegisterEnumDescriptor(_DIAGNOSTICREQUEST_DECODEDTYPE) -_DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( +_DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( name='Type', full_name='openxc.DynamicField.Type', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='STRING', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='NUM', index=1, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='BOOL', index=2, number=3, options=None, type=None), ], containing_type=None, options=None, - serialized_start=2243, - serialized_end=2280, + serialized_start=3129, + serialized_end=3166, ) -_sym_db.RegisterEnumDescriptor(_DYNAMICFIELD_TYPE) -_VEHICLEMESSAGE = _descriptor.Descriptor( +_VEHICLEMESSAGE = descriptor.Descriptor( name='VehicleMessage', full_name='openxc.VehicleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.VehicleMessage.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='can_message', full_name='openxc.VehicleMessage.can_message', index=1, number=2, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='simple_message', full_name='openxc.VehicleMessage.simple_message', index=2, number=3, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='diagnostic_response', full_name='openxc.VehicleMessage.diagnostic_response', index=3, number=4, 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), - _descriptor.FieldDescriptor( + 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='command_response', full_name='openxc.VehicleMessage.command_response', index=5, number=6, 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), + descriptor.FieldDescriptor( + name='uptime', full_name='openxc.VehicleMessage.uptime', index=6, + number=7, type=13, cpp_type=3, 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), ], extensions=[ ], @@ -274,42 +323,40 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], serialized_start=25, - serialized_end=417, + serialized_end=433, ) -_CANMESSAGE = _descriptor.Descriptor( +_CANMESSAGE = descriptor.Descriptor( name='CanMessage', full_name='openxc.CanMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.CanMessage.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( + descriptor.FieldDescriptor( name='id', full_name='openxc.CanMessage.id', index=1, number=2, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='data', full_name='openxc.CanMessage.data', index=2, number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value="", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='frame_format', full_name='openxc.CanMessage.frame_format', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -326,62 +373,67 @@ _CANMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=420, - serialized_end=568, + serialized_start=436, + serialized_end=584, ) -_CONTROLCOMMAND = _descriptor.Descriptor( +_CONTROLCOMMAND = descriptor.Descriptor( name='ControlCommand', full_name='openxc.ControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.ControlCommand.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='diagnostic_request', full_name='openxc.ControlCommand.diagnostic_request', index=1, number=2, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='passthrough_mode_request', full_name='openxc.ControlCommand.passthrough_mode_request', index=2, number=3, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='acceptance_filter_bypass_command', full_name='openxc.ControlCommand.acceptance_filter_bypass_command', index=3, number=4, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='payload_format_command', full_name='openxc.ControlCommand.payload_format_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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='predefined_obd2_requests_command', full_name='openxc.ControlCommand.predefined_obd2_requests_command', index=5, number=6, 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), + descriptor.FieldDescriptor( + name='modem_configuration_command', full_name='openxc.ControlCommand.modem_configuration_command', index=6, + number=7, 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=[ ], @@ -392,28 +444,26 @@ _CONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=571, - serialized_end=1139, + serialized_start=587, + serialized_end=1252, ) -_DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( +_DIAGNOSTICCONTROLCOMMAND = descriptor.Descriptor( name='DiagnosticControlCommand', full_name='openxc.DiagnosticControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='request', full_name='openxc.DiagnosticControlCommand.request', index=0, number=1, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='action', full_name='openxc.DiagnosticControlCommand.action', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -430,28 +480,26 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=1142, - serialized_end=1300, + serialized_start=1255, + serialized_end=1413, ) -_PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( +_PASSTHROUGHMODECONTROLCOMMAND = descriptor.Descriptor( name='PassthroughModeControlCommand', full_name='openxc.PassthroughModeControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.PassthroughModeControlCommand.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( + descriptor.FieldDescriptor( name='enabled', full_name='openxc.PassthroughModeControlCommand.enabled', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -467,28 +515,26 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=1302, - serialized_end=1363, + serialized_start=1415, + serialized_end=1476, ) -_ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( +_ACCEPTANCEFILTERBYPASSCOMMAND = descriptor.Descriptor( name='AcceptanceFilterBypassCommand', full_name='openxc.AcceptanceFilterBypassCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.AcceptanceFilterBypassCommand.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( + descriptor.FieldDescriptor( name='bypass', full_name='openxc.AcceptanceFilterBypassCommand.bypass', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -504,21 +550,19 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=1365, - serialized_end=1425, + serialized_start=1478, + serialized_end=1538, ) -_PAYLOADFORMATCOMMAND = _descriptor.Descriptor( +_PAYLOADFORMATCOMMAND = descriptor.Descriptor( name='PayloadFormatCommand', full_name='openxc.PayloadFormatCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='format', full_name='openxc.PayloadFormatCommand.format', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -535,21 +579,19 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=1427, - serialized_end=1550, + serialized_start=1540, + serialized_end=1663, ) -_PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( +_PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( name='PredefinedObd2RequestsCommand', full_name='openxc.PredefinedObd2RequestsCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='enabled', full_name='openxc.PredefinedObd2RequestsCommand.enabled', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -565,35 +607,216 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ + serialized_start=1665, + serialized_end=1713, +) + + +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( + name='NetworkDescriptor', + full_name='openxc.NetworkOperatorSettings.NetworkDescriptor', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + descriptor.FieldDescriptor( + name='PLMN', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.PLMN', index=0, + number=1, type=13, cpp_type=3, 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='networkType', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.networkType', index=1, + number=2, type=14, cpp_type=8, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1928, + serialized_end=2080, +) + +_NETWORKOPERATORSETTINGS = descriptor.Descriptor( + name='NetworkOperatorSettings', + full_name='openxc.NetworkOperatorSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + descriptor.FieldDescriptor( + name='allowDataRoaming', full_name='openxc.NetworkOperatorSettings.allowDataRoaming', index=0, + number=1, 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='operatorSelectMode', full_name='openxc.NetworkOperatorSettings.operatorSelectMode', index=1, + number=2, type=14, cpp_type=8, 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='networkDescriptor', full_name='openxc.NetworkOperatorSettings.networkDescriptor', index=2, + number=3, 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=[ + ], + nested_types=[_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR, ], + enum_types=[ + _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE, + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=1716, + serialized_end=2181, +) + + +_NETWORKDATASETTINGS = descriptor.Descriptor( + name='NetworkDataSettings', + full_name='openxc.NetworkDataSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + descriptor.FieldDescriptor( + name='APN', full_name='openxc.NetworkDataSettings.APN', index=0, + number=1, 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, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=2183, + serialized_end=2217, +) + + +_SERVERCONNECTSETTINGS = descriptor.Descriptor( + name='ServerConnectSettings', + full_name='openxc.ServerConnectSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + descriptor.FieldDescriptor( + name='host', full_name='openxc.ServerConnectSettings.host', index=0, + number=1, 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, + options=None), + descriptor.FieldDescriptor( + name='port', full_name='openxc.ServerConnectSettings.port', index=1, + number=2, type=13, cpp_type=3, 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), + ], + extensions=[ ], - serialized_start=1552, - serialized_end=1600, + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=2219, + serialized_end=2270, ) -_COMMANDRESPONSE = _descriptor.Descriptor( +_MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( + name='ModemConfigurationCommand', + full_name='openxc.ModemConfigurationCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + descriptor.FieldDescriptor( + name='networkOperatorSettings', full_name='openxc.ModemConfigurationCommand.networkOperatorSettings', index=0, + number=1, 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), + descriptor.FieldDescriptor( + name='networkDataSettings', full_name='openxc.ModemConfigurationCommand.networkDataSettings', index=1, + number=2, 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), + descriptor.FieldDescriptor( + name='serverConnectSettings', full_name='openxc.ModemConfigurationCommand.serverConnectSettings', index=2, + number=3, 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=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=2273, + serialized_end=2486, +) + + +_COMMANDRESPONSE = descriptor.Descriptor( name='CommandResponse', full_name='openxc.CommandResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.CommandResponse.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='message', full_name='openxc.CommandResponse.message', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='status', full_name='openxc.CommandResponse.status', index=2, number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -609,77 +832,75 @@ _COMMANDRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=1602, - serialized_end=1695, + serialized_start=2488, + serialized_end=2581, ) -_DIAGNOSTICREQUEST = _descriptor.Descriptor( +_DIAGNOSTICREQUEST = descriptor.Descriptor( name='DiagnosticRequest', full_name='openxc.DiagnosticRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.DiagnosticRequest.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( + descriptor.FieldDescriptor( name='message_id', full_name='openxc.DiagnosticRequest.message_id', index=1, number=2, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='mode', full_name='openxc.DiagnosticRequest.mode', index=2, number=3, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='pid', full_name='openxc.DiagnosticRequest.pid', index=3, number=4, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticRequest.payload', index=4, number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value="", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( 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( + descriptor.FieldDescriptor( name='frequency', full_name='openxc.DiagnosticRequest.frequency', 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( + descriptor.FieldDescriptor( name='name', full_name='openxc.DiagnosticRequest.name', index=7, number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='decoded_type', full_name='openxc.DiagnosticRequest.decoded_type', index=8, number=9, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -696,70 +917,68 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=1698, - serialized_end=1951, + serialized_start=2584, + serialized_end=2837, ) -_DIAGNOSTICRESPONSE = _descriptor.Descriptor( +_DIAGNOSTICRESPONSE = descriptor.Descriptor( name='DiagnosticResponse', full_name='openxc.DiagnosticResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.DiagnosticResponse.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( + descriptor.FieldDescriptor( name='message_id', full_name='openxc.DiagnosticResponse.message_id', index=1, number=2, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='mode', full_name='openxc.DiagnosticResponse.mode', index=2, number=3, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='pid', full_name='openxc.DiagnosticResponse.pid', index=3, number=4, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='success', full_name='openxc.DiagnosticResponse.success', index=4, number=5, 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( + descriptor.FieldDescriptor( name='negative_response_code', full_name='openxc.DiagnosticResponse.negative_response_code', index=5, number=6, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticResponse.payload', index=6, number=7, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value="", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='value', full_name='openxc.DiagnosticResponse.value', index=7, number=8, type=1, cpp_type=5, label=1, has_default_value=False, default_value=0, @@ -775,42 +994,40 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=1954, - serialized_end=2115, + serialized_start=2840, + serialized_end=3001, ) -_DYNAMICFIELD = _descriptor.Descriptor( +_DYNAMICFIELD = descriptor.Descriptor( name='DynamicField', full_name='openxc.DynamicField', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.DynamicField.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='string_value', full_name='openxc.DynamicField.string_value', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='numeric_value', full_name='openxc.DynamicField.numeric_value', index=2, number=3, 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( + descriptor.FieldDescriptor( name='boolean_value', full_name='openxc.DynamicField.boolean_value', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -827,35 +1044,33 @@ _DYNAMICFIELD = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=2118, - serialized_end=2280, + serialized_start=3004, + serialized_end=3166, ) -_SIMPLEMESSAGE = _descriptor.Descriptor( +_SIMPLEMESSAGE = descriptor.Descriptor( name='SimpleMessage', full_name='openxc.SimpleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='name', full_name='openxc.SimpleMessage.name', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='value', full_name='openxc.SimpleMessage.value', index=1, number=2, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='event', full_name='openxc.SimpleMessage.event', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -871,10 +1086,8 @@ _SIMPLEMESSAGE = _descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - oneofs=[ - ], - serialized_start=2282, - serialized_end=2385, + serialized_start=3168, + serialized_end=3271, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -883,26 +1096,36 @@ _VEHICLEMESSAGE.fields_by_name['simple_message'].message_type = _SIMPLEMESSAGE _VEHICLEMESSAGE.fields_by_name['diagnostic_response'].message_type = _DIAGNOSTICRESPONSE _VEHICLEMESSAGE.fields_by_name['control_command'].message_type = _CONTROLCOMMAND _VEHICLEMESSAGE.fields_by_name['command_response'].message_type = _COMMANDRESPONSE -_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE +_VEHICLEMESSAGE_TYPE.containing_type = _VEHICLEMESSAGE; _CANMESSAGE.fields_by_name['frame_format'].enum_type = _CANMESSAGE_FRAMEFORMAT -_CANMESSAGE_FRAMEFORMAT.containing_type = _CANMESSAGE +_CANMESSAGE_FRAMEFORMAT.containing_type = _CANMESSAGE; _CONTROLCOMMAND.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _CONTROLCOMMAND.fields_by_name['diagnostic_request'].message_type = _DIAGNOSTICCONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['passthrough_mode_request'].message_type = _PASSTHROUGHMODECONTROLCOMMAND _CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type = _ACCEPTANCEFILTERBYPASSCOMMAND _CONTROLCOMMAND.fields_by_name['payload_format_command'].message_type = _PAYLOADFORMATCOMMAND _CONTROLCOMMAND.fields_by_name['predefined_obd2_requests_command'].message_type = _PREDEFINEDOBD2REQUESTSCOMMAND -_CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND +_CONTROLCOMMAND.fields_by_name['modem_configuration_command'].message_type = _MODEMCONFIGURATIONCOMMAND +_CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION -_DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND +_DIAGNOSTICCONTROLCOMMAND_ACTION.containing_type = _DIAGNOSTICCONTROLCOMMAND; _PAYLOADFORMATCOMMAND.fields_by_name['format'].enum_type = _PAYLOADFORMATCOMMAND_PAYLOADFORMAT -_PAYLOADFORMATCOMMAND_PAYLOADFORMAT.containing_type = _PAYLOADFORMATCOMMAND +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT.containing_type = _PAYLOADFORMATCOMMAND; +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR.fields_by_name['networkType'].enum_type = _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR.containing_type = _NETWORKOPERATORSETTINGS; +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE.containing_type = _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR; +_NETWORKOPERATORSETTINGS.fields_by_name['operatorSelectMode'].enum_type = _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE +_NETWORKOPERATORSETTINGS.fields_by_name['networkDescriptor'].message_type = _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR +_NETWORKOPERATORSETTINGS_OPERATORSELECTMODE.containing_type = _NETWORKOPERATORSETTINGS; +_MODEMCONFIGURATIONCOMMAND.fields_by_name['networkOperatorSettings'].message_type = _NETWORKOPERATORSETTINGS +_MODEMCONFIGURATIONCOMMAND.fields_by_name['networkDataSettings'].message_type = _NETWORKDATASETTINGS +_MODEMCONFIGURATIONCOMMAND.fields_by_name['serverConnectSettings'].message_type = _SERVERCONNECTSETTINGS _COMMANDRESPONSE.fields_by_name['type'].enum_type = _CONTROLCOMMAND_TYPE _DIAGNOSTICREQUEST.fields_by_name['decoded_type'].enum_type = _DIAGNOSTICREQUEST_DECODEDTYPE -_DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST +_DIAGNOSTICREQUEST_DECODEDTYPE.containing_type = _DIAGNOSTICREQUEST; _DYNAMICFIELD.fields_by_name['type'].enum_type = _DYNAMICFIELD_TYPE -_DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD +_DYNAMICFIELD_TYPE.containing_type = _DYNAMICFIELD; _SIMPLEMESSAGE.fields_by_name['value'].message_type = _DYNAMICFIELD _SIMPLEMESSAGE.fields_by_name['event'].message_type = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['VehicleMessage'] = _VEHICLEMESSAGE @@ -913,104 +1136,122 @@ DESCRIPTOR.message_types_by_name['PassthroughModeControlCommand'] = _PASSTHROUGH DESCRIPTOR.message_types_by_name['AcceptanceFilterBypassCommand'] = _ACCEPTANCEFILTERBYPASSCOMMAND DESCRIPTOR.message_types_by_name['PayloadFormatCommand'] = _PAYLOADFORMATCOMMAND DESCRIPTOR.message_types_by_name['PredefinedObd2RequestsCommand'] = _PREDEFINEDOBD2REQUESTSCOMMAND +DESCRIPTOR.message_types_by_name['NetworkOperatorSettings'] = _NETWORKOPERATORSETTINGS +DESCRIPTOR.message_types_by_name['NetworkDataSettings'] = _NETWORKDATASETTINGS +DESCRIPTOR.message_types_by_name['ServerConnectSettings'] = _SERVERCONNECTSETTINGS +DESCRIPTOR.message_types_by_name['ModemConfigurationCommand'] = _MODEMCONFIGURATIONCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['SimpleMessage'] = _SIMPLEMESSAGE -VehicleMessage = _reflection.GeneratedProtocolMessageType('VehicleMessage', (_message.Message,), dict( - DESCRIPTOR = _VEHICLEMESSAGE, - __module__ = 'openxc_pb2' +class VehicleMessage(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _VEHICLEMESSAGE + # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) - )) -_sym_db.RegisterMessage(VehicleMessage) -CanMessage = _reflection.GeneratedProtocolMessageType('CanMessage', (_message.Message,), dict( - DESCRIPTOR = _CANMESSAGE, - __module__ = 'openxc_pb2' +class CanMessage(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _CANMESSAGE + # @@protoc_insertion_point(class_scope:openxc.CanMessage) - )) -_sym_db.RegisterMessage(CanMessage) -ControlCommand = _reflection.GeneratedProtocolMessageType('ControlCommand', (_message.Message,), dict( - DESCRIPTOR = _CONTROLCOMMAND, - __module__ = 'openxc_pb2' +class ControlCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _CONTROLCOMMAND + # @@protoc_insertion_point(class_scope:openxc.ControlCommand) - )) -_sym_db.RegisterMessage(ControlCommand) -DiagnosticControlCommand = _reflection.GeneratedProtocolMessageType('DiagnosticControlCommand', (_message.Message,), dict( - DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND, - __module__ = 'openxc_pb2' +class DiagnosticControlCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND + # @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) - )) -_sym_db.RegisterMessage(DiagnosticControlCommand) -PassthroughModeControlCommand = _reflection.GeneratedProtocolMessageType('PassthroughModeControlCommand', (_message.Message,), dict( - DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND, - __module__ = 'openxc_pb2' +class PassthroughModeControlCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND + # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) - )) -_sym_db.RegisterMessage(PassthroughModeControlCommand) -AcceptanceFilterBypassCommand = _reflection.GeneratedProtocolMessageType('AcceptanceFilterBypassCommand', (_message.Message,), dict( - DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND, - __module__ = 'openxc_pb2' +class AcceptanceFilterBypassCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND + # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) - )) -_sym_db.RegisterMessage(AcceptanceFilterBypassCommand) -PayloadFormatCommand = _reflection.GeneratedProtocolMessageType('PayloadFormatCommand', (_message.Message,), dict( - DESCRIPTOR = _PAYLOADFORMATCOMMAND, - __module__ = 'openxc_pb2' +class PayloadFormatCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _PAYLOADFORMATCOMMAND + # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) - )) -_sym_db.RegisterMessage(PayloadFormatCommand) -PredefinedObd2RequestsCommand = _reflection.GeneratedProtocolMessageType('PredefinedObd2RequestsCommand', (_message.Message,), dict( - DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND, - __module__ = 'openxc_pb2' +class PredefinedObd2RequestsCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND + # @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) - )) -_sym_db.RegisterMessage(PredefinedObd2RequestsCommand) -CommandResponse = _reflection.GeneratedProtocolMessageType('CommandResponse', (_message.Message,), dict( - DESCRIPTOR = _COMMANDRESPONSE, - __module__ = 'openxc_pb2' +class NetworkOperatorSettings(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + + class NetworkDescriptor(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR + + # @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) + DESCRIPTOR = _NETWORKOPERATORSETTINGS + + # @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings) + +class NetworkDataSettings(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _NETWORKDATASETTINGS + + # @@protoc_insertion_point(class_scope:openxc.NetworkDataSettings) + +class ServerConnectSettings(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _SERVERCONNECTSETTINGS + + # @@protoc_insertion_point(class_scope:openxc.ServerConnectSettings) + +class ModemConfigurationCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _MODEMCONFIGURATIONCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) + +class CommandResponse(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _COMMANDRESPONSE + # @@protoc_insertion_point(class_scope:openxc.CommandResponse) - )) -_sym_db.RegisterMessage(CommandResponse) -DiagnosticRequest = _reflection.GeneratedProtocolMessageType('DiagnosticRequest', (_message.Message,), dict( - DESCRIPTOR = _DIAGNOSTICREQUEST, - __module__ = 'openxc_pb2' +class DiagnosticRequest(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DIAGNOSTICREQUEST + # @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) - )) -_sym_db.RegisterMessage(DiagnosticRequest) -DiagnosticResponse = _reflection.GeneratedProtocolMessageType('DiagnosticResponse', (_message.Message,), dict( - DESCRIPTOR = _DIAGNOSTICRESPONSE, - __module__ = 'openxc_pb2' +class DiagnosticResponse(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DIAGNOSTICRESPONSE + # @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) - )) -_sym_db.RegisterMessage(DiagnosticResponse) -DynamicField = _reflection.GeneratedProtocolMessageType('DynamicField', (_message.Message,), dict( - DESCRIPTOR = _DYNAMICFIELD, - __module__ = 'openxc_pb2' +class DynamicField(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _DYNAMICFIELD + # @@protoc_insertion_point(class_scope:openxc.DynamicField) - )) -_sym_db.RegisterMessage(DynamicField) -SimpleMessage = _reflection.GeneratedProtocolMessageType('SimpleMessage', (_message.Message,), dict( - DESCRIPTOR = _SIMPLEMESSAGE, - __module__ = 'openxc_pb2' +class SimpleMessage(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _SIMPLEMESSAGE + # @@protoc_insertion_point(class_scope:openxc.SimpleMessage) - )) -_sym_db.RegisterMessage(SimpleMessage) - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\ncom.openxcB\016BinaryMessages')) # @@protoc_insertion_point(module_scope) diff --git a/openxc.options b/openxc.options index 5a018795..b434578b 100644 --- a/openxc.options +++ b/openxc.options @@ -5,3 +5,6 @@ openxc.DiagnosticResponse.payload max_size:8 openxc.DiagnosticRequest.name max_size:10 openxc.DiagnosticRequest.payload max_size:8 openxc.CanMessage.data max_size:8 + +openxc.ServerConnectSettings.host max_size:128 +openxc.NetworkDataSettings.apn max_size:64 diff --git a/openxc.proto b/openxc.proto index 586ead20..bb54c770 100644 --- a/openxc.proto +++ b/openxc.proto @@ -13,6 +13,7 @@ message VehicleMessage { optional DiagnosticResponse diagnostic_response = 4; optional ControlCommand control_command = 5; optional CommandResponse command_response = 6; + optional uint32 uptime = 7; } message CanMessage { @@ -35,6 +36,7 @@ message ControlCommand { ACCEPTANCE_FILTER_BYPASS = 5; PAYLOAD_FORMAT = 6; PREDEFINED_OBD2_REQUESTS = 7; + MODEM_CONFIGURATION = 8; } optional Type type = 1; @@ -43,6 +45,7 @@ message ControlCommand { optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; optional PayloadFormatCommand payload_format_command = 5; optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + optional ModemConfigurationCommand modem_configuration_command = 7; } message DiagnosticControlCommand { @@ -75,6 +78,42 @@ message PredefinedObd2RequestsCommand { optional bool enabled = 1; } +message NetworkOperatorSettings { + enum OperatorSelectMode { + AUTOMATIC = 0; + MANUAL = 1; + DEREGISTER = 2; + SET_ONLY = 3; + MANUAL_AUTOMATIC = 4; + } + message NetworkDescriptor { + enum NetworkType { + GSM = 0; + UTRAN = 2; + } + optional uint32 PLMN = 1; + optional NetworkType networkType = 2; + } + optional bool allowDataRoaming = 1; + optional OperatorSelectMode operatorSelectMode = 2; + optional NetworkDescriptor networkDescriptor = 3; +} + +message NetworkDataSettings { + optional string APN = 1; +} + +message ServerConnectSettings { + optional string host = 1; + optional uint32 port = 2; +} + +message ModemConfigurationCommand { + optional NetworkOperatorSettings networkOperatorSettings = 1; + optional NetworkDataSettings networkDataSettings = 2; + optional ServerConnectSettings serverConnectSettings = 3; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 1.2.3-korg From e9a1c41708c8e2c40f398ac1ae5713e28d041698 Mon Sep 17 00:00:00 2001 From: mgiannikouris Date: Mon, 14 Sep 2015 16:46:45 -0400 Subject: Updated JSON.mkd Added details on the "modem_configuration" command. --- JSON.mkd | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/JSON.mkd b/JSON.mkd index 069f74b4..bcc0dfd2 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -373,3 +373,25 @@ the response will be `true`. { "command_response": "predefined_obd2", "status": true} +### CELLULAR C5 CONFIGURATION + +The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles. + +The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the cellular_c5_config documentation. + +Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. + +The ServerConnectSettings command allows the user to set the host server name and port that the device will use when opening a TCP socket to upload data. This destination must be running an HTTP server similar to OpenXCWebServer, which defines a set of supported HTTP transactions where the body carries data to/from the device in the familiar OpenXC Message Format. + +**Request** + + { "command": "modem_configuration", + "server": { + "host": "www.myhost.com", + "port": 10000 + } + } + +**Response** + + { "command_response": "modem_configuration", "status": true} \ No newline at end of file -- cgit 1.2.3-korg From 029152ad08a7466e83c419bacff2b398e24691c1 Mon Sep 17 00:00:00 2001 From: mgiannikouris Date: Mon, 14 Sep 2015 16:48:42 -0400 Subject: All caps makes it look like I'm yelling... --- JSON.mkd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSON.mkd b/JSON.mkd index bcc0dfd2..4656ca3a 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -373,7 +373,7 @@ the response will be `true`. { "command_response": "predefined_obd2", "status": true} -### CELLULAR C5 CONFIGURATION +### Celluar C5 Configuration The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles. -- cgit 1.2.3-korg From 9a4e51989710fc718271981dd29c58c167c80758 Mon Sep 17 00:00:00 2001 From: mgiannikouris Date: Mon, 14 Sep 2015 16:51:15 -0400 Subject: More JSON.mkd --- JSON.mkd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSON.mkd b/JSON.mkd index 4656ca3a..e7bea7f8 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -381,7 +381,7 @@ The ModemConfigurationCommand message provides three sub-messages for particular Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. -The ServerConnectSettings command allows the user to set the host server name and port that the device will use when opening a TCP socket to upload data. This destination must be running an HTTP server similar to OpenXCWebServer, which defines a set of supported HTTP transactions where the body carries data to/from the device in the familiar OpenXC Message Format. +The ServerConnectSettings part of ModemConfigurationCommand allows the user to set the host server name and port that the device will use when opening a TCP socket to upload data. This destination must be running an HTTP server similar to OpenXCWebServer, which defines a set of supported HTTP transactions where the body is comprised of data in the familiar OpenXC Message Format. **Request** -- cgit 1.2.3-korg From 0b778b66400f67417672dd1849f5b90daa32d8a6 Mon Sep 17 00:00:00 2001 From: mgiannikouris Date: Mon, 14 Sep 2015 21:05:55 -0400 Subject: More JSON.mkd --- JSON.mkd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JSON.mkd b/JSON.mkd index e7bea7f8..72860cb3 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -368,7 +368,7 @@ the "Signals Defined from Diagnostic Messages" section below. **Response** -f the predefined requests were enabled or disabled successfully, the `status` in +If the predefined requests were enabled or disabled successfully, the `status` in the response will be `true`. { "command_response": "predefined_obd2", "status": true} @@ -377,7 +377,7 @@ the response will be `true`. The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles. -The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the cellular_c5_config documentation. +The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [cellular_c5_config](vi-firmware/docs/advanced/cellular_c5_config.mkd) documentation. Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. -- cgit 1.2.3-korg From f67d16a46ea8c77ab614aff8060b2c7b2e9215ea Mon Sep 17 00:00:00 2001 From: mgiannikouris Date: Mon, 14 Sep 2015 21:07:15 -0400 Subject: json --- JSON.mkd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSON.mkd b/JSON.mkd index 72860cb3..9e2f60af 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -377,7 +377,7 @@ the response will be `true`. The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles. -The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [cellular_c5_config](vi-firmware/docs/advanced/cellular_c5_config.mkd) documentation. +The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [cellular_c5_config](../vi-firmware/docs/advanced/cellular_c5_config.mkd) documentation. Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. -- cgit 1.2.3-korg From b8ef51cbb818c6fa91c83e0f06b2f6fde9804609 Mon Sep 17 00:00:00 2001 From: mgiannikouris Date: Mon, 14 Sep 2015 21:11:06 -0400 Subject: abs link json --- JSON.mkd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSON.mkd b/JSON.mkd index 9e2f60af..3f13f881 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -377,7 +377,7 @@ the response will be `true`. The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles. -The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [cellular_c5_config](../vi-firmware/docs/advanced/cellular_c5_config.mkd) documentation. +The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [cellular_c5_config](https://github.com/openxc/vi-firmware/docs/advanced/cellular_c5_config.mkd) documentation. Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. -- cgit 1.2.3-korg From 85208d33213e1932f3ae160310f751f1e5c064f6 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Tue, 15 Sep 2015 10:04:24 -0400 Subject: link to web server project --- JSON.mkd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSON.mkd b/JSON.mkd index 3f13f881..831ac505 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -381,7 +381,7 @@ The ModemConfigurationCommand message provides three sub-messages for particular Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. -The ServerConnectSettings part of ModemConfigurationCommand allows the user to set the host server name and port that the device will use when opening a TCP socket to upload data. This destination must be running an HTTP server similar to OpenXCWebServer, which defines a set of supported HTTP transactions where the body is comprised of data in the familiar OpenXC Message Format. +The ServerConnectSettings part of ModemConfigurationCommand allows the user to set the host server name and port that the device will use when opening a TCP socket to upload data. This destination must be running an HTTP server similar to [OpenXCWebServer](https://github.com/openxc/openxc-azure-webserver), which defines a set of supported HTTP transactions where the body is comprised of data in the familiar OpenXC Message Format. **Request** -- cgit 1.2.3-korg From 98fa6bf0cd70f8fa200e3a31b28c03a8c587bfea Mon Sep 17 00:00:00 2001 From: dsouzahansenfrancis Date: Tue, 27 Oct 2015 12:15:35 -0400 Subject: Added Message Pack to payload format --- README.md | 7 +++ gen/cpp/openxc.pb | Bin 3304 -> 3322 bytes gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 5 +- gen/java/com/openxc/BinaryMessages.java | 95 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 74 +++++++++++++------------ openxc.proto | 1 + 7 files changed, 100 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index 8700cdfe..27f40c81 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,13 @@ method (any protobuf library should support this). The binary format is best if you need to maximize the amount of data that can be sent from the VI, trading off flexibility for efficiency. +## Message Pack +MessagePack is an efficient binary serialization format. It lets you exchange data +among multiple languages like JSON. But it's faster and smaller. Small integers are +encoded into a single byte, and typical short strings require only one extra byte +in addition to the strings themselves +For protocol specification visit https://github.com/msgpack/msgpack/blob/master/spec.md + ## Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 28afa0b9..ff526e11 100644 Binary files a/gen/cpp/openxc.pb and b/gen/cpp/openxc.pb differ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index ed4609db..db740c05 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 Tue Dec 2 03:06:57 2014. */ +/* Generated by nanopb-0.3.1 at Tue Oct 27 16:15:02 2015. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 2975d4d9..df7c3126 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 Tue Dec 2 03:06:57 2014. */ +/* Generated by nanopb-0.3.1 at Tue Oct 27 16:15:02 2015. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -45,7 +45,8 @@ typedef enum _openxc_DiagnosticControlCommand_Action { typedef enum _openxc_PayloadFormatCommand_PayloadFormat { openxc_PayloadFormatCommand_PayloadFormat_JSON = 1, - openxc_PayloadFormatCommand_PayloadFormat_PROTOBUF = 2 + openxc_PayloadFormatCommand_PayloadFormat_PROTOBUF = 2, + openxc_PayloadFormatCommand_PayloadFormat_MESSAGEPACK = 3 } openxc_PayloadFormatCommand_PayloadFormat; typedef enum _openxc_NetworkOperatorSettings_OperatorSelectMode { diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index ef02ba8f..3d3b50bf 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -4475,10 +4475,12 @@ public final class BinaryMessages { implements com.google.protobuf.ProtocolMessageEnum { JSON(0, 1), PROTOBUF(1, 2), + MESSAGEPACK(2, 3), ; public static final int JSON_VALUE = 1; public static final int PROTOBUF_VALUE = 2; + public static final int MESSAGEPACK_VALUE = 3; public final int getNumber() { return value; } @@ -4487,6 +4489,7 @@ public final class BinaryMessages { switch (value) { case 1: return JSON; case 2: return PROTOBUF; + case 3: return MESSAGEPACK; default: return null; } } @@ -4517,7 +4520,7 @@ public final class BinaryMessages { } private static final PayloadFormat[] VALUES = { - JSON, PROTOBUF, + JSON, PROTOBUF, MESSAGEPACK, }; public static PayloadFormat valueOf( @@ -11380,51 +11383,51 @@ public final class BinaryMessages { "\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughModeControlC" + "ommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035" + "AcceptanceFilterBypassCommand\022\013\n\003bus\030\001 \001" + - "(\005\022\016\n\006bypass\030\002 \001(\010\"{\n\024PayloadFormatComma" + - "nd\022:\n\006format\030\001 \001(\0162*.openxc.PayloadForma", - "tCommand.PayloadFormat\"\'\n\rPayloadFormat\022" + - "\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\"0\n\035PredefinedObd" + - "2RequestsCommand\022\017\n\007enabled\030\001 \001(\010\"\321\003\n\027Ne" + - "tworkOperatorSettings\022\030\n\020allowDataRoamin" + - "g\030\001 \001(\010\022N\n\022operatorSelectMode\030\002 \001(\01622.op" + - "enxc.NetworkOperatorSettings.OperatorSel" + - "ectMode\022L\n\021networkDescriptor\030\003 \001(\01321.ope" + - "nxc.NetworkOperatorSettings.NetworkDescr" + - "iptor\032\230\001\n\021NetworkDescriptor\022\014\n\004PLMN\030\001 \001(" + - "\r\022R\n\013networkType\030\002 \001(\0162=.openxc.NetworkO", - "peratorSettings.NetworkDescriptor.Networ" + - "kType\"!\n\013NetworkType\022\007\n\003GSM\020\000\022\t\n\005UTRAN\020\002" + - "\"c\n\022OperatorSelectMode\022\r\n\tAUTOMATIC\020\000\022\n\n" + - "\006MANUAL\020\001\022\016\n\nDEREGISTER\020\002\022\014\n\010SET_ONLY\020\003\022" + - "\024\n\020MANUAL_AUTOMATIC\020\004\"\"\n\023NetworkDataSett" + - "ings\022\013\n\003APN\030\001 \001(\t\"3\n\025ServerConnectSettin" + - "gs\022\014\n\004host\030\001 \001(\t\022\014\n\004port\030\002 \001(\r\"\325\001\n\031Modem" + - "ConfigurationCommand\022@\n\027networkOperatorS" + - "ettings\030\001 \001(\0132\037.openxc.NetworkOperatorSe" + - "ttings\0228\n\023networkDataSettings\030\002 \001(\0132\033.op", - "enxc.NetworkDataSettings\022<\n\025serverConnec" + - "tSettings\030\003 \001(\0132\035.openxc.ServerConnectSe" + - "ttings\"]\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\021DiagnosticRequ" + - "est\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" + - "mode\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\tfrequenc" + - "y\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t " + - "\001(\0162%.openxc.DiagnosticRequest.DecodedTy", - "pe\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001" + - "\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmes" + - "sage_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_c" + - "ode\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.openx" + - "c.DynamicField.Type\022\024\n\014string_value\030\002 \001(" + - "\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_valu" + - "e\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004" + - "BOOL\020\003\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n", - "\005value\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005ev" + - "ent\030\003 \001(\0132\024.openxc.DynamicFieldB\034\n\ncom.o" + - "penxcB\016BinaryMessages" + "(\005\022\016\n\006bypass\030\002 \001(\010\"\214\001\n\024PayloadFormatComm" + + "and\022:\n\006format\030\001 \001(\0162*.openxc.PayloadForm", + "atCommand.PayloadFormat\"8\n\rPayloadFormat" + + "\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013MESSAGEPACK\020" + + "\003\"0\n\035PredefinedObd2RequestsCommand\022\017\n\007en" + + "abled\030\001 \001(\010\"\321\003\n\027NetworkOperatorSettings\022" + + "\030\n\020allowDataRoaming\030\001 \001(\010\022N\n\022operatorSel" + + "ectMode\030\002 \001(\01622.openxc.NetworkOperatorSe" + + "ttings.OperatorSelectMode\022L\n\021networkDesc" + + "riptor\030\003 \001(\01321.openxc.NetworkOperatorSet" + + "tings.NetworkDescriptor\032\230\001\n\021NetworkDescr" + + "iptor\022\014\n\004PLMN\030\001 \001(\r\022R\n\013networkType\030\002 \001(\016", + "2=.openxc.NetworkOperatorSettings.Networ" + + "kDescriptor.NetworkType\"!\n\013NetworkType\022\007" + + "\n\003GSM\020\000\022\t\n\005UTRAN\020\002\"c\n\022OperatorSelectMode" + + "\022\r\n\tAUTOMATIC\020\000\022\n\n\006MANUAL\020\001\022\016\n\nDEREGISTE" + + "R\020\002\022\014\n\010SET_ONLY\020\003\022\024\n\020MANUAL_AUTOMATIC\020\004\"" + + "\"\n\023NetworkDataSettings\022\013\n\003APN\030\001 \001(\t\"3\n\025S" + + "erverConnectSettings\022\014\n\004host\030\001 \001(\t\022\014\n\004po" + + "rt\030\002 \001(\r\"\325\001\n\031ModemConfigurationCommand\022@" + + "\n\027networkOperatorSettings\030\001 \001(\0132\037.openxc" + + ".NetworkOperatorSettings\0228\n\023networkDataS", + "ettings\030\002 \001(\0132\033.openxc.NetworkDataSettin" + + "gs\022<\n\025serverConnectSettings\030\003 \001(\0132\035.open" + + "xc.ServerConnectSettings\"]\n\017CommandRespo" + + "nse\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComman" + + "d.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"" + + "\375\001\n\021DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nme" + + "ssage_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022" + + ";\n\014decoded_type\030\t \001(\0162%.openxc.Diagnosti", + "cRequest.DecodedType\"!\n\013DecodedType\022\010\n\004N" + + "ONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013" + + "\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030" + + "\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026n" + + "egative_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\004" + + "type\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n" + + "\014string_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001" + + "(\001\022\025\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STR" + + "ING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"g\n\rSimpleMessag", + "e\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.openxc." + + "DynamicField\022#\n\005event\030\003 \001(\0132\024.openxc.Dyn" + + "amicFieldB\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index b63c713f..ae13d470 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -11,7 +11,7 @@ from google.protobuf import descriptor_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x99\x05\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\"\xac\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\"\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\"{\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"\'\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x99\x05\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\"\xac\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -149,11 +149,15 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( name='PROTOBUF', index=1, number=2, options=None, type=None), + descriptor.EnumValueDescriptor( + name='MESSAGEPACK', index=2, number=3, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=1624, - serialized_end=1663, + serialized_start=1625, + serialized_end=1681, ) _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescriptor( @@ -173,8 +177,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescript ], containing_type=None, options=None, - serialized_start=2047, - serialized_end=2080, + serialized_start=2065, + serialized_end=2098, ) _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( @@ -206,8 +210,8 @@ _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2082, - serialized_end=2181, + serialized_start=2100, + serialized_end=2199, ) _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( @@ -227,8 +231,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2804, - serialized_end=2837, + serialized_start=2822, + serialized_end=2855, ) _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( @@ -252,8 +256,8 @@ _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=3129, - serialized_end=3166, + serialized_start=3147, + serialized_end=3184, ) @@ -579,8 +583,8 @@ _PAYLOADFORMATCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1540, - serialized_end=1663, + serialized_start=1541, + serialized_end=1681, ) @@ -607,8 +611,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1665, - serialized_end=1713, + serialized_start=1683, + serialized_end=1731, ) @@ -643,8 +647,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1928, - serialized_end=2080, + serialized_start=1946, + serialized_end=2098, ) _NETWORKOPERATORSETTINGS = descriptor.Descriptor( @@ -685,8 +689,8 @@ _NETWORKOPERATORSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1716, - serialized_end=2181, + serialized_start=1734, + serialized_end=2199, ) @@ -713,8 +717,8 @@ _NETWORKDATASETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2183, - serialized_end=2217, + serialized_start=2201, + serialized_end=2235, ) @@ -748,8 +752,8 @@ _SERVERCONNECTSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2219, - serialized_end=2270, + serialized_start=2237, + serialized_end=2288, ) @@ -790,8 +794,8 @@ _MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2273, - serialized_end=2486, + serialized_start=2291, + serialized_end=2504, ) @@ -832,8 +836,8 @@ _COMMANDRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2488, - serialized_end=2581, + serialized_start=2506, + serialized_end=2599, ) @@ -917,8 +921,8 @@ _DIAGNOSTICREQUEST = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2584, - serialized_end=2837, + serialized_start=2602, + serialized_end=2855, ) @@ -994,8 +998,8 @@ _DIAGNOSTICRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2840, - serialized_end=3001, + serialized_start=2858, + serialized_end=3019, ) @@ -1044,8 +1048,8 @@ _DYNAMICFIELD = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3004, - serialized_end=3166, + serialized_start=3022, + serialized_end=3184, ) @@ -1086,8 +1090,8 @@ _SIMPLEMESSAGE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3168, - serialized_end=3271, + serialized_start=3186, + serialized_end=3289, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index bb54c770..37343629 100644 --- a/openxc.proto +++ b/openxc.proto @@ -69,6 +69,7 @@ message PayloadFormatCommand { enum PayloadFormat { JSON = 1; PROTOBUF = 2; + MESSAGEPACK = 3; } optional PayloadFormat format = 1; -- cgit 1.2.3-korg From 6af062ca8d9654748a266c0bd24e4bfb0807f802 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Thu, 29 Oct 2015 15:47:18 -0400 Subject: bump to 0.5 for release --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b25c15b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ -- cgit 1.2.3-korg From 77718cfc70f76b687154756344e1a52b6f734ec9 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Thu, 29 Oct 2015 15:49:57 -0400 Subject: and commit files for 0.5 --- CHANGELOG.md | 4 +++- JSON.mkd | 4 ++-- README.md | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 981eaced..e8244c41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # OpenXC Message Format Changelog -## v0.5.0-dev +## v0.5.0 + +* Feature: Support for C5 Cellular device. New uptime message. ## v0.4 diff --git a/JSON.mkd b/JSON.mkd index 831ac505..cddfc4e7 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -373,11 +373,11 @@ the response will be `true`. { "command_response": "predefined_obd2", "status": true} -### Celluar C5 Configuration +### C5 Cellular Configuration The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles. -The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [cellular_c5_config](https://github.com/openxc/vi-firmware/docs/advanced/cellular_c5_config.mkd) documentation. +The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [c5_cellular_config](https://github.com/openxc/vi-firmware/docs/advanced/c5_cell_config.mkd) documentation. Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. diff --git a/README.md b/README.md index 8700cdfe..2daec602 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenXC Message Format Specification -Version: v0.5.0-dev +Version: v0.5.0 This specification is a part of the [OpenXC platform][OpenXC]. -- cgit 1.2.3-korg From 07abdd1ed8c3eaf4565a55ec9fcb805f3b6607c8 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Thu, 29 Oct 2015 15:53:01 -0400 Subject: bump dev release --- CHANGELOG.md | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8244c41..91473020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # OpenXC Message Format Changelog +## v0.5.0-dev + ## v0.5.0 * Feature: Support for C5 Cellular device. New uptime message. diff --git a/README.md b/README.md index 2daec602..8700cdfe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenXC Message Format Specification -Version: v0.5.0 +Version: v0.5.0-dev This specification is a part of the [OpenXC platform][OpenXC]. -- cgit 1.2.3-korg From 33fa90a198a01427777a0e600270fa80f5bf7828 Mon Sep 17 00:00:00 2001 From: dsouzahansenfrancis Date: Thu, 19 Nov 2015 13:36:52 -0500 Subject: Added RTC configuration command --- gen/cpp/openxc.pb | Bin 3322 -> 3459 bytes gen/cpp/openxc.pb.c | 14 +- gen/cpp/openxc.pb.h | 24 +- gen/java/com/openxc/BinaryMessages.java | 631 ++++++++++++++++++++++++++++---- gen/python/openxc_pb2.py | 139 ++++--- openxc.proto | 6 + 6 files changed, 694 insertions(+), 120 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index ff526e11..d0fb4fe4 100644 Binary files a/gen/cpp/openxc.pb and b/gen/cpp/openxc.pb differ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index db740c05..45ae65bb 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 Tue Oct 27 16:15:02 2015. */ +/* Generated by nanopb-0.3.1 at Thu Nov 19 16:37:50 2015. */ #include "openxc.pb.h" @@ -28,7 +28,7 @@ const pb_field_t openxc_CanMessage_fields[5] = { PB_LAST_FIELD }; -const pb_field_t openxc_ControlCommand_fields[8] = { +const pb_field_t openxc_ControlCommand_fields[9] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_ControlCommand, type, type, 0), PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, diagnostic_request, type, &openxc_DiagnosticControlCommand_fields), PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, passthrough_mode_request, diagnostic_request, &openxc_PassthroughModeControlCommand_fields), @@ -36,6 +36,7 @@ const pb_field_t openxc_ControlCommand_fields[8] = { PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, payload_format_command, acceptance_filter_bypass_command, &openxc_PayloadFormatCommand_fields), PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, predefined_obd2_requests_command, payload_format_command, &openxc_PredefinedObd2RequestsCommand_fields), PB_FIELD( 7, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, modem_configuration_command, predefined_obd2_requests_command, &openxc_ModemConfigurationCommand_fields), + PB_FIELD( 8, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_ControlCommand, rtc_configuration_command, modem_configuration_command, &openxc_RTCConfigurationCommand_fields), PB_LAST_FIELD }; @@ -98,6 +99,11 @@ const pb_field_t openxc_ModemConfigurationCommand_fields[4] = { PB_LAST_FIELD }; +const pb_field_t openxc_RTCConfigurationCommand_fields[2] = { + PB_FIELD( 1, UINT32 , OPTIONAL, STATIC , FIRST, openxc_RTCConfigurationCommand, unix_time, unix_time, 0), + PB_LAST_FIELD +}; + const pb_field_t openxc_CommandResponse_fields[4] = { PB_FIELD( 1, ENUM , OPTIONAL, STATIC , FIRST, openxc_CommandResponse, type, type, 0), PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, openxc_CommandResponse, message, type, 0), @@ -155,7 +161,7 @@ const pb_field_t openxc_SimpleMessage_fields[4] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && pb_membersize(openxc_VehicleMessage, simple_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_ControlCommand, modem_configuration_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_NetworkOperatorSettings, networkDescriptor) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, networkOperatorSettings) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, networkDataSettings) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, serverConnectSettings) < 65536 && pb_membersize(openxc_SimpleMessage, value) < 65536 && pb_membersize(openxc_SimpleMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_NetworkOperatorSettings_openxc_NetworkOperatorSettings_NetworkDescriptor_openxc_NetworkDataSettings_openxc_ServerConnectSettings_openxc_ModemConfigurationCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && pb_membersize(openxc_VehicleMessage, simple_message) < 65536 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 65536 && pb_membersize(openxc_VehicleMessage, control_command) < 65536 && pb_membersize(openxc_VehicleMessage, command_response) < 65536 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 65536 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 65536 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 65536 && pb_membersize(openxc_ControlCommand, payload_format_command) < 65536 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 65536 && pb_membersize(openxc_ControlCommand, modem_configuration_command) < 65536 && pb_membersize(openxc_ControlCommand, rtc_configuration_command) < 65536 && pb_membersize(openxc_DiagnosticControlCommand, request) < 65536 && pb_membersize(openxc_NetworkOperatorSettings, networkDescriptor) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, networkOperatorSettings) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, networkDataSettings) < 65536 && pb_membersize(openxc_ModemConfigurationCommand, serverConnectSettings) < 65536 && pb_membersize(openxc_SimpleMessage, value) < 65536 && pb_membersize(openxc_SimpleMessage, event) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_NetworkOperatorSettings_openxc_NetworkOperatorSettings_NetworkDescriptor_openxc_NetworkDataSettings_openxc_ServerConnectSettings_openxc_ModemConfigurationCommand_openxc_RTCConfigurationCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -166,7 +172,7 @@ PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 65536 && p * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 256 && pb_membersize(openxc_VehicleMessage, simple_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_ControlCommand, modem_configuration_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_NetworkOperatorSettings, networkDescriptor) < 256 && pb_membersize(openxc_ModemConfigurationCommand, networkOperatorSettings) < 256 && pb_membersize(openxc_ModemConfigurationCommand, networkDataSettings) < 256 && pb_membersize(openxc_ModemConfigurationCommand, serverConnectSettings) < 256 && pb_membersize(openxc_SimpleMessage, value) < 256 && pb_membersize(openxc_SimpleMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_NetworkOperatorSettings_openxc_NetworkOperatorSettings_NetworkDescriptor_openxc_NetworkDataSettings_openxc_ServerConnectSettings_openxc_ModemConfigurationCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) +PB_STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, can_message) < 256 && pb_membersize(openxc_VehicleMessage, simple_message) < 256 && pb_membersize(openxc_VehicleMessage, diagnostic_response) < 256 && pb_membersize(openxc_VehicleMessage, control_command) < 256 && pb_membersize(openxc_VehicleMessage, command_response) < 256 && pb_membersize(openxc_ControlCommand, diagnostic_request) < 256 && pb_membersize(openxc_ControlCommand, passthrough_mode_request) < 256 && pb_membersize(openxc_ControlCommand, acceptance_filter_bypass_command) < 256 && pb_membersize(openxc_ControlCommand, payload_format_command) < 256 && pb_membersize(openxc_ControlCommand, predefined_obd2_requests_command) < 256 && pb_membersize(openxc_ControlCommand, modem_configuration_command) < 256 && pb_membersize(openxc_ControlCommand, rtc_configuration_command) < 256 && pb_membersize(openxc_DiagnosticControlCommand, request) < 256 && pb_membersize(openxc_NetworkOperatorSettings, networkDescriptor) < 256 && pb_membersize(openxc_ModemConfigurationCommand, networkOperatorSettings) < 256 && pb_membersize(openxc_ModemConfigurationCommand, networkDataSettings) < 256 && pb_membersize(openxc_ModemConfigurationCommand, serverConnectSettings) < 256 && pb_membersize(openxc_SimpleMessage, value) < 256 && pb_membersize(openxc_SimpleMessage, event) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_CanMessage_openxc_ControlCommand_openxc_DiagnosticControlCommand_openxc_PassthroughModeControlCommand_openxc_AcceptanceFilterBypassCommand_openxc_PayloadFormatCommand_openxc_PredefinedObd2RequestsCommand_openxc_NetworkOperatorSettings_openxc_NetworkOperatorSettings_NetworkDescriptor_openxc_NetworkDataSettings_openxc_ServerConnectSettings_openxc_ModemConfigurationCommand_openxc_RTCConfigurationCommand_openxc_CommandResponse_openxc_DiagnosticRequest_openxc_DiagnosticResponse_openxc_DynamicField_openxc_SimpleMessage) #endif diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index df7c3126..cee33457 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 Tue Oct 27 16:15:02 2015. */ +/* Generated by nanopb-0.3.1 at Thu Nov 19 16:37:50 2015. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -35,7 +35,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_ACCEPTANCE_FILTER_BYPASS = 5, openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6, openxc_ControlCommand_Type_PREDEFINED_OBD2_REQUESTS = 7, - openxc_ControlCommand_Type_MODEM_CONFIGURATION = 8 + openxc_ControlCommand_Type_MODEM_CONFIGURATION = 8, + openxc_ControlCommand_Type_RTC_CONFIGURATION = 9 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { @@ -186,6 +187,11 @@ typedef struct _openxc_PredefinedObd2RequestsCommand { bool enabled; } openxc_PredefinedObd2RequestsCommand; +typedef struct _openxc_RTCConfigurationCommand { + bool has_unix_time; + uint32_t unix_time; +} openxc_RTCConfigurationCommand; + typedef struct _openxc_ServerConnectSettings { bool has_host; char host[128]; @@ -242,6 +248,8 @@ typedef struct _openxc_ControlCommand { openxc_PredefinedObd2RequestsCommand predefined_obd2_requests_command; bool has_modem_configuration_command; openxc_ModemConfigurationCommand modem_configuration_command; + bool has_rtc_configuration_command; + openxc_RTCConfigurationCommand rtc_configuration_command; } openxc_ControlCommand; typedef struct _openxc_VehicleMessage { @@ -266,7 +274,7 @@ typedef struct _openxc_VehicleMessage { /* Initializer values for message structs */ #define openxc_VehicleMessage_init_default {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_default, false, openxc_SimpleMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default, false, 0} #define openxc_CanMessage_init_default {false, 0, false, 0, false, {0, {0}}, false, (openxc_CanMessage_FrameFormat)0} -#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default, false, openxc_ModemConfigurationCommand_init_default} +#define openxc_ControlCommand_init_default {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_default, false, openxc_PassthroughModeControlCommand_init_default, false, openxc_AcceptanceFilterBypassCommand_init_default, false, openxc_PayloadFormatCommand_init_default, false, openxc_PredefinedObd2RequestsCommand_init_default, false, openxc_ModemConfigurationCommand_init_default, false, openxc_RTCConfigurationCommand_init_default} #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} @@ -277,6 +285,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_NetworkDataSettings_init_default {{{NULL}, NULL}} #define openxc_ServerConnectSettings_init_default {false, "", false, 0} #define openxc_ModemConfigurationCommand_init_default {false, openxc_NetworkOperatorSettings_init_default, false, openxc_NetworkDataSettings_init_default, false, openxc_ServerConnectSettings_init_default} +#define openxc_RTCConfigurationCommand_init_default {false, 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} @@ -284,7 +293,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_SimpleMessage_init_default {false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default} #define openxc_VehicleMessage_init_zero {false, (openxc_VehicleMessage_Type)0, false, openxc_CanMessage_init_zero, false, openxc_SimpleMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero, false, 0} #define openxc_CanMessage_init_zero {false, 0, false, 0, false, {0, {0}}, false, (openxc_CanMessage_FrameFormat)0} -#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero, false, openxc_ModemConfigurationCommand_init_zero} +#define openxc_ControlCommand_init_zero {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticControlCommand_init_zero, false, openxc_PassthroughModeControlCommand_init_zero, false, openxc_AcceptanceFilterBypassCommand_init_zero, false, openxc_PayloadFormatCommand_init_zero, false, openxc_PredefinedObd2RequestsCommand_init_zero, false, openxc_ModemConfigurationCommand_init_zero, false, openxc_RTCConfigurationCommand_init_zero} #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} @@ -295,6 +304,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_NetworkDataSettings_init_zero {{{NULL}, NULL}} #define openxc_ServerConnectSettings_init_zero {false, "", false, 0} #define openxc_ModemConfigurationCommand_init_zero {false, openxc_NetworkOperatorSettings_init_zero, false, openxc_NetworkDataSettings_init_zero, false, openxc_ServerConnectSettings_init_zero} +#define openxc_RTCConfigurationCommand_init_zero {false, 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} @@ -339,6 +349,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_PassthroughModeControlCommand_enabled_tag 2 #define openxc_PayloadFormatCommand_format_tag 1 #define openxc_PredefinedObd2RequestsCommand_enabled_tag 1 +#define openxc_RTCConfigurationCommand_unix_time_tag 1 #define openxc_ServerConnectSettings_host_tag 1 #define openxc_ServerConnectSettings_port_tag 2 #define openxc_DiagnosticControlCommand_request_tag 1 @@ -359,6 +370,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_ControlCommand_payload_format_command_tag 5 #define openxc_ControlCommand_predefined_obd2_requests_command_tag 6 #define openxc_ControlCommand_modem_configuration_command_tag 7 +#define openxc_ControlCommand_rtc_configuration_command_tag 8 #define openxc_VehicleMessage_type_tag 1 #define openxc_VehicleMessage_can_message_tag 2 #define openxc_VehicleMessage_simple_message_tag 3 @@ -370,7 +382,7 @@ typedef struct _openxc_VehicleMessage { /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[8]; extern const pb_field_t openxc_CanMessage_fields[5]; -extern const pb_field_t openxc_ControlCommand_fields[8]; +extern const pb_field_t openxc_ControlCommand_fields[9]; 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]; @@ -381,6 +393,7 @@ extern const pb_field_t openxc_NetworkOperatorSettings_NetworkDescriptor_fields[ extern const pb_field_t openxc_NetworkDataSettings_fields[2]; extern const pb_field_t openxc_ServerConnectSettings_fields[3]; extern const pb_field_t openxc_ModemConfigurationCommand_fields[4]; +extern const pb_field_t openxc_RTCConfigurationCommand_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]; @@ -397,6 +410,7 @@ extern const pb_field_t openxc_SimpleMessage_fields[4]; #define openxc_NetworkOperatorSettings_size 22 #define openxc_NetworkOperatorSettings_NetworkDescriptor_size 12 #define openxc_ServerConnectSettings_size 137 +#define openxc_RTCConfigurationCommand_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 3d3b50bf..c1851f75 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1831,6 +1831,11 @@ public final class BinaryMessages { boolean hasModemConfigurationCommand(); com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand(); com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder(); + + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + boolean hasRtcConfigurationCommand(); + com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand(); + com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder(); } public static final class ControlCommand extends com.google.protobuf.GeneratedMessage @@ -1870,6 +1875,7 @@ public final class BinaryMessages { PAYLOAD_FORMAT(5, 6), PREDEFINED_OBD2_REQUESTS(6, 7), MODEM_CONFIGURATION(7, 8), + RTC_CONFIGURATION(8, 9), ; public static final int VERSION_VALUE = 1; @@ -1880,6 +1886,7 @@ public final class BinaryMessages { public static final int PAYLOAD_FORMAT_VALUE = 6; public static final int PREDEFINED_OBD2_REQUESTS_VALUE = 7; public static final int MODEM_CONFIGURATION_VALUE = 8; + public static final int RTC_CONFIGURATION_VALUE = 9; public final int getNumber() { return value; } @@ -1894,6 +1901,7 @@ public final class BinaryMessages { case 6: return PAYLOAD_FORMAT; case 7: return PREDEFINED_OBD2_REQUESTS; case 8: return MODEM_CONFIGURATION; + case 9: return RTC_CONFIGURATION; default: return null; } } @@ -1924,7 +1932,7 @@ public final class BinaryMessages { } private static final Type[] VALUES = { - VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, + VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, RTC_CONFIGURATION, }; public static Type valueOf( @@ -2036,6 +2044,19 @@ public final class BinaryMessages { return modemConfigurationCommand_; } + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + public static final int RTC_CONFIGURATION_COMMAND_FIELD_NUMBER = 8; + private com.openxc.BinaryMessages.RTCConfigurationCommand rtcConfigurationCommand_; + public boolean hasRtcConfigurationCommand() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand() { + return rtcConfigurationCommand_; + } + public com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder() { + return rtcConfigurationCommand_; + } + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); @@ -2044,6 +2065,7 @@ public final class BinaryMessages { payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); + rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2078,6 +2100,9 @@ public final class BinaryMessages { if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeMessage(7, modemConfigurationCommand_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeMessage(8, rtcConfigurationCommand_); + } getUnknownFields().writeTo(output); } @@ -2115,6 +2140,10 @@ public final class BinaryMessages { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, modemConfigurationCommand_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, rtcConfigurationCommand_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2237,6 +2266,7 @@ public final class BinaryMessages { getPayloadFormatCommandFieldBuilder(); getPredefinedObd2RequestsCommandFieldBuilder(); getModemConfigurationCommandFieldBuilder(); + getRtcConfigurationCommandFieldBuilder(); } } private static Builder create() { @@ -2283,6 +2313,12 @@ public final class BinaryMessages { modemConfigurationCommandBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); + if (rtcConfigurationCommandBuilder_ == null) { + rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); + } else { + rtcConfigurationCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -2373,6 +2409,14 @@ public final class BinaryMessages { } else { result.modemConfigurationCommand_ = modemConfigurationCommandBuilder_.build(); } + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + if (rtcConfigurationCommandBuilder_ == null) { + result.rtcConfigurationCommand_ = rtcConfigurationCommand_; + } else { + result.rtcConfigurationCommand_ = rtcConfigurationCommandBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2410,6 +2454,9 @@ public final class BinaryMessages { if (other.hasModemConfigurationCommand()) { mergeModemConfigurationCommand(other.getModemConfigurationCommand()); } + if (other.hasRtcConfigurationCommand()) { + mergeRtcConfigurationCommand(other.getRtcConfigurationCommand()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2506,6 +2553,15 @@ public final class BinaryMessages { setModemConfigurationCommand(subBuilder.buildPartial()); break; } + case 66: { + com.openxc.BinaryMessages.RTCConfigurationCommand.Builder subBuilder = com.openxc.BinaryMessages.RTCConfigurationCommand.newBuilder(); + if (hasRtcConfigurationCommand()) { + subBuilder.mergeFrom(getRtcConfigurationCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setRtcConfigurationCommand(subBuilder.buildPartial()); + break; + } } } } @@ -3076,6 +3132,96 @@ public final class BinaryMessages { return modemConfigurationCommandBuilder_; } + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + private com.openxc.BinaryMessages.RTCConfigurationCommand rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.RTCConfigurationCommand, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder, com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder> rtcConfigurationCommandBuilder_; + public boolean hasRtcConfigurationCommand() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand() { + if (rtcConfigurationCommandBuilder_ == null) { + return rtcConfigurationCommand_; + } else { + return rtcConfigurationCommandBuilder_.getMessage(); + } + } + public Builder setRtcConfigurationCommand(com.openxc.BinaryMessages.RTCConfigurationCommand value) { + if (rtcConfigurationCommandBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rtcConfigurationCommand_ = value; + onChanged(); + } else { + rtcConfigurationCommandBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder setRtcConfigurationCommand( + com.openxc.BinaryMessages.RTCConfigurationCommand.Builder builderForValue) { + if (rtcConfigurationCommandBuilder_ == null) { + rtcConfigurationCommand_ = builderForValue.build(); + onChanged(); + } else { + rtcConfigurationCommandBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder mergeRtcConfigurationCommand(com.openxc.BinaryMessages.RTCConfigurationCommand value) { + if (rtcConfigurationCommandBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080) && + rtcConfigurationCommand_ != com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance()) { + rtcConfigurationCommand_ = + com.openxc.BinaryMessages.RTCConfigurationCommand.newBuilder(rtcConfigurationCommand_).mergeFrom(value).buildPartial(); + } else { + rtcConfigurationCommand_ = value; + } + onChanged(); + } else { + rtcConfigurationCommandBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder clearRtcConfigurationCommand() { + if (rtcConfigurationCommandBuilder_ == null) { + rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); + onChanged(); + } else { + rtcConfigurationCommandBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + public com.openxc.BinaryMessages.RTCConfigurationCommand.Builder getRtcConfigurationCommandBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getRtcConfigurationCommandFieldBuilder().getBuilder(); + } + public com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder() { + if (rtcConfigurationCommandBuilder_ != null) { + return rtcConfigurationCommandBuilder_.getMessageOrBuilder(); + } else { + return rtcConfigurationCommand_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.RTCConfigurationCommand, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder, com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder> + getRtcConfigurationCommandFieldBuilder() { + if (rtcConfigurationCommandBuilder_ == null) { + rtcConfigurationCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openxc.BinaryMessages.RTCConfigurationCommand, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder, com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder>( + rtcConfigurationCommand_, + getParentForChildren(), + isClean()); + rtcConfigurationCommand_ = null; + } + return rtcConfigurationCommandBuilder_; + } + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } @@ -7808,6 +7954,344 @@ public final class BinaryMessages { // @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) } + public interface RTCConfigurationCommandOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional uint32 unix_time = 1; + boolean hasUnixTime(); + int getUnixTime(); + } + public static final class RTCConfigurationCommand extends + com.google.protobuf.GeneratedMessage + implements RTCConfigurationCommandOrBuilder { + // Use RTCConfigurationCommand.newBuilder() to construct. + private RTCConfigurationCommand(Builder builder) { + super(builder); + } + private RTCConfigurationCommand(boolean noInit) {} + + private static final RTCConfigurationCommand defaultInstance; + public static RTCConfigurationCommand getDefaultInstance() { + return defaultInstance; + } + + public RTCConfigurationCommand getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable; + } + + private int bitField0_; + // optional uint32 unix_time = 1; + public static final int UNIX_TIME_FIELD_NUMBER = 1; + private int unixTime_; + public boolean hasUnixTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getUnixTime() { + return unixTime_; + } + + private void initFields() { + unixTime_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, unixTime_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, unixTime_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.openxc.BinaryMessages.RTCConfigurationCommand prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable; + } + + // Construct using com.openxc.BinaryMessages.RTCConfigurationCommand.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + unixTime_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openxc.BinaryMessages.RTCConfigurationCommand.getDescriptor(); + } + + public com.openxc.BinaryMessages.RTCConfigurationCommand getDefaultInstanceForType() { + return com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); + } + + public com.openxc.BinaryMessages.RTCConfigurationCommand build() { + com.openxc.BinaryMessages.RTCConfigurationCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.openxc.BinaryMessages.RTCConfigurationCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.RTCConfigurationCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.openxc.BinaryMessages.RTCConfigurationCommand buildPartial() { + com.openxc.BinaryMessages.RTCConfigurationCommand result = new com.openxc.BinaryMessages.RTCConfigurationCommand(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.unixTime_ = unixTime_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openxc.BinaryMessages.RTCConfigurationCommand) { + return mergeFrom((com.openxc.BinaryMessages.RTCConfigurationCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.RTCConfigurationCommand other) { + if (other == com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance()) return this; + if (other.hasUnixTime()) { + setUnixTime(other.getUnixTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + unixTime_ = input.readUInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional uint32 unix_time = 1; + private int unixTime_ ; + public boolean hasUnixTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getUnixTime() { + return unixTime_; + } + public Builder setUnixTime(int value) { + bitField0_ |= 0x00000001; + unixTime_ = value; + onChanged(); + return this; + } + public Builder clearUnixTime() { + bitField0_ = (bitField0_ & ~0x00000001); + unixTime_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:openxc.RTCConfigurationCommand) + } + + static { + defaultInstance = new RTCConfigurationCommand(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:openxc.RTCConfigurationCommand) + } + public interface CommandResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -11311,6 +11795,11 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_openxc_RTCConfigurationCommand_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_CommandResponse_descriptor; private static @@ -11359,7 +11848,7 @@ public final class BinaryMessages { "nMessage\022\013\n\003bus\030\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004dat" + "a\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.openxc.C" + "anMessage.FrameFormat\")\n\013FrameFormat\022\014\n\010" + - "STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\231\005\n\016ControlComm" + + "STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\364\005\n\016ControlComm" + "and\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComman" + "d.Type\022<\n\022diagnostic_request\030\002 \001(\0132 .ope" + "nxc.DiagnosticControlCommand\022G\n\030passthro" + @@ -11371,63 +11860,67 @@ public final class BinaryMessages { "mand\022O\n predefined_obd2_requests_command" + "\030\006 \001(\0132%.openxc.PredefinedObd2RequestsCo" + "mmand\022F\n\033modem_configuration_command\030\007 \001" + - "(\0132!.openxc.ModemConfigurationCommand\"\254\001" + - "\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDI" + - "AGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANC" + - "E_FILTER_BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n", - "\030PREDEFINED_OBD2_REQUESTS\020\007\022\027\n\023MODEM_CON" + - "FIGURATION\020\010\"\236\001\n\030DiagnosticControlComman" + - "d\022*\n\007request\030\001 \001(\0132\031.openxc.DiagnosticRe" + - "quest\0227\n\006action\030\002 \001(\0162\'.openxc.Diagnosti" + - "cControlCommand.Action\"\035\n\006Action\022\007\n\003ADD\020" + - "\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughModeControlC" + - "ommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035" + - "AcceptanceFilterBypassCommand\022\013\n\003bus\030\001 \001" + - "(\005\022\016\n\006bypass\030\002 \001(\010\"\214\001\n\024PayloadFormatComm" + - "and\022:\n\006format\030\001 \001(\0162*.openxc.PayloadForm", - "atCommand.PayloadFormat\"8\n\rPayloadFormat" + - "\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013MESSAGEPACK\020" + - "\003\"0\n\035PredefinedObd2RequestsCommand\022\017\n\007en" + - "abled\030\001 \001(\010\"\321\003\n\027NetworkOperatorSettings\022" + - "\030\n\020allowDataRoaming\030\001 \001(\010\022N\n\022operatorSel" + - "ectMode\030\002 \001(\01622.openxc.NetworkOperatorSe" + - "ttings.OperatorSelectMode\022L\n\021networkDesc" + - "riptor\030\003 \001(\01321.openxc.NetworkOperatorSet" + - "tings.NetworkDescriptor\032\230\001\n\021NetworkDescr" + - "iptor\022\014\n\004PLMN\030\001 \001(\r\022R\n\013networkType\030\002 \001(\016", - "2=.openxc.NetworkOperatorSettings.Networ" + - "kDescriptor.NetworkType\"!\n\013NetworkType\022\007" + - "\n\003GSM\020\000\022\t\n\005UTRAN\020\002\"c\n\022OperatorSelectMode" + - "\022\r\n\tAUTOMATIC\020\000\022\n\n\006MANUAL\020\001\022\016\n\nDEREGISTE" + - "R\020\002\022\014\n\010SET_ONLY\020\003\022\024\n\020MANUAL_AUTOMATIC\020\004\"" + - "\"\n\023NetworkDataSettings\022\013\n\003APN\030\001 \001(\t\"3\n\025S" + - "erverConnectSettings\022\014\n\004host\030\001 \001(\t\022\014\n\004po" + - "rt\030\002 \001(\r\"\325\001\n\031ModemConfigurationCommand\022@" + - "\n\027networkOperatorSettings\030\001 \001(\0132\037.openxc" + - ".NetworkOperatorSettings\0228\n\023networkDataS", - "ettings\030\002 \001(\0132\033.openxc.NetworkDataSettin" + - "gs\022<\n\025serverConnectSettings\030\003 \001(\0132\035.open" + - "xc.ServerConnectSettings\"]\n\017CommandRespo" + - "nse\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComman" + - "d.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"" + - "\375\001\n\021DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nme" + - "ssage_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022" + - ";\n\014decoded_type\030\t \001(\0162%.openxc.Diagnosti", - "cRequest.DecodedType\"!\n\013DecodedType\022\010\n\004N" + - "ONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013" + - "\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030" + - "\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026n" + - "egative_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\004" + - "type\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n" + - "\014string_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001" + - "(\001\022\025\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STR" + - "ING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"g\n\rSimpleMessag", - "e\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.openxc." + - "DynamicField\022#\n\005event\030\003 \001(\0132\024.openxc.Dyn" + - "amicFieldB\034\n\ncom.openxcB\016BinaryMessages" + "(\0132!.openxc.ModemConfigurationCommand\022B\n" + + "\031rtc_configuration_command\030\010 \001(\0132\037.openx" + + "c.RTCConfigurationCommand\"\303\001\n\004Type\022\013\n\007VE" + + "RSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017", + "\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER_BYP" + + "ASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFINED_" + + "OBD2_REQUESTS\020\007\022\027\n\023MODEM_CONFIGURATION\020\010" + + "\022\025\n\021RTC_CONFIGURATION\020\t\"\236\001\n\030DiagnosticCo" + + "ntrolCommand\022*\n\007request\030\001 \001(\0132\031.openxc.D" + + "iagnosticRequest\0227\n\006action\030\002 \001(\0162\'.openx" + + "c.DiagnosticControlCommand.Action\"\035\n\006Act" + + "ion\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughM" + + "odeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enable" + + "d\030\002 \001(\010\"<\n\035AcceptanceFilterBypassCommand", + "\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"\214\001\n\024Payloa" + + "dFormatCommand\022:\n\006format\030\001 \001(\0162*.openxc." + + "PayloadFormatCommand.PayloadFormat\"8\n\rPa" + + "yloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013M" + + "ESSAGEPACK\020\003\"0\n\035PredefinedObd2RequestsCo" + + "mmand\022\017\n\007enabled\030\001 \001(\010\"\321\003\n\027NetworkOperat" + + "orSettings\022\030\n\020allowDataRoaming\030\001 \001(\010\022N\n\022" + + "operatorSelectMode\030\002 \001(\01622.openxc.Networ" + + "kOperatorSettings.OperatorSelectMode\022L\n\021" + + "networkDescriptor\030\003 \001(\01321.openxc.Network", + "OperatorSettings.NetworkDescriptor\032\230\001\n\021N" + + "etworkDescriptor\022\014\n\004PLMN\030\001 \001(\r\022R\n\013networ" + + "kType\030\002 \001(\0162=.openxc.NetworkOperatorSett" + + "ings.NetworkDescriptor.NetworkType\"!\n\013Ne" + + "tworkType\022\007\n\003GSM\020\000\022\t\n\005UTRAN\020\002\"c\n\022Operato" + + "rSelectMode\022\r\n\tAUTOMATIC\020\000\022\n\n\006MANUAL\020\001\022\016" + + "\n\nDEREGISTER\020\002\022\014\n\010SET_ONLY\020\003\022\024\n\020MANUAL_A" + + "UTOMATIC\020\004\"\"\n\023NetworkDataSettings\022\013\n\003APN" + + "\030\001 \001(\t\"3\n\025ServerConnectSettings\022\014\n\004host\030" + + "\001 \001(\t\022\014\n\004port\030\002 \001(\r\"\325\001\n\031ModemConfigurati", + "onCommand\022@\n\027networkOperatorSettings\030\001 \001" + + "(\0132\037.openxc.NetworkOperatorSettings\0228\n\023n" + + "etworkDataSettings\030\002 \001(\0132\033.openxc.Networ" + + "kDataSettings\022<\n\025serverConnectSettings\030\003" + + " \001(\0132\035.openxc.ServerConnectSettings\",\n\027R" + + "TCConfigurationCommand\022\021\n\tunix_time\030\001 \001(" + + "\r\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.ope" + + "nxc.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\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\022m" + + "ultiple_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%" + + ".openxc.DiagnosticRequest.DecodedType\"!\n" + + "\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Dia" + + "gnosticResponse\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\007s" + + "uccess\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.Dyn", + "amicField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\r" + + "numeric_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\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n\005valu" + + "e\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005event\030\003" + + " \001(\0132\024.openxc.DynamicFieldB\034\n\ncom.openxc" + + "B\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11455,7 +11948,7 @@ public final class BinaryMessages { internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", "ModemConfigurationCommand", }, + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", "ModemConfigurationCommand", "RtcConfigurationCommand", }, com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); internal_static_openxc_DiagnosticControlCommand_descriptor = @@ -11538,8 +12031,16 @@ public final class BinaryMessages { new java.lang.String[] { "NetworkOperatorSettings", "NetworkDataSettings", "ServerConnectSettings", }, com.openxc.BinaryMessages.ModemConfigurationCommand.class, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); - internal_static_openxc_CommandResponse_descriptor = + internal_static_openxc_RTCConfigurationCommand_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_openxc_RTCConfigurationCommand_descriptor, + new java.lang.String[] { "UnixTime", }, + com.openxc.BinaryMessages.RTCConfigurationCommand.class, + com.openxc.BinaryMessages.RTCConfigurationCommand.Builder.class); + internal_static_openxc_CommandResponse_descriptor = + getDescriptor().getMessageTypes().get(13); internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, @@ -11547,7 +12048,7 @@ public final class BinaryMessages { com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); internal_static_openxc_DiagnosticRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, @@ -11555,7 +12056,7 @@ public final class BinaryMessages { com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); internal_static_openxc_DiagnosticResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, @@ -11563,7 +12064,7 @@ public final class BinaryMessages { com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); internal_static_openxc_DynamicField_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, @@ -11571,7 +12072,7 @@ public final class BinaryMessages { com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); internal_static_openxc_SimpleMessage_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_openxc_SimpleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_SimpleMessage_descriptor, diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index ae13d470..218e1ab9 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -11,7 +11,7 @@ from google.protobuf import descriptor_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x99\x05\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\"\xac\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xf4\x05\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xc3\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -107,11 +107,15 @@ _CONTROLCOMMAND_TYPE = descriptor.EnumDescriptor( name='MODEM_CONFIGURATION', index=7, number=8, options=None, type=None), + descriptor.EnumValueDescriptor( + name='RTC_CONFIGURATION', index=8, number=9, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=1080, - serialized_end=1252, + serialized_start=1148, + serialized_end=1343, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( @@ -131,8 +135,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1384, - serialized_end=1413, + serialized_start=1475, + serialized_end=1504, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( @@ -156,8 +160,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1625, - serialized_end=1681, + serialized_start=1716, + serialized_end=1772, ) _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescriptor( @@ -177,8 +181,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescript ], containing_type=None, options=None, - serialized_start=2065, - serialized_end=2098, + serialized_start=2156, + serialized_end=2189, ) _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( @@ -210,8 +214,8 @@ _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2100, - serialized_end=2199, + serialized_start=2191, + serialized_end=2290, ) _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( @@ -231,8 +235,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2822, - serialized_end=2855, + serialized_start=2959, + serialized_end=2992, ) _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( @@ -256,8 +260,8 @@ _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=3147, - serialized_end=3184, + serialized_start=3284, + serialized_end=3321, ) @@ -438,6 +442,13 @@ _CONTROLCOMMAND = descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + descriptor.FieldDescriptor( + name='rtc_configuration_command', full_name='openxc.ControlCommand.rtc_configuration_command', index=7, + number=8, 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=[ ], @@ -449,7 +460,7 @@ _CONTROLCOMMAND = descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=587, - serialized_end=1252, + serialized_end=1343, ) @@ -484,8 +495,8 @@ _DIAGNOSTICCONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1255, - serialized_end=1413, + serialized_start=1346, + serialized_end=1504, ) @@ -519,8 +530,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1415, - serialized_end=1476, + serialized_start=1506, + serialized_end=1567, ) @@ -554,8 +565,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1478, - serialized_end=1538, + serialized_start=1569, + serialized_end=1629, ) @@ -583,8 +594,8 @@ _PAYLOADFORMATCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1541, - serialized_end=1681, + serialized_start=1632, + serialized_end=1772, ) @@ -611,8 +622,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1683, - serialized_end=1731, + serialized_start=1774, + serialized_end=1822, ) @@ -647,8 +658,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1946, - serialized_end=2098, + serialized_start=2037, + serialized_end=2189, ) _NETWORKOPERATORSETTINGS = descriptor.Descriptor( @@ -689,8 +700,8 @@ _NETWORKOPERATORSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1734, - serialized_end=2199, + serialized_start=1825, + serialized_end=2290, ) @@ -717,8 +728,8 @@ _NETWORKDATASETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2201, - serialized_end=2235, + serialized_start=2292, + serialized_end=2326, ) @@ -752,8 +763,8 @@ _SERVERCONNECTSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2237, - serialized_end=2288, + serialized_start=2328, + serialized_end=2379, ) @@ -794,8 +805,36 @@ _MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2291, - serialized_end=2504, + serialized_start=2382, + serialized_end=2595, +) + + +_RTCCONFIGURATIONCOMMAND = descriptor.Descriptor( + name='RTCConfigurationCommand', + full_name='openxc.RTCConfigurationCommand', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + descriptor.FieldDescriptor( + name='unix_time', full_name='openxc.RTCConfigurationCommand.unix_time', index=0, + number=1, type=13, cpp_type=3, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + extension_ranges=[], + serialized_start=2597, + serialized_end=2641, ) @@ -836,8 +875,8 @@ _COMMANDRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2506, - serialized_end=2599, + serialized_start=2643, + serialized_end=2736, ) @@ -921,8 +960,8 @@ _DIAGNOSTICREQUEST = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2602, - serialized_end=2855, + serialized_start=2739, + serialized_end=2992, ) @@ -998,8 +1037,8 @@ _DIAGNOSTICRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2858, - serialized_end=3019, + serialized_start=2995, + serialized_end=3156, ) @@ -1048,8 +1087,8 @@ _DYNAMICFIELD = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3022, - serialized_end=3184, + serialized_start=3159, + serialized_end=3321, ) @@ -1090,8 +1129,8 @@ _SIMPLEMESSAGE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3186, - serialized_end=3289, + serialized_start=3323, + serialized_end=3426, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -1110,6 +1149,7 @@ _CONTROLCOMMAND.fields_by_name['acceptance_filter_bypass_command'].message_type _CONTROLCOMMAND.fields_by_name['payload_format_command'].message_type = _PAYLOADFORMATCOMMAND _CONTROLCOMMAND.fields_by_name['predefined_obd2_requests_command'].message_type = _PREDEFINEDOBD2REQUESTSCOMMAND _CONTROLCOMMAND.fields_by_name['modem_configuration_command'].message_type = _MODEMCONFIGURATIONCOMMAND +_CONTROLCOMMAND.fields_by_name['rtc_configuration_command'].message_type = _RTCCONFIGURATIONCOMMAND _CONTROLCOMMAND_TYPE.containing_type = _CONTROLCOMMAND; _DIAGNOSTICCONTROLCOMMAND.fields_by_name['request'].message_type = _DIAGNOSTICREQUEST _DIAGNOSTICCONTROLCOMMAND.fields_by_name['action'].enum_type = _DIAGNOSTICCONTROLCOMMAND_ACTION @@ -1144,6 +1184,7 @@ DESCRIPTOR.message_types_by_name['NetworkOperatorSettings'] = _NETWORKOPERATORSE DESCRIPTOR.message_types_by_name['NetworkDataSettings'] = _NETWORKDATASETTINGS DESCRIPTOR.message_types_by_name['ServerConnectSettings'] = _SERVERCONNECTSETTINGS DESCRIPTOR.message_types_by_name['ModemConfigurationCommand'] = _MODEMCONFIGURATIONCOMMAND +DESCRIPTOR.message_types_by_name['RTCConfigurationCommand'] = _RTCCONFIGURATIONCOMMAND DESCRIPTOR.message_types_by_name['CommandResponse'] = _COMMANDRESPONSE DESCRIPTOR.message_types_by_name['DiagnosticRequest'] = _DIAGNOSTICREQUEST DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE @@ -1228,6 +1269,12 @@ class ModemConfigurationCommand(message.Message): # @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) +class RTCConfigurationCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _RTCCONFIGURATIONCOMMAND + + # @@protoc_insertion_point(class_scope:openxc.RTCConfigurationCommand) + class CommandResponse(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE diff --git a/openxc.proto b/openxc.proto index 37343629..ec355e9b 100644 --- a/openxc.proto +++ b/openxc.proto @@ -37,6 +37,7 @@ message ControlCommand { PAYLOAD_FORMAT = 6; PREDEFINED_OBD2_REQUESTS = 7; MODEM_CONFIGURATION = 8; + RTC_CONFIGURATION = 9; } optional Type type = 1; @@ -46,6 +47,7 @@ message ControlCommand { optional PayloadFormatCommand payload_format_command = 5; optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; optional ModemConfigurationCommand modem_configuration_command = 7; + optional RTCConfigurationCommand rtc_configuration_command = 8; } message DiagnosticControlCommand { @@ -115,6 +117,10 @@ message ModemConfigurationCommand { optional ServerConnectSettings serverConnectSettings = 3; } +message RTCConfigurationCommand { + optional uint32 unix_time = 1; +} + message CommandResponse { optional ControlCommand.Type type = 1; optional string message = 2; -- cgit 1.2.3-korg From c40cf500680b4907d74c2a1c0705a3dbf99569fe Mon Sep 17 00:00:00 2001 From: dsouzahansenfrancis Date: Thu, 26 Nov 2015 16:37:21 -0500 Subject: Added SD_MOUNT_STATUS command --- gen/cpp/openxc.pb | Bin 3459 -> 3480 bytes gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 5 +- gen/java/com/openxc/BinaryMessages.java | 117 ++++++++++++++++---------------- gen/python/openxc_pb2.py | 98 +++++++++++++------------- openxc.proto | 1 + 6 files changed, 116 insertions(+), 107 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index d0fb4fe4..90099e87 100644 Binary files a/gen/cpp/openxc.pb and b/gen/cpp/openxc.pb differ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 45ae65bb..1507a907 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 Thu Nov 19 16:37:50 2015. */ +/* Generated by nanopb-0.3.1 at Thu Nov 26 21:21:48 2015. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index cee33457..c15a32b7 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 Thu Nov 19 16:37:50 2015. */ +/* Generated by nanopb-0.3.1 at Thu Nov 26 21:21:48 2015. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -36,7 +36,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_PAYLOAD_FORMAT = 6, openxc_ControlCommand_Type_PREDEFINED_OBD2_REQUESTS = 7, openxc_ControlCommand_Type_MODEM_CONFIGURATION = 8, - openxc_ControlCommand_Type_RTC_CONFIGURATION = 9 + openxc_ControlCommand_Type_RTC_CONFIGURATION = 9, + openxc_ControlCommand_Type_SD_MOUNT_STATUS = 10 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index c1851f75..c94cf4ae 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1876,6 +1876,7 @@ public final class BinaryMessages { PREDEFINED_OBD2_REQUESTS(6, 7), MODEM_CONFIGURATION(7, 8), RTC_CONFIGURATION(8, 9), + SD_MOUNT_STATUS(9, 10), ; public static final int VERSION_VALUE = 1; @@ -1887,6 +1888,7 @@ public final class BinaryMessages { public static final int PREDEFINED_OBD2_REQUESTS_VALUE = 7; public static final int MODEM_CONFIGURATION_VALUE = 8; public static final int RTC_CONFIGURATION_VALUE = 9; + public static final int SD_MOUNT_STATUS_VALUE = 10; public final int getNumber() { return value; } @@ -1902,6 +1904,7 @@ public final class BinaryMessages { case 7: return PREDEFINED_OBD2_REQUESTS; case 8: return MODEM_CONFIGURATION; case 9: return RTC_CONFIGURATION; + case 10: return SD_MOUNT_STATUS; default: return null; } } @@ -1932,7 +1935,7 @@ public final class BinaryMessages { } private static final Type[] VALUES = { - VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, RTC_CONFIGURATION, + VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, RTC_CONFIGURATION, SD_MOUNT_STATUS, }; public static Type valueOf( @@ -11848,7 +11851,7 @@ public final class BinaryMessages { "nMessage\022\013\n\003bus\030\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004dat" + "a\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.openxc.C" + "anMessage.FrameFormat\")\n\013FrameFormat\022\014\n\010" + - "STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\364\005\n\016ControlComm" + + "STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\211\006\n\016ControlComm" + "and\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComman" + "d.Type\022<\n\022diagnostic_request\030\002 \001(\0132 .ope" + "nxc.DiagnosticControlCommand\022G\n\030passthro" + @@ -11862,65 +11865,65 @@ public final class BinaryMessages { "mmand\022F\n\033modem_configuration_command\030\007 \001" + "(\0132!.openxc.ModemConfigurationCommand\022B\n" + "\031rtc_configuration_command\030\010 \001(\0132\037.openx" + - "c.RTCConfigurationCommand\"\303\001\n\004Type\022\013\n\007VE" + + "c.RTCConfigurationCommand\"\330\001\n\004Type\022\013\n\007VE" + "RSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017", "\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER_BYP" + "ASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFINED_" + "OBD2_REQUESTS\020\007\022\027\n\023MODEM_CONFIGURATION\020\010" + - "\022\025\n\021RTC_CONFIGURATION\020\t\"\236\001\n\030DiagnosticCo" + - "ntrolCommand\022*\n\007request\030\001 \001(\0132\031.openxc.D" + - "iagnosticRequest\0227\n\006action\030\002 \001(\0162\'.openx" + - "c.DiagnosticControlCommand.Action\"\035\n\006Act" + - "ion\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughM" + - "odeControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enable" + - "d\030\002 \001(\010\"<\n\035AcceptanceFilterBypassCommand", - "\022\013\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"\214\001\n\024Payloa" + - "dFormatCommand\022:\n\006format\030\001 \001(\0162*.openxc." + - "PayloadFormatCommand.PayloadFormat\"8\n\rPa" + - "yloadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013M" + - "ESSAGEPACK\020\003\"0\n\035PredefinedObd2RequestsCo" + - "mmand\022\017\n\007enabled\030\001 \001(\010\"\321\003\n\027NetworkOperat" + - "orSettings\022\030\n\020allowDataRoaming\030\001 \001(\010\022N\n\022" + - "operatorSelectMode\030\002 \001(\01622.openxc.Networ" + - "kOperatorSettings.OperatorSelectMode\022L\n\021" + - "networkDescriptor\030\003 \001(\01321.openxc.Network", - "OperatorSettings.NetworkDescriptor\032\230\001\n\021N" + - "etworkDescriptor\022\014\n\004PLMN\030\001 \001(\r\022R\n\013networ" + - "kType\030\002 \001(\0162=.openxc.NetworkOperatorSett" + - "ings.NetworkDescriptor.NetworkType\"!\n\013Ne" + - "tworkType\022\007\n\003GSM\020\000\022\t\n\005UTRAN\020\002\"c\n\022Operato" + - "rSelectMode\022\r\n\tAUTOMATIC\020\000\022\n\n\006MANUAL\020\001\022\016" + - "\n\nDEREGISTER\020\002\022\014\n\010SET_ONLY\020\003\022\024\n\020MANUAL_A" + - "UTOMATIC\020\004\"\"\n\023NetworkDataSettings\022\013\n\003APN" + - "\030\001 \001(\t\"3\n\025ServerConnectSettings\022\014\n\004host\030" + - "\001 \001(\t\022\014\n\004port\030\002 \001(\r\"\325\001\n\031ModemConfigurati", - "onCommand\022@\n\027networkOperatorSettings\030\001 \001" + - "(\0132\037.openxc.NetworkOperatorSettings\0228\n\023n" + - "etworkDataSettings\030\002 \001(\0132\033.openxc.Networ" + - "kDataSettings\022<\n\025serverConnectSettings\030\003" + - " \001(\0132\035.openxc.ServerConnectSettings\",\n\027R" + - "TCConfigurationCommand\022\021\n\tunix_time\030\001 \001(" + - "\r\"]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.ope" + - "nxc.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\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\022m" + - "ultiple_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%" + - ".openxc.DiagnosticRequest.DecodedType\"!\n" + - "\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Dia" + - "gnosticResponse\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\007s" + - "uccess\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.Dyn", - "amicField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\r" + - "numeric_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\"g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n\005valu" + - "e\030\002 \001(\0132\024.openxc.DynamicField\022#\n\005event\030\003" + - " \001(\0132\024.openxc.DynamicFieldB\034\n\ncom.openxc" + - "B\016BinaryMessages" + "\022\025\n\021RTC_CONFIGURATION\020\t\022\023\n\017SD_MOUNT_STAT" + + "US\020\n\"\236\001\n\030DiagnosticControlCommand\022*\n\007req" + + "uest\030\001 \001(\0132\031.openxc.DiagnosticRequest\0227\n" + + "\006action\030\002 \001(\0162\'.openxc.DiagnosticControl" + + "Command.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CAN" + + "CEL\020\002\"=\n\035PassthroughModeControlCommand\022\013" + + "\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035Acceptan", + "ceFilterBypassCommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006by" + + "pass\030\002 \001(\010\"\214\001\n\024PayloadFormatCommand\022:\n\006f" + + "ormat\030\001 \001(\0162*.openxc.PayloadFormatComman" + + "d.PayloadFormat\"8\n\rPayloadFormat\022\010\n\004JSON" + + "\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013MESSAGEPACK\020\003\"0\n\035Pre" + + "definedObd2RequestsCommand\022\017\n\007enabled\030\001 " + + "\001(\010\"\321\003\n\027NetworkOperatorSettings\022\030\n\020allow" + + "DataRoaming\030\001 \001(\010\022N\n\022operatorSelectMode\030" + + "\002 \001(\01622.openxc.NetworkOperatorSettings.O" + + "peratorSelectMode\022L\n\021networkDescriptor\030\003", + " \001(\01321.openxc.NetworkOperatorSettings.Ne" + + "tworkDescriptor\032\230\001\n\021NetworkDescriptor\022\014\n" + + "\004PLMN\030\001 \001(\r\022R\n\013networkType\030\002 \001(\0162=.openx" + + "c.NetworkOperatorSettings.NetworkDescrip" + + "tor.NetworkType\"!\n\013NetworkType\022\007\n\003GSM\020\000\022" + + "\t\n\005UTRAN\020\002\"c\n\022OperatorSelectMode\022\r\n\tAUTO" + + "MATIC\020\000\022\n\n\006MANUAL\020\001\022\016\n\nDEREGISTER\020\002\022\014\n\010S" + + "ET_ONLY\020\003\022\024\n\020MANUAL_AUTOMATIC\020\004\"\"\n\023Netwo" + + "rkDataSettings\022\013\n\003APN\030\001 \001(\t\"3\n\025ServerCon" + + "nectSettings\022\014\n\004host\030\001 \001(\t\022\014\n\004port\030\002 \001(\r", + "\"\325\001\n\031ModemConfigurationCommand\022@\n\027networ" + + "kOperatorSettings\030\001 \001(\0132\037.openxc.Network" + + "OperatorSettings\0228\n\023networkDataSettings\030" + + "\002 \001(\0132\033.openxc.NetworkDataSettings\022<\n\025se" + + "rverConnectSettings\030\003 \001(\0132\035.openxc.Serve" + + "rConnectSettings\",\n\027RTCConfigurationComm" + + "and\022\021\n\tunix_time\030\001 \001(\r\"]\n\017CommandRespons" + + "e\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\003bus\030\001 \001(\005\022\022\n\nmess", + "age_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n" + + "\014decoded_type\030\t \001(\0162%.openxc.DiagnosticR" + + "equest.DecodedType\"!\n\013DecodedType\022\010\n\004NON" + + "E\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003" + + "bus\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\026neg" + + "ative_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\004ty", + "pe\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014s" + + "tring_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\006STRIN" + + "G\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"g\n\rSimpleMessage\022" + + "\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.openxc.Dy" + + "namicField\022#\n\005event\030\003 \001(\0132\024.openxc.Dynam" + + "icFieldB\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 218e1ab9..ceacf25d 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -11,7 +11,7 @@ from google.protobuf import descriptor_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\xf4\x05\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xc3\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x89\x06\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xd8\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\x12\x13\n\x0fSD_MOUNT_STATUS\x10\n\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -111,11 +111,15 @@ _CONTROLCOMMAND_TYPE = descriptor.EnumDescriptor( name='RTC_CONFIGURATION', index=8, number=9, options=None, type=None), + descriptor.EnumValueDescriptor( + name='SD_MOUNT_STATUS', index=9, number=10, + options=None, + type=None), ], containing_type=None, options=None, serialized_start=1148, - serialized_end=1343, + serialized_end=1364, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( @@ -135,8 +139,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1475, - serialized_end=1504, + serialized_start=1496, + serialized_end=1525, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( @@ -160,8 +164,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1716, - serialized_end=1772, + serialized_start=1737, + serialized_end=1793, ) _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescriptor( @@ -181,8 +185,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescript ], containing_type=None, options=None, - serialized_start=2156, - serialized_end=2189, + serialized_start=2177, + serialized_end=2210, ) _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( @@ -214,8 +218,8 @@ _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2191, - serialized_end=2290, + serialized_start=2212, + serialized_end=2311, ) _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( @@ -235,8 +239,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2959, - serialized_end=2992, + serialized_start=2980, + serialized_end=3013, ) _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( @@ -260,8 +264,8 @@ _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=3284, - serialized_end=3321, + serialized_start=3305, + serialized_end=3342, ) @@ -460,7 +464,7 @@ _CONTROLCOMMAND = descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=587, - serialized_end=1343, + serialized_end=1364, ) @@ -495,8 +499,8 @@ _DIAGNOSTICCONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1346, - serialized_end=1504, + serialized_start=1367, + serialized_end=1525, ) @@ -530,8 +534,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1506, - serialized_end=1567, + serialized_start=1527, + serialized_end=1588, ) @@ -565,8 +569,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1569, - serialized_end=1629, + serialized_start=1590, + serialized_end=1650, ) @@ -594,8 +598,8 @@ _PAYLOADFORMATCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1632, - serialized_end=1772, + serialized_start=1653, + serialized_end=1793, ) @@ -622,8 +626,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1774, - serialized_end=1822, + serialized_start=1795, + serialized_end=1843, ) @@ -658,8 +662,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2037, - serialized_end=2189, + serialized_start=2058, + serialized_end=2210, ) _NETWORKOPERATORSETTINGS = descriptor.Descriptor( @@ -700,8 +704,8 @@ _NETWORKOPERATORSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1825, - serialized_end=2290, + serialized_start=1846, + serialized_end=2311, ) @@ -728,8 +732,8 @@ _NETWORKDATASETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2292, - serialized_end=2326, + serialized_start=2313, + serialized_end=2347, ) @@ -763,8 +767,8 @@ _SERVERCONNECTSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2328, - serialized_end=2379, + serialized_start=2349, + serialized_end=2400, ) @@ -805,8 +809,8 @@ _MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2382, - serialized_end=2595, + serialized_start=2403, + serialized_end=2616, ) @@ -833,8 +837,8 @@ _RTCCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2597, - serialized_end=2641, + serialized_start=2618, + serialized_end=2662, ) @@ -875,8 +879,8 @@ _COMMANDRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2643, - serialized_end=2736, + serialized_start=2664, + serialized_end=2757, ) @@ -960,8 +964,8 @@ _DIAGNOSTICREQUEST = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2739, - serialized_end=2992, + serialized_start=2760, + serialized_end=3013, ) @@ -1037,8 +1041,8 @@ _DIAGNOSTICRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2995, - serialized_end=3156, + serialized_start=3016, + serialized_end=3177, ) @@ -1087,8 +1091,8 @@ _DYNAMICFIELD = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3159, - serialized_end=3321, + serialized_start=3180, + serialized_end=3342, ) @@ -1129,8 +1133,8 @@ _SIMPLEMESSAGE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3323, - serialized_end=3426, + serialized_start=3344, + serialized_end=3447, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index ec355e9b..7653212c 100644 --- a/openxc.proto +++ b/openxc.proto @@ -38,6 +38,7 @@ message ControlCommand { PREDEFINED_OBD2_REQUESTS = 7; MODEM_CONFIGURATION = 8; RTC_CONFIGURATION = 9; + SD_MOUNT_STATUS = 10; } optional Type type = 1; -- cgit 1.2.3-korg From 8987262fa7e8510030d11e42edb4128868a6e81c Mon Sep 17 00:00:00 2001 From: dsouzahansenfrancis Date: Fri, 11 Dec 2015 11:01:06 -0500 Subject: added support for timestamp to vehicle messages --- gen/cpp/openxc.pb | Bin 3480 -> 3483 bytes gen/cpp/openxc.pb.c | 4 +- gen/cpp/openxc.pb.h | 8 +- gen/java/com/openxc/BinaryMessages.java | 8820 +++++++++++++++++++++---------- gen/python/openxc_pb2.py | 501 +- openxc.proto | 2 +- 6 files changed, 6264 insertions(+), 3071 deletions(-) diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 90099e87..20543fe9 100644 Binary files a/gen/cpp/openxc.pb and b/gen/cpp/openxc.pb differ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index 1507a907..c15a218d 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 Thu Nov 26 21:21:48 2015. */ +/* Generated by nanopb-0.3.1 at Wed Dec 9 21:31:24 2015. */ #include "openxc.pb.h" @@ -16,7 +16,7 @@ const pb_field_t openxc_VehicleMessage_fields[8] = { PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, diagnostic_response, simple_message, &openxc_DiagnosticResponse_fields), PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, control_command, diagnostic_response, &openxc_ControlCommand_fields), PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, command_response, control_command, &openxc_CommandResponse_fields), - PB_FIELD( 7, UINT32 , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, uptime, command_response, 0), + PB_FIELD( 7, UINT64 , OPTIONAL, STATIC , OTHER, openxc_VehicleMessage, timestamp, command_response, 0), PB_LAST_FIELD }; diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index c15a32b7..17bb77d4 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 Thu Nov 26 21:21:48 2015. */ +/* Generated by nanopb-0.3.1 at Wed Dec 9 21:31:24 2015. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -266,8 +266,8 @@ typedef struct _openxc_VehicleMessage { openxc_ControlCommand control_command; bool has_command_response; openxc_CommandResponse command_response; - bool has_uptime; - uint32_t uptime; + bool has_timestamp; + uint64_t timestamp; } openxc_VehicleMessage; /* Default values for struct fields */ @@ -378,7 +378,7 @@ typedef struct _openxc_VehicleMessage { #define openxc_VehicleMessage_diagnostic_response_tag 4 #define openxc_VehicleMessage_control_command_tag 5 #define openxc_VehicleMessage_command_response_tag 6 -#define openxc_VehicleMessage_uptime_tag 7 +#define openxc_VehicleMessage_timestamp_tag 7 /* Struct field encoding specification for nanopb */ extern const pb_field_t openxc_VehicleMessage_fields[8]; diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index c94cf4ae..bd84bd14 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -10,86 +10,319 @@ public final class BinaryMessages { } public interface VehicleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.VehicleMessage.Type type = 1; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ boolean hasType(); + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ com.openxc.BinaryMessages.VehicleMessage.Type getType(); - + // optional .openxc.CanMessage can_message = 2; + /** + * optional .openxc.CanMessage can_message = 2; + */ boolean hasCanMessage(); + /** + * optional .openxc.CanMessage can_message = 2; + */ com.openxc.BinaryMessages.CanMessage getCanMessage(); + /** + * optional .openxc.CanMessage can_message = 2; + */ com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder(); - + // optional .openxc.SimpleMessage simple_message = 3; + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ boolean hasSimpleMessage(); + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ com.openxc.BinaryMessages.SimpleMessage getSimpleMessage(); + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder(); - + // optional .openxc.DiagnosticResponse diagnostic_response = 4; + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ boolean hasDiagnosticResponse(); + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse(); + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); - + // optional .openxc.ControlCommand control_command = 5; + /** + * optional .openxc.ControlCommand control_command = 5; + */ boolean hasControlCommand(); + /** + * optional .openxc.ControlCommand control_command = 5; + */ com.openxc.BinaryMessages.ControlCommand getControlCommand(); + /** + * optional .openxc.ControlCommand control_command = 5; + */ com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder(); - + // optional .openxc.CommandResponse command_response = 6; + /** + * optional .openxc.CommandResponse command_response = 6; + */ boolean hasCommandResponse(); + /** + * optional .openxc.CommandResponse command_response = 6; + */ com.openxc.BinaryMessages.CommandResponse getCommandResponse(); + /** + * optional .openxc.CommandResponse command_response = 6; + */ com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder(); - - // optional uint32 uptime = 7; - boolean hasUptime(); - int getUptime(); + + // optional uint64 timestamp = 7; + /** + * optional uint64 timestamp = 7; + */ + boolean hasTimestamp(); + /** + * optional uint64 timestamp = 7; + */ + long getTimestamp(); } + /** + * Protobuf type {@code openxc.VehicleMessage} + */ public static final class VehicleMessage extends com.google.protobuf.GeneratedMessage implements VehicleMessageOrBuilder { // Use VehicleMessage.newBuilder() to construct. - private VehicleMessage(Builder builder) { + private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private VehicleMessage(boolean noInit) {} - + private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final VehicleMessage defaultInstance; public static VehicleMessage getDefaultInstance() { return defaultInstance; } - + public VehicleMessage getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VehicleMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.CanMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = canMessage_.toBuilder(); + } + canMessage_ = input.readMessage(com.openxc.BinaryMessages.CanMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(canMessage_); + canMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 26: { + com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = simpleMessage_.toBuilder(); + } + simpleMessage_ = input.readMessage(com.openxc.BinaryMessages.SimpleMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(simpleMessage_); + simpleMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + case 34: { + com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = diagnosticResponse_.toBuilder(); + } + diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diagnosticResponse_); + diagnosticResponse_ = subBuilder.buildPartial(); + } + 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; + } + case 50: { + com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = commandResponse_.toBuilder(); + } + commandResponse_ = input.readMessage(com.openxc.BinaryMessages.CommandResponse.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commandResponse_); + commandResponse_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } + case 56: { + bitField0_ |= 0x00000040; + timestamp_ = input.readUInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public VehicleMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VehicleMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + + /** + * Protobuf enum {@code openxc.VehicleMessage.Type} + */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * CAN = 1; + */ CAN(0, 1), + /** + * SIMPLE = 2; + */ SIMPLE(1, 2), + /** + * DIAGNOSTIC = 3; + */ DIAGNOSTIC(2, 3), + /** + * CONTROL_COMMAND = 4; + */ CONTROL_COMMAND(3, 4), + /** + * COMMAND_RESPONSE = 5; + */ COMMAND_RESPONSE(4, 5), ; - + + /** + * CAN = 1; + */ public static final int CAN_VALUE = 1; + /** + * SIMPLE = 2; + */ public static final int SIMPLE_VALUE = 2; + /** + * DIAGNOSTIC = 3; + */ public static final int DIAGNOSTIC_VALUE = 3; + /** + * CONTROL_COMMAND = 4; + */ public static final int CONTROL_COMMAND_VALUE = 4; + /** + * COMMAND_RESPONSE = 5; + */ public static final int COMMAND_RESPONSE_VALUE = 5; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return CAN; @@ -100,7 +333,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -112,7 +345,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -125,11 +358,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = { - CAN, SIMPLE, DIAGNOSTIC, CONTROL_COMMAND, COMMAND_RESPONSE, - }; - + + private static final Type[] VALUES = values(); + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -138,104 +369,161 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type) } - + private int bitField0_; // optional .openxc.VehicleMessage.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ public com.openxc.BinaryMessages.VehicleMessage.Type getType() { return type_; } - + // optional .openxc.CanMessage can_message = 2; public static final int CAN_MESSAGE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.CanMessage canMessage_; + /** + * optional .openxc.CanMessage can_message = 2; + */ public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.CanMessage can_message = 2; + */ public com.openxc.BinaryMessages.CanMessage getCanMessage() { return canMessage_; } + /** + * optional .openxc.CanMessage can_message = 2; + */ public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { return canMessage_; } - + // optional .openxc.SimpleMessage simple_message = 3; public static final int SIMPLE_MESSAGE_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_; + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { return simpleMessage_; } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { return simpleMessage_; } - + // optional .openxc.DiagnosticResponse diagnostic_response = 4; public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_; + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { return diagnosticResponse_; } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { return diagnosticResponse_; } - + // optional .openxc.ControlCommand control_command = 5; public static final int CONTROL_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.ControlCommand controlCommand_; + /** + * optional .openxc.ControlCommand control_command = 5; + */ public boolean hasControlCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public com.openxc.BinaryMessages.ControlCommand getControlCommand() { return controlCommand_; } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { return controlCommand_; } - + // optional .openxc.CommandResponse command_response = 6; public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_; + /** + * optional .openxc.CommandResponse command_response = 6; + */ public boolean hasCommandResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { return commandResponse_; } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { return commandResponse_; } - - // optional uint32 uptime = 7; - public static final int UPTIME_FIELD_NUMBER = 7; - private int uptime_; - public boolean hasUptime() { + + // optional uint64 timestamp = 7; + public static final int TIMESTAMP_FIELD_NUMBER = 7; + private long timestamp_; + /** + * optional uint64 timestamp = 7; + */ + public boolean hasTimestamp() { return ((bitField0_ & 0x00000040) == 0x00000040); } - public int getUptime() { - return uptime_; + /** + * optional uint64 timestamp = 7; + */ + public long getTimestamp() { + return timestamp_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); @@ -243,17 +531,17 @@ public final class BinaryMessages { diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); - uptime_ = 0; + timestamp_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -276,16 +564,16 @@ public final class BinaryMessages { output.writeMessage(6, commandResponse_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt32(7, uptime_); + output.writeUInt64(7, timestamp_); } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -313,100 +601,89 @@ public final class BinaryMessages { } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, uptime_); + .computeUInt64Size(7, timestamp_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.VehicleMessage} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.VehicleMessageOrBuilder { @@ -414,18 +691,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); } - + // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -441,7 +721,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; @@ -476,24 +756,24 @@ public final class BinaryMessages { commandResponseBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); - uptime_ = 0; + timestamp_ = 0L; bitField0_ = (bitField0_ & ~0x00000040); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.VehicleMessage.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; } - + public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.VehicleMessage build() { com.openxc.BinaryMessages.VehicleMessage result = buildPartial(); if (!result.isInitialized()) { @@ -501,17 +781,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.VehicleMessage buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.VehicleMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.VehicleMessage buildPartial() { com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this); int from_bitField0_ = bitField0_; @@ -563,12 +833,12 @@ public final class BinaryMessages { if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } - result.uptime_ = uptime_; + result.timestamp_ = timestamp_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.VehicleMessage) { return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other); @@ -577,7 +847,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) { if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this; if (other.hasType()) { @@ -598,115 +868,53 @@ public final class BinaryMessages { if (other.hasCommandResponse()) { mergeCommandResponse(other.getCommandResponse()); } - if (other.hasUptime()) { - setUptime(other.getUptime()); + if (other.hasTimestamp()) { + setTimestamp(other.getTimestamp()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.openxc.BinaryMessages.CanMessage.Builder subBuilder = com.openxc.BinaryMessages.CanMessage.newBuilder(); - if (hasCanMessage()) { - subBuilder.mergeFrom(getCanMessage()); - } - input.readMessage(subBuilder, extensionRegistry); - setCanMessage(subBuilder.buildPartial()); - break; - } - case 26: { - com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = com.openxc.BinaryMessages.SimpleMessage.newBuilder(); - if (hasSimpleMessage()) { - subBuilder.mergeFrom(getSimpleMessage()); - } - input.readMessage(subBuilder, extensionRegistry); - setSimpleMessage(subBuilder.buildPartial()); - break; - } - case 34: { - com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(); - if (hasDiagnosticResponse()) { - subBuilder.mergeFrom(getDiagnosticResponse()); - } - input.readMessage(subBuilder, extensionRegistry); - setDiagnosticResponse(subBuilder.buildPartial()); - break; - } - case 42: { - com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = com.openxc.BinaryMessages.ControlCommand.newBuilder(); - if (hasControlCommand()) { - subBuilder.mergeFrom(getControlCommand()); - } - input.readMessage(subBuilder, extensionRegistry); - setControlCommand(subBuilder.buildPartial()); - break; - } - case 50: { - com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = com.openxc.BinaryMessages.CommandResponse.newBuilder(); - if (hasCommandResponse()) { - subBuilder.mergeFrom(getCommandResponse()); - } - input.readMessage(subBuilder, extensionRegistry); - setCommandResponse(subBuilder.buildPartial()); - break; - } - case 56: { - bitField0_ |= 0x00000040; - uptime_ = input.readUInt32(); - break; - } + com.openxc.BinaryMessages.VehicleMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional .openxc.VehicleMessage.Type type = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ public com.openxc.BinaryMessages.VehicleMessage.Type getType() { return type_; } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) { if (value == null) { throw new NullPointerException(); @@ -716,20 +924,29 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.VehicleMessage.Type type = 1; + */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; onChanged(); return this; } - + // optional .openxc.CanMessage can_message = 2; private com.openxc.BinaryMessages.CanMessage canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> canMessageBuilder_; + /** + * optional .openxc.CanMessage can_message = 2; + */ public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.CanMessage can_message = 2; + */ public com.openxc.BinaryMessages.CanMessage getCanMessage() { if (canMessageBuilder_ == null) { return canMessage_; @@ -737,6 +954,9 @@ public final class BinaryMessages { return canMessageBuilder_.getMessage(); } } + /** + * optional .openxc.CanMessage can_message = 2; + */ public Builder setCanMessage(com.openxc.BinaryMessages.CanMessage value) { if (canMessageBuilder_ == null) { if (value == null) { @@ -750,6 +970,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.CanMessage can_message = 2; + */ public Builder setCanMessage( com.openxc.BinaryMessages.CanMessage.Builder builderForValue) { if (canMessageBuilder_ == null) { @@ -761,6 +984,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.CanMessage can_message = 2; + */ public Builder mergeCanMessage(com.openxc.BinaryMessages.CanMessage value) { if (canMessageBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -777,6 +1003,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.CanMessage can_message = 2; + */ public Builder clearCanMessage() { if (canMessageBuilder_ == null) { canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); @@ -787,11 +1016,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } + /** + * optional .openxc.CanMessage can_message = 2; + */ public com.openxc.BinaryMessages.CanMessage.Builder getCanMessageBuilder() { bitField0_ |= 0x00000002; onChanged(); return getCanMessageFieldBuilder().getBuilder(); } + /** + * optional .openxc.CanMessage can_message = 2; + */ public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { if (canMessageBuilder_ != null) { return canMessageBuilder_.getMessageOrBuilder(); @@ -799,6 +1034,9 @@ public final class BinaryMessages { return canMessage_; } } + /** + * optional .openxc.CanMessage can_message = 2; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> getCanMessageFieldBuilder() { @@ -812,14 +1050,20 @@ public final class BinaryMessages { } return canMessageBuilder_; } - + // optional .openxc.SimpleMessage simple_message = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> simpleMessageBuilder_; + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { if (simpleMessageBuilder_ == null) { return simpleMessage_; @@ -827,6 +1071,9 @@ public final class BinaryMessages { return simpleMessageBuilder_.getMessage(); } } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public Builder setSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { if (simpleMessageBuilder_ == null) { if (value == null) { @@ -840,6 +1087,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public Builder setSimpleMessage( com.openxc.BinaryMessages.SimpleMessage.Builder builderForValue) { if (simpleMessageBuilder_ == null) { @@ -851,6 +1101,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public Builder mergeSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { if (simpleMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -867,6 +1120,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public Builder clearSimpleMessage() { if (simpleMessageBuilder_ == null) { simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); @@ -877,11 +1133,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public com.openxc.BinaryMessages.SimpleMessage.Builder getSimpleMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); return getSimpleMessageFieldBuilder().getBuilder(); } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { if (simpleMessageBuilder_ != null) { return simpleMessageBuilder_.getMessageOrBuilder(); @@ -889,6 +1151,9 @@ public final class BinaryMessages { return simpleMessage_; } } + /** + * optional .openxc.SimpleMessage simple_message = 3; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> getSimpleMessageFieldBuilder() { @@ -902,14 +1167,20 @@ public final class BinaryMessages { } return simpleMessageBuilder_; } - + // optional .openxc.DiagnosticResponse diagnostic_response = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_; + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { if (diagnosticResponseBuilder_ == null) { return diagnosticResponse_; @@ -917,6 +1188,9 @@ public final class BinaryMessages { return diagnosticResponseBuilder_.getMessage(); } } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { if (diagnosticResponseBuilder_ == null) { if (value == null) { @@ -930,6 +1204,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public Builder setDiagnosticResponse( com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) { if (diagnosticResponseBuilder_ == null) { @@ -941,6 +1218,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { if (diagnosticResponseBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && @@ -957,6 +1237,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public Builder clearDiagnosticResponse() { if (diagnosticResponseBuilder_ == null) { diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); @@ -967,11 +1250,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() { bitField0_ |= 0x00000008; onChanged(); return getDiagnosticResponseFieldBuilder().getBuilder(); } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { if (diagnosticResponseBuilder_ != null) { return diagnosticResponseBuilder_.getMessageOrBuilder(); @@ -979,6 +1268,9 @@ public final class BinaryMessages { return diagnosticResponse_; } } + /** + * optional .openxc.DiagnosticResponse diagnostic_response = 4; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> getDiagnosticResponseFieldBuilder() { @@ -992,14 +1284,20 @@ 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_; + /** + * optional .openxc.ControlCommand control_command = 5; + */ public boolean hasControlCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public com.openxc.BinaryMessages.ControlCommand getControlCommand() { if (controlCommandBuilder_ == null) { return controlCommand_; @@ -1007,6 +1305,9 @@ public final class BinaryMessages { return controlCommandBuilder_.getMessage(); } } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) { if (controlCommandBuilder_ == null) { if (value == null) { @@ -1020,6 +1321,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public Builder setControlCommand( com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) { if (controlCommandBuilder_ == null) { @@ -1031,6 +1335,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public Builder mergeControlCommand(com.openxc.BinaryMessages.ControlCommand value) { if (controlCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && @@ -1047,6 +1354,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public Builder clearControlCommand() { if (controlCommandBuilder_ == null) { controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); @@ -1057,11 +1367,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); return this; } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); return getControlCommandFieldBuilder().getBuilder(); } + /** + * optional .openxc.ControlCommand control_command = 5; + */ public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { if (controlCommandBuilder_ != null) { return controlCommandBuilder_.getMessageOrBuilder(); @@ -1069,6 +1385,9 @@ public final class BinaryMessages { return controlCommand_; } } + /** + * optional .openxc.ControlCommand control_command = 5; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> getControlCommandFieldBuilder() { @@ -1082,14 +1401,20 @@ public final class BinaryMessages { } return controlCommandBuilder_; } - + // optional .openxc.CommandResponse command_response = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_; + /** + * optional .openxc.CommandResponse command_response = 6; + */ public boolean hasCommandResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { if (commandResponseBuilder_ == null) { return commandResponse_; @@ -1097,6 +1422,9 @@ public final class BinaryMessages { return commandResponseBuilder_.getMessage(); } } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public Builder setCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { if (commandResponseBuilder_ == null) { if (value == null) { @@ -1110,6 +1438,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public Builder setCommandResponse( com.openxc.BinaryMessages.CommandResponse.Builder builderForValue) { if (commandResponseBuilder_ == null) { @@ -1121,6 +1452,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public Builder mergeCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { if (commandResponseBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && @@ -1137,6 +1471,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public Builder clearCommandResponse() { if (commandResponseBuilder_ == null) { commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); @@ -1147,11 +1484,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000020); return this; } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public com.openxc.BinaryMessages.CommandResponse.Builder getCommandResponseBuilder() { bitField0_ |= 0x00000020; onChanged(); return getCommandResponseFieldBuilder().getBuilder(); } + /** + * optional .openxc.CommandResponse command_response = 6; + */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { if (commandResponseBuilder_ != null) { return commandResponseBuilder_.getMessageOrBuilder(); @@ -1159,6 +1502,9 @@ public final class BinaryMessages { return commandResponse_; } } + /** + * optional .openxc.CommandResponse command_response = 6; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> getCommandResponseFieldBuilder() { @@ -1172,98 +1518,237 @@ public final class BinaryMessages { } return commandResponseBuilder_; } - - // optional uint32 uptime = 7; - private int uptime_ ; - public boolean hasUptime() { + + // optional uint64 timestamp = 7; + private long timestamp_ ; + /** + * optional uint64 timestamp = 7; + */ + public boolean hasTimestamp() { return ((bitField0_ & 0x00000040) == 0x00000040); } - public int getUptime() { - return uptime_; + /** + * optional uint64 timestamp = 7; + */ + public long getTimestamp() { + return timestamp_; } - public Builder setUptime(int value) { + /** + * optional uint64 timestamp = 7; + */ + public Builder setTimestamp(long value) { bitField0_ |= 0x00000040; - uptime_ = value; + timestamp_ = value; onChanged(); return this; } - public Builder clearUptime() { + /** + * optional uint64 timestamp = 7; + */ + public Builder clearTimestamp() { bitField0_ = (bitField0_ & ~0x00000040); - uptime_ = 0; + timestamp_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) } - + static { defaultInstance = new VehicleMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - + public interface CanMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ boolean hasBus(); + /** + * optional int32 bus = 1; + */ int getBus(); - + // optional uint32 id = 2; + /** + * optional uint32 id = 2; + */ boolean hasId(); + /** + * optional uint32 id = 2; + */ int getId(); - + // optional bytes data = 3; + /** + * optional bytes data = 3; + */ boolean hasData(); + /** + * optional bytes data = 3; + */ com.google.protobuf.ByteString getData(); - + // optional .openxc.CanMessage.FrameFormat frame_format = 4; + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ boolean hasFrameFormat(); + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat(); } + /** + * Protobuf type {@code openxc.CanMessage} + */ public static final class CanMessage extends com.google.protobuf.GeneratedMessage implements CanMessageOrBuilder { // Use CanMessage.newBuilder() to construct. - private CanMessage(Builder builder) { + private CanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private CanMessage(boolean noInit) {} - + private CanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final CanMessage defaultInstance; public static CanMessage getDefaultInstance() { return defaultInstance; } - + public CanMessage getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CanMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + id_ = input.readUInt32(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + data_ = input.readBytes(); + break; + } + case 32: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + frameFormat_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); } - - public enum FrameFormat - implements com.google.protobuf.ProtocolMessageEnum { - STANDARD(0, 1), - EXTENDED(1, 2), - ; - - public static final int STANDARD_VALUE = 1; - public static final int EXTENDED_VALUE = 2; - - - public final int getNumber() { return value; } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CanMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CanMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.CanMessage.FrameFormat} + */ + public enum FrameFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STANDARD = 1; + */ + STANDARD(0, 1), + /** + * EXTENDED = 2; + */ + EXTENDED(1, 2), + ; + + /** + * STANDARD = 1; + */ + public static final int STANDARD_VALUE = 1; + /** + * EXTENDED = 2; + */ + public static final int EXTENDED_VALUE = 2; + + + public final int getNumber() { return value; } + public static FrameFormat valueOf(int value) { switch (value) { case 1: return STANDARD; @@ -1271,7 +1756,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -1283,7 +1768,7 @@ public final class BinaryMessages { return FrameFormat.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -1296,11 +1781,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.CanMessage.getDescriptor().getEnumTypes().get(0); } - - private static final FrameFormat[] VALUES = { - STANDARD, EXTENDED, - }; - + + private static final FrameFormat[] VALUES = values(); + public static FrameFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -1309,59 +1792,83 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private FrameFormat(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.CanMessage.FrameFormat) } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } - + // optional uint32 id = 2; public static final int ID_FIELD_NUMBER = 2; private int id_; + /** + * optional uint32 id = 2; + */ public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 id = 2; + */ public int getId() { return id_; } - + // optional bytes data = 3; public static final int DATA_FIELD_NUMBER = 3; private com.google.protobuf.ByteString data_; + /** + * optional bytes data = 3; + */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional bytes data = 3; + */ public com.google.protobuf.ByteString getData() { return data_; } - + // optional .openxc.CanMessage.FrameFormat frame_format = 4; public static final int FRAME_FORMAT_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_; + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } - + private void initFields() { bus_ = 0; id_ = 0; @@ -1372,11 +1879,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -1394,12 +1901,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -1421,94 +1928,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.CanMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.CanMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.CanMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.CanMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.CanMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.CanMessage} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.CanMessageOrBuilder { @@ -1516,18 +2012,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); } - + // Construct using com.openxc.BinaryMessages.CanMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -1538,7 +2037,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -1551,20 +2050,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.CanMessage.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - + public com.openxc.BinaryMessages.CanMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.CanMessage build() { com.openxc.BinaryMessages.CanMessage result = buildPartial(); if (!result.isInitialized()) { @@ -1572,17 +2071,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.CanMessage buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.CanMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.CanMessage buildPartial() { com.openxc.BinaryMessages.CanMessage result = new com.openxc.BinaryMessages.CanMessage(this); int from_bitField0_ = bitField0_; @@ -1607,7 +2096,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.CanMessage) { return mergeFrom((com.openxc.BinaryMessages.CanMessage)other); @@ -1616,7 +2105,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.CanMessage other) { if (other == com.openxc.BinaryMessages.CanMessage.getDefaultInstance()) return this; if (other.hasBus()) { @@ -1634,116 +2123,113 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - id_ = input.readUInt32(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - data_ = input.readBytes(); - break; - } - case 32: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - frameFormat_ = value; - } - break; - } + com.openxc.BinaryMessages.CanMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.CanMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } + /** + * optional int32 bus = 1; + */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } + /** + * optional int32 bus = 1; + */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional uint32 id = 2; private int id_ ; + /** + * optional uint32 id = 2; + */ public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 id = 2; + */ public int getId() { return id_; } + /** + * optional uint32 id = 2; + */ public Builder setId(int value) { bitField0_ |= 0x00000002; id_ = value; onChanged(); return this; } + /** + * optional uint32 id = 2; + */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000002); id_ = 0; onChanged(); return this; } - + // optional bytes data = 3; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes data = 3; + */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional bytes data = 3; + */ public com.google.protobuf.ByteString getData() { return data_; } + /** + * optional bytes data = 3; + */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1753,21 +2239,33 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional bytes data = 3; + */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000004); data_ = getDefaultInstance().getData(); onChanged(); return this; } - + // optional .openxc.CanMessage.FrameFormat frame_format = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ public Builder setFrameFormat(com.openxc.BinaryMessages.CanMessage.FrameFormat value) { if (value == null) { throw new NullPointerException(); @@ -1777,122 +2275,421 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.CanMessage.FrameFormat frame_format = 4; + */ public Builder clearFrameFormat() { bitField0_ = (bitField0_ & ~0x00000008); frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.CanMessage) } - + static { defaultInstance = new CanMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.CanMessage) } - + public interface ControlCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.ControlCommand.Type type = 1; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ boolean hasType(); + /** + * optional .openxc.ControlCommand.Type type = 1; + */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ boolean hasDiagnosticRequest(); + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest(); + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder(); - + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ boolean hasPassthroughModeRequest(); + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest(); + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); - + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ boolean hasAcceptanceFilterBypassCommand(); + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand(); + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); - + // optional .openxc.PayloadFormatCommand payload_format_command = 5; + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ boolean hasPayloadFormatCommand(); + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand(); + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); - + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ boolean hasPredefinedObd2RequestsCommand(); + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand(); + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder(); - + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ boolean hasModemConfigurationCommand(); + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand(); + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder(); - + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ boolean hasRtcConfigurationCommand(); + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand(); + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder(); } + /** + * Protobuf type {@code openxc.ControlCommand} + */ public static final class ControlCommand extends com.google.protobuf.GeneratedMessage implements ControlCommandOrBuilder { // Use ControlCommand.newBuilder() to construct. - private ControlCommand(Builder builder) { + private ControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private ControlCommand(boolean noInit) {} - + private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final ControlCommand defaultInstance; public static ControlCommand getDefaultInstance() { return defaultInstance; } - + public ControlCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = diagnosticRequest_.toBuilder(); + } + diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticControlCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diagnosticRequest_); + diagnosticRequest_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 26: { + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = passthroughModeRequest_.toBuilder(); + } + passthroughModeRequest_ = input.readMessage(com.openxc.BinaryMessages.PassthroughModeControlCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(passthroughModeRequest_); + passthroughModeRequest_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + case 34: { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = acceptanceFilterBypassCommand_.toBuilder(); + } + acceptanceFilterBypassCommand_ = input.readMessage(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acceptanceFilterBypassCommand_); + acceptanceFilterBypassCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 42: { + com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = payloadFormatCommand_.toBuilder(); + } + payloadFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.PayloadFormatCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(payloadFormatCommand_); + payloadFormatCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } + case 50: { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + subBuilder = predefinedObd2RequestsCommand_.toBuilder(); + } + predefinedObd2RequestsCommand_ = input.readMessage(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(predefinedObd2RequestsCommand_); + predefinedObd2RequestsCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000020; + break; + } + case 58: { + com.openxc.BinaryMessages.ModemConfigurationCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + subBuilder = modemConfigurationCommand_.toBuilder(); + } + modemConfigurationCommand_ = input.readMessage(com.openxc.BinaryMessages.ModemConfigurationCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(modemConfigurationCommand_); + modemConfigurationCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000040; + break; + } + case 66: { + com.openxc.BinaryMessages.RTCConfigurationCommand.Builder subBuilder = null; + if (((bitField0_ & 0x00000080) == 0x00000080)) { + subBuilder = rtcConfigurationCommand_.toBuilder(); + } + rtcConfigurationCommand_ = input.readMessage(com.openxc.BinaryMessages.RTCConfigurationCommand.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rtcConfigurationCommand_); + rtcConfigurationCommand_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000080; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + + /** + * Protobuf enum {@code openxc.ControlCommand.Type} + */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * VERSION = 1; + */ VERSION(0, 1), + /** + * DEVICE_ID = 2; + */ DEVICE_ID(1, 2), + /** + * DIAGNOSTIC = 3; + */ DIAGNOSTIC(2, 3), + /** + * PASSTHROUGH = 4; + */ PASSTHROUGH(3, 4), + /** + * ACCEPTANCE_FILTER_BYPASS = 5; + */ ACCEPTANCE_FILTER_BYPASS(4, 5), + /** + * PAYLOAD_FORMAT = 6; + */ PAYLOAD_FORMAT(5, 6), + /** + * PREDEFINED_OBD2_REQUESTS = 7; + */ PREDEFINED_OBD2_REQUESTS(6, 7), + /** + * MODEM_CONFIGURATION = 8; + */ MODEM_CONFIGURATION(7, 8), + /** + * RTC_CONFIGURATION = 9; + */ RTC_CONFIGURATION(8, 9), + /** + * SD_MOUNT_STATUS = 10; + */ SD_MOUNT_STATUS(9, 10), ; - + + /** + * VERSION = 1; + */ public static final int VERSION_VALUE = 1; + /** + * DEVICE_ID = 2; + */ public static final int DEVICE_ID_VALUE = 2; + /** + * DIAGNOSTIC = 3; + */ public static final int DIAGNOSTIC_VALUE = 3; + /** + * PASSTHROUGH = 4; + */ public static final int PASSTHROUGH_VALUE = 4; + /** + * ACCEPTANCE_FILTER_BYPASS = 5; + */ public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; + /** + * PAYLOAD_FORMAT = 6; + */ public static final int PAYLOAD_FORMAT_VALUE = 6; + /** + * PREDEFINED_OBD2_REQUESTS = 7; + */ public static final int PREDEFINED_OBD2_REQUESTS_VALUE = 7; + /** + * MODEM_CONFIGURATION = 8; + */ public static final int MODEM_CONFIGURATION_VALUE = 8; + /** + * RTC_CONFIGURATION = 9; + */ public static final int RTC_CONFIGURATION_VALUE = 9; + /** + * SD_MOUNT_STATUS = 10; + */ public static final int SD_MOUNT_STATUS_VALUE = 10; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return VERSION; @@ -1908,7 +2705,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -1920,7 +2717,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -1933,11 +2730,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = { - VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, RTC_CONFIGURATION, SD_MOUNT_STATUS, - }; - + + private static final Type[] VALUES = values(); + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -1946,120 +2741,189 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) } - + private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_; + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { return diagnosticRequest_; } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { return diagnosticRequest_; } - + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; public static final int PASSTHROUGH_MODE_REQUEST_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_; + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public boolean hasPassthroughModeRequest() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { return passthroughModeRequest_; } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { return passthroughModeRequest_; } - + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; public static final int ACCEPTANCE_FILTER_BYPASS_COMMAND_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public boolean hasAcceptanceFilterBypassCommand() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { return acceptanceFilterBypassCommand_; } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { return acceptanceFilterBypassCommand_; } - + // optional .openxc.PayloadFormatCommand payload_format_command = 5; public static final int PAYLOAD_FORMAT_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_; + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { return payloadFormatCommand_; } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { return payloadFormatCommand_; } - + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; public static final int PREDEFINED_OBD2_REQUESTS_COMMAND_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public boolean hasPredefinedObd2RequestsCommand() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { return predefinedObd2RequestsCommand_; } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { return predefinedObd2RequestsCommand_; } - + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; public static final int MODEM_CONFIGURATION_COMMAND_FIELD_NUMBER = 7; private com.openxc.BinaryMessages.ModemConfigurationCommand modemConfigurationCommand_; + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public boolean hasModemConfigurationCommand() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand() { return modemConfigurationCommand_; } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder() { return modemConfigurationCommand_; } - + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; public static final int RTC_CONFIGURATION_COMMAND_FIELD_NUMBER = 8; private com.openxc.BinaryMessages.RTCConfigurationCommand rtcConfigurationCommand_; + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public boolean hasRtcConfigurationCommand() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand() { return rtcConfigurationCommand_; } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder() { return rtcConfigurationCommand_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); @@ -2074,11 +2938,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -2108,12 +2972,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -2151,94 +3015,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.ControlCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.ControlCommandOrBuilder { @@ -2246,18 +3099,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -2275,7 +3131,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; @@ -2324,20 +3180,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.ControlCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; } - + public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.ControlCommand build() { com.openxc.BinaryMessages.ControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -2345,17 +3201,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.ControlCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.ControlCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.ControlCommand buildPartial() { com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); int from_bitField0_ = bitField0_; @@ -2424,7 +3270,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.ControlCommand) { return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); @@ -2433,7 +3279,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; if (other.hasType()) { @@ -2463,122 +3309,47 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder(); - if (hasDiagnosticRequest()) { - subBuilder.mergeFrom(getDiagnosticRequest()); - } - input.readMessage(subBuilder, extensionRegistry); - setDiagnosticRequest(subBuilder.buildPartial()); - break; - } - case 26: { - com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder(); - if (hasPassthroughModeRequest()) { - subBuilder.mergeFrom(getPassthroughModeRequest()); - } - input.readMessage(subBuilder, extensionRegistry); - setPassthroughModeRequest(subBuilder.buildPartial()); - break; - } - case 34: { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder(); - if (hasAcceptanceFilterBypassCommand()) { - subBuilder.mergeFrom(getAcceptanceFilterBypassCommand()); - } - input.readMessage(subBuilder, extensionRegistry); - setAcceptanceFilterBypassCommand(subBuilder.buildPartial()); - break; - } - case 42: { - com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder(); - if (hasPayloadFormatCommand()) { - subBuilder.mergeFrom(getPayloadFormatCommand()); - } - input.readMessage(subBuilder, extensionRegistry); - setPayloadFormatCommand(subBuilder.buildPartial()); - break; - } - case 50: { - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder(); - if (hasPredefinedObd2RequestsCommand()) { - subBuilder.mergeFrom(getPredefinedObd2RequestsCommand()); - } - input.readMessage(subBuilder, extensionRegistry); - setPredefinedObd2RequestsCommand(subBuilder.buildPartial()); - break; - } - case 58: { - com.openxc.BinaryMessages.ModemConfigurationCommand.Builder subBuilder = com.openxc.BinaryMessages.ModemConfigurationCommand.newBuilder(); - if (hasModemConfigurationCommand()) { - subBuilder.mergeFrom(getModemConfigurationCommand()); - } - input.readMessage(subBuilder, extensionRegistry); - setModemConfigurationCommand(subBuilder.buildPartial()); - break; - } - case 66: { - com.openxc.BinaryMessages.RTCConfigurationCommand.Builder subBuilder = com.openxc.BinaryMessages.RTCConfigurationCommand.newBuilder(); - if (hasRtcConfigurationCommand()) { - subBuilder.mergeFrom(getRtcConfigurationCommand()); - } - input.readMessage(subBuilder, extensionRegistry); - setRtcConfigurationCommand(subBuilder.buildPartial()); - break; - } + com.openxc.BinaryMessages.ControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { if (value == null) { throw new NullPointerException(); @@ -2588,20 +3359,29 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; onChanged(); return this; } - + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> diagnosticRequestBuilder_; + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { if (diagnosticRequestBuilder_ == null) { return diagnosticRequest_; @@ -2609,6 +3389,9 @@ public final class BinaryMessages { return diagnosticRequestBuilder_.getMessage(); } } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { if (diagnosticRequestBuilder_ == null) { if (value == null) { @@ -2622,6 +3405,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public Builder setDiagnosticRequest( com.openxc.BinaryMessages.DiagnosticControlCommand.Builder builderForValue) { if (diagnosticRequestBuilder_ == null) { @@ -2633,6 +3419,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { if (diagnosticRequestBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -2649,6 +3438,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public Builder clearDiagnosticRequest() { if (diagnosticRequestBuilder_ == null) { diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); @@ -2659,11 +3451,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Builder getDiagnosticRequestBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDiagnosticRequestFieldBuilder().getBuilder(); } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { if (diagnosticRequestBuilder_ != null) { return diagnosticRequestBuilder_.getMessageOrBuilder(); @@ -2671,6 +3469,9 @@ public final class BinaryMessages { return diagnosticRequest_; } } + /** + * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> getDiagnosticRequestFieldBuilder() { @@ -2684,14 +3485,20 @@ public final class BinaryMessages { } return diagnosticRequestBuilder_; } - + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> passthroughModeRequestBuilder_; + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public boolean hasPassthroughModeRequest() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { if (passthroughModeRequestBuilder_ == null) { return passthroughModeRequest_; @@ -2699,6 +3506,9 @@ public final class BinaryMessages { return passthroughModeRequestBuilder_.getMessage(); } } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public Builder setPassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { if (passthroughModeRequestBuilder_ == null) { if (value == null) { @@ -2712,6 +3522,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public Builder setPassthroughModeRequest( com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder builderForValue) { if (passthroughModeRequestBuilder_ == null) { @@ -2723,6 +3536,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public Builder mergePassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { if (passthroughModeRequestBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -2739,6 +3555,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public Builder clearPassthroughModeRequest() { if (passthroughModeRequestBuilder_ == null) { passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); @@ -2749,11 +3568,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder getPassthroughModeRequestBuilder() { bitField0_ |= 0x00000004; onChanged(); return getPassthroughModeRequestFieldBuilder().getBuilder(); } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { if (passthroughModeRequestBuilder_ != null) { return passthroughModeRequestBuilder_.getMessageOrBuilder(); @@ -2761,6 +3586,9 @@ public final class BinaryMessages { return passthroughModeRequest_; } } + /** + * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> getPassthroughModeRequestFieldBuilder() { @@ -2774,14 +3602,20 @@ public final class BinaryMessages { } return passthroughModeRequestBuilder_; } - + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> acceptanceFilterBypassCommandBuilder_; + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public boolean hasAcceptanceFilterBypassCommand() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { if (acceptanceFilterBypassCommandBuilder_ == null) { return acceptanceFilterBypassCommand_; @@ -2789,6 +3623,9 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_.getMessage(); } } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public Builder setAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { if (acceptanceFilterBypassCommandBuilder_ == null) { if (value == null) { @@ -2802,6 +3639,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public Builder setAcceptanceFilterBypassCommand( com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder builderForValue) { if (acceptanceFilterBypassCommandBuilder_ == null) { @@ -2813,6 +3653,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public Builder mergeAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { if (acceptanceFilterBypassCommandBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && @@ -2829,6 +3672,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public Builder clearAcceptanceFilterBypassCommand() { if (acceptanceFilterBypassCommandBuilder_ == null) { acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); @@ -2839,11 +3685,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder getAcceptanceFilterBypassCommandBuilder() { bitField0_ |= 0x00000008; onChanged(); return getAcceptanceFilterBypassCommandFieldBuilder().getBuilder(); } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { if (acceptanceFilterBypassCommandBuilder_ != null) { return acceptanceFilterBypassCommandBuilder_.getMessageOrBuilder(); @@ -2851,6 +3703,9 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } } + /** + * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> getAcceptanceFilterBypassCommandFieldBuilder() { @@ -2864,14 +3719,20 @@ public final class BinaryMessages { } return acceptanceFilterBypassCommandBuilder_; } - + // optional .openxc.PayloadFormatCommand payload_format_command = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> payloadFormatCommandBuilder_; + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { if (payloadFormatCommandBuilder_ == null) { return payloadFormatCommand_; @@ -2879,6 +3740,9 @@ public final class BinaryMessages { return payloadFormatCommandBuilder_.getMessage(); } } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public Builder setPayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { if (payloadFormatCommandBuilder_ == null) { if (value == null) { @@ -2892,6 +3756,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public Builder setPayloadFormatCommand( com.openxc.BinaryMessages.PayloadFormatCommand.Builder builderForValue) { if (payloadFormatCommandBuilder_ == null) { @@ -2903,6 +3770,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public Builder mergePayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { if (payloadFormatCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && @@ -2919,6 +3789,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public Builder clearPayloadFormatCommand() { if (payloadFormatCommandBuilder_ == null) { payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); @@ -2929,11 +3802,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); return this; } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public com.openxc.BinaryMessages.PayloadFormatCommand.Builder getPayloadFormatCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); return getPayloadFormatCommandFieldBuilder().getBuilder(); } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { if (payloadFormatCommandBuilder_ != null) { return payloadFormatCommandBuilder_.getMessageOrBuilder(); @@ -2941,6 +3820,9 @@ public final class BinaryMessages { return payloadFormatCommand_; } } + /** + * optional .openxc.PayloadFormatCommand payload_format_command = 5; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> getPayloadFormatCommandFieldBuilder() { @@ -2954,14 +3836,20 @@ public final class BinaryMessages { } return payloadFormatCommandBuilder_; } - + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> predefinedObd2RequestsCommandBuilder_; + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public boolean hasPredefinedObd2RequestsCommand() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { if (predefinedObd2RequestsCommandBuilder_ == null) { return predefinedObd2RequestsCommand_; @@ -2969,6 +3857,9 @@ public final class BinaryMessages { return predefinedObd2RequestsCommandBuilder_.getMessage(); } } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public Builder setPredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { if (predefinedObd2RequestsCommandBuilder_ == null) { if (value == null) { @@ -2982,6 +3873,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public Builder setPredefinedObd2RequestsCommand( com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder builderForValue) { if (predefinedObd2RequestsCommandBuilder_ == null) { @@ -2993,6 +3887,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public Builder mergePredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { if (predefinedObd2RequestsCommandBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && @@ -3009,6 +3906,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public Builder clearPredefinedObd2RequestsCommand() { if (predefinedObd2RequestsCommandBuilder_ == null) { predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); @@ -3019,11 +3919,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000020); return this; } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder getPredefinedObd2RequestsCommandBuilder() { bitField0_ |= 0x00000020; onChanged(); return getPredefinedObd2RequestsCommandFieldBuilder().getBuilder(); } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { if (predefinedObd2RequestsCommandBuilder_ != null) { return predefinedObd2RequestsCommandBuilder_.getMessageOrBuilder(); @@ -3031,6 +3937,9 @@ public final class BinaryMessages { return predefinedObd2RequestsCommand_; } } + /** + * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> getPredefinedObd2RequestsCommandFieldBuilder() { @@ -3044,14 +3953,20 @@ public final class BinaryMessages { } return predefinedObd2RequestsCommandBuilder_; } - + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; private com.openxc.BinaryMessages.ModemConfigurationCommand modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ModemConfigurationCommand, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder, com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder> modemConfigurationCommandBuilder_; + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public boolean hasModemConfigurationCommand() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand() { if (modemConfigurationCommandBuilder_ == null) { return modemConfigurationCommand_; @@ -3059,6 +3974,9 @@ public final class BinaryMessages { return modemConfigurationCommandBuilder_.getMessage(); } } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public Builder setModemConfigurationCommand(com.openxc.BinaryMessages.ModemConfigurationCommand value) { if (modemConfigurationCommandBuilder_ == null) { if (value == null) { @@ -3072,6 +3990,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000040; return this; } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public Builder setModemConfigurationCommand( com.openxc.BinaryMessages.ModemConfigurationCommand.Builder builderForValue) { if (modemConfigurationCommandBuilder_ == null) { @@ -3083,6 +4004,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000040; return this; } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public Builder mergeModemConfigurationCommand(com.openxc.BinaryMessages.ModemConfigurationCommand value) { if (modemConfigurationCommandBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && @@ -3099,6 +4023,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000040; return this; } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public Builder clearModemConfigurationCommand() { if (modemConfigurationCommandBuilder_ == null) { modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); @@ -3109,11 +4036,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000040); return this; } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public com.openxc.BinaryMessages.ModemConfigurationCommand.Builder getModemConfigurationCommandBuilder() { bitField0_ |= 0x00000040; onChanged(); return getModemConfigurationCommandFieldBuilder().getBuilder(); } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ public com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder() { if (modemConfigurationCommandBuilder_ != null) { return modemConfigurationCommandBuilder_.getMessageOrBuilder(); @@ -3121,6 +4054,9 @@ public final class BinaryMessages { return modemConfigurationCommand_; } } + /** + * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ModemConfigurationCommand, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder, com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder> getModemConfigurationCommandFieldBuilder() { @@ -3134,14 +4070,20 @@ public final class BinaryMessages { } return modemConfigurationCommandBuilder_; } - + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; private com.openxc.BinaryMessages.RTCConfigurationCommand rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.RTCConfigurationCommand, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder, com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder> rtcConfigurationCommandBuilder_; + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public boolean hasRtcConfigurationCommand() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand() { if (rtcConfigurationCommandBuilder_ == null) { return rtcConfigurationCommand_; @@ -3149,6 +4091,9 @@ public final class BinaryMessages { return rtcConfigurationCommandBuilder_.getMessage(); } } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public Builder setRtcConfigurationCommand(com.openxc.BinaryMessages.RTCConfigurationCommand value) { if (rtcConfigurationCommandBuilder_ == null) { if (value == null) { @@ -3162,6 +4107,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000080; return this; } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public Builder setRtcConfigurationCommand( com.openxc.BinaryMessages.RTCConfigurationCommand.Builder builderForValue) { if (rtcConfigurationCommandBuilder_ == null) { @@ -3173,6 +4121,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000080; return this; } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public Builder mergeRtcConfigurationCommand(com.openxc.BinaryMessages.RTCConfigurationCommand value) { if (rtcConfigurationCommandBuilder_ == null) { if (((bitField0_ & 0x00000080) == 0x00000080) && @@ -3189,6 +4140,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000080; return this; } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public Builder clearRtcConfigurationCommand() { if (rtcConfigurationCommandBuilder_ == null) { rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); @@ -3199,11 +4153,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); return this; } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public com.openxc.BinaryMessages.RTCConfigurationCommand.Builder getRtcConfigurationCommandBuilder() { bitField0_ |= 0x00000080; onChanged(); return getRtcConfigurationCommandFieldBuilder().getBuilder(); } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ public com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder() { if (rtcConfigurationCommandBuilder_ != null) { return rtcConfigurationCommandBuilder_.getMessageOrBuilder(); @@ -3211,6 +4171,9 @@ public final class BinaryMessages { return rtcConfigurationCommand_; } } + /** + * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.RTCConfigurationCommand, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder, com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder> getRtcConfigurationCommandFieldBuilder() { @@ -3224,70 +4187,186 @@ public final class BinaryMessages { } return rtcConfigurationCommandBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } - + static { defaultInstance = new ControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.ControlCommand) } - + public interface DiagnosticControlCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.DiagnosticRequest request = 1; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ boolean hasRequest(); + /** + * optional .openxc.DiagnosticRequest request = 1; + */ com.openxc.BinaryMessages.DiagnosticRequest getRequest(); + /** + * optional .openxc.DiagnosticRequest request = 1; + */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder(); - + // optional .openxc.DiagnosticControlCommand.Action action = 2; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ boolean hasAction(); + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction(); } + /** + * Protobuf type {@code openxc.DiagnosticControlCommand} + */ public static final class DiagnosticControlCommand extends com.google.protobuf.GeneratedMessage implements DiagnosticControlCommandOrBuilder { // Use DiagnosticControlCommand.newBuilder() to construct. - private DiagnosticControlCommand(Builder builder) { + private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private DiagnosticControlCommand(boolean noInit) {} - + private DiagnosticControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final DiagnosticControlCommand defaultInstance; public static DiagnosticControlCommand getDefaultInstance() { return defaultInstance; } - + public DiagnosticControlCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DiagnosticControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = request_.toBuilder(); + } + request_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + action_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiagnosticControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + + /** + * Protobuf enum {@code openxc.DiagnosticControlCommand.Action} + */ public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * ADD = 1; + */ ADD(0, 1), + /** + * CANCEL = 2; + */ CANCEL(1, 2), ; - + + /** + * ADD = 1; + */ public static final int ADD_VALUE = 1; + /** + * CANCEL = 2; + */ public static final int CANCEL_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static Action valueOf(int value) { switch (value) { case 1: return ADD; @@ -3295,7 +4374,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -3307,7 +4386,7 @@ public final class BinaryMessages { return Action.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -3320,11 +4399,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor().getEnumTypes().get(0); } - - private static final Action[] VALUES = { - ADD, CANCEL, - }; - + + private static final Action[] VALUES = values(); + public static Action valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -3333,42 +4410,57 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Action(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticControlCommand.Action) } - + private int bitField0_; // optional .openxc.DiagnosticRequest request = 1; public static final int REQUEST_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public boolean hasRequest() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { return request_; } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { return request_; } - + // optional .openxc.DiagnosticControlCommand.Action action = 2; public static final int ACTION_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ public boolean hasAction() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { return action_; } - + private void initFields() { request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; @@ -3377,11 +4469,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -3393,12 +4485,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -3412,94 +4504,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.DiagnosticControlCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { @@ -3507,18 +4588,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -3530,7 +4614,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); if (requestBuilder_ == null) { @@ -3543,20 +4627,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; } - + public com.openxc.BinaryMessages.DiagnosticControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticControlCommand build() { com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -3564,17 +4648,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.DiagnosticControlCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.DiagnosticControlCommand buildPartial() { com.openxc.BinaryMessages.DiagnosticControlCommand result = new com.openxc.BinaryMessages.DiagnosticControlCommand(this); int from_bitField0_ = bitField0_; @@ -3595,7 +4669,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticControlCommand) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticControlCommand)other); @@ -3604,7 +4678,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticControlCommand other) { if (other == com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) return this; if (other.hasRequest()) { @@ -3616,67 +4690,43 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(); - if (hasRequest()) { - subBuilder.mergeFrom(getRequest()); - } - input.readMessage(subBuilder, extensionRegistry); - setRequest(subBuilder.buildPartial()); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - action_ = value; - } - break; - } + com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional .openxc.DiagnosticRequest request = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public boolean hasRequest() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { if (requestBuilder_ == null) { return request_; @@ -3684,6 +4734,9 @@ public final class BinaryMessages { return requestBuilder_.getMessage(); } } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { if (requestBuilder_ == null) { if (value == null) { @@ -3697,6 +4750,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public Builder setRequest( com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { if (requestBuilder_ == null) { @@ -3708,6 +4764,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { if (requestBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -3724,6 +4783,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public Builder clearRequest() { if (requestBuilder_ == null) { request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); @@ -3734,11 +4796,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); return this; } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); return getRequestFieldBuilder().getBuilder(); } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { if (requestBuilder_ != null) { return requestBuilder_.getMessageOrBuilder(); @@ -3746,6 +4814,9 @@ public final class BinaryMessages { return request_; } } + /** + * optional .openxc.DiagnosticRequest request = 1; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> getRequestFieldBuilder() { @@ -3759,15 +4830,24 @@ public final class BinaryMessages { } return requestBuilder_; } - + // optional .openxc.DiagnosticControlCommand.Action action = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ public boolean hasAction() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { return action_; } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { if (value == null) { throw new NullPointerException(); @@ -3777,84 +4857,183 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.DiagnosticControlCommand.Action action = 2; + */ public Builder clearAction() { bitField0_ = (bitField0_ & ~0x00000002); action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) } - + static { defaultInstance = new DiagnosticControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) } - + public interface PassthroughModeControlCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ boolean hasBus(); + /** + * optional int32 bus = 1; + */ int getBus(); - + // optional bool enabled = 2; + /** + * optional bool enabled = 2; + */ boolean hasEnabled(); + /** + * optional bool enabled = 2; + */ boolean getEnabled(); } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ public static final class PassthroughModeControlCommand extends com.google.protobuf.GeneratedMessage implements PassthroughModeControlCommandOrBuilder { // Use PassthroughModeControlCommand.newBuilder() to construct. - private PassthroughModeControlCommand(Builder builder) { + private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private PassthroughModeControlCommand(boolean noInit) {} - + private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final PassthroughModeControlCommand defaultInstance; public static PassthroughModeControlCommand getDefaultInstance() { return defaultInstance; } - + public PassthroughModeControlCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PassthroughModeControlCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + enabled_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PassthroughModeControlCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PassthroughModeControlCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } - + // optional bool enabled = 2; public static final int ENABLED_FIELD_NUMBER = 2; private boolean enabled_; + /** + * optional bool enabled = 2; + */ public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bool enabled = 2; + */ public boolean getEnabled() { return enabled_; } - + private void initFields() { bus_ = 0; enabled_ = false; @@ -3863,11 +5042,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -3879,12 +5058,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -3898,94 +5077,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.PassthroughModeControlCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { @@ -3993,18 +5161,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4015,7 +5186,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -4024,20 +5195,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -4045,17 +5216,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.PassthroughModeControlCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); int from_bitField0_ = bitField0_; @@ -4072,7 +5233,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); @@ -4081,7 +5242,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; if (other.hasBus()) { @@ -4093,163 +5254,263 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - enabled_ = input.readBool(); - break; - } + com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } + /** + * optional int32 bus = 1; + */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } + /** + * optional int32 bus = 1; + */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional bool enabled = 2; private boolean enabled_ ; + /** + * optional bool enabled = 2; + */ public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bool enabled = 2; + */ public boolean getEnabled() { return enabled_; } + /** + * optional bool enabled = 2; + */ public Builder setEnabled(boolean value) { bitField0_ |= 0x00000002; enabled_ = value; onChanged(); return this; } + /** + * optional bool enabled = 2; + */ public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000002); enabled_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) } - + static { defaultInstance = new PassthroughModeControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } - + public interface AcceptanceFilterBypassCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ boolean hasBus(); + /** + * optional int32 bus = 1; + */ int getBus(); - + // optional bool bypass = 2; + /** + * optional bool bypass = 2; + */ boolean hasBypass(); + /** + * optional bool bypass = 2; + */ boolean getBypass(); } + /** + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + */ public static final class AcceptanceFilterBypassCommand extends com.google.protobuf.GeneratedMessage implements AcceptanceFilterBypassCommandOrBuilder { // Use AcceptanceFilterBypassCommand.newBuilder() to construct. - private AcceptanceFilterBypassCommand(Builder builder) { + private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private AcceptanceFilterBypassCommand(boolean noInit) {} - + private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final AcceptanceFilterBypassCommand defaultInstance; public static AcceptanceFilterBypassCommand getDefaultInstance() { return defaultInstance; } - + public AcceptanceFilterBypassCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AcceptanceFilterBypassCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + bypass_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AcceptanceFilterBypassCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcceptanceFilterBypassCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } - + // optional bool bypass = 2; public static final int BYPASS_FIELD_NUMBER = 2; private boolean bypass_; + /** + * optional bool bypass = 2; + */ public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bool bypass = 2; + */ public boolean getBypass() { return bypass_; } - + private void initFields() { bus_ = 0; bypass_ = false; @@ -4258,11 +5519,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -4274,12 +5535,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -4293,94 +5554,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { @@ -4388,18 +5638,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4410,7 +5663,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -4419,20 +5672,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); if (!result.isInitialized()) { @@ -4440,17 +5693,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); int from_bitField0_ = bitField0_; @@ -4467,7 +5710,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); @@ -4476,7 +5719,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; if (other.hasBus()) { @@ -4488,152 +5731,256 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - bypass_ = input.readBool(); - break; - } + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } + /** + * optional int32 bus = 1; + */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } + /** + * optional int32 bus = 1; + */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional bool bypass = 2; private boolean bypass_ ; + /** + * optional bool bypass = 2; + */ public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bool bypass = 2; + */ public boolean getBypass() { return bypass_; } + /** + * optional bool bypass = 2; + */ public Builder setBypass(boolean value) { bitField0_ |= 0x00000002; bypass_ = value; onChanged(); return this; } + /** + * optional bool bypass = 2; + */ public Builder clearBypass() { bitField0_ = (bitField0_ & ~0x00000002); bypass_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) } - + static { defaultInstance = new AcceptanceFilterBypassCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - + public interface PayloadFormatCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ boolean hasFormat(); + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat(); } + /** + * Protobuf type {@code openxc.PayloadFormatCommand} + */ public static final class PayloadFormatCommand extends com.google.protobuf.GeneratedMessage implements PayloadFormatCommandOrBuilder { // Use PayloadFormatCommand.newBuilder() to construct. - private PayloadFormatCommand(Builder builder) { + private PayloadFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private PayloadFormatCommand(boolean noInit) {} - + private PayloadFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final PayloadFormatCommand defaultInstance; public static PayloadFormatCommand getDefaultInstance() { return defaultInstance; } - + public PayloadFormatCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PayloadFormatCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + format_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PayloadFormatCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PayloadFormatCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.PayloadFormatCommand.PayloadFormat} + */ public enum PayloadFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * JSON = 1; + */ JSON(0, 1), + /** + * PROTOBUF = 2; + */ PROTOBUF(1, 2), + /** + * MESSAGEPACK = 3; + */ MESSAGEPACK(2, 3), ; - + + /** + * JSON = 1; + */ public static final int JSON_VALUE = 1; + /** + * PROTOBUF = 2; + */ public static final int PROTOBUF_VALUE = 2; + /** + * MESSAGEPACK = 3; + */ public static final int MESSAGEPACK_VALUE = 3; - - + + public final int getNumber() { return value; } - + public static PayloadFormat valueOf(int value) { switch (value) { case 1: return JSON; @@ -4642,7 +5989,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -4654,7 +6001,7 @@ public final class BinaryMessages { return PayloadFormat.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -4667,11 +6014,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor().getEnumTypes().get(0); } - - private static final PayloadFormat[] VALUES = { - JSON, PROTOBUF, MESSAGEPACK, - }; - + + private static final PayloadFormat[] VALUES = values(); + public static PayloadFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -4680,29 +6025,35 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private PayloadFormat(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.PayloadFormatCommand.PayloadFormat) } - + private int bitField0_; // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; public static final int FORMAT_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_; + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } - + private void initFields() { format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; } @@ -4710,11 +6061,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -4723,12 +6074,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -4738,94 +6089,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PayloadFormatCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.PayloadFormatCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { @@ -4833,18 +6173,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4855,27 +6198,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - + public com.openxc.BinaryMessages.PayloadFormatCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PayloadFormatCommand build() { com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); if (!result.isInitialized()) { @@ -4883,17 +6226,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.PayloadFormatCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.PayloadFormatCommand buildPartial() { com.openxc.BinaryMessages.PayloadFormatCommand result = new com.openxc.BinaryMessages.PayloadFormatCommand(this); int from_bitField0_ = bitField0_; @@ -4906,7 +6239,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PayloadFormatCommand) { return mergeFrom((com.openxc.BinaryMessages.PayloadFormatCommand)other); @@ -4915,7 +6248,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PayloadFormatCommand other) { if (other == com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance()) return this; if (other.hasFormat()) { @@ -4924,59 +6257,47 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - format_ = value; - } - break; - } + com.openxc.BinaryMessages.PayloadFormatCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.PayloadFormatCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ public Builder setFormat(com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value) { if (value == null) { throw new NullPointerException(); @@ -4986,70 +6307,152 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + */ public Builder clearFormat() { bitField0_ = (bitField0_ & ~0x00000001); format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PayloadFormatCommand) } - + static { defaultInstance = new PayloadFormatCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } - + public interface PredefinedObd2RequestsCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional bool enabled = 1; + /** + * optional bool enabled = 1; + */ boolean hasEnabled(); + /** + * optional bool enabled = 1; + */ boolean getEnabled(); } + /** + * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} + */ public static final class PredefinedObd2RequestsCommand extends com.google.protobuf.GeneratedMessage implements PredefinedObd2RequestsCommandOrBuilder { // Use PredefinedObd2RequestsCommand.newBuilder() to construct. - private PredefinedObd2RequestsCommand(Builder builder) { + private PredefinedObd2RequestsCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private PredefinedObd2RequestsCommand(boolean noInit) {} - + private PredefinedObd2RequestsCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final PredefinedObd2RequestsCommand defaultInstance; public static PredefinedObd2RequestsCommand getDefaultInstance() { return defaultInstance; } - + public PredefinedObd2RequestsCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PredefinedObd2RequestsCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + enabled_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PredefinedObd2RequestsCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredefinedObd2RequestsCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; // optional bool enabled = 1; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_; + /** + * optional bool enabled = 1; + */ public boolean hasEnabled() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional bool enabled = 1; + */ public boolean getEnabled() { return enabled_; } - + private void initFields() { enabled_ = false; } @@ -5057,11 +6460,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5070,12 +6473,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5085,94 +6488,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { @@ -5180,18 +6572,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5202,27 +6597,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); enabled_ = false; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; } - + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand build() { com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); if (!result.isInitialized()) { @@ -5230,17 +6625,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildPartial() { com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = new com.openxc.BinaryMessages.PredefinedObd2RequestsCommand(this); int from_bitField0_ = bitField0_; @@ -5253,7 +6638,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) { return mergeFrom((com.openxc.BinaryMessages.PredefinedObd2RequestsCommand)other); @@ -5262,7 +6647,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand other) { if (other == com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance()) return this; if (other.hasEnabled()) { @@ -5271,139 +6656,281 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - enabled_ = input.readBool(); - break; - } + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional bool enabled = 1; private boolean enabled_ ; + /** + * optional bool enabled = 1; + */ public boolean hasEnabled() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional bool enabled = 1; + */ public boolean getEnabled() { return enabled_; } + /** + * optional bool enabled = 1; + */ public Builder setEnabled(boolean value) { bitField0_ |= 0x00000001; enabled_ = value; onChanged(); return this; } + /** + * optional bool enabled = 1; + */ public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000001); enabled_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PredefinedObd2RequestsCommand) } - + static { defaultInstance = new PredefinedObd2RequestsCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) } - + public interface NetworkOperatorSettingsOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional bool allowDataRoaming = 1; + /** + * optional bool allowDataRoaming = 1; + */ boolean hasAllowDataRoaming(); + /** + * optional bool allowDataRoaming = 1; + */ boolean getAllowDataRoaming(); - + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ boolean hasOperatorSelectMode(); + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode(); - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ boolean hasNetworkDescriptor(); + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor(); + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder(); } + /** + * Protobuf type {@code openxc.NetworkOperatorSettings} + */ public static final class NetworkOperatorSettings extends com.google.protobuf.GeneratedMessage implements NetworkOperatorSettingsOrBuilder { // Use NetworkOperatorSettings.newBuilder() to construct. - private NetworkOperatorSettings(Builder builder) { + private NetworkOperatorSettings(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private NetworkOperatorSettings(boolean noInit) {} - + private NetworkOperatorSettings(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final NetworkOperatorSettings defaultInstance; public static NetworkOperatorSettings getDefaultInstance() { return defaultInstance; } - + public NetworkOperatorSettings getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NetworkOperatorSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + allowDataRoaming_ = input.readBool(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + operatorSelectMode_ = value; + } + break; + } + case 26: { + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = networkDescriptor_.toBuilder(); + } + networkDescriptor_ = input.readMessage(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networkDescriptor_); + networkDescriptor_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NetworkOperatorSettings.class, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NetworkOperatorSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkOperatorSettings(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + + /** + * Protobuf enum {@code openxc.NetworkOperatorSettings.OperatorSelectMode} + */ public enum OperatorSelectMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * AUTOMATIC = 0; + */ AUTOMATIC(0, 0), + /** + * MANUAL = 1; + */ MANUAL(1, 1), + /** + * DEREGISTER = 2; + */ DEREGISTER(2, 2), + /** + * SET_ONLY = 3; + */ SET_ONLY(3, 3), + /** + * MANUAL_AUTOMATIC = 4; + */ MANUAL_AUTOMATIC(4, 4), ; - + + /** + * AUTOMATIC = 0; + */ public static final int AUTOMATIC_VALUE = 0; + /** + * MANUAL = 1; + */ public static final int MANUAL_VALUE = 1; + /** + * DEREGISTER = 2; + */ public static final int DEREGISTER_VALUE = 2; + /** + * SET_ONLY = 3; + */ public static final int SET_ONLY_VALUE = 3; + /** + * MANUAL_AUTOMATIC = 4; + */ public static final int MANUAL_AUTOMATIC_VALUE = 4; - - + + public final int getNumber() { return value; } - + public static OperatorSelectMode valueOf(int value) { switch (value) { case 0: return AUTOMATIC; @@ -5414,7 +6941,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -5426,7 +6953,7 @@ public final class BinaryMessages { return OperatorSelectMode.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -5439,11 +6966,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.NetworkOperatorSettings.getDescriptor().getEnumTypes().get(0); } - - private static final OperatorSelectMode[] VALUES = { - AUTOMATIC, MANUAL, DEREGISTER, SET_ONLY, MANUAL_AUTOMATIC, - }; - + + private static final OperatorSelectMode[] VALUES = values(); + public static OperatorSelectMode valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -5452,69 +6977,174 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private OperatorSelectMode(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.NetworkOperatorSettings.OperatorSelectMode) } - + public interface NetworkDescriptorOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional uint32 PLMN = 1; + /** + * optional uint32 PLMN = 1; + */ boolean hasPLMN(); + /** + * optional uint32 PLMN = 1; + */ int getPLMN(); - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ boolean hasNetworkType(); + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType(); } + /** + * Protobuf type {@code openxc.NetworkOperatorSettings.NetworkDescriptor} + */ public static final class NetworkDescriptor extends com.google.protobuf.GeneratedMessage implements NetworkDescriptorOrBuilder { // Use NetworkDescriptor.newBuilder() to construct. - private NetworkDescriptor(Builder builder) { + private NetworkDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private NetworkDescriptor(boolean noInit) {} - + private NetworkDescriptor(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final NetworkDescriptor defaultInstance; public static NetworkDescriptor getDefaultInstance() { return defaultInstance; } - + public NetworkDescriptor getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NetworkDescriptor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + pLMN_ = input.readUInt32(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + networkType_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.class, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NetworkDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkDescriptor(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType} + */ public enum NetworkType implements com.google.protobuf.ProtocolMessageEnum { + /** + * GSM = 0; + */ GSM(0, 0), + /** + * UTRAN = 2; + */ UTRAN(1, 2), ; - + + /** + * GSM = 0; + */ public static final int GSM_VALUE = 0; + /** + * UTRAN = 2; + */ public static final int UTRAN_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static NetworkType valueOf(int value) { switch (value) { case 0: return GSM; @@ -5522,7 +7152,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -5534,7 +7164,7 @@ public final class BinaryMessages { return NetworkType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -5547,11 +7177,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDescriptor().getEnumTypes().get(0); } - - private static final NetworkType[] VALUES = { - GSM, UTRAN, - }; - + + private static final NetworkType[] VALUES = values(); + public static NetworkType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -5560,39 +7188,51 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private NetworkType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType) } - + private int bitField0_; // optional uint32 PLMN = 1; public static final int PLMN_FIELD_NUMBER = 1; private int pLMN_; + /** + * optional uint32 PLMN = 1; + */ public boolean hasPLMN() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional uint32 PLMN = 1; + */ public int getPLMN() { return pLMN_; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; public static final int NETWORKTYPE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType_; + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ public boolean hasNetworkType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType() { return networkType_; } - + private void initFields() { pLMN_ = 0; networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; @@ -5601,11 +7241,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5617,12 +7257,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5636,94 +7276,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.NetworkOperatorSettings.NetworkDescriptor} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder { @@ -5731,18 +7360,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.class, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder.class); } - + // Construct using com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5753,7 +7385,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); pLMN_ = 0; @@ -5762,20 +7394,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; } - + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getDefaultInstanceForType() { return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); } - + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor build() { com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = buildPartial(); if (!result.isInitialized()) { @@ -5783,17 +7415,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor buildPartial() { com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = new com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor(this); int from_bitField0_ = bitField0_; @@ -5810,7 +7432,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor) { return mergeFrom((com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor)other); @@ -5819,7 +7441,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor other) { if (other == com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance()) return this; if (other.hasPLMN()) { @@ -5831,85 +7453,80 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - pLMN_ = input.readUInt32(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - networkType_ = value; - } - break; - } + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional uint32 PLMN = 1; private int pLMN_ ; + /** + * optional uint32 PLMN = 1; + */ public boolean hasPLMN() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional uint32 PLMN = 1; + */ public int getPLMN() { return pLMN_; } + /** + * optional uint32 PLMN = 1; + */ public Builder setPLMN(int value) { bitField0_ |= 0x00000001; pLMN_ = value; onChanged(); return this; } + /** + * optional uint32 PLMN = 1; + */ public Builder clearPLMN() { bitField0_ = (bitField0_ & ~0x00000001); pLMN_ = 0; onChanged(); return this; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ public boolean hasNetworkType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType() { return networkType_; } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ public Builder setNetworkType(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value) { if (value == null) { throw new NullPointerException(); @@ -5919,58 +7536,82 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; + */ public Builder clearNetworkType() { bitField0_ = (bitField0_ & ~0x00000002); networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) } - + static { defaultInstance = new NetworkDescriptor(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) } - + private int bitField0_; // optional bool allowDataRoaming = 1; public static final int ALLOWDATAROAMING_FIELD_NUMBER = 1; private boolean allowDataRoaming_; + /** + * optional bool allowDataRoaming = 1; + */ public boolean hasAllowDataRoaming() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional bool allowDataRoaming = 1; + */ public boolean getAllowDataRoaming() { return allowDataRoaming_; } - + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; public static final int OPERATORSELECTMODE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode_; + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ public boolean hasOperatorSelectMode() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode() { return operatorSelectMode_; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; public static final int NETWORKDESCRIPTOR_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor networkDescriptor_; + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public boolean hasNetworkDescriptor() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor() { return networkDescriptor_; } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder() { return networkDescriptor_; } - + private void initFields() { allowDataRoaming_ = false; operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; @@ -5980,11 +7621,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5999,12 +7640,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6022,94 +7663,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.NetworkOperatorSettings prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.NetworkOperatorSettings} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder { @@ -6117,18 +7747,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NetworkOperatorSettings.class, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder.class); } - + // Construct using com.openxc.BinaryMessages.NetworkOperatorSettings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6140,7 +7773,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); allowDataRoaming_ = false; @@ -6155,20 +7788,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.NetworkOperatorSettings.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; } - + public com.openxc.BinaryMessages.NetworkOperatorSettings getDefaultInstanceForType() { return com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); } - + public com.openxc.BinaryMessages.NetworkOperatorSettings build() { com.openxc.BinaryMessages.NetworkOperatorSettings result = buildPartial(); if (!result.isInitialized()) { @@ -6176,17 +7809,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.NetworkOperatorSettings buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.NetworkOperatorSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.NetworkOperatorSettings buildPartial() { com.openxc.BinaryMessages.NetworkOperatorSettings result = new com.openxc.BinaryMessages.NetworkOperatorSettings(this); int from_bitField0_ = bitField0_; @@ -6211,7 +7834,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.NetworkOperatorSettings) { return mergeFrom((com.openxc.BinaryMessages.NetworkOperatorSettings)other); @@ -6220,7 +7843,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkOperatorSettings other) { if (other == com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance()) return this; if (other.hasAllowDataRoaming()) { @@ -6235,94 +7858,80 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - allowDataRoaming_ = input.readBool(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - operatorSelectMode_ = value; - } - break; - } - case 26: { - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder subBuilder = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.newBuilder(); - if (hasNetworkDescriptor()) { - subBuilder.mergeFrom(getNetworkDescriptor()); - } - input.readMessage(subBuilder, extensionRegistry); - setNetworkDescriptor(subBuilder.buildPartial()); - break; - } + com.openxc.BinaryMessages.NetworkOperatorSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.NetworkOperatorSettings) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional bool allowDataRoaming = 1; private boolean allowDataRoaming_ ; + /** + * optional bool allowDataRoaming = 1; + */ public boolean hasAllowDataRoaming() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional bool allowDataRoaming = 1; + */ public boolean getAllowDataRoaming() { return allowDataRoaming_; } + /** + * optional bool allowDataRoaming = 1; + */ public Builder setAllowDataRoaming(boolean value) { bitField0_ |= 0x00000001; allowDataRoaming_ = value; onChanged(); return this; } + /** + * optional bool allowDataRoaming = 1; + */ public Builder clearAllowDataRoaming() { bitField0_ = (bitField0_ & ~0x00000001); allowDataRoaming_ = false; onChanged(); return this; } - + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ public boolean hasOperatorSelectMode() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode() { return operatorSelectMode_; } + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ public Builder setOperatorSelectMode(com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value) { if (value == null) { throw new NullPointerException(); @@ -6332,20 +7941,29 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; + */ public Builder clearOperatorSelectMode() { bitField0_ = (bitField0_ & ~0x00000002); operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; onChanged(); return this; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder> networkDescriptorBuilder_; + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public boolean hasNetworkDescriptor() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor() { if (networkDescriptorBuilder_ == null) { return networkDescriptor_; @@ -6353,6 +7971,9 @@ public final class BinaryMessages { return networkDescriptorBuilder_.getMessage(); } } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public Builder setNetworkDescriptor(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor value) { if (networkDescriptorBuilder_ == null) { if (value == null) { @@ -6366,6 +7987,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public Builder setNetworkDescriptor( com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder builderForValue) { if (networkDescriptorBuilder_ == null) { @@ -6377,6 +8001,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public Builder mergeNetworkDescriptor(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor value) { if (networkDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -6393,6 +8020,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public Builder clearNetworkDescriptor() { if (networkDescriptorBuilder_ == null) { networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); @@ -6403,11 +8033,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder getNetworkDescriptorBuilder() { bitField0_ |= 0x00000004; onChanged(); return getNetworkDescriptorFieldBuilder().getBuilder(); } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder() { if (networkDescriptorBuilder_ != null) { return networkDescriptorBuilder_.getMessageOrBuilder(); @@ -6415,6 +8051,9 @@ public final class BinaryMessages { return networkDescriptor_; } } + /** + * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder> getNetworkDescriptorFieldBuilder() { @@ -6428,86 +8067,175 @@ public final class BinaryMessages { } return networkDescriptorBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.NetworkOperatorSettings) } - + static { defaultInstance = new NetworkOperatorSettings(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings) } - + public interface NetworkDataSettingsOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional string APN = 1; + /** + * optional string APN = 1; + */ boolean hasAPN(); - String getAPN(); + /** + * optional string APN = 1; + */ + java.lang.String getAPN(); + /** + * optional string APN = 1; + */ + com.google.protobuf.ByteString + getAPNBytes(); } + /** + * Protobuf type {@code openxc.NetworkDataSettings} + */ public static final class NetworkDataSettings extends com.google.protobuf.GeneratedMessage implements NetworkDataSettingsOrBuilder { // Use NetworkDataSettings.newBuilder() to construct. - private NetworkDataSettings(Builder builder) { + private NetworkDataSettings(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private NetworkDataSettings(boolean noInit) {} - + private NetworkDataSettings(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final NetworkDataSettings defaultInstance; public static NetworkDataSettings getDefaultInstance() { return defaultInstance; } - + public NetworkDataSettings getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NetworkDataSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + aPN_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NetworkDataSettings.class, com.openxc.BinaryMessages.NetworkDataSettings.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NetworkDataSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkDataSettings(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + private int bitField0_; // optional string APN = 1; public static final int APN_FIELD_NUMBER = 1; private java.lang.Object aPN_; + /** + * optional string APN = 1; + */ public boolean hasAPN() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getAPN() { + /** + * optional string APN = 1; + */ + public java.lang.String getAPN() { java.lang.Object ref = aPN_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { aPN_ = s; } return s; } } - private com.google.protobuf.ByteString getAPNBytes() { + /** + * optional string APN = 1; + */ + public com.google.protobuf.ByteString + getAPNBytes() { java.lang.Object ref = aPN_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); aPN_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { aPN_ = ""; } @@ -6515,11 +8243,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -6528,12 +8256,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6543,94 +8271,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkDataSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.NetworkDataSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.NetworkDataSettings prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.NetworkDataSettings} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder { @@ -6638,18 +8355,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.NetworkDataSettings.class, com.openxc.BinaryMessages.NetworkDataSettings.Builder.class); } - + // Construct using com.openxc.BinaryMessages.NetworkDataSettings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6660,27 +8380,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); aPN_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.NetworkDataSettings.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; } - + public com.openxc.BinaryMessages.NetworkDataSettings getDefaultInstanceForType() { return com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); } - + public com.openxc.BinaryMessages.NetworkDataSettings build() { com.openxc.BinaryMessages.NetworkDataSettings result = buildPartial(); if (!result.isInitialized()) { @@ -6688,17 +8408,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.NetworkDataSettings buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.NetworkDataSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.NetworkDataSettings buildPartial() { com.openxc.BinaryMessages.NetworkDataSettings result = new com.openxc.BinaryMessages.NetworkDataSettings(this); int from_bitField0_ = bitField0_; @@ -6711,7 +8421,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.NetworkDataSettings) { return mergeFrom((com.openxc.BinaryMessages.NetworkDataSettings)other); @@ -6720,70 +8430,84 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkDataSettings other) { if (other == com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance()) return this; if (other.hasAPN()) { - setAPN(other.getAPN()); + bitField0_ |= 0x00000001; + aPN_ = other.aPN_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - aPN_ = input.readBytes(); - break; - } + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.NetworkDataSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.NetworkDataSettings) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional string APN = 1; private java.lang.Object aPN_ = ""; + /** + * optional string APN = 1; + */ public boolean hasAPN() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getAPN() { + /** + * optional string APN = 1; + */ + public java.lang.String getAPN() { java.lang.Object ref = aPN_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); aPN_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; + } + } + /** + * optional string APN = 1; + */ + public com.google.protobuf.ByteString + getAPNBytes() { + java.lang.Object ref = aPN_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + aPN_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public Builder setAPN(String value) { + /** + * optional string APN = 1; + */ + public Builder setAPN( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -6792,111 +8516,228 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional string APN = 1; + */ public Builder clearAPN() { bitField0_ = (bitField0_ & ~0x00000001); aPN_ = getDefaultInstance().getAPN(); onChanged(); return this; } - void setAPN(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string APN = 1; + */ + public Builder setAPNBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; aPN_ = value; onChanged(); + return this; } - + // @@protoc_insertion_point(builder_scope:openxc.NetworkDataSettings) } - + static { defaultInstance = new NetworkDataSettings(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.NetworkDataSettings) } - + public interface ServerConnectSettingsOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional string host = 1; + /** + * optional string host = 1; + */ boolean hasHost(); - String getHost(); - + /** + * optional string host = 1; + */ + java.lang.String getHost(); + /** + * optional string host = 1; + */ + com.google.protobuf.ByteString + getHostBytes(); + // optional uint32 port = 2; + /** + * optional uint32 port = 2; + */ boolean hasPort(); + /** + * optional uint32 port = 2; + */ int getPort(); } + /** + * Protobuf type {@code openxc.ServerConnectSettings} + */ public static final class ServerConnectSettings extends com.google.protobuf.GeneratedMessage implements ServerConnectSettingsOrBuilder { // Use ServerConnectSettings.newBuilder() to construct. - private ServerConnectSettings(Builder builder) { + private ServerConnectSettings(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private ServerConnectSettings(boolean noInit) {} - + private ServerConnectSettings(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final ServerConnectSettings defaultInstance; public static ServerConnectSettings getDefaultInstance() { return defaultInstance; } - + public ServerConnectSettings getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ServerConnectSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + host_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + port_ = input.readUInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ServerConnectSettings.class, com.openxc.BinaryMessages.ServerConnectSettings.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ServerConnectSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ServerConnectSettings(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + private int bitField0_; // optional string host = 1; public static final int HOST_FIELD_NUMBER = 1; private java.lang.Object host_; + /** + * optional string host = 1; + */ public boolean hasHost() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getHost() { + /** + * optional string host = 1; + */ + public java.lang.String getHost() { java.lang.Object ref = host_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { host_ = s; } return s; } } - private com.google.protobuf.ByteString getHostBytes() { + /** + * optional string host = 1; + */ + public com.google.protobuf.ByteString + getHostBytes() { java.lang.Object ref = host_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); host_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional uint32 port = 2; public static final int PORT_FIELD_NUMBER = 2; private int port_; + /** + * optional uint32 port = 2; + */ public boolean hasPort() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 port = 2; + */ public int getPort() { return port_; } - + private void initFields() { host_ = ""; port_ = 0; @@ -6905,11 +8746,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -6921,12 +8762,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6940,94 +8781,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.ServerConnectSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.ServerConnectSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.ServerConnectSettings prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.ServerConnectSettings} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder { @@ -7035,18 +8865,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ServerConnectSettings.class, com.openxc.BinaryMessages.ServerConnectSettings.Builder.class); } - + // Construct using com.openxc.BinaryMessages.ServerConnectSettings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -7057,7 +8890,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); host_ = ""; @@ -7066,20 +8899,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.ServerConnectSettings.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; } - + public com.openxc.BinaryMessages.ServerConnectSettings getDefaultInstanceForType() { return com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); } - + public com.openxc.BinaryMessages.ServerConnectSettings build() { com.openxc.BinaryMessages.ServerConnectSettings result = buildPartial(); if (!result.isInitialized()) { @@ -7087,17 +8920,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.ServerConnectSettings buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.ServerConnectSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.ServerConnectSettings buildPartial() { com.openxc.BinaryMessages.ServerConnectSettings result = new com.openxc.BinaryMessages.ServerConnectSettings(this); int from_bitField0_ = bitField0_; @@ -7114,7 +8937,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.ServerConnectSettings) { return mergeFrom((com.openxc.BinaryMessages.ServerConnectSettings)other); @@ -7123,11 +8946,13 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.ServerConnectSettings other) { if (other == com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance()) return this; if (other.hasHost()) { - setHost(other.getHost()); + bitField0_ |= 0x00000001; + host_ = other.host_; + onChanged(); } if (other.hasPort()) { setPort(other.getPort()); @@ -7135,66 +8960,73 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - host_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - port_ = input.readUInt32(); - break; - } + com.openxc.BinaryMessages.ServerConnectSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.ServerConnectSettings) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional string host = 1; private java.lang.Object host_ = ""; + /** + * optional string host = 1; + */ public boolean hasHost() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getHost() { + /** + * optional string host = 1; + */ + public java.lang.String getHost() { java.lang.Object ref = host_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); host_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; + } + } + /** + * optional string host = 1; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public Builder setHost(String value) { + /** + * optional string host = 1; + */ + public Builder setHost( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -7203,136 +9035,314 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional string host = 1; + */ public Builder clearHost() { bitField0_ = (bitField0_ & ~0x00000001); host_ = getDefaultInstance().getHost(); onChanged(); return this; } - void setHost(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string host = 1; + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; host_ = value; onChanged(); + return this; } - + // optional uint32 port = 2; private int port_ ; + /** + * optional uint32 port = 2; + */ public boolean hasPort() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 port = 2; + */ public int getPort() { return port_; } + /** + * optional uint32 port = 2; + */ public Builder setPort(int value) { bitField0_ |= 0x00000002; port_ = value; onChanged(); return this; } + /** + * optional uint32 port = 2; + */ public Builder clearPort() { bitField0_ = (bitField0_ & ~0x00000002); port_ = 0; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.ServerConnectSettings) } - + static { defaultInstance = new ServerConnectSettings(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.ServerConnectSettings) } - + public interface ModemConfigurationCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ boolean hasNetworkOperatorSettings(); + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings(); + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder(); - + // optional .openxc.NetworkDataSettings networkDataSettings = 2; + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ boolean hasNetworkDataSettings(); + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings(); + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder(); - + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ boolean hasServerConnectSettings(); + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings(); + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder(); } + /** + * Protobuf type {@code openxc.ModemConfigurationCommand} + */ public static final class ModemConfigurationCommand extends com.google.protobuf.GeneratedMessage implements ModemConfigurationCommandOrBuilder { // Use ModemConfigurationCommand.newBuilder() to construct. - private ModemConfigurationCommand(Builder builder) { + private ModemConfigurationCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private ModemConfigurationCommand(boolean noInit) {} - + private ModemConfigurationCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final ModemConfigurationCommand defaultInstance; public static ModemConfigurationCommand getDefaultInstance() { return defaultInstance; } - + public ModemConfigurationCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ModemConfigurationCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.openxc.BinaryMessages.NetworkOperatorSettings.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = networkOperatorSettings_.toBuilder(); + } + networkOperatorSettings_ = input.readMessage(com.openxc.BinaryMessages.NetworkOperatorSettings.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networkOperatorSettings_); + networkOperatorSettings_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 18: { + com.openxc.BinaryMessages.NetworkDataSettings.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = networkDataSettings_.toBuilder(); + } + networkDataSettings_ = input.readMessage(com.openxc.BinaryMessages.NetworkDataSettings.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networkDataSettings_); + networkDataSettings_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 26: { + com.openxc.BinaryMessages.ServerConnectSettings.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = serverConnectSettings_.toBuilder(); + } + serverConnectSettings_ = input.readMessage(com.openxc.BinaryMessages.ServerConnectSettings.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serverConnectSettings_); + serverConnectSettings_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ModemConfigurationCommand.class, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ModemConfigurationCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ModemConfigurationCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + private int bitField0_; // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; public static final int NETWORKOPERATORSETTINGS_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.NetworkOperatorSettings networkOperatorSettings_; + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public boolean hasNetworkOperatorSettings() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings() { return networkOperatorSettings_; } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder() { return networkOperatorSettings_; } - + // optional .openxc.NetworkDataSettings networkDataSettings = 2; public static final int NETWORKDATASETTINGS_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.NetworkDataSettings networkDataSettings_; + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public boolean hasNetworkDataSettings() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings() { return networkDataSettings_; } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder() { return networkDataSettings_; } - + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; public static final int SERVERCONNECTSETTINGS_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.ServerConnectSettings serverConnectSettings_; + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public boolean hasServerConnectSettings() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings() { return serverConnectSettings_; } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder() { return serverConnectSettings_; } - + private void initFields() { networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); @@ -7342,11 +9352,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -7361,12 +9371,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -7384,94 +9394,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.ModemConfigurationCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.ModemConfigurationCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder { @@ -7479,18 +9478,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.ModemConfigurationCommand.class, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.ModemConfigurationCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -7504,7 +9506,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); if (networkOperatorSettingsBuilder_ == null) { @@ -7527,20 +9529,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.ModemConfigurationCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; } - + public com.openxc.BinaryMessages.ModemConfigurationCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.ModemConfigurationCommand build() { com.openxc.BinaryMessages.ModemConfigurationCommand result = buildPartial(); if (!result.isInitialized()) { @@ -7548,17 +9550,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.ModemConfigurationCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.ModemConfigurationCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.ModemConfigurationCommand buildPartial() { com.openxc.BinaryMessages.ModemConfigurationCommand result = new com.openxc.BinaryMessages.ModemConfigurationCommand(this); int from_bitField0_ = bitField0_; @@ -7591,7 +9583,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.ModemConfigurationCommand) { return mergeFrom((com.openxc.BinaryMessages.ModemConfigurationCommand)other); @@ -7600,7 +9592,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.ModemConfigurationCommand other) { if (other == com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance()) return this; if (other.hasNetworkOperatorSettings()) { @@ -7613,76 +9605,45 @@ public final class BinaryMessages { mergeServerConnectSettings(other.getServerConnectSettings()); } this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - com.openxc.BinaryMessages.NetworkOperatorSettings.Builder subBuilder = com.openxc.BinaryMessages.NetworkOperatorSettings.newBuilder(); - if (hasNetworkOperatorSettings()) { - subBuilder.mergeFrom(getNetworkOperatorSettings()); - } - input.readMessage(subBuilder, extensionRegistry); - setNetworkOperatorSettings(subBuilder.buildPartial()); - break; - } - case 18: { - com.openxc.BinaryMessages.NetworkDataSettings.Builder subBuilder = com.openxc.BinaryMessages.NetworkDataSettings.newBuilder(); - if (hasNetworkDataSettings()) { - subBuilder.mergeFrom(getNetworkDataSettings()); - } - input.readMessage(subBuilder, extensionRegistry); - setNetworkDataSettings(subBuilder.buildPartial()); - break; - } - case 26: { - com.openxc.BinaryMessages.ServerConnectSettings.Builder subBuilder = com.openxc.BinaryMessages.ServerConnectSettings.newBuilder(); - if (hasServerConnectSettings()) { - subBuilder.mergeFrom(getServerConnectSettings()); - } - input.readMessage(subBuilder, extensionRegistry); - setServerConnectSettings(subBuilder.buildPartial()); - break; - } + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.ModemConfigurationCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.ModemConfigurationCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; private com.openxc.BinaryMessages.NetworkOperatorSettings networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder, com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder> networkOperatorSettingsBuilder_; + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public boolean hasNetworkOperatorSettings() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings() { if (networkOperatorSettingsBuilder_ == null) { return networkOperatorSettings_; @@ -7690,6 +9651,9 @@ public final class BinaryMessages { return networkOperatorSettingsBuilder_.getMessage(); } } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public Builder setNetworkOperatorSettings(com.openxc.BinaryMessages.NetworkOperatorSettings value) { if (networkOperatorSettingsBuilder_ == null) { if (value == null) { @@ -7703,6 +9667,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public Builder setNetworkOperatorSettings( com.openxc.BinaryMessages.NetworkOperatorSettings.Builder builderForValue) { if (networkOperatorSettingsBuilder_ == null) { @@ -7714,6 +9681,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public Builder mergeNetworkOperatorSettings(com.openxc.BinaryMessages.NetworkOperatorSettings value) { if (networkOperatorSettingsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -7730,6 +9700,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public Builder clearNetworkOperatorSettings() { if (networkOperatorSettingsBuilder_ == null) { networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); @@ -7740,11 +9713,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); return this; } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public com.openxc.BinaryMessages.NetworkOperatorSettings.Builder getNetworkOperatorSettingsBuilder() { bitField0_ |= 0x00000001; onChanged(); return getNetworkOperatorSettingsFieldBuilder().getBuilder(); } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ public com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder() { if (networkOperatorSettingsBuilder_ != null) { return networkOperatorSettingsBuilder_.getMessageOrBuilder(); @@ -7752,6 +9731,9 @@ public final class BinaryMessages { return networkOperatorSettings_; } } + /** + * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder, com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder> getNetworkOperatorSettingsFieldBuilder() { @@ -7765,14 +9747,20 @@ public final class BinaryMessages { } return networkOperatorSettingsBuilder_; } - + // optional .openxc.NetworkDataSettings networkDataSettings = 2; private com.openxc.BinaryMessages.NetworkDataSettings networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkDataSettings, com.openxc.BinaryMessages.NetworkDataSettings.Builder, com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder> networkDataSettingsBuilder_; + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public boolean hasNetworkDataSettings() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings() { if (networkDataSettingsBuilder_ == null) { return networkDataSettings_; @@ -7780,6 +9768,9 @@ public final class BinaryMessages { return networkDataSettingsBuilder_.getMessage(); } } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public Builder setNetworkDataSettings(com.openxc.BinaryMessages.NetworkDataSettings value) { if (networkDataSettingsBuilder_ == null) { if (value == null) { @@ -7793,6 +9784,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public Builder setNetworkDataSettings( com.openxc.BinaryMessages.NetworkDataSettings.Builder builderForValue) { if (networkDataSettingsBuilder_ == null) { @@ -7804,6 +9798,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public Builder mergeNetworkDataSettings(com.openxc.BinaryMessages.NetworkDataSettings value) { if (networkDataSettingsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -7820,6 +9817,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public Builder clearNetworkDataSettings() { if (networkDataSettingsBuilder_ == null) { networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); @@ -7830,11 +9830,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public com.openxc.BinaryMessages.NetworkDataSettings.Builder getNetworkDataSettingsBuilder() { bitField0_ |= 0x00000002; onChanged(); return getNetworkDataSettingsFieldBuilder().getBuilder(); } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ public com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder() { if (networkDataSettingsBuilder_ != null) { return networkDataSettingsBuilder_.getMessageOrBuilder(); @@ -7842,6 +9848,9 @@ public final class BinaryMessages { return networkDataSettings_; } } + /** + * optional .openxc.NetworkDataSettings networkDataSettings = 2; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkDataSettings, com.openxc.BinaryMessages.NetworkDataSettings.Builder, com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder> getNetworkDataSettingsFieldBuilder() { @@ -7855,14 +9864,20 @@ public final class BinaryMessages { } return networkDataSettingsBuilder_; } - + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; private com.openxc.BinaryMessages.ServerConnectSettings serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ServerConnectSettings, com.openxc.BinaryMessages.ServerConnectSettings.Builder, com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder> serverConnectSettingsBuilder_; + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public boolean hasServerConnectSettings() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings() { if (serverConnectSettingsBuilder_ == null) { return serverConnectSettings_; @@ -7870,6 +9885,9 @@ public final class BinaryMessages { return serverConnectSettingsBuilder_.getMessage(); } } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public Builder setServerConnectSettings(com.openxc.BinaryMessages.ServerConnectSettings value) { if (serverConnectSettingsBuilder_ == null) { if (value == null) { @@ -7883,6 +9901,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public Builder setServerConnectSettings( com.openxc.BinaryMessages.ServerConnectSettings.Builder builderForValue) { if (serverConnectSettingsBuilder_ == null) { @@ -7894,6 +9915,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public Builder mergeServerConnectSettings(com.openxc.BinaryMessages.ServerConnectSettings value) { if (serverConnectSettingsBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -7910,6 +9934,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public Builder clearServerConnectSettings() { if (serverConnectSettingsBuilder_ == null) { serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); @@ -7920,11 +9947,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public com.openxc.BinaryMessages.ServerConnectSettings.Builder getServerConnectSettingsBuilder() { bitField0_ |= 0x00000004; onChanged(); return getServerConnectSettingsFieldBuilder().getBuilder(); } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ public com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder() { if (serverConnectSettingsBuilder_ != null) { return serverConnectSettingsBuilder_.getMessageOrBuilder(); @@ -7932,6 +9965,9 @@ public final class BinaryMessages { return serverConnectSettings_; } } + /** + * optional .openxc.ServerConnectSettings serverConnectSettings = 3; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ServerConnectSettings, com.openxc.BinaryMessages.ServerConnectSettings.Builder, com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder> getServerConnectSettingsFieldBuilder() { @@ -7945,64 +9981,143 @@ public final class BinaryMessages { } return serverConnectSettingsBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.ModemConfigurationCommand) } - + static { defaultInstance = new ModemConfigurationCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) } - + public interface RTCConfigurationCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional uint32 unix_time = 1; + /** + * optional uint32 unix_time = 1; + */ boolean hasUnixTime(); + /** + * optional uint32 unix_time = 1; + */ int getUnixTime(); } + /** + * Protobuf type {@code openxc.RTCConfigurationCommand} + */ public static final class RTCConfigurationCommand extends com.google.protobuf.GeneratedMessage implements RTCConfigurationCommandOrBuilder { // Use RTCConfigurationCommand.newBuilder() to construct. - private RTCConfigurationCommand(Builder builder) { + private RTCConfigurationCommand(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private RTCConfigurationCommand(boolean noInit) {} - + private RTCConfigurationCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final RTCConfigurationCommand defaultInstance; public static RTCConfigurationCommand getDefaultInstance() { return defaultInstance; } - + public RTCConfigurationCommand getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RTCConfigurationCommand( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + unixTime_ = input.readUInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.RTCConfigurationCommand.class, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RTCConfigurationCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RTCConfigurationCommand(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; // optional uint32 unix_time = 1; public static final int UNIX_TIME_FIELD_NUMBER = 1; private int unixTime_; + /** + * optional uint32 unix_time = 1; + */ public boolean hasUnixTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional uint32 unix_time = 1; + */ public int getUnixTime() { return unixTime_; } - + private void initFields() { unixTime_ = 0; } @@ -8010,11 +10125,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -8023,12 +10138,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -8038,94 +10153,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.RTCConfigurationCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.RTCConfigurationCommand} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder { @@ -8133,18 +10237,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.RTCConfigurationCommand.class, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder.class); } - + // Construct using com.openxc.BinaryMessages.RTCConfigurationCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -8155,27 +10262,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); unixTime_ = 0; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.RTCConfigurationCommand.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; } - + public com.openxc.BinaryMessages.RTCConfigurationCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.RTCConfigurationCommand build() { com.openxc.BinaryMessages.RTCConfigurationCommand result = buildPartial(); if (!result.isInitialized()) { @@ -8183,17 +10290,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.RTCConfigurationCommand buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.RTCConfigurationCommand result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.RTCConfigurationCommand buildPartial() { com.openxc.BinaryMessages.RTCConfigurationCommand result = new com.openxc.BinaryMessages.RTCConfigurationCommand(this); int from_bitField0_ = bitField0_; @@ -8206,7 +10303,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.RTCConfigurationCommand) { return mergeFrom((com.openxc.BinaryMessages.RTCConfigurationCommand)other); @@ -8215,7 +10312,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.RTCConfigurationCommand other) { if (other == com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance()) return this; if (other.hasUnixTime()) { @@ -8224,173 +10321,299 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - unixTime_ = input.readUInt32(); - break; - } + com.openxc.BinaryMessages.RTCConfigurationCommand parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.RTCConfigurationCommand) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional uint32 unix_time = 1; private int unixTime_ ; + /** + * optional uint32 unix_time = 1; + */ public boolean hasUnixTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional uint32 unix_time = 1; + */ public int getUnixTime() { return unixTime_; } + /** + * optional uint32 unix_time = 1; + */ public Builder setUnixTime(int value) { bitField0_ |= 0x00000001; unixTime_ = value; onChanged(); return this; } + /** + * optional uint32 unix_time = 1; + */ public Builder clearUnixTime() { bitField0_ = (bitField0_ & ~0x00000001); unixTime_ = 0; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.RTCConfigurationCommand) } - + static { defaultInstance = new RTCConfigurationCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.RTCConfigurationCommand) } - + public interface CommandResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.ControlCommand.Type type = 1; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ boolean hasType(); + /** + * optional .openxc.ControlCommand.Type type = 1; + */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - + // optional string message = 2; + /** + * optional string message = 2; + */ boolean hasMessage(); - String getMessage(); - + /** + * optional string message = 2; + */ + java.lang.String getMessage(); + /** + * optional string message = 2; + */ + com.google.protobuf.ByteString + getMessageBytes(); + // optional bool status = 3; + /** + * optional bool status = 3; + */ boolean hasStatus(); + /** + * optional bool status = 3; + */ boolean getStatus(); } + /** + * Protobuf type {@code openxc.CommandResponse} + */ public static final class CommandResponse extends com.google.protobuf.GeneratedMessage implements CommandResponseOrBuilder { // Use CommandResponse.newBuilder() to construct. - private CommandResponse(Builder builder) { + private CommandResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private CommandResponse(boolean noInit) {} - + private CommandResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final CommandResponse defaultInstance; public static CommandResponse getDefaultInstance() { return defaultInstance; } - + public CommandResponse getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CommandResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + message_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + status_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CommandResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommandResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - + // optional string message = 2; public static final int MESSAGE_FIELD_NUMBER = 2; private java.lang.Object message_; + /** + * optional string message = 2; + */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getMessage() { + /** + * optional string message = 2; + */ + public java.lang.String getMessage() { java.lang.Object ref = message_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { message_ = s; } return s; } } - private com.google.protobuf.ByteString getMessageBytes() { + /** + * optional string message = 2; + */ + public com.google.protobuf.ByteString + getMessageBytes() { java.lang.Object ref = message_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional bool status = 3; public static final int STATUS_FIELD_NUMBER = 3; private boolean status_; + /** + * optional bool status = 3; + */ public boolean hasStatus() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional bool status = 3; + */ public boolean getStatus() { return status_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; message_ = ""; @@ -8400,11 +10623,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -8419,12 +10642,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -8442,94 +10665,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.CommandResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.CommandResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.CommandResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.CommandResponse} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.CommandResponseOrBuilder { @@ -8537,18 +10749,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); } - + // Construct using com.openxc.BinaryMessages.CommandResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -8559,7 +10774,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; @@ -8570,20 +10785,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.CommandResponse.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } - + public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() { return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); } - + public com.openxc.BinaryMessages.CommandResponse build() { com.openxc.BinaryMessages.CommandResponse result = buildPartial(); if (!result.isInitialized()) { @@ -8591,17 +10806,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.CommandResponse buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.CommandResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.CommandResponse buildPartial() { com.openxc.BinaryMessages.CommandResponse result = new com.openxc.BinaryMessages.CommandResponse(this); int from_bitField0_ = bitField0_; @@ -8622,93 +10827,73 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.CommandResponse) { return mergeFrom((com.openxc.BinaryMessages.CommandResponse)other); } else { super.mergeFrom(other); return this; - } - } - - public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) { - if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasMessage()) { - setMessage(other.getMessage()); - } - if (other.hasStatus()) { - setStatus(other.getStatus()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; - message_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - status_ = input.readBool(); - break; - } + } + } + + public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) { + if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasMessage()) { + bitField0_ |= 0x00000002; + message_ = other.message_; + onChanged(); + } + if (other.hasStatus()) { + setStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.openxc.BinaryMessages.CommandResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.CommandResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { if (value == null) { throw new NullPointerException(); @@ -8718,29 +10903,59 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.ControlCommand.Type type = 1; + */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; onChanged(); return this; } - + // optional string message = 2; private java.lang.Object message_ = ""; + /** + * optional string message = 2; + */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getMessage() { + /** + * optional string message = 2; + */ + public java.lang.String getMessage() { java.lang.Object ref = message_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); message_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; + } + } + /** + * optional string message = 2; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public Builder setMessage(String value) { + /** + * optional string message = 2; + */ + public Builder setMessage( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -8749,129 +10964,349 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional string message = 2; + */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } - void setMessage(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string message = 2; + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; message_ = value; onChanged(); + return this; } - + // optional bool status = 3; private boolean status_ ; + /** + * optional bool status = 3; + */ public boolean hasStatus() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional bool status = 3; + */ public boolean getStatus() { return status_; } + /** + * optional bool status = 3; + */ public Builder setStatus(boolean value) { bitField0_ |= 0x00000004; status_ = value; onChanged(); return this; } + /** + * optional bool status = 3; + */ public Builder clearStatus() { bitField0_ = (bitField0_ & ~0x00000004); status_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.CommandResponse) } - + static { defaultInstance = new CommandResponse(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.CommandResponse) } - + public interface DiagnosticRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ boolean hasBus(); + /** + * optional int32 bus = 1; + */ int getBus(); - + // optional uint32 message_id = 2; + /** + * optional uint32 message_id = 2; + */ boolean hasMessageId(); + /** + * optional uint32 message_id = 2; + */ int getMessageId(); - + // optional uint32 mode = 3; + /** + * optional uint32 mode = 3; + */ boolean hasMode(); + /** + * optional uint32 mode = 3; + */ int getMode(); - + // optional uint32 pid = 4; + /** + * optional uint32 pid = 4; + */ boolean hasPid(); + /** + * optional uint32 pid = 4; + */ int getPid(); - + // optional bytes payload = 5; + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ boolean hasPayload(); + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ com.google.protobuf.ByteString getPayload(); - + // optional bool multiple_responses = 6; + /** + * optional bool multiple_responses = 6; + */ boolean hasMultipleResponses(); + /** + * optional bool multiple_responses = 6; + */ boolean getMultipleResponses(); - + // optional double frequency = 7; + /** + * optional double frequency = 7; + */ boolean hasFrequency(); + /** + * optional double frequency = 7; + */ double getFrequency(); - + // optional string name = 8; + /** + * optional string name = 8; + */ boolean hasName(); - String getName(); - + /** + * optional string name = 8; + */ + java.lang.String getName(); + /** + * optional string name = 8; + */ + com.google.protobuf.ByteString + getNameBytes(); + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ boolean hasDecodedType(); + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); } + /** + * Protobuf type {@code openxc.DiagnosticRequest} + */ public static final class DiagnosticRequest extends com.google.protobuf.GeneratedMessage implements DiagnosticRequestOrBuilder { // Use DiagnosticRequest.newBuilder() to construct. - private DiagnosticRequest(Builder builder) { + private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private DiagnosticRequest(boolean noInit) {} - + private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final DiagnosticRequest defaultInstance; public static DiagnosticRequest getDefaultInstance() { return defaultInstance; } - + public DiagnosticRequest getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DiagnosticRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + payload_ = input.readBytes(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + multipleResponses_ = input.readBool(); + break; + } + case 57: { + bitField0_ |= 0x00000040; + frequency_ = input.readDouble(); + break; + } + case 66: { + bitField0_ |= 0x00000080; + name_ = input.readBytes(); + break; + } + case 72: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(9, rawValue); + } else { + bitField0_ |= 0x00000100; + decodedType_ = value; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiagnosticRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code openxc.DiagnosticRequest.DecodedType} + */ public enum DecodedType implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 1; + */ NONE(0, 1), + /** + * OBD2 = 2; + */ OBD2(1, 2), ; - + + /** + * NONE = 1; + */ public static final int NONE_VALUE = 1; + /** + * OBD2 = 2; + */ public static final int OBD2_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static DecodedType valueOf(int value) { switch (value) { case 1: return NONE; @@ -8879,7 +11314,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -8891,7 +11326,7 @@ public final class BinaryMessages { return DecodedType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -8904,11 +11339,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(0); } - - private static final DecodedType[] VALUES = { - NONE, OBD2, - }; - + + private static final DecodedType[] VALUES = values(); + public static DecodedType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -8917,131 +11350,200 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private DecodedType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } - + // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; + /** + * optional uint32 message_id = 2; + */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 message_id = 2; + */ public int getMessageId() { return messageId_; } - + // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; + /** + * optional uint32 mode = 3; + */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional uint32 mode = 3; + */ public int getMode() { return mode_; } - + // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; + /** + * optional uint32 pid = 4; + */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional uint32 pid = 4; + */ public int getPid() { return pid_; } - + // optional bytes payload = 5; public static final int PAYLOAD_FIELD_NUMBER = 5; private com.google.protobuf.ByteString payload_; + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ public boolean hasPayload() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional bytes payload = 5; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ public com.google.protobuf.ByteString getPayload() { return payload_; } - + // optional bool multiple_responses = 6; public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6; private boolean multipleResponses_; + /** + * optional bool multiple_responses = 6; + */ public boolean hasMultipleResponses() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional bool multiple_responses = 6; + */ public boolean getMultipleResponses() { return multipleResponses_; } - + // optional double frequency = 7; public static final int FREQUENCY_FIELD_NUMBER = 7; private double frequency_; + /** + * optional double frequency = 7; + */ public boolean hasFrequency() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional double frequency = 7; + */ public double getFrequency() { return frequency_; } - + // optional string name = 8; public static final int NAME_FIELD_NUMBER = 8; private java.lang.Object name_; + /** + * optional string name = 8; + */ public boolean hasName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - public String getName() { + /** + * optional string name = 8; + */ + public java.lang.String getName() { java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { name_ = s; } return s; } } - private com.google.protobuf.ByteString getNameBytes() { + /** + * optional string name = 8; + */ + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; public static final int DECODED_TYPE_FIELD_NUMBER = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_; + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ public boolean hasDecodedType() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { return decodedType_; } - + private void initFields() { bus_ = 0; messageId_ = 0; @@ -9057,11 +11559,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -9094,12 +11596,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -9141,94 +11643,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.DiagnosticRequest} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { @@ -9236,18 +11727,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); } - + // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -9258,7 +11752,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -9281,20 +11775,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000100); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; } - + public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticRequest build() { com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial(); if (!result.isInitialized()) { @@ -9302,17 +11796,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.DiagnosticRequest buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() { com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this); int from_bitField0_ = bitField0_; @@ -9357,7 +11841,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other); @@ -9366,7 +11850,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) { if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this; if (other.hasBus()) { @@ -9391,7 +11875,9 @@ public final class BinaryMessages { setFrequency(other.getFrequency()); } if (other.hasName()) { - setName(other.getName()); + bitField0_ |= 0x00000080; + name_ = other.name_; + onChanged(); } if (other.hasDecodedType()) { setDecodedType(other.getDecodedType()); @@ -9399,183 +11885,194 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - mode_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - pid_ = input.readUInt32(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - payload_ = input.readBytes(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - multipleResponses_ = input.readBool(); - break; - } - case 57: { - bitField0_ |= 0x00000040; - frequency_ = input.readDouble(); - break; - } - case 66: { - bitField0_ |= 0x00000080; - name_ = input.readBytes(); - break; - } - case 72: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(9, rawValue); - } else { - bitField0_ |= 0x00000100; - decodedType_ = value; - } - break; - } + com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } + /** + * optional int32 bus = 1; + */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } + /** + * optional int32 bus = 1; + */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional uint32 message_id = 2; private int messageId_ ; + /** + * optional uint32 message_id = 2; + */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 message_id = 2; + */ public int getMessageId() { return messageId_; } + /** + * optional uint32 message_id = 2; + */ public Builder setMessageId(int value) { bitField0_ |= 0x00000002; messageId_ = value; onChanged(); return this; } + /** + * optional uint32 message_id = 2; + */ public Builder clearMessageId() { bitField0_ = (bitField0_ & ~0x00000002); messageId_ = 0; onChanged(); return this; } - + // optional uint32 mode = 3; private int mode_ ; + /** + * optional uint32 mode = 3; + */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional uint32 mode = 3; + */ public int getMode() { return mode_; } + /** + * optional uint32 mode = 3; + */ public Builder setMode(int value) { bitField0_ |= 0x00000004; mode_ = value; onChanged(); return this; } + /** + * optional uint32 mode = 3; + */ public Builder clearMode() { bitField0_ = (bitField0_ & ~0x00000004); mode_ = 0; onChanged(); return this; } - + // optional uint32 pid = 4; private int pid_ ; + /** + * optional uint32 pid = 4; + */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional uint32 pid = 4; + */ public int getPid() { return pid_; } + /** + * optional uint32 pid = 4; + */ public Builder setPid(int value) { bitField0_ |= 0x00000008; pid_ = value; onChanged(); return this; } + /** + * optional uint32 pid = 4; + */ public Builder clearPid() { bitField0_ = (bitField0_ & ~0x00000008); pid_ = 0; onChanged(); return this; } - + // optional bytes payload = 5; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public boolean hasPayload() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public com.google.protobuf.ByteString getPayload() { return payload_; } + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -9585,71 +12082,130 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional bytes payload = 5; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000010); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } - + // optional bool multiple_responses = 6; private boolean multipleResponses_ ; + /** + * optional bool multiple_responses = 6; + */ public boolean hasMultipleResponses() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional bool multiple_responses = 6; + */ public boolean getMultipleResponses() { return multipleResponses_; } + /** + * optional bool multiple_responses = 6; + */ public Builder setMultipleResponses(boolean value) { bitField0_ |= 0x00000020; multipleResponses_ = value; onChanged(); return this; } + /** + * optional bool multiple_responses = 6; + */ public Builder clearMultipleResponses() { bitField0_ = (bitField0_ & ~0x00000020); multipleResponses_ = false; onChanged(); return this; } - + // optional double frequency = 7; private double frequency_ ; + /** + * optional double frequency = 7; + */ public boolean hasFrequency() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional double frequency = 7; + */ public double getFrequency() { return frequency_; } + /** + * optional double frequency = 7; + */ public Builder setFrequency(double value) { bitField0_ |= 0x00000040; frequency_ = value; onChanged(); return this; } + /** + * optional double frequency = 7; + */ public Builder clearFrequency() { bitField0_ = (bitField0_ & ~0x00000040); frequency_ = 0D; onChanged(); return this; } - + // optional string name = 8; private java.lang.Object name_ = ""; + /** + * optional string name = 8; + */ public boolean hasName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - public String getName() { + /** + * optional string name = 8; + */ + public java.lang.String getName() { java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); name_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setName(String value) { + /** + * optional string name = 8; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 8; + */ + public Builder setName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -9658,26 +12214,46 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional string name = 8; + */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000080); name_ = getDefaultInstance().getName(); onChanged(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000080; + /** + * optional string name = 8; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; name_ = value; onChanged(); + return this; } - + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ public boolean hasDecodedType() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { return decodedType_; } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ public Builder setDecodedType(com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value) { if (value == null) { throw new NullPointerException(); @@ -9687,168 +12263,389 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; + */ public Builder clearDecodedType() { bitField0_ = (bitField0_ & ~0x00000100); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } - + static { defaultInstance = new DiagnosticRequest(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) } - + public interface DiagnosticResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; + /** + * optional int32 bus = 1; + */ boolean hasBus(); + /** + * optional int32 bus = 1; + */ int getBus(); - + // optional uint32 message_id = 2; + /** + * optional uint32 message_id = 2; + */ boolean hasMessageId(); + /** + * optional uint32 message_id = 2; + */ int getMessageId(); - + // optional uint32 mode = 3; + /** + * optional uint32 mode = 3; + */ boolean hasMode(); + /** + * optional uint32 mode = 3; + */ int getMode(); - + // optional uint32 pid = 4; + /** + * optional uint32 pid = 4; + */ boolean hasPid(); + /** + * optional uint32 pid = 4; + */ int getPid(); - + // optional bool success = 5; + /** + * optional bool success = 5; + */ boolean hasSuccess(); + /** + * optional bool success = 5; + */ boolean getSuccess(); - + // optional uint32 negative_response_code = 6; + /** + * optional uint32 negative_response_code = 6; + */ boolean hasNegativeResponseCode(); + /** + * optional uint32 negative_response_code = 6; + */ int getNegativeResponseCode(); - + // optional bytes payload = 7; + /** + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ boolean hasPayload(); + /** + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ com.google.protobuf.ByteString getPayload(); - + // optional double value = 8; + /** + * optional double value = 8; + */ boolean hasValue(); + /** + * optional double value = 8; + */ double getValue(); } + /** + * Protobuf type {@code openxc.DiagnosticResponse} + */ public static final class DiagnosticResponse extends com.google.protobuf.GeneratedMessage implements DiagnosticResponseOrBuilder { // Use DiagnosticResponse.newBuilder() to construct. - private DiagnosticResponse(Builder builder) { + private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private DiagnosticResponse(boolean noInit) {} - + private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final DiagnosticResponse defaultInstance; public static DiagnosticResponse getDefaultInstance() { return defaultInstance; } - + public DiagnosticResponse getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DiagnosticResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + success_ = input.readBool(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + negativeResponseCode_ = input.readUInt32(); + break; + } + case 58: { + bitField0_ |= 0x00000040; + payload_ = input.readBytes(); + break; + } + case 65: { + bitField0_ |= 0x00000080; + value_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DiagnosticResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiagnosticResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } - + // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; + /** + * optional uint32 message_id = 2; + */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 message_id = 2; + */ public int getMessageId() { return messageId_; } - + // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; + /** + * optional uint32 mode = 3; + */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional uint32 mode = 3; + */ public int getMode() { return mode_; } - + // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; + /** + * optional uint32 pid = 4; + */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional uint32 pid = 4; + */ public int getPid() { return pid_; } - + // optional bool success = 5; public static final int SUCCESS_FIELD_NUMBER = 5; private boolean success_; + /** + * optional bool success = 5; + */ public boolean hasSuccess() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional bool success = 5; + */ public boolean getSuccess() { return success_; } - + // optional uint32 negative_response_code = 6; public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6; private int negativeResponseCode_; + /** + * optional uint32 negative_response_code = 6; + */ public boolean hasNegativeResponseCode() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional uint32 negative_response_code = 6; + */ public int getNegativeResponseCode() { return negativeResponseCode_; } - + // optional bytes payload = 7; public static final int PAYLOAD_FIELD_NUMBER = 7; private com.google.protobuf.ByteString payload_; + /** + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional bytes payload = 7; + * + *
+     * TODO we are capping this at 8 bytes for now - need to change when we
+     * support multi-frame responses
+     * 
+ */ public com.google.protobuf.ByteString getPayload() { return payload_; } - + // optional double value = 8; public static final int VALUE_FIELD_NUMBER = 8; private double value_; + /** + * optional double value = 8; + */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** + * optional double value = 8; + */ public double getValue() { return value_; } - + private void initFields() { bus_ = 0; messageId_ = 0; @@ -9863,11 +12660,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -9897,12 +12694,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -9940,94 +12737,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.DiagnosticResponse} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { @@ -10035,18 +12821,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); } - + // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -10057,7 +12846,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -10078,20 +12867,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.DiagnosticResponse.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - + public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticResponse build() { com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial(); if (!result.isInitialized()) { @@ -10099,17 +12888,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.DiagnosticResponse buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() { com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this); int from_bitField0_ = bitField0_; @@ -10150,7 +12929,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other); @@ -10159,7 +12938,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) { if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this; if (other.hasBus()) { @@ -10189,214 +12968,260 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - mode_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - pid_ = input.readUInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - success_ = input.readBool(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - negativeResponseCode_ = input.readUInt32(); - break; - } - case 58: { - bitField0_ |= 0x00000040; - payload_ = input.readBytes(); - break; - } - case 65: { - bitField0_ |= 0x00000080; - value_ = input.readDouble(); - break; - } + com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; + /** + * optional int32 bus = 1; + */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 bus = 1; + */ public int getBus() { return bus_; } + /** + * optional int32 bus = 1; + */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } + /** + * optional int32 bus = 1; + */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional uint32 message_id = 2; private int messageId_ ; + /** + * optional uint32 message_id = 2; + */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional uint32 message_id = 2; + */ public int getMessageId() { return messageId_; } + /** + * optional uint32 message_id = 2; + */ public Builder setMessageId(int value) { bitField0_ |= 0x00000002; messageId_ = value; onChanged(); return this; } + /** + * optional uint32 message_id = 2; + */ public Builder clearMessageId() { bitField0_ = (bitField0_ & ~0x00000002); messageId_ = 0; onChanged(); return this; } - + // optional uint32 mode = 3; private int mode_ ; + /** + * optional uint32 mode = 3; + */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional uint32 mode = 3; + */ public int getMode() { return mode_; } + /** + * optional uint32 mode = 3; + */ public Builder setMode(int value) { bitField0_ |= 0x00000004; mode_ = value; onChanged(); return this; } + /** + * optional uint32 mode = 3; + */ public Builder clearMode() { bitField0_ = (bitField0_ & ~0x00000004); mode_ = 0; onChanged(); return this; } - + // optional uint32 pid = 4; private int pid_ ; + /** + * optional uint32 pid = 4; + */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional uint32 pid = 4; + */ public int getPid() { return pid_; } + /** + * optional uint32 pid = 4; + */ public Builder setPid(int value) { bitField0_ |= 0x00000008; pid_ = value; onChanged(); return this; } + /** + * optional uint32 pid = 4; + */ public Builder clearPid() { bitField0_ = (bitField0_ & ~0x00000008); pid_ = 0; onChanged(); return this; } - + // optional bool success = 5; private boolean success_ ; + /** + * optional bool success = 5; + */ public boolean hasSuccess() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional bool success = 5; + */ public boolean getSuccess() { return success_; } + /** + * optional bool success = 5; + */ public Builder setSuccess(boolean value) { bitField0_ |= 0x00000010; success_ = value; onChanged(); return this; } + /** + * optional bool success = 5; + */ public Builder clearSuccess() { bitField0_ = (bitField0_ & ~0x00000010); success_ = false; onChanged(); return this; } - + // optional uint32 negative_response_code = 6; private int negativeResponseCode_ ; + /** + * optional uint32 negative_response_code = 6; + */ public boolean hasNegativeResponseCode() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional uint32 negative_response_code = 6; + */ public int getNegativeResponseCode() { return negativeResponseCode_; } + /** + * optional uint32 negative_response_code = 6; + */ public Builder setNegativeResponseCode(int value) { bitField0_ |= 0x00000020; negativeResponseCode_ = value; onChanged(); return this; } + /** + * optional uint32 negative_response_code = 6; + */ public Builder clearNegativeResponseCode() { bitField0_ = (bitField0_ & ~0x00000020); negativeResponseCode_ = 0; onChanged(); return this; } - + // optional bytes payload = 7; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public com.google.protobuf.ByteString getPayload() { return payload_; } + /** + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -10406,106 +13231,264 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional bytes payload = 7; + * + *
+       * TODO we are capping this at 8 bytes for now - need to change when we
+       * support multi-frame responses
+       * 
+ */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000040); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } - + // optional double value = 8; private double value_ ; + /** + * optional double value = 8; + */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** + * optional double value = 8; + */ public double getValue() { return value_; } + /** + * optional double value = 8; + */ public Builder setValue(double value) { bitField0_ |= 0x00000080; value_ = value; onChanged(); return this; } + /** + * optional double value = 8; + */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000080); value_ = 0D; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse) } - + static { defaultInstance = new DiagnosticResponse(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) } - + public interface DynamicFieldOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.DynamicField.Type type = 1; + /** + * optional .openxc.DynamicField.Type type = 1; + */ boolean hasType(); + /** + * optional .openxc.DynamicField.Type type = 1; + */ com.openxc.BinaryMessages.DynamicField.Type getType(); - + // optional string string_value = 2; + /** + * optional string string_value = 2; + */ boolean hasStringValue(); - String getStringValue(); - + /** + * optional string string_value = 2; + */ + java.lang.String getStringValue(); + /** + * optional string string_value = 2; + */ + com.google.protobuf.ByteString + getStringValueBytes(); + // optional double numeric_value = 3; + /** + * optional double numeric_value = 3; + */ boolean hasNumericValue(); + /** + * optional double numeric_value = 3; + */ double getNumericValue(); - + // optional bool boolean_value = 4; + /** + * optional bool boolean_value = 4; + */ boolean hasBooleanValue(); + /** + * optional bool boolean_value = 4; + */ boolean getBooleanValue(); } + /** + * Protobuf type {@code openxc.DynamicField} + */ public static final class DynamicField extends com.google.protobuf.GeneratedMessage implements DynamicFieldOrBuilder { // Use DynamicField.newBuilder() to construct. - private DynamicField(Builder builder) { + private DynamicField(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private DynamicField(boolean noInit) {} - + private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final DynamicField defaultInstance; public static DynamicField getDefaultInstance() { return defaultInstance; } - + public DynamicField getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DynamicField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + stringValue_ = input.readBytes(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + numericValue_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + booleanValue_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DynamicField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DynamicField(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + + /** + * Protobuf enum {@code openxc.DynamicField.Type} + */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * STRING = 1; + */ STRING(0, 1), + /** + * NUM = 2; + */ NUM(1, 2), + /** + * BOOL = 3; + */ BOOL(2, 3), ; - + + /** + * STRING = 1; + */ public static final int STRING_VALUE = 1; + /** + * NUM = 2; + */ public static final int NUM_VALUE = 2; + /** + * BOOL = 3; + */ public static final int BOOL_VALUE = 3; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return STRING; @@ -10514,7 +13497,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -10526,7 +13509,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -10539,11 +13522,9 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = { - STRING, NUM, BOOL, - }; - + + private static final Type[] VALUES = values(); + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -10552,81 +13533,110 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type) } - + private int bitField0_; // optional .openxc.DynamicField.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DynamicField.Type type_; + /** + * optional .openxc.DynamicField.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.DynamicField.Type type = 1; + */ public com.openxc.BinaryMessages.DynamicField.Type getType() { return type_; } - + // optional string string_value = 2; public static final int STRING_VALUE_FIELD_NUMBER = 2; private java.lang.Object stringValue_; + /** + * optional string string_value = 2; + */ public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getStringValue() { + /** + * optional string string_value = 2; + */ + public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { stringValue_ = s; } return s; } } - private com.google.protobuf.ByteString getStringValueBytes() { + /** + * optional string string_value = 2; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { java.lang.Object ref = stringValue_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); stringValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional double numeric_value = 3; public static final int NUMERIC_VALUE_FIELD_NUMBER = 3; private double numericValue_; + /** + * optional double numeric_value = 3; + */ public boolean hasNumericValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional double numeric_value = 3; + */ public double getNumericValue() { return numericValue_; } - + // optional bool boolean_value = 4; public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; private boolean booleanValue_; + /** + * optional bool boolean_value = 4; + */ public boolean hasBooleanValue() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional bool boolean_value = 4; + */ public boolean getBooleanValue() { return booleanValue_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; stringValue_ = ""; @@ -10637,11 +13647,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -10659,12 +13669,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -10686,94 +13696,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.DynamicField parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DynamicField parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.DynamicField} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DynamicFieldOrBuilder { @@ -10781,18 +13780,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); } - + // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -10803,7 +13805,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; @@ -10816,20 +13818,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.DynamicField.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; } - + public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() { return com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DynamicField build() { com.openxc.BinaryMessages.DynamicField result = buildPartial(); if (!result.isInitialized()) { @@ -10837,17 +13839,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.DynamicField buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.DynamicField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.DynamicField buildPartial() { com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this); int from_bitField0_ = bitField0_; @@ -10872,7 +13864,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DynamicField) { return mergeFrom((com.openxc.BinaryMessages.DynamicField)other); @@ -10881,14 +13873,16 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) { if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasStringValue()) { - setStringValue(other.getStringValue()); + bitField0_ |= 0x00000002; + stringValue_ = other.stringValue_; + onChanged(); } if (other.hasNumericValue()) { setNumericValue(other.getNumericValue()); @@ -10899,74 +13893,47 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; - stringValue_ = input.readBytes(); - break; - } - case 25: { - bitField0_ |= 0x00000004; - numericValue_ = input.readDouble(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - booleanValue_ = input.readBool(); - break; - } + com.openxc.BinaryMessages.DynamicField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional .openxc.DynamicField.Type type = 1; private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; + /** + * optional .openxc.DynamicField.Type type = 1; + */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .openxc.DynamicField.Type type = 1; + */ public com.openxc.BinaryMessages.DynamicField.Type getType() { return type_; } + /** + * optional .openxc.DynamicField.Type type = 1; + */ public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) { if (value == null) { throw new NullPointerException(); @@ -10976,29 +13943,59 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional .openxc.DynamicField.Type type = 1; + */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; onChanged(); return this; } - + // optional string string_value = 2; private java.lang.Object stringValue_ = ""; + /** + * optional string string_value = 2; + */ public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getStringValue() { + /** + * optional string string_value = 2; + */ + public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); stringValue_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; + } + } + /** + * optional string string_value = 2; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public Builder setStringValue(String value) { + /** + * optional string string_value = 2; + */ + public Builder setStringValue( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -11007,175 +14004,361 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional string string_value = 2; + */ public Builder clearStringValue() { bitField0_ = (bitField0_ & ~0x00000002); stringValue_ = getDefaultInstance().getStringValue(); onChanged(); return this; } - void setStringValue(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string string_value = 2; + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; stringValue_ = value; onChanged(); + return this; } - + // optional double numeric_value = 3; private double numericValue_ ; + /** + * optional double numeric_value = 3; + */ public boolean hasNumericValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional double numeric_value = 3; + */ public double getNumericValue() { return numericValue_; } + /** + * optional double numeric_value = 3; + */ public Builder setNumericValue(double value) { bitField0_ |= 0x00000004; numericValue_ = value; onChanged(); return this; } + /** + * optional double numeric_value = 3; + */ public Builder clearNumericValue() { bitField0_ = (bitField0_ & ~0x00000004); numericValue_ = 0D; onChanged(); return this; } - + // optional bool boolean_value = 4; private boolean booleanValue_ ; + /** + * optional bool boolean_value = 4; + */ public boolean hasBooleanValue() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional bool boolean_value = 4; + */ public boolean getBooleanValue() { return booleanValue_; } + /** + * optional bool boolean_value = 4; + */ public Builder setBooleanValue(boolean value) { bitField0_ |= 0x00000008; booleanValue_ = value; onChanged(); return this; } + /** + * optional bool boolean_value = 4; + */ public Builder clearBooleanValue() { bitField0_ = (bitField0_ & ~0x00000008); booleanValue_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DynamicField) } - + static { defaultInstance = new DynamicField(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DynamicField) } - + public interface SimpleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional string name = 1; + /** + * optional string name = 1; + */ boolean hasName(); - String getName(); - + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + // optional .openxc.DynamicField value = 2; + /** + * optional .openxc.DynamicField value = 2; + */ boolean hasValue(); + /** + * optional .openxc.DynamicField value = 2; + */ com.openxc.BinaryMessages.DynamicField getValue(); + /** + * optional .openxc.DynamicField value = 2; + */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - + // optional .openxc.DynamicField event = 3; + /** + * optional .openxc.DynamicField event = 3; + */ boolean hasEvent(); + /** + * optional .openxc.DynamicField event = 3; + */ com.openxc.BinaryMessages.DynamicField getEvent(); + /** + * optional .openxc.DynamicField event = 3; + */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } + /** + * Protobuf type {@code openxc.SimpleMessage} + */ public static final class SimpleMessage extends com.google.protobuf.GeneratedMessage implements SimpleMessageOrBuilder { // Use SimpleMessage.newBuilder() to construct. - private SimpleMessage(Builder builder) { + private SimpleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private SimpleMessage(boolean noInit) {} - + private SimpleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final SimpleMessage defaultInstance; public static SimpleMessage getDefaultInstance() { return defaultInstance; } - + public SimpleMessage getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SimpleMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 26: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = event_.toBuilder(); + } + event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(event_); + event_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SimpleMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - + private int bitField0_; // optional string name = 1; public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; + /** + * optional string name = 1; + */ public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getName() { + /** + * optional string name = 1; + */ + public java.lang.String getName() { java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { name_ = s; } return s; } } - private com.google.protobuf.ByteString getNameBytes() { + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional .openxc.DynamicField value = 2; public static final int VALUE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DynamicField value_; + /** + * optional .openxc.DynamicField value = 2; + */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.DynamicField value = 2; + */ public com.openxc.BinaryMessages.DynamicField getValue() { return value_; } + /** + * optional .openxc.DynamicField value = 2; + */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { return value_; } - + // optional .openxc.DynamicField event = 3; public static final int EVENT_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.DynamicField event_; + /** + * optional .openxc.DynamicField event = 3; + */ public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.DynamicField event = 3; + */ public com.openxc.BinaryMessages.DynamicField getEvent() { return event_; } + /** + * optional .openxc.DynamicField event = 3; + */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { return event_; } - + private void initFields() { name_ = ""; value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -11185,11 +14368,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -11204,12 +14387,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -11227,94 +14410,83 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.SimpleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code openxc.SimpleMessage} + */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.SimpleMessageOrBuilder { @@ -11322,18 +14494,21 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); } - + // Construct using com.openxc.BinaryMessages.SimpleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -11346,7 +14521,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); name_ = ""; @@ -11365,20 +14540,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.SimpleMessage.getDescriptor(); + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - + public com.openxc.BinaryMessages.SimpleMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.SimpleMessage build() { com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); if (!result.isInitialized()) { @@ -11386,17 +14561,7 @@ public final class BinaryMessages { } return result; } - - private com.openxc.BinaryMessages.SimpleMessage buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + public com.openxc.BinaryMessages.SimpleMessage buildPartial() { com.openxc.BinaryMessages.SimpleMessage result = new com.openxc.BinaryMessages.SimpleMessage(this); int from_bitField0_ = bitField0_; @@ -11425,7 +14590,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.SimpleMessage) { return mergeFrom((com.openxc.BinaryMessages.SimpleMessage)other); @@ -11434,11 +14599,13 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.SimpleMessage other) { if (other == com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) return this; if (other.hasName()) { - setName(other.getName()); + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); } if (other.hasValue()) { mergeValue(other.getValue()); @@ -11449,79 +14616,73 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 18: { - com.openxc.BinaryMessages.DynamicField.Builder subBuilder = com.openxc.BinaryMessages.DynamicField.newBuilder(); - if (hasValue()) { - subBuilder.mergeFrom(getValue()); - } - input.readMessage(subBuilder, extensionRegistry); - setValue(subBuilder.buildPartial()); - break; - } - case 26: { - com.openxc.BinaryMessages.DynamicField.Builder subBuilder = com.openxc.BinaryMessages.DynamicField.newBuilder(); - if (hasEvent()) { - subBuilder.mergeFrom(getEvent()); - } - input.readMessage(subBuilder, extensionRegistry); - setEvent(subBuilder.buildPartial()); - break; - } + com.openxc.BinaryMessages.SimpleMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.openxc.BinaryMessages.SimpleMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - + // optional string name = 1; private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getName() { + /** + * optional string name = 1; + */ + public java.lang.String getName() { java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); name_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public Builder setName(String value) { + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -11530,25 +14691,42 @@ public final class BinaryMessages { onChanged(); return this; } + /** + * optional string name = 1; + */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; name_ = value; onChanged(); + return this; } - + // optional .openxc.DynamicField value = 2; private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_; + /** + * optional .openxc.DynamicField value = 2; + */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .openxc.DynamicField value = 2; + */ public com.openxc.BinaryMessages.DynamicField getValue() { if (valueBuilder_ == null) { return value_; @@ -11556,6 +14734,9 @@ public final class BinaryMessages { return valueBuilder_.getMessage(); } } + /** + * optional .openxc.DynamicField value = 2; + */ public Builder setValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { if (value == null) { @@ -11569,6 +14750,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.DynamicField value = 2; + */ public Builder setValue( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { if (valueBuilder_ == null) { @@ -11580,6 +14764,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.DynamicField value = 2; + */ public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -11596,6 +14783,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } + /** + * optional .openxc.DynamicField value = 2; + */ public Builder clearValue() { if (valueBuilder_ == null) { value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -11606,11 +14796,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } + /** + * optional .openxc.DynamicField value = 2; + */ public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() { bitField0_ |= 0x00000002; onChanged(); return getValueFieldBuilder().getBuilder(); } + /** + * optional .openxc.DynamicField value = 2; + */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { if (valueBuilder_ != null) { return valueBuilder_.getMessageOrBuilder(); @@ -11618,6 +14814,9 @@ public final class BinaryMessages { return value_; } } + /** + * optional .openxc.DynamicField value = 2; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> getValueFieldBuilder() { @@ -11631,14 +14830,20 @@ public final class BinaryMessages { } return valueBuilder_; } - + // optional .openxc.DynamicField event = 3; private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_; + /** + * optional .openxc.DynamicField event = 3; + */ public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .openxc.DynamicField event = 3; + */ public com.openxc.BinaryMessages.DynamicField getEvent() { if (eventBuilder_ == null) { return event_; @@ -11646,6 +14851,9 @@ public final class BinaryMessages { return eventBuilder_.getMessage(); } } + /** + * optional .openxc.DynamicField event = 3; + */ public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { if (value == null) { @@ -11659,6 +14867,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.DynamicField event = 3; + */ public Builder setEvent( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { if (eventBuilder_ == null) { @@ -11670,6 +14881,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.DynamicField event = 3; + */ public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -11686,6 +14900,9 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } + /** + * optional .openxc.DynamicField event = 3; + */ public Builder clearEvent() { if (eventBuilder_ == null) { event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -11696,11 +14913,17 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } + /** + * optional .openxc.DynamicField event = 3; + */ public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() { bitField0_ |= 0x00000004; onChanged(); return getEventFieldBuilder().getBuilder(); } + /** + * optional .openxc.DynamicField event = 3; + */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { if (eventBuilder_ != null) { return eventBuilder_.getMessageOrBuilder(); @@ -11708,6 +14931,9 @@ public final class BinaryMessages { return event_; } } + /** + * optional .openxc.DynamicField event = 3; + */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> getEventFieldBuilder() { @@ -11721,18 +14947,18 @@ public final class BinaryMessages { } return eventBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.SimpleMessage) } - + static { defaultInstance = new SimpleMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.SimpleMessage) } - + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_VehicleMessage_descriptor; private static @@ -11828,7 +15054,7 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_SimpleMessage_fieldAccessorTable; - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -11837,7 +15063,7 @@ public final class BinaryMessages { descriptor; static { java.lang.String[] descriptorData = { - "\n\014openxc.proto\022\006openxc\"\230\003\n\016VehicleMessag" + + "\n\014openxc.proto\022\006openxc\"\233\003\n\016VehicleMessag" + "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." + "Type\022\'\n\013can_message\030\002 \001(\0132\022.openxc.CanMe" + "ssage\022-\n\016simple_message\030\003 \001(\0132\025.openxc.S" + @@ -11845,85 +15071,85 @@ public final class BinaryMessages { "\0132\032.openxc.DiagnosticResponse\022/\n\017control" + "_command\030\005 \001(\0132\026.openxc.ControlCommand\0221" + "\n\020command_response\030\006 \001(\0132\027.openxc.Comman" + - "dResponse\022\016\n\006uptime\030\007 \001(\r\"V\n\004Type\022\007\n\003CAN" + - "\020\001\022\n\n\006SIMPLE\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTRO", - "L_COMMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\224\001\n\nCa" + - "nMessage\022\013\n\003bus\030\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004dat" + - "a\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.openxc.C" + - "anMessage.FrameFormat\")\n\013FrameFormat\022\014\n\010" + - "STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\211\006\n\016ControlComm" + - "and\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComman" + - "d.Type\022<\n\022diagnostic_request\030\002 \001(\0132 .ope" + - "nxc.DiagnosticControlCommand\022G\n\030passthro" + - "ugh_mode_request\030\003 \001(\0132%.openxc.Passthro" + - "ughModeControlCommand\022O\n acceptance_filt", - "er_bypass_command\030\004 \001(\0132%.openxc.Accepta" + - "nceFilterBypassCommand\022<\n\026payload_format" + - "_command\030\005 \001(\0132\034.openxc.PayloadFormatCom" + - "mand\022O\n predefined_obd2_requests_command" + - "\030\006 \001(\0132%.openxc.PredefinedObd2RequestsCo" + - "mmand\022F\n\033modem_configuration_command\030\007 \001" + - "(\0132!.openxc.ModemConfigurationCommand\022B\n" + - "\031rtc_configuration_command\030\010 \001(\0132\037.openx" + - "c.RTCConfigurationCommand\"\330\001\n\004Type\022\013\n\007VE" + - "RSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017", - "\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER_BYP" + - "ASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFINED_" + - "OBD2_REQUESTS\020\007\022\027\n\023MODEM_CONFIGURATION\020\010" + - "\022\025\n\021RTC_CONFIGURATION\020\t\022\023\n\017SD_MOUNT_STAT" + - "US\020\n\"\236\001\n\030DiagnosticControlCommand\022*\n\007req" + - "uest\030\001 \001(\0132\031.openxc.DiagnosticRequest\0227\n" + - "\006action\030\002 \001(\0162\'.openxc.DiagnosticControl" + - "Command.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CAN" + - "CEL\020\002\"=\n\035PassthroughModeControlCommand\022\013" + - "\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035Acceptan", - "ceFilterBypassCommand\022\013\n\003bus\030\001 \001(\005\022\016\n\006by" + - "pass\030\002 \001(\010\"\214\001\n\024PayloadFormatCommand\022:\n\006f" + - "ormat\030\001 \001(\0162*.openxc.PayloadFormatComman" + - "d.PayloadFormat\"8\n\rPayloadFormat\022\010\n\004JSON" + - "\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013MESSAGEPACK\020\003\"0\n\035Pre" + - "definedObd2RequestsCommand\022\017\n\007enabled\030\001 " + - "\001(\010\"\321\003\n\027NetworkOperatorSettings\022\030\n\020allow" + - "DataRoaming\030\001 \001(\010\022N\n\022operatorSelectMode\030" + - "\002 \001(\01622.openxc.NetworkOperatorSettings.O" + - "peratorSelectMode\022L\n\021networkDescriptor\030\003", - " \001(\01321.openxc.NetworkOperatorSettings.Ne" + - "tworkDescriptor\032\230\001\n\021NetworkDescriptor\022\014\n" + - "\004PLMN\030\001 \001(\r\022R\n\013networkType\030\002 \001(\0162=.openx" + - "c.NetworkOperatorSettings.NetworkDescrip" + - "tor.NetworkType\"!\n\013NetworkType\022\007\n\003GSM\020\000\022" + - "\t\n\005UTRAN\020\002\"c\n\022OperatorSelectMode\022\r\n\tAUTO" + - "MATIC\020\000\022\n\n\006MANUAL\020\001\022\016\n\nDEREGISTER\020\002\022\014\n\010S" + - "ET_ONLY\020\003\022\024\n\020MANUAL_AUTOMATIC\020\004\"\"\n\023Netwo" + - "rkDataSettings\022\013\n\003APN\030\001 \001(\t\"3\n\025ServerCon" + - "nectSettings\022\014\n\004host\030\001 \001(\t\022\014\n\004port\030\002 \001(\r", - "\"\325\001\n\031ModemConfigurationCommand\022@\n\027networ" + - "kOperatorSettings\030\001 \001(\0132\037.openxc.Network" + - "OperatorSettings\0228\n\023networkDataSettings\030" + - "\002 \001(\0132\033.openxc.NetworkDataSettings\022<\n\025se" + - "rverConnectSettings\030\003 \001(\0132\035.openxc.Serve" + - "rConnectSettings\",\n\027RTCConfigurationComm" + - "and\022\021\n\tunix_time\030\001 \001(\r\"]\n\017CommandRespons" + - "e\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\003bus\030\001 \001(\005\022\022\n\nmess", - "age_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\tfrequency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n" + - "\014decoded_type\030\t \001(\0162%.openxc.DiagnosticR" + - "equest.DecodedType\"!\n\013DecodedType\022\010\n\004NON" + - "E\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003" + - "bus\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\026neg" + - "ative_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\004ty", - "pe\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024\n\014s" + - "tring_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\006STRIN" + - "G\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"g\n\rSimpleMessage\022" + - "\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.openxc.Dy" + - "namicField\022#\n\005event\030\003 \001(\0132\024.openxc.Dynam" + - "icFieldB\034\n\ncom.openxcB\016BinaryMessages" + "dResponse\022\021\n\ttimestamp\030\007 \001(\004\"V\n\004Type\022\007\n\003" + + "CAN\020\001\022\n\n\006SIMPLE\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CON", + "TROL_COMMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\"\224\001\n" + + "\nCanMessage\022\013\n\003bus\030\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004" + + "data\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.openx" + + "c.CanMessage.FrameFormat\")\n\013FrameFormat\022" + + "\014\n\010STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\211\006\n\016ControlC" + + "ommand\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCom" + + "mand.Type\022<\n\022diagnostic_request\030\002 \001(\0132 ." + + "openxc.DiagnosticControlCommand\022G\n\030passt" + + "hrough_mode_request\030\003 \001(\0132%.openxc.Passt" + + "hroughModeControlCommand\022O\n acceptance_f", + "ilter_bypass_command\030\004 \001(\0132%.openxc.Acce" + + "ptanceFilterBypassCommand\022<\n\026payload_for" + + "mat_command\030\005 \001(\0132\034.openxc.PayloadFormat" + + "Command\022O\n predefined_obd2_requests_comm" + + "and\030\006 \001(\0132%.openxc.PredefinedObd2Request" + + "sCommand\022F\n\033modem_configuration_command\030" + + "\007 \001(\0132!.openxc.ModemConfigurationCommand" + + "\022B\n\031rtc_configuration_command\030\010 \001(\0132\037.op" + + "enxc.RTCConfigurationCommand\"\330\001\n\004Type\022\013\n" + + "\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020", + "\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER_" + + "BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFIN" + + "ED_OBD2_REQUESTS\020\007\022\027\n\023MODEM_CONFIGURATIO" + + "N\020\010\022\025\n\021RTC_CONFIGURATION\020\t\022\023\n\017SD_MOUNT_S" + + "TATUS\020\n\"\236\001\n\030DiagnosticControlCommand\022*\n\007" + + "request\030\001 \001(\0132\031.openxc.DiagnosticRequest" + + "\0227\n\006action\030\002 \001(\0162\'.openxc.DiagnosticCont" + + "rolCommand.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006" + + "CANCEL\020\002\"=\n\035PassthroughModeControlComman" + + "d\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035Accep", + "tanceFilterBypassCommand\022\013\n\003bus\030\001 \001(\005\022\016\n" + + "\006bypass\030\002 \001(\010\"\214\001\n\024PayloadFormatCommand\022:" + + "\n\006format\030\001 \001(\0162*.openxc.PayloadFormatCom" + + "mand.PayloadFormat\"8\n\rPayloadFormat\022\010\n\004J" + + "SON\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013MESSAGEPACK\020\003\"0\n\035" + + "PredefinedObd2RequestsCommand\022\017\n\007enabled" + + "\030\001 \001(\010\"\321\003\n\027NetworkOperatorSettings\022\030\n\020al" + + "lowDataRoaming\030\001 \001(\010\022N\n\022operatorSelectMo" + + "de\030\002 \001(\01622.openxc.NetworkOperatorSetting" + + "s.OperatorSelectMode\022L\n\021networkDescripto", + "r\030\003 \001(\01321.openxc.NetworkOperatorSettings" + + ".NetworkDescriptor\032\230\001\n\021NetworkDescriptor" + + "\022\014\n\004PLMN\030\001 \001(\r\022R\n\013networkType\030\002 \001(\0162=.op" + + "enxc.NetworkOperatorSettings.NetworkDesc" + + "riptor.NetworkType\"!\n\013NetworkType\022\007\n\003GSM" + + "\020\000\022\t\n\005UTRAN\020\002\"c\n\022OperatorSelectMode\022\r\n\tA" + + "UTOMATIC\020\000\022\n\n\006MANUAL\020\001\022\016\n\nDEREGISTER\020\002\022\014" + + "\n\010SET_ONLY\020\003\022\024\n\020MANUAL_AUTOMATIC\020\004\"\"\n\023Ne" + + "tworkDataSettings\022\013\n\003APN\030\001 \001(\t\"3\n\025Server" + + "ConnectSettings\022\014\n\004host\030\001 \001(\t\022\014\n\004port\030\002 ", + "\001(\r\"\325\001\n\031ModemConfigurationCommand\022@\n\027net" + + "workOperatorSettings\030\001 \001(\0132\037.openxc.Netw" + + "orkOperatorSettings\0228\n\023networkDataSettin" + + "gs\030\002 \001(\0132\033.openxc.NetworkDataSettings\022<\n" + + "\025serverConnectSettings\030\003 \001(\0132\035.openxc.Se" + + "rverConnectSettings\",\n\027RTCConfigurationC" + + "ommand\022\021\n\tunix_time\030\001 \001(\r\"]\n\017CommandResp" + + "onse\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComma" + + "nd.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010" + + "\"\375\001\n\021DiagnosticRequest\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\007payload\030\005 \001(\014\022\032\n\022multiple_response" + + "s\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%.openxc.Diagnost" + + "icRequest.DecodedType\"!\n\013DecodedType\022\010\n\004" + + "NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022" + + "\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode" + + "\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026" + + "negative_response_code\030\006 \001(\r\022\017\n\007payload\030" + + "\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n", + "\004type\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024" + + "\n\014string_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 " + + "\001(\001\022\025\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006ST" + + "RING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"g\n\rSimpleMessa" + + "ge\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.openxc" + + ".DynamicField\022#\n\005event\030\003 \001(\0132\024.openxc.Dy" + + "namicFieldB\034\n\ncom.openxcB\016BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -11935,153 +15161,115 @@ 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", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", "Uptime", }, - com.openxc.BinaryMessages.VehicleMessage.class, - com.openxc.BinaryMessages.VehicleMessage.Builder.class); + new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", "Timestamp", }); internal_static_openxc_CanMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_CanMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CanMessage_descriptor, - new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }, - com.openxc.BinaryMessages.CanMessage.class, - com.openxc.BinaryMessages.CanMessage.Builder.class); + new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }); internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", "ModemConfigurationCommand", "RtcConfigurationCommand", }, - com.openxc.BinaryMessages.ControlCommand.class, - com.openxc.BinaryMessages.ControlCommand.Builder.class); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", "ModemConfigurationCommand", "RtcConfigurationCommand", }); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticControlCommand_descriptor, - new java.lang.String[] { "Request", "Action", }, - com.openxc.BinaryMessages.DiagnosticControlCommand.class, - com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + new java.lang.String[] { "Request", "Action", }); internal_static_openxc_PassthroughModeControlCommand_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PassthroughModeControlCommand_descriptor, - new java.lang.String[] { "Bus", "Enabled", }, - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, - com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + new java.lang.String[] { "Bus", "Enabled", }); internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, - new java.lang.String[] { "Bus", "Bypass", }, - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + new java.lang.String[] { "Bus", "Bypass", }); internal_static_openxc_PayloadFormatCommand_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PayloadFormatCommand_descriptor, - new java.lang.String[] { "Format", }, - com.openxc.BinaryMessages.PayloadFormatCommand.class, - com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); + new java.lang.String[] { "Format", }); internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, - new java.lang.String[] { "Enabled", }, - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + new java.lang.String[] { "Enabled", }); internal_static_openxc_NetworkOperatorSettings_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_NetworkOperatorSettings_descriptor, - new java.lang.String[] { "AllowDataRoaming", "OperatorSelectMode", "NetworkDescriptor", }, - com.openxc.BinaryMessages.NetworkOperatorSettings.class, - com.openxc.BinaryMessages.NetworkOperatorSettings.Builder.class); + new java.lang.String[] { "AllowDataRoaming", "OperatorSelectMode", "NetworkDescriptor", }); internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor = internal_static_openxc_NetworkOperatorSettings_descriptor.getNestedTypes().get(0); internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor, - new java.lang.String[] { "PLMN", "NetworkType", }, - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.class, - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder.class); + new java.lang.String[] { "PLMN", "NetworkType", }); internal_static_openxc_NetworkDataSettings_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_openxc_NetworkDataSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_NetworkDataSettings_descriptor, - new java.lang.String[] { "APN", }, - com.openxc.BinaryMessages.NetworkDataSettings.class, - com.openxc.BinaryMessages.NetworkDataSettings.Builder.class); + new java.lang.String[] { "APN", }); internal_static_openxc_ServerConnectSettings_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_openxc_ServerConnectSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ServerConnectSettings_descriptor, - new java.lang.String[] { "Host", "Port", }, - com.openxc.BinaryMessages.ServerConnectSettings.class, - com.openxc.BinaryMessages.ServerConnectSettings.Builder.class); + new java.lang.String[] { "Host", "Port", }); internal_static_openxc_ModemConfigurationCommand_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ModemConfigurationCommand_descriptor, - new java.lang.String[] { "NetworkOperatorSettings", "NetworkDataSettings", "ServerConnectSettings", }, - com.openxc.BinaryMessages.ModemConfigurationCommand.class, - com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); + new java.lang.String[] { "NetworkOperatorSettings", "NetworkDataSettings", "ServerConnectSettings", }); internal_static_openxc_RTCConfigurationCommand_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RTCConfigurationCommand_descriptor, - new java.lang.String[] { "UnixTime", }, - com.openxc.BinaryMessages.RTCConfigurationCommand.class, - com.openxc.BinaryMessages.RTCConfigurationCommand.Builder.class); + new java.lang.String[] { "UnixTime", }); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, - new java.lang.String[] { "Type", "Message", "Status", }, - com.openxc.BinaryMessages.CommandResponse.class, - com.openxc.BinaryMessages.CommandResponse.Builder.class); + new java.lang.String[] { "Type", "Message", "Status", }); internal_static_openxc_DiagnosticRequest_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }, - com.openxc.BinaryMessages.DiagnosticRequest.class, - com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); internal_static_openxc_DiagnosticResponse_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }, - com.openxc.BinaryMessages.DiagnosticResponse.class, - com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); internal_static_openxc_DynamicField_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, - new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }, - com.openxc.BinaryMessages.DynamicField.class, - com.openxc.BinaryMessages.DynamicField.Builder.class); + new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); internal_static_openxc_SimpleMessage_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_openxc_SimpleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_SimpleMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }, - com.openxc.BinaryMessages.SimpleMessage.class, - com.openxc.BinaryMessages.SimpleMessage.Builder.class); + new java.lang.String[] { "Name", "Value", "Event", }); return null; } }; @@ -12090,6 +15278,6 @@ public final class BinaryMessages { new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } - + // @@protoc_insertion_point(outer_class_scope) } diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index ceacf25d..023379de 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -1,326 +1,328 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! +# source: openxc.proto -from google.protobuf import descriptor -from google.protobuf import message -from google.protobuf import reflection +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) -DESCRIPTOR = descriptor.FileDescriptor( + +DESCRIPTOR = _descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x98\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x0e\n\x06uptime\x18\x07 \x01(\r\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x89\x06\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xd8\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\x12\x13\n\x0fSD_MOUNT_STATUS\x10\n\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x9b\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x11\n\ttimestamp\x18\x07 \x01(\x04\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x89\x06\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xd8\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\x12\x13\n\x0fSD_MOUNT_STATUS\x10\n\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') -_VEHICLEMESSAGE_TYPE = descriptor.EnumDescriptor( +_VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='openxc.VehicleMessage.Type', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='CAN', index=0, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='SIMPLE', index=1, number=2, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='CONTROL_COMMAND', index=3, number=4, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='COMMAND_RESPONSE', index=4, number=5, options=None, type=None), ], containing_type=None, options=None, - serialized_start=347, - serialized_end=433, + serialized_start=350, + serialized_end=436, ) -_CANMESSAGE_FRAMEFORMAT = descriptor.EnumDescriptor( +_CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( name='FrameFormat', full_name='openxc.CanMessage.FrameFormat', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='STANDARD', index=0, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='EXTENDED', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=543, - serialized_end=584, + serialized_start=546, + serialized_end=587, ) -_CONTROLCOMMAND_TYPE = descriptor.EnumDescriptor( +_CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='openxc.ControlCommand.Type', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='VERSION', index=0, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='DEVICE_ID', index=1, number=2, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='PASSTHROUGH', index=3, number=4, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='ACCEPTANCE_FILTER_BYPASS', index=4, number=5, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='PAYLOAD_FORMAT', index=5, number=6, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='PREDEFINED_OBD2_REQUESTS', index=6, number=7, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='MODEM_CONFIGURATION', index=7, number=8, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='RTC_CONFIGURATION', index=8, number=9, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='SD_MOUNT_STATUS', index=9, number=10, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1148, - serialized_end=1364, + serialized_start=1151, + serialized_end=1367, ) -_DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( +_DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( name='Action', full_name='openxc.DiagnosticControlCommand.Action', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='ADD', index=0, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='CANCEL', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1496, - serialized_end=1525, + serialized_start=1499, + serialized_end=1528, ) -_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( name='PayloadFormat', full_name='openxc.PayloadFormatCommand.PayloadFormat', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='JSON', index=0, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='PROTOBUF', index=1, number=2, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='MESSAGEPACK', index=2, number=3, options=None, type=None), ], containing_type=None, options=None, - serialized_start=1737, - serialized_end=1793, + serialized_start=1740, + serialized_end=1796, ) -_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescriptor( +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = _descriptor.EnumDescriptor( name='NetworkType', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='GSM', index=0, number=0, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='UTRAN', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=2177, - serialized_end=2210, + serialized_start=2180, + serialized_end=2213, ) -_NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( +_NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = _descriptor.EnumDescriptor( name='OperatorSelectMode', full_name='openxc.NetworkOperatorSettings.OperatorSelectMode', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='AUTOMATIC', index=0, number=0, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='MANUAL', index=1, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='DEREGISTER', index=2, number=2, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='SET_ONLY', index=3, number=3, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='MANUAL_AUTOMATIC', index=4, number=4, options=None, type=None), ], containing_type=None, options=None, - serialized_start=2212, - serialized_end=2311, + serialized_start=2215, + serialized_end=2314, ) -_DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( +_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( name='DecodedType', full_name='openxc.DiagnosticRequest.DecodedType', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='NONE', index=0, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='OBD2', index=1, number=2, options=None, type=None), ], containing_type=None, options=None, - serialized_start=2980, - serialized_end=3013, + serialized_start=2983, + serialized_end=3016, ) -_DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( +_DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='openxc.DynamicField.Type', filename=None, file=DESCRIPTOR, values=[ - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='STRING', index=0, number=1, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='NUM', index=1, number=2, options=None, type=None), - descriptor.EnumValueDescriptor( + _descriptor.EnumValueDescriptor( name='BOOL', index=2, number=3, options=None, type=None), ], containing_type=None, options=None, - serialized_start=3305, - serialized_end=3342, + serialized_start=3308, + serialized_end=3345, ) -_VEHICLEMESSAGE = descriptor.Descriptor( +_VEHICLEMESSAGE = _descriptor.Descriptor( name='VehicleMessage', full_name='openxc.VehicleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='type', full_name='openxc.VehicleMessage.type', 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='can_message', full_name='openxc.VehicleMessage.can_message', index=1, number=2, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='simple_message', full_name='openxc.VehicleMessage.simple_message', index=2, number=3, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='diagnostic_response', full_name='openxc.VehicleMessage.diagnostic_response', index=3, number=4, 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), - descriptor.FieldDescriptor( + _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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='command_response', full_name='openxc.VehicleMessage.command_response', index=5, number=6, 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), - descriptor.FieldDescriptor( - name='uptime', full_name='openxc.VehicleMessage.uptime', index=6, - number=7, type=13, cpp_type=3, label=1, + _descriptor.FieldDescriptor( + name='timestamp', full_name='openxc.VehicleMessage.timestamp', index=6, + number=7, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -336,39 +338,39 @@ _VEHICLEMESSAGE = descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=25, - serialized_end=433, + serialized_end=436, ) -_CANMESSAGE = descriptor.Descriptor( +_CANMESSAGE = _descriptor.Descriptor( name='CanMessage', full_name='openxc.CanMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='bus', full_name='openxc.CanMessage.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( + _descriptor.FieldDescriptor( name='id', full_name='openxc.CanMessage.id', index=1, number=2, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='data', full_name='openxc.CanMessage.data', index=2, number=3, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='frame_format', full_name='openxc.CanMessage.frame_format', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -385,68 +387,68 @@ _CANMESSAGE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=436, - serialized_end=584, + serialized_start=439, + serialized_end=587, ) -_CONTROLCOMMAND = descriptor.Descriptor( +_CONTROLCOMMAND = _descriptor.Descriptor( name='ControlCommand', full_name='openxc.ControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='type', full_name='openxc.ControlCommand.type', 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='diagnostic_request', full_name='openxc.ControlCommand.diagnostic_request', index=1, number=2, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='passthrough_mode_request', full_name='openxc.ControlCommand.passthrough_mode_request', index=2, number=3, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='acceptance_filter_bypass_command', full_name='openxc.ControlCommand.acceptance_filter_bypass_command', index=3, number=4, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='payload_format_command', full_name='openxc.ControlCommand.payload_format_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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='predefined_obd2_requests_command', full_name='openxc.ControlCommand.predefined_obd2_requests_command', index=5, number=6, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='modem_configuration_command', full_name='openxc.ControlCommand.modem_configuration_command', index=6, number=7, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='rtc_configuration_command', full_name='openxc.ControlCommand.rtc_configuration_command', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -463,26 +465,26 @@ _CONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=587, - serialized_end=1364, + serialized_start=590, + serialized_end=1367, ) -_DIAGNOSTICCONTROLCOMMAND = descriptor.Descriptor( +_DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( name='DiagnosticControlCommand', full_name='openxc.DiagnosticControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='request', full_name='openxc.DiagnosticControlCommand.request', index=0, number=1, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='action', full_name='openxc.DiagnosticControlCommand.action', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -499,26 +501,26 @@ _DIAGNOSTICCONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1367, - serialized_end=1525, + serialized_start=1370, + serialized_end=1528, ) -_PASSTHROUGHMODECONTROLCOMMAND = descriptor.Descriptor( +_PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( name='PassthroughModeControlCommand', full_name='openxc.PassthroughModeControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='bus', full_name='openxc.PassthroughModeControlCommand.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( + _descriptor.FieldDescriptor( name='enabled', full_name='openxc.PassthroughModeControlCommand.enabled', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -534,26 +536,26 @@ _PASSTHROUGHMODECONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1527, - serialized_end=1588, + serialized_start=1530, + serialized_end=1591, ) -_ACCEPTANCEFILTERBYPASSCOMMAND = descriptor.Descriptor( +_ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( name='AcceptanceFilterBypassCommand', full_name='openxc.AcceptanceFilterBypassCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='bus', full_name='openxc.AcceptanceFilterBypassCommand.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( + _descriptor.FieldDescriptor( name='bypass', full_name='openxc.AcceptanceFilterBypassCommand.bypass', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -569,19 +571,19 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1590, - serialized_end=1650, + serialized_start=1593, + serialized_end=1653, ) -_PAYLOADFORMATCOMMAND = descriptor.Descriptor( +_PAYLOADFORMATCOMMAND = _descriptor.Descriptor( name='PayloadFormatCommand', full_name='openxc.PayloadFormatCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='format', full_name='openxc.PayloadFormatCommand.format', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -598,19 +600,19 @@ _PAYLOADFORMATCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1653, - serialized_end=1793, + serialized_start=1656, + serialized_end=1796, ) -_PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( +_PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( name='PredefinedObd2RequestsCommand', full_name='openxc.PredefinedObd2RequestsCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='enabled', full_name='openxc.PredefinedObd2RequestsCommand.enabled', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -626,26 +628,26 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1795, - serialized_end=1843, + serialized_start=1798, + serialized_end=1846, ) -_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = _descriptor.Descriptor( name='NetworkDescriptor', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='PLMN', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.PLMN', index=0, number=1, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='networkType', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.networkType', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, @@ -662,32 +664,32 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2058, - serialized_end=2210, + serialized_start=2061, + serialized_end=2213, ) -_NETWORKOPERATORSETTINGS = descriptor.Descriptor( +_NETWORKOPERATORSETTINGS = _descriptor.Descriptor( name='NetworkOperatorSettings', full_name='openxc.NetworkOperatorSettings', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='allowDataRoaming', full_name='openxc.NetworkOperatorSettings.allowDataRoaming', index=0, number=1, 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( + _descriptor.FieldDescriptor( name='operatorSelectMode', full_name='openxc.NetworkOperatorSettings.operatorSelectMode', index=1, number=2, type=14, cpp_type=8, 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( + _descriptor.FieldDescriptor( name='networkDescriptor', full_name='openxc.NetworkOperatorSettings.networkDescriptor', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -704,19 +706,19 @@ _NETWORKOPERATORSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1846, - serialized_end=2311, + serialized_start=1849, + serialized_end=2314, ) -_NETWORKDATASETTINGS = descriptor.Descriptor( +_NETWORKDATASETTINGS = _descriptor.Descriptor( name='NetworkDataSettings', full_name='openxc.NetworkDataSettings', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='APN', full_name='openxc.NetworkDataSettings.APN', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), @@ -732,26 +734,26 @@ _NETWORKDATASETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2313, - serialized_end=2347, + serialized_start=2316, + serialized_end=2350, ) -_SERVERCONNECTSETTINGS = descriptor.Descriptor( +_SERVERCONNECTSETTINGS = _descriptor.Descriptor( name='ServerConnectSettings', full_name='openxc.ServerConnectSettings', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='host', full_name='openxc.ServerConnectSettings.host', index=0, number=1, 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='port', full_name='openxc.ServerConnectSettings.port', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, @@ -767,33 +769,33 @@ _SERVERCONNECTSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2349, - serialized_end=2400, + serialized_start=2352, + serialized_end=2403, ) -_MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( +_MODEMCONFIGURATIONCOMMAND = _descriptor.Descriptor( name='ModemConfigurationCommand', full_name='openxc.ModemConfigurationCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='networkOperatorSettings', full_name='openxc.ModemConfigurationCommand.networkOperatorSettings', index=0, number=1, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='networkDataSettings', full_name='openxc.ModemConfigurationCommand.networkDataSettings', index=1, number=2, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='serverConnectSettings', full_name='openxc.ModemConfigurationCommand.serverConnectSettings', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -809,19 +811,19 @@ _MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2403, - serialized_end=2616, + serialized_start=2406, + serialized_end=2619, ) -_RTCCONFIGURATIONCOMMAND = descriptor.Descriptor( +_RTCCONFIGURATIONCOMMAND = _descriptor.Descriptor( name='RTCConfigurationCommand', full_name='openxc.RTCConfigurationCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='unix_time', full_name='openxc.RTCConfigurationCommand.unix_time', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, @@ -837,33 +839,33 @@ _RTCCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2618, - serialized_end=2662, + serialized_start=2621, + serialized_end=2665, ) -_COMMANDRESPONSE = descriptor.Descriptor( +_COMMANDRESPONSE = _descriptor.Descriptor( name='CommandResponse', full_name='openxc.CommandResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='type', full_name='openxc.CommandResponse.type', 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='message', full_name='openxc.CommandResponse.message', index=1, number=2, 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='status', full_name='openxc.CommandResponse.status', index=2, number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -879,75 +881,75 @@ _COMMANDRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2664, - serialized_end=2757, + serialized_start=2667, + serialized_end=2760, ) -_DIAGNOSTICREQUEST = descriptor.Descriptor( +_DIAGNOSTICREQUEST = _descriptor.Descriptor( name='DiagnosticRequest', full_name='openxc.DiagnosticRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='bus', full_name='openxc.DiagnosticRequest.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( + _descriptor.FieldDescriptor( name='message_id', full_name='openxc.DiagnosticRequest.message_id', index=1, number=2, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='mode', full_name='openxc.DiagnosticRequest.mode', index=2, number=3, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='pid', full_name='openxc.DiagnosticRequest.pid', index=3, number=4, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticRequest.payload', index=4, number=5, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( 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( + _descriptor.FieldDescriptor( name='frequency', full_name='openxc.DiagnosticRequest.frequency', 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( + _descriptor.FieldDescriptor( name='name', full_name='openxc.DiagnosticRequest.name', index=7, number=8, 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='decoded_type', full_name='openxc.DiagnosticRequest.decoded_type', index=8, number=9, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -964,68 +966,68 @@ _DIAGNOSTICREQUEST = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2760, - serialized_end=3013, + serialized_start=2763, + serialized_end=3016, ) -_DIAGNOSTICRESPONSE = descriptor.Descriptor( +_DIAGNOSTICRESPONSE = _descriptor.Descriptor( name='DiagnosticResponse', full_name='openxc.DiagnosticResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='bus', full_name='openxc.DiagnosticResponse.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( + _descriptor.FieldDescriptor( name='message_id', full_name='openxc.DiagnosticResponse.message_id', index=1, number=2, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='mode', full_name='openxc.DiagnosticResponse.mode', index=2, number=3, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='pid', full_name='openxc.DiagnosticResponse.pid', index=3, number=4, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='success', full_name='openxc.DiagnosticResponse.success', index=4, number=5, 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( + _descriptor.FieldDescriptor( name='negative_response_code', full_name='openxc.DiagnosticResponse.negative_response_code', index=5, number=6, type=13, cpp_type=3, 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( + _descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticResponse.payload', index=6, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='value', full_name='openxc.DiagnosticResponse.value', index=7, number=8, type=1, cpp_type=5, label=1, has_default_value=False, default_value=0, @@ -1041,40 +1043,40 @@ _DIAGNOSTICRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3016, - serialized_end=3177, + serialized_start=3019, + serialized_end=3180, ) -_DYNAMICFIELD = descriptor.Descriptor( +_DYNAMICFIELD = _descriptor.Descriptor( name='DynamicField', full_name='openxc.DynamicField', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='type', full_name='openxc.DynamicField.type', 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='string_value', full_name='openxc.DynamicField.string_value', index=1, number=2, 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='numeric_value', full_name='openxc.DynamicField.numeric_value', index=2, number=3, 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( + _descriptor.FieldDescriptor( name='boolean_value', full_name='openxc.DynamicField.boolean_value', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -1091,33 +1093,33 @@ _DYNAMICFIELD = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3180, - serialized_end=3342, + serialized_start=3183, + serialized_end=3345, ) -_SIMPLEMESSAGE = descriptor.Descriptor( +_SIMPLEMESSAGE = _descriptor.Descriptor( name='SimpleMessage', full_name='openxc.SimpleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='name', full_name='openxc.SimpleMessage.name', index=0, number=1, 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, options=None), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='value', full_name='openxc.SimpleMessage.value', index=1, number=2, 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), - descriptor.FieldDescriptor( + _descriptor.FieldDescriptor( name='event', full_name='openxc.SimpleMessage.event', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -1133,8 +1135,8 @@ _SIMPLEMESSAGE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3344, - serialized_end=3447, + serialized_start=3347, + serialized_end=3450, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE @@ -1195,118 +1197,121 @@ DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['SimpleMessage'] = _SIMPLEMESSAGE -class VehicleMessage(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class VehicleMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _VEHICLEMESSAGE - + # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) -class CanMessage(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class CanMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _CANMESSAGE - + # @@protoc_insertion_point(class_scope:openxc.CanMessage) -class ControlCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class ControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _CONTROLCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.ControlCommand) -class DiagnosticControlCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class DiagnosticControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) -class PassthroughModeControlCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class PassthroughModeControlCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) -class AcceptanceFilterBypassCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class AcceptanceFilterBypassCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) -class PayloadFormatCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class PayloadFormatCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _PAYLOADFORMATCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) -class PredefinedObd2RequestsCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class PredefinedObd2RequestsCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) -class NetworkOperatorSettings(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType - - class NetworkDescriptor(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class NetworkOperatorSettings(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType + + class NetworkDescriptor(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR - + # @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) DESCRIPTOR = _NETWORKOPERATORSETTINGS - + # @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings) -class NetworkDataSettings(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class NetworkDataSettings(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _NETWORKDATASETTINGS - + # @@protoc_insertion_point(class_scope:openxc.NetworkDataSettings) -class ServerConnectSettings(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class ServerConnectSettings(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _SERVERCONNECTSETTINGS - + # @@protoc_insertion_point(class_scope:openxc.ServerConnectSettings) -class ModemConfigurationCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class ModemConfigurationCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _MODEMCONFIGURATIONCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) -class RTCConfigurationCommand(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class RTCConfigurationCommand(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _RTCCONFIGURATIONCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.RTCConfigurationCommand) -class CommandResponse(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class CommandResponse(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE - + # @@protoc_insertion_point(class_scope:openxc.CommandResponse) -class DiagnosticRequest(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class DiagnosticRequest(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _DIAGNOSTICREQUEST - + # @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) -class DiagnosticResponse(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class DiagnosticResponse(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _DIAGNOSTICRESPONSE - + # @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) -class DynamicField(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class DynamicField(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _DYNAMICFIELD - + # @@protoc_insertion_point(class_scope:openxc.DynamicField) -class SimpleMessage(message.Message): - __metaclass__ = reflection.GeneratedProtocolMessageType +class SimpleMessage(_message.Message): + __metaclass__ = _reflection.GeneratedProtocolMessageType DESCRIPTOR = _SIMPLEMESSAGE - + # @@protoc_insertion_point(class_scope:openxc.SimpleMessage) + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), '\n\ncom.openxcB\016BinaryMessages') # @@protoc_insertion_point(module_scope) diff --git a/openxc.proto b/openxc.proto index 7653212c..6d41325b 100644 --- a/openxc.proto +++ b/openxc.proto @@ -13,7 +13,7 @@ message VehicleMessage { optional DiagnosticResponse diagnostic_response = 4; optional ControlCommand control_command = 5; optional CommandResponse command_response = 6; - optional uint32 uptime = 7; + optional uint64 timestamp = 7; } message CanMessage { -- cgit 1.2.3-korg From bb0a61b771b10590868341f05cb62df0d0deae57 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Mon, 29 Feb 2016 20:01:29 +0000 Subject: move nanopb submodule from code.google to github --- .gitmodules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index a03da7b3..5c591244 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ [submodule "libs/nanopb"] path = libs/nanopb - url = https://code.google.com/p/nanopb/ - ignore = dirty + url = https://github.com/nanopb/nanopb -- cgit 1.2.3-korg From af79ee80e6d22984711d5622ab864a619451a2a4 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Mon, 29 Feb 2016 20:02:27 +0000 Subject: updated documentation --- CHANGELOG.md | 8 ++++++++ README.md | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8244c41..3bd680d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # OpenXC Message Format Changelog +## v0.6.0 + +* Feature: Added MessagePack support for BTLE connections. +* Feature: Support for vehicle message timestamps (changed previous uptime). +* Feature: Support for C5 SD Card. +* Feature: Support for C5 RTC. +* Fix: Update submodule from code.google to github. + ## v0.5.0 * Feature: Support for C5 Cellular device. New uptime message. diff --git a/README.md b/README.md index 0597fc42..53b7c786 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenXC Message Format Specification -Version: v0.5.0 +Version: v0.6.0 This specification is a part of the [OpenXC platform][OpenXC]. @@ -35,7 +35,9 @@ MessagePack is an efficient binary serialization format. It lets you exchange da among multiple languages like JSON. But it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves -For protocol specification visit https://github.com/msgpack/msgpack/blob/master/spec.md + +For protocol specification visit +https://github.com/msgpack/msgpack/blob/master/spec.md ## Trace File Format -- cgit 1.2.3-korg From 22594be77c28613e9b71bdf3202e435463f758ed Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Mon, 29 Feb 2016 20:02:59 +0000 Subject: re-compiled with libprotoc 2.4.1 - should be no changes --- gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 2 +- gen/java/com/openxc/BinaryMessages.java | 8568 ++++++++++--------------------- gen/python/openxc_pb2.py | 385 +- 4 files changed, 2882 insertions(+), 6075 deletions(-) diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index c15a218d..f834836d 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 Wed Dec 9 21:31:24 2015. */ +/* Generated by nanopb-0.3.1 at Mon Feb 29 19:42:01 2016. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 17bb77d4..11386e3e 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 Wed Dec 9 21:31:24 2015. */ +/* Generated by nanopb-0.3.1 at Mon Feb 29 19:42:01 2016. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index bd84bd14..534b2231 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -10,319 +10,86 @@ public final class BinaryMessages { } public interface VehicleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.VehicleMessage.Type type = 1; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ boolean hasType(); - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ com.openxc.BinaryMessages.VehicleMessage.Type getType(); - + // optional .openxc.CanMessage can_message = 2; - /** - * optional .openxc.CanMessage can_message = 2; - */ boolean hasCanMessage(); - /** - * optional .openxc.CanMessage can_message = 2; - */ com.openxc.BinaryMessages.CanMessage getCanMessage(); - /** - * optional .openxc.CanMessage can_message = 2; - */ com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder(); - + // optional .openxc.SimpleMessage simple_message = 3; - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ boolean hasSimpleMessage(); - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ com.openxc.BinaryMessages.SimpleMessage getSimpleMessage(); - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder(); - + // optional .openxc.DiagnosticResponse diagnostic_response = 4; - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ boolean hasDiagnosticResponse(); - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse(); - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder(); - + // optional .openxc.ControlCommand control_command = 5; - /** - * optional .openxc.ControlCommand control_command = 5; - */ boolean hasControlCommand(); - /** - * optional .openxc.ControlCommand control_command = 5; - */ com.openxc.BinaryMessages.ControlCommand getControlCommand(); - /** - * optional .openxc.ControlCommand control_command = 5; - */ com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder(); - + // optional .openxc.CommandResponse command_response = 6; - /** - * optional .openxc.CommandResponse command_response = 6; - */ boolean hasCommandResponse(); - /** - * optional .openxc.CommandResponse command_response = 6; - */ com.openxc.BinaryMessages.CommandResponse getCommandResponse(); - /** - * optional .openxc.CommandResponse command_response = 6; - */ com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder(); - + // optional uint64 timestamp = 7; - /** - * optional uint64 timestamp = 7; - */ boolean hasTimestamp(); - /** - * optional uint64 timestamp = 7; - */ long getTimestamp(); } - /** - * Protobuf type {@code openxc.VehicleMessage} - */ public static final class VehicleMessage extends com.google.protobuf.GeneratedMessage implements VehicleMessageOrBuilder { // Use VehicleMessage.newBuilder() to construct. - private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + private VehicleMessage(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private VehicleMessage(boolean noInit) {} + private static final VehicleMessage defaultInstance; public static VehicleMessage getDefaultInstance() { return defaultInstance; } - + public VehicleMessage getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private VehicleMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.openxc.BinaryMessages.CanMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = canMessage_.toBuilder(); - } - canMessage_ = input.readMessage(com.openxc.BinaryMessages.CanMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(canMessage_); - canMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = simpleMessage_.toBuilder(); - } - simpleMessage_ = input.readMessage(com.openxc.BinaryMessages.SimpleMessage.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(simpleMessage_); - simpleMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 34: { - com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = diagnosticResponse_.toBuilder(); - } - diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diagnosticResponse_); - diagnosticResponse_ = subBuilder.buildPartial(); - } - 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; - } - case 50: { - com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - subBuilder = commandResponse_.toBuilder(); - } - commandResponse_ = input.readMessage(com.openxc.BinaryMessages.CommandResponse.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(commandResponse_); - commandResponse_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 56: { - bitField0_ |= 0x00000040; - timestamp_ = input.readUInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public VehicleMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VehicleMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.VehicleMessage.Type} - */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * CAN = 1; - */ CAN(0, 1), - /** - * SIMPLE = 2; - */ SIMPLE(1, 2), - /** - * DIAGNOSTIC = 3; - */ DIAGNOSTIC(2, 3), - /** - * CONTROL_COMMAND = 4; - */ CONTROL_COMMAND(3, 4), - /** - * COMMAND_RESPONSE = 5; - */ COMMAND_RESPONSE(4, 5), ; - - /** - * CAN = 1; - */ + public static final int CAN_VALUE = 1; - /** - * SIMPLE = 2; - */ public static final int SIMPLE_VALUE = 2; - /** - * DIAGNOSTIC = 3; - */ public static final int DIAGNOSTIC_VALUE = 3; - /** - * CONTROL_COMMAND = 4; - */ public static final int CONTROL_COMMAND_VALUE = 4; - /** - * COMMAND_RESPONSE = 5; - */ public static final int COMMAND_RESPONSE_VALUE = 5; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return CAN; @@ -333,7 +100,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -345,7 +112,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -358,9 +125,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = values(); - + + private static final Type[] VALUES = { + CAN, SIMPLE, DIAGNOSTIC, CONTROL_COMMAND, COMMAND_RESPONSE, + }; + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -369,161 +138,104 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type) } - + private int bitField0_; // optional .openxc.VehicleMessage.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public com.openxc.BinaryMessages.VehicleMessage.Type getType() { return type_; } - + // optional .openxc.CanMessage can_message = 2; public static final int CAN_MESSAGE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.CanMessage canMessage_; - /** - * optional .openxc.CanMessage can_message = 2; - */ public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessage getCanMessage() { return canMessage_; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { return canMessage_; } - + // optional .openxc.SimpleMessage simple_message = 3; public static final int SIMPLE_MESSAGE_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_; - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { return simpleMessage_; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { return simpleMessage_; } - + // optional .openxc.DiagnosticResponse diagnostic_response = 4; public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_; - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { return diagnosticResponse_; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { return diagnosticResponse_; } - + // optional .openxc.ControlCommand control_command = 5; public static final int CONTROL_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.ControlCommand controlCommand_; - /** - * optional .openxc.ControlCommand control_command = 5; - */ public boolean hasControlCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommand getControlCommand() { return controlCommand_; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { return controlCommand_; } - + // optional .openxc.CommandResponse command_response = 6; public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_; - /** - * optional .openxc.CommandResponse command_response = 6; - */ public boolean hasCommandResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { return commandResponse_; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { return commandResponse_; } - + // optional uint64 timestamp = 7; public static final int TIMESTAMP_FIELD_NUMBER = 7; private long timestamp_; - /** - * optional uint64 timestamp = 7; - */ public boolean hasTimestamp() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional uint64 timestamp = 7; - */ public long getTimestamp() { return timestamp_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); @@ -537,11 +249,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -568,12 +280,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -607,83 +319,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.VehicleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.VehicleMessage} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.VehicleMessageOrBuilder { @@ -691,21 +414,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -721,7 +441,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; @@ -760,20 +480,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000040); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor; + return com.openxc.BinaryMessages.VehicleMessage.getDescriptor(); } - + public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.VehicleMessage build() { com.openxc.BinaryMessages.VehicleMessage result = buildPartial(); if (!result.isInitialized()) { @@ -781,7 +501,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.VehicleMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.VehicleMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.VehicleMessage buildPartial() { com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this); int from_bitField0_ = bitField0_; @@ -838,7 +568,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.VehicleMessage) { return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other); @@ -847,7 +577,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) { if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this; if (other.hasType()) { @@ -874,47 +604,109 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.VehicleMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.CanMessage.Builder subBuilder = com.openxc.BinaryMessages.CanMessage.newBuilder(); + if (hasCanMessage()) { + subBuilder.mergeFrom(getCanMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setCanMessage(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.SimpleMessage.Builder subBuilder = com.openxc.BinaryMessages.SimpleMessage.newBuilder(); + if (hasSimpleMessage()) { + subBuilder.mergeFrom(getSimpleMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setSimpleMessage(subBuilder.buildPartial()); + break; + } + case 34: { + com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(); + if (hasDiagnosticResponse()) { + subBuilder.mergeFrom(getDiagnosticResponse()); + } + input.readMessage(subBuilder, extensionRegistry); + setDiagnosticResponse(subBuilder.buildPartial()); + break; + } + case 42: { + com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = com.openxc.BinaryMessages.ControlCommand.newBuilder(); + if (hasControlCommand()) { + subBuilder.mergeFrom(getControlCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setControlCommand(subBuilder.buildPartial()); + break; + } + case 50: { + com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = com.openxc.BinaryMessages.CommandResponse.newBuilder(); + if (hasCommandResponse()) { + subBuilder.mergeFrom(getCommandResponse()); + } + input.readMessage(subBuilder, extensionRegistry); + setCommandResponse(subBuilder.buildPartial()); + break; + } + case 56: { + bitField0_ |= 0x00000040; + timestamp_ = input.readUInt64(); + break; + } } } - return this; } + private int bitField0_; - + // optional .openxc.VehicleMessage.Type type = 1; private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public com.openxc.BinaryMessages.VehicleMessage.Type getType() { return type_; } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) { if (value == null) { throw new NullPointerException(); @@ -924,29 +716,20 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.VehicleMessage.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.VehicleMessage.Type.CAN; onChanged(); return this; } - + // optional .openxc.CanMessage can_message = 2; private com.openxc.BinaryMessages.CanMessage canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> canMessageBuilder_; - /** - * optional .openxc.CanMessage can_message = 2; - */ public boolean hasCanMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessage getCanMessage() { if (canMessageBuilder_ == null) { return canMessage_; @@ -954,9 +737,6 @@ public final class BinaryMessages { return canMessageBuilder_.getMessage(); } } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder setCanMessage(com.openxc.BinaryMessages.CanMessage value) { if (canMessageBuilder_ == null) { if (value == null) { @@ -970,9 +750,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder setCanMessage( com.openxc.BinaryMessages.CanMessage.Builder builderForValue) { if (canMessageBuilder_ == null) { @@ -984,9 +761,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder mergeCanMessage(com.openxc.BinaryMessages.CanMessage value) { if (canMessageBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -1003,9 +777,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public Builder clearCanMessage() { if (canMessageBuilder_ == null) { canMessage_ = com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); @@ -1016,17 +787,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessage.Builder getCanMessageBuilder() { bitField0_ |= 0x00000002; onChanged(); return getCanMessageFieldBuilder().getBuilder(); } - /** - * optional .openxc.CanMessage can_message = 2; - */ public com.openxc.BinaryMessages.CanMessageOrBuilder getCanMessageOrBuilder() { if (canMessageBuilder_ != null) { return canMessageBuilder_.getMessageOrBuilder(); @@ -1034,9 +799,6 @@ public final class BinaryMessages { return canMessage_; } } - /** - * optional .openxc.CanMessage can_message = 2; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CanMessage, com.openxc.BinaryMessages.CanMessage.Builder, com.openxc.BinaryMessages.CanMessageOrBuilder> getCanMessageFieldBuilder() { @@ -1050,20 +812,14 @@ public final class BinaryMessages { } return canMessageBuilder_; } - + // optional .openxc.SimpleMessage simple_message = 3; private com.openxc.BinaryMessages.SimpleMessage simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> simpleMessageBuilder_; - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public boolean hasSimpleMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessage getSimpleMessage() { if (simpleMessageBuilder_ == null) { return simpleMessage_; @@ -1071,9 +827,6 @@ public final class BinaryMessages { return simpleMessageBuilder_.getMessage(); } } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder setSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { if (simpleMessageBuilder_ == null) { if (value == null) { @@ -1087,9 +840,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder setSimpleMessage( com.openxc.BinaryMessages.SimpleMessage.Builder builderForValue) { if (simpleMessageBuilder_ == null) { @@ -1101,9 +851,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder mergeSimpleMessage(com.openxc.BinaryMessages.SimpleMessage value) { if (simpleMessageBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -1120,9 +867,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public Builder clearSimpleMessage() { if (simpleMessageBuilder_ == null) { simpleMessage_ = com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); @@ -1133,17 +877,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessage.Builder getSimpleMessageBuilder() { bitField0_ |= 0x00000004; onChanged(); return getSimpleMessageFieldBuilder().getBuilder(); } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ public com.openxc.BinaryMessages.SimpleMessageOrBuilder getSimpleMessageOrBuilder() { if (simpleMessageBuilder_ != null) { return simpleMessageBuilder_.getMessageOrBuilder(); @@ -1151,9 +889,6 @@ public final class BinaryMessages { return simpleMessage_; } } - /** - * optional .openxc.SimpleMessage simple_message = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.SimpleMessage, com.openxc.BinaryMessages.SimpleMessage.Builder, com.openxc.BinaryMessages.SimpleMessageOrBuilder> getSimpleMessageFieldBuilder() { @@ -1167,20 +902,14 @@ public final class BinaryMessages { } return simpleMessageBuilder_; } - + // optional .openxc.DiagnosticResponse diagnostic_response = 4; private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_; - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public boolean hasDiagnosticResponse() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() { if (diagnosticResponseBuilder_ == null) { return diagnosticResponse_; @@ -1188,9 +917,6 @@ public final class BinaryMessages { return diagnosticResponseBuilder_.getMessage(); } } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { if (diagnosticResponseBuilder_ == null) { if (value == null) { @@ -1204,9 +930,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder setDiagnosticResponse( com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) { if (diagnosticResponseBuilder_ == null) { @@ -1218,9 +941,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) { if (diagnosticResponseBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && @@ -1237,9 +957,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public Builder clearDiagnosticResponse() { if (diagnosticResponseBuilder_ == null) { diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); @@ -1250,17 +967,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() { bitField0_ |= 0x00000008; onChanged(); return getDiagnosticResponseFieldBuilder().getBuilder(); } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() { if (diagnosticResponseBuilder_ != null) { return diagnosticResponseBuilder_.getMessageOrBuilder(); @@ -1268,9 +979,6 @@ public final class BinaryMessages { return diagnosticResponse_; } } - /** - * optional .openxc.DiagnosticResponse diagnostic_response = 4; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> getDiagnosticResponseFieldBuilder() { @@ -1284,20 +992,14 @@ 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_; - /** - * optional .openxc.ControlCommand control_command = 5; - */ public boolean hasControlCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommand getControlCommand() { if (controlCommandBuilder_ == null) { return controlCommand_; @@ -1305,9 +1007,6 @@ public final class BinaryMessages { return controlCommandBuilder_.getMessage(); } } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) { if (controlCommandBuilder_ == null) { if (value == null) { @@ -1321,9 +1020,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder setControlCommand( com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) { if (controlCommandBuilder_ == null) { @@ -1335,9 +1031,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder mergeControlCommand(com.openxc.BinaryMessages.ControlCommand value) { if (controlCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && @@ -1354,9 +1047,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public Builder clearControlCommand() { if (controlCommandBuilder_ == null) { controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); @@ -1367,17 +1057,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); return this; } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); return getControlCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.ControlCommand control_command = 5; - */ public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() { if (controlCommandBuilder_ != null) { return controlCommandBuilder_.getMessageOrBuilder(); @@ -1385,9 +1069,6 @@ public final class BinaryMessages { return controlCommand_; } } - /** - * optional .openxc.ControlCommand control_command = 5; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> getControlCommandFieldBuilder() { @@ -1401,20 +1082,14 @@ public final class BinaryMessages { } return controlCommandBuilder_; } - + // optional .openxc.CommandResponse command_response = 6; private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_; - /** - * optional .openxc.CommandResponse command_response = 6; - */ public boolean hasCommandResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { if (commandResponseBuilder_ == null) { return commandResponse_; @@ -1422,9 +1097,6 @@ public final class BinaryMessages { return commandResponseBuilder_.getMessage(); } } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder setCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { if (commandResponseBuilder_ == null) { if (value == null) { @@ -1438,9 +1110,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder setCommandResponse( com.openxc.BinaryMessages.CommandResponse.Builder builderForValue) { if (commandResponseBuilder_ == null) { @@ -1452,9 +1121,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder mergeCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { if (commandResponseBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && @@ -1471,9 +1137,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public Builder clearCommandResponse() { if (commandResponseBuilder_ == null) { commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); @@ -1484,17 +1147,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000020); return this; } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponse.Builder getCommandResponseBuilder() { bitField0_ |= 0x00000020; onChanged(); return getCommandResponseFieldBuilder().getBuilder(); } - /** - * optional .openxc.CommandResponse command_response = 6; - */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { if (commandResponseBuilder_ != null) { return commandResponseBuilder_.getMessageOrBuilder(); @@ -1502,9 +1159,6 @@ public final class BinaryMessages { return commandResponse_; } } - /** - * optional .openxc.CommandResponse command_response = 6; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> getCommandResponseFieldBuilder() { @@ -1518,237 +1172,98 @@ public final class BinaryMessages { } return commandResponseBuilder_; } - + // optional uint64 timestamp = 7; private long timestamp_ ; - /** - * optional uint64 timestamp = 7; - */ public boolean hasTimestamp() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional uint64 timestamp = 7; - */ public long getTimestamp() { return timestamp_; } - /** - * optional uint64 timestamp = 7; - */ public Builder setTimestamp(long value) { bitField0_ |= 0x00000040; timestamp_ = value; onChanged(); return this; } - /** - * optional uint64 timestamp = 7; - */ public Builder clearTimestamp() { bitField0_ = (bitField0_ & ~0x00000040); timestamp_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage) } - + static { defaultInstance = new VehicleMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.VehicleMessage) } - + public interface CanMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - + // optional uint32 id = 2; - /** - * optional uint32 id = 2; - */ boolean hasId(); - /** - * optional uint32 id = 2; - */ int getId(); - + // optional bytes data = 3; - /** - * optional bytes data = 3; - */ boolean hasData(); - /** - * optional bytes data = 3; - */ com.google.protobuf.ByteString getData(); - + // optional .openxc.CanMessage.FrameFormat frame_format = 4; - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ boolean hasFrameFormat(); - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat(); } - /** - * Protobuf type {@code openxc.CanMessage} - */ public static final class CanMessage extends com.google.protobuf.GeneratedMessage implements CanMessageOrBuilder { // Use CanMessage.newBuilder() to construct. - private CanMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + private CanMessage(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private CanMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private CanMessage(boolean noInit) {} + private static final CanMessage defaultInstance; public static CanMessage getDefaultInstance() { return defaultInstance; } - + public CanMessage getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CanMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - id_ = input.readUInt32(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - data_ = input.readBytes(); - break; - } - case 32: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - frameFormat_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable; } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CanMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CanMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code openxc.CanMessage.FrameFormat} - */ + public enum FrameFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * STANDARD = 1; - */ STANDARD(0, 1), - /** - * EXTENDED = 2; - */ EXTENDED(1, 2), ; - - /** - * STANDARD = 1; - */ + public static final int STANDARD_VALUE = 1; - /** - * EXTENDED = 2; - */ public static final int EXTENDED_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static FrameFormat valueOf(int value) { switch (value) { case 1: return STANDARD; @@ -1756,7 +1271,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -1768,7 +1283,7 @@ public final class BinaryMessages { return FrameFormat.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -1781,9 +1296,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.CanMessage.getDescriptor().getEnumTypes().get(0); } - - private static final FrameFormat[] VALUES = values(); - + + private static final FrameFormat[] VALUES = { + STANDARD, EXTENDED, + }; + public static FrameFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -1792,83 +1309,59 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private FrameFormat(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.CanMessage.FrameFormat) } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + // optional uint32 id = 2; public static final int ID_FIELD_NUMBER = 2; private int id_; - /** - * optional uint32 id = 2; - */ public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 id = 2; - */ public int getId() { return id_; } - + // optional bytes data = 3; public static final int DATA_FIELD_NUMBER = 3; private com.google.protobuf.ByteString data_; - /** - * optional bytes data = 3; - */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bytes data = 3; - */ public com.google.protobuf.ByteString getData() { return data_; } - + // optional .openxc.CanMessage.FrameFormat frame_format = 4; public static final int FRAME_FORMAT_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_; - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } - + private void initFields() { bus_ = 0; id_ = 0; @@ -1879,11 +1372,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -1901,12 +1394,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -1928,83 +1421,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CanMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CanMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.CanMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.CanMessage} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.CanMessageOrBuilder { @@ -2012,21 +1516,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CanMessage.class, com.openxc.BinaryMessages.CanMessage.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.CanMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -2037,7 +1538,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -2050,20 +1551,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_CanMessage_descriptor; + return com.openxc.BinaryMessages.CanMessage.getDescriptor(); } - + public com.openxc.BinaryMessages.CanMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.CanMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.CanMessage build() { com.openxc.BinaryMessages.CanMessage result = buildPartial(); if (!result.isInitialized()) { @@ -2071,7 +1572,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.CanMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.CanMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.CanMessage buildPartial() { com.openxc.BinaryMessages.CanMessage result = new com.openxc.BinaryMessages.CanMessage(this); int from_bitField0_ = bitField0_; @@ -2096,7 +1607,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.CanMessage) { return mergeFrom((com.openxc.BinaryMessages.CanMessage)other); @@ -2105,7 +1616,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.CanMessage other) { if (other == com.openxc.BinaryMessages.CanMessage.getDefaultInstance()) return this; if (other.hasBus()) { @@ -2123,113 +1634,116 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.CanMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.CanMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + id_ = input.readUInt32(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + data_ = input.readBytes(); + break; + } + case 32: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.CanMessage.FrameFormat value = com.openxc.BinaryMessages.CanMessage.FrameFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + frameFormat_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional uint32 id = 2; private int id_ ; - /** - * optional uint32 id = 2; - */ public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 id = 2; - */ public int getId() { return id_; } - /** - * optional uint32 id = 2; - */ public Builder setId(int value) { bitField0_ |= 0x00000002; id_ = value; onChanged(); return this; } - /** - * optional uint32 id = 2; - */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000002); id_ = 0; onChanged(); return this; } - + // optional bytes data = 3; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes data = 3; - */ public boolean hasData() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bytes data = 3; - */ public com.google.protobuf.ByteString getData() { return data_; } - /** - * optional bytes data = 3; - */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -2239,33 +1753,21 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional bytes data = 3; - */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000004); data_ = getDefaultInstance().getData(); onChanged(); return this; } - + // optional .openxc.CanMessage.FrameFormat frame_format = 4; private com.openxc.BinaryMessages.CanMessage.FrameFormat frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public boolean hasFrameFormat() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public com.openxc.BinaryMessages.CanMessage.FrameFormat getFrameFormat() { return frameFormat_; } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public Builder setFrameFormat(com.openxc.BinaryMessages.CanMessage.FrameFormat value) { if (value == null) { throw new NullPointerException(); @@ -2275,421 +1777,122 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.CanMessage.FrameFormat frame_format = 4; - */ public Builder clearFrameFormat() { bitField0_ = (bitField0_ & ~0x00000008); frameFormat_ = com.openxc.BinaryMessages.CanMessage.FrameFormat.STANDARD; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.CanMessage) } - + static { defaultInstance = new CanMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.CanMessage) } - + public interface ControlCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.ControlCommand.Type type = 1; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ boolean hasType(); - /** - * optional .openxc.ControlCommand.Type type = 1; - */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ boolean hasDiagnosticRequest(); - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest(); - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder(); - + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ boolean hasPassthroughModeRequest(); - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest(); - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder(); - + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ boolean hasAcceptanceFilterBypassCommand(); - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand(); - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder(); - + // optional .openxc.PayloadFormatCommand payload_format_command = 5; - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ boolean hasPayloadFormatCommand(); - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand(); - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder(); - + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ boolean hasPredefinedObd2RequestsCommand(); - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand(); - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder(); - + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ boolean hasModemConfigurationCommand(); - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand(); - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder(); - + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ boolean hasRtcConfigurationCommand(); - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand(); - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder(); } - /** - * Protobuf type {@code openxc.ControlCommand} - */ public static final class ControlCommand extends com.google.protobuf.GeneratedMessage implements ControlCommandOrBuilder { // Use ControlCommand.newBuilder() to construct. - private ControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private ControlCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private ControlCommand(boolean noInit) {} + private static final ControlCommand defaultInstance; public static ControlCommand getDefaultInstance() { return defaultInstance; } - + public ControlCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ControlCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = diagnosticRequest_.toBuilder(); - } - diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticControlCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diagnosticRequest_); - diagnosticRequest_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = passthroughModeRequest_.toBuilder(); - } - passthroughModeRequest_ = input.readMessage(com.openxc.BinaryMessages.PassthroughModeControlCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(passthroughModeRequest_); - passthroughModeRequest_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 34: { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subBuilder = acceptanceFilterBypassCommand_.toBuilder(); - } - acceptanceFilterBypassCommand_ = input.readMessage(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(acceptanceFilterBypassCommand_); - acceptanceFilterBypassCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 42: { - com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = payloadFormatCommand_.toBuilder(); - } - payloadFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.PayloadFormatCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(payloadFormatCommand_); - payloadFormatCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 50: { - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - subBuilder = predefinedObd2RequestsCommand_.toBuilder(); - } - predefinedObd2RequestsCommand_ = input.readMessage(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(predefinedObd2RequestsCommand_); - predefinedObd2RequestsCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 58: { - com.openxc.BinaryMessages.ModemConfigurationCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) == 0x00000040)) { - subBuilder = modemConfigurationCommand_.toBuilder(); - } - modemConfigurationCommand_ = input.readMessage(com.openxc.BinaryMessages.ModemConfigurationCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(modemConfigurationCommand_); - modemConfigurationCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case 66: { - com.openxc.BinaryMessages.RTCConfigurationCommand.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) == 0x00000080)) { - subBuilder = rtcConfigurationCommand_.toBuilder(); - } - rtcConfigurationCommand_ = input.readMessage(com.openxc.BinaryMessages.RTCConfigurationCommand.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rtcConfigurationCommand_); - rtcConfigurationCommand_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ControlCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ControlCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.ControlCommand.Type} - */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * VERSION = 1; - */ VERSION(0, 1), - /** - * DEVICE_ID = 2; - */ DEVICE_ID(1, 2), - /** - * DIAGNOSTIC = 3; - */ DIAGNOSTIC(2, 3), - /** - * PASSTHROUGH = 4; - */ PASSTHROUGH(3, 4), - /** - * ACCEPTANCE_FILTER_BYPASS = 5; - */ ACCEPTANCE_FILTER_BYPASS(4, 5), - /** - * PAYLOAD_FORMAT = 6; - */ PAYLOAD_FORMAT(5, 6), - /** - * PREDEFINED_OBD2_REQUESTS = 7; - */ PREDEFINED_OBD2_REQUESTS(6, 7), - /** - * MODEM_CONFIGURATION = 8; - */ MODEM_CONFIGURATION(7, 8), - /** - * RTC_CONFIGURATION = 9; - */ RTC_CONFIGURATION(8, 9), - /** - * SD_MOUNT_STATUS = 10; - */ SD_MOUNT_STATUS(9, 10), ; - - /** - * VERSION = 1; - */ + public static final int VERSION_VALUE = 1; - /** - * DEVICE_ID = 2; - */ public static final int DEVICE_ID_VALUE = 2; - /** - * DIAGNOSTIC = 3; - */ public static final int DIAGNOSTIC_VALUE = 3; - /** - * PASSTHROUGH = 4; - */ public static final int PASSTHROUGH_VALUE = 4; - /** - * ACCEPTANCE_FILTER_BYPASS = 5; - */ public static final int ACCEPTANCE_FILTER_BYPASS_VALUE = 5; - /** - * PAYLOAD_FORMAT = 6; - */ public static final int PAYLOAD_FORMAT_VALUE = 6; - /** - * PREDEFINED_OBD2_REQUESTS = 7; - */ public static final int PREDEFINED_OBD2_REQUESTS_VALUE = 7; - /** - * MODEM_CONFIGURATION = 8; - */ public static final int MODEM_CONFIGURATION_VALUE = 8; - /** - * RTC_CONFIGURATION = 9; - */ public static final int RTC_CONFIGURATION_VALUE = 9; - /** - * SD_MOUNT_STATUS = 10; - */ public static final int SD_MOUNT_STATUS_VALUE = 10; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return VERSION; @@ -2705,7 +1908,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -2717,7 +1920,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -2730,9 +1933,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = values(); - + + private static final Type[] VALUES = { + VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, RTC_CONFIGURATION, SD_MOUNT_STATUS, + }; + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -2741,189 +1946,120 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type) } - + private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_; - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { return diagnosticRequest_; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { return diagnosticRequest_; } - + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; public static final int PASSTHROUGH_MODE_REQUEST_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_; - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public boolean hasPassthroughModeRequest() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { return passthroughModeRequest_; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { return passthroughModeRequest_; } - + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; public static final int ACCEPTANCE_FILTER_BYPASS_COMMAND_FIELD_NUMBER = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_; - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public boolean hasAcceptanceFilterBypassCommand() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { return acceptanceFilterBypassCommand_; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { return acceptanceFilterBypassCommand_; } - + // optional .openxc.PayloadFormatCommand payload_format_command = 5; public static final int PAYLOAD_FORMAT_COMMAND_FIELD_NUMBER = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_; - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { return payloadFormatCommand_; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { return payloadFormatCommand_; } - + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; public static final int PREDEFINED_OBD2_REQUESTS_COMMAND_FIELD_NUMBER = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_; - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public boolean hasPredefinedObd2RequestsCommand() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { return predefinedObd2RequestsCommand_; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { return predefinedObd2RequestsCommand_; } - + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; public static final int MODEM_CONFIGURATION_COMMAND_FIELD_NUMBER = 7; private com.openxc.BinaryMessages.ModemConfigurationCommand modemConfigurationCommand_; - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public boolean hasModemConfigurationCommand() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand() { return modemConfigurationCommand_; } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder() { return modemConfigurationCommand_; } - + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; public static final int RTC_CONFIGURATION_COMMAND_FIELD_NUMBER = 8; private com.openxc.BinaryMessages.RTCConfigurationCommand rtcConfigurationCommand_; - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public boolean hasRtcConfigurationCommand() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand() { return rtcConfigurationCommand_; } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder() { return rtcConfigurationCommand_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); @@ -2938,11 +2074,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -2972,12 +2108,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -3015,83 +2151,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.ControlCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.ControlCommandOrBuilder { @@ -3099,21 +2246,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -3131,7 +2275,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; @@ -3180,20 +2324,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor; + return com.openxc.BinaryMessages.ControlCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.ControlCommand build() { com.openxc.BinaryMessages.ControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -3201,7 +2345,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.ControlCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.ControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.ControlCommand buildPartial() { com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this); int from_bitField0_ = bitField0_; @@ -3270,7 +2424,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.ControlCommand) { return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other); @@ -3279,7 +2433,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) { if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this; if (other.hasType()) { @@ -3309,47 +2463,122 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.ControlCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional .openxc.ControlCommand.Type type = 1; - private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ - public boolean hasType() { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder(); + if (hasDiagnosticRequest()) { + subBuilder.mergeFrom(getDiagnosticRequest()); + } + input.readMessage(subBuilder, extensionRegistry); + setDiagnosticRequest(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder(); + if (hasPassthroughModeRequest()) { + subBuilder.mergeFrom(getPassthroughModeRequest()); + } + input.readMessage(subBuilder, extensionRegistry); + setPassthroughModeRequest(subBuilder.buildPartial()); + break; + } + case 34: { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder(); + if (hasAcceptanceFilterBypassCommand()) { + subBuilder.mergeFrom(getAcceptanceFilterBypassCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setAcceptanceFilterBypassCommand(subBuilder.buildPartial()); + break; + } + case 42: { + com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder(); + if (hasPayloadFormatCommand()) { + subBuilder.mergeFrom(getPayloadFormatCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setPayloadFormatCommand(subBuilder.buildPartial()); + break; + } + case 50: { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder(); + if (hasPredefinedObd2RequestsCommand()) { + subBuilder.mergeFrom(getPredefinedObd2RequestsCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setPredefinedObd2RequestsCommand(subBuilder.buildPartial()); + break; + } + case 58: { + com.openxc.BinaryMessages.ModemConfigurationCommand.Builder subBuilder = com.openxc.BinaryMessages.ModemConfigurationCommand.newBuilder(); + if (hasModemConfigurationCommand()) { + subBuilder.mergeFrom(getModemConfigurationCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setModemConfigurationCommand(subBuilder.buildPartial()); + break; + } + case 66: { + com.openxc.BinaryMessages.RTCConfigurationCommand.Builder subBuilder = com.openxc.BinaryMessages.RTCConfigurationCommand.newBuilder(); + if (hasRtcConfigurationCommand()) { + subBuilder.mergeFrom(getRtcConfigurationCommand()); + } + input.readMessage(subBuilder, extensionRegistry); + setRtcConfigurationCommand(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional .openxc.ControlCommand.Type type = 1; + private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; + public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { if (value == null) { throw new NullPointerException(); @@ -3359,29 +2588,20 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; onChanged(); return this; } - + // optional .openxc.DiagnosticControlCommand diagnostic_request = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> diagnosticRequestBuilder_; - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public boolean hasDiagnosticRequest() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { if (diagnosticRequestBuilder_ == null) { return diagnosticRequest_; @@ -3389,9 +2609,6 @@ public final class BinaryMessages { return diagnosticRequestBuilder_.getMessage(); } } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { if (diagnosticRequestBuilder_ == null) { if (value == null) { @@ -3405,9 +2622,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder setDiagnosticRequest( com.openxc.BinaryMessages.DiagnosticControlCommand.Builder builderForValue) { if (diagnosticRequestBuilder_ == null) { @@ -3419,9 +2633,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { if (diagnosticRequestBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -3438,9 +2649,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public Builder clearDiagnosticRequest() { if (diagnosticRequestBuilder_ == null) { diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); @@ -3451,17 +2659,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Builder getDiagnosticRequestBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDiagnosticRequestFieldBuilder().getBuilder(); } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { if (diagnosticRequestBuilder_ != null) { return diagnosticRequestBuilder_.getMessageOrBuilder(); @@ -3469,9 +2671,6 @@ public final class BinaryMessages { return diagnosticRequest_; } } - /** - * optional .openxc.DiagnosticControlCommand diagnostic_request = 2; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> getDiagnosticRequestFieldBuilder() { @@ -3485,20 +2684,14 @@ public final class BinaryMessages { } return diagnosticRequestBuilder_; } - + // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> passthroughModeRequestBuilder_; - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public boolean hasPassthroughModeRequest() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() { if (passthroughModeRequestBuilder_ == null) { return passthroughModeRequest_; @@ -3506,9 +2699,6 @@ public final class BinaryMessages { return passthroughModeRequestBuilder_.getMessage(); } } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder setPassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { if (passthroughModeRequestBuilder_ == null) { if (value == null) { @@ -3522,9 +2712,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder setPassthroughModeRequest( com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder builderForValue) { if (passthroughModeRequestBuilder_ == null) { @@ -3536,9 +2723,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder mergePassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) { if (passthroughModeRequestBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -3555,9 +2739,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public Builder clearPassthroughModeRequest() { if (passthroughModeRequestBuilder_ == null) { passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); @@ -3568,17 +2749,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder getPassthroughModeRequestBuilder() { bitField0_ |= 0x00000004; onChanged(); return getPassthroughModeRequestFieldBuilder().getBuilder(); } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() { if (passthroughModeRequestBuilder_ != null) { return passthroughModeRequestBuilder_.getMessageOrBuilder(); @@ -3586,9 +2761,6 @@ public final class BinaryMessages { return passthroughModeRequest_; } } - /** - * optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> getPassthroughModeRequestFieldBuilder() { @@ -3602,20 +2774,14 @@ public final class BinaryMessages { } return passthroughModeRequestBuilder_; } - + // optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> acceptanceFilterBypassCommandBuilder_; - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public boolean hasAcceptanceFilterBypassCommand() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getAcceptanceFilterBypassCommand() { if (acceptanceFilterBypassCommandBuilder_ == null) { return acceptanceFilterBypassCommand_; @@ -3623,9 +2789,6 @@ public final class BinaryMessages { return acceptanceFilterBypassCommandBuilder_.getMessage(); } } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder setAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { if (acceptanceFilterBypassCommandBuilder_ == null) { if (value == null) { @@ -3639,9 +2802,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder setAcceptanceFilterBypassCommand( com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder builderForValue) { if (acceptanceFilterBypassCommandBuilder_ == null) { @@ -3653,9 +2813,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder mergeAcceptanceFilterBypassCommand(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand value) { if (acceptanceFilterBypassCommandBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && @@ -3672,9 +2829,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000008; return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public Builder clearAcceptanceFilterBypassCommand() { if (acceptanceFilterBypassCommandBuilder_ == null) { acceptanceFilterBypassCommand_ = com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); @@ -3685,17 +2839,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder getAcceptanceFilterBypassCommandBuilder() { bitField0_ |= 0x00000008; onChanged(); return getAcceptanceFilterBypassCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ public com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder getAcceptanceFilterBypassCommandOrBuilder() { if (acceptanceFilterBypassCommandBuilder_ != null) { return acceptanceFilterBypassCommandBuilder_.getMessageOrBuilder(); @@ -3703,9 +2851,6 @@ public final class BinaryMessages { return acceptanceFilterBypassCommand_; } } - /** - * optional .openxc.AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.AcceptanceFilterBypassCommand, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder, com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder> getAcceptanceFilterBypassCommandFieldBuilder() { @@ -3719,20 +2864,14 @@ public final class BinaryMessages { } return acceptanceFilterBypassCommandBuilder_; } - + // optional .openxc.PayloadFormatCommand payload_format_command = 5; private com.openxc.BinaryMessages.PayloadFormatCommand payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> payloadFormatCommandBuilder_; - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public boolean hasPayloadFormatCommand() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommand getPayloadFormatCommand() { if (payloadFormatCommandBuilder_ == null) { return payloadFormatCommand_; @@ -3740,9 +2879,6 @@ public final class BinaryMessages { return payloadFormatCommandBuilder_.getMessage(); } } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder setPayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { if (payloadFormatCommandBuilder_ == null) { if (value == null) { @@ -3756,9 +2892,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder setPayloadFormatCommand( com.openxc.BinaryMessages.PayloadFormatCommand.Builder builderForValue) { if (payloadFormatCommandBuilder_ == null) { @@ -3770,9 +2903,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder mergePayloadFormatCommand(com.openxc.BinaryMessages.PayloadFormatCommand value) { if (payloadFormatCommandBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && @@ -3789,9 +2919,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000010; return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public Builder clearPayloadFormatCommand() { if (payloadFormatCommandBuilder_ == null) { payloadFormatCommand_ = com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); @@ -3802,17 +2929,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000010); return this; } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommand.Builder getPayloadFormatCommandBuilder() { bitField0_ |= 0x00000010; onChanged(); return getPayloadFormatCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ public com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder getPayloadFormatCommandOrBuilder() { if (payloadFormatCommandBuilder_ != null) { return payloadFormatCommandBuilder_.getMessageOrBuilder(); @@ -3820,9 +2941,6 @@ public final class BinaryMessages { return payloadFormatCommand_; } } - /** - * optional .openxc.PayloadFormatCommand payload_format_command = 5; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PayloadFormatCommand, com.openxc.BinaryMessages.PayloadFormatCommand.Builder, com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder> getPayloadFormatCommandFieldBuilder() { @@ -3836,20 +2954,14 @@ public final class BinaryMessages { } return payloadFormatCommandBuilder_; } - + // optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> predefinedObd2RequestsCommandBuilder_; - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public boolean hasPredefinedObd2RequestsCommand() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getPredefinedObd2RequestsCommand() { if (predefinedObd2RequestsCommandBuilder_ == null) { return predefinedObd2RequestsCommand_; @@ -3857,9 +2969,6 @@ public final class BinaryMessages { return predefinedObd2RequestsCommandBuilder_.getMessage(); } } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder setPredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { if (predefinedObd2RequestsCommandBuilder_ == null) { if (value == null) { @@ -3873,9 +2982,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder setPredefinedObd2RequestsCommand( com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder builderForValue) { if (predefinedObd2RequestsCommandBuilder_ == null) { @@ -3887,9 +2993,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder mergePredefinedObd2RequestsCommand(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand value) { if (predefinedObd2RequestsCommandBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && @@ -3906,9 +3009,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000020; return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public Builder clearPredefinedObd2RequestsCommand() { if (predefinedObd2RequestsCommandBuilder_ == null) { predefinedObd2RequestsCommand_ = com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); @@ -3919,17 +3019,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000020); return this; } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder getPredefinedObd2RequestsCommandBuilder() { bitField0_ |= 0x00000020; onChanged(); return getPredefinedObd2RequestsCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ public com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder getPredefinedObd2RequestsCommandOrBuilder() { if (predefinedObd2RequestsCommandBuilder_ != null) { return predefinedObd2RequestsCommandBuilder_.getMessageOrBuilder(); @@ -3937,9 +3031,6 @@ public final class BinaryMessages { return predefinedObd2RequestsCommand_; } } - /** - * optional .openxc.PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.PredefinedObd2RequestsCommand, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder, com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder> getPredefinedObd2RequestsCommandFieldBuilder() { @@ -3953,20 +3044,14 @@ public final class BinaryMessages { } return predefinedObd2RequestsCommandBuilder_; } - + // optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; private com.openxc.BinaryMessages.ModemConfigurationCommand modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ModemConfigurationCommand, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder, com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder> modemConfigurationCommandBuilder_; - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public boolean hasModemConfigurationCommand() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public com.openxc.BinaryMessages.ModemConfigurationCommand getModemConfigurationCommand() { if (modemConfigurationCommandBuilder_ == null) { return modemConfigurationCommand_; @@ -3974,9 +3059,6 @@ public final class BinaryMessages { return modemConfigurationCommandBuilder_.getMessage(); } } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public Builder setModemConfigurationCommand(com.openxc.BinaryMessages.ModemConfigurationCommand value) { if (modemConfigurationCommandBuilder_ == null) { if (value == null) { @@ -3990,9 +3072,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000040; return this; } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public Builder setModemConfigurationCommand( com.openxc.BinaryMessages.ModemConfigurationCommand.Builder builderForValue) { if (modemConfigurationCommandBuilder_ == null) { @@ -4004,9 +3083,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000040; return this; } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public Builder mergeModemConfigurationCommand(com.openxc.BinaryMessages.ModemConfigurationCommand value) { if (modemConfigurationCommandBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && @@ -4023,9 +3099,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000040; return this; } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public Builder clearModemConfigurationCommand() { if (modemConfigurationCommandBuilder_ == null) { modemConfigurationCommand_ = com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); @@ -4036,17 +3109,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000040); return this; } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public com.openxc.BinaryMessages.ModemConfigurationCommand.Builder getModemConfigurationCommandBuilder() { bitField0_ |= 0x00000040; onChanged(); return getModemConfigurationCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ public com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder getModemConfigurationCommandOrBuilder() { if (modemConfigurationCommandBuilder_ != null) { return modemConfigurationCommandBuilder_.getMessageOrBuilder(); @@ -4054,9 +3121,6 @@ public final class BinaryMessages { return modemConfigurationCommand_; } } - /** - * optional .openxc.ModemConfigurationCommand modem_configuration_command = 7; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ModemConfigurationCommand, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder, com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder> getModemConfigurationCommandFieldBuilder() { @@ -4070,20 +3134,14 @@ public final class BinaryMessages { } return modemConfigurationCommandBuilder_; } - + // optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; private com.openxc.BinaryMessages.RTCConfigurationCommand rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.RTCConfigurationCommand, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder, com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder> rtcConfigurationCommandBuilder_; - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public boolean hasRtcConfigurationCommand() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public com.openxc.BinaryMessages.RTCConfigurationCommand getRtcConfigurationCommand() { if (rtcConfigurationCommandBuilder_ == null) { return rtcConfigurationCommand_; @@ -4091,9 +3149,6 @@ public final class BinaryMessages { return rtcConfigurationCommandBuilder_.getMessage(); } } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public Builder setRtcConfigurationCommand(com.openxc.BinaryMessages.RTCConfigurationCommand value) { if (rtcConfigurationCommandBuilder_ == null) { if (value == null) { @@ -4107,9 +3162,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000080; return this; } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public Builder setRtcConfigurationCommand( com.openxc.BinaryMessages.RTCConfigurationCommand.Builder builderForValue) { if (rtcConfigurationCommandBuilder_ == null) { @@ -4121,9 +3173,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000080; return this; } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public Builder mergeRtcConfigurationCommand(com.openxc.BinaryMessages.RTCConfigurationCommand value) { if (rtcConfigurationCommandBuilder_ == null) { if (((bitField0_ & 0x00000080) == 0x00000080) && @@ -4140,9 +3189,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000080; return this; } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public Builder clearRtcConfigurationCommand() { if (rtcConfigurationCommandBuilder_ == null) { rtcConfigurationCommand_ = com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); @@ -4153,17 +3199,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); return this; } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public com.openxc.BinaryMessages.RTCConfigurationCommand.Builder getRtcConfigurationCommandBuilder() { bitField0_ |= 0x00000080; onChanged(); return getRtcConfigurationCommandFieldBuilder().getBuilder(); } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ public com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder getRtcConfigurationCommandOrBuilder() { if (rtcConfigurationCommandBuilder_ != null) { return rtcConfigurationCommandBuilder_.getMessageOrBuilder(); @@ -4171,9 +3211,6 @@ public final class BinaryMessages { return rtcConfigurationCommand_; } } - /** - * optional .openxc.RTCConfigurationCommand rtc_configuration_command = 8; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.RTCConfigurationCommand, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder, com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder> getRtcConfigurationCommandFieldBuilder() { @@ -4187,186 +3224,70 @@ public final class BinaryMessages { } return rtcConfigurationCommandBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.ControlCommand) } - + static { defaultInstance = new ControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.ControlCommand) } - + public interface DiagnosticControlCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.DiagnosticRequest request = 1; - /** - * optional .openxc.DiagnosticRequest request = 1; - */ boolean hasRequest(); - /** - * optional .openxc.DiagnosticRequest request = 1; - */ com.openxc.BinaryMessages.DiagnosticRequest getRequest(); - /** - * optional .openxc.DiagnosticRequest request = 1; - */ com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder(); - + // optional .openxc.DiagnosticControlCommand.Action action = 2; - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ boolean hasAction(); - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction(); } - /** - * Protobuf type {@code openxc.DiagnosticControlCommand} - */ public static final class DiagnosticControlCommand extends com.google.protobuf.GeneratedMessage implements DiagnosticControlCommandOrBuilder { // Use DiagnosticControlCommand.newBuilder() to construct. - private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private DiagnosticControlCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DiagnosticControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DiagnosticControlCommand(boolean noInit) {} + private static final DiagnosticControlCommand defaultInstance; public static DiagnosticControlCommand getDefaultInstance() { return defaultInstance; } - + public DiagnosticControlCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DiagnosticControlCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = request_.toBuilder(); - } - request_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(request_); - request_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - action_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DiagnosticControlCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnosticControlCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.DiagnosticControlCommand.Action} - */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { - /** - * ADD = 1; - */ ADD(0, 1), - /** - * CANCEL = 2; - */ CANCEL(1, 2), ; - - /** - * ADD = 1; - */ + public static final int ADD_VALUE = 1; - /** - * CANCEL = 2; - */ public static final int CANCEL_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static Action valueOf(int value) { switch (value) { case 1: return ADD; @@ -4374,7 +3295,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -4386,7 +3307,7 @@ public final class BinaryMessages { return Action.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -4399,9 +3320,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor().getEnumTypes().get(0); } - - private static final Action[] VALUES = values(); - + + private static final Action[] VALUES = { + ADD, CANCEL, + }; + public static Action valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -4410,57 +3333,42 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Action(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticControlCommand.Action) } - + private int bitField0_; // optional .openxc.DiagnosticRequest request = 1; public static final int REQUEST_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_; - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public boolean hasRequest() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { return request_; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { return request_; } - + // optional .openxc.DiagnosticControlCommand.Action action = 2; public static final int ACTION_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_; - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public boolean hasAction() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { return action_; } - + private void initFields() { request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; @@ -4469,11 +3377,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -4485,12 +3393,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -4504,83 +3412,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DiagnosticControlCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder { @@ -4588,21 +3507,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4614,7 +3530,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); if (requestBuilder_ == null) { @@ -4627,20 +3543,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor; + return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.DiagnosticControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticControlCommand build() { com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -4648,7 +3564,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DiagnosticControlCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DiagnosticControlCommand buildPartial() { com.openxc.BinaryMessages.DiagnosticControlCommand result = new com.openxc.BinaryMessages.DiagnosticControlCommand(this); int from_bitField0_ = bitField0_; @@ -4669,7 +3595,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticControlCommand) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticControlCommand)other); @@ -4678,7 +3604,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticControlCommand other) { if (other == com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) return this; if (other.hasRequest()) { @@ -4690,43 +3616,67 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(); + if (hasRequest()) { + subBuilder.mergeFrom(getRequest()); + } + input.readMessage(subBuilder, extensionRegistry); + setRequest(subBuilder.buildPartial()); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + action_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + // optional .openxc.DiagnosticRequest request = 1; private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_; - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public boolean hasRequest() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequest getRequest() { if (requestBuilder_ == null) { return request_; @@ -4734,9 +3684,6 @@ public final class BinaryMessages { return requestBuilder_.getMessage(); } } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { if (requestBuilder_ == null) { if (value == null) { @@ -4750,9 +3697,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder setRequest( com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) { if (requestBuilder_ == null) { @@ -4764,9 +3708,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) { if (requestBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -4783,9 +3724,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public Builder clearRequest() { if (requestBuilder_ == null) { request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); @@ -4796,17 +3734,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); return this; } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); return getRequestFieldBuilder().getBuilder(); } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() { if (requestBuilder_ != null) { return requestBuilder_.getMessageOrBuilder(); @@ -4814,9 +3746,6 @@ public final class BinaryMessages { return request_; } } - /** - * optional .openxc.DiagnosticRequest request = 1; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> getRequestFieldBuilder() { @@ -4830,24 +3759,15 @@ public final class BinaryMessages { } return requestBuilder_; } - + // optional .openxc.DiagnosticControlCommand.Action action = 2; private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public boolean hasAction() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() { return action_; } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) { if (value == null) { throw new NullPointerException(); @@ -4857,183 +3777,84 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.DiagnosticControlCommand.Action action = 2; - */ public Builder clearAction() { bitField0_ = (bitField0_ & ~0x00000002); action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand) } - + static { defaultInstance = new DiagnosticControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) } - + public interface PassthroughModeControlCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - + // optional bool enabled = 2; - /** - * optional bool enabled = 2; - */ boolean hasEnabled(); - /** - * optional bool enabled = 2; - */ boolean getEnabled(); } - /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} - */ public static final class PassthroughModeControlCommand extends com.google.protobuf.GeneratedMessage implements PassthroughModeControlCommandOrBuilder { // Use PassthroughModeControlCommand.newBuilder() to construct. - private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private PassthroughModeControlCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private PassthroughModeControlCommand(boolean noInit) {} + private static final PassthroughModeControlCommand defaultInstance; public static PassthroughModeControlCommand getDefaultInstance() { return defaultInstance; } - + public PassthroughModeControlCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PassthroughModeControlCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - enabled_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PassthroughModeControlCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PassthroughModeControlCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + // optional bool enabled = 2; public static final int ENABLED_FIELD_NUMBER = 2; private boolean enabled_; - /** - * optional bool enabled = 2; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool enabled = 2; - */ public boolean getEnabled() { return enabled_; } - + private void initFields() { bus_ = 0; enabled_ = false; @@ -5042,11 +3863,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5058,12 +3879,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5077,83 +3898,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.PassthroughModeControlCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder { @@ -5161,21 +3993,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5186,7 +4015,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -5195,20 +4024,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor; + return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PassthroughModeControlCommand build() { com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); if (!result.isInitialized()) { @@ -5216,7 +4045,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.PassthroughModeControlCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() { com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this); int from_bitField0_ = bitField0_; @@ -5233,7 +4072,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) { return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other); @@ -5242,7 +4081,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) { if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this; if (other.hasBus()) { @@ -5254,263 +4093,163 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + enabled_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional bool enabled = 2; private boolean enabled_ ; - /** - * optional bool enabled = 2; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool enabled = 2; - */ public boolean getEnabled() { return enabled_; } - /** - * optional bool enabled = 2; - */ public Builder setEnabled(boolean value) { bitField0_ |= 0x00000002; enabled_ = value; onChanged(); return this; } - /** - * optional bool enabled = 2; - */ public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000002); enabled_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand) } - + static { defaultInstance = new PassthroughModeControlCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) } - + public interface AcceptanceFilterBypassCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - + // optional bool bypass = 2; - /** - * optional bool bypass = 2; - */ boolean hasBypass(); - /** - * optional bool bypass = 2; - */ boolean getBypass(); } - /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} - */ public static final class AcceptanceFilterBypassCommand extends com.google.protobuf.GeneratedMessage implements AcceptanceFilterBypassCommandOrBuilder { // Use AcceptanceFilterBypassCommand.newBuilder() to construct. - private AcceptanceFilterBypassCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private AcceptanceFilterBypassCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private AcceptanceFilterBypassCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private AcceptanceFilterBypassCommand(boolean noInit) {} + private static final AcceptanceFilterBypassCommand defaultInstance; public static AcceptanceFilterBypassCommand getDefaultInstance() { return defaultInstance; } - + public AcceptanceFilterBypassCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AcceptanceFilterBypassCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - bypass_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public AcceptanceFilterBypassCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceptanceFilterBypassCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + // optional bool bypass = 2; public static final int BYPASS_FIELD_NUMBER = 2; private boolean bypass_; - /** - * optional bool bypass = 2; - */ public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool bypass = 2; - */ public boolean getBypass() { return bypass_; } - + private void initFields() { bus_ = 0; bypass_ = false; @@ -5519,11 +4258,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5535,12 +4274,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5554,83 +4293,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.AcceptanceFilterBypassCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.AcceptanceFilterBypassCommandOrBuilder { @@ -5638,21 +4388,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5663,7 +4410,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -5672,20 +4419,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_AcceptanceFilterBypassCommand_descriptor; + return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand build() { com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); if (!result.isInitialized()) { @@ -5693,7 +4440,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.AcceptanceFilterBypassCommand buildPartial() { com.openxc.BinaryMessages.AcceptanceFilterBypassCommand result = new com.openxc.BinaryMessages.AcceptanceFilterBypassCommand(this); int from_bitField0_ = bitField0_; @@ -5710,7 +4467,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) { return mergeFrom((com.openxc.BinaryMessages.AcceptanceFilterBypassCommand)other); @@ -5719,7 +4476,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand other) { if (other == com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.getDefaultInstance()) return this; if (other.hasBus()) { @@ -5731,256 +4488,152 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.AcceptanceFilterBypassCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.AcceptanceFilterBypassCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + bypass_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional bool bypass = 2; private boolean bypass_ ; - /** - * optional bool bypass = 2; - */ public boolean hasBypass() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional bool bypass = 2; - */ public boolean getBypass() { return bypass_; } - /** - * optional bool bypass = 2; - */ public Builder setBypass(boolean value) { bitField0_ |= 0x00000002; bypass_ = value; onChanged(); return this; } - /** - * optional bool bypass = 2; - */ public Builder clearBypass() { bitField0_ = (bitField0_ & ~0x00000002); bypass_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.AcceptanceFilterBypassCommand) } - + static { defaultInstance = new AcceptanceFilterBypassCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) } - + public interface PayloadFormatCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ boolean hasFormat(); - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat(); } - /** - * Protobuf type {@code openxc.PayloadFormatCommand} - */ public static final class PayloadFormatCommand extends com.google.protobuf.GeneratedMessage implements PayloadFormatCommandOrBuilder { // Use PayloadFormatCommand.newBuilder() to construct. - private PayloadFormatCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private PayloadFormatCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private PayloadFormatCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private PayloadFormatCommand(boolean noInit) {} + private static final PayloadFormatCommand defaultInstance; public static PayloadFormatCommand getDefaultInstance() { return defaultInstance; } - + public PayloadFormatCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PayloadFormatCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - format_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PayloadFormatCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PayloadFormatCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code openxc.PayloadFormatCommand.PayloadFormat} - */ + public enum PayloadFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * JSON = 1; - */ JSON(0, 1), - /** - * PROTOBUF = 2; - */ PROTOBUF(1, 2), - /** - * MESSAGEPACK = 3; - */ MESSAGEPACK(2, 3), ; - - /** - * JSON = 1; - */ + public static final int JSON_VALUE = 1; - /** - * PROTOBUF = 2; - */ public static final int PROTOBUF_VALUE = 2; - /** - * MESSAGEPACK = 3; - */ public static final int MESSAGEPACK_VALUE = 3; - - + + public final int getNumber() { return value; } - + public static PayloadFormat valueOf(int value) { switch (value) { case 1: return JSON; @@ -5989,7 +4642,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -6001,7 +4654,7 @@ public final class BinaryMessages { return PayloadFormat.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -6014,9 +4667,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor().getEnumTypes().get(0); } - - private static final PayloadFormat[] VALUES = values(); - + + private static final PayloadFormat[] VALUES = { + JSON, PROTOBUF, MESSAGEPACK, + }; + public static PayloadFormat valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -6025,35 +4680,29 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private PayloadFormat(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.PayloadFormatCommand.PayloadFormat) } - + private int bitField0_; // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; public static final int FORMAT_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_; - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } - + private void initFields() { format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; } @@ -6061,11 +4710,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -6074,12 +4723,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6089,83 +4738,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PayloadFormatCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PayloadFormatCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PayloadFormatCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.PayloadFormatCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.PayloadFormatCommandOrBuilder { @@ -6173,21 +4833,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PayloadFormatCommand.class, com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.PayloadFormatCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6198,27 +4855,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PayloadFormatCommand_descriptor; + return com.openxc.BinaryMessages.PayloadFormatCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.PayloadFormatCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PayloadFormatCommand build() { com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); if (!result.isInitialized()) { @@ -6226,7 +4883,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.PayloadFormatCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.PayloadFormatCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.PayloadFormatCommand buildPartial() { com.openxc.BinaryMessages.PayloadFormatCommand result = new com.openxc.BinaryMessages.PayloadFormatCommand(this); int from_bitField0_ = bitField0_; @@ -6239,7 +4906,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PayloadFormatCommand) { return mergeFrom((com.openxc.BinaryMessages.PayloadFormatCommand)other); @@ -6248,7 +4915,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PayloadFormatCommand other) { if (other == com.openxc.BinaryMessages.PayloadFormatCommand.getDefaultInstance()) return this; if (other.hasFormat()) { @@ -6257,47 +4924,59 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PayloadFormatCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PayloadFormatCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + format_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; private com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public boolean hasFormat() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat getFormat() { return format_; } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public Builder setFormat(com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat value) { if (value == null) { throw new NullPointerException(); @@ -6307,152 +4986,70 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.PayloadFormatCommand.PayloadFormat format = 1; - */ public Builder clearFormat() { bitField0_ = (bitField0_ & ~0x00000001); format_ = com.openxc.BinaryMessages.PayloadFormatCommand.PayloadFormat.JSON; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PayloadFormatCommand) } - + static { defaultInstance = new PayloadFormatCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) } - + public interface PredefinedObd2RequestsCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional bool enabled = 1; - /** - * optional bool enabled = 1; - */ boolean hasEnabled(); - /** - * optional bool enabled = 1; - */ boolean getEnabled(); } - /** - * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} - */ public static final class PredefinedObd2RequestsCommand extends com.google.protobuf.GeneratedMessage implements PredefinedObd2RequestsCommandOrBuilder { // Use PredefinedObd2RequestsCommand.newBuilder() to construct. - private PredefinedObd2RequestsCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private PredefinedObd2RequestsCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private PredefinedObd2RequestsCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private PredefinedObd2RequestsCommand(boolean noInit) {} + private static final PredefinedObd2RequestsCommand defaultInstance; public static PredefinedObd2RequestsCommand getDefaultInstance() { return defaultInstance; } - + public PredefinedObd2RequestsCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PredefinedObd2RequestsCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - enabled_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PredefinedObd2RequestsCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PredefinedObd2RequestsCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; } - + private int bitField0_; // optional bool enabled = 1; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_; - /** - * optional bool enabled = 1; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional bool enabled = 1; - */ public boolean getEnabled() { return enabled_; } - + private void initFields() { enabled_ = false; } @@ -6460,11 +5057,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -6473,12 +5070,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6488,83 +5085,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.PredefinedObd2RequestsCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.PredefinedObd2RequestsCommandOrBuilder { @@ -6572,21 +5180,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6597,27 +5202,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); enabled_ = false; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_PredefinedObd2RequestsCommand_descriptor; + return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand build() { com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); if (!result.isInitialized()) { @@ -6625,7 +5230,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.PredefinedObd2RequestsCommand buildPartial() { com.openxc.BinaryMessages.PredefinedObd2RequestsCommand result = new com.openxc.BinaryMessages.PredefinedObd2RequestsCommand(this); int from_bitField0_ = bitField0_; @@ -6638,7 +5253,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) { return mergeFrom((com.openxc.BinaryMessages.PredefinedObd2RequestsCommand)other); @@ -6647,7 +5262,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand other) { if (other == com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.getDefaultInstance()) return this; if (other.hasEnabled()) { @@ -6656,281 +5271,139 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.PredefinedObd2RequestsCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.PredefinedObd2RequestsCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + enabled_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + // optional bool enabled = 1; private boolean enabled_ ; - /** - * optional bool enabled = 1; - */ public boolean hasEnabled() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional bool enabled = 1; - */ public boolean getEnabled() { return enabled_; } - /** - * optional bool enabled = 1; - */ public Builder setEnabled(boolean value) { bitField0_ |= 0x00000001; enabled_ = value; onChanged(); return this; } - /** - * optional bool enabled = 1; - */ public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000001); enabled_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.PredefinedObd2RequestsCommand) } - + static { defaultInstance = new PredefinedObd2RequestsCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) } - + public interface NetworkOperatorSettingsOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional bool allowDataRoaming = 1; - /** - * optional bool allowDataRoaming = 1; - */ boolean hasAllowDataRoaming(); - /** - * optional bool allowDataRoaming = 1; - */ boolean getAllowDataRoaming(); - + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ boolean hasOperatorSelectMode(); - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode(); - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ boolean hasNetworkDescriptor(); - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor(); - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder(); } - /** - * Protobuf type {@code openxc.NetworkOperatorSettings} - */ public static final class NetworkOperatorSettings extends com.google.protobuf.GeneratedMessage implements NetworkOperatorSettingsOrBuilder { // Use NetworkOperatorSettings.newBuilder() to construct. - private NetworkOperatorSettings(com.google.protobuf.GeneratedMessage.Builder builder) { + private NetworkOperatorSettings(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private NetworkOperatorSettings(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private NetworkOperatorSettings(boolean noInit) {} + private static final NetworkOperatorSettings defaultInstance; public static NetworkOperatorSettings getDefaultInstance() { return defaultInstance; } - + public NetworkOperatorSettings getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NetworkOperatorSettings( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - allowDataRoaming_ = input.readBool(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - operatorSelectMode_ = value; - } - break; - } - case 26: { - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = networkDescriptor_.toBuilder(); - } - networkDescriptor_ = input.readMessage(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkDescriptor_); - networkDescriptor_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NetworkOperatorSettings.class, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public NetworkOperatorSettings parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkOperatorSettings(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.NetworkOperatorSettings.OperatorSelectMode} - */ + public enum OperatorSelectMode implements com.google.protobuf.ProtocolMessageEnum { - /** - * AUTOMATIC = 0; - */ AUTOMATIC(0, 0), - /** - * MANUAL = 1; - */ MANUAL(1, 1), - /** - * DEREGISTER = 2; - */ DEREGISTER(2, 2), - /** - * SET_ONLY = 3; - */ SET_ONLY(3, 3), - /** - * MANUAL_AUTOMATIC = 4; - */ MANUAL_AUTOMATIC(4, 4), ; - - /** - * AUTOMATIC = 0; - */ + public static final int AUTOMATIC_VALUE = 0; - /** - * MANUAL = 1; - */ public static final int MANUAL_VALUE = 1; - /** - * DEREGISTER = 2; - */ public static final int DEREGISTER_VALUE = 2; - /** - * SET_ONLY = 3; - */ public static final int SET_ONLY_VALUE = 3; - /** - * MANUAL_AUTOMATIC = 4; - */ public static final int MANUAL_AUTOMATIC_VALUE = 4; - - + + public final int getNumber() { return value; } - + public static OperatorSelectMode valueOf(int value) { switch (value) { case 0: return AUTOMATIC; @@ -6941,7 +5414,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -6953,7 +5426,7 @@ public final class BinaryMessages { return OperatorSelectMode.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -6966,9 +5439,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.NetworkOperatorSettings.getDescriptor().getEnumTypes().get(0); } - - private static final OperatorSelectMode[] VALUES = values(); - + + private static final OperatorSelectMode[] VALUES = { + AUTOMATIC, MANUAL, DEREGISTER, SET_ONLY, MANUAL_AUTOMATIC, + }; + public static OperatorSelectMode valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -6977,174 +5452,69 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private OperatorSelectMode(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.NetworkOperatorSettings.OperatorSelectMode) } - + public interface NetworkDescriptorOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional uint32 PLMN = 1; - /** - * optional uint32 PLMN = 1; - */ boolean hasPLMN(); - /** - * optional uint32 PLMN = 1; - */ int getPLMN(); - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ boolean hasNetworkType(); - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType(); } - /** - * Protobuf type {@code openxc.NetworkOperatorSettings.NetworkDescriptor} - */ public static final class NetworkDescriptor extends com.google.protobuf.GeneratedMessage implements NetworkDescriptorOrBuilder { // Use NetworkDescriptor.newBuilder() to construct. - private NetworkDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { + private NetworkDescriptor(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private NetworkDescriptor(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private NetworkDescriptor(boolean noInit) {} + private static final NetworkDescriptor defaultInstance; public static NetworkDescriptor getDefaultInstance() { return defaultInstance; } - + public NetworkDescriptor getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NetworkDescriptor( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - pLMN_ = input.readUInt32(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - networkType_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.class, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public NetworkDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkDescriptor(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType} - */ + public enum NetworkType implements com.google.protobuf.ProtocolMessageEnum { - /** - * GSM = 0; - */ GSM(0, 0), - /** - * UTRAN = 2; - */ UTRAN(1, 2), ; - - /** - * GSM = 0; - */ + public static final int GSM_VALUE = 0; - /** - * UTRAN = 2; - */ public static final int UTRAN_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static NetworkType valueOf(int value) { switch (value) { case 0: return GSM; @@ -7152,7 +5522,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -7164,7 +5534,7 @@ public final class BinaryMessages { return NetworkType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -7177,9 +5547,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDescriptor().getEnumTypes().get(0); } - - private static final NetworkType[] VALUES = values(); - + + private static final NetworkType[] VALUES = { + GSM, UTRAN, + }; + public static NetworkType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -7188,51 +5560,39 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private NetworkType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType) } - + private int bitField0_; // optional uint32 PLMN = 1; public static final int PLMN_FIELD_NUMBER = 1; private int pLMN_; - /** - * optional uint32 PLMN = 1; - */ public boolean hasPLMN() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional uint32 PLMN = 1; - */ public int getPLMN() { return pLMN_; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; public static final int NETWORKTYPE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType_; - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ public boolean hasNetworkType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType() { return networkType_; } - + private void initFields() { pLMN_ = 0; networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; @@ -7241,11 +5601,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -7257,12 +5617,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -7276,83 +5636,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.NetworkOperatorSettings.NetworkDescriptor} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder { @@ -7360,21 +5731,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.class, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -7385,7 +5753,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); pLMN_ = 0; @@ -7394,20 +5762,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor; + return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDescriptor(); } - + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getDefaultInstanceForType() { return com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); } - + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor build() { com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = buildPartial(); if (!result.isInitialized()) { @@ -7415,7 +5783,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor buildPartial() { com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor result = new com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor(this); int from_bitField0_ = bitField0_; @@ -7432,7 +5810,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor) { return mergeFrom((com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor)other); @@ -7441,7 +5819,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor other) { if (other == com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance()) return this; if (other.hasPLMN()) { @@ -7453,80 +5831,85 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + pLMN_ = input.readUInt32(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + networkType_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + // optional uint32 PLMN = 1; private int pLMN_ ; - /** - * optional uint32 PLMN = 1; - */ public boolean hasPLMN() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional uint32 PLMN = 1; - */ public int getPLMN() { return pLMN_; } - /** - * optional uint32 PLMN = 1; - */ public Builder setPLMN(int value) { bitField0_ |= 0x00000001; pLMN_ = value; onChanged(); return this; } - /** - * optional uint32 PLMN = 1; - */ public Builder clearPLMN() { bitField0_ = (bitField0_ & ~0x00000001); pLMN_ = 0; onChanged(); return this; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ public boolean hasNetworkType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType getNetworkType() { return networkType_; } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ public Builder setNetworkType(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType value) { if (value == null) { throw new NullPointerException(); @@ -7536,82 +5919,58 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType networkType = 2; - */ public Builder clearNetworkType() { bitField0_ = (bitField0_ & ~0x00000002); networkType_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.NetworkType.GSM; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) } - + static { defaultInstance = new NetworkDescriptor(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) } - + private int bitField0_; // optional bool allowDataRoaming = 1; public static final int ALLOWDATAROAMING_FIELD_NUMBER = 1; private boolean allowDataRoaming_; - /** - * optional bool allowDataRoaming = 1; - */ public boolean hasAllowDataRoaming() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional bool allowDataRoaming = 1; - */ public boolean getAllowDataRoaming() { return allowDataRoaming_; } - + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; public static final int OPERATORSELECTMODE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode_; - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ public boolean hasOperatorSelectMode() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode() { return operatorSelectMode_; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; public static final int NETWORKDESCRIPTOR_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor networkDescriptor_; - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public boolean hasNetworkDescriptor() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor() { return networkDescriptor_; } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder() { return networkDescriptor_; } - + private void initFields() { allowDataRoaming_ = false; operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; @@ -7621,11 +5980,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -7640,12 +5999,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -7663,83 +6022,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.NetworkOperatorSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.NetworkOperatorSettings prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.NetworkOperatorSettings} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder { @@ -7747,21 +6117,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NetworkOperatorSettings.class, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.NetworkOperatorSettings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -7773,7 +6140,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); allowDataRoaming_ = false; @@ -7788,20 +6155,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkOperatorSettings_descriptor; + return com.openxc.BinaryMessages.NetworkOperatorSettings.getDescriptor(); } - + public com.openxc.BinaryMessages.NetworkOperatorSettings getDefaultInstanceForType() { return com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); } - + public com.openxc.BinaryMessages.NetworkOperatorSettings build() { com.openxc.BinaryMessages.NetworkOperatorSettings result = buildPartial(); if (!result.isInitialized()) { @@ -7809,7 +6176,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.NetworkOperatorSettings buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.NetworkOperatorSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.NetworkOperatorSettings buildPartial() { com.openxc.BinaryMessages.NetworkOperatorSettings result = new com.openxc.BinaryMessages.NetworkOperatorSettings(this); int from_bitField0_ = bitField0_; @@ -7834,7 +6211,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.NetworkOperatorSettings) { return mergeFrom((com.openxc.BinaryMessages.NetworkOperatorSettings)other); @@ -7843,7 +6220,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkOperatorSettings other) { if (other == com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance()) return this; if (other.hasAllowDataRoaming()) { @@ -7858,80 +6235,94 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.NetworkOperatorSettings parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.NetworkOperatorSettings) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + allowDataRoaming_ = input.readBool(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + operatorSelectMode_ = value; + } + break; + } + case 26: { + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder subBuilder = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.newBuilder(); + if (hasNetworkDescriptor()) { + subBuilder.mergeFrom(getNetworkDescriptor()); + } + input.readMessage(subBuilder, extensionRegistry); + setNetworkDescriptor(subBuilder.buildPartial()); + break; + } } } - return this; } + private int bitField0_; - + // optional bool allowDataRoaming = 1; private boolean allowDataRoaming_ ; - /** - * optional bool allowDataRoaming = 1; - */ public boolean hasAllowDataRoaming() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional bool allowDataRoaming = 1; - */ public boolean getAllowDataRoaming() { return allowDataRoaming_; } - /** - * optional bool allowDataRoaming = 1; - */ public Builder setAllowDataRoaming(boolean value) { bitField0_ |= 0x00000001; allowDataRoaming_ = value; onChanged(); return this; } - /** - * optional bool allowDataRoaming = 1; - */ public Builder clearAllowDataRoaming() { bitField0_ = (bitField0_ & ~0x00000001); allowDataRoaming_ = false; onChanged(); return this; } - + // optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; private com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ public boolean hasOperatorSelectMode() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode getOperatorSelectMode() { return operatorSelectMode_; } - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ public Builder setOperatorSelectMode(com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode value) { if (value == null) { throw new NullPointerException(); @@ -7941,29 +6332,20 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.NetworkOperatorSettings.OperatorSelectMode operatorSelectMode = 2; - */ public Builder clearOperatorSelectMode() { bitField0_ = (bitField0_ & ~0x00000002); operatorSelectMode_ = com.openxc.BinaryMessages.NetworkOperatorSettings.OperatorSelectMode.AUTOMATIC; onChanged(); return this; } - + // optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; private com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder> networkDescriptorBuilder_; - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public boolean hasNetworkDescriptor() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor getNetworkDescriptor() { if (networkDescriptorBuilder_ == null) { return networkDescriptor_; @@ -7971,9 +6353,6 @@ public final class BinaryMessages { return networkDescriptorBuilder_.getMessage(); } } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public Builder setNetworkDescriptor(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor value) { if (networkDescriptorBuilder_ == null) { if (value == null) { @@ -7987,9 +6366,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public Builder setNetworkDescriptor( com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder builderForValue) { if (networkDescriptorBuilder_ == null) { @@ -8001,9 +6377,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public Builder mergeNetworkDescriptor(com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor value) { if (networkDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -8020,9 +6393,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public Builder clearNetworkDescriptor() { if (networkDescriptorBuilder_ == null) { networkDescriptor_ = com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.getDefaultInstance(); @@ -8033,17 +6403,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder getNetworkDescriptorBuilder() { bitField0_ |= 0x00000004; onChanged(); return getNetworkDescriptorFieldBuilder().getBuilder(); } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder getNetworkDescriptorOrBuilder() { if (networkDescriptorBuilder_ != null) { return networkDescriptorBuilder_.getMessageOrBuilder(); @@ -8051,9 +6415,6 @@ public final class BinaryMessages { return networkDescriptor_; } } - /** - * optional .openxc.NetworkOperatorSettings.NetworkDescriptor networkDescriptor = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder, com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptorOrBuilder> getNetworkDescriptorFieldBuilder() { @@ -8067,175 +6428,86 @@ public final class BinaryMessages { } return networkDescriptorBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.NetworkOperatorSettings) } - + static { defaultInstance = new NetworkOperatorSettings(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings) } - + public interface NetworkDataSettingsOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional string APN = 1; - /** - * optional string APN = 1; - */ boolean hasAPN(); - /** - * optional string APN = 1; - */ - java.lang.String getAPN(); - /** - * optional string APN = 1; - */ - com.google.protobuf.ByteString - getAPNBytes(); + String getAPN(); } - /** - * Protobuf type {@code openxc.NetworkDataSettings} - */ public static final class NetworkDataSettings extends com.google.protobuf.GeneratedMessage implements NetworkDataSettingsOrBuilder { // Use NetworkDataSettings.newBuilder() to construct. - private NetworkDataSettings(com.google.protobuf.GeneratedMessage.Builder builder) { + private NetworkDataSettings(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private NetworkDataSettings(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private NetworkDataSettings(boolean noInit) {} + private static final NetworkDataSettings defaultInstance; public static NetworkDataSettings getDefaultInstance() { return defaultInstance; } - + public NetworkDataSettings getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NetworkDataSettings( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - aPN_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NetworkDataSettings.class, com.openxc.BinaryMessages.NetworkDataSettings.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public NetworkDataSettings parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkDataSettings(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; } - + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable; + } + private int bitField0_; // optional string APN = 1; public static final int APN_FIELD_NUMBER = 1; private java.lang.Object aPN_; - /** - * optional string APN = 1; - */ public boolean hasAPN() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string APN = 1; - */ - public java.lang.String getAPN() { + public String getAPN() { java.lang.Object ref = aPN_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { aPN_ = s; } return s; } } - /** - * optional string APN = 1; - */ - public com.google.protobuf.ByteString - getAPNBytes() { + private com.google.protobuf.ByteString getAPNBytes() { java.lang.Object ref = aPN_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); aPN_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { aPN_ = ""; } @@ -8243,11 +6515,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -8256,12 +6528,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -8271,83 +6543,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.NetworkDataSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.NetworkDataSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.NetworkDataSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.NetworkDataSettings prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.NetworkDataSettings} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder { @@ -8355,21 +6638,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.NetworkDataSettings.class, com.openxc.BinaryMessages.NetworkDataSettings.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.NetworkDataSettings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -8380,27 +6660,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); aPN_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_NetworkDataSettings_descriptor; + return com.openxc.BinaryMessages.NetworkDataSettings.getDescriptor(); } - + public com.openxc.BinaryMessages.NetworkDataSettings getDefaultInstanceForType() { return com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); } - + public com.openxc.BinaryMessages.NetworkDataSettings build() { com.openxc.BinaryMessages.NetworkDataSettings result = buildPartial(); if (!result.isInitialized()) { @@ -8408,7 +6688,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.NetworkDataSettings buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.NetworkDataSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.NetworkDataSettings buildPartial() { com.openxc.BinaryMessages.NetworkDataSettings result = new com.openxc.BinaryMessages.NetworkDataSettings(this); int from_bitField0_ = bitField0_; @@ -8421,7 +6711,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.NetworkDataSettings) { return mergeFrom((com.openxc.BinaryMessages.NetworkDataSettings)other); @@ -8430,84 +6720,70 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.NetworkDataSettings other) { if (other == com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance()) return this; if (other.hasAPN()) { - bitField0_ |= 0x00000001; - aPN_ = other.aPN_; - onChanged(); + setAPN(other.getAPN()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.NetworkDataSettings parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.NetworkDataSettings) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + aPN_ = input.readBytes(); + break; + } } } - return this; } + private int bitField0_; - + // optional string APN = 1; private java.lang.Object aPN_ = ""; - /** - * optional string APN = 1; - */ public boolean hasAPN() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string APN = 1; - */ - public java.lang.String getAPN() { + public String getAPN() { java.lang.Object ref = aPN_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); aPN_ = s; return s; } else { - return (java.lang.String) ref; - } - } - /** - * optional string APN = 1; - */ - public com.google.protobuf.ByteString - getAPNBytes() { - java.lang.Object ref = aPN_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - aPN_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + return (String) ref; } } - /** - * optional string APN = 1; - */ - public Builder setAPN( - java.lang.String value) { + public Builder setAPN(String value) { if (value == null) { throw new NullPointerException(); } @@ -8516,228 +6792,111 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string APN = 1; - */ public Builder clearAPN() { bitField0_ = (bitField0_ & ~0x00000001); aPN_ = getDefaultInstance().getAPN(); onChanged(); return this; } - /** - * optional string APN = 1; - */ - public Builder setAPNBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + void setAPN(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; aPN_ = value; onChanged(); - return this; } - + // @@protoc_insertion_point(builder_scope:openxc.NetworkDataSettings) } - + static { defaultInstance = new NetworkDataSettings(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.NetworkDataSettings) } - + public interface ServerConnectSettingsOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional string host = 1; - /** - * optional string host = 1; - */ boolean hasHost(); - /** - * optional string host = 1; - */ - java.lang.String getHost(); - /** - * optional string host = 1; - */ - com.google.protobuf.ByteString - getHostBytes(); - + String getHost(); + // optional uint32 port = 2; - /** - * optional uint32 port = 2; - */ boolean hasPort(); - /** - * optional uint32 port = 2; - */ int getPort(); } - /** - * Protobuf type {@code openxc.ServerConnectSettings} - */ public static final class ServerConnectSettings extends com.google.protobuf.GeneratedMessage implements ServerConnectSettingsOrBuilder { // Use ServerConnectSettings.newBuilder() to construct. - private ServerConnectSettings(com.google.protobuf.GeneratedMessage.Builder builder) { + private ServerConnectSettings(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private ServerConnectSettings(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private ServerConnectSettings(boolean noInit) {} + private static final ServerConnectSettings defaultInstance; public static ServerConnectSettings getDefaultInstance() { return defaultInstance; } - + public ServerConnectSettings getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ServerConnectSettings( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - host_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - port_ = input.readUInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ServerConnectSettings.class, com.openxc.BinaryMessages.ServerConnectSettings.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ServerConnectSettings parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ServerConnectSettings(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable; } - + private int bitField0_; // optional string host = 1; public static final int HOST_FIELD_NUMBER = 1; private java.lang.Object host_; - /** - * optional string host = 1; - */ public boolean hasHost() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string host = 1; - */ - public java.lang.String getHost() { + public String getHost() { java.lang.Object ref = host_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { host_ = s; } return s; } } - /** - * optional string host = 1; - */ - public com.google.protobuf.ByteString - getHostBytes() { + private com.google.protobuf.ByteString getHostBytes() { java.lang.Object ref = host_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); host_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional uint32 port = 2; public static final int PORT_FIELD_NUMBER = 2; private int port_; - /** - * optional uint32 port = 2; - */ public boolean hasPort() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 port = 2; - */ public int getPort() { return port_; } - + private void initFields() { host_ = ""; port_ = 0; @@ -8746,11 +6905,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -8762,12 +6921,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -8781,83 +6940,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ServerConnectSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ServerConnectSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ServerConnectSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.ServerConnectSettings prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.ServerConnectSettings} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder { @@ -8865,21 +7035,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ServerConnectSettings.class, com.openxc.BinaryMessages.ServerConnectSettings.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.ServerConnectSettings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -8890,7 +7057,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); host_ = ""; @@ -8899,20 +7066,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_ServerConnectSettings_descriptor; + return com.openxc.BinaryMessages.ServerConnectSettings.getDescriptor(); } - + public com.openxc.BinaryMessages.ServerConnectSettings getDefaultInstanceForType() { return com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); } - + public com.openxc.BinaryMessages.ServerConnectSettings build() { com.openxc.BinaryMessages.ServerConnectSettings result = buildPartial(); if (!result.isInitialized()) { @@ -8920,7 +7087,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.ServerConnectSettings buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.ServerConnectSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.ServerConnectSettings buildPartial() { com.openxc.BinaryMessages.ServerConnectSettings result = new com.openxc.BinaryMessages.ServerConnectSettings(this); int from_bitField0_ = bitField0_; @@ -8937,7 +7114,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.ServerConnectSettings) { return mergeFrom((com.openxc.BinaryMessages.ServerConnectSettings)other); @@ -8946,13 +7123,11 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.ServerConnectSettings other) { if (other == com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance()) return this; if (other.hasHost()) { - bitField0_ |= 0x00000001; - host_ = other.host_; - onChanged(); + setHost(other.getHost()); } if (other.hasPort()) { setPort(other.getPort()); @@ -8960,73 +7135,66 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.ServerConnectSettings parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.ServerConnectSettings) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + host_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + port_ = input.readUInt32(); + break; + } } } - return this; } + private int bitField0_; - + // optional string host = 1; private java.lang.Object host_ = ""; - /** - * optional string host = 1; - */ public boolean hasHost() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string host = 1; - */ - public java.lang.String getHost() { + public String getHost() { java.lang.Object ref = host_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); host_ = s; return s; } else { - return (java.lang.String) ref; + return (String) ref; } } - /** - * optional string host = 1; - */ - public com.google.protobuf.ByteString - getHostBytes() { - java.lang.Object ref = host_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - host_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string host = 1; - */ - public Builder setHost( - java.lang.String value) { + public Builder setHost(String value) { if (value == null) { throw new NullPointerException(); } @@ -9035,314 +7203,136 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string host = 1; - */ public Builder clearHost() { bitField0_ = (bitField0_ & ~0x00000001); host_ = getDefaultInstance().getHost(); onChanged(); return this; } - /** - * optional string host = 1; - */ - public Builder setHostBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + void setHost(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; host_ = value; onChanged(); - return this; } - + // optional uint32 port = 2; private int port_ ; - /** - * optional uint32 port = 2; - */ public boolean hasPort() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 port = 2; - */ public int getPort() { return port_; } - /** - * optional uint32 port = 2; - */ public Builder setPort(int value) { bitField0_ |= 0x00000002; port_ = value; onChanged(); return this; } - /** - * optional uint32 port = 2; - */ public Builder clearPort() { bitField0_ = (bitField0_ & ~0x00000002); port_ = 0; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.ServerConnectSettings) } - + static { defaultInstance = new ServerConnectSettings(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.ServerConnectSettings) } - + public interface ModemConfigurationCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ boolean hasNetworkOperatorSettings(); - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings(); - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder(); - + // optional .openxc.NetworkDataSettings networkDataSettings = 2; - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ boolean hasNetworkDataSettings(); - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings(); - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder(); - + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ boolean hasServerConnectSettings(); - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings(); - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder(); } - /** - * Protobuf type {@code openxc.ModemConfigurationCommand} - */ public static final class ModemConfigurationCommand extends com.google.protobuf.GeneratedMessage implements ModemConfigurationCommandOrBuilder { // Use ModemConfigurationCommand.newBuilder() to construct. - private ModemConfigurationCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private ModemConfigurationCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private ModemConfigurationCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private ModemConfigurationCommand(boolean noInit) {} + private static final ModemConfigurationCommand defaultInstance; public static ModemConfigurationCommand getDefaultInstance() { return defaultInstance; } - + public ModemConfigurationCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ModemConfigurationCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.openxc.BinaryMessages.NetworkOperatorSettings.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = networkOperatorSettings_.toBuilder(); - } - networkOperatorSettings_ = input.readMessage(com.openxc.BinaryMessages.NetworkOperatorSettings.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkOperatorSettings_); - networkOperatorSettings_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 18: { - com.openxc.BinaryMessages.NetworkDataSettings.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = networkDataSettings_.toBuilder(); - } - networkDataSettings_ = input.readMessage(com.openxc.BinaryMessages.NetworkDataSettings.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkDataSettings_); - networkDataSettings_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.openxc.BinaryMessages.ServerConnectSettings.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = serverConnectSettings_.toBuilder(); - } - serverConnectSettings_ = input.readMessage(com.openxc.BinaryMessages.ServerConnectSettings.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serverConnectSettings_); - serverConnectSettings_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ModemConfigurationCommand.class, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ModemConfigurationCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ModemConfigurationCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; } - + private int bitField0_; // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; public static final int NETWORKOPERATORSETTINGS_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.NetworkOperatorSettings networkOperatorSettings_; - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public boolean hasNetworkOperatorSettings() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings() { return networkOperatorSettings_; } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder() { return networkOperatorSettings_; } - + // optional .openxc.NetworkDataSettings networkDataSettings = 2; public static final int NETWORKDATASETTINGS_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.NetworkDataSettings networkDataSettings_; - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public boolean hasNetworkDataSettings() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings() { return networkDataSettings_; } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder() { return networkDataSettings_; } - + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; public static final int SERVERCONNECTSETTINGS_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.ServerConnectSettings serverConnectSettings_; - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public boolean hasServerConnectSettings() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings() { return serverConnectSettings_; } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder() { return serverConnectSettings_; } - + private void initFields() { networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); @@ -9352,11 +7342,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -9371,12 +7361,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -9394,83 +7384,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.ModemConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.ModemConfigurationCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.ModemConfigurationCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.ModemConfigurationCommandOrBuilder { @@ -9478,21 +7479,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.ModemConfigurationCommand.class, com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.ModemConfigurationCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -9506,7 +7504,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); if (networkOperatorSettingsBuilder_ == null) { @@ -9529,20 +7527,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_ModemConfigurationCommand_descriptor; + return com.openxc.BinaryMessages.ModemConfigurationCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.ModemConfigurationCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.ModemConfigurationCommand build() { com.openxc.BinaryMessages.ModemConfigurationCommand result = buildPartial(); if (!result.isInitialized()) { @@ -9550,7 +7548,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.ModemConfigurationCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.ModemConfigurationCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.ModemConfigurationCommand buildPartial() { com.openxc.BinaryMessages.ModemConfigurationCommand result = new com.openxc.BinaryMessages.ModemConfigurationCommand(this); int from_bitField0_ = bitField0_; @@ -9583,7 +7591,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.ModemConfigurationCommand) { return mergeFrom((com.openxc.BinaryMessages.ModemConfigurationCommand)other); @@ -9592,7 +7600,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.ModemConfigurationCommand other) { if (other == com.openxc.BinaryMessages.ModemConfigurationCommand.getDefaultInstance()) return this; if (other.hasNetworkOperatorSettings()) { @@ -9607,43 +7615,74 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.ModemConfigurationCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.ModemConfigurationCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.openxc.BinaryMessages.NetworkOperatorSettings.Builder subBuilder = com.openxc.BinaryMessages.NetworkOperatorSettings.newBuilder(); + if (hasNetworkOperatorSettings()) { + subBuilder.mergeFrom(getNetworkOperatorSettings()); + } + input.readMessage(subBuilder, extensionRegistry); + setNetworkOperatorSettings(subBuilder.buildPartial()); + break; + } + case 18: { + com.openxc.BinaryMessages.NetworkDataSettings.Builder subBuilder = com.openxc.BinaryMessages.NetworkDataSettings.newBuilder(); + if (hasNetworkDataSettings()) { + subBuilder.mergeFrom(getNetworkDataSettings()); + } + input.readMessage(subBuilder, extensionRegistry); + setNetworkDataSettings(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.ServerConnectSettings.Builder subBuilder = com.openxc.BinaryMessages.ServerConnectSettings.newBuilder(); + if (hasServerConnectSettings()) { + subBuilder.mergeFrom(getServerConnectSettings()); + } + input.readMessage(subBuilder, extensionRegistry); + setServerConnectSettings(subBuilder.buildPartial()); + break; + } } } - return this; } + private int bitField0_; - + // optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; private com.openxc.BinaryMessages.NetworkOperatorSettings networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder, com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder> networkOperatorSettingsBuilder_; - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public boolean hasNetworkOperatorSettings() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings getNetworkOperatorSettings() { if (networkOperatorSettingsBuilder_ == null) { return networkOperatorSettings_; @@ -9651,9 +7690,6 @@ public final class BinaryMessages { return networkOperatorSettingsBuilder_.getMessage(); } } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public Builder setNetworkOperatorSettings(com.openxc.BinaryMessages.NetworkOperatorSettings value) { if (networkOperatorSettingsBuilder_ == null) { if (value == null) { @@ -9667,9 +7703,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public Builder setNetworkOperatorSettings( com.openxc.BinaryMessages.NetworkOperatorSettings.Builder builderForValue) { if (networkOperatorSettingsBuilder_ == null) { @@ -9681,9 +7714,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public Builder mergeNetworkOperatorSettings(com.openxc.BinaryMessages.NetworkOperatorSettings value) { if (networkOperatorSettingsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -9700,9 +7730,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000001; return this; } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public Builder clearNetworkOperatorSettings() { if (networkOperatorSettingsBuilder_ == null) { networkOperatorSettings_ = com.openxc.BinaryMessages.NetworkOperatorSettings.getDefaultInstance(); @@ -9713,17 +7740,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000001); return this; } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public com.openxc.BinaryMessages.NetworkOperatorSettings.Builder getNetworkOperatorSettingsBuilder() { bitField0_ |= 0x00000001; onChanged(); return getNetworkOperatorSettingsFieldBuilder().getBuilder(); } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ public com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder getNetworkOperatorSettingsOrBuilder() { if (networkOperatorSettingsBuilder_ != null) { return networkOperatorSettingsBuilder_.getMessageOrBuilder(); @@ -9731,9 +7752,6 @@ public final class BinaryMessages { return networkOperatorSettings_; } } - /** - * optional .openxc.NetworkOperatorSettings networkOperatorSettings = 1; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkOperatorSettings, com.openxc.BinaryMessages.NetworkOperatorSettings.Builder, com.openxc.BinaryMessages.NetworkOperatorSettingsOrBuilder> getNetworkOperatorSettingsFieldBuilder() { @@ -9747,20 +7765,14 @@ public final class BinaryMessages { } return networkOperatorSettingsBuilder_; } - + // optional .openxc.NetworkDataSettings networkDataSettings = 2; private com.openxc.BinaryMessages.NetworkDataSettings networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkDataSettings, com.openxc.BinaryMessages.NetworkDataSettings.Builder, com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder> networkDataSettingsBuilder_; - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public boolean hasNetworkDataSettings() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public com.openxc.BinaryMessages.NetworkDataSettings getNetworkDataSettings() { if (networkDataSettingsBuilder_ == null) { return networkDataSettings_; @@ -9768,9 +7780,6 @@ public final class BinaryMessages { return networkDataSettingsBuilder_.getMessage(); } } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public Builder setNetworkDataSettings(com.openxc.BinaryMessages.NetworkDataSettings value) { if (networkDataSettingsBuilder_ == null) { if (value == null) { @@ -9784,9 +7793,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public Builder setNetworkDataSettings( com.openxc.BinaryMessages.NetworkDataSettings.Builder builderForValue) { if (networkDataSettingsBuilder_ == null) { @@ -9798,9 +7804,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public Builder mergeNetworkDataSettings(com.openxc.BinaryMessages.NetworkDataSettings value) { if (networkDataSettingsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -9817,9 +7820,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public Builder clearNetworkDataSettings() { if (networkDataSettingsBuilder_ == null) { networkDataSettings_ = com.openxc.BinaryMessages.NetworkDataSettings.getDefaultInstance(); @@ -9830,17 +7830,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public com.openxc.BinaryMessages.NetworkDataSettings.Builder getNetworkDataSettingsBuilder() { bitField0_ |= 0x00000002; onChanged(); return getNetworkDataSettingsFieldBuilder().getBuilder(); } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ public com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder getNetworkDataSettingsOrBuilder() { if (networkDataSettingsBuilder_ != null) { return networkDataSettingsBuilder_.getMessageOrBuilder(); @@ -9848,9 +7842,6 @@ public final class BinaryMessages { return networkDataSettings_; } } - /** - * optional .openxc.NetworkDataSettings networkDataSettings = 2; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.NetworkDataSettings, com.openxc.BinaryMessages.NetworkDataSettings.Builder, com.openxc.BinaryMessages.NetworkDataSettingsOrBuilder> getNetworkDataSettingsFieldBuilder() { @@ -9864,20 +7855,14 @@ public final class BinaryMessages { } return networkDataSettingsBuilder_; } - + // optional .openxc.ServerConnectSettings serverConnectSettings = 3; private com.openxc.BinaryMessages.ServerConnectSettings serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ServerConnectSettings, com.openxc.BinaryMessages.ServerConnectSettings.Builder, com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder> serverConnectSettingsBuilder_; - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public boolean hasServerConnectSettings() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public com.openxc.BinaryMessages.ServerConnectSettings getServerConnectSettings() { if (serverConnectSettingsBuilder_ == null) { return serverConnectSettings_; @@ -9885,9 +7870,6 @@ public final class BinaryMessages { return serverConnectSettingsBuilder_.getMessage(); } } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public Builder setServerConnectSettings(com.openxc.BinaryMessages.ServerConnectSettings value) { if (serverConnectSettingsBuilder_ == null) { if (value == null) { @@ -9901,9 +7883,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public Builder setServerConnectSettings( com.openxc.BinaryMessages.ServerConnectSettings.Builder builderForValue) { if (serverConnectSettingsBuilder_ == null) { @@ -9915,9 +7894,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public Builder mergeServerConnectSettings(com.openxc.BinaryMessages.ServerConnectSettings value) { if (serverConnectSettingsBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -9934,9 +7910,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public Builder clearServerConnectSettings() { if (serverConnectSettingsBuilder_ == null) { serverConnectSettings_ = com.openxc.BinaryMessages.ServerConnectSettings.getDefaultInstance(); @@ -9947,17 +7920,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public com.openxc.BinaryMessages.ServerConnectSettings.Builder getServerConnectSettingsBuilder() { bitField0_ |= 0x00000004; onChanged(); return getServerConnectSettingsFieldBuilder().getBuilder(); } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ public com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder getServerConnectSettingsOrBuilder() { if (serverConnectSettingsBuilder_ != null) { return serverConnectSettingsBuilder_.getMessageOrBuilder(); @@ -9965,9 +7932,6 @@ public final class BinaryMessages { return serverConnectSettings_; } } - /** - * optional .openxc.ServerConnectSettings serverConnectSettings = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.ServerConnectSettings, com.openxc.BinaryMessages.ServerConnectSettings.Builder, com.openxc.BinaryMessages.ServerConnectSettingsOrBuilder> getServerConnectSettingsFieldBuilder() { @@ -9981,143 +7945,64 @@ public final class BinaryMessages { } return serverConnectSettingsBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.ModemConfigurationCommand) } - + static { defaultInstance = new ModemConfigurationCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) } - + public interface RTCConfigurationCommandOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional uint32 unix_time = 1; - /** - * optional uint32 unix_time = 1; - */ boolean hasUnixTime(); - /** - * optional uint32 unix_time = 1; - */ int getUnixTime(); } - /** - * Protobuf type {@code openxc.RTCConfigurationCommand} - */ public static final class RTCConfigurationCommand extends com.google.protobuf.GeneratedMessage implements RTCConfigurationCommandOrBuilder { // Use RTCConfigurationCommand.newBuilder() to construct. - private RTCConfigurationCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + private RTCConfigurationCommand(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private RTCConfigurationCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private RTCConfigurationCommand(boolean noInit) {} + private static final RTCConfigurationCommand defaultInstance; public static RTCConfigurationCommand getDefaultInstance() { return defaultInstance; } - + public RTCConfigurationCommand getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RTCConfigurationCommand( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - unixTime_ = input.readUInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RTCConfigurationCommand.class, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RTCConfigurationCommand parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RTCConfigurationCommand(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable; } - + private int bitField0_; // optional uint32 unix_time = 1; public static final int UNIX_TIME_FIELD_NUMBER = 1; private int unixTime_; - /** - * optional uint32 unix_time = 1; - */ public boolean hasUnixTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional uint32 unix_time = 1; - */ public int getUnixTime() { return unixTime_; } - + private void initFields() { unixTime_ = 0; } @@ -10125,11 +8010,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -10138,12 +8023,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -10153,83 +8038,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.RTCConfigurationCommand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.RTCConfigurationCommand prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.RTCConfigurationCommand} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.RTCConfigurationCommandOrBuilder { @@ -10237,21 +8133,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.RTCConfigurationCommand.class, com.openxc.BinaryMessages.RTCConfigurationCommand.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.RTCConfigurationCommand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -10262,27 +8155,27 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); unixTime_ = 0; bitField0_ = (bitField0_ & ~0x00000001); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_RTCConfigurationCommand_descriptor; + return com.openxc.BinaryMessages.RTCConfigurationCommand.getDescriptor(); } - + public com.openxc.BinaryMessages.RTCConfigurationCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance(); } - + public com.openxc.BinaryMessages.RTCConfigurationCommand build() { com.openxc.BinaryMessages.RTCConfigurationCommand result = buildPartial(); if (!result.isInitialized()) { @@ -10290,7 +8183,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.RTCConfigurationCommand buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.RTCConfigurationCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.RTCConfigurationCommand buildPartial() { com.openxc.BinaryMessages.RTCConfigurationCommand result = new com.openxc.BinaryMessages.RTCConfigurationCommand(this); int from_bitField0_ = bitField0_; @@ -10303,7 +8206,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.RTCConfigurationCommand) { return mergeFrom((com.openxc.BinaryMessages.RTCConfigurationCommand)other); @@ -10312,7 +8215,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.RTCConfigurationCommand other) { if (other == com.openxc.BinaryMessages.RTCConfigurationCommand.getDefaultInstance()) return this; if (other.hasUnixTime()) { @@ -10321,299 +8224,173 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.RTCConfigurationCommand parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.RTCConfigurationCommand) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + unixTime_ = input.readUInt32(); + break; + } } } - return this; } + private int bitField0_; - + // optional uint32 unix_time = 1; private int unixTime_ ; - /** - * optional uint32 unix_time = 1; - */ public boolean hasUnixTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional uint32 unix_time = 1; - */ public int getUnixTime() { return unixTime_; } - /** - * optional uint32 unix_time = 1; - */ public Builder setUnixTime(int value) { bitField0_ |= 0x00000001; unixTime_ = value; onChanged(); return this; } - /** - * optional uint32 unix_time = 1; - */ public Builder clearUnixTime() { bitField0_ = (bitField0_ & ~0x00000001); unixTime_ = 0; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.RTCConfigurationCommand) } - + static { defaultInstance = new RTCConfigurationCommand(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.RTCConfigurationCommand) } - + public interface CommandResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.ControlCommand.Type type = 1; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ boolean hasType(); - /** - * optional .openxc.ControlCommand.Type type = 1; - */ com.openxc.BinaryMessages.ControlCommand.Type getType(); - + // optional string message = 2; - /** - * optional string message = 2; - */ boolean hasMessage(); - /** - * optional string message = 2; - */ - java.lang.String getMessage(); - /** - * optional string message = 2; - */ - com.google.protobuf.ByteString - getMessageBytes(); - + String getMessage(); + // optional bool status = 3; - /** - * optional bool status = 3; - */ boolean hasStatus(); - /** - * optional bool status = 3; - */ boolean getStatus(); } - /** - * Protobuf type {@code openxc.CommandResponse} - */ public static final class CommandResponse extends com.google.protobuf.GeneratedMessage implements CommandResponseOrBuilder { // Use CommandResponse.newBuilder() to construct. - private CommandResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private CommandResponse(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private CommandResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private CommandResponse(boolean noInit) {} + private static final CommandResponse defaultInstance; public static CommandResponse getDefaultInstance() { return defaultInstance; } - + public CommandResponse getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CommandResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; - message_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - status_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CommandResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CommandResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable; } - + private int bitField0_; // optional .openxc.ControlCommand.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - + // optional string message = 2; public static final int MESSAGE_FIELD_NUMBER = 2; private java.lang.Object message_; - /** - * optional string message = 2; - */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string message = 2; - */ - public java.lang.String getMessage() { + public String getMessage() { java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { message_ = s; } return s; } } - /** - * optional string message = 2; - */ - public com.google.protobuf.ByteString - getMessageBytes() { + private com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional bool status = 3; public static final int STATUS_FIELD_NUMBER = 3; private boolean status_; - /** - * optional bool status = 3; - */ public boolean hasStatus() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bool status = 3; - */ public boolean getStatus() { return status_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; message_ = ""; @@ -10623,11 +8400,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -10642,12 +8419,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -10665,83 +8442,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.CommandResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.CommandResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.CommandResponse} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.CommandResponseOrBuilder { @@ -10749,21 +8537,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.CommandResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -10774,7 +8559,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; @@ -10785,20 +8570,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor; + return com.openxc.BinaryMessages.CommandResponse.getDescriptor(); } - + public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() { return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); } - + public com.openxc.BinaryMessages.CommandResponse build() { com.openxc.BinaryMessages.CommandResponse result = buildPartial(); if (!result.isInitialized()) { @@ -10806,7 +8591,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.CommandResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.CommandResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.CommandResponse buildPartial() { com.openxc.BinaryMessages.CommandResponse result = new com.openxc.BinaryMessages.CommandResponse(this); int from_bitField0_ = bitField0_; @@ -10827,7 +8622,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.CommandResponse) { return mergeFrom((com.openxc.BinaryMessages.CommandResponse)other); @@ -10836,16 +8631,14 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) { if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasMessage()) { - bitField0_ |= 0x00000002; - message_ = other.message_; - onChanged(); + setMessage(other.getMessage()); } if (other.hasStatus()) { setStatus(other.getStatus()); @@ -10853,47 +8646,69 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.CommandResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.CommandResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + message_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + status_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + // optional .openxc.ControlCommand.Type type = 1; private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public com.openxc.BinaryMessages.ControlCommand.Type getType() { return type_; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) { if (value == null) { throw new NullPointerException(); @@ -10903,59 +8718,29 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.ControlCommand.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION; onChanged(); return this; } - + // optional string message = 2; private java.lang.Object message_ = ""; - /** - * optional string message = 2; - */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string message = 2; - */ - public java.lang.String getMessage() { + public String getMessage() { java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); message_ = s; return s; } else { - return (java.lang.String) ref; - } - } - /** - * optional string message = 2; - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + return (String) ref; } } - /** - * optional string message = 2; - */ - public Builder setMessage( - java.lang.String value) { + public Builder setMessage(String value) { if (value == null) { throw new NullPointerException(); } @@ -10964,349 +8749,129 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string message = 2; - */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } - /** - * optional string message = 2; - */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + void setMessage(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; message_ = value; onChanged(); - return this; } - + // optional bool status = 3; private boolean status_ ; - /** - * optional bool status = 3; - */ public boolean hasStatus() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bool status = 3; - */ public boolean getStatus() { return status_; } - /** - * optional bool status = 3; - */ public Builder setStatus(boolean value) { bitField0_ |= 0x00000004; status_ = value; onChanged(); return this; } - /** - * optional bool status = 3; - */ public Builder clearStatus() { bitField0_ = (bitField0_ & ~0x00000004); status_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.CommandResponse) } - + static { defaultInstance = new CommandResponse(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.CommandResponse) } - + public interface DiagnosticRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - + // optional uint32 message_id = 2; - /** - * optional uint32 message_id = 2; - */ boolean hasMessageId(); - /** - * optional uint32 message_id = 2; - */ int getMessageId(); - + // optional uint32 mode = 3; - /** - * optional uint32 mode = 3; - */ boolean hasMode(); - /** - * optional uint32 mode = 3; - */ int getMode(); - + // optional uint32 pid = 4; - /** - * optional uint32 pid = 4; - */ boolean hasPid(); - /** - * optional uint32 pid = 4; - */ int getPid(); - + // optional bytes payload = 5; - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ boolean hasPayload(); - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ com.google.protobuf.ByteString getPayload(); - + // optional bool multiple_responses = 6; - /** - * optional bool multiple_responses = 6; - */ boolean hasMultipleResponses(); - /** - * optional bool multiple_responses = 6; - */ boolean getMultipleResponses(); - + // optional double frequency = 7; - /** - * optional double frequency = 7; - */ boolean hasFrequency(); - /** - * optional double frequency = 7; - */ double getFrequency(); - + // optional string name = 8; - /** - * optional string name = 8; - */ boolean hasName(); - /** - * optional string name = 8; - */ - java.lang.String getName(); - /** - * optional string name = 8; - */ - com.google.protobuf.ByteString - getNameBytes(); - + String getName(); + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ boolean hasDecodedType(); - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType(); } - /** - * Protobuf type {@code openxc.DiagnosticRequest} - */ public static final class DiagnosticRequest extends com.google.protobuf.GeneratedMessage implements DiagnosticRequestOrBuilder { // Use DiagnosticRequest.newBuilder() to construct. - private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + private DiagnosticRequest(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DiagnosticRequest(boolean noInit) {} + private static final DiagnosticRequest defaultInstance; public static DiagnosticRequest getDefaultInstance() { return defaultInstance; } - + public DiagnosticRequest getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DiagnosticRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - mode_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - pid_ = input.readUInt32(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - payload_ = input.readBytes(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - multipleResponses_ = input.readBool(); - break; - } - case 57: { - bitField0_ |= 0x00000040; - frequency_ = input.readDouble(); - break; - } - case 66: { - bitField0_ |= 0x00000080; - name_ = input.readBytes(); - break; - } - case 72: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(9, rawValue); - } else { - bitField0_ |= 0x00000100; - decodedType_ = value; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DiagnosticRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnosticRequest(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.DiagnosticRequest.DecodedType} - */ + public enum DecodedType implements com.google.protobuf.ProtocolMessageEnum { - /** - * NONE = 1; - */ NONE(0, 1), - /** - * OBD2 = 2; - */ OBD2(1, 2), ; - - /** - * NONE = 1; - */ + public static final int NONE_VALUE = 1; - /** - * OBD2 = 2; - */ public static final int OBD2_VALUE = 2; - - + + public final int getNumber() { return value; } - + public static DecodedType valueOf(int value) { switch (value) { case 1: return NONE; @@ -11314,7 +8879,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -11326,7 +8891,7 @@ public final class BinaryMessages { return DecodedType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -11339,9 +8904,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(0); } - - private static final DecodedType[] VALUES = values(); - + + private static final DecodedType[] VALUES = { + NONE, OBD2, + }; + public static DecodedType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -11350,200 +8917,131 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private DecodedType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType) } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - + // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - + // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - + // optional bytes payload = 5; public static final int PAYLOAD_FIELD_NUMBER = 5; private com.google.protobuf.ByteString payload_; - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bytes payload = 5; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - + // optional bool multiple_responses = 6; public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6; private boolean multipleResponses_; - /** - * optional bool multiple_responses = 6; - */ public boolean hasMultipleResponses() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional bool multiple_responses = 6; - */ public boolean getMultipleResponses() { return multipleResponses_; } - + // optional double frequency = 7; public static final int FREQUENCY_FIELD_NUMBER = 7; private double frequency_; - /** - * optional double frequency = 7; - */ public boolean hasFrequency() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional double frequency = 7; - */ public double getFrequency() { return frequency_; } - + // optional string name = 8; public static final int NAME_FIELD_NUMBER = 8; private java.lang.Object name_; - /** - * optional string name = 8; - */ public boolean hasName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional string name = 8; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { name_ = s; } return s; } } - /** - * optional string name = 8; - */ - public com.google.protobuf.ByteString - getNameBytes() { + private com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; public static final int DECODED_TYPE_FIELD_NUMBER = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_; - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public boolean hasDecodedType() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { return decodedType_; } - + private void initFields() { bus_ = 0; messageId_ = 0; @@ -11559,11 +9057,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -11596,12 +9094,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -11643,83 +9141,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DiagnosticRequest} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder { @@ -11727,21 +9236,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -11752,7 +9258,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -11775,20 +9281,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000100); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor; + return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor(); } - + public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticRequest build() { com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial(); if (!result.isInitialized()) { @@ -11796,7 +9302,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DiagnosticRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() { com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this); int from_bitField0_ = bitField0_; @@ -11841,7 +9357,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other); @@ -11850,7 +9366,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) { if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this; if (other.hasBus()) { @@ -11875,9 +9391,7 @@ public final class BinaryMessages { setFrequency(other.getFrequency()); } if (other.hasName()) { - bitField0_ |= 0x00000080; - name_ = other.name_; - onChanged(); + setName(other.getName()); } if (other.hasDecodedType()) { setDecodedType(other.getDecodedType()); @@ -11885,194 +9399,183 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + payload_ = input.readBytes(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + multipleResponses_ = input.readBool(); + break; + } + case 57: { + bitField0_ |= 0x00000040; + frequency_ = input.readDouble(); + break; + } + case 66: { + bitField0_ |= 0x00000080; + name_ = input.readBytes(); + break; + } + case 72: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(9, rawValue); + } else { + bitField0_ |= 0x00000100; + decodedType_ = value; + } + break; + } } } - return this; } + private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional uint32 message_id = 2; private int messageId_ ; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - /** - * optional uint32 message_id = 2; - */ public Builder setMessageId(int value) { bitField0_ |= 0x00000002; messageId_ = value; onChanged(); return this; } - /** - * optional uint32 message_id = 2; - */ public Builder clearMessageId() { bitField0_ = (bitField0_ & ~0x00000002); messageId_ = 0; onChanged(); return this; } - + // optional uint32 mode = 3; private int mode_ ; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - /** - * optional uint32 mode = 3; - */ public Builder setMode(int value) { bitField0_ |= 0x00000004; mode_ = value; onChanged(); return this; } - /** - * optional uint32 mode = 3; - */ public Builder clearMode() { bitField0_ = (bitField0_ & ~0x00000004); mode_ = 0; onChanged(); return this; } - + // optional uint32 pid = 4; private int pid_ ; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - /** - * optional uint32 pid = 4; - */ public Builder setPid(int value) { bitField0_ |= 0x00000008; pid_ = value; onChanged(); return this; } - /** - * optional uint32 pid = 4; - */ public Builder clearPid() { bitField0_ = (bitField0_ & ~0x00000008); pid_ = 0; onChanged(); return this; } - + // optional bytes payload = 5; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -12082,130 +9585,71 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional bytes payload = 5; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000010); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } - + // optional bool multiple_responses = 6; private boolean multipleResponses_ ; - /** - * optional bool multiple_responses = 6; - */ public boolean hasMultipleResponses() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional bool multiple_responses = 6; - */ public boolean getMultipleResponses() { return multipleResponses_; } - /** - * optional bool multiple_responses = 6; - */ public Builder setMultipleResponses(boolean value) { bitField0_ |= 0x00000020; multipleResponses_ = value; onChanged(); return this; } - /** - * optional bool multiple_responses = 6; - */ public Builder clearMultipleResponses() { bitField0_ = (bitField0_ & ~0x00000020); multipleResponses_ = false; onChanged(); return this; } - + // optional double frequency = 7; private double frequency_ ; - /** - * optional double frequency = 7; - */ public boolean hasFrequency() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional double frequency = 7; - */ public double getFrequency() { return frequency_; } - /** - * optional double frequency = 7; - */ public Builder setFrequency(double value) { bitField0_ |= 0x00000040; frequency_ = value; onChanged(); return this; } - /** - * optional double frequency = 7; - */ public Builder clearFrequency() { bitField0_ = (bitField0_ & ~0x00000040); frequency_ = 0D; onChanged(); return this; } - + // optional string name = 8; private java.lang.Object name_ = ""; - /** - * optional string name = 8; - */ public boolean hasName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional string name = 8; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); name_ = s; return s; } else { - return (java.lang.String) ref; + return (String) ref; } } - /** - * optional string name = 8; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 8; - */ - public Builder setName( - java.lang.String value) { + public Builder setName(String value) { if (value == null) { throw new NullPointerException(); } @@ -12214,46 +9658,26 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string name = 8; - */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000080); name_ = getDefaultInstance().getName(); onChanged(); return this; } - /** - * optional string name = 8; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000080; name_ = value; onChanged(); - return this; } - + // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public boolean hasDecodedType() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() { return decodedType_; } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public Builder setDecodedType(com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value) { if (value == null) { throw new NullPointerException(); @@ -12263,389 +9687,168 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9; - */ public Builder clearDecodedType() { bitField0_ = (bitField0_ & ~0x00000100); decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest) } - + static { defaultInstance = new DiagnosticRequest(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) } - + public interface DiagnosticResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional int32 bus = 1; - /** - * optional int32 bus = 1; - */ boolean hasBus(); - /** - * optional int32 bus = 1; - */ int getBus(); - + // optional uint32 message_id = 2; - /** - * optional uint32 message_id = 2; - */ boolean hasMessageId(); - /** - * optional uint32 message_id = 2; - */ int getMessageId(); - + // optional uint32 mode = 3; - /** - * optional uint32 mode = 3; - */ boolean hasMode(); - /** - * optional uint32 mode = 3; - */ int getMode(); - + // optional uint32 pid = 4; - /** - * optional uint32 pid = 4; - */ boolean hasPid(); - /** - * optional uint32 pid = 4; - */ int getPid(); - + // optional bool success = 5; - /** - * optional bool success = 5; - */ boolean hasSuccess(); - /** - * optional bool success = 5; - */ boolean getSuccess(); - + // optional uint32 negative_response_code = 6; - /** - * optional uint32 negative_response_code = 6; - */ boolean hasNegativeResponseCode(); - /** - * optional uint32 negative_response_code = 6; - */ int getNegativeResponseCode(); - + // optional bytes payload = 7; - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ boolean hasPayload(); - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ com.google.protobuf.ByteString getPayload(); - + // optional double value = 8; - /** - * optional double value = 8; - */ boolean hasValue(); - /** - * optional double value = 8; - */ double getValue(); } - /** - * Protobuf type {@code openxc.DiagnosticResponse} - */ public static final class DiagnosticResponse extends com.google.protobuf.GeneratedMessage implements DiagnosticResponseOrBuilder { // Use DiagnosticResponse.newBuilder() to construct. - private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private DiagnosticResponse(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DiagnosticResponse(boolean noInit) {} + private static final DiagnosticResponse defaultInstance; public static DiagnosticResponse getDefaultInstance() { return defaultInstance; } - + public DiagnosticResponse getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DiagnosticResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - bus_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - messageId_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - mode_ = input.readUInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - pid_ = input.readUInt32(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - success_ = input.readBool(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - negativeResponseCode_ = input.readUInt32(); - break; - } - case 58: { - bitField0_ |= 0x00000040; - payload_ = input.readBytes(); - break; - } - case 65: { - bitField0_ |= 0x00000080; - value_ = input.readDouble(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DiagnosticResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnosticResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable; } - + private int bitField0_; // optional int32 bus = 1; public static final int BUS_FIELD_NUMBER = 1; private int bus_; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - + // optional uint32 message_id = 2; public static final int MESSAGE_ID_FIELD_NUMBER = 2; private int messageId_; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - + // optional uint32 mode = 3; public static final int MODE_FIELD_NUMBER = 3; private int mode_; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - + // optional uint32 pid = 4; public static final int PID_FIELD_NUMBER = 4; private int pid_; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - + // optional bool success = 5; public static final int SUCCESS_FIELD_NUMBER = 5; private boolean success_; - /** - * optional bool success = 5; - */ public boolean hasSuccess() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bool success = 5; - */ public boolean getSuccess() { return success_; } - + // optional uint32 negative_response_code = 6; public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6; private int negativeResponseCode_; - /** - * optional uint32 negative_response_code = 6; - */ public boolean hasNegativeResponseCode() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional uint32 negative_response_code = 6; - */ public int getNegativeResponseCode() { return negativeResponseCode_; } - + // optional bytes payload = 7; public static final int PAYLOAD_FIELD_NUMBER = 7; private com.google.protobuf.ByteString payload_; - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional bytes payload = 7; - * - *
-     * TODO we are capping this at 8 bytes for now - need to change when we
-     * support multi-frame responses
-     * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - + // optional double value = 8; public static final int VALUE_FIELD_NUMBER = 8; private double value_; - /** - * optional double value = 8; - */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional double value = 8; - */ public double getValue() { return value_; } - + private void initFields() { bus_ = 0; messageId_ = 0; @@ -12660,11 +9863,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -12694,12 +9897,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -12737,83 +9940,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DiagnosticResponse} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder { @@ -12821,21 +10035,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -12846,7 +10057,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); bus_ = 0; @@ -12867,20 +10078,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000080); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor; + return com.openxc.BinaryMessages.DiagnosticResponse.getDescriptor(); } - + public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DiagnosticResponse build() { com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial(); if (!result.isInitialized()) { @@ -12888,7 +10099,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DiagnosticResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() { com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this); int from_bitField0_ = bitField0_; @@ -12929,7 +10150,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) { return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other); @@ -12938,7 +10159,7 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) { if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this; if (other.hasBus()) { @@ -12968,260 +10189,214 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + bus_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + messageId_ = input.readUInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + mode_ = input.readUInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + pid_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + success_ = input.readBool(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + negativeResponseCode_ = input.readUInt32(); + break; + } + case 58: { + bitField0_ |= 0x00000040; + payload_ = input.readBytes(); + break; + } + case 65: { + bitField0_ |= 0x00000080; + value_ = input.readDouble(); + break; + } } } - return this; } + private int bitField0_; - + // optional int32 bus = 1; private int bus_ ; - /** - * optional int32 bus = 1; - */ public boolean hasBus() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 bus = 1; - */ public int getBus() { return bus_; } - /** - * optional int32 bus = 1; - */ public Builder setBus(int value) { bitField0_ |= 0x00000001; bus_ = value; onChanged(); return this; } - /** - * optional int32 bus = 1; - */ public Builder clearBus() { bitField0_ = (bitField0_ & ~0x00000001); bus_ = 0; onChanged(); return this; } - + // optional uint32 message_id = 2; private int messageId_ ; - /** - * optional uint32 message_id = 2; - */ public boolean hasMessageId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional uint32 message_id = 2; - */ public int getMessageId() { return messageId_; } - /** - * optional uint32 message_id = 2; - */ public Builder setMessageId(int value) { bitField0_ |= 0x00000002; messageId_ = value; onChanged(); return this; } - /** - * optional uint32 message_id = 2; - */ public Builder clearMessageId() { bitField0_ = (bitField0_ & ~0x00000002); messageId_ = 0; onChanged(); return this; } - + // optional uint32 mode = 3; private int mode_ ; - /** - * optional uint32 mode = 3; - */ public boolean hasMode() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional uint32 mode = 3; - */ public int getMode() { return mode_; } - /** - * optional uint32 mode = 3; - */ public Builder setMode(int value) { bitField0_ |= 0x00000004; mode_ = value; onChanged(); return this; } - /** - * optional uint32 mode = 3; - */ public Builder clearMode() { bitField0_ = (bitField0_ & ~0x00000004); mode_ = 0; onChanged(); return this; } - + // optional uint32 pid = 4; private int pid_ ; - /** - * optional uint32 pid = 4; - */ public boolean hasPid() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional uint32 pid = 4; - */ public int getPid() { return pid_; } - /** - * optional uint32 pid = 4; - */ public Builder setPid(int value) { bitField0_ |= 0x00000008; pid_ = value; onChanged(); return this; } - /** - * optional uint32 pid = 4; - */ public Builder clearPid() { bitField0_ = (bitField0_ & ~0x00000008); pid_ = 0; onChanged(); return this; } - + // optional bool success = 5; private boolean success_ ; - /** - * optional bool success = 5; - */ public boolean hasSuccess() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bool success = 5; - */ public boolean getSuccess() { return success_; } - /** - * optional bool success = 5; - */ public Builder setSuccess(boolean value) { bitField0_ |= 0x00000010; success_ = value; onChanged(); return this; } - /** - * optional bool success = 5; - */ public Builder clearSuccess() { bitField0_ = (bitField0_ & ~0x00000010); success_ = false; onChanged(); return this; } - + // optional uint32 negative_response_code = 6; private int negativeResponseCode_ ; - /** - * optional uint32 negative_response_code = 6; - */ public boolean hasNegativeResponseCode() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional uint32 negative_response_code = 6; - */ public int getNegativeResponseCode() { return negativeResponseCode_; } - /** - * optional uint32 negative_response_code = 6; - */ public Builder setNegativeResponseCode(int value) { bitField0_ |= 0x00000020; negativeResponseCode_ = value; onChanged(); return this; } - /** - * optional uint32 negative_response_code = 6; - */ public Builder clearNegativeResponseCode() { bitField0_ = (bitField0_ & ~0x00000020); negativeResponseCode_ = 0; onChanged(); return this; } - + // optional bytes payload = 7; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public boolean hasPayload() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public com.google.protobuf.ByteString getPayload() { return payload_; } - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -13231,264 +10406,106 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional bytes payload = 7; - * - *
-       * TODO we are capping this at 8 bytes for now - need to change when we
-       * support multi-frame responses
-       * 
- */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000040); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } - + // optional double value = 8; private double value_ ; - /** - * optional double value = 8; - */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional double value = 8; - */ public double getValue() { return value_; } - /** - * optional double value = 8; - */ public Builder setValue(double value) { bitField0_ |= 0x00000080; value_ = value; onChanged(); return this; } - /** - * optional double value = 8; - */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000080); value_ = 0D; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse) } - + static { defaultInstance = new DiagnosticResponse(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) } - + public interface DynamicFieldOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional .openxc.DynamicField.Type type = 1; - /** - * optional .openxc.DynamicField.Type type = 1; - */ boolean hasType(); - /** - * optional .openxc.DynamicField.Type type = 1; - */ com.openxc.BinaryMessages.DynamicField.Type getType(); - + // optional string string_value = 2; - /** - * optional string string_value = 2; - */ boolean hasStringValue(); - /** - * optional string string_value = 2; - */ - java.lang.String getStringValue(); - /** - * optional string string_value = 2; - */ - com.google.protobuf.ByteString - getStringValueBytes(); - + String getStringValue(); + // optional double numeric_value = 3; - /** - * optional double numeric_value = 3; - */ boolean hasNumericValue(); - /** - * optional double numeric_value = 3; - */ double getNumericValue(); - + // optional bool boolean_value = 4; - /** - * optional bool boolean_value = 4; - */ boolean hasBooleanValue(); - /** - * optional bool boolean_value = 4; - */ boolean getBooleanValue(); } - /** - * Protobuf type {@code openxc.DynamicField} - */ public static final class DynamicField extends com.google.protobuf.GeneratedMessage implements DynamicFieldOrBuilder { // Use DynamicField.newBuilder() to construct. - private DynamicField(com.google.protobuf.GeneratedMessage.Builder builder) { + private DynamicField(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private DynamicField(boolean noInit) {} + private static final DynamicField defaultInstance; public static DynamicField getDefaultInstance() { - return defaultInstance; - } - - public DynamicField getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DynamicField( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; - stringValue_ = input.readBytes(); - break; - } - case 25: { - bitField0_ |= 0x00000004; - numericValue_ = input.readDouble(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - booleanValue_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return defaultInstance; + } + + public DynamicField getDefaultInstanceForType() { + return defaultInstance; } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public DynamicField parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DynamicField(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable; } - - /** - * Protobuf enum {@code openxc.DynamicField.Type} - */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * STRING = 1; - */ STRING(0, 1), - /** - * NUM = 2; - */ NUM(1, 2), - /** - * BOOL = 3; - */ BOOL(2, 3), ; - - /** - * STRING = 1; - */ + public static final int STRING_VALUE = 1; - /** - * NUM = 2; - */ public static final int NUM_VALUE = 2; - /** - * BOOL = 3; - */ public static final int BOOL_VALUE = 3; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return STRING; @@ -13497,7 +10514,7 @@ public final class BinaryMessages { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -13509,7 +10526,7 @@ public final class BinaryMessages { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -13522,9 +10539,11 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0); } - - private static final Type[] VALUES = values(); - + + private static final Type[] VALUES = { + STRING, NUM, BOOL, + }; + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -13533,110 +10552,81 @@ public final class BinaryMessages { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type) } - + private int bitField0_; // optional .openxc.DynamicField.Type type = 1; public static final int TYPE_FIELD_NUMBER = 1; private com.openxc.BinaryMessages.DynamicField.Type type_; - /** - * optional .openxc.DynamicField.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public com.openxc.BinaryMessages.DynamicField.Type getType() { return type_; } - + // optional string string_value = 2; public static final int STRING_VALUE_FIELD_NUMBER = 2; private java.lang.Object stringValue_; - /** - * optional string string_value = 2; - */ public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string string_value = 2; - */ - public java.lang.String getStringValue() { + public String getStringValue() { java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { stringValue_ = s; } return s; } } - /** - * optional string string_value = 2; - */ - public com.google.protobuf.ByteString - getStringValueBytes() { + private com.google.protobuf.ByteString getStringValueBytes() { java.lang.Object ref = stringValue_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); stringValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional double numeric_value = 3; public static final int NUMERIC_VALUE_FIELD_NUMBER = 3; private double numericValue_; - /** - * optional double numeric_value = 3; - */ public boolean hasNumericValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional double numeric_value = 3; - */ public double getNumericValue() { return numericValue_; } - + // optional bool boolean_value = 4; public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; private boolean booleanValue_; - /** - * optional bool boolean_value = 4; - */ public boolean hasBooleanValue() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional bool boolean_value = 4; - */ public boolean getBooleanValue() { return booleanValue_; } - + private void initFields() { type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; stringValue_ = ""; @@ -13647,11 +10637,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -13669,12 +10659,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -13696,83 +10686,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.DynamicField parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.DynamicField} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.DynamicFieldOrBuilder { @@ -13780,21 +10781,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -13805,7 +10803,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; @@ -13818,20 +10816,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000008); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor; + return com.openxc.BinaryMessages.DynamicField.getDescriptor(); } - + public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() { return com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); } - + public com.openxc.BinaryMessages.DynamicField build() { com.openxc.BinaryMessages.DynamicField result = buildPartial(); if (!result.isInitialized()) { @@ -13839,7 +10837,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.DynamicField buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.DynamicField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.DynamicField buildPartial() { com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this); int from_bitField0_ = bitField0_; @@ -13864,7 +10872,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.DynamicField) { return mergeFrom((com.openxc.BinaryMessages.DynamicField)other); @@ -13873,16 +10881,14 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) { if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasStringValue()) { - bitField0_ |= 0x00000002; - stringValue_ = other.stringValue_; - onChanged(); + setStringValue(other.getStringValue()); } if (other.hasNumericValue()) { setNumericValue(other.getNumericValue()); @@ -13893,47 +10899,74 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.DynamicField parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + stringValue_ = input.readBytes(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + numericValue_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + booleanValue_ = input.readBool(); + break; + } } } - return this; } + private int bitField0_; - + // optional .openxc.DynamicField.Type type = 1; private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; - /** - * optional .openxc.DynamicField.Type type = 1; - */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public com.openxc.BinaryMessages.DynamicField.Type getType() { return type_; } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) { if (value == null) { throw new NullPointerException(); @@ -13943,59 +10976,29 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional .openxc.DynamicField.Type type = 1; - */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING; onChanged(); return this; } - + // optional string string_value = 2; private java.lang.Object stringValue_ = ""; - /** - * optional string string_value = 2; - */ public boolean hasStringValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string string_value = 2; - */ - public java.lang.String getStringValue() { + public String getStringValue() { java.lang.Object ref = stringValue_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); stringValue_ = s; return s; } else { - return (java.lang.String) ref; - } - } - /** - * optional string string_value = 2; - */ - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stringValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + return (String) ref; } } - /** - * optional string string_value = 2; - */ - public Builder setStringValue( - java.lang.String value) { + public Builder setStringValue(String value) { if (value == null) { throw new NullPointerException(); } @@ -14004,361 +11007,175 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string string_value = 2; - */ public Builder clearStringValue() { bitField0_ = (bitField0_ & ~0x00000002); stringValue_ = getDefaultInstance().getStringValue(); onChanged(); return this; } - /** - * optional string string_value = 2; - */ - public Builder setStringValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + void setStringValue(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; stringValue_ = value; onChanged(); - return this; } - + // optional double numeric_value = 3; private double numericValue_ ; - /** - * optional double numeric_value = 3; - */ public boolean hasNumericValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional double numeric_value = 3; - */ public double getNumericValue() { return numericValue_; } - /** - * optional double numeric_value = 3; - */ public Builder setNumericValue(double value) { bitField0_ |= 0x00000004; numericValue_ = value; onChanged(); return this; } - /** - * optional double numeric_value = 3; - */ public Builder clearNumericValue() { bitField0_ = (bitField0_ & ~0x00000004); numericValue_ = 0D; onChanged(); return this; } - + // optional bool boolean_value = 4; private boolean booleanValue_ ; - /** - * optional bool boolean_value = 4; - */ public boolean hasBooleanValue() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional bool boolean_value = 4; - */ public boolean getBooleanValue() { return booleanValue_; } - /** - * optional bool boolean_value = 4; - */ public Builder setBooleanValue(boolean value) { bitField0_ |= 0x00000008; booleanValue_ = value; onChanged(); return this; } - /** - * optional bool boolean_value = 4; - */ public Builder clearBooleanValue() { bitField0_ = (bitField0_ & ~0x00000008); booleanValue_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:openxc.DynamicField) } - + static { defaultInstance = new DynamicField(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.DynamicField) } - + public interface SimpleMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { - + // optional string name = 1; - /** - * optional string name = 1; - */ boolean hasName(); - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - + String getName(); + // optional .openxc.DynamicField value = 2; - /** - * optional .openxc.DynamicField value = 2; - */ boolean hasValue(); - /** - * optional .openxc.DynamicField value = 2; - */ com.openxc.BinaryMessages.DynamicField getValue(); - /** - * optional .openxc.DynamicField value = 2; - */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder(); - + // optional .openxc.DynamicField event = 3; - /** - * optional .openxc.DynamicField event = 3; - */ boolean hasEvent(); - /** - * optional .openxc.DynamicField event = 3; - */ com.openxc.BinaryMessages.DynamicField getEvent(); - /** - * optional .openxc.DynamicField event = 3; - */ com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder(); } - /** - * Protobuf type {@code openxc.SimpleMessage} - */ public static final class SimpleMessage extends com.google.protobuf.GeneratedMessage implements SimpleMessageOrBuilder { // Use SimpleMessage.newBuilder() to construct. - private SimpleMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + private SimpleMessage(Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private SimpleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - + private SimpleMessage(boolean noInit) {} + private static final SimpleMessage defaultInstance; public static SimpleMessage getDefaultInstance() { return defaultInstance; } - + public SimpleMessage getDefaultInstanceForType() { return defaultInstance; } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SimpleMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); - break; - } - case 18: { - com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SimpleMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SimpleMessage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable; } - + private int bitField0_; // optional string name = 1; public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; - /** - * optional string name = 1; - */ public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string name = 1; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { name_ = s; } return s; } } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { + private com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { + if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + // optional .openxc.DynamicField value = 2; public static final int VALUE_FIELD_NUMBER = 2; private com.openxc.BinaryMessages.DynamicField value_; - /** - * optional .openxc.DynamicField value = 2; - */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicField getValue() { return value_; } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { return value_; } - + // optional .openxc.DynamicField event = 3; public static final int EVENT_FIELD_NUMBER = 3; private com.openxc.BinaryMessages.DynamicField event_; - /** - * optional .openxc.DynamicField event = 3; - */ public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicField getEvent() { return event_; } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { return event_; } - + private void initFields() { name_ = ""; value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -14368,11 +11185,11 @@ public final class BinaryMessages { public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -14387,12 +11204,12 @@ public final class BinaryMessages { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -14410,83 +11227,94 @@ public final class BinaryMessages { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return newBuilder().mergeFrom(data).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.SimpleMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return newBuilder().mergeFrom(input).buildParsed(); } public static com.openxc.BinaryMessages.SimpleMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.openxc.BinaryMessages.SimpleMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code openxc.SimpleMessage} - */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements com.openxc.BinaryMessages.SimpleMessageOrBuilder { @@ -14494,21 +11322,18 @@ public final class BinaryMessages { getDescriptor() { return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.openxc.BinaryMessages.SimpleMessage.class, com.openxc.BinaryMessages.SimpleMessage.Builder.class); + return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_fieldAccessorTable; } - + // Construct using com.openxc.BinaryMessages.SimpleMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + + private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -14521,7 +11346,7 @@ public final class BinaryMessages { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); name_ = ""; @@ -14540,20 +11365,20 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.openxc.BinaryMessages.internal_static_openxc_SimpleMessage_descriptor; + return com.openxc.BinaryMessages.SimpleMessage.getDescriptor(); } - + public com.openxc.BinaryMessages.SimpleMessage getDefaultInstanceForType() { return com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance(); } - + public com.openxc.BinaryMessages.SimpleMessage build() { com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); if (!result.isInitialized()) { @@ -14561,7 +11386,17 @@ public final class BinaryMessages { } return result; } - + + private com.openxc.BinaryMessages.SimpleMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.openxc.BinaryMessages.SimpleMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + public com.openxc.BinaryMessages.SimpleMessage buildPartial() { com.openxc.BinaryMessages.SimpleMessage result = new com.openxc.BinaryMessages.SimpleMessage(this); int from_bitField0_ = bitField0_; @@ -14590,7 +11425,7 @@ public final class BinaryMessages { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.openxc.BinaryMessages.SimpleMessage) { return mergeFrom((com.openxc.BinaryMessages.SimpleMessage)other); @@ -14599,13 +11434,11 @@ public final class BinaryMessages { return this; } } - + public Builder mergeFrom(com.openxc.BinaryMessages.SimpleMessage other) { if (other == com.openxc.BinaryMessages.SimpleMessage.getDefaultInstance()) return this; if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); + setName(other.getName()); } if (other.hasValue()) { mergeValue(other.getValue()); @@ -14616,73 +11449,79 @@ public final class BinaryMessages { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.openxc.BinaryMessages.SimpleMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.openxc.BinaryMessages.SimpleMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = com.openxc.BinaryMessages.DynamicField.newBuilder(); + if (hasValue()) { + subBuilder.mergeFrom(getValue()); + } + input.readMessage(subBuilder, extensionRegistry); + setValue(subBuilder.buildPartial()); + break; + } + case 26: { + com.openxc.BinaryMessages.DynamicField.Builder subBuilder = com.openxc.BinaryMessages.DynamicField.newBuilder(); + if (hasEvent()) { + subBuilder.mergeFrom(getEvent()); + } + input.readMessage(subBuilder, extensionRegistry); + setEvent(subBuilder.buildPartial()); + break; + } } } - return this; } + private int bitField0_; - + // optional string name = 1; private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional string name = 1; - */ - public java.lang.String getName() { + public String getName() { java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); name_ = s; return s; } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + return (String) ref; } } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { + public Builder setName(String value) { if (value == null) { throw new NullPointerException(); } @@ -14691,42 +11530,25 @@ public final class BinaryMessages { onChanged(); return this; } - /** - * optional string name = 1; - */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; name_ = value; onChanged(); - return this; } - + // optional .openxc.DynamicField value = 2; private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_; - /** - * optional .openxc.DynamicField value = 2; - */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicField getValue() { if (valueBuilder_ == null) { return value_; @@ -14734,9 +11556,6 @@ public final class BinaryMessages { return valueBuilder_.getMessage(); } } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder setValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { if (value == null) { @@ -14750,9 +11569,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder setValue( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { if (valueBuilder_ == null) { @@ -14764,9 +11580,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) { if (valueBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -14783,9 +11596,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000002; return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public Builder clearValue() { if (valueBuilder_ == null) { value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -14796,17 +11606,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() { bitField0_ |= 0x00000002; onChanged(); return getValueFieldBuilder().getBuilder(); } - /** - * optional .openxc.DynamicField value = 2; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() { if (valueBuilder_ != null) { return valueBuilder_.getMessageOrBuilder(); @@ -14814,9 +11618,6 @@ public final class BinaryMessages { return value_; } } - /** - * optional .openxc.DynamicField value = 2; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> getValueFieldBuilder() { @@ -14830,20 +11631,14 @@ public final class BinaryMessages { } return valueBuilder_; } - + // optional .openxc.DynamicField event = 3; private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_; - /** - * optional .openxc.DynamicField event = 3; - */ public boolean hasEvent() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicField getEvent() { if (eventBuilder_ == null) { return event_; @@ -14851,9 +11646,6 @@ public final class BinaryMessages { return eventBuilder_.getMessage(); } } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { if (value == null) { @@ -14867,9 +11659,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder setEvent( com.openxc.BinaryMessages.DynamicField.Builder builderForValue) { if (eventBuilder_ == null) { @@ -14881,9 +11670,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) { if (eventBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -14900,9 +11686,6 @@ public final class BinaryMessages { bitField0_ |= 0x00000004; return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public Builder clearEvent() { if (eventBuilder_ == null) { event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance(); @@ -14913,17 +11696,11 @@ public final class BinaryMessages { bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() { bitField0_ |= 0x00000004; onChanged(); return getEventFieldBuilder().getBuilder(); } - /** - * optional .openxc.DynamicField event = 3; - */ public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() { if (eventBuilder_ != null) { return eventBuilder_.getMessageOrBuilder(); @@ -14931,9 +11708,6 @@ public final class BinaryMessages { return event_; } } - /** - * optional .openxc.DynamicField event = 3; - */ private com.google.protobuf.SingleFieldBuilder< com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> getEventFieldBuilder() { @@ -14947,18 +11721,18 @@ public final class BinaryMessages { } return eventBuilder_; } - + // @@protoc_insertion_point(builder_scope:openxc.SimpleMessage) } - + static { defaultInstance = new SimpleMessage(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:openxc.SimpleMessage) } - + private static com.google.protobuf.Descriptors.Descriptor internal_static_openxc_VehicleMessage_descriptor; private static @@ -15054,7 +11828,7 @@ public final class BinaryMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_openxc_SimpleMessage_fieldAccessorTable; - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -15161,115 +11935,153 @@ 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", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", "Timestamp", }); + new java.lang.String[] { "Type", "CanMessage", "SimpleMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", "Timestamp", }, + com.openxc.BinaryMessages.VehicleMessage.class, + com.openxc.BinaryMessages.VehicleMessage.Builder.class); internal_static_openxc_CanMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_openxc_CanMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CanMessage_descriptor, - new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }); + new java.lang.String[] { "Bus", "Id", "Data", "FrameFormat", }, + com.openxc.BinaryMessages.CanMessage.class, + com.openxc.BinaryMessages.CanMessage.Builder.class); internal_static_openxc_ControlCommand_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_openxc_ControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ControlCommand_descriptor, - new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", "ModemConfigurationCommand", "RtcConfigurationCommand", }); + new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", "AcceptanceFilterBypassCommand", "PayloadFormatCommand", "PredefinedObd2RequestsCommand", "ModemConfigurationCommand", "RtcConfigurationCommand", }, + com.openxc.BinaryMessages.ControlCommand.class, + com.openxc.BinaryMessages.ControlCommand.Builder.class); internal_static_openxc_DiagnosticControlCommand_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticControlCommand_descriptor, - new java.lang.String[] { "Request", "Action", }); + new java.lang.String[] { "Request", "Action", }, + com.openxc.BinaryMessages.DiagnosticControlCommand.class, + com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class); internal_static_openxc_PassthroughModeControlCommand_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PassthroughModeControlCommand_descriptor, - new java.lang.String[] { "Bus", "Enabled", }); + new java.lang.String[] { "Bus", "Enabled", }, + com.openxc.BinaryMessages.PassthroughModeControlCommand.class, + com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class); internal_static_openxc_AcceptanceFilterBypassCommand_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_openxc_AcceptanceFilterBypassCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_AcceptanceFilterBypassCommand_descriptor, - new java.lang.String[] { "Bus", "Bypass", }); + new java.lang.String[] { "Bus", "Bypass", }, + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.class, + com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder.class); internal_static_openxc_PayloadFormatCommand_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_openxc_PayloadFormatCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PayloadFormatCommand_descriptor, - new java.lang.String[] { "Format", }); + new java.lang.String[] { "Format", }, + com.openxc.BinaryMessages.PayloadFormatCommand.class, + com.openxc.BinaryMessages.PayloadFormatCommand.Builder.class); internal_static_openxc_PredefinedObd2RequestsCommand_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_openxc_PredefinedObd2RequestsCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_PredefinedObd2RequestsCommand_descriptor, - new java.lang.String[] { "Enabled", }); + new java.lang.String[] { "Enabled", }, + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.class, + com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder.class); internal_static_openxc_NetworkOperatorSettings_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_openxc_NetworkOperatorSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_NetworkOperatorSettings_descriptor, - new java.lang.String[] { "AllowDataRoaming", "OperatorSelectMode", "NetworkDescriptor", }); + new java.lang.String[] { "AllowDataRoaming", "OperatorSelectMode", "NetworkDescriptor", }, + com.openxc.BinaryMessages.NetworkOperatorSettings.class, + com.openxc.BinaryMessages.NetworkOperatorSettings.Builder.class); internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor = internal_static_openxc_NetworkOperatorSettings_descriptor.getNestedTypes().get(0); internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_NetworkOperatorSettings_NetworkDescriptor_descriptor, - new java.lang.String[] { "PLMN", "NetworkType", }); + new java.lang.String[] { "PLMN", "NetworkType", }, + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.class, + com.openxc.BinaryMessages.NetworkOperatorSettings.NetworkDescriptor.Builder.class); internal_static_openxc_NetworkDataSettings_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_openxc_NetworkDataSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_NetworkDataSettings_descriptor, - new java.lang.String[] { "APN", }); + new java.lang.String[] { "APN", }, + com.openxc.BinaryMessages.NetworkDataSettings.class, + com.openxc.BinaryMessages.NetworkDataSettings.Builder.class); internal_static_openxc_ServerConnectSettings_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_openxc_ServerConnectSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ServerConnectSettings_descriptor, - new java.lang.String[] { "Host", "Port", }); + new java.lang.String[] { "Host", "Port", }, + com.openxc.BinaryMessages.ServerConnectSettings.class, + com.openxc.BinaryMessages.ServerConnectSettings.Builder.class); internal_static_openxc_ModemConfigurationCommand_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_openxc_ModemConfigurationCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_ModemConfigurationCommand_descriptor, - new java.lang.String[] { "NetworkOperatorSettings", "NetworkDataSettings", "ServerConnectSettings", }); + new java.lang.String[] { "NetworkOperatorSettings", "NetworkDataSettings", "ServerConnectSettings", }, + com.openxc.BinaryMessages.ModemConfigurationCommand.class, + com.openxc.BinaryMessages.ModemConfigurationCommand.Builder.class); internal_static_openxc_RTCConfigurationCommand_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_openxc_RTCConfigurationCommand_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_RTCConfigurationCommand_descriptor, - new java.lang.String[] { "UnixTime", }); + new java.lang.String[] { "UnixTime", }, + com.openxc.BinaryMessages.RTCConfigurationCommand.class, + com.openxc.BinaryMessages.RTCConfigurationCommand.Builder.class); internal_static_openxc_CommandResponse_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_openxc_CommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_CommandResponse_descriptor, - new java.lang.String[] { "Type", "Message", "Status", }); + new java.lang.String[] { "Type", "Message", "Status", }, + com.openxc.BinaryMessages.CommandResponse.class, + com.openxc.BinaryMessages.CommandResponse.Builder.class); internal_static_openxc_DiagnosticRequest_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticRequest_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", }, + com.openxc.BinaryMessages.DiagnosticRequest.class, + com.openxc.BinaryMessages.DiagnosticRequest.Builder.class); internal_static_openxc_DiagnosticResponse_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DiagnosticResponse_descriptor, - new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }); + new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", }, + com.openxc.BinaryMessages.DiagnosticResponse.class, + com.openxc.BinaryMessages.DiagnosticResponse.Builder.class); internal_static_openxc_DynamicField_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_openxc_DynamicField_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_DynamicField_descriptor, - new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }); + new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", }, + com.openxc.BinaryMessages.DynamicField.class, + com.openxc.BinaryMessages.DynamicField.Builder.class); internal_static_openxc_SimpleMessage_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_openxc_SimpleMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_openxc_SimpleMessage_descriptor, - new java.lang.String[] { "Name", "Value", "Event", }); + new java.lang.String[] { "Name", "Value", "Event", }, + com.openxc.BinaryMessages.SimpleMessage.class, + com.openxc.BinaryMessages.SimpleMessage.Builder.class); return null; } }; @@ -15278,6 +12090,6 @@ public final class BinaryMessages { new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } - + // @@protoc_insertion_point(outer_class_scope) } diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 023379de..718231b8 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -1,45 +1,43 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: openxc.proto -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor +from google.protobuf import message +from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) - -DESCRIPTOR = _descriptor.FileDescriptor( +DESCRIPTOR = descriptor.FileDescriptor( name='openxc.proto', package='openxc', serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x9b\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x11\n\ttimestamp\x18\x07 \x01(\x04\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x89\x06\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xd8\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\x12\x13\n\x0fSD_MOUNT_STATUS\x10\n\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') -_VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( +_VEHICLEMESSAGE_TYPE = descriptor.EnumDescriptor( name='Type', full_name='openxc.VehicleMessage.Type', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='CAN', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='SIMPLE', index=1, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='CONTROL_COMMAND', index=3, number=4, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='COMMAND_RESPONSE', index=4, number=5, options=None, type=None), @@ -50,17 +48,17 @@ _VEHICLEMESSAGE_TYPE = _descriptor.EnumDescriptor( serialized_end=436, ) -_CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( +_CANMESSAGE_FRAMEFORMAT = descriptor.EnumDescriptor( name='FrameFormat', full_name='openxc.CanMessage.FrameFormat', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='STANDARD', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='EXTENDED', index=1, number=2, options=None, type=None), @@ -71,49 +69,49 @@ _CANMESSAGE_FRAMEFORMAT = _descriptor.EnumDescriptor( serialized_end=587, ) -_CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( +_CONTROLCOMMAND_TYPE = descriptor.EnumDescriptor( name='Type', full_name='openxc.ControlCommand.Type', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='VERSION', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='DEVICE_ID', index=1, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='DIAGNOSTIC', index=2, number=3, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PASSTHROUGH', index=3, number=4, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='ACCEPTANCE_FILTER_BYPASS', index=4, number=5, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PAYLOAD_FORMAT', index=5, number=6, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PREDEFINED_OBD2_REQUESTS', index=6, number=7, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='MODEM_CONFIGURATION', index=7, number=8, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='RTC_CONFIGURATION', index=8, number=9, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='SD_MOUNT_STATUS', index=9, number=10, options=None, type=None), @@ -124,17 +122,17 @@ _CONTROLCOMMAND_TYPE = _descriptor.EnumDescriptor( serialized_end=1367, ) -_DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( +_DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( name='Action', full_name='openxc.DiagnosticControlCommand.Action', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='ADD', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='CANCEL', index=1, number=2, options=None, type=None), @@ -145,21 +143,21 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = _descriptor.EnumDescriptor( serialized_end=1528, ) -_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( +_PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( name='PayloadFormat', full_name='openxc.PayloadFormatCommand.PayloadFormat', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='JSON', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='PROTOBUF', index=1, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='MESSAGEPACK', index=2, number=3, options=None, type=None), @@ -170,17 +168,17 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = _descriptor.EnumDescriptor( serialized_end=1796, ) -_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = _descriptor.EnumDescriptor( +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescriptor( name='NetworkType', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='GSM', index=0, number=0, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='UTRAN', index=1, number=2, options=None, type=None), @@ -191,29 +189,29 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = _descriptor.EnumDescrip serialized_end=2213, ) -_NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = _descriptor.EnumDescriptor( +_NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( name='OperatorSelectMode', full_name='openxc.NetworkOperatorSettings.OperatorSelectMode', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='AUTOMATIC', index=0, number=0, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='MANUAL', index=1, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='DEREGISTER', index=2, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='SET_ONLY', index=3, number=3, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='MANUAL_AUTOMATIC', index=4, number=4, options=None, type=None), @@ -224,17 +222,17 @@ _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = _descriptor.EnumDescriptor( serialized_end=2314, ) -_DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( +_DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( name='DecodedType', full_name='openxc.DiagnosticRequest.DecodedType', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='NONE', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='OBD2', index=1, number=2, options=None, type=None), @@ -245,21 +243,21 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = _descriptor.EnumDescriptor( serialized_end=3016, ) -_DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( +_DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( name='Type', full_name='openxc.DynamicField.Type', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='STRING', index=0, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='NUM', index=1, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='BOOL', index=2, number=3, options=None, type=None), @@ -271,56 +269,56 @@ _DYNAMICFIELD_TYPE = _descriptor.EnumDescriptor( ) -_VEHICLEMESSAGE = _descriptor.Descriptor( +_VEHICLEMESSAGE = descriptor.Descriptor( name='VehicleMessage', full_name='openxc.VehicleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.VehicleMessage.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='can_message', full_name='openxc.VehicleMessage.can_message', index=1, number=2, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='simple_message', full_name='openxc.VehicleMessage.simple_message', index=2, number=3, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='diagnostic_response', full_name='openxc.VehicleMessage.diagnostic_response', index=3, number=4, 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), - _descriptor.FieldDescriptor( + 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='command_response', full_name='openxc.VehicleMessage.command_response', index=5, number=6, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='timestamp', full_name='openxc.VehicleMessage.timestamp', index=6, number=7, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, @@ -342,35 +340,35 @@ _VEHICLEMESSAGE = _descriptor.Descriptor( ) -_CANMESSAGE = _descriptor.Descriptor( +_CANMESSAGE = descriptor.Descriptor( name='CanMessage', full_name='openxc.CanMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.CanMessage.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( + descriptor.FieldDescriptor( name='id', full_name='openxc.CanMessage.id', index=1, number=2, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='data', full_name='openxc.CanMessage.data', index=2, number=3, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='frame_format', full_name='openxc.CanMessage.frame_format', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -392,63 +390,63 @@ _CANMESSAGE = _descriptor.Descriptor( ) -_CONTROLCOMMAND = _descriptor.Descriptor( +_CONTROLCOMMAND = descriptor.Descriptor( name='ControlCommand', full_name='openxc.ControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.ControlCommand.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='diagnostic_request', full_name='openxc.ControlCommand.diagnostic_request', index=1, number=2, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='passthrough_mode_request', full_name='openxc.ControlCommand.passthrough_mode_request', index=2, number=3, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='acceptance_filter_bypass_command', full_name='openxc.ControlCommand.acceptance_filter_bypass_command', index=3, number=4, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='payload_format_command', full_name='openxc.ControlCommand.payload_format_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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='predefined_obd2_requests_command', full_name='openxc.ControlCommand.predefined_obd2_requests_command', index=5, number=6, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='modem_configuration_command', full_name='openxc.ControlCommand.modem_configuration_command', index=6, number=7, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='rtc_configuration_command', full_name='openxc.ControlCommand.rtc_configuration_command', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -470,21 +468,21 @@ _CONTROLCOMMAND = _descriptor.Descriptor( ) -_DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( +_DIAGNOSTICCONTROLCOMMAND = descriptor.Descriptor( name='DiagnosticControlCommand', full_name='openxc.DiagnosticControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='request', full_name='openxc.DiagnosticControlCommand.request', index=0, number=1, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='action', full_name='openxc.DiagnosticControlCommand.action', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -506,21 +504,21 @@ _DIAGNOSTICCONTROLCOMMAND = _descriptor.Descriptor( ) -_PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( +_PASSTHROUGHMODECONTROLCOMMAND = descriptor.Descriptor( name='PassthroughModeControlCommand', full_name='openxc.PassthroughModeControlCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.PassthroughModeControlCommand.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( + descriptor.FieldDescriptor( name='enabled', full_name='openxc.PassthroughModeControlCommand.enabled', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -541,21 +539,21 @@ _PASSTHROUGHMODECONTROLCOMMAND = _descriptor.Descriptor( ) -_ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( +_ACCEPTANCEFILTERBYPASSCOMMAND = descriptor.Descriptor( name='AcceptanceFilterBypassCommand', full_name='openxc.AcceptanceFilterBypassCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.AcceptanceFilterBypassCommand.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( + descriptor.FieldDescriptor( name='bypass', full_name='openxc.AcceptanceFilterBypassCommand.bypass', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -576,14 +574,14 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = _descriptor.Descriptor( ) -_PAYLOADFORMATCOMMAND = _descriptor.Descriptor( +_PAYLOADFORMATCOMMAND = descriptor.Descriptor( name='PayloadFormatCommand', full_name='openxc.PayloadFormatCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='format', full_name='openxc.PayloadFormatCommand.format', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -605,14 +603,14 @@ _PAYLOADFORMATCOMMAND = _descriptor.Descriptor( ) -_PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( +_PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( name='PredefinedObd2RequestsCommand', full_name='openxc.PredefinedObd2RequestsCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='enabled', full_name='openxc.PredefinedObd2RequestsCommand.enabled', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -633,21 +631,21 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = _descriptor.Descriptor( ) -_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = _descriptor.Descriptor( +_NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( name='NetworkDescriptor', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='PLMN', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.PLMN', index=0, number=1, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='networkType', full_name='openxc.NetworkOperatorSettings.NetworkDescriptor.networkType', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, @@ -668,28 +666,28 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = _descriptor.Descriptor( serialized_end=2213, ) -_NETWORKOPERATORSETTINGS = _descriptor.Descriptor( +_NETWORKOPERATORSETTINGS = descriptor.Descriptor( name='NetworkOperatorSettings', full_name='openxc.NetworkOperatorSettings', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='allowDataRoaming', full_name='openxc.NetworkOperatorSettings.allowDataRoaming', index=0, number=1, 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( + descriptor.FieldDescriptor( name='operatorSelectMode', full_name='openxc.NetworkOperatorSettings.operatorSelectMode', index=1, number=2, type=14, cpp_type=8, 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( + descriptor.FieldDescriptor( name='networkDescriptor', full_name='openxc.NetworkOperatorSettings.networkDescriptor', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -711,14 +709,14 @@ _NETWORKOPERATORSETTINGS = _descriptor.Descriptor( ) -_NETWORKDATASETTINGS = _descriptor.Descriptor( +_NETWORKDATASETTINGS = descriptor.Descriptor( name='NetworkDataSettings', full_name='openxc.NetworkDataSettings', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='APN', full_name='openxc.NetworkDataSettings.APN', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), @@ -739,21 +737,21 @@ _NETWORKDATASETTINGS = _descriptor.Descriptor( ) -_SERVERCONNECTSETTINGS = _descriptor.Descriptor( +_SERVERCONNECTSETTINGS = descriptor.Descriptor( name='ServerConnectSettings', full_name='openxc.ServerConnectSettings', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='host', full_name='openxc.ServerConnectSettings.host', index=0, number=1, 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='port', full_name='openxc.ServerConnectSettings.port', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, @@ -774,28 +772,28 @@ _SERVERCONNECTSETTINGS = _descriptor.Descriptor( ) -_MODEMCONFIGURATIONCOMMAND = _descriptor.Descriptor( +_MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( name='ModemConfigurationCommand', full_name='openxc.ModemConfigurationCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='networkOperatorSettings', full_name='openxc.ModemConfigurationCommand.networkOperatorSettings', index=0, number=1, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='networkDataSettings', full_name='openxc.ModemConfigurationCommand.networkDataSettings', index=1, number=2, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='serverConnectSettings', full_name='openxc.ModemConfigurationCommand.serverConnectSettings', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -816,14 +814,14 @@ _MODEMCONFIGURATIONCOMMAND = _descriptor.Descriptor( ) -_RTCCONFIGURATIONCOMMAND = _descriptor.Descriptor( +_RTCCONFIGURATIONCOMMAND = descriptor.Descriptor( name='RTCConfigurationCommand', full_name='openxc.RTCConfigurationCommand', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='unix_time', full_name='openxc.RTCConfigurationCommand.unix_time', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, @@ -844,28 +842,28 @@ _RTCCONFIGURATIONCOMMAND = _descriptor.Descriptor( ) -_COMMANDRESPONSE = _descriptor.Descriptor( +_COMMANDRESPONSE = descriptor.Descriptor( name='CommandResponse', full_name='openxc.CommandResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.CommandResponse.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='message', full_name='openxc.CommandResponse.message', index=1, number=2, 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='status', full_name='openxc.CommandResponse.status', index=2, number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -886,70 +884,70 @@ _COMMANDRESPONSE = _descriptor.Descriptor( ) -_DIAGNOSTICREQUEST = _descriptor.Descriptor( +_DIAGNOSTICREQUEST = descriptor.Descriptor( name='DiagnosticRequest', full_name='openxc.DiagnosticRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.DiagnosticRequest.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( + descriptor.FieldDescriptor( name='message_id', full_name='openxc.DiagnosticRequest.message_id', index=1, number=2, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='mode', full_name='openxc.DiagnosticRequest.mode', index=2, number=3, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='pid', full_name='openxc.DiagnosticRequest.pid', index=3, number=4, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticRequest.payload', index=4, number=5, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( 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( + descriptor.FieldDescriptor( name='frequency', full_name='openxc.DiagnosticRequest.frequency', 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( + descriptor.FieldDescriptor( name='name', full_name='openxc.DiagnosticRequest.name', index=7, number=8, 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='decoded_type', full_name='openxc.DiagnosticRequest.decoded_type', index=8, number=9, type=14, cpp_type=8, label=1, has_default_value=False, default_value=1, @@ -971,63 +969,63 @@ _DIAGNOSTICREQUEST = _descriptor.Descriptor( ) -_DIAGNOSTICRESPONSE = _descriptor.Descriptor( +_DIAGNOSTICRESPONSE = descriptor.Descriptor( name='DiagnosticResponse', full_name='openxc.DiagnosticResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='bus', full_name='openxc.DiagnosticResponse.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( + descriptor.FieldDescriptor( name='message_id', full_name='openxc.DiagnosticResponse.message_id', index=1, number=2, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='mode', full_name='openxc.DiagnosticResponse.mode', index=2, number=3, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='pid', full_name='openxc.DiagnosticResponse.pid', index=3, number=4, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='success', full_name='openxc.DiagnosticResponse.success', index=4, number=5, 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( + descriptor.FieldDescriptor( name='negative_response_code', full_name='openxc.DiagnosticResponse.negative_response_code', index=5, number=6, type=13, cpp_type=3, 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( + descriptor.FieldDescriptor( name='payload', full_name='openxc.DiagnosticResponse.payload', index=6, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='value', full_name='openxc.DiagnosticResponse.value', index=7, number=8, type=1, cpp_type=5, label=1, has_default_value=False, default_value=0, @@ -1048,35 +1046,35 @@ _DIAGNOSTICRESPONSE = _descriptor.Descriptor( ) -_DYNAMICFIELD = _descriptor.Descriptor( +_DYNAMICFIELD = descriptor.Descriptor( name='DynamicField', full_name='openxc.DynamicField', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='type', full_name='openxc.DynamicField.type', 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='string_value', full_name='openxc.DynamicField.string_value', index=1, number=2, 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='numeric_value', full_name='openxc.DynamicField.numeric_value', index=2, number=3, 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( + descriptor.FieldDescriptor( name='boolean_value', full_name='openxc.DynamicField.boolean_value', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, @@ -1098,28 +1096,28 @@ _DYNAMICFIELD = _descriptor.Descriptor( ) -_SIMPLEMESSAGE = _descriptor.Descriptor( +_SIMPLEMESSAGE = descriptor.Descriptor( name='SimpleMessage', full_name='openxc.SimpleMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='name', full_name='openxc.SimpleMessage.name', index=0, number=1, 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, options=None), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='value', full_name='openxc.SimpleMessage.value', index=1, number=2, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='event', full_name='openxc.SimpleMessage.event', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -1197,121 +1195,118 @@ DESCRIPTOR.message_types_by_name['DiagnosticResponse'] = _DIAGNOSTICRESPONSE DESCRIPTOR.message_types_by_name['DynamicField'] = _DYNAMICFIELD DESCRIPTOR.message_types_by_name['SimpleMessage'] = _SIMPLEMESSAGE -class VehicleMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class VehicleMessage(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _VEHICLEMESSAGE - + # @@protoc_insertion_point(class_scope:openxc.VehicleMessage) -class CanMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class CanMessage(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _CANMESSAGE - + # @@protoc_insertion_point(class_scope:openxc.CanMessage) -class ControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class ControlCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _CONTROLCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.ControlCommand) -class DiagnosticControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class DiagnosticControlCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _DIAGNOSTICCONTROLCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand) -class PassthroughModeControlCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class PassthroughModeControlCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _PASSTHROUGHMODECONTROLCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand) -class AcceptanceFilterBypassCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class AcceptanceFilterBypassCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _ACCEPTANCEFILTERBYPASSCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.AcceptanceFilterBypassCommand) -class PayloadFormatCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class PayloadFormatCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _PAYLOADFORMATCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.PayloadFormatCommand) -class PredefinedObd2RequestsCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class PredefinedObd2RequestsCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _PREDEFINEDOBD2REQUESTSCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.PredefinedObd2RequestsCommand) -class NetworkOperatorSettings(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType - - class NetworkDescriptor(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class NetworkOperatorSettings(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + + class NetworkDescriptor(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR - + # @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings.NetworkDescriptor) DESCRIPTOR = _NETWORKOPERATORSETTINGS - + # @@protoc_insertion_point(class_scope:openxc.NetworkOperatorSettings) -class NetworkDataSettings(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class NetworkDataSettings(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _NETWORKDATASETTINGS - + # @@protoc_insertion_point(class_scope:openxc.NetworkDataSettings) -class ServerConnectSettings(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class ServerConnectSettings(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _SERVERCONNECTSETTINGS - + # @@protoc_insertion_point(class_scope:openxc.ServerConnectSettings) -class ModemConfigurationCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class ModemConfigurationCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _MODEMCONFIGURATIONCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.ModemConfigurationCommand) -class RTCConfigurationCommand(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class RTCConfigurationCommand(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _RTCCONFIGURATIONCOMMAND - + # @@protoc_insertion_point(class_scope:openxc.RTCConfigurationCommand) -class CommandResponse(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class CommandResponse(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _COMMANDRESPONSE - + # @@protoc_insertion_point(class_scope:openxc.CommandResponse) -class DiagnosticRequest(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class DiagnosticRequest(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _DIAGNOSTICREQUEST - + # @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest) -class DiagnosticResponse(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class DiagnosticResponse(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _DIAGNOSTICRESPONSE - + # @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse) -class DynamicField(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class DynamicField(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _DYNAMICFIELD - + # @@protoc_insertion_point(class_scope:openxc.DynamicField) -class SimpleMessage(_message.Message): - __metaclass__ = _reflection.GeneratedProtocolMessageType +class SimpleMessage(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _SIMPLEMESSAGE - + # @@protoc_insertion_point(class_scope:openxc.SimpleMessage) - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), '\n\ncom.openxcB\016BinaryMessages') # @@protoc_insertion_point(module_scope) -- cgit 1.2.3-korg From 57d06d4880cdb31f8f8448d8a5a9089a795a57de Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Fri, 4 Mar 2016 10:36:30 -0500 Subject: whitespace fix --- openxc.proto | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openxc.proto b/openxc.proto index 6d41325b..80ffc507 100644 --- a/openxc.proto +++ b/openxc.proto @@ -13,7 +13,7 @@ message VehicleMessage { optional DiagnosticResponse diagnostic_response = 4; optional ControlCommand control_command = 5; optional CommandResponse command_response = 6; - optional uint64 timestamp = 7; + optional uint64 timestamp = 7; } message CanMessage { @@ -36,9 +36,9 @@ message ControlCommand { ACCEPTANCE_FILTER_BYPASS = 5; PAYLOAD_FORMAT = 6; PREDEFINED_OBD2_REQUESTS = 7; - MODEM_CONFIGURATION = 8; - RTC_CONFIGURATION = 9; - SD_MOUNT_STATUS = 10; + MODEM_CONFIGURATION = 8; + RTC_CONFIGURATION = 9; + SD_MOUNT_STATUS = 10; } optional Type type = 1; @@ -47,8 +47,8 @@ message ControlCommand { optional AcceptanceFilterBypassCommand acceptance_filter_bypass_command = 4; optional PayloadFormatCommand payload_format_command = 5; optional PredefinedObd2RequestsCommand predefined_obd2_requests_command = 6; - optional ModemConfigurationCommand modem_configuration_command = 7; - optional RTCConfigurationCommand rtc_configuration_command = 8; + optional ModemConfigurationCommand modem_configuration_command = 7; + optional RTCConfigurationCommand rtc_configuration_command = 8; } message DiagnosticControlCommand { @@ -72,7 +72,7 @@ message PayloadFormatCommand { enum PayloadFormat { JSON = 1; PROTOBUF = 2; - MESSAGEPACK = 3; + MESSAGEPACK = 3; } optional PayloadFormat format = 1; -- cgit 1.2.3-korg From 3fdb20368c293dce5c69911f7024183191f86da2 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Thu, 17 Mar 2016 11:42:45 -0400 Subject: added mp comments --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 53b7c786..77758b83 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,19 @@ sent from the VI, trading off flexibility for efficiency. ## Message Pack MessagePack is an efficient binary serialization format. It lets you exchange data -among multiple languages like JSON. But it's faster and smaller. Small integers are +among multiple languages like JSON, but it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves -For protocol specification visit +For protocol specification visit: https://github.com/msgpack/msgpack/blob/master/spec.md +We are using the following lib: +https://github.com/camgunz/cmp + +MessagePack provides a binary alternative to ProtoBuf. There are pros & cons to each +so you can decide what works best for your project. + ## Trace File Format An OpenXC vehicle trace file is a plaintext file that contains JSON objects, -- cgit 1.2.3-korg From 94c09b2abeff3f344d688dd7e6aea0db34f50c59 Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Thu, 21 Apr 2016 17:52:05 +0000 Subject: add new C5 commands to JSON. Added ToC for this file. --- JSON.mkd | 72 +++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 17 deletions(-) diff --git a/JSON.mkd b/JSON.mkd index cddfc4e7..d320aad0 100644 --- a/JSON.mkd +++ b/JSON.mkd @@ -2,21 +2,16 @@ Each JSON message published by a VI is delimited with a `\0 ` character. -## Extra Values +## Table of Contents +1. [Vehicle Messages](#vehicle-messages) +2. [CAN Message](#can-message) +3. [Diagnostic Message](#diagnostic-message) +4. [Commands](#commands) +5. [Extra Values](#extra-values) -Any of the following JSON objects may optionally include an `extras` -field. The value may be any valid JSON object or array. The client libraries -will do their best to parse this information into a generic format and pass it -to your application. For example: +## Vehicle Messages - {"name": "steering_wheel_angle", - "value": 45, - "extras": { - "calibrated": false - } - } - -## Simple Vehicle Message +### Simple Vehicle Message There may not be a 1:1 relationship between input and output signals - i.e. engine timing CAN signals may be summarized in an "engine performance" metric on @@ -26,7 +21,7 @@ The expected format of a single valued message is: {"name": "steering_wheel_angle", "value": 45} -## Evented Simple Vehicle Message +### Evented Simple Vehicle Message The expected format of an event message is: @@ -57,7 +52,7 @@ The format for a plain CAN message: of `standard` or `extended`. If the `id` is greater than `0x7ff`, the extended frame format will be selected automatically. -## Diagnostic Messages +## Diagnostic Message ### Requests @@ -377,7 +372,7 @@ the response will be `true`. The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles. -The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [c5_cellular_config](https://github.com/openxc/vi-firmware/docs/advanced/c5_cell_config.mkd) documentation. +The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [c5_cellular_config](https://github.com/openxc/vi-firmware/docs/advanced/c5_cell_config.html) documentation. Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only. @@ -394,4 +389,47 @@ The ServerConnectSettings part of ModemConfigurationCommand allows the user to s **Response** - { "command_response": "modem_configuration", "status": true} \ No newline at end of file + { "command_response": "modem_configuration", "status": true} + +## C5 SD Card Status + +In order to check the status of the SD card, the following command is available: + + { "command": "sd_mount_status"} + +Command response if the SD card is mounted correctly: + + { "command_response": "sd_mount_status", "status": true} + +If the SD card is full, not enabled, or connected as a MSD, the device will respond with: + + { "command_response": "sd_mount_status", "status": false} + +For more info see [c5_msd](https://github.com/openxc/vi-firmware/docs/advanced/msd.html). + +## C5 RTC Configuration + +To set the current time of the RTC, the following + + { "command": "rtc_configuration", "unix_time": "1448551563"} + +The response is + + { "command_response": "rtc_configuration", "status": true} + +For more info see [c5_rtc](https://github.com/openxc/vi-firmware/docs/advanced/rtc.html). + +## Extra Values + +Any of the following JSON objects may optionally include an `extras` +field. The value may be any valid JSON object or array. The client libraries +will do their best to parse this information into a generic format and pass it +to your application. For example: + + {"name": "steering_wheel_angle", + "value": 45, + "extras": { + "calibrated": false + } + } + -- cgit 1.2.3-korg From bd624295d05e4420d21aea97499208efc3868c95 Mon Sep 17 00:00:00 2001 From: Zac Nelson Date: Thu, 4 Aug 2016 10:50:18 -0700 Subject: increase payload size for diagnostic response. still need to generate the files. --- openxc.options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openxc.options b/openxc.options index b434578b..53726fc4 100644 --- a/openxc.options +++ b/openxc.options @@ -1,7 +1,7 @@ openxc.SimpleMessage.name max_size:100 openxc.DynamicField.string_value max_size:100 openxc.CommandResponse.message max_size:128 -openxc.DiagnosticResponse.payload max_size:8 +openxc.DiagnosticResponse.payload max_size:255 openxc.DiagnosticRequest.name max_size:10 openxc.DiagnosticRequest.payload max_size:8 openxc.CanMessage.data max_size:8 -- cgit 1.2.3-korg From 71e101af547dabd50e2a7b645eba7524b05218cb Mon Sep 17 00:00:00 2001 From: Eric Marsman Date: Thu, 4 Aug 2016 20:05:26 +0000 Subject: make results --- gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index f834836d..dc90530e 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 Mon Feb 29 19:42:01 2016. */ +/* Generated by nanopb-0.3.1 at Thu Aug 4 17:56:35 2016. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index 11386e3e..a15e44ba 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 Mon Feb 29 19:42:01 2016. */ +/* Generated by nanopb-0.3.1 at Thu Aug 4 17:56:35 2016. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -132,7 +132,7 @@ typedef struct _openxc_DiagnosticRequest { openxc_DiagnosticRequest_DecodedType decoded_type; } openxc_DiagnosticRequest; -typedef PB_BYTES_ARRAY_T(8) openxc_DiagnosticResponse_payload_t; +typedef PB_BYTES_ARRAY_T(255) openxc_DiagnosticResponse_payload_t; typedef struct _openxc_DiagnosticResponse { bool has_bus; @@ -414,7 +414,7 @@ extern const pb_field_t openxc_SimpleMessage_fields[4]; #define openxc_RTCConfigurationCommand_size 6 #define openxc_CommandResponse_size 139 #define openxc_DiagnosticRequest_size 68 -#define openxc_DiagnosticResponse_size 56 +#define openxc_DiagnosticResponse_size 304 #define openxc_DynamicField_size 119 #define openxc_SimpleMessage_size 344 -- cgit 1.2.3-korg From 74608488b95bda83fc67a6eb25715e7a7cb0e0d1 Mon Sep 17 00:00:00 2001 From: Zac Nelson Date: Mon, 22 Aug 2016 17:09:30 -0700 Subject: update changelog. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd680d0..f2f8a7a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # OpenXC Message Format Changelog +## v0.6.1 + +* Improvement: Increase diagnostic response payload size to accommodate + multi-frame diagnostic responses. + ## v0.6.0 * Feature: Added MessagePack support for BTLE connections. -- cgit 1.2.3-korg From d95233833f8a3b763acacaf188a85f98928a4ff2 Mon Sep 17 00:00:00 2001 From: rwoberholzer Date: Wed, 14 Sep 2016 17:04:56 +0000 Subject: Added platform to message format --- CHANGELOG.md | 4 ++ gen/cpp/openxc.pb | Bin 3483 -> 3497 bytes gen/cpp/openxc.pb.c | 2 +- gen/cpp/openxc.pb.h | 5 +- gen/java/com/openxc/BinaryMessages.java | 116 +++++++++++++++++--------------- gen/python/openxc_pb2.py | 98 ++++++++++++++------------- openxc.proto | 1 + 7 files changed, 120 insertions(+), 106 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f8a7a5..4ef70eff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # OpenXC Message Format Changelog +## v0.7.0 + +* Feature: Added command to get device's platform + ## v0.6.1 * Improvement: Increase diagnostic response payload size to accommodate diff --git a/gen/cpp/openxc.pb b/gen/cpp/openxc.pb index 20543fe9..104c2065 100644 Binary files a/gen/cpp/openxc.pb and b/gen/cpp/openxc.pb differ diff --git a/gen/cpp/openxc.pb.c b/gen/cpp/openxc.pb.c index dc90530e..9b90c36b 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 Thu Aug 4 17:56:35 2016. */ +/* Generated by nanopb-0.3.1 at Wed Sep 14 16:47:53 2016. */ #include "openxc.pb.h" diff --git a/gen/cpp/openxc.pb.h b/gen/cpp/openxc.pb.h index a15e44ba..09735ee7 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 Thu Aug 4 17:56:35 2016. */ +/* Generated by nanopb-0.3.1 at Wed Sep 14 16:47:53 2016. */ #ifndef PB_OPENXC_PB_H_INCLUDED #define PB_OPENXC_PB_H_INCLUDED @@ -37,7 +37,8 @@ typedef enum _openxc_ControlCommand_Type { openxc_ControlCommand_Type_PREDEFINED_OBD2_REQUESTS = 7, openxc_ControlCommand_Type_MODEM_CONFIGURATION = 8, openxc_ControlCommand_Type_RTC_CONFIGURATION = 9, - openxc_ControlCommand_Type_SD_MOUNT_STATUS = 10 + openxc_ControlCommand_Type_SD_MOUNT_STATUS = 10, + openxc_ControlCommand_Type_PLATFORM = 11 } openxc_ControlCommand_Type; typedef enum _openxc_DiagnosticControlCommand_Action { diff --git a/gen/java/com/openxc/BinaryMessages.java b/gen/java/com/openxc/BinaryMessages.java index 534b2231..4fad1d6a 100644 --- a/gen/java/com/openxc/BinaryMessages.java +++ b/gen/java/com/openxc/BinaryMessages.java @@ -1877,6 +1877,7 @@ public final class BinaryMessages { MODEM_CONFIGURATION(7, 8), RTC_CONFIGURATION(8, 9), SD_MOUNT_STATUS(9, 10), + PLATFORM(10, 11), ; public static final int VERSION_VALUE = 1; @@ -1889,6 +1890,7 @@ public final class BinaryMessages { public static final int MODEM_CONFIGURATION_VALUE = 8; public static final int RTC_CONFIGURATION_VALUE = 9; public static final int SD_MOUNT_STATUS_VALUE = 10; + public static final int PLATFORM_VALUE = 11; public final int getNumber() { return value; } @@ -1905,6 +1907,7 @@ public final class BinaryMessages { case 8: return MODEM_CONFIGURATION; case 9: return RTC_CONFIGURATION; case 10: return SD_MOUNT_STATUS; + case 11: return PLATFORM; default: return null; } } @@ -1935,7 +1938,7 @@ public final class BinaryMessages { } private static final Type[] VALUES = { - VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, RTC_CONFIGURATION, SD_MOUNT_STATUS, + VERSION, DEVICE_ID, DIAGNOSTIC, PASSTHROUGH, ACCEPTANCE_FILTER_BYPASS, PAYLOAD_FORMAT, PREDEFINED_OBD2_REQUESTS, MODEM_CONFIGURATION, RTC_CONFIGURATION, SD_MOUNT_STATUS, PLATFORM, }; public static Type valueOf( @@ -11851,7 +11854,7 @@ public final class BinaryMessages { "\nCanMessage\022\013\n\003bus\030\001 \001(\005\022\n\n\002id\030\002 \001(\r\022\014\n\004" + "data\030\003 \001(\014\0224\n\014frame_format\030\004 \001(\0162\036.openx" + "c.CanMessage.FrameFormat\")\n\013FrameFormat\022" + - "\014\n\010STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\211\006\n\016ControlC" + + "\014\n\010STANDARD\020\001\022\014\n\010EXTENDED\020\002\"\227\006\n\016ControlC" + "ommand\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCom" + "mand.Type\022<\n\022diagnostic_request\030\002 \001(\0132 ." + "openxc.DiagnosticControlCommand\022G\n\030passt" + @@ -11865,65 +11868,66 @@ public final class BinaryMessages { "sCommand\022F\n\033modem_configuration_command\030" + "\007 \001(\0132!.openxc.ModemConfigurationCommand" + "\022B\n\031rtc_configuration_command\030\010 \001(\0132\037.op" + - "enxc.RTCConfigurationCommand\"\330\001\n\004Type\022\013\n" + + "enxc.RTCConfigurationCommand\"\346\001\n\004Type\022\013\n" + "\007VERSION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020", "\003\022\017\n\013PASSTHROUGH\020\004\022\034\n\030ACCEPTANCE_FILTER_" + "BYPASS\020\005\022\022\n\016PAYLOAD_FORMAT\020\006\022\034\n\030PREDEFIN" + "ED_OBD2_REQUESTS\020\007\022\027\n\023MODEM_CONFIGURATIO" + "N\020\010\022\025\n\021RTC_CONFIGURATION\020\t\022\023\n\017SD_MOUNT_S" + - "TATUS\020\n\"\236\001\n\030DiagnosticControlCommand\022*\n\007" + - "request\030\001 \001(\0132\031.openxc.DiagnosticRequest" + - "\0227\n\006action\030\002 \001(\0162\'.openxc.DiagnosticCont" + - "rolCommand.Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006" + - "CANCEL\020\002\"=\n\035PassthroughModeControlComman" + - "d\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030\002 \001(\010\"<\n\035Accep", - "tanceFilterBypassCommand\022\013\n\003bus\030\001 \001(\005\022\016\n" + - "\006bypass\030\002 \001(\010\"\214\001\n\024PayloadFormatCommand\022:" + - "\n\006format\030\001 \001(\0162*.openxc.PayloadFormatCom" + - "mand.PayloadFormat\"8\n\rPayloadFormat\022\010\n\004J" + - "SON\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013MESSAGEPACK\020\003\"0\n\035" + - "PredefinedObd2RequestsCommand\022\017\n\007enabled" + - "\030\001 \001(\010\"\321\003\n\027NetworkOperatorSettings\022\030\n\020al" + - "lowDataRoaming\030\001 \001(\010\022N\n\022operatorSelectMo" + - "de\030\002 \001(\01622.openxc.NetworkOperatorSetting" + - "s.OperatorSelectMode\022L\n\021networkDescripto", - "r\030\003 \001(\01321.openxc.NetworkOperatorSettings" + - ".NetworkDescriptor\032\230\001\n\021NetworkDescriptor" + - "\022\014\n\004PLMN\030\001 \001(\r\022R\n\013networkType\030\002 \001(\0162=.op" + - "enxc.NetworkOperatorSettings.NetworkDesc" + - "riptor.NetworkType\"!\n\013NetworkType\022\007\n\003GSM" + - "\020\000\022\t\n\005UTRAN\020\002\"c\n\022OperatorSelectMode\022\r\n\tA" + - "UTOMATIC\020\000\022\n\n\006MANUAL\020\001\022\016\n\nDEREGISTER\020\002\022\014" + - "\n\010SET_ONLY\020\003\022\024\n\020MANUAL_AUTOMATIC\020\004\"\"\n\023Ne" + - "tworkDataSettings\022\013\n\003APN\030\001 \001(\t\"3\n\025Server" + - "ConnectSettings\022\014\n\004host\030\001 \001(\t\022\014\n\004port\030\002 ", - "\001(\r\"\325\001\n\031ModemConfigurationCommand\022@\n\027net" + - "workOperatorSettings\030\001 \001(\0132\037.openxc.Netw" + - "orkOperatorSettings\0228\n\023networkDataSettin" + - "gs\030\002 \001(\0132\033.openxc.NetworkDataSettings\022<\n" + - "\025serverConnectSettings\030\003 \001(\0132\035.openxc.Se" + - "rverConnectSettings\",\n\027RTCConfigurationC" + - "ommand\022\021\n\tunix_time\030\001 \001(\r\"]\n\017CommandResp" + - "onse\022)\n\004type\030\001 \001(\0162\033.openxc.ControlComma" + - "nd.Type\022\017\n\007message\030\002 \001(\t\022\016\n\006status\030\003 \001(\010" + - "\"\375\001\n\021DiagnosticRequest\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\007payload\030\005 \001(\014\022\032\n\022multiple_response" + - "s\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%.openxc.Diagnost" + - "icRequest.DecodedType\"!\n\013DecodedType\022\010\n\004" + - "NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022DiagnosticResponse\022" + - "\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode" + - "\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026" + - "negative_response_code\030\006 \001(\r\022\017\n\007payload\030" + - "\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n", - "\004type\030\001 \001(\0162\031.openxc.DynamicField.Type\022\024" + - "\n\014string_value\030\002 \001(\t\022\025\n\rnumeric_value\030\003 " + - "\001(\001\022\025\n\rboolean_value\030\004 \001(\010\"%\n\004Type\022\n\n\006ST" + - "RING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\"g\n\rSimpleMessa" + - "ge\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.openxc" + - ".DynamicField\022#\n\005event\030\003 \001(\0132\024.openxc.Dy" + - "namicFieldB\034\n\ncom.openxcB\016BinaryMessages" + "TATUS\020\n\022\014\n\010PLATFORM\020\013\"\236\001\n\030DiagnosticCont" + + "rolCommand\022*\n\007request\030\001 \001(\0132\031.openxc.Dia" + + "gnosticRequest\0227\n\006action\030\002 \001(\0162\'.openxc." + + "DiagnosticControlCommand.Action\"\035\n\006Actio" + + "n\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"=\n\035PassthroughMod" + + "eControlCommand\022\013\n\003bus\030\001 \001(\005\022\017\n\007enabled\030", + "\002 \001(\010\"<\n\035AcceptanceFilterBypassCommand\022\013" + + "\n\003bus\030\001 \001(\005\022\016\n\006bypass\030\002 \001(\010\"\214\001\n\024PayloadF" + + "ormatCommand\022:\n\006format\030\001 \001(\0162*.openxc.Pa" + + "yloadFormatCommand.PayloadFormat\"8\n\rPayl" + + "oadFormat\022\010\n\004JSON\020\001\022\014\n\010PROTOBUF\020\002\022\017\n\013MES" + + "SAGEPACK\020\003\"0\n\035PredefinedObd2RequestsComm" + + "and\022\017\n\007enabled\030\001 \001(\010\"\321\003\n\027NetworkOperator" + + "Settings\022\030\n\020allowDataRoaming\030\001 \001(\010\022N\n\022op" + + "eratorSelectMode\030\002 \001(\01622.openxc.NetworkO" + + "peratorSettings.OperatorSelectMode\022L\n\021ne", + "tworkDescriptor\030\003 \001(\01321.openxc.NetworkOp" + + "eratorSettings.NetworkDescriptor\032\230\001\n\021Net" + + "workDescriptor\022\014\n\004PLMN\030\001 \001(\r\022R\n\013networkT" + + "ype\030\002 \001(\0162=.openxc.NetworkOperatorSettin" + + "gs.NetworkDescriptor.NetworkType\"!\n\013Netw" + + "orkType\022\007\n\003GSM\020\000\022\t\n\005UTRAN\020\002\"c\n\022OperatorS" + + "electMode\022\r\n\tAUTOMATIC\020\000\022\n\n\006MANUAL\020\001\022\016\n\n" + + "DEREGISTER\020\002\022\014\n\010SET_ONLY\020\003\022\024\n\020MANUAL_AUT" + + "OMATIC\020\004\"\"\n\023NetworkDataSettings\022\013\n\003APN\030\001" + + " \001(\t\"3\n\025ServerConnectSettings\022\014\n\004host\030\001 ", + "\001(\t\022\014\n\004port\030\002 \001(\r\"\325\001\n\031ModemConfiguration" + + "Command\022@\n\027networkOperatorSettings\030\001 \001(\013" + + "2\037.openxc.NetworkOperatorSettings\0228\n\023net" + + "workDataSettings\030\002 \001(\0132\033.openxc.NetworkD" + + "ataSettings\022<\n\025serverConnectSettings\030\003 \001" + + "(\0132\035.openxc.ServerConnectSettings\",\n\027RTC" + + "ConfigurationCommand\022\021\n\tunix_time\030\001 \001(\r\"" + + "]\n\017CommandResponse\022)\n\004type\030\001 \001(\0162\033.openx" + + "c.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\003", + "bus\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\022mul" + + "tiple_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%.o" + + "penxc.DiagnosticRequest.DecodedType\"!\n\013D" + + "ecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022Diagn" + + "osticResponse\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\007suc" + + "cess\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\014D", + "ynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dynam" + + "icField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rnu" + + "meric_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\"" + + "g\n\rSimpleMessage\022\014\n\004name\030\001 \001(\t\022#\n\005value\030" + + "\002 \001(\0132\024.openxc.DynamicField\022#\n\005event\030\003 \001" + + "(\0132\024.openxc.DynamicFieldB\034\n\ncom.openxcB\016" + + "BinaryMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/gen/python/openxc_pb2.py b/gen/python/openxc_pb2.py index 718231b8..cd5ec5f0 100644 --- a/gen/python/openxc_pb2.py +++ b/gen/python/openxc_pb2.py @@ -11,7 +11,7 @@ from google.protobuf import descriptor_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='openxc.proto', package='openxc', - serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x9b\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x11\n\ttimestamp\x18\x07 \x01(\x04\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x89\x06\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xd8\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\x12\x13\n\x0fSD_MOUNT_STATUS\x10\n\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') + serialized_pb='\n\x0copenxc.proto\x12\x06openxc\"\x9b\x03\n\x0eVehicleMessage\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.openxc.VehicleMessage.Type\x12\'\n\x0b\x63\x61n_message\x18\x02 \x01(\x0b\x32\x12.openxc.CanMessage\x12-\n\x0esimple_message\x18\x03 \x01(\x0b\x32\x15.openxc.SimpleMessage\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\x12\x11\n\ttimestamp\x18\x07 \x01(\x04\"V\n\x04Type\x12\x07\n\x03\x43\x41N\x10\x01\x12\n\n\x06SIMPLE\x10\x02\x12\x0e\n\nDIAGNOSTIC\x10\x03\x12\x13\n\x0f\x43ONTROL_COMMAND\x10\x04\x12\x14\n\x10\x43OMMAND_RESPONSE\x10\x05\"\x94\x01\n\nCanMessage\x12\x0b\n\x03\x62us\x18\x01 \x01(\x05\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x34\n\x0c\x66rame_format\x18\x04 \x01(\x0e\x32\x1e.openxc.CanMessage.FrameFormat\")\n\x0b\x46rameFormat\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\"\x97\x06\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\x16payload_format_command\x18\x05 \x01(\x0b\x32\x1c.openxc.PayloadFormatCommand\x12O\n predefined_obd2_requests_command\x18\x06 \x01(\x0b\x32%.openxc.PredefinedObd2RequestsCommand\x12\x46\n\x1bmodem_configuration_command\x18\x07 \x01(\x0b\x32!.openxc.ModemConfigurationCommand\x12\x42\n\x19rtc_configuration_command\x18\x08 \x01(\x0b\x32\x1f.openxc.RTCConfigurationCommand\"\xe6\x01\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\x0ePAYLOAD_FORMAT\x10\x06\x12\x1c\n\x18PREDEFINED_OBD2_REQUESTS\x10\x07\x12\x17\n\x13MODEM_CONFIGURATION\x10\x08\x12\x15\n\x11RTC_CONFIGURATION\x10\t\x12\x13\n\x0fSD_MOUNT_STATUS\x10\n\x12\x0c\n\x08PLATFORM\x10\x0b\"\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\"\x8c\x01\n\x14PayloadFormatCommand\x12:\n\x06\x66ormat\x18\x01 \x01(\x0e\x32*.openxc.PayloadFormatCommand.PayloadFormat\"8\n\rPayloadFormat\x12\x08\n\x04JSON\x10\x01\x12\x0c\n\x08PROTOBUF\x10\x02\x12\x0f\n\x0bMESSAGEPACK\x10\x03\"0\n\x1dPredefinedObd2RequestsCommand\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd1\x03\n\x17NetworkOperatorSettings\x12\x18\n\x10\x61llowDataRoaming\x18\x01 \x01(\x08\x12N\n\x12operatorSelectMode\x18\x02 \x01(\x0e\x32\x32.openxc.NetworkOperatorSettings.OperatorSelectMode\x12L\n\x11networkDescriptor\x18\x03 \x01(\x0b\x32\x31.openxc.NetworkOperatorSettings.NetworkDescriptor\x1a\x98\x01\n\x11NetworkDescriptor\x12\x0c\n\x04PLMN\x18\x01 \x01(\r\x12R\n\x0bnetworkType\x18\x02 \x01(\x0e\x32=.openxc.NetworkOperatorSettings.NetworkDescriptor.NetworkType\"!\n\x0bNetworkType\x12\x07\n\x03GSM\x10\x00\x12\t\n\x05UTRAN\x10\x02\"c\n\x12OperatorSelectMode\x12\r\n\tAUTOMATIC\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\x0e\n\nDEREGISTER\x10\x02\x12\x0c\n\x08SET_ONLY\x10\x03\x12\x14\n\x10MANUAL_AUTOMATIC\x10\x04\"\"\n\x13NetworkDataSettings\x12\x0b\n\x03\x41PN\x18\x01 \x01(\t\"3\n\x15ServerConnectSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\xd5\x01\n\x19ModemConfigurationCommand\x12@\n\x17networkOperatorSettings\x18\x01 \x01(\x0b\x32\x1f.openxc.NetworkOperatorSettings\x12\x38\n\x13networkDataSettings\x18\x02 \x01(\x0b\x32\x1b.openxc.NetworkDataSettings\x12<\n\x15serverConnectSettings\x18\x03 \x01(\x0b\x32\x1d.openxc.ServerConnectSettings\",\n\x17RTCConfigurationCommand\x12\x11\n\tunix_time\x18\x01 \x01(\r\"]\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\"g\n\rSimpleMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.openxc.DynamicField\x12#\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x14.openxc.DynamicFieldB\x1c\n\ncom.openxcB\x0e\x42inaryMessages') @@ -115,11 +115,15 @@ _CONTROLCOMMAND_TYPE = descriptor.EnumDescriptor( name='SD_MOUNT_STATUS', index=9, number=10, options=None, type=None), + descriptor.EnumValueDescriptor( + name='PLATFORM', index=10, number=11, + options=None, + type=None), ], containing_type=None, options=None, serialized_start=1151, - serialized_end=1367, + serialized_end=1381, ) _DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( @@ -139,8 +143,8 @@ _DIAGNOSTICCONTROLCOMMAND_ACTION = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1499, - serialized_end=1528, + serialized_start=1513, + serialized_end=1542, ) _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( @@ -164,8 +168,8 @@ _PAYLOADFORMATCOMMAND_PAYLOADFORMAT = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=1740, - serialized_end=1796, + serialized_start=1754, + serialized_end=1810, ) _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescriptor( @@ -185,8 +189,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR_NETWORKTYPE = descriptor.EnumDescript ], containing_type=None, options=None, - serialized_start=2180, - serialized_end=2213, + serialized_start=2194, + serialized_end=2227, ) _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( @@ -218,8 +222,8 @@ _NETWORKOPERATORSETTINGS_OPERATORSELECTMODE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2215, - serialized_end=2314, + serialized_start=2229, + serialized_end=2328, ) _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( @@ -239,8 +243,8 @@ _DIAGNOSTICREQUEST_DECODEDTYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=2983, - serialized_end=3016, + serialized_start=2997, + serialized_end=3030, ) _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( @@ -264,8 +268,8 @@ _DYNAMICFIELD_TYPE = descriptor.EnumDescriptor( ], containing_type=None, options=None, - serialized_start=3308, - serialized_end=3345, + serialized_start=3322, + serialized_end=3359, ) @@ -464,7 +468,7 @@ _CONTROLCOMMAND = descriptor.Descriptor( is_extendable=False, extension_ranges=[], serialized_start=590, - serialized_end=1367, + serialized_end=1381, ) @@ -499,8 +503,8 @@ _DIAGNOSTICCONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1370, - serialized_end=1528, + serialized_start=1384, + serialized_end=1542, ) @@ -534,8 +538,8 @@ _PASSTHROUGHMODECONTROLCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1530, - serialized_end=1591, + serialized_start=1544, + serialized_end=1605, ) @@ -569,8 +573,8 @@ _ACCEPTANCEFILTERBYPASSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1593, - serialized_end=1653, + serialized_start=1607, + serialized_end=1667, ) @@ -598,8 +602,8 @@ _PAYLOADFORMATCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1656, - serialized_end=1796, + serialized_start=1670, + serialized_end=1810, ) @@ -626,8 +630,8 @@ _PREDEFINEDOBD2REQUESTSCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1798, - serialized_end=1846, + serialized_start=1812, + serialized_end=1860, ) @@ -662,8 +666,8 @@ _NETWORKOPERATORSETTINGS_NETWORKDESCRIPTOR = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2061, - serialized_end=2213, + serialized_start=2075, + serialized_end=2227, ) _NETWORKOPERATORSETTINGS = descriptor.Descriptor( @@ -704,8 +708,8 @@ _NETWORKOPERATORSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=1849, - serialized_end=2314, + serialized_start=1863, + serialized_end=2328, ) @@ -732,8 +736,8 @@ _NETWORKDATASETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2316, - serialized_end=2350, + serialized_start=2330, + serialized_end=2364, ) @@ -767,8 +771,8 @@ _SERVERCONNECTSETTINGS = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2352, - serialized_end=2403, + serialized_start=2366, + serialized_end=2417, ) @@ -809,8 +813,8 @@ _MODEMCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2406, - serialized_end=2619, + serialized_start=2420, + serialized_end=2633, ) @@ -837,8 +841,8 @@ _RTCCONFIGURATIONCOMMAND = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2621, - serialized_end=2665, + serialized_start=2635, + serialized_end=2679, ) @@ -879,8 +883,8 @@ _COMMANDRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2667, - serialized_end=2760, + serialized_start=2681, + serialized_end=2774, ) @@ -964,8 +968,8 @@ _DIAGNOSTICREQUEST = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=2763, - serialized_end=3016, + serialized_start=2777, + serialized_end=3030, ) @@ -1041,8 +1045,8 @@ _DIAGNOSTICRESPONSE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3019, - serialized_end=3180, + serialized_start=3033, + serialized_end=3194, ) @@ -1091,8 +1095,8 @@ _DYNAMICFIELD = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3183, - serialized_end=3345, + serialized_start=3197, + serialized_end=3359, ) @@ -1133,8 +1137,8 @@ _SIMPLEMESSAGE = descriptor.Descriptor( options=None, is_extendable=False, extension_ranges=[], - serialized_start=3347, - serialized_end=3450, + serialized_start=3361, + serialized_end=3464, ) _VEHICLEMESSAGE.fields_by_name['type'].enum_type = _VEHICLEMESSAGE_TYPE diff --git a/openxc.proto b/openxc.proto index 80ffc507..db7164ff 100644 --- a/openxc.proto +++ b/openxc.proto @@ -39,6 +39,7 @@ message ControlCommand { MODEM_CONFIGURATION = 8; RTC_CONFIGURATION = 9; SD_MOUNT_STATUS = 10; + PLATFORM = 11; } optional Type type = 1; -- cgit 1.2.3-korg From 80d46a817a266329c6bbf3283420b8980f2b0e4b Mon Sep 17 00:00:00 2001 From: Ryan Oberholzer Date: Wed, 14 Sep 2016 13:12:32 -0400 Subject: Update CHANGELOG.md --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ef70eff..294826cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,9 @@ ## v0.7.0 -* Feature: Added command to get device's platform - -## v0.6.1 - * Improvement: Increase diagnostic response payload size to accommodate multi-frame diagnostic responses. +* Feature: Added command to get device's platform ## v0.6.0 -- cgit 1.2.3-korg