From 5ef2ac1609110bc67ebdf62b75e32be44e120667 Mon Sep 17 00:00:00 2001 From: kd284 Date: Wed, 29 Jan 2025 15:12:21 -0500 Subject: [PATCH] up-cpp-server simulator initial commit --- .devcontainer/Dockerfile | 88 + .devcontainer/devcontainer.json | 33 + .dockerignore | 24 + .gitignore | 9 + .gitmodules | 0 .vscode/c_cpp_properties.json | 17 + .vscode/settings.json | 96 + .vscode/tasks.json | 26 + CMakeLists.txt | 27 + Dockerfile | 32 + Dockerfile.dev | 24 + README.md | 32 + docker-compose.dev.yml | 34 + opensource/Dockerfile.base | 84 + opensource/Dockerfile.base.dev | 94 + opensource/docker-compose-ut.yml | 24 + opensource/docker-compose.yaml | 25 + opensource/runTesting.sh | 18 + protofile/translator-protobuf.proto | 74 + runUT.sh | 20 + src/CMakeLists.txt | 33 + src/main.cpp | 59 + src/up-cpp-server/Application.cpp | 47 + src/up-cpp-server/CMakeLists.txt | 19 + src/up-cpp-server/imqtt-wrapper.cpp | 82 + src/up-cpp-server/include/Application.h | 56 + src/up-cpp-server/include/SynchronizedQueue.h | 61 + src/up-cpp-server/include/apiconstants.h | 92 + src/up-cpp-server/include/globalconfig.h | 36 + .../include/iintercontainer-messenger.h | 100 + src/up-cpp-server/include/imqtt-wrapper.h | 105 + src/up-cpp-server/include/iprotocolMessage.h | 46 + src/up-cpp-server/include/observer.h | 148 + src/up-cpp-server/include/threadpool.h | 138 + .../include/translator-protobuf.pb.h | 4004 +++++++++++++++++ src/up-cpp-server/include/translator.h | 42 + src/up-cpp-server/iprotocolMessage.cpp | 47 + src/up-cpp-server/observer.cpp | 104 + src/up-cpp-server/translator-protobuf.pb.cc | 3741 +++++++++++++++ src/up-cpp-server/translator.cpp | 29 + test/CMakeLists.txt | 12 + test/test-up-cpp-server/CMakeLists.txt | 28 + test/test-up-cpp-server/main.cpp | 27 + version.txt | 3 + 44 files changed, 9840 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 CMakeLists.txt create mode 100644 Dockerfile create mode 100644 Dockerfile.dev create mode 100644 docker-compose.dev.yml create mode 100644 opensource/Dockerfile.base create mode 100644 opensource/Dockerfile.base.dev create mode 100644 opensource/docker-compose-ut.yml create mode 100644 opensource/docker-compose.yaml create mode 100644 opensource/runTesting.sh create mode 100644 protofile/translator-protobuf.proto create mode 100644 runUT.sh create mode 100644 src/CMakeLists.txt create mode 100644 src/main.cpp create mode 100644 src/up-cpp-server/Application.cpp create mode 100644 src/up-cpp-server/CMakeLists.txt create mode 100644 src/up-cpp-server/imqtt-wrapper.cpp create mode 100644 src/up-cpp-server/include/Application.h create mode 100644 src/up-cpp-server/include/SynchronizedQueue.h create mode 100644 src/up-cpp-server/include/apiconstants.h create mode 100644 src/up-cpp-server/include/globalconfig.h create mode 100644 src/up-cpp-server/include/iintercontainer-messenger.h create mode 100644 src/up-cpp-server/include/imqtt-wrapper.h create mode 100644 src/up-cpp-server/include/iprotocolMessage.h create mode 100644 src/up-cpp-server/include/observer.h create mode 100644 src/up-cpp-server/include/threadpool.h create mode 100644 src/up-cpp-server/include/translator-protobuf.pb.h create mode 100644 src/up-cpp-server/include/translator.h create mode 100644 src/up-cpp-server/iprotocolMessage.cpp create mode 100644 src/up-cpp-server/observer.cpp create mode 100644 src/up-cpp-server/translator-protobuf.pb.cc create mode 100644 src/up-cpp-server/translator.cpp create mode 100644 test/CMakeLists.txt create mode 100644 test/test-up-cpp-server/CMakeLists.txt create mode 100644 test/test-up-cpp-server/main.cpp create mode 100644 version.txt diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..c117504 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,88 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +FROM mcr.microsoft.com/vscode/devcontainers/base:0-focal +ARG DEBIAN_FRONTEND=noninteractive +ARG SETUP_DIR="/root" +WORKDIR ${SETUP_DIR} +RUN apt-get update \ + && apt-get install cmake \ + make \ + g++ \ + tcl-dev \ + clang \ + git \ + unzip \ + wget \ + gdb \ + libfmt-dev \ + libssl-dev -y \ + python3-pip + +##General dependencies + +WORKDIR ${SETUP_DIR} +ARG SPD_LOG_VERSION="v1.9.2" +RUN git clone https://github.com/gabime/spdlog.git +WORKDIR ${SETUP_DIR}/spdlog +RUN git checkout ${SPD_LOG_VERSION} +WORKDIR ${SETUP_DIR}/spdlog/build +RUN cmake .. -DSPDLOG_BUILD_SHARED=ON +RUN make && make install + +WORKDIR ${SETUP_DIR} +ARG GOOGLE_TEST_VERSION="release-1.11.0" +RUN git clone https://github.com/google/googletest.git +WORKDIR ${SETUP_DIR}/googletest +RUN git checkout ${GOOGLE_TEST_VERSION} +RUN cmake . && make && make install + +WORKDIR ${SETUP_DIR} +ARG PAHO_MQTT_C_VERSION="v1.3.9" +RUN git clone https://github.com/eclipse/paho.mqtt.c.git +WORKDIR ${SETUP_DIR}/paho.mqtt.c +RUN git checkout ${PAHO_MQTT_C_VERSION} +RUN cmake -Bbuild -H. -DPAHO_ENABLE_TESTING=OFF -DPAHO_WITH_SSL=OFF -DPAHO_HIGH_PERFORMANCE=ON +RUN cmake --build build/ --target install + +WORKDIR ${SETUP_DIR} +ARG PAHO_MQTT_CPP_VERSION="v1.2.0" +RUN git clone https://github.com/eclipse/paho.mqtt.cpp.git +WORKDIR ${SETUP_DIR}/paho.mqtt.cpp +RUN git checkout ${PAHO_MQTT_CPP_VERSION} +RUN cmake -Bbuild -H. -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_WITH_SSL=OFF -DPAHO_BUILD_SAMPLES=TRUE +RUN cmake --build build/ --target install + +WORKDIR ${SETUP_DIR} +ARG NLOHMANN_VERSION="v3.11.2" +RUN git clone https://github.com/nlohmann/json json --recursive +WORKDIR ${SETUP_DIR}/json +RUN git checkout ${NLOHMANN_VERSION} +WORKDIR ${SETUP_DIR}/json/build-dir +RUN cmake .. -DMAKE_BUILD_TYPE=Release -DBUILD_TESTING:BOOL=OFF -DJSON_BuildTests=OFF +RUN cmake --build . --config Release --target install -- -j${nproc} + +WORKDIR ${SETUP_DIR} +ARG JSON_SCHEMA_VALIDATOR_VERSION=2.2.0 +RUN git clone https://github.com/pboettch/json-schema-validator.git +WORKDIR ${SETUP_DIR}/json-schema-validator +RUN git checkout tags/${JSON_SCHEMA_VALIDATOR_VERSION} +WORKDIR ${SETUP_DIR}/json-schema-validator/build-dir +RUN cmake -DBUILD_SHARED_LIBS=ON .. && make && make install + +WORKDIR ${SETUP_DIR} +ARG PROTOBUF_VERSION=v3.21.12 +RUN git clone https://github.com/protocolbuffers/protobuf.git +WORKDIR ${SETUP_DIR}/protobuf +RUN git submodule update --init --recursive +RUN git checkout tags/${PROTOBUF_VERSION} +WORKDIR ${SETUP_DIR}/protobuf/build-dir +RUN cmake -Dprotobuf_LOCAL_DEPENDENCIES_ONLY=ON -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF .. && make && make install + +WORKDIR ${SETUP_DIR} +RUN rm -rf * && sync +RUN ldconfig \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c813958 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,33 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.155.1/containers/ubuntu +{ + "name": "Ubuntu 18.04 & Git", + "dockerFile": "Dockerfile", + // The optional 'runArgs' property can be used to specify additional runtime arguments. + "runArgs": [ + // Uncomment the line if you will use a ptrace-based debugger like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined", + + // Uncomment the next line to use a non-root user. On Linux, this will prevent + // new files getting created as root, but you may need to update the USER_UID + // and USER_GID in .devcontainer/Dockerfile to match your user if not 1000. + // "-u", "vscode" + ], + + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..144328f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,24 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8047369 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +build/ +googletest/ +build*/ +bin/ +CMakeFiles/ +src/main +src/CMakeFiles/ +src/CmakeCache.txt +*.a diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..1df4412 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "intelliSenseMode": "msvc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7480502 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,96 @@ +{ + "files.associations": { + "any": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "cctype": "cpp", + "chrono": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "condition_variable": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "forward_list": "cpp", + "list": "cpp", + "map": "cpp", + "set": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "ratio": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "future": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "ostream": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "typeinfo": "cpp", + "valarray": "cpp", + "variant": "cpp", + "typeindex": "cpp", + "xstring": "cpp", + "charconv": "cpp", + "compare": "cpp", + "concepts": "cpp", + "format": "cpp", + "ios": "cpp", + "locale": "cpp", + "stop_token": "cpp", + "xfacet": "cpp", + "xhash": "cpp", + "xiosbase": "cpp", + "xlocale": "cpp", + "xlocbuf": "cpp", + "xlocinfo": "cpp", + "xlocmes": "cpp", + "xlocmon": "cpp", + "xlocnum": "cpp", + "xloctime": "cpp", + "xmemory": "cpp", + "xstddef": "cpp", + "xtr1common": "cpp", + "xtree": "cpp", + "xutility": "cpp", + "xthread": "cpp", + "xmemory0": "cpp", + "queue": "cpp", + "codecvt": "cpp", + "filesystem": "cpp", + "cinttypes": "cpp", + "unordered_set": "cpp" + }, + "C_Cpp.dimInactiveRegions": false, +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..b695675 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "docker-compose -f docker-compose.dev.yml up", + "group": "build", + "problemMatcher": [] + }, + { + "label": "Clear All Containers", + "type": "shell", + "command": "docker ps -a -q | % { docker stop $_ | docker rm $_ }", + "group": "build", + "problemMatcher": [] + }, + { + "label": "CleanUp", + "type": "shell", + "command": "docker-compose -f docker-compose.dev.yml down", + "group": "build", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..642ee9e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +project(up-cpp-server) +cmake_minimum_required(VERSION 3.5) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2a" ) +set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH} /usr/local/lib") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +set(TEST_BINARY test-${PROJECT_NAME}) + +if(ENABLE_TESTING) + add_subdirectory(src) + add_subdirectory(test) + if(CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -g -D GTEST" ) + set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE ON) + endif() +else() + add_subdirectory(src) +endif() \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..015e25e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +#this dockerfile is intended to work in parallel with Dockerfile, +#official chnages outside of architecture should be made to both +FROM opensource-base AS dev +ARG PROJECT_NAME="canought-up-cpp-server" +ARG SETUP_DIR="/root" +ARG BUILD_FOLDER="build-dir" +ARG BUILD_TYPE="Release" +WORKDIR ${SETUP_DIR} +COPY src src +COPY test test +COPY CMakeLists.txt . +WORKDIR ${SETUP_DIR}/${BUILD_FOLDER}/${BUILD_TYPE} +RUN cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DAPP_NAME:STRING=${PROJECT_NAME} ../.. +RUN make +RUN make install +WORKDIR ${SETUP_DIR} +#Strip libraries +RUN strip /usr/local/lib/*.so* --strip-all +RUN strip /usr/local/bin/${PROJECT_NAME} --strip-all + +ENV RUN_APP=${PROJECT_NAME} + +WORKDIR /root +CMD ${RUN_APP} \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..0d49206 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,24 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# #this dockerfile is intended to run development quality tools as Unit Testing and Static Code analysis +FROM opensource-ut AS ut +ARG PROJECT_NAME="canought-up-cpp-server" +ARG SETUP_DIR="/root" +ARG BUILD_FOLDER="build-dir" +ARG BUILD_TYPE="Debug" +WORKDIR ${SETUP_DIR} +ADD src src +ADD test test +ADD CMakeLists.txt . +WORKDIR ${SETUP_DIR}/${BUILD_FOLDER} +RUN cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DAPP_NAME:STRING=${PROJECT_NAME} -DENABLE_TESTING:BOOL=ON .. +RUN make && make install +RUN ldconfig +WORKDIR ${SETUP_DIR} +ENV PROJECT_NAME_APP=${PROJECT_NAME} +CMD runTesting.sh ${PROJECT_NAME_APP} \ No newline at end of file diff --git a/README.md b/README.md index 9692e35..987e77a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,34 @@ # up-cpp-server uProtocol C++ server for CAN Translator +uProtocol C++ server is designed to work synchronously with uProtocol C++ client. +The server is supposed to respond to the client protobuf message request based on the sequence and the service needed by the client. +This server simulator container Application contains dev container dockerfile that can be utilized for debugging and testing using VS code on the local machine. + +Getting Started + +## Building docker images + +To generate the first base images use docker-compose to generate dev and prod images +docker-compose -f opensource/docker-compose.yaml build + +## Test and Deploy + +To execute unit tests please run the shell script runUT.sh after generating the base image +./runUT.sh + +## If using VSCode +For debugging you can execute cleanup task followed by build task which will deploy container services mentioned under docker-compose.dev.yml. Modify Launch and Task.json as per need for debugging application and test suite. +Tip : Use docker exec command to run application inside the created container + set flags + -DCMAKE_BUILD_TYPE -DENABLE_TESTING -DAPP_NAME:STRING as needed. +change type from CRLF to LF during script execution. +## Mosquitto conf changes required to run both client and server +When running client and server together the mosquitto.conf file located at mosquiito/config needs to be modified to connect to the mosquitto_simulator bridge and the changes need to be committed to the mosquiito container referred in the client compose.Modify the mosquiito/config/mosquitto.conf file on client end to accomodate below changes. +1. Under "Extra listner" section add below command for listener port-number [ip address/host name] + listener 1883 [ip address of mosquitto_simulator x.x.x.x. Run docker ps command to get the ip] +2. Under "Bridges" section add the following commands + connection [bridge name] + address mosquitto_simulator:1883 + topic # both 0 +3. Commit the changes to the client side mosquitto container image using "docker commit [containerid] [imagename]" + command and launch the container with new image. \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..ca217c4 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,34 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +version: "3.6" +services: + mosquitto_simulator: + image: eclipse-mosquitto:1.6.13 + ports: + - 1884:1883 + networks: + - edge-client + container_name: mosquitto_simulator + + up-cpp-server: + depends_on: + - mosquitto_simulator + build: + context: ./.devcontainer + dockerfile: Dockerfile + tty: true + networks: + - edge-client + volumes: + - ./:/root + - ./protofile:/protofile + container_name: up-cpp-server + +networks: + edge-client: + external: true \ No newline at end of file diff --git a/opensource/Dockerfile.base b/opensource/Dockerfile.base new file mode 100644 index 0000000..21b67bc --- /dev/null +++ b/opensource/Dockerfile.base @@ -0,0 +1,84 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +FROM alpine:3.18.7 AS base +ARG SETUP_DIR="/root" +RUN sed -i 's/https/http/' /etc/apk/repositories +RUN apk update \ + && apk add --no-cache cmake \ + make \ + g++ \ + tcl-dev \ + clang \ + wget \ + git \ + perl \ + fmt-dev \ + openssl-dev \ + autoconf \ + automake \ + libtool \ + libstdc++ \ + linux-headers \ + protoc \ + protobuf-dev + +##General dependencies +WORKDIR ${SETUP_DIR} +ARG SPD_LOG_VERSION="v1.9.2" +RUN git clone https://github.com/gabime/spdlog.git +WORKDIR ${SETUP_DIR}/spdlog +RUN git checkout ${SPD_LOG_VERSION} +WORKDIR ${SETUP_DIR}/spdlog/build +RUN cmake .. -DSPDLOG_BUILD_SHARED=ON +RUN make && make install + +WORKDIR ${SETUP_DIR} +ARG GOOGLE_TEST_VERSION="release-1.11.0" +RUN git clone https://github.com/google/googletest.git +WORKDIR ${SETUP_DIR}/googletest +RUN git checkout ${GOOGLE_TEST_VERSION} +RUN cmake . && make && make install + +WORKDIR ${SETUP_DIR} +ARG PAHO_MQTT_C_VERSION="v1.3.9" +RUN git clone https://github.com/eclipse/paho.mqtt.c.git +WORKDIR ${SETUP_DIR}/paho.mqtt.c +RUN git checkout ${PAHO_MQTT_C_VERSION} +RUN cmake -Bbuild -H. -DPAHO_ENABLE_TESTING=OFF -DPAHO_WITH_SSL=OFF -DPAHO_HIGH_PERFORMANCE=ON +RUN cmake --build build/ --target install + +WORKDIR ${SETUP_DIR} +ARG PAHO_MQTT_CPP_VERSION="v1.2.0" +RUN git clone https://github.com/eclipse/paho.mqtt.cpp.git +WORKDIR ${SETUP_DIR}/paho.mqtt.cpp +RUN git checkout ${PAHO_MQTT_CPP_VERSION} +RUN cmake -Bbuild -H. -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_WITH_SSL=OFF -DPAHO_BUILD_SAMPLES=TRUE +RUN cmake --build build/ --target install + +WORKDIR ${SETUP_DIR} +ARG NLOHMANN_VERSION="v3.11.2" +RUN git clone https://github.com/nlohmann/json json --recursive +WORKDIR ${SETUP_DIR}/json +RUN git checkout ${NLOHMANN_VERSION} +WORKDIR ${SETUP_DIR}/json/build-dir +RUN cmake .. -DMAKE_BUILD_TYPE=Release -DBUILD_TESTING:BOOL=OFF -DJSON_BuildTests=OFF +RUN cmake --build . --config Release --target install -- -j${nproc} + +WORKDIR ${SETUP_DIR} +ARG JSON_SCHEMA_VALIDATOR_VERSION=2.2.0 +RUN git clone https://github.com/pboettch/json-schema-validator.git +WORKDIR ${SETUP_DIR}/json-schema-validator +RUN git checkout tags/${JSON_SCHEMA_VALIDATOR_VERSION} +WORKDIR ${SETUP_DIR}/json-schema-validator/build-dir +RUN cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="-Wno-narrowing" .. && make && make install + +##End General dependencies + +WORKDIR ${SETUP_DIR} +RUN rm -rf * && sync diff --git a/opensource/Dockerfile.base.dev b/opensource/Dockerfile.base.dev new file mode 100644 index 0000000..2f32e3e --- /dev/null +++ b/opensource/Dockerfile.base.dev @@ -0,0 +1,94 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +FROM ubuntu:focal as base +ARG DEBIAN_FRONTEND=noninteractive +ARG PAHO_MQTT_C_VERSION="1.3.9" +ARG PAHO_MQTT_CPP_VERSION="1.2.0" +ARG GOOGLE_TEST_VERSION="release-1.11.0" +ARG SETUP_DIR="/root" +WORKDIR ${SETUP_DIR} +RUN apt-get update \ + && apt-get install cmake \ + make \ + g++ \ + tcl-dev \ + clang \ + git \ + unzip \ + wget \ + gdb \ + libssl-dev -y \ + python3-pip \ + libfmt-dev -y + + +# + +##General dependencies +RUN wget --no-check-certificate https://github.com/gabime/spdlog/archive/refs/tags/v1.9.2.zip +RUN unzip v1.9.2.zip +RUN mv spdlog-1.9.2 spdlog +WORKDIR ${SETUP_DIR}/spdlog/build +RUN cmake .. \ + && make && make install \ + && cd / && rm -rf spdlog v1.9.2.zip + +WORKDIR ${SETUP_DIR} +RUN wget https://github.com/google/googletest/archive/refs/tags/${GOOGLE_TEST_VERSION}.zip +RUN unzip ${GOOGLE_TEST_VERSION}.zip +WORKDIR /root/googletest-${GOOGLE_TEST_VERSION} +RUN cmake . && make && make install + +WORKDIR ${SETUP_DIR} +RUN wget --no-check-certificate https://github.com/eclipse/paho.mqtt.c/archive/refs/tags/v${PAHO_MQTT_C_VERSION}.zip +RUN unzip v${PAHO_MQTT_C_VERSION}.zip +WORKDIR ${SETUP_DIR}/paho.mqtt.c-${PAHO_MQTT_C_VERSION} +RUN cmake -Bbuild -H. -DPAHO_ENABLE_TESTING=OFF -DPAHO_WITH_SSL=OFF -DPAHO_HIGH_PERFORMANCE=ON \ + && cmake --build build/ --target install + +WORKDIR ${SETUP_DIR} +RUN wget --no-check-certificate https://github.com/eclipse/paho.mqtt.cpp/archive/refs/tags/v${PAHO_MQTT_CPP_VERSION}.zip +RUN unzip v${PAHO_MQTT_CPP_VERSION}.zip +WORKDIR ${SETUP_DIR}/paho.mqtt.cpp-${PAHO_MQTT_CPP_VERSION} +RUN cmake -Bbuild -H. -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_WITH_SSL=OFF -DPAHO_BUILD_SAMPLES=TRUE \ + && cmake --build build/ --target install + +WORKDIR ${SETUP_DIR} +ARG NLOHMANN_VERSION="v3.11.2" +RUN git clone https://github.com/nlohmann/json json --recursive +WORKDIR ${SETUP_DIR}/json +RUN git checkout ${NLOHMANN_VERSION} +WORKDIR ${SETUP_DIR}/json/build-dir +RUN cmake .. -DMAKE_BUILD_TYPE=Release -DBUILD_TESTING:BOOL=OFF -DJSON_BuildTests=OFF +RUN cmake --build . --config Release --target install -- -j${nproc} + +WORKDIR ${SETUP_DIR} +ARG PROTOBUF_VERSION="v3.21.12" +RUN git clone https://github.com/protocolbuffers/protobuf.git +WORKDIR ${SETUP_DIR}/protobuf +RUN git submodule update --init --recursive +RUN git checkout tags/${PROTOBUF_VERSION} +WORKDIR ${SETUP_DIR}/protobuf/build-dir +RUN cmake -Dprotobuf_LOCAL_DEPENDENCIES_ONLY=ON -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..&& make && make install + +WORKDIR ${SETUP_DIR} +ARG JSON_SCHEMA_VALIDATOR_VERSION=2.2.0 +RUN git clone https://github.com/pboettch/json-schema-validator.git +WORKDIR ${SETUP_DIR}/json-schema-validator +RUN git checkout tags/${JSON_SCHEMA_VALIDATOR_VERSION} +WORKDIR ${SETUP_DIR}/json-schema-validator/build-dir +RUN cmake -DBUILD_SHARED_LIBS=ON .. && make && make install + +##End General dependencies + +WORKDIR ${SETUP_DIR} +RUN rm -rf * && sync +RUN ldconfig +ADD runTesting.sh /usr/local/sbin/ +RUN chmod a+x /usr/local/sbin/runTesting.sh \ No newline at end of file diff --git a/opensource/docker-compose-ut.yml b/opensource/docker-compose-ut.yml new file mode 100644 index 0000000..11723b7 --- /dev/null +++ b/opensource/docker-compose-ut.yml @@ -0,0 +1,24 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +version: "3.6" + +services: + unit-testing: + container_name: ${opensrc_component}-test + image: ${opensrc_component}-ut + build: + context: ../. + dockerfile: Dockerfile.dev + target: ut + depends_on: + - ut + ut: + build: + context: . + dockerfile: Dockerfile.base.dev + target: base \ No newline at end of file diff --git a/opensource/docker-compose.yaml b/opensource/docker-compose.yaml new file mode 100644 index 0000000..355f9e7 --- /dev/null +++ b/opensource/docker-compose.yaml @@ -0,0 +1,25 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +version: "3.6" + +services: + target-dev: + container_name: up-cpp-server-dev + image: up-cpp-server-dev + build: + context: ../. + dockerfile: Dockerfile + target: dev + depends_on: + - base + base: + build: + context: . + dockerfile: Dockerfile.base + target: base + diff --git a/opensource/runTesting.sh b/opensource/runTesting.sh new file mode 100644 index 0000000..50ec222 --- /dev/null +++ b/opensource/runTesting.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +if [ "$1" == "" ]; then + echo "empty argument please give the name of the project" + echo "pattern expected -" + exit 1; +fi + +#### Global variables #### +export PROJECT="$(echo "$1" | sed -e "s/canought-//g")" #Project pattern expected "-" +export TEST_BIN=test-$PROJECT #test binary application commonly prepending test to the component name +$TEST_BIN --gtest_catch_exceptions=0 diff --git a/protofile/translator-protobuf.proto b/protofile/translator-protobuf.proto new file mode 100644 index 0000000..60a9442 --- /dev/null +++ b/protofile/translator-protobuf.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; + +package translator; + message GetClaimedAddressRequest { + string appID = 1; + string sequenceNo = 2; + + }; + + message GetClaimedAddressResponse { + string appID = 1; + string sequenceNo = 2; + string claimedAddress = 3; + string responseCode = 4; + }; + + message UDSCANFormat { + string canPhysReqFormat = 1; + string canRespUSDTFormat = 2; + }; + + message UDSOpenCommChannelRequest { + string appID = 1; + string sequenceNo = 2; + string toolAddress = 3; + string ecuAddress = 4; + repeated UDSCANFormat canFormat = 5; + string resourceName = 6; + }; + + message UDSOpenCommChannelResponse { + string appID = 1; + string connectionID = 2; + string sequenceNo = 3; + string responseCode = 4; + }; + + message UDSCloseCommChannelRequest{ + string appID = 1; + string connectionID = 2; + string sequenceNo = 3; + }; + + message UDSCloseCommChannelResponse { + string appID = 1; + string connectionID = 2; + string sequenceNo = 3; + string responseCode = 4; + }; + + message ReadDataByIdentifierRequest{ + string appID = 1; + string connectionID = 2; + string sequenceNo = 3; + repeated string did = 4; + }; + + + message ReadResponse{ + string did = 1; + string value = 2; + string responseCode = 3; + }; + + message ReadDataByIdentifierResponse{ + string appID = 1; + string connectionID = 2; + string sequenceNo = 3; + repeated ReadResponse data = 4; + string responseCode = 5; + }; + + + diff --git a/runUT.sh b/runUT.sh new file mode 100644 index 0000000..245a0aa --- /dev/null +++ b/runUT.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +export opensrc_component=canought-up-cpp-server #update this variable based on the component name +docker rm -f $opensrc_component-test +docker compose -f opensource/docker-compose-ut.yml up --force-recreate --build + +if [ 0 -eq $? ] ; then + echo "--- Success running UT Project $opensrc_component ---" +else + echo "Error while running UT project $opensrc_component" +fi + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..c0a1af9 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +cmake_minimum_required(VERSION 3.5) + +add_subdirectory(${PROJECT_NAME}) +# Create the executable +SET(APP_NAME "main" CACHE STRING "") +# Fmt libray is not needed for Ubuntu so make it optional +find_package(fmt OPTIONAL_COMPONENTS) + +add_executable(${APP_NAME} main.cpp) + +if(fmt_FOUND) + message("Found fmt library") + target_link_libraries(${APP_NAME} fmt) +else() + message("Could not find fmt library") +endif() + +include_directories( + ${PROJECT_NAME}/include + ) + +# Set the compiler options + +target_link_libraries(${APP_NAME} ${PROJECT_NAME} -pthread -lspdlog -lpaho-mqttpp3 -lpaho-mqtt3a protobuf) +install(TARGETS ${APP_NAME} DESTINATION /usr/local/bin) \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..5082388 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,59 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ + +/****************************************************************************** + * OS Includes + * ***************************************************************************/ + #include + +/****************************************************************************** + * Local Includes + * ***************************************************************************/ +#include "up-cpp-server/include/apiconstants.h" +#include "up-cpp-server/include/observer.h" +#include "up-cpp-server/include/Application.h" + +/****************************************************************************** + * Global Variables + * ***************************************************************************/ + +std::promise closedPromise; + +void signal_handler(int signal) +{ + spdlog::info("signal_handler Received signal " + std::to_string(signal)); + closedPromise.set_value(true); + spdlog::info("signal_handler exiting"); +} + +int main() +{ + spdlog::set_level(spdlog::level::debug); + spdlog::info("Hello from main!"); + std::shared_ptr protocolClient = std::make_shared(global::SERVER_ADDRESS, global::CLIENT_ID); + if(!protocolClient){ + spdlog::error("Error Initializing protocol Client"); + return -1; + } + signal(SIGTERM, signal_handler); + signal(SIGKILL, signal_handler); + std::unique_ptr observer = std::make_unique(protocolClient); + if(!observer){ + spdlog::error("Failed to create Observer class"); + return -1; + } + observer->Initialize(); + + spdlog::info("main: mutex locked"); + closedPromise.get_future().wait(); + + observer->cleanUp(); + spdlog::info("Goodbye from main!"); +} \ No newline at end of file diff --git a/src/up-cpp-server/Application.cpp b/src/up-cpp-server/Application.cpp new file mode 100644 index 0000000..cc5d7f8 --- /dev/null +++ b/src/up-cpp-server/Application.cpp @@ -0,0 +1,47 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ + +#include "include/Application.h" + +using namespace std; + +void Application::Init() +{ + //Modify function/class as per need. + payloadResponseMap={ + {global::subscribe::OPEN_COMM_CHANNEL,[this](const std::string& msg){return uds->OpenCommunicationChannel(msg);}} + }; +} + +void Application::ProcessMessage(const std::string &topic, + const std::string &payload) +{ + if (payloadResponseMap.find(topic) != payloadResponseMap.end()) + { + google::protobuf::Struct response = payloadResponseMap[topic](payload); + std::string finalResponse; + response.SerializeToString(&finalResponse); + SendMessageonInput(global::publish::OPEN_COMM_CHANNEL, finalResponse); + + } + else + { + //spdlog::debug("Request topic not found."); + } +} + +std::string Application::OnIncomingMessage(const std::string &topic, + const std::string &payload) +{ + ProcessMessage(topic, payload); + return ""; +} + + diff --git a/src/up-cpp-server/CMakeLists.txt b/src/up-cpp-server/CMakeLists.txt new file mode 100644 index 0000000..a5e7613 --- /dev/null +++ b/src/up-cpp-server/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +cmake_minimum_required(VERSION 3.5) + +include_directories(./include/) + +add_library(${PROJECT_NAME} SHARED + Application.cpp imqtt-wrapper.cpp iprotocolMessage.cpp observer.cpp translator.cpp translator-protobuf.pb.cc) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) +target_link_libraries(${PROJECT_NAME} -lpaho-mqttpp3 -lpaho-mqtt3a protobuf) + +install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/lib) \ No newline at end of file diff --git a/src/up-cpp-server/imqtt-wrapper.cpp b/src/up-cpp-server/imqtt-wrapper.cpp new file mode 100644 index 0000000..8f35edd --- /dev/null +++ b/src/up-cpp-server/imqtt-wrapper.cpp @@ -0,0 +1,82 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#include "imqtt-wrapper.h" +using json = nlohmann::json; + +IMqttWrapper::IMqttWrapper(const std::string &serverURI, + const std::string &CLIENT_ID) + : cli(std::make_unique(serverURI, + CLIENT_ID)) +{ + spdlog::debug("Inside of MQTT Constructor initializing server " + serverURI); +}; + +void IMqttWrapper::ListenTo(const std::string &msgType) +{ + spdlog::debug("Inside MQTT listen call"); + cli->subscribe(msgType,QOS); +} + +void IMqttWrapper::SendMessage(const std::string &topic, const std::string &payload, const bool &retain) +{ + spdlog::debug("The published topic is " + topic); + spdlog::debug("The published payload is " + payload); + if(retain){ + cli->publish(topic,payload,QOS,true)->wait_for(TIMEOUT); + }else{ + cli->publish(topic,payload)->wait_for(TIMEOUT); + } +} + +void IMqttWrapper::Connect(messageCallback &onMessageCallback1) +{ + cli->set_connection_lost_handler([this](const std::string&) + { + spdlog::error("Connection Lost"); + IMqttWrapper::OnConnectionLost(); + }); + + cli->set_message_callback([&onMessageCallback1](mqtt::const_message_ptr msg) + { + IprotocolMessage msgtowrapper(msg->get_topic(),msg->to_string()); + onMessageCallback1.OnMessage(msgtowrapper); + }); + + cli->connect(connOpts)->wait(); + spdlog::info("successfully connected to mqtt-broker"); + +} + +void IMqttWrapper::Disconnect() +{ + cli->disconnect()->wait(); +} + +void IMqttWrapper::OnConnectionLost() +{ + spdlog::info("Reconnecting to broker"); + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + try + { + cli->connect(connOpts)->wait(); + } + catch (const mqtt::exception &exc) + { + std::string errMsg("Error: "); + errMsg += exc.what(); + spdlog::error(errMsg); + exit(1); + } +} + +void IMqttWrapper::OnConnect() +{ + /* */ +} diff --git a/src/up-cpp-server/include/Application.h b/src/up-cpp-server/include/Application.h new file mode 100644 index 0000000..86e5344 --- /dev/null +++ b/src/up-cpp-server/include/Application.h @@ -0,0 +1,56 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#pragma once + +#include +#include +#include +#include "mqtt/async_client.h" +#include "mqtt/client.h" +#include "imqtt-wrapper.h" +#include "apiconstants.h" +#include "globalconfig.h" +#include "observer.h" +#include "translator.h" + + +class Application : public Observer +{ +public: + + //Application constructor + explicit Application(std::shared_ptr Client) : Observer(Client){ + uds = std::make_unique(); + j1939 = std::make_unique(); + }; + + //default application destructor + ~Application() = default; + + /** @brief Init method to execute all initialization operations. + * @return void + */ + + void Init() override; + + /** @brief Read incoming messages from client and process it + * @param topic - server subscribed topic in string format + * @param payload - client request payload in string format + * @return bool - Returns true + */ + + std::string OnIncomingMessage(const std::string &topic,const std::string &payload); + void ProcessMessage(const std::string &topic, + const std::string &payload); +private: + std::unique_ptr uds; + std::unique_ptr j1939; + std::unordered_map>payloadResponseMap; +}; diff --git a/src/up-cpp-server/include/SynchronizedQueue.h b/src/up-cpp-server/include/SynchronizedQueue.h new file mode 100644 index 0000000..ae225fa --- /dev/null +++ b/src/up-cpp-server/include/SynchronizedQueue.h @@ -0,0 +1,61 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#pragma once + +#include +#include +#include +#include + +template +class SynchronizedQueue +{ +public: + SynchronizedQueue() = default; + SynchronizedQueue(SynchronizedQueue const &) = default; // Copy construct + SynchronizedQueue &operator=(SynchronizedQueue const &) = default; // Copy assign + + void Enqueue(Type const &data) + { + std::unique_lock lock(mutex); + queue.push(data); + condition.notify_one(); + } + + void killAll(){ + + /*Destructor added to avoid dead-lock*/ + std::scoped_lock lock{mutex}; + killed = true; + condition.notify_all(); + } + + std::optional Dequeue() + { + std::unique_lock lock(mutex); + condition.wait(lock, + [this] + { return !queue.empty() || + killed; }); + if (killed) + { + return {}; + } + Type result = queue.front(); + queue.pop(); + return result; + } + +private: + std::queue queue; + std::mutex mutex; + std::condition_variable condition; + bool killed = false; +}; diff --git a/src/up-cpp-server/include/apiconstants.h b/src/up-cpp-server/include/apiconstants.h new file mode 100644 index 0000000..77621df --- /dev/null +++ b/src/up-cpp-server/include/apiconstants.h @@ -0,0 +1,92 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#pragma once + +#include +#include +#include +#include + +/* + Config type definition +*/ +using jsonType = nlohmann::json; + +namespace global{ + const std::string CLIENT_ID = "up-cpp_server"; + const std::string SERVER_ADDRESS = "tcp://mosquitto_simulator:1883"; + const int MAX_ROUND_NUM = 200; + namespace subscribe + { + /****************************************************************************** + * UDS Request MQTT topics + *****************************************************************************/ + const std::string TRANSLATOR_UDS_READ_BY_ID ="diagstack/request/readdatabyidentifier"; + const std::string TRANSLATOR_UDS_ROUTINE_CONTROL="diagstack/request/routinecontrol"; + const std::string TRANSLATOR_UDS_REQUEST_DOWNLOAD = "diagstack/request/requestdownload"; + const std::string TRANSLATOR_UDS_TRANSFER_DATA = "diagstack/request/transferdata"; + const std::string TRANSLATOR_UDS_REQUEST_TRANSFER_EXIT = "diagstack/request/requesttransferexit"; + const std::string SET_CONFIG_PARAMETER = "diagstack/request/setconfigparameters"; + const std::string TRANSLATOR_UDS_WRITE ="diagstack/request/writedatabyidentifier"; + const std::string SESSION_CONTROL = "diagstack/request/diagnosticsessioncontrol"; + const std::string TESTER_PRESENT = "diagstack/request/sendtesterpresent"; + const std::string READ_DTC = "diagstack/request/readdtc"; + const std::string CLEAR_DTC = "diagstack/request/cleardtcs"; + const std::string READ_FREEZE_FRAMES = "diagstack/request/readfreezeframes"; + const std::string COMMUNICATION_CONTROL = "diagstack/request/communicationcontrol"; + + /****************************************************************************** + * J1939/UDS common Request MQTT topics + *****************************************************************************/ + const std::string OPEN_COMM_CHANNEL = "diagstack/request/opencommchannel"; + const std::string CLOSE_COMM_CHANNEL = "diagstack/request/closecommchannel"; + const std::string GET_ADDRESS_CLAIM = "diagstack/request/getclaimedaddress"; + /****************************************************************************** + * J1939 Request MQTT topics + *****************************************************************************/ + const std::string TRANSLATOR_J1939_READ_PGNS = "diagstack/request/readpgns"; + const std::string TRANSLATOR_J1939_EXECUTE_MONITORING = "diagstack/request/executepgnmonitoring"; + const std::string TRANSLATOR_J1939_SELECT_MONITORING_PGNS = "diagstack/request/selectmonitoringpgns"; + } + namespace publish{ + /****************************************************************************** + * UDS Response MQTT topics + *****************************************************************************/ + const std::string TRANSLATOR_UDS_READ_BY_ID = "diagstack/response/readdatabyidentifier"; + const std::string TRANSLATOR_UDS_WRITE ="diagstack/response/writedatabyidentifier"; + const std::string TRANSLATOR_UDS_ROUTINE_CONTROL="diagstack/response/routinecontrol"; + const std::string TRANSLATOR_UDS_REQUEST_DOWNLOAD = "diagstack/response/requestdownload"; + const std::string TRANSLATOR_UDS_TRANSFER_DATA = "diagstack/response/transferdata"; + const std::string TRANSLATOR_UDS_REQUEST_TRANSFER_EXIT = "diagstack/response/requesttransferexit"; + const std::string SET_CONFIG_PARAMETER = "diagstack/response/setconfigparameters"; + const std::string SESSION_CONTROL = "diagstack/response/diagnosticsessioncontrol"; + const std::string TESTER_PRESENT = "diagstack/response/sendtesterpresent"; + const std::string READ_DTC = "diagstack/response/readdtc"; + const std::string CLEAR_DTC = "diagstack/response/cleardtcs"; + const std::string READ_FREEZE_FRAMES = "diagstack/response/readfreezeframes"; + const std::string COMMUNICATION_CONTROL = "diagstack/response/communicationcontrol"; + + /****************************************************************************** + * J1939 Response MQTT topics + *****************************************************************************/ + const std::string TRANSLATOR_J1939_READ_PGNS = "diagstack/response/readpgns"; + const std::string TRANSLATOR_J1939_EXECUTE_MONITORING = "diagstack/response/executepgnmonitoring"; + const std::string TRANSLATOR_J1939_SELECT_MONITORING_PGNS = "diagstack/response/selectmonitoringpgns"; + const std::string TRANSLATOR_J1939_GET_UPDATED_PGN_VALUES = "diagstack/response/getupdatedpgnvalues"; + /****************************************************************************** + * J1939/UDS common Response MQTT topics + *****************************************************************************/ + const std::string OPEN_COMM_CHANNEL = "diagstack/response/opencommchannel"; + const std::string CLOSE_COMM_CHANNEL = "diagstack/response/closecommchannel"; + const std::string GET_ADDRESS_CLAIM = "diagstack/response/getclaimedaddress"; + const std::string GET_SET_ADDRESS = "diagstack/response/claimedaddress"; + } +} + diff --git a/src/up-cpp-server/include/globalconfig.h b/src/up-cpp-server/include/globalconfig.h new file mode 100644 index 0000000..72cbb3d --- /dev/null +++ b/src/up-cpp-server/include/globalconfig.h @@ -0,0 +1,36 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ + +#pragma once +#define USE_TRANSLATOR 0 + +#include +#include + +#include "mqtt/client.h" +#include "mqtt/async_client.h" +#include "apiconstants.h" +#include "imqtt-wrapper.h" +#include + +/** @brief Subscription topics + * Sample topics added as example. Modify as per neeed. + */ +namespace application +{ + const std::array Subscriptiontopics = { global::subscribe::OPEN_COMM_CHANNEL + }; + + // Populate the below list with your application specific topic attribute + const std::vector list = { + "diagstack" + }; + +} \ No newline at end of file diff --git a/src/up-cpp-server/include/iintercontainer-messenger.h b/src/up-cpp-server/include/iintercontainer-messenger.h new file mode 100644 index 0000000..cc1600e --- /dev/null +++ b/src/up-cpp-server/include/iintercontainer-messenger.h @@ -0,0 +1,100 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#ifndef __I_InterContainer_Messenger +#define __I_InterContainer_Messenger + +#pragma once +#include +#include +#include "iprotocolMessage.h" + + + +class messageCallback +{ +public: + virtual ~messageCallback() = default; + + /** @brief - OnMessage method to handle incoming message + * @return void + */ + + virtual std::string OnMessage(const IprotocolMessage &message) + { + spdlog::debug("Inside messageCallback onmessage : {}, data: {}", message.GetDestination()); + return message.GetDestination(); + } + + /** @brief - OnConnect method to perform actions after connections + * @return void + */ + + virtual void OnConnect() + { + spdlog::error("messageCallback::OnConnect() is not implemented."); + } + + /** @brief - Disconnect method to disconnect mqtt connection + * @return void + */ + + virtual void OnDisconnect() + { + spdlog::error("messageCallback::OnDisConnect() is not implemented."); + } +}; +class InterContainerMessenger +{ +public: + //Default InterContainerMessenger destructor + virtual ~InterContainerMessenger() = default; + + /** @brief - ListenTo method to subscribe to mqtt topic + * @param msgType - message topic + * @return void + */ + virtual void ListenTo(const std::string &msgType)=0; + + /** @brief - SendMessage method to publish payload on mqtt topic + * @param topic - string type topic for publishing message + * @param payload - string type payload + * @param retain - option to retain mqtt message + * @return void + */ + + virtual void SendMessage(const std::string &destination, const std::string &payload, const bool &retain)=0; + + /** @brief - OnConnect method to perform actions after connections + * @return void + */ + + virtual void OnConnect()=0; + + /** @brief - OnConnectionLost method to perform actions after loss of mqtt connection + * @return void + */ + + virtual void OnConnectionLost()=0; + + /** @brief - Connect method to perform actions after loss of mqtt connection + * @return void + */ + + virtual void Connect(messageCallback &messageCallback)=0; + + /** @brief - Disconnect method to disconnect mqtt connection + * @return void + */ + + virtual void Disconnect()=0; + +}; + +#endif \ No newline at end of file diff --git a/src/up-cpp-server/include/imqtt-wrapper.h b/src/up-cpp-server/include/imqtt-wrapper.h new file mode 100644 index 0000000..babebb4 --- /dev/null +++ b/src/up-cpp-server/include/imqtt-wrapper.h @@ -0,0 +1,105 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ + +#ifndef __I_MQTT_WRAPPER +#define __I_MQTT_WRAPPER + +#include "mqtt/async_client.h" +#include "iprotocolMessage.h" +#include +#include "iintercontainer-messenger.h" + +#ifdef GTEST + const auto TIMEOUT = std::chrono::seconds(1); + const auto KEEPALIVEINTERVAL = std::chrono::seconds(1); +#else + const auto TIMEOUT = std::chrono::seconds(10); + const auto KEEPALIVEINTERVAL = std::chrono::seconds(45); +#endif + +class IMqttWrapper : public InterContainerMessenger +{ +public: + + //Non-parameterized constructor + IMqttWrapper(); + + //parameterized constructor + explicit IMqttWrapper(messageCallback messageCallback); + + //parameterized constructor + IMqttWrapper(const std::string &serverURI, const std::string &clientId); + + //IMqttWrapper Copy constructor + IMqttWrapper(IMqttWrapper const &) = delete; + + //InterContainerMessenger Move constructor + IMqttWrapper(IMqttWrapper &&) = delete; + + //InterContainerMessenger Copy assignment + IMqttWrapper &operator=(IMqttWrapper const &) = delete; + + //InterContainerMessenger Move assignment + IMqttWrapper &operator=(IMqttWrapper &&) = delete; + + /** @brief - ListenTo method to subscribe to mqtt topic + * @param topic - mqtt topic + * @return void + */ + void ListenTo(const std::string &topic) override; + + /** @brief - SendMessage method to publish payload on mqtt topic + * @param topic - string type mqtt topic for publishing message + * @param payload - string type mqtt message payload + * @param retain - option to retain mqtt message + * @return void + */ + + void SendMessage(const std::string &topic, const std::string &payload, const bool &retain) override; + + /** @brief - OnConnect method to perform actions after connections + * @return void + */ + + void OnConnect() override; + + /** @brief - OnConnectionLost method to perform actions after loss of mqtt connection + * @return void + */ + + void OnConnectionLost() override; + + /** @brief - Connect method to perform actions after loss of mqtt connection + * @return void + */ + + void Connect(messageCallback &onMessageCallback) override; + + /** @brief - Disconnect method to disconnect mqtt connection + * @return void + */ + + void Disconnect() override; + + /** @brief - class destructor + */ + + ~IMqttWrapper() override = default; + +private: + std::unique_ptr cli; + mqtt::connect_options connOpts = mqtt::connect_options_builder() + .clean_session(false) + .keep_alive_interval(KEEPALIVEINTERVAL) + .finalize(); + const int QOS = 1; +}; + +#endif \ No newline at end of file diff --git a/src/up-cpp-server/include/iprotocolMessage.h b/src/up-cpp-server/include/iprotocolMessage.h new file mode 100644 index 0000000..6a3d037 --- /dev/null +++ b/src/up-cpp-server/include/iprotocolMessage.h @@ -0,0 +1,46 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#ifndef __I_protocolMessage +#define __I_protocolMessage + +#include +#include +#include "mqtt/async_client.h" +#include "mqtt/client.h" + +using jsonType = nlohmann::json; +class IprotocolMessage +{ +public: + + //parameterized constructor + IprotocolMessage(const std::string_view &, const std::string_view &); + + //Non-parameterized constructor + IprotocolMessage()= default; + + /** @brief - gets mqtt topic + * @param None - No input parameters + * @return string - returns string + */ + std::string GetDestination() const; + + /** @brief - gets mqtt message payload + * @param None - No input parameters + * @return string - returns string + */ + std::string GetPayload() const; + +private: + std::string msgDestination; + std::string msgPayload; +}; + +#endif \ No newline at end of file diff --git a/src/up-cpp-server/include/observer.h b/src/up-cpp-server/include/observer.h new file mode 100644 index 0000000..349c033 --- /dev/null +++ b/src/up-cpp-server/include/observer.h @@ -0,0 +1,148 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ + +/** @file observer.h + * @brief +*/ + +#pragma once + + +#include "threadpool.h" +#include "globalconfig.h" +#include "SynchronizedQueue.h" + +enum class CONTAINER{ + TRANSLATOR, + APPLICATION, + NONE +}; + +class Observer: public messageCallback +{ + public: + explicit Observer(std::shared_ptr Client): protocolClient(Client) + + { + protocolClient->Connect(*this); + }; + + ~Observer() override { + holderQueue.killAll(); + if (mainThread.joinable()) + { + mainThread.join(); + } + } + + + /** + * @brief - cleanUp method + * @param none - No input parameters + * @return void + */ + void cleanUp() + { + protocolClient->Disconnect(); + finish = true; + } + + /** + * @brief - Initializes notifications map + * @param None - No input parameters + * @return void + */ + void Initialize(); + + /** + * @brief - Notifies on message + * @param message - const IprotocolMessage reference type + * @return std::string - returns string + */ + std::string OnMessage(const IprotocolMessage& message) override; + + /** + * @brief - Initialization method + * @param none - No input parameters + * @return void + */ + virtual void Init(); + + /** + * @brief - Sends message to client on input + * @param topic - topic in const string reference type + * @param payload - payload in const string reference type + * @return void + */ + virtual void SendMessageonInput(const std::string &topic, + const std::string &payload, + const bool &retain = false); + + + /** + * @brief - OnIncomingMessage virtual method + * @param topic - topic in const string reference type + * @param payload - payload in const string reference Type + * @return std::string - Returns empty string + */ + virtual std::string OnIncomingMessage(const std::string& topic, + const std::string &payload); + + /** + * @brief - forwardPayload method forwards the payload to specific container + * @param topic - topic in const string reference type + * @param payload - payload in const string reference Type + * @return std::string - Returns empty string + */ + void forwardPayload(const std::string &containerName, + const std::string &topic, + const std::string &payload); + + private: + + + + /** + * @brief - Helper function to parse the message and payload for incoming mqtt message + * @param none - No input parameters + * @return void + */ + void MainThreadFunc(); + + /** + * @brief - Notifies the respective container type on message + * @param topic - topic in const string reference type + * @param payload - payload in const string reference Type + * @return void + */ + void MessageHelper(const std::string& topic, const std::string& payload); + + /** + * @brief - Passes data to client to listen + * @param topic - data in const string reference type + * @return void + */ + void ListenToData(const std::string &topic) const{ + protocolClient->ListenTo(topic); + }; + + std::shared_ptr protocolClient; + std::unordered_map notificationMap; + ThreadPool threadPool; + + SynchronizedQueue> holderQueue; + std::atomic finish{false}; + std::thread mainThread; + std::queue messageQueue; + std::condition_variable messageConditionVariable; + std::mutex messageMutex; + +}; + diff --git a/src/up-cpp-server/include/threadpool.h b/src/up-cpp-server/include/threadpool.h new file mode 100644 index 0000000..f84b862 --- /dev/null +++ b/src/up-cpp-server/include/threadpool.h @@ -0,0 +1,138 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#pragma once +#include "globalconfig.h" + +class ThreadPool +{ +public: + ThreadPool(size_t maxThreads = 5, size_t maxQueueSize = 25) + : maxThreads(maxThreads), + maxQueueSize(maxQueueSize) + { + } + + ~ThreadPool() + { + { + std::unique_lock lock(queueThreadMutex); + stop = true; + } + conditionVar.notify_all(); + for (auto &singleThread : threadList) + { + if (singleThread.joinable()) + { + singleThread.join(); + } + } + } + template + void enqueue(F &&func, int priority = 0) + { + std::unique_lock lock(queueThreadMutex); + if (!conditionFunc) + { + conditionFunc = []() + { + return true; + }; + } + spdlog::debug("After the lock"); + // If the queue is full, remove the task with lowest priority + if (taskQueue.size() >= maxQueueSize) + { + spdlog::warn("Task is full"); + if (priority < taskQueue.top().priority) + { + spdlog::error("Dropping this incoming task. Priority lower than lowest prioritized task"); + return; + } + taskQueue.pop(); + } + + auto task = std::make_shared>(std::forward(func)); + taskQueue.emplace(priority, task); + // Create a thread only if there are more than + if (threadList.size() < taskQueue.size() && + threadList.size() < maxThreads) + { + spdlog::debug("Creating new thread"); + threadList.emplace_back(&ThreadPool::workerThread, this); + spdlog::debug("After thread Creation new thread"); + } + conditionVar.notify_one(); + } + + void notify_all() + { + conditionVar.notify_all(); + } + + template + void setCondition(F &&cond_func) + { + conditionFunc = std::forward(cond_func); + } + +private: + // Internal Task struct to store the priority and callback function + struct Task + { + Task(int priority, std::shared_ptr> task) + : priority(priority), + task(task) + { + } + bool operator<(const Task &other) const + { + return priority < other.priority; + } + int priority; + std::shared_ptr> task; + }; + + std::shared_ptr> getCurrentTask() + { + std::unique_lock lock(queueThreadMutex); + conditionVar.wait(lock, [this]() + { return stop || (!taskQueue.empty() && conditionFunc()); }); + if (stop || taskQueue.empty()) + { + return {}; + } + spdlog::debug("Out of condition Var here"); + auto task = taskQueue.top().task; + taskQueue.pop(); + return task; + } + + void workerThread() + { + spdlog::debug("Thread has Started"); + while (true) + { + std::shared_ptr> task = getCurrentTask(); + if(task){ + (*task)(); + }else{ + return; + } + } + } + size_t maxThreads; + size_t maxQueueSize; + std::vector threadList; + std::priority_queue taskQueue; + std::mutex queueThreadMutex; + std::condition_variable conditionVar; + bool stop = false; + std::function conditionFunc; +}; \ No newline at end of file diff --git a/src/up-cpp-server/include/translator-protobuf.pb.h b/src/up-cpp-server/include/translator-protobuf.pb.h new file mode 100644 index 0000000..b65efa5 --- /dev/null +++ b/src/up-cpp-server/include/translator-protobuf.pb.h @@ -0,0 +1,4004 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: translator-protobuf.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_translator_2dprotobuf_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_translator_2dprotobuf_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_translator_2dprotobuf_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_translator_2dprotobuf_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_translator_2dprotobuf_2eproto; +namespace translator { +class GetClaimedAddressRequest; +struct GetClaimedAddressRequestDefaultTypeInternal; +extern GetClaimedAddressRequestDefaultTypeInternal _GetClaimedAddressRequest_default_instance_; +class GetClaimedAddressResponse; +struct GetClaimedAddressResponseDefaultTypeInternal; +extern GetClaimedAddressResponseDefaultTypeInternal _GetClaimedAddressResponse_default_instance_; +class ReadDataByIdentifierRequest; +struct ReadDataByIdentifierRequestDefaultTypeInternal; +extern ReadDataByIdentifierRequestDefaultTypeInternal _ReadDataByIdentifierRequest_default_instance_; +class ReadDataByIdentifierResponse; +struct ReadDataByIdentifierResponseDefaultTypeInternal; +extern ReadDataByIdentifierResponseDefaultTypeInternal _ReadDataByIdentifierResponse_default_instance_; +class ReadResponse; +struct ReadResponseDefaultTypeInternal; +extern ReadResponseDefaultTypeInternal _ReadResponse_default_instance_; +class UDSCANFormat; +struct UDSCANFormatDefaultTypeInternal; +extern UDSCANFormatDefaultTypeInternal _UDSCANFormat_default_instance_; +class UDSCloseCommChannelRequest; +struct UDSCloseCommChannelRequestDefaultTypeInternal; +extern UDSCloseCommChannelRequestDefaultTypeInternal _UDSCloseCommChannelRequest_default_instance_; +class UDSCloseCommChannelResponse; +struct UDSCloseCommChannelResponseDefaultTypeInternal; +extern UDSCloseCommChannelResponseDefaultTypeInternal _UDSCloseCommChannelResponse_default_instance_; +class UDSOpenCommChannelRequest; +struct UDSOpenCommChannelRequestDefaultTypeInternal; +extern UDSOpenCommChannelRequestDefaultTypeInternal _UDSOpenCommChannelRequest_default_instance_; +class UDSOpenCommChannelResponse; +struct UDSOpenCommChannelResponseDefaultTypeInternal; +extern UDSOpenCommChannelResponseDefaultTypeInternal _UDSOpenCommChannelResponse_default_instance_; +} // namespace translator +PROTOBUF_NAMESPACE_OPEN +template<> ::translator::GetClaimedAddressRequest* Arena::CreateMaybeMessage<::translator::GetClaimedAddressRequest>(Arena*); +template<> ::translator::GetClaimedAddressResponse* Arena::CreateMaybeMessage<::translator::GetClaimedAddressResponse>(Arena*); +template<> ::translator::ReadDataByIdentifierRequest* Arena::CreateMaybeMessage<::translator::ReadDataByIdentifierRequest>(Arena*); +template<> ::translator::ReadDataByIdentifierResponse* Arena::CreateMaybeMessage<::translator::ReadDataByIdentifierResponse>(Arena*); +template<> ::translator::ReadResponse* Arena::CreateMaybeMessage<::translator::ReadResponse>(Arena*); +template<> ::translator::UDSCANFormat* Arena::CreateMaybeMessage<::translator::UDSCANFormat>(Arena*); +template<> ::translator::UDSCloseCommChannelRequest* Arena::CreateMaybeMessage<::translator::UDSCloseCommChannelRequest>(Arena*); +template<> ::translator::UDSCloseCommChannelResponse* Arena::CreateMaybeMessage<::translator::UDSCloseCommChannelResponse>(Arena*); +template<> ::translator::UDSOpenCommChannelRequest* Arena::CreateMaybeMessage<::translator::UDSOpenCommChannelRequest>(Arena*); +template<> ::translator::UDSOpenCommChannelResponse* Arena::CreateMaybeMessage<::translator::UDSOpenCommChannelResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace translator { + +// =================================================================== + +class GetClaimedAddressRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.GetClaimedAddressRequest) */ { + public: + inline GetClaimedAddressRequest() : GetClaimedAddressRequest(nullptr) {} + ~GetClaimedAddressRequest() override; + explicit PROTOBUF_CONSTEXPR GetClaimedAddressRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetClaimedAddressRequest(const GetClaimedAddressRequest& from); + GetClaimedAddressRequest(GetClaimedAddressRequest&& from) noexcept + : GetClaimedAddressRequest() { + *this = ::std::move(from); + } + + inline GetClaimedAddressRequest& operator=(const GetClaimedAddressRequest& from) { + CopyFrom(from); + return *this; + } + inline GetClaimedAddressRequest& operator=(GetClaimedAddressRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetClaimedAddressRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetClaimedAddressRequest* internal_default_instance() { + return reinterpret_cast( + &_GetClaimedAddressRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(GetClaimedAddressRequest& a, GetClaimedAddressRequest& b) { + a.Swap(&b); + } + inline void Swap(GetClaimedAddressRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetClaimedAddressRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetClaimedAddressRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetClaimedAddressRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetClaimedAddressRequest& from) { + GetClaimedAddressRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetClaimedAddressRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.GetClaimedAddressRequest"; + } + protected: + explicit GetClaimedAddressRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAppIDFieldNumber = 1, + kSequenceNoFieldNumber = 2, + }; + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string sequenceNo = 2; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // @@protoc_insertion_point(class_scope:translator.GetClaimedAddressRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class GetClaimedAddressResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.GetClaimedAddressResponse) */ { + public: + inline GetClaimedAddressResponse() : GetClaimedAddressResponse(nullptr) {} + ~GetClaimedAddressResponse() override; + explicit PROTOBUF_CONSTEXPR GetClaimedAddressResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetClaimedAddressResponse(const GetClaimedAddressResponse& from); + GetClaimedAddressResponse(GetClaimedAddressResponse&& from) noexcept + : GetClaimedAddressResponse() { + *this = ::std::move(from); + } + + inline GetClaimedAddressResponse& operator=(const GetClaimedAddressResponse& from) { + CopyFrom(from); + return *this; + } + inline GetClaimedAddressResponse& operator=(GetClaimedAddressResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetClaimedAddressResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetClaimedAddressResponse* internal_default_instance() { + return reinterpret_cast( + &_GetClaimedAddressResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(GetClaimedAddressResponse& a, GetClaimedAddressResponse& b) { + a.Swap(&b); + } + inline void Swap(GetClaimedAddressResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetClaimedAddressResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetClaimedAddressResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetClaimedAddressResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetClaimedAddressResponse& from) { + GetClaimedAddressResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetClaimedAddressResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.GetClaimedAddressResponse"; + } + protected: + explicit GetClaimedAddressResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAppIDFieldNumber = 1, + kSequenceNoFieldNumber = 2, + kClaimedAddressFieldNumber = 3, + kResponseCodeFieldNumber = 4, + }; + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string sequenceNo = 2; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // string claimedAddress = 3; + void clear_claimedaddress(); + const std::string& claimedaddress() const; + template + void set_claimedaddress(ArgT0&& arg0, ArgT... args); + std::string* mutable_claimedaddress(); + PROTOBUF_NODISCARD std::string* release_claimedaddress(); + void set_allocated_claimedaddress(std::string* claimedaddress); + private: + const std::string& _internal_claimedaddress() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_claimedaddress(const std::string& value); + std::string* _internal_mutable_claimedaddress(); + public: + + // string responseCode = 4; + void clear_responsecode(); + const std::string& responsecode() const; + template + void set_responsecode(ArgT0&& arg0, ArgT... args); + std::string* mutable_responsecode(); + PROTOBUF_NODISCARD std::string* release_responsecode(); + void set_allocated_responsecode(std::string* responsecode); + private: + const std::string& _internal_responsecode() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsecode(const std::string& value); + std::string* _internal_mutable_responsecode(); + public: + + // @@protoc_insertion_point(class_scope:translator.GetClaimedAddressResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr claimedaddress_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsecode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class UDSCANFormat final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.UDSCANFormat) */ { + public: + inline UDSCANFormat() : UDSCANFormat(nullptr) {} + ~UDSCANFormat() override; + explicit PROTOBUF_CONSTEXPR UDSCANFormat(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UDSCANFormat(const UDSCANFormat& from); + UDSCANFormat(UDSCANFormat&& from) noexcept + : UDSCANFormat() { + *this = ::std::move(from); + } + + inline UDSCANFormat& operator=(const UDSCANFormat& from) { + CopyFrom(from); + return *this; + } + inline UDSCANFormat& operator=(UDSCANFormat&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UDSCANFormat& default_instance() { + return *internal_default_instance(); + } + static inline const UDSCANFormat* internal_default_instance() { + return reinterpret_cast( + &_UDSCANFormat_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(UDSCANFormat& a, UDSCANFormat& b) { + a.Swap(&b); + } + inline void Swap(UDSCANFormat* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UDSCANFormat* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UDSCANFormat* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UDSCANFormat& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UDSCANFormat& from) { + UDSCANFormat::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UDSCANFormat* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.UDSCANFormat"; + } + protected: + explicit UDSCANFormat(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCanPhysReqFormatFieldNumber = 1, + kCanRespUSDTFormatFieldNumber = 2, + }; + // string canPhysReqFormat = 1; + void clear_canphysreqformat(); + const std::string& canphysreqformat() const; + template + void set_canphysreqformat(ArgT0&& arg0, ArgT... args); + std::string* mutable_canphysreqformat(); + PROTOBUF_NODISCARD std::string* release_canphysreqformat(); + void set_allocated_canphysreqformat(std::string* canphysreqformat); + private: + const std::string& _internal_canphysreqformat() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_canphysreqformat(const std::string& value); + std::string* _internal_mutable_canphysreqformat(); + public: + + // string canRespUSDTFormat = 2; + void clear_canrespusdtformat(); + const std::string& canrespusdtformat() const; + template + void set_canrespusdtformat(ArgT0&& arg0, ArgT... args); + std::string* mutable_canrespusdtformat(); + PROTOBUF_NODISCARD std::string* release_canrespusdtformat(); + void set_allocated_canrespusdtformat(std::string* canrespusdtformat); + private: + const std::string& _internal_canrespusdtformat() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_canrespusdtformat(const std::string& value); + std::string* _internal_mutable_canrespusdtformat(); + public: + + // @@protoc_insertion_point(class_scope:translator.UDSCANFormat) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr canphysreqformat_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr canrespusdtformat_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class UDSOpenCommChannelRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.UDSOpenCommChannelRequest) */ { + public: + inline UDSOpenCommChannelRequest() : UDSOpenCommChannelRequest(nullptr) {} + ~UDSOpenCommChannelRequest() override; + explicit PROTOBUF_CONSTEXPR UDSOpenCommChannelRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UDSOpenCommChannelRequest(const UDSOpenCommChannelRequest& from); + UDSOpenCommChannelRequest(UDSOpenCommChannelRequest&& from) noexcept + : UDSOpenCommChannelRequest() { + *this = ::std::move(from); + } + + inline UDSOpenCommChannelRequest& operator=(const UDSOpenCommChannelRequest& from) { + CopyFrom(from); + return *this; + } + inline UDSOpenCommChannelRequest& operator=(UDSOpenCommChannelRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UDSOpenCommChannelRequest& default_instance() { + return *internal_default_instance(); + } + static inline const UDSOpenCommChannelRequest* internal_default_instance() { + return reinterpret_cast( + &_UDSOpenCommChannelRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(UDSOpenCommChannelRequest& a, UDSOpenCommChannelRequest& b) { + a.Swap(&b); + } + inline void Swap(UDSOpenCommChannelRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UDSOpenCommChannelRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UDSOpenCommChannelRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UDSOpenCommChannelRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UDSOpenCommChannelRequest& from) { + UDSOpenCommChannelRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UDSOpenCommChannelRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.UDSOpenCommChannelRequest"; + } + protected: + explicit UDSOpenCommChannelRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCanFormatFieldNumber = 5, + kAppIDFieldNumber = 1, + kSequenceNoFieldNumber = 2, + kToolAddressFieldNumber = 3, + kEcuAddressFieldNumber = 4, + kResourceNameFieldNumber = 6, + }; + // repeated .translator.UDSCANFormat canFormat = 5; + int canformat_size() const; + private: + int _internal_canformat_size() const; + public: + void clear_canformat(); + ::translator::UDSCANFormat* mutable_canformat(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::UDSCANFormat >* + mutable_canformat(); + private: + const ::translator::UDSCANFormat& _internal_canformat(int index) const; + ::translator::UDSCANFormat* _internal_add_canformat(); + public: + const ::translator::UDSCANFormat& canformat(int index) const; + ::translator::UDSCANFormat* add_canformat(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::UDSCANFormat >& + canformat() const; + + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string sequenceNo = 2; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // string toolAddress = 3; + void clear_tooladdress(); + const std::string& tooladdress() const; + template + void set_tooladdress(ArgT0&& arg0, ArgT... args); + std::string* mutable_tooladdress(); + PROTOBUF_NODISCARD std::string* release_tooladdress(); + void set_allocated_tooladdress(std::string* tooladdress); + private: + const std::string& _internal_tooladdress() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tooladdress(const std::string& value); + std::string* _internal_mutable_tooladdress(); + public: + + // string ecuAddress = 4; + void clear_ecuaddress(); + const std::string& ecuaddress() const; + template + void set_ecuaddress(ArgT0&& arg0, ArgT... args); + std::string* mutable_ecuaddress(); + PROTOBUF_NODISCARD std::string* release_ecuaddress(); + void set_allocated_ecuaddress(std::string* ecuaddress); + private: + const std::string& _internal_ecuaddress() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_ecuaddress(const std::string& value); + std::string* _internal_mutable_ecuaddress(); + public: + + // string resourceName = 6; + void clear_resourcename(); + const std::string& resourcename() const; + template + void set_resourcename(ArgT0&& arg0, ArgT... args); + std::string* mutable_resourcename(); + PROTOBUF_NODISCARD std::string* release_resourcename(); + void set_allocated_resourcename(std::string* resourcename); + private: + const std::string& _internal_resourcename() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_resourcename(const std::string& value); + std::string* _internal_mutable_resourcename(); + public: + + // @@protoc_insertion_point(class_scope:translator.UDSOpenCommChannelRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::UDSCANFormat > canformat_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tooladdress_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ecuaddress_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr resourcename_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class UDSOpenCommChannelResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.UDSOpenCommChannelResponse) */ { + public: + inline UDSOpenCommChannelResponse() : UDSOpenCommChannelResponse(nullptr) {} + ~UDSOpenCommChannelResponse() override; + explicit PROTOBUF_CONSTEXPR UDSOpenCommChannelResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UDSOpenCommChannelResponse(const UDSOpenCommChannelResponse& from); + UDSOpenCommChannelResponse(UDSOpenCommChannelResponse&& from) noexcept + : UDSOpenCommChannelResponse() { + *this = ::std::move(from); + } + + inline UDSOpenCommChannelResponse& operator=(const UDSOpenCommChannelResponse& from) { + CopyFrom(from); + return *this; + } + inline UDSOpenCommChannelResponse& operator=(UDSOpenCommChannelResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UDSOpenCommChannelResponse& default_instance() { + return *internal_default_instance(); + } + static inline const UDSOpenCommChannelResponse* internal_default_instance() { + return reinterpret_cast( + &_UDSOpenCommChannelResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(UDSOpenCommChannelResponse& a, UDSOpenCommChannelResponse& b) { + a.Swap(&b); + } + inline void Swap(UDSOpenCommChannelResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UDSOpenCommChannelResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UDSOpenCommChannelResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UDSOpenCommChannelResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UDSOpenCommChannelResponse& from) { + UDSOpenCommChannelResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UDSOpenCommChannelResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.UDSOpenCommChannelResponse"; + } + protected: + explicit UDSOpenCommChannelResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAppIDFieldNumber = 1, + kConnectionIDFieldNumber = 2, + kSequenceNoFieldNumber = 3, + kResponseCodeFieldNumber = 4, + }; + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string connectionID = 2; + void clear_connectionid(); + const std::string& connectionid() const; + template + void set_connectionid(ArgT0&& arg0, ArgT... args); + std::string* mutable_connectionid(); + PROTOBUF_NODISCARD std::string* release_connectionid(); + void set_allocated_connectionid(std::string* connectionid); + private: + const std::string& _internal_connectionid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connectionid(const std::string& value); + std::string* _internal_mutable_connectionid(); + public: + + // string sequenceNo = 3; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // string responseCode = 4; + void clear_responsecode(); + const std::string& responsecode() const; + template + void set_responsecode(ArgT0&& arg0, ArgT... args); + std::string* mutable_responsecode(); + PROTOBUF_NODISCARD std::string* release_responsecode(); + void set_allocated_responsecode(std::string* responsecode); + private: + const std::string& _internal_responsecode() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsecode(const std::string& value); + std::string* _internal_mutable_responsecode(); + public: + + // @@protoc_insertion_point(class_scope:translator.UDSOpenCommChannelResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connectionid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsecode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class UDSCloseCommChannelRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.UDSCloseCommChannelRequest) */ { + public: + inline UDSCloseCommChannelRequest() : UDSCloseCommChannelRequest(nullptr) {} + ~UDSCloseCommChannelRequest() override; + explicit PROTOBUF_CONSTEXPR UDSCloseCommChannelRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UDSCloseCommChannelRequest(const UDSCloseCommChannelRequest& from); + UDSCloseCommChannelRequest(UDSCloseCommChannelRequest&& from) noexcept + : UDSCloseCommChannelRequest() { + *this = ::std::move(from); + } + + inline UDSCloseCommChannelRequest& operator=(const UDSCloseCommChannelRequest& from) { + CopyFrom(from); + return *this; + } + inline UDSCloseCommChannelRequest& operator=(UDSCloseCommChannelRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UDSCloseCommChannelRequest& default_instance() { + return *internal_default_instance(); + } + static inline const UDSCloseCommChannelRequest* internal_default_instance() { + return reinterpret_cast( + &_UDSCloseCommChannelRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(UDSCloseCommChannelRequest& a, UDSCloseCommChannelRequest& b) { + a.Swap(&b); + } + inline void Swap(UDSCloseCommChannelRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UDSCloseCommChannelRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UDSCloseCommChannelRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UDSCloseCommChannelRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UDSCloseCommChannelRequest& from) { + UDSCloseCommChannelRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UDSCloseCommChannelRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.UDSCloseCommChannelRequest"; + } + protected: + explicit UDSCloseCommChannelRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAppIDFieldNumber = 1, + kConnectionIDFieldNumber = 2, + kSequenceNoFieldNumber = 3, + }; + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string connectionID = 2; + void clear_connectionid(); + const std::string& connectionid() const; + template + void set_connectionid(ArgT0&& arg0, ArgT... args); + std::string* mutable_connectionid(); + PROTOBUF_NODISCARD std::string* release_connectionid(); + void set_allocated_connectionid(std::string* connectionid); + private: + const std::string& _internal_connectionid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connectionid(const std::string& value); + std::string* _internal_mutable_connectionid(); + public: + + // string sequenceNo = 3; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // @@protoc_insertion_point(class_scope:translator.UDSCloseCommChannelRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connectionid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class UDSCloseCommChannelResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.UDSCloseCommChannelResponse) */ { + public: + inline UDSCloseCommChannelResponse() : UDSCloseCommChannelResponse(nullptr) {} + ~UDSCloseCommChannelResponse() override; + explicit PROTOBUF_CONSTEXPR UDSCloseCommChannelResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UDSCloseCommChannelResponse(const UDSCloseCommChannelResponse& from); + UDSCloseCommChannelResponse(UDSCloseCommChannelResponse&& from) noexcept + : UDSCloseCommChannelResponse() { + *this = ::std::move(from); + } + + inline UDSCloseCommChannelResponse& operator=(const UDSCloseCommChannelResponse& from) { + CopyFrom(from); + return *this; + } + inline UDSCloseCommChannelResponse& operator=(UDSCloseCommChannelResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UDSCloseCommChannelResponse& default_instance() { + return *internal_default_instance(); + } + static inline const UDSCloseCommChannelResponse* internal_default_instance() { + return reinterpret_cast( + &_UDSCloseCommChannelResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(UDSCloseCommChannelResponse& a, UDSCloseCommChannelResponse& b) { + a.Swap(&b); + } + inline void Swap(UDSCloseCommChannelResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UDSCloseCommChannelResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UDSCloseCommChannelResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UDSCloseCommChannelResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UDSCloseCommChannelResponse& from) { + UDSCloseCommChannelResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UDSCloseCommChannelResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.UDSCloseCommChannelResponse"; + } + protected: + explicit UDSCloseCommChannelResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAppIDFieldNumber = 1, + kConnectionIDFieldNumber = 2, + kSequenceNoFieldNumber = 3, + kResponseCodeFieldNumber = 4, + }; + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string connectionID = 2; + void clear_connectionid(); + const std::string& connectionid() const; + template + void set_connectionid(ArgT0&& arg0, ArgT... args); + std::string* mutable_connectionid(); + PROTOBUF_NODISCARD std::string* release_connectionid(); + void set_allocated_connectionid(std::string* connectionid); + private: + const std::string& _internal_connectionid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connectionid(const std::string& value); + std::string* _internal_mutable_connectionid(); + public: + + // string sequenceNo = 3; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // string responseCode = 4; + void clear_responsecode(); + const std::string& responsecode() const; + template + void set_responsecode(ArgT0&& arg0, ArgT... args); + std::string* mutable_responsecode(); + PROTOBUF_NODISCARD std::string* release_responsecode(); + void set_allocated_responsecode(std::string* responsecode); + private: + const std::string& _internal_responsecode() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsecode(const std::string& value); + std::string* _internal_mutable_responsecode(); + public: + + // @@protoc_insertion_point(class_scope:translator.UDSCloseCommChannelResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connectionid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsecode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class ReadDataByIdentifierRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.ReadDataByIdentifierRequest) */ { + public: + inline ReadDataByIdentifierRequest() : ReadDataByIdentifierRequest(nullptr) {} + ~ReadDataByIdentifierRequest() override; + explicit PROTOBUF_CONSTEXPR ReadDataByIdentifierRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReadDataByIdentifierRequest(const ReadDataByIdentifierRequest& from); + ReadDataByIdentifierRequest(ReadDataByIdentifierRequest&& from) noexcept + : ReadDataByIdentifierRequest() { + *this = ::std::move(from); + } + + inline ReadDataByIdentifierRequest& operator=(const ReadDataByIdentifierRequest& from) { + CopyFrom(from); + return *this; + } + inline ReadDataByIdentifierRequest& operator=(ReadDataByIdentifierRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReadDataByIdentifierRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ReadDataByIdentifierRequest* internal_default_instance() { + return reinterpret_cast( + &_ReadDataByIdentifierRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(ReadDataByIdentifierRequest& a, ReadDataByIdentifierRequest& b) { + a.Swap(&b); + } + inline void Swap(ReadDataByIdentifierRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReadDataByIdentifierRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReadDataByIdentifierRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ReadDataByIdentifierRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ReadDataByIdentifierRequest& from) { + ReadDataByIdentifierRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ReadDataByIdentifierRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.ReadDataByIdentifierRequest"; + } + protected: + explicit ReadDataByIdentifierRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDidFieldNumber = 4, + kAppIDFieldNumber = 1, + kConnectionIDFieldNumber = 2, + kSequenceNoFieldNumber = 3, + }; + // repeated string did = 4; + int did_size() const; + private: + int _internal_did_size() const; + public: + void clear_did(); + const std::string& did(int index) const; + std::string* mutable_did(int index); + void set_did(int index, const std::string& value); + void set_did(int index, std::string&& value); + void set_did(int index, const char* value); + void set_did(int index, const char* value, size_t size); + std::string* add_did(); + void add_did(const std::string& value); + void add_did(std::string&& value); + void add_did(const char* value); + void add_did(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& did() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_did(); + private: + const std::string& _internal_did(int index) const; + std::string* _internal_add_did(); + public: + + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string connectionID = 2; + void clear_connectionid(); + const std::string& connectionid() const; + template + void set_connectionid(ArgT0&& arg0, ArgT... args); + std::string* mutable_connectionid(); + PROTOBUF_NODISCARD std::string* release_connectionid(); + void set_allocated_connectionid(std::string* connectionid); + private: + const std::string& _internal_connectionid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connectionid(const std::string& value); + std::string* _internal_mutable_connectionid(); + public: + + // string sequenceNo = 3; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // @@protoc_insertion_point(class_scope:translator.ReadDataByIdentifierRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField did_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connectionid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class ReadResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.ReadResponse) */ { + public: + inline ReadResponse() : ReadResponse(nullptr) {} + ~ReadResponse() override; + explicit PROTOBUF_CONSTEXPR ReadResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReadResponse(const ReadResponse& from); + ReadResponse(ReadResponse&& from) noexcept + : ReadResponse() { + *this = ::std::move(from); + } + + inline ReadResponse& operator=(const ReadResponse& from) { + CopyFrom(from); + return *this; + } + inline ReadResponse& operator=(ReadResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReadResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ReadResponse* internal_default_instance() { + return reinterpret_cast( + &_ReadResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(ReadResponse& a, ReadResponse& b) { + a.Swap(&b); + } + inline void Swap(ReadResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReadResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReadResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ReadResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ReadResponse& from) { + ReadResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ReadResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.ReadResponse"; + } + protected: + explicit ReadResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDidFieldNumber = 1, + kValueFieldNumber = 2, + kResponseCodeFieldNumber = 3, + }; + // string did = 1; + void clear_did(); + const std::string& did() const; + template + void set_did(ArgT0&& arg0, ArgT... args); + std::string* mutable_did(); + PROTOBUF_NODISCARD std::string* release_did(); + void set_allocated_did(std::string* did); + private: + const std::string& _internal_did() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_did(const std::string& value); + std::string* _internal_mutable_did(); + public: + + // string value = 2; + void clear_value(); + const std::string& value() const; + template + void set_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: + + // string responseCode = 3; + void clear_responsecode(); + const std::string& responsecode() const; + template + void set_responsecode(ArgT0&& arg0, ArgT... args); + std::string* mutable_responsecode(); + PROTOBUF_NODISCARD std::string* release_responsecode(); + void set_allocated_responsecode(std::string* responsecode); + private: + const std::string& _internal_responsecode() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsecode(const std::string& value); + std::string* _internal_mutable_responsecode(); + public: + + // @@protoc_insertion_point(class_scope:translator.ReadResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr did_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsecode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// ------------------------------------------------------------------- + +class ReadDataByIdentifierResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:translator.ReadDataByIdentifierResponse) */ { + public: + inline ReadDataByIdentifierResponse() : ReadDataByIdentifierResponse(nullptr) {} + ~ReadDataByIdentifierResponse() override; + explicit PROTOBUF_CONSTEXPR ReadDataByIdentifierResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReadDataByIdentifierResponse(const ReadDataByIdentifierResponse& from); + ReadDataByIdentifierResponse(ReadDataByIdentifierResponse&& from) noexcept + : ReadDataByIdentifierResponse() { + *this = ::std::move(from); + } + + inline ReadDataByIdentifierResponse& operator=(const ReadDataByIdentifierResponse& from) { + CopyFrom(from); + return *this; + } + inline ReadDataByIdentifierResponse& operator=(ReadDataByIdentifierResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReadDataByIdentifierResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ReadDataByIdentifierResponse* internal_default_instance() { + return reinterpret_cast( + &_ReadDataByIdentifierResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(ReadDataByIdentifierResponse& a, ReadDataByIdentifierResponse& b) { + a.Swap(&b); + } + inline void Swap(ReadDataByIdentifierResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReadDataByIdentifierResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReadDataByIdentifierResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ReadDataByIdentifierResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ReadDataByIdentifierResponse& from) { + ReadDataByIdentifierResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ReadDataByIdentifierResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "translator.ReadDataByIdentifierResponse"; + } + protected: + explicit ReadDataByIdentifierResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDataFieldNumber = 4, + kAppIDFieldNumber = 1, + kConnectionIDFieldNumber = 2, + kSequenceNoFieldNumber = 3, + kResponseCodeFieldNumber = 5, + }; + // repeated .translator.ReadResponse data = 4; + int data_size() const; + private: + int _internal_data_size() const; + public: + void clear_data(); + ::translator::ReadResponse* mutable_data(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::ReadResponse >* + mutable_data(); + private: + const ::translator::ReadResponse& _internal_data(int index) const; + ::translator::ReadResponse* _internal_add_data(); + public: + const ::translator::ReadResponse& data(int index) const; + ::translator::ReadResponse* add_data(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::ReadResponse >& + data() const; + + // string appID = 1; + void clear_appid(); + const std::string& appid() const; + template + void set_appid(ArgT0&& arg0, ArgT... args); + std::string* mutable_appid(); + PROTOBUF_NODISCARD std::string* release_appid(); + void set_allocated_appid(std::string* appid); + private: + const std::string& _internal_appid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_appid(const std::string& value); + std::string* _internal_mutable_appid(); + public: + + // string connectionID = 2; + void clear_connectionid(); + const std::string& connectionid() const; + template + void set_connectionid(ArgT0&& arg0, ArgT... args); + std::string* mutable_connectionid(); + PROTOBUF_NODISCARD std::string* release_connectionid(); + void set_allocated_connectionid(std::string* connectionid); + private: + const std::string& _internal_connectionid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connectionid(const std::string& value); + std::string* _internal_mutable_connectionid(); + public: + + // string sequenceNo = 3; + void clear_sequenceno(); + const std::string& sequenceno() const; + template + void set_sequenceno(ArgT0&& arg0, ArgT... args); + std::string* mutable_sequenceno(); + PROTOBUF_NODISCARD std::string* release_sequenceno(); + void set_allocated_sequenceno(std::string* sequenceno); + private: + const std::string& _internal_sequenceno() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sequenceno(const std::string& value); + std::string* _internal_mutable_sequenceno(); + public: + + // string responseCode = 5; + void clear_responsecode(); + const std::string& responsecode() const; + template + void set_responsecode(ArgT0&& arg0, ArgT... args); + std::string* mutable_responsecode(); + PROTOBUF_NODISCARD std::string* release_responsecode(); + void set_allocated_responsecode(std::string* responsecode); + private: + const std::string& _internal_responsecode() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsecode(const std::string& value); + std::string* _internal_mutable_responsecode(); + public: + + // @@protoc_insertion_point(class_scope:translator.ReadDataByIdentifierResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::ReadResponse > data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr appid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connectionid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sequenceno_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsecode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_translator_2dprotobuf_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// GetClaimedAddressRequest + +// string appID = 1; +inline void GetClaimedAddressRequest::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& GetClaimedAddressRequest::appid() const { + // @@protoc_insertion_point(field_get:translator.GetClaimedAddressRequest.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetClaimedAddressRequest::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.GetClaimedAddressRequest.appID) +} +inline std::string* GetClaimedAddressRequest::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.GetClaimedAddressRequest.appID) + return _s; +} +inline const std::string& GetClaimedAddressRequest::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void GetClaimedAddressRequest::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressRequest::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressRequest::release_appid() { + // @@protoc_insertion_point(field_release:translator.GetClaimedAddressRequest.appID) + return _impl_.appid_.Release(); +} +inline void GetClaimedAddressRequest::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.GetClaimedAddressRequest.appID) +} + +// string sequenceNo = 2; +inline void GetClaimedAddressRequest::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& GetClaimedAddressRequest::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.GetClaimedAddressRequest.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetClaimedAddressRequest::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.GetClaimedAddressRequest.sequenceNo) +} +inline std::string* GetClaimedAddressRequest::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.GetClaimedAddressRequest.sequenceNo) + return _s; +} +inline const std::string& GetClaimedAddressRequest::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void GetClaimedAddressRequest::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressRequest::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressRequest::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.GetClaimedAddressRequest.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void GetClaimedAddressRequest::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.GetClaimedAddressRequest.sequenceNo) +} + +// ------------------------------------------------------------------- + +// GetClaimedAddressResponse + +// string appID = 1; +inline void GetClaimedAddressResponse::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& GetClaimedAddressResponse::appid() const { + // @@protoc_insertion_point(field_get:translator.GetClaimedAddressResponse.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetClaimedAddressResponse::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.GetClaimedAddressResponse.appID) +} +inline std::string* GetClaimedAddressResponse::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.GetClaimedAddressResponse.appID) + return _s; +} +inline const std::string& GetClaimedAddressResponse::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void GetClaimedAddressResponse::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::release_appid() { + // @@protoc_insertion_point(field_release:translator.GetClaimedAddressResponse.appID) + return _impl_.appid_.Release(); +} +inline void GetClaimedAddressResponse::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.GetClaimedAddressResponse.appID) +} + +// string sequenceNo = 2; +inline void GetClaimedAddressResponse::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& GetClaimedAddressResponse::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.GetClaimedAddressResponse.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetClaimedAddressResponse::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.GetClaimedAddressResponse.sequenceNo) +} +inline std::string* GetClaimedAddressResponse::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.GetClaimedAddressResponse.sequenceNo) + return _s; +} +inline const std::string& GetClaimedAddressResponse::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void GetClaimedAddressResponse::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.GetClaimedAddressResponse.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void GetClaimedAddressResponse::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.GetClaimedAddressResponse.sequenceNo) +} + +// string claimedAddress = 3; +inline void GetClaimedAddressResponse::clear_claimedaddress() { + _impl_.claimedaddress_.ClearToEmpty(); +} +inline const std::string& GetClaimedAddressResponse::claimedaddress() const { + // @@protoc_insertion_point(field_get:translator.GetClaimedAddressResponse.claimedAddress) + return _internal_claimedaddress(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetClaimedAddressResponse::set_claimedaddress(ArgT0&& arg0, ArgT... args) { + + _impl_.claimedaddress_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.GetClaimedAddressResponse.claimedAddress) +} +inline std::string* GetClaimedAddressResponse::mutable_claimedaddress() { + std::string* _s = _internal_mutable_claimedaddress(); + // @@protoc_insertion_point(field_mutable:translator.GetClaimedAddressResponse.claimedAddress) + return _s; +} +inline const std::string& GetClaimedAddressResponse::_internal_claimedaddress() const { + return _impl_.claimedaddress_.Get(); +} +inline void GetClaimedAddressResponse::_internal_set_claimedaddress(const std::string& value) { + + _impl_.claimedaddress_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::_internal_mutable_claimedaddress() { + + return _impl_.claimedaddress_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::release_claimedaddress() { + // @@protoc_insertion_point(field_release:translator.GetClaimedAddressResponse.claimedAddress) + return _impl_.claimedaddress_.Release(); +} +inline void GetClaimedAddressResponse::set_allocated_claimedaddress(std::string* claimedaddress) { + if (claimedaddress != nullptr) { + + } else { + + } + _impl_.claimedaddress_.SetAllocated(claimedaddress, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.claimedaddress_.IsDefault()) { + _impl_.claimedaddress_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.GetClaimedAddressResponse.claimedAddress) +} + +// string responseCode = 4; +inline void GetClaimedAddressResponse::clear_responsecode() { + _impl_.responsecode_.ClearToEmpty(); +} +inline const std::string& GetClaimedAddressResponse::responsecode() const { + // @@protoc_insertion_point(field_get:translator.GetClaimedAddressResponse.responseCode) + return _internal_responsecode(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetClaimedAddressResponse::set_responsecode(ArgT0&& arg0, ArgT... args) { + + _impl_.responsecode_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.GetClaimedAddressResponse.responseCode) +} +inline std::string* GetClaimedAddressResponse::mutable_responsecode() { + std::string* _s = _internal_mutable_responsecode(); + // @@protoc_insertion_point(field_mutable:translator.GetClaimedAddressResponse.responseCode) + return _s; +} +inline const std::string& GetClaimedAddressResponse::_internal_responsecode() const { + return _impl_.responsecode_.Get(); +} +inline void GetClaimedAddressResponse::_internal_set_responsecode(const std::string& value) { + + _impl_.responsecode_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::_internal_mutable_responsecode() { + + return _impl_.responsecode_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetClaimedAddressResponse::release_responsecode() { + // @@protoc_insertion_point(field_release:translator.GetClaimedAddressResponse.responseCode) + return _impl_.responsecode_.Release(); +} +inline void GetClaimedAddressResponse::set_allocated_responsecode(std::string* responsecode) { + if (responsecode != nullptr) { + + } else { + + } + _impl_.responsecode_.SetAllocated(responsecode, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.responsecode_.IsDefault()) { + _impl_.responsecode_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.GetClaimedAddressResponse.responseCode) +} + +// ------------------------------------------------------------------- + +// UDSCANFormat + +// string canPhysReqFormat = 1; +inline void UDSCANFormat::clear_canphysreqformat() { + _impl_.canphysreqformat_.ClearToEmpty(); +} +inline const std::string& UDSCANFormat::canphysreqformat() const { + // @@protoc_insertion_point(field_get:translator.UDSCANFormat.canPhysReqFormat) + return _internal_canphysreqformat(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCANFormat::set_canphysreqformat(ArgT0&& arg0, ArgT... args) { + + _impl_.canphysreqformat_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCANFormat.canPhysReqFormat) +} +inline std::string* UDSCANFormat::mutable_canphysreqformat() { + std::string* _s = _internal_mutable_canphysreqformat(); + // @@protoc_insertion_point(field_mutable:translator.UDSCANFormat.canPhysReqFormat) + return _s; +} +inline const std::string& UDSCANFormat::_internal_canphysreqformat() const { + return _impl_.canphysreqformat_.Get(); +} +inline void UDSCANFormat::_internal_set_canphysreqformat(const std::string& value) { + + _impl_.canphysreqformat_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCANFormat::_internal_mutable_canphysreqformat() { + + return _impl_.canphysreqformat_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCANFormat::release_canphysreqformat() { + // @@protoc_insertion_point(field_release:translator.UDSCANFormat.canPhysReqFormat) + return _impl_.canphysreqformat_.Release(); +} +inline void UDSCANFormat::set_allocated_canphysreqformat(std::string* canphysreqformat) { + if (canphysreqformat != nullptr) { + + } else { + + } + _impl_.canphysreqformat_.SetAllocated(canphysreqformat, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.canphysreqformat_.IsDefault()) { + _impl_.canphysreqformat_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCANFormat.canPhysReqFormat) +} + +// string canRespUSDTFormat = 2; +inline void UDSCANFormat::clear_canrespusdtformat() { + _impl_.canrespusdtformat_.ClearToEmpty(); +} +inline const std::string& UDSCANFormat::canrespusdtformat() const { + // @@protoc_insertion_point(field_get:translator.UDSCANFormat.canRespUSDTFormat) + return _internal_canrespusdtformat(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCANFormat::set_canrespusdtformat(ArgT0&& arg0, ArgT... args) { + + _impl_.canrespusdtformat_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCANFormat.canRespUSDTFormat) +} +inline std::string* UDSCANFormat::mutable_canrespusdtformat() { + std::string* _s = _internal_mutable_canrespusdtformat(); + // @@protoc_insertion_point(field_mutable:translator.UDSCANFormat.canRespUSDTFormat) + return _s; +} +inline const std::string& UDSCANFormat::_internal_canrespusdtformat() const { + return _impl_.canrespusdtformat_.Get(); +} +inline void UDSCANFormat::_internal_set_canrespusdtformat(const std::string& value) { + + _impl_.canrespusdtformat_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCANFormat::_internal_mutable_canrespusdtformat() { + + return _impl_.canrespusdtformat_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCANFormat::release_canrespusdtformat() { + // @@protoc_insertion_point(field_release:translator.UDSCANFormat.canRespUSDTFormat) + return _impl_.canrespusdtformat_.Release(); +} +inline void UDSCANFormat::set_allocated_canrespusdtformat(std::string* canrespusdtformat) { + if (canrespusdtformat != nullptr) { + + } else { + + } + _impl_.canrespusdtformat_.SetAllocated(canrespusdtformat, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.canrespusdtformat_.IsDefault()) { + _impl_.canrespusdtformat_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCANFormat.canRespUSDTFormat) +} + +// ------------------------------------------------------------------- + +// UDSOpenCommChannelRequest + +// string appID = 1; +inline void UDSOpenCommChannelRequest::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelRequest::appid() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelRequest.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelRequest::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelRequest.appID) +} +inline std::string* UDSOpenCommChannelRequest::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelRequest.appID) + return _s; +} +inline const std::string& UDSOpenCommChannelRequest::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void UDSOpenCommChannelRequest::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::release_appid() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelRequest.appID) + return _impl_.appid_.Release(); +} +inline void UDSOpenCommChannelRequest::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelRequest.appID) +} + +// string sequenceNo = 2; +inline void UDSOpenCommChannelRequest::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelRequest::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelRequest.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelRequest::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelRequest.sequenceNo) +} +inline std::string* UDSOpenCommChannelRequest::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelRequest.sequenceNo) + return _s; +} +inline const std::string& UDSOpenCommChannelRequest::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void UDSOpenCommChannelRequest::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelRequest.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void UDSOpenCommChannelRequest::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelRequest.sequenceNo) +} + +// string toolAddress = 3; +inline void UDSOpenCommChannelRequest::clear_tooladdress() { + _impl_.tooladdress_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelRequest::tooladdress() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelRequest.toolAddress) + return _internal_tooladdress(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelRequest::set_tooladdress(ArgT0&& arg0, ArgT... args) { + + _impl_.tooladdress_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelRequest.toolAddress) +} +inline std::string* UDSOpenCommChannelRequest::mutable_tooladdress() { + std::string* _s = _internal_mutable_tooladdress(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelRequest.toolAddress) + return _s; +} +inline const std::string& UDSOpenCommChannelRequest::_internal_tooladdress() const { + return _impl_.tooladdress_.Get(); +} +inline void UDSOpenCommChannelRequest::_internal_set_tooladdress(const std::string& value) { + + _impl_.tooladdress_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::_internal_mutable_tooladdress() { + + return _impl_.tooladdress_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::release_tooladdress() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelRequest.toolAddress) + return _impl_.tooladdress_.Release(); +} +inline void UDSOpenCommChannelRequest::set_allocated_tooladdress(std::string* tooladdress) { + if (tooladdress != nullptr) { + + } else { + + } + _impl_.tooladdress_.SetAllocated(tooladdress, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tooladdress_.IsDefault()) { + _impl_.tooladdress_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelRequest.toolAddress) +} + +// string ecuAddress = 4; +inline void UDSOpenCommChannelRequest::clear_ecuaddress() { + _impl_.ecuaddress_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelRequest::ecuaddress() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelRequest.ecuAddress) + return _internal_ecuaddress(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelRequest::set_ecuaddress(ArgT0&& arg0, ArgT... args) { + + _impl_.ecuaddress_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelRequest.ecuAddress) +} +inline std::string* UDSOpenCommChannelRequest::mutable_ecuaddress() { + std::string* _s = _internal_mutable_ecuaddress(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelRequest.ecuAddress) + return _s; +} +inline const std::string& UDSOpenCommChannelRequest::_internal_ecuaddress() const { + return _impl_.ecuaddress_.Get(); +} +inline void UDSOpenCommChannelRequest::_internal_set_ecuaddress(const std::string& value) { + + _impl_.ecuaddress_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::_internal_mutable_ecuaddress() { + + return _impl_.ecuaddress_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::release_ecuaddress() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelRequest.ecuAddress) + return _impl_.ecuaddress_.Release(); +} +inline void UDSOpenCommChannelRequest::set_allocated_ecuaddress(std::string* ecuaddress) { + if (ecuaddress != nullptr) { + + } else { + + } + _impl_.ecuaddress_.SetAllocated(ecuaddress, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.ecuaddress_.IsDefault()) { + _impl_.ecuaddress_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelRequest.ecuAddress) +} + +// repeated .translator.UDSCANFormat canFormat = 5; +inline int UDSOpenCommChannelRequest::_internal_canformat_size() const { + return _impl_.canformat_.size(); +} +inline int UDSOpenCommChannelRequest::canformat_size() const { + return _internal_canformat_size(); +} +inline void UDSOpenCommChannelRequest::clear_canformat() { + _impl_.canformat_.Clear(); +} +inline ::translator::UDSCANFormat* UDSOpenCommChannelRequest::mutable_canformat(int index) { + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelRequest.canFormat) + return _impl_.canformat_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::UDSCANFormat >* +UDSOpenCommChannelRequest::mutable_canformat() { + // @@protoc_insertion_point(field_mutable_list:translator.UDSOpenCommChannelRequest.canFormat) + return &_impl_.canformat_; +} +inline const ::translator::UDSCANFormat& UDSOpenCommChannelRequest::_internal_canformat(int index) const { + return _impl_.canformat_.Get(index); +} +inline const ::translator::UDSCANFormat& UDSOpenCommChannelRequest::canformat(int index) const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelRequest.canFormat) + return _internal_canformat(index); +} +inline ::translator::UDSCANFormat* UDSOpenCommChannelRequest::_internal_add_canformat() { + return _impl_.canformat_.Add(); +} +inline ::translator::UDSCANFormat* UDSOpenCommChannelRequest::add_canformat() { + ::translator::UDSCANFormat* _add = _internal_add_canformat(); + // @@protoc_insertion_point(field_add:translator.UDSOpenCommChannelRequest.canFormat) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::UDSCANFormat >& +UDSOpenCommChannelRequest::canformat() const { + // @@protoc_insertion_point(field_list:translator.UDSOpenCommChannelRequest.canFormat) + return _impl_.canformat_; +} + +// string resourceName = 6; +inline void UDSOpenCommChannelRequest::clear_resourcename() { + _impl_.resourcename_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelRequest::resourcename() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelRequest.resourceName) + return _internal_resourcename(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelRequest::set_resourcename(ArgT0&& arg0, ArgT... args) { + + _impl_.resourcename_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelRequest.resourceName) +} +inline std::string* UDSOpenCommChannelRequest::mutable_resourcename() { + std::string* _s = _internal_mutable_resourcename(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelRequest.resourceName) + return _s; +} +inline const std::string& UDSOpenCommChannelRequest::_internal_resourcename() const { + return _impl_.resourcename_.Get(); +} +inline void UDSOpenCommChannelRequest::_internal_set_resourcename(const std::string& value) { + + _impl_.resourcename_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::_internal_mutable_resourcename() { + + return _impl_.resourcename_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelRequest::release_resourcename() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelRequest.resourceName) + return _impl_.resourcename_.Release(); +} +inline void UDSOpenCommChannelRequest::set_allocated_resourcename(std::string* resourcename) { + if (resourcename != nullptr) { + + } else { + + } + _impl_.resourcename_.SetAllocated(resourcename, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.resourcename_.IsDefault()) { + _impl_.resourcename_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelRequest.resourceName) +} + +// ------------------------------------------------------------------- + +// UDSOpenCommChannelResponse + +// string appID = 1; +inline void UDSOpenCommChannelResponse::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelResponse::appid() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelResponse.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelResponse::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelResponse.appID) +} +inline std::string* UDSOpenCommChannelResponse::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelResponse.appID) + return _s; +} +inline const std::string& UDSOpenCommChannelResponse::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void UDSOpenCommChannelResponse::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::release_appid() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelResponse.appID) + return _impl_.appid_.Release(); +} +inline void UDSOpenCommChannelResponse::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelResponse.appID) +} + +// string connectionID = 2; +inline void UDSOpenCommChannelResponse::clear_connectionid() { + _impl_.connectionid_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelResponse::connectionid() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelResponse.connectionID) + return _internal_connectionid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelResponse::set_connectionid(ArgT0&& arg0, ArgT... args) { + + _impl_.connectionid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelResponse.connectionID) +} +inline std::string* UDSOpenCommChannelResponse::mutable_connectionid() { + std::string* _s = _internal_mutable_connectionid(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelResponse.connectionID) + return _s; +} +inline const std::string& UDSOpenCommChannelResponse::_internal_connectionid() const { + return _impl_.connectionid_.Get(); +} +inline void UDSOpenCommChannelResponse::_internal_set_connectionid(const std::string& value) { + + _impl_.connectionid_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::_internal_mutable_connectionid() { + + return _impl_.connectionid_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::release_connectionid() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelResponse.connectionID) + return _impl_.connectionid_.Release(); +} +inline void UDSOpenCommChannelResponse::set_allocated_connectionid(std::string* connectionid) { + if (connectionid != nullptr) { + + } else { + + } + _impl_.connectionid_.SetAllocated(connectionid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.connectionid_.IsDefault()) { + _impl_.connectionid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelResponse.connectionID) +} + +// string sequenceNo = 3; +inline void UDSOpenCommChannelResponse::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelResponse::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelResponse.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelResponse::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelResponse.sequenceNo) +} +inline std::string* UDSOpenCommChannelResponse::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelResponse.sequenceNo) + return _s; +} +inline const std::string& UDSOpenCommChannelResponse::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void UDSOpenCommChannelResponse::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelResponse.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void UDSOpenCommChannelResponse::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelResponse.sequenceNo) +} + +// string responseCode = 4; +inline void UDSOpenCommChannelResponse::clear_responsecode() { + _impl_.responsecode_.ClearToEmpty(); +} +inline const std::string& UDSOpenCommChannelResponse::responsecode() const { + // @@protoc_insertion_point(field_get:translator.UDSOpenCommChannelResponse.responseCode) + return _internal_responsecode(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSOpenCommChannelResponse::set_responsecode(ArgT0&& arg0, ArgT... args) { + + _impl_.responsecode_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSOpenCommChannelResponse.responseCode) +} +inline std::string* UDSOpenCommChannelResponse::mutable_responsecode() { + std::string* _s = _internal_mutable_responsecode(); + // @@protoc_insertion_point(field_mutable:translator.UDSOpenCommChannelResponse.responseCode) + return _s; +} +inline const std::string& UDSOpenCommChannelResponse::_internal_responsecode() const { + return _impl_.responsecode_.Get(); +} +inline void UDSOpenCommChannelResponse::_internal_set_responsecode(const std::string& value) { + + _impl_.responsecode_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::_internal_mutable_responsecode() { + + return _impl_.responsecode_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSOpenCommChannelResponse::release_responsecode() { + // @@protoc_insertion_point(field_release:translator.UDSOpenCommChannelResponse.responseCode) + return _impl_.responsecode_.Release(); +} +inline void UDSOpenCommChannelResponse::set_allocated_responsecode(std::string* responsecode) { + if (responsecode != nullptr) { + + } else { + + } + _impl_.responsecode_.SetAllocated(responsecode, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.responsecode_.IsDefault()) { + _impl_.responsecode_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSOpenCommChannelResponse.responseCode) +} + +// ------------------------------------------------------------------- + +// UDSCloseCommChannelRequest + +// string appID = 1; +inline void UDSCloseCommChannelRequest::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& UDSCloseCommChannelRequest::appid() const { + // @@protoc_insertion_point(field_get:translator.UDSCloseCommChannelRequest.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCloseCommChannelRequest::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCloseCommChannelRequest.appID) +} +inline std::string* UDSCloseCommChannelRequest::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.UDSCloseCommChannelRequest.appID) + return _s; +} +inline const std::string& UDSCloseCommChannelRequest::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void UDSCloseCommChannelRequest::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelRequest::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelRequest::release_appid() { + // @@protoc_insertion_point(field_release:translator.UDSCloseCommChannelRequest.appID) + return _impl_.appid_.Release(); +} +inline void UDSCloseCommChannelRequest::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCloseCommChannelRequest.appID) +} + +// string connectionID = 2; +inline void UDSCloseCommChannelRequest::clear_connectionid() { + _impl_.connectionid_.ClearToEmpty(); +} +inline const std::string& UDSCloseCommChannelRequest::connectionid() const { + // @@protoc_insertion_point(field_get:translator.UDSCloseCommChannelRequest.connectionID) + return _internal_connectionid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCloseCommChannelRequest::set_connectionid(ArgT0&& arg0, ArgT... args) { + + _impl_.connectionid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCloseCommChannelRequest.connectionID) +} +inline std::string* UDSCloseCommChannelRequest::mutable_connectionid() { + std::string* _s = _internal_mutable_connectionid(); + // @@protoc_insertion_point(field_mutable:translator.UDSCloseCommChannelRequest.connectionID) + return _s; +} +inline const std::string& UDSCloseCommChannelRequest::_internal_connectionid() const { + return _impl_.connectionid_.Get(); +} +inline void UDSCloseCommChannelRequest::_internal_set_connectionid(const std::string& value) { + + _impl_.connectionid_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelRequest::_internal_mutable_connectionid() { + + return _impl_.connectionid_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelRequest::release_connectionid() { + // @@protoc_insertion_point(field_release:translator.UDSCloseCommChannelRequest.connectionID) + return _impl_.connectionid_.Release(); +} +inline void UDSCloseCommChannelRequest::set_allocated_connectionid(std::string* connectionid) { + if (connectionid != nullptr) { + + } else { + + } + _impl_.connectionid_.SetAllocated(connectionid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.connectionid_.IsDefault()) { + _impl_.connectionid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCloseCommChannelRequest.connectionID) +} + +// string sequenceNo = 3; +inline void UDSCloseCommChannelRequest::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& UDSCloseCommChannelRequest::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.UDSCloseCommChannelRequest.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCloseCommChannelRequest::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCloseCommChannelRequest.sequenceNo) +} +inline std::string* UDSCloseCommChannelRequest::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.UDSCloseCommChannelRequest.sequenceNo) + return _s; +} +inline const std::string& UDSCloseCommChannelRequest::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void UDSCloseCommChannelRequest::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelRequest::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelRequest::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.UDSCloseCommChannelRequest.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void UDSCloseCommChannelRequest::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCloseCommChannelRequest.sequenceNo) +} + +// ------------------------------------------------------------------- + +// UDSCloseCommChannelResponse + +// string appID = 1; +inline void UDSCloseCommChannelResponse::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& UDSCloseCommChannelResponse::appid() const { + // @@protoc_insertion_point(field_get:translator.UDSCloseCommChannelResponse.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCloseCommChannelResponse::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCloseCommChannelResponse.appID) +} +inline std::string* UDSCloseCommChannelResponse::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.UDSCloseCommChannelResponse.appID) + return _s; +} +inline const std::string& UDSCloseCommChannelResponse::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void UDSCloseCommChannelResponse::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::release_appid() { + // @@protoc_insertion_point(field_release:translator.UDSCloseCommChannelResponse.appID) + return _impl_.appid_.Release(); +} +inline void UDSCloseCommChannelResponse::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCloseCommChannelResponse.appID) +} + +// string connectionID = 2; +inline void UDSCloseCommChannelResponse::clear_connectionid() { + _impl_.connectionid_.ClearToEmpty(); +} +inline const std::string& UDSCloseCommChannelResponse::connectionid() const { + // @@protoc_insertion_point(field_get:translator.UDSCloseCommChannelResponse.connectionID) + return _internal_connectionid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCloseCommChannelResponse::set_connectionid(ArgT0&& arg0, ArgT... args) { + + _impl_.connectionid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCloseCommChannelResponse.connectionID) +} +inline std::string* UDSCloseCommChannelResponse::mutable_connectionid() { + std::string* _s = _internal_mutable_connectionid(); + // @@protoc_insertion_point(field_mutable:translator.UDSCloseCommChannelResponse.connectionID) + return _s; +} +inline const std::string& UDSCloseCommChannelResponse::_internal_connectionid() const { + return _impl_.connectionid_.Get(); +} +inline void UDSCloseCommChannelResponse::_internal_set_connectionid(const std::string& value) { + + _impl_.connectionid_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::_internal_mutable_connectionid() { + + return _impl_.connectionid_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::release_connectionid() { + // @@protoc_insertion_point(field_release:translator.UDSCloseCommChannelResponse.connectionID) + return _impl_.connectionid_.Release(); +} +inline void UDSCloseCommChannelResponse::set_allocated_connectionid(std::string* connectionid) { + if (connectionid != nullptr) { + + } else { + + } + _impl_.connectionid_.SetAllocated(connectionid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.connectionid_.IsDefault()) { + _impl_.connectionid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCloseCommChannelResponse.connectionID) +} + +// string sequenceNo = 3; +inline void UDSCloseCommChannelResponse::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& UDSCloseCommChannelResponse::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.UDSCloseCommChannelResponse.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCloseCommChannelResponse::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCloseCommChannelResponse.sequenceNo) +} +inline std::string* UDSCloseCommChannelResponse::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.UDSCloseCommChannelResponse.sequenceNo) + return _s; +} +inline const std::string& UDSCloseCommChannelResponse::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void UDSCloseCommChannelResponse::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.UDSCloseCommChannelResponse.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void UDSCloseCommChannelResponse::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCloseCommChannelResponse.sequenceNo) +} + +// string responseCode = 4; +inline void UDSCloseCommChannelResponse::clear_responsecode() { + _impl_.responsecode_.ClearToEmpty(); +} +inline const std::string& UDSCloseCommChannelResponse::responsecode() const { + // @@protoc_insertion_point(field_get:translator.UDSCloseCommChannelResponse.responseCode) + return _internal_responsecode(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UDSCloseCommChannelResponse::set_responsecode(ArgT0&& arg0, ArgT... args) { + + _impl_.responsecode_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.UDSCloseCommChannelResponse.responseCode) +} +inline std::string* UDSCloseCommChannelResponse::mutable_responsecode() { + std::string* _s = _internal_mutable_responsecode(); + // @@protoc_insertion_point(field_mutable:translator.UDSCloseCommChannelResponse.responseCode) + return _s; +} +inline const std::string& UDSCloseCommChannelResponse::_internal_responsecode() const { + return _impl_.responsecode_.Get(); +} +inline void UDSCloseCommChannelResponse::_internal_set_responsecode(const std::string& value) { + + _impl_.responsecode_.Set(value, GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::_internal_mutable_responsecode() { + + return _impl_.responsecode_.Mutable(GetArenaForAllocation()); +} +inline std::string* UDSCloseCommChannelResponse::release_responsecode() { + // @@protoc_insertion_point(field_release:translator.UDSCloseCommChannelResponse.responseCode) + return _impl_.responsecode_.Release(); +} +inline void UDSCloseCommChannelResponse::set_allocated_responsecode(std::string* responsecode) { + if (responsecode != nullptr) { + + } else { + + } + _impl_.responsecode_.SetAllocated(responsecode, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.responsecode_.IsDefault()) { + _impl_.responsecode_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.UDSCloseCommChannelResponse.responseCode) +} + +// ------------------------------------------------------------------- + +// ReadDataByIdentifierRequest + +// string appID = 1; +inline void ReadDataByIdentifierRequest::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& ReadDataByIdentifierRequest::appid() const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierRequest.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadDataByIdentifierRequest::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierRequest.appID) +} +inline std::string* ReadDataByIdentifierRequest::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierRequest.appID) + return _s; +} +inline const std::string& ReadDataByIdentifierRequest::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void ReadDataByIdentifierRequest::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierRequest::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierRequest::release_appid() { + // @@protoc_insertion_point(field_release:translator.ReadDataByIdentifierRequest.appID) + return _impl_.appid_.Release(); +} +inline void ReadDataByIdentifierRequest::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadDataByIdentifierRequest.appID) +} + +// string connectionID = 2; +inline void ReadDataByIdentifierRequest::clear_connectionid() { + _impl_.connectionid_.ClearToEmpty(); +} +inline const std::string& ReadDataByIdentifierRequest::connectionid() const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierRequest.connectionID) + return _internal_connectionid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadDataByIdentifierRequest::set_connectionid(ArgT0&& arg0, ArgT... args) { + + _impl_.connectionid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierRequest.connectionID) +} +inline std::string* ReadDataByIdentifierRequest::mutable_connectionid() { + std::string* _s = _internal_mutable_connectionid(); + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierRequest.connectionID) + return _s; +} +inline const std::string& ReadDataByIdentifierRequest::_internal_connectionid() const { + return _impl_.connectionid_.Get(); +} +inline void ReadDataByIdentifierRequest::_internal_set_connectionid(const std::string& value) { + + _impl_.connectionid_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierRequest::_internal_mutable_connectionid() { + + return _impl_.connectionid_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierRequest::release_connectionid() { + // @@protoc_insertion_point(field_release:translator.ReadDataByIdentifierRequest.connectionID) + return _impl_.connectionid_.Release(); +} +inline void ReadDataByIdentifierRequest::set_allocated_connectionid(std::string* connectionid) { + if (connectionid != nullptr) { + + } else { + + } + _impl_.connectionid_.SetAllocated(connectionid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.connectionid_.IsDefault()) { + _impl_.connectionid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadDataByIdentifierRequest.connectionID) +} + +// string sequenceNo = 3; +inline void ReadDataByIdentifierRequest::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& ReadDataByIdentifierRequest::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierRequest.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadDataByIdentifierRequest::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierRequest.sequenceNo) +} +inline std::string* ReadDataByIdentifierRequest::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierRequest.sequenceNo) + return _s; +} +inline const std::string& ReadDataByIdentifierRequest::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void ReadDataByIdentifierRequest::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierRequest::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierRequest::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.ReadDataByIdentifierRequest.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void ReadDataByIdentifierRequest::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadDataByIdentifierRequest.sequenceNo) +} + +// repeated string did = 4; +inline int ReadDataByIdentifierRequest::_internal_did_size() const { + return _impl_.did_.size(); +} +inline int ReadDataByIdentifierRequest::did_size() const { + return _internal_did_size(); +} +inline void ReadDataByIdentifierRequest::clear_did() { + _impl_.did_.Clear(); +} +inline std::string* ReadDataByIdentifierRequest::add_did() { + std::string* _s = _internal_add_did(); + // @@protoc_insertion_point(field_add_mutable:translator.ReadDataByIdentifierRequest.did) + return _s; +} +inline const std::string& ReadDataByIdentifierRequest::_internal_did(int index) const { + return _impl_.did_.Get(index); +} +inline const std::string& ReadDataByIdentifierRequest::did(int index) const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierRequest.did) + return _internal_did(index); +} +inline std::string* ReadDataByIdentifierRequest::mutable_did(int index) { + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierRequest.did) + return _impl_.did_.Mutable(index); +} +inline void ReadDataByIdentifierRequest::set_did(int index, const std::string& value) { + _impl_.did_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierRequest.did) +} +inline void ReadDataByIdentifierRequest::set_did(int index, std::string&& value) { + _impl_.did_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierRequest.did) +} +inline void ReadDataByIdentifierRequest::set_did(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.did_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:translator.ReadDataByIdentifierRequest.did) +} +inline void ReadDataByIdentifierRequest::set_did(int index, const char* value, size_t size) { + _impl_.did_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:translator.ReadDataByIdentifierRequest.did) +} +inline std::string* ReadDataByIdentifierRequest::_internal_add_did() { + return _impl_.did_.Add(); +} +inline void ReadDataByIdentifierRequest::add_did(const std::string& value) { + _impl_.did_.Add()->assign(value); + // @@protoc_insertion_point(field_add:translator.ReadDataByIdentifierRequest.did) +} +inline void ReadDataByIdentifierRequest::add_did(std::string&& value) { + _impl_.did_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:translator.ReadDataByIdentifierRequest.did) +} +inline void ReadDataByIdentifierRequest::add_did(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.did_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:translator.ReadDataByIdentifierRequest.did) +} +inline void ReadDataByIdentifierRequest::add_did(const char* value, size_t size) { + _impl_.did_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:translator.ReadDataByIdentifierRequest.did) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ReadDataByIdentifierRequest::did() const { + // @@protoc_insertion_point(field_list:translator.ReadDataByIdentifierRequest.did) + return _impl_.did_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ReadDataByIdentifierRequest::mutable_did() { + // @@protoc_insertion_point(field_mutable_list:translator.ReadDataByIdentifierRequest.did) + return &_impl_.did_; +} + +// ------------------------------------------------------------------- + +// ReadResponse + +// string did = 1; +inline void ReadResponse::clear_did() { + _impl_.did_.ClearToEmpty(); +} +inline const std::string& ReadResponse::did() const { + // @@protoc_insertion_point(field_get:translator.ReadResponse.did) + return _internal_did(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadResponse::set_did(ArgT0&& arg0, ArgT... args) { + + _impl_.did_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadResponse.did) +} +inline std::string* ReadResponse::mutable_did() { + std::string* _s = _internal_mutable_did(); + // @@protoc_insertion_point(field_mutable:translator.ReadResponse.did) + return _s; +} +inline const std::string& ReadResponse::_internal_did() const { + return _impl_.did_.Get(); +} +inline void ReadResponse::_internal_set_did(const std::string& value) { + + _impl_.did_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadResponse::_internal_mutable_did() { + + return _impl_.did_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadResponse::release_did() { + // @@protoc_insertion_point(field_release:translator.ReadResponse.did) + return _impl_.did_.Release(); +} +inline void ReadResponse::set_allocated_did(std::string* did) { + if (did != nullptr) { + + } else { + + } + _impl_.did_.SetAllocated(did, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.did_.IsDefault()) { + _impl_.did_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadResponse.did) +} + +// string value = 2; +inline void ReadResponse::clear_value() { + _impl_.value_.ClearToEmpty(); +} +inline const std::string& ReadResponse::value() const { + // @@protoc_insertion_point(field_get:translator.ReadResponse.value) + return _internal_value(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadResponse::set_value(ArgT0&& arg0, ArgT... args) { + + _impl_.value_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadResponse.value) +} +inline std::string* ReadResponse::mutable_value() { + std::string* _s = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:translator.ReadResponse.value) + return _s; +} +inline const std::string& ReadResponse::_internal_value() const { + return _impl_.value_.Get(); +} +inline void ReadResponse::_internal_set_value(const std::string& value) { + + _impl_.value_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadResponse::_internal_mutable_value() { + + return _impl_.value_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadResponse::release_value() { + // @@protoc_insertion_point(field_release:translator.ReadResponse.value) + return _impl_.value_.Release(); +} +inline void ReadResponse::set_allocated_value(std::string* value) { + if (value != nullptr) { + + } else { + + } + _impl_.value_.SetAllocated(value, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadResponse.value) +} + +// string responseCode = 3; +inline void ReadResponse::clear_responsecode() { + _impl_.responsecode_.ClearToEmpty(); +} +inline const std::string& ReadResponse::responsecode() const { + // @@protoc_insertion_point(field_get:translator.ReadResponse.responseCode) + return _internal_responsecode(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadResponse::set_responsecode(ArgT0&& arg0, ArgT... args) { + + _impl_.responsecode_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadResponse.responseCode) +} +inline std::string* ReadResponse::mutable_responsecode() { + std::string* _s = _internal_mutable_responsecode(); + // @@protoc_insertion_point(field_mutable:translator.ReadResponse.responseCode) + return _s; +} +inline const std::string& ReadResponse::_internal_responsecode() const { + return _impl_.responsecode_.Get(); +} +inline void ReadResponse::_internal_set_responsecode(const std::string& value) { + + _impl_.responsecode_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadResponse::_internal_mutable_responsecode() { + + return _impl_.responsecode_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadResponse::release_responsecode() { + // @@protoc_insertion_point(field_release:translator.ReadResponse.responseCode) + return _impl_.responsecode_.Release(); +} +inline void ReadResponse::set_allocated_responsecode(std::string* responsecode) { + if (responsecode != nullptr) { + + } else { + + } + _impl_.responsecode_.SetAllocated(responsecode, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.responsecode_.IsDefault()) { + _impl_.responsecode_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadResponse.responseCode) +} + +// ------------------------------------------------------------------- + +// ReadDataByIdentifierResponse + +// string appID = 1; +inline void ReadDataByIdentifierResponse::clear_appid() { + _impl_.appid_.ClearToEmpty(); +} +inline const std::string& ReadDataByIdentifierResponse::appid() const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierResponse.appID) + return _internal_appid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadDataByIdentifierResponse::set_appid(ArgT0&& arg0, ArgT... args) { + + _impl_.appid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierResponse.appID) +} +inline std::string* ReadDataByIdentifierResponse::mutable_appid() { + std::string* _s = _internal_mutable_appid(); + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierResponse.appID) + return _s; +} +inline const std::string& ReadDataByIdentifierResponse::_internal_appid() const { + return _impl_.appid_.Get(); +} +inline void ReadDataByIdentifierResponse::_internal_set_appid(const std::string& value) { + + _impl_.appid_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::_internal_mutable_appid() { + + return _impl_.appid_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::release_appid() { + // @@protoc_insertion_point(field_release:translator.ReadDataByIdentifierResponse.appID) + return _impl_.appid_.Release(); +} +inline void ReadDataByIdentifierResponse::set_allocated_appid(std::string* appid) { + if (appid != nullptr) { + + } else { + + } + _impl_.appid_.SetAllocated(appid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.appid_.IsDefault()) { + _impl_.appid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadDataByIdentifierResponse.appID) +} + +// string connectionID = 2; +inline void ReadDataByIdentifierResponse::clear_connectionid() { + _impl_.connectionid_.ClearToEmpty(); +} +inline const std::string& ReadDataByIdentifierResponse::connectionid() const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierResponse.connectionID) + return _internal_connectionid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadDataByIdentifierResponse::set_connectionid(ArgT0&& arg0, ArgT... args) { + + _impl_.connectionid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierResponse.connectionID) +} +inline std::string* ReadDataByIdentifierResponse::mutable_connectionid() { + std::string* _s = _internal_mutable_connectionid(); + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierResponse.connectionID) + return _s; +} +inline const std::string& ReadDataByIdentifierResponse::_internal_connectionid() const { + return _impl_.connectionid_.Get(); +} +inline void ReadDataByIdentifierResponse::_internal_set_connectionid(const std::string& value) { + + _impl_.connectionid_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::_internal_mutable_connectionid() { + + return _impl_.connectionid_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::release_connectionid() { + // @@protoc_insertion_point(field_release:translator.ReadDataByIdentifierResponse.connectionID) + return _impl_.connectionid_.Release(); +} +inline void ReadDataByIdentifierResponse::set_allocated_connectionid(std::string* connectionid) { + if (connectionid != nullptr) { + + } else { + + } + _impl_.connectionid_.SetAllocated(connectionid, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.connectionid_.IsDefault()) { + _impl_.connectionid_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadDataByIdentifierResponse.connectionID) +} + +// string sequenceNo = 3; +inline void ReadDataByIdentifierResponse::clear_sequenceno() { + _impl_.sequenceno_.ClearToEmpty(); +} +inline const std::string& ReadDataByIdentifierResponse::sequenceno() const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierResponse.sequenceNo) + return _internal_sequenceno(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadDataByIdentifierResponse::set_sequenceno(ArgT0&& arg0, ArgT... args) { + + _impl_.sequenceno_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierResponse.sequenceNo) +} +inline std::string* ReadDataByIdentifierResponse::mutable_sequenceno() { + std::string* _s = _internal_mutable_sequenceno(); + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierResponse.sequenceNo) + return _s; +} +inline const std::string& ReadDataByIdentifierResponse::_internal_sequenceno() const { + return _impl_.sequenceno_.Get(); +} +inline void ReadDataByIdentifierResponse::_internal_set_sequenceno(const std::string& value) { + + _impl_.sequenceno_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::_internal_mutable_sequenceno() { + + return _impl_.sequenceno_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::release_sequenceno() { + // @@protoc_insertion_point(field_release:translator.ReadDataByIdentifierResponse.sequenceNo) + return _impl_.sequenceno_.Release(); +} +inline void ReadDataByIdentifierResponse::set_allocated_sequenceno(std::string* sequenceno) { + if (sequenceno != nullptr) { + + } else { + + } + _impl_.sequenceno_.SetAllocated(sequenceno, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sequenceno_.IsDefault()) { + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadDataByIdentifierResponse.sequenceNo) +} + +// repeated .translator.ReadResponse data = 4; +inline int ReadDataByIdentifierResponse::_internal_data_size() const { + return _impl_.data_.size(); +} +inline int ReadDataByIdentifierResponse::data_size() const { + return _internal_data_size(); +} +inline void ReadDataByIdentifierResponse::clear_data() { + _impl_.data_.Clear(); +} +inline ::translator::ReadResponse* ReadDataByIdentifierResponse::mutable_data(int index) { + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierResponse.data) + return _impl_.data_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::ReadResponse >* +ReadDataByIdentifierResponse::mutable_data() { + // @@protoc_insertion_point(field_mutable_list:translator.ReadDataByIdentifierResponse.data) + return &_impl_.data_; +} +inline const ::translator::ReadResponse& ReadDataByIdentifierResponse::_internal_data(int index) const { + return _impl_.data_.Get(index); +} +inline const ::translator::ReadResponse& ReadDataByIdentifierResponse::data(int index) const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierResponse.data) + return _internal_data(index); +} +inline ::translator::ReadResponse* ReadDataByIdentifierResponse::_internal_add_data() { + return _impl_.data_.Add(); +} +inline ::translator::ReadResponse* ReadDataByIdentifierResponse::add_data() { + ::translator::ReadResponse* _add = _internal_add_data(); + // @@protoc_insertion_point(field_add:translator.ReadDataByIdentifierResponse.data) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::translator::ReadResponse >& +ReadDataByIdentifierResponse::data() const { + // @@protoc_insertion_point(field_list:translator.ReadDataByIdentifierResponse.data) + return _impl_.data_; +} + +// string responseCode = 5; +inline void ReadDataByIdentifierResponse::clear_responsecode() { + _impl_.responsecode_.ClearToEmpty(); +} +inline const std::string& ReadDataByIdentifierResponse::responsecode() const { + // @@protoc_insertion_point(field_get:translator.ReadDataByIdentifierResponse.responseCode) + return _internal_responsecode(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReadDataByIdentifierResponse::set_responsecode(ArgT0&& arg0, ArgT... args) { + + _impl_.responsecode_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:translator.ReadDataByIdentifierResponse.responseCode) +} +inline std::string* ReadDataByIdentifierResponse::mutable_responsecode() { + std::string* _s = _internal_mutable_responsecode(); + // @@protoc_insertion_point(field_mutable:translator.ReadDataByIdentifierResponse.responseCode) + return _s; +} +inline const std::string& ReadDataByIdentifierResponse::_internal_responsecode() const { + return _impl_.responsecode_.Get(); +} +inline void ReadDataByIdentifierResponse::_internal_set_responsecode(const std::string& value) { + + _impl_.responsecode_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::_internal_mutable_responsecode() { + + return _impl_.responsecode_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReadDataByIdentifierResponse::release_responsecode() { + // @@protoc_insertion_point(field_release:translator.ReadDataByIdentifierResponse.responseCode) + return _impl_.responsecode_.Release(); +} +inline void ReadDataByIdentifierResponse::set_allocated_responsecode(std::string* responsecode) { + if (responsecode != nullptr) { + + } else { + + } + _impl_.responsecode_.SetAllocated(responsecode, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.responsecode_.IsDefault()) { + _impl_.responsecode_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:translator.ReadDataByIdentifierResponse.responseCode) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace translator + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_translator_2dprotobuf_2eproto diff --git a/src/up-cpp-server/include/translator.h b/src/up-cpp-server/include/translator.h new file mode 100644 index 0000000..40ac8da --- /dev/null +++ b/src/up-cpp-server/include/translator.h @@ -0,0 +1,42 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#pragma once +#include +#include +#include +#include +#include +#include "apiconstants.h" +#include "iintercontainer-messenger.h" +#include "translator-protobuf.pb.h" + +class UDS +{ + std::string connectionId; +public: + // UDS constructor + explicit UDS() { + + }; + + /** @brief - OpenCommunicationChannel method opens a connection with requested ecu + * @param None - No input parameters + * @return jsonType - returns payload with connection details. + */ + google::protobuf::Struct OpenCommunicationChannel(const std::string &message); +}; +class J1939 +{ + std::string connectionId; +public: + explicit J1939() + { + } +}; diff --git a/src/up-cpp-server/iprotocolMessage.cpp b/src/up-cpp-server/iprotocolMessage.cpp new file mode 100644 index 0000000..faeef51 --- /dev/null +++ b/src/up-cpp-server/iprotocolMessage.cpp @@ -0,0 +1,47 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ + +#include "mqtt/async_client.h" +#include "mqtt/client.h" +#include "iprotocolMessage.h" + +/** + * Class Constructor + * @return NA + * @param values- const std::string_view,const std::string_view + */ + +IprotocolMessage::IprotocolMessage(const std::string_view & receivedDestination,const std::string_view & messagepayload) +{ + msgDestination.assign(receivedDestination); + if (!messagepayload.empty()) + { + msgPayload=messagepayload; + } + +} +/** + * Get method to get mqtt topic + * @return string + * @param values NA + */ +std::string IprotocolMessage::GetDestination() const +{ + return msgDestination; +} +/** + * Get method to get mqtt payload + * @return string + * @param values NA + */ +std::string IprotocolMessage::GetPayload() const +{ + return msgPayload; +} \ No newline at end of file diff --git a/src/up-cpp-server/observer.cpp b/src/up-cpp-server/observer.cpp new file mode 100644 index 0000000..fa8d674 --- /dev/null +++ b/src/up-cpp-server/observer.cpp @@ -0,0 +1,104 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#include "observer.h" + +std::string Observer::OnMessage(const IprotocolMessage &message) +{ + std::string topic = message.GetDestination(); + std::string payload = message.GetPayload(); + MessageHelper(topic, + payload); + return ""; +} + +// Function to parse the message and payload for incoming mqtt message +void Observer::MainThreadFunc() +{ + while (true) + { + spdlog::debug("Enter Observer::waiting for message"); + auto message = holderQueue.Dequeue(); + if (!message) + { + spdlog::debug("Empty message from dequeue"); + return; + } + OnIncomingMessage(message.value().first, + message.value().second); + } + +} + +void Observer::Initialize() +{ + + for (const auto &redirectTopic : application::list) + { + notificationMap[redirectTopic] = CONTAINER::APPLICATION; + } + spdlog::debug("Enter Observer::Init"); + + for (const auto &topic : application::Subscriptiontopics) + { + ListenToData(topic); + } + Init(); + + mainThread = std::thread(&Observer::MainThreadFunc, this); + + spdlog::debug("Exit Observer::Init"); +} + +inline void Observer::MessageHelper(const std::string &topic, const std::string &payload) +{ + auto containerName = topic.substr(0, topic.find('/')); + + if (notificationMap.find(containerName) != notificationMap.end()) + { + if (notificationMap[containerName] == CONTAINER::APPLICATION) + { + holderQueue.Enqueue(std::make_pair(topic, payload)); + } + else + { + threadPool.enqueue([this, + containerName, + topic, + payload]() + { forwardPayload(containerName, topic, payload); }); + } + } +} +void Observer::forwardPayload(const std::string &containerName, + const std::string &topic, + const std::string &payload) +{ + // Intentionally unimplemented... +} +void Observer::Init() +{ + // Intentionally unimplemented... +} + +void Observer::SendMessageonInput(const std::string &topic, + const std::string &payload, + const bool &retain) +{ + if (protocolClient != nullptr) + { + protocolClient->SendMessage(topic, payload, retain); + } +} + +std::string Observer::OnIncomingMessage(const std::string &topic, + const std::string &payload) +{ + return ""; +} \ No newline at end of file diff --git a/src/up-cpp-server/translator-protobuf.pb.cc b/src/up-cpp-server/translator-protobuf.pb.cc new file mode 100644 index 0000000..13cd770 --- /dev/null +++ b/src/up-cpp-server/translator-protobuf.pb.cc @@ -0,0 +1,3741 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: translator-protobuf.proto + +#include "translator-protobuf.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace translator { +PROTOBUF_CONSTEXPR GetClaimedAddressRequest::GetClaimedAddressRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetClaimedAddressRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetClaimedAddressRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetClaimedAddressRequestDefaultTypeInternal() {} + union { + GetClaimedAddressRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetClaimedAddressRequestDefaultTypeInternal _GetClaimedAddressRequest_default_instance_; +PROTOBUF_CONSTEXPR GetClaimedAddressResponse::GetClaimedAddressResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.claimedaddress_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.responsecode_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetClaimedAddressResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetClaimedAddressResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetClaimedAddressResponseDefaultTypeInternal() {} + union { + GetClaimedAddressResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetClaimedAddressResponseDefaultTypeInternal _GetClaimedAddressResponse_default_instance_; +PROTOBUF_CONSTEXPR UDSCANFormat::UDSCANFormat( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.canphysreqformat_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.canrespusdtformat_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct UDSCANFormatDefaultTypeInternal { + PROTOBUF_CONSTEXPR UDSCANFormatDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UDSCANFormatDefaultTypeInternal() {} + union { + UDSCANFormat _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UDSCANFormatDefaultTypeInternal _UDSCANFormat_default_instance_; +PROTOBUF_CONSTEXPR UDSOpenCommChannelRequest::UDSOpenCommChannelRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.canformat_)*/{} + , /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.tooladdress_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.ecuaddress_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.resourcename_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct UDSOpenCommChannelRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR UDSOpenCommChannelRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UDSOpenCommChannelRequestDefaultTypeInternal() {} + union { + UDSOpenCommChannelRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UDSOpenCommChannelRequestDefaultTypeInternal _UDSOpenCommChannelRequest_default_instance_; +PROTOBUF_CONSTEXPR UDSOpenCommChannelResponse::UDSOpenCommChannelResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.connectionid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.responsecode_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct UDSOpenCommChannelResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR UDSOpenCommChannelResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UDSOpenCommChannelResponseDefaultTypeInternal() {} + union { + UDSOpenCommChannelResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UDSOpenCommChannelResponseDefaultTypeInternal _UDSOpenCommChannelResponse_default_instance_; +PROTOBUF_CONSTEXPR UDSCloseCommChannelRequest::UDSCloseCommChannelRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.connectionid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct UDSCloseCommChannelRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR UDSCloseCommChannelRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UDSCloseCommChannelRequestDefaultTypeInternal() {} + union { + UDSCloseCommChannelRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UDSCloseCommChannelRequestDefaultTypeInternal _UDSCloseCommChannelRequest_default_instance_; +PROTOBUF_CONSTEXPR UDSCloseCommChannelResponse::UDSCloseCommChannelResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.connectionid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.responsecode_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct UDSCloseCommChannelResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR UDSCloseCommChannelResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UDSCloseCommChannelResponseDefaultTypeInternal() {} + union { + UDSCloseCommChannelResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UDSCloseCommChannelResponseDefaultTypeInternal _UDSCloseCommChannelResponse_default_instance_; +PROTOBUF_CONSTEXPR ReadDataByIdentifierRequest::ReadDataByIdentifierRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.did_)*/{} + , /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.connectionid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ReadDataByIdentifierRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ReadDataByIdentifierRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ReadDataByIdentifierRequestDefaultTypeInternal() {} + union { + ReadDataByIdentifierRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReadDataByIdentifierRequestDefaultTypeInternal _ReadDataByIdentifierRequest_default_instance_; +PROTOBUF_CONSTEXPR ReadResponse::ReadResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.did_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.responsecode_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ReadResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ReadResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ReadResponseDefaultTypeInternal() {} + union { + ReadResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReadResponseDefaultTypeInternal _ReadResponse_default_instance_; +PROTOBUF_CONSTEXPR ReadDataByIdentifierResponse::ReadDataByIdentifierResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.data_)*/{} + , /*decltype(_impl_.appid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.connectionid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.sequenceno_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.responsecode_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ReadDataByIdentifierResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ReadDataByIdentifierResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ReadDataByIdentifierResponseDefaultTypeInternal() {} + union { + ReadDataByIdentifierResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReadDataByIdentifierResponseDefaultTypeInternal _ReadDataByIdentifierResponse_default_instance_; +} // namespace translator +static ::_pb::Metadata file_level_metadata_translator_2dprotobuf_2eproto[10]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_translator_2dprotobuf_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_translator_2dprotobuf_2eproto = nullptr; + +const uint32_t TableStruct_translator_2dprotobuf_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressRequest, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressRequest, _impl_.sequenceno_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressResponse, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressResponse, _impl_.sequenceno_), + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressResponse, _impl_.claimedaddress_), + PROTOBUF_FIELD_OFFSET(::translator::GetClaimedAddressResponse, _impl_.responsecode_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::UDSCANFormat, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::UDSCANFormat, _impl_.canphysreqformat_), + PROTOBUF_FIELD_OFFSET(::translator::UDSCANFormat, _impl_.canrespusdtformat_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelRequest, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelRequest, _impl_.sequenceno_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelRequest, _impl_.tooladdress_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelRequest, _impl_.ecuaddress_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelRequest, _impl_.canformat_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelRequest, _impl_.resourcename_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelResponse, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelResponse, _impl_.connectionid_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelResponse, _impl_.sequenceno_), + PROTOBUF_FIELD_OFFSET(::translator::UDSOpenCommChannelResponse, _impl_.responsecode_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelRequest, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelRequest, _impl_.connectionid_), + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelRequest, _impl_.sequenceno_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelResponse, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelResponse, _impl_.connectionid_), + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelResponse, _impl_.sequenceno_), + PROTOBUF_FIELD_OFFSET(::translator::UDSCloseCommChannelResponse, _impl_.responsecode_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierRequest, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierRequest, _impl_.connectionid_), + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierRequest, _impl_.sequenceno_), + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierRequest, _impl_.did_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::ReadResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::ReadResponse, _impl_.did_), + PROTOBUF_FIELD_OFFSET(::translator::ReadResponse, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::translator::ReadResponse, _impl_.responsecode_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierResponse, _impl_.appid_), + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierResponse, _impl_.connectionid_), + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierResponse, _impl_.sequenceno_), + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierResponse, _impl_.data_), + PROTOBUF_FIELD_OFFSET(::translator::ReadDataByIdentifierResponse, _impl_.responsecode_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::translator::GetClaimedAddressRequest)}, + { 8, -1, -1, sizeof(::translator::GetClaimedAddressResponse)}, + { 18, -1, -1, sizeof(::translator::UDSCANFormat)}, + { 26, -1, -1, sizeof(::translator::UDSOpenCommChannelRequest)}, + { 38, -1, -1, sizeof(::translator::UDSOpenCommChannelResponse)}, + { 48, -1, -1, sizeof(::translator::UDSCloseCommChannelRequest)}, + { 57, -1, -1, sizeof(::translator::UDSCloseCommChannelResponse)}, + { 67, -1, -1, sizeof(::translator::ReadDataByIdentifierRequest)}, + { 77, -1, -1, sizeof(::translator::ReadResponse)}, + { 86, -1, -1, sizeof(::translator::ReadDataByIdentifierResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::translator::_GetClaimedAddressRequest_default_instance_._instance, + &::translator::_GetClaimedAddressResponse_default_instance_._instance, + &::translator::_UDSCANFormat_default_instance_._instance, + &::translator::_UDSOpenCommChannelRequest_default_instance_._instance, + &::translator::_UDSOpenCommChannelResponse_default_instance_._instance, + &::translator::_UDSCloseCommChannelRequest_default_instance_._instance, + &::translator::_UDSCloseCommChannelResponse_default_instance_._instance, + &::translator::_ReadDataByIdentifierRequest_default_instance_._instance, + &::translator::_ReadResponse_default_instance_._instance, + &::translator::_ReadDataByIdentifierResponse_default_instance_._instance, +}; + +const char descriptor_table_protodef_translator_2dprotobuf_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\031translator-protobuf.proto\022\ntranslator\"" + "=\n\030GetClaimedAddressRequest\022\r\n\005appID\030\001 \001" + "(\t\022\022\n\nsequenceNo\030\002 \001(\t\"l\n\031GetClaimedAddr" + "essResponse\022\r\n\005appID\030\001 \001(\t\022\022\n\nsequenceNo" + "\030\002 \001(\t\022\026\n\016claimedAddress\030\003 \001(\t\022\024\n\014respon" + "seCode\030\004 \001(\t\"C\n\014UDSCANFormat\022\030\n\020canPhysR" + "eqFormat\030\001 \001(\t\022\031\n\021canRespUSDTFormat\030\002 \001(" + "\t\"\252\001\n\031UDSOpenCommChannelRequest\022\r\n\005appID" + "\030\001 \001(\t\022\022\n\nsequenceNo\030\002 \001(\t\022\023\n\013toolAddres" + "s\030\003 \001(\t\022\022\n\necuAddress\030\004 \001(\t\022+\n\tcanFormat" + "\030\005 \003(\0132\030.translator.UDSCANFormat\022\024\n\014reso" + "urceName\030\006 \001(\t\"k\n\032UDSOpenCommChannelResp" + "onse\022\r\n\005appID\030\001 \001(\t\022\024\n\014connectionID\030\002 \001(" + "\t\022\022\n\nsequenceNo\030\003 \001(\t\022\024\n\014responseCode\030\004 " + "\001(\t\"U\n\032UDSCloseCommChannelRequest\022\r\n\005app" + "ID\030\001 \001(\t\022\024\n\014connectionID\030\002 \001(\t\022\022\n\nsequen" + "ceNo\030\003 \001(\t\"l\n\033UDSCloseCommChannelRespons" + "e\022\r\n\005appID\030\001 \001(\t\022\024\n\014connectionID\030\002 \001(\t\022\022" + "\n\nsequenceNo\030\003 \001(\t\022\024\n\014responseCode\030\004 \001(\t" + "\"c\n\033ReadDataByIdentifierRequest\022\r\n\005appID" + "\030\001 \001(\t\022\024\n\014connectionID\030\002 \001(\t\022\022\n\nsequence" + "No\030\003 \001(\t\022\013\n\003did\030\004 \003(\t\"@\n\014ReadResponse\022\013\n" + "\003did\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\024\n\014responseCod" + "e\030\003 \001(\t\"\225\001\n\034ReadDataByIdentifierResponse" + "\022\r\n\005appID\030\001 \001(\t\022\024\n\014connectionID\030\002 \001(\t\022\022\n" + "\nsequenceNo\030\003 \001(\t\022&\n\004data\030\004 \003(\0132\030.transl" + "ator.ReadResponse\022\024\n\014responseCode\030\005 \001(\tb" + "\006proto3" + ; +static ::_pbi::once_flag descriptor_table_translator_2dprotobuf_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_translator_2dprotobuf_2eproto = { + false, false, 1087, descriptor_table_protodef_translator_2dprotobuf_2eproto, + "translator-protobuf.proto", + &descriptor_table_translator_2dprotobuf_2eproto_once, nullptr, 0, 10, + schemas, file_default_instances, TableStruct_translator_2dprotobuf_2eproto::offsets, + file_level_metadata_translator_2dprotobuf_2eproto, file_level_enum_descriptors_translator_2dprotobuf_2eproto, + file_level_service_descriptors_translator_2dprotobuf_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_translator_2dprotobuf_2eproto_getter() { + return &descriptor_table_translator_2dprotobuf_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_translator_2dprotobuf_2eproto(&descriptor_table_translator_2dprotobuf_2eproto); +namespace translator { + +// =================================================================== + +class GetClaimedAddressRequest::_Internal { + public: +}; + +GetClaimedAddressRequest::GetClaimedAddressRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.GetClaimedAddressRequest) +} +GetClaimedAddressRequest::GetClaimedAddressRequest(const GetClaimedAddressRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetClaimedAddressRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.sequenceno_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.GetClaimedAddressRequest) +} + +inline void GetClaimedAddressRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.sequenceno_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +GetClaimedAddressRequest::~GetClaimedAddressRequest() { + // @@protoc_insertion_point(destructor:translator.GetClaimedAddressRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetClaimedAddressRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.appid_.Destroy(); + _impl_.sequenceno_.Destroy(); +} + +void GetClaimedAddressRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetClaimedAddressRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.GetClaimedAddressRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.appid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetClaimedAddressRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.GetClaimedAddressRequest.appID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.GetClaimedAddressRequest.sequenceNo")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetClaimedAddressRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.GetClaimedAddressRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.GetClaimedAddressRequest.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string sequenceNo = 2; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.GetClaimedAddressRequest.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_sequenceno(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.GetClaimedAddressRequest) + return target; +} + +size_t GetClaimedAddressRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.GetClaimedAddressRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string sequenceNo = 2; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetClaimedAddressRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetClaimedAddressRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClaimedAddressRequest::GetClassData() const { return &_class_data_; } + + +void GetClaimedAddressRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.GetClaimedAddressRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetClaimedAddressRequest::CopyFrom(const GetClaimedAddressRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.GetClaimedAddressRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetClaimedAddressRequest::IsInitialized() const { + return true; +} + +void GetClaimedAddressRequest::InternalSwap(GetClaimedAddressRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetClaimedAddressRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[0]); +} + +// =================================================================== + +class GetClaimedAddressResponse::_Internal { + public: +}; + +GetClaimedAddressResponse::GetClaimedAddressResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.GetClaimedAddressResponse) +} +GetClaimedAddressResponse::GetClaimedAddressResponse(const GetClaimedAddressResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetClaimedAddressResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.claimedaddress_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + _impl_.claimedaddress_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.claimedaddress_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_claimedaddress().empty()) { + _this->_impl_.claimedaddress_.Set(from._internal_claimedaddress(), + _this->GetArenaForAllocation()); + } + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_responsecode().empty()) { + _this->_impl_.responsecode_.Set(from._internal_responsecode(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.GetClaimedAddressResponse) +} + +inline void GetClaimedAddressResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.claimedaddress_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.claimedaddress_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.claimedaddress_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +GetClaimedAddressResponse::~GetClaimedAddressResponse() { + // @@protoc_insertion_point(destructor:translator.GetClaimedAddressResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetClaimedAddressResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.appid_.Destroy(); + _impl_.sequenceno_.Destroy(); + _impl_.claimedaddress_.Destroy(); + _impl_.responsecode_.Destroy(); +} + +void GetClaimedAddressResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetClaimedAddressResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.GetClaimedAddressResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.appid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _impl_.claimedaddress_.ClearToEmpty(); + _impl_.responsecode_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetClaimedAddressResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.GetClaimedAddressResponse.appID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.GetClaimedAddressResponse.sequenceNo")); + } else + goto handle_unusual; + continue; + // string claimedAddress = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_claimedaddress(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.GetClaimedAddressResponse.claimedAddress")); + } else + goto handle_unusual; + continue; + // string responseCode = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_responsecode(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.GetClaimedAddressResponse.responseCode")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetClaimedAddressResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.GetClaimedAddressResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.GetClaimedAddressResponse.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string sequenceNo = 2; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.GetClaimedAddressResponse.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_sequenceno(), target); + } + + // string claimedAddress = 3; + if (!this->_internal_claimedaddress().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_claimedaddress().data(), static_cast(this->_internal_claimedaddress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.GetClaimedAddressResponse.claimedAddress"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_claimedaddress(), target); + } + + // string responseCode = 4; + if (!this->_internal_responsecode().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_responsecode().data(), static_cast(this->_internal_responsecode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.GetClaimedAddressResponse.responseCode"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_responsecode(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.GetClaimedAddressResponse) + return target; +} + +size_t GetClaimedAddressResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.GetClaimedAddressResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string sequenceNo = 2; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + // string claimedAddress = 3; + if (!this->_internal_claimedaddress().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_claimedaddress()); + } + + // string responseCode = 4; + if (!this->_internal_responsecode().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_responsecode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetClaimedAddressResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetClaimedAddressResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClaimedAddressResponse::GetClassData() const { return &_class_data_; } + + +void GetClaimedAddressResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.GetClaimedAddressResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + if (!from._internal_claimedaddress().empty()) { + _this->_internal_set_claimedaddress(from._internal_claimedaddress()); + } + if (!from._internal_responsecode().empty()) { + _this->_internal_set_responsecode(from._internal_responsecode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetClaimedAddressResponse::CopyFrom(const GetClaimedAddressResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.GetClaimedAddressResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetClaimedAddressResponse::IsInitialized() const { + return true; +} + +void GetClaimedAddressResponse::InternalSwap(GetClaimedAddressResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.claimedaddress_, lhs_arena, + &other->_impl_.claimedaddress_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.responsecode_, lhs_arena, + &other->_impl_.responsecode_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetClaimedAddressResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[1]); +} + +// =================================================================== + +class UDSCANFormat::_Internal { + public: +}; + +UDSCANFormat::UDSCANFormat(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.UDSCANFormat) +} +UDSCANFormat::UDSCANFormat(const UDSCANFormat& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + UDSCANFormat* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.canphysreqformat_){} + , decltype(_impl_.canrespusdtformat_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.canphysreqformat_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.canphysreqformat_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_canphysreqformat().empty()) { + _this->_impl_.canphysreqformat_.Set(from._internal_canphysreqformat(), + _this->GetArenaForAllocation()); + } + _impl_.canrespusdtformat_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.canrespusdtformat_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_canrespusdtformat().empty()) { + _this->_impl_.canrespusdtformat_.Set(from._internal_canrespusdtformat(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.UDSCANFormat) +} + +inline void UDSCANFormat::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.canphysreqformat_){} + , decltype(_impl_.canrespusdtformat_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.canphysreqformat_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.canphysreqformat_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.canrespusdtformat_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.canrespusdtformat_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +UDSCANFormat::~UDSCANFormat() { + // @@protoc_insertion_point(destructor:translator.UDSCANFormat) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void UDSCANFormat::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.canphysreqformat_.Destroy(); + _impl_.canrespusdtformat_.Destroy(); +} + +void UDSCANFormat::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void UDSCANFormat::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.UDSCANFormat) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.canphysreqformat_.ClearToEmpty(); + _impl_.canrespusdtformat_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* UDSCANFormat::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string canPhysReqFormat = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_canphysreqformat(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCANFormat.canPhysReqFormat")); + } else + goto handle_unusual; + continue; + // string canRespUSDTFormat = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_canrespusdtformat(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCANFormat.canRespUSDTFormat")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* UDSCANFormat::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.UDSCANFormat) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string canPhysReqFormat = 1; + if (!this->_internal_canphysreqformat().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_canphysreqformat().data(), static_cast(this->_internal_canphysreqformat().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCANFormat.canPhysReqFormat"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_canphysreqformat(), target); + } + + // string canRespUSDTFormat = 2; + if (!this->_internal_canrespusdtformat().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_canrespusdtformat().data(), static_cast(this->_internal_canrespusdtformat().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCANFormat.canRespUSDTFormat"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_canrespusdtformat(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.UDSCANFormat) + return target; +} + +size_t UDSCANFormat::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.UDSCANFormat) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string canPhysReqFormat = 1; + if (!this->_internal_canphysreqformat().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_canphysreqformat()); + } + + // string canRespUSDTFormat = 2; + if (!this->_internal_canrespusdtformat().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_canrespusdtformat()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UDSCANFormat::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + UDSCANFormat::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UDSCANFormat::GetClassData() const { return &_class_data_; } + + +void UDSCANFormat::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.UDSCANFormat) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_canphysreqformat().empty()) { + _this->_internal_set_canphysreqformat(from._internal_canphysreqformat()); + } + if (!from._internal_canrespusdtformat().empty()) { + _this->_internal_set_canrespusdtformat(from._internal_canrespusdtformat()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void UDSCANFormat::CopyFrom(const UDSCANFormat& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.UDSCANFormat) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UDSCANFormat::IsInitialized() const { + return true; +} + +void UDSCANFormat::InternalSwap(UDSCANFormat* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.canphysreqformat_, lhs_arena, + &other->_impl_.canphysreqformat_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.canrespusdtformat_, lhs_arena, + &other->_impl_.canrespusdtformat_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UDSCANFormat::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[2]); +} + +// =================================================================== + +class UDSOpenCommChannelRequest::_Internal { + public: +}; + +UDSOpenCommChannelRequest::UDSOpenCommChannelRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.UDSOpenCommChannelRequest) +} +UDSOpenCommChannelRequest::UDSOpenCommChannelRequest(const UDSOpenCommChannelRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + UDSOpenCommChannelRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.canformat_){from._impl_.canformat_} + , decltype(_impl_.appid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.tooladdress_){} + , decltype(_impl_.ecuaddress_){} + , decltype(_impl_.resourcename_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + _impl_.tooladdress_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.tooladdress_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_tooladdress().empty()) { + _this->_impl_.tooladdress_.Set(from._internal_tooladdress(), + _this->GetArenaForAllocation()); + } + _impl_.ecuaddress_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.ecuaddress_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_ecuaddress().empty()) { + _this->_impl_.ecuaddress_.Set(from._internal_ecuaddress(), + _this->GetArenaForAllocation()); + } + _impl_.resourcename_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.resourcename_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_resourcename().empty()) { + _this->_impl_.resourcename_.Set(from._internal_resourcename(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.UDSOpenCommChannelRequest) +} + +inline void UDSOpenCommChannelRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.canformat_){arena} + , decltype(_impl_.appid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.tooladdress_){} + , decltype(_impl_.ecuaddress_){} + , decltype(_impl_.resourcename_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.tooladdress_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.tooladdress_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.ecuaddress_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.ecuaddress_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.resourcename_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.resourcename_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +UDSOpenCommChannelRequest::~UDSOpenCommChannelRequest() { + // @@protoc_insertion_point(destructor:translator.UDSOpenCommChannelRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void UDSOpenCommChannelRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.canformat_.~RepeatedPtrField(); + _impl_.appid_.Destroy(); + _impl_.sequenceno_.Destroy(); + _impl_.tooladdress_.Destroy(); + _impl_.ecuaddress_.Destroy(); + _impl_.resourcename_.Destroy(); +} + +void UDSOpenCommChannelRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void UDSOpenCommChannelRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.UDSOpenCommChannelRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.canformat_.Clear(); + _impl_.appid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _impl_.tooladdress_.ClearToEmpty(); + _impl_.ecuaddress_.ClearToEmpty(); + _impl_.resourcename_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* UDSOpenCommChannelRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelRequest.appID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelRequest.sequenceNo")); + } else + goto handle_unusual; + continue; + // string toolAddress = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_tooladdress(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelRequest.toolAddress")); + } else + goto handle_unusual; + continue; + // string ecuAddress = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_ecuaddress(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelRequest.ecuAddress")); + } else + goto handle_unusual; + continue; + // repeated .translator.UDSCANFormat canFormat = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_canformat(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // string resourceName = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_resourcename(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelRequest.resourceName")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* UDSOpenCommChannelRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.UDSOpenCommChannelRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelRequest.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string sequenceNo = 2; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelRequest.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_sequenceno(), target); + } + + // string toolAddress = 3; + if (!this->_internal_tooladdress().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_tooladdress().data(), static_cast(this->_internal_tooladdress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelRequest.toolAddress"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_tooladdress(), target); + } + + // string ecuAddress = 4; + if (!this->_internal_ecuaddress().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_ecuaddress().data(), static_cast(this->_internal_ecuaddress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelRequest.ecuAddress"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_ecuaddress(), target); + } + + // repeated .translator.UDSCANFormat canFormat = 5; + for (unsigned i = 0, + n = static_cast(this->_internal_canformat_size()); i < n; i++) { + const auto& repfield = this->_internal_canformat(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream); + } + + // string resourceName = 6; + if (!this->_internal_resourcename().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_resourcename().data(), static_cast(this->_internal_resourcename().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelRequest.resourceName"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_resourcename(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.UDSOpenCommChannelRequest) + return target; +} + +size_t UDSOpenCommChannelRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.UDSOpenCommChannelRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .translator.UDSCANFormat canFormat = 5; + total_size += 1UL * this->_internal_canformat_size(); + for (const auto& msg : this->_impl_.canformat_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string sequenceNo = 2; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + // string toolAddress = 3; + if (!this->_internal_tooladdress().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tooladdress()); + } + + // string ecuAddress = 4; + if (!this->_internal_ecuaddress().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_ecuaddress()); + } + + // string resourceName = 6; + if (!this->_internal_resourcename().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_resourcename()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UDSOpenCommChannelRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + UDSOpenCommChannelRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UDSOpenCommChannelRequest::GetClassData() const { return &_class_data_; } + + +void UDSOpenCommChannelRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.UDSOpenCommChannelRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.canformat_.MergeFrom(from._impl_.canformat_); + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + if (!from._internal_tooladdress().empty()) { + _this->_internal_set_tooladdress(from._internal_tooladdress()); + } + if (!from._internal_ecuaddress().empty()) { + _this->_internal_set_ecuaddress(from._internal_ecuaddress()); + } + if (!from._internal_resourcename().empty()) { + _this->_internal_set_resourcename(from._internal_resourcename()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void UDSOpenCommChannelRequest::CopyFrom(const UDSOpenCommChannelRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.UDSOpenCommChannelRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UDSOpenCommChannelRequest::IsInitialized() const { + return true; +} + +void UDSOpenCommChannelRequest::InternalSwap(UDSOpenCommChannelRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.canformat_.InternalSwap(&other->_impl_.canformat_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.tooladdress_, lhs_arena, + &other->_impl_.tooladdress_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.ecuaddress_, lhs_arena, + &other->_impl_.ecuaddress_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.resourcename_, lhs_arena, + &other->_impl_.resourcename_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UDSOpenCommChannelRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[3]); +} + +// =================================================================== + +class UDSOpenCommChannelResponse::_Internal { + public: +}; + +UDSOpenCommChannelResponse::UDSOpenCommChannelResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.UDSOpenCommChannelResponse) +} +UDSOpenCommChannelResponse::UDSOpenCommChannelResponse(const UDSOpenCommChannelResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + UDSOpenCommChannelResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_connectionid().empty()) { + _this->_impl_.connectionid_.Set(from._internal_connectionid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_responsecode().empty()) { + _this->_impl_.responsecode_.Set(from._internal_responsecode(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.UDSOpenCommChannelResponse) +} + +inline void UDSOpenCommChannelResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +UDSOpenCommChannelResponse::~UDSOpenCommChannelResponse() { + // @@protoc_insertion_point(destructor:translator.UDSOpenCommChannelResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void UDSOpenCommChannelResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.appid_.Destroy(); + _impl_.connectionid_.Destroy(); + _impl_.sequenceno_.Destroy(); + _impl_.responsecode_.Destroy(); +} + +void UDSOpenCommChannelResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void UDSOpenCommChannelResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.UDSOpenCommChannelResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.appid_.ClearToEmpty(); + _impl_.connectionid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _impl_.responsecode_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* UDSOpenCommChannelResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelResponse.appID")); + } else + goto handle_unusual; + continue; + // string connectionID = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_connectionid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelResponse.connectionID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelResponse.sequenceNo")); + } else + goto handle_unusual; + continue; + // string responseCode = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_responsecode(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSOpenCommChannelResponse.responseCode")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* UDSOpenCommChannelResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.UDSOpenCommChannelResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelResponse.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_connectionid().data(), static_cast(this->_internal_connectionid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelResponse.connectionID"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_connectionid(), target); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelResponse.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_sequenceno(), target); + } + + // string responseCode = 4; + if (!this->_internal_responsecode().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_responsecode().data(), static_cast(this->_internal_responsecode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSOpenCommChannelResponse.responseCode"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_responsecode(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.UDSOpenCommChannelResponse) + return target; +} + +size_t UDSOpenCommChannelResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.UDSOpenCommChannelResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connectionid()); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + // string responseCode = 4; + if (!this->_internal_responsecode().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_responsecode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UDSOpenCommChannelResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + UDSOpenCommChannelResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UDSOpenCommChannelResponse::GetClassData() const { return &_class_data_; } + + +void UDSOpenCommChannelResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.UDSOpenCommChannelResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_connectionid().empty()) { + _this->_internal_set_connectionid(from._internal_connectionid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + if (!from._internal_responsecode().empty()) { + _this->_internal_set_responsecode(from._internal_responsecode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void UDSOpenCommChannelResponse::CopyFrom(const UDSOpenCommChannelResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.UDSOpenCommChannelResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UDSOpenCommChannelResponse::IsInitialized() const { + return true; +} + +void UDSOpenCommChannelResponse::InternalSwap(UDSOpenCommChannelResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.connectionid_, lhs_arena, + &other->_impl_.connectionid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.responsecode_, lhs_arena, + &other->_impl_.responsecode_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UDSOpenCommChannelResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[4]); +} + +// =================================================================== + +class UDSCloseCommChannelRequest::_Internal { + public: +}; + +UDSCloseCommChannelRequest::UDSCloseCommChannelRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.UDSCloseCommChannelRequest) +} +UDSCloseCommChannelRequest::UDSCloseCommChannelRequest(const UDSCloseCommChannelRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + UDSCloseCommChannelRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_connectionid().empty()) { + _this->_impl_.connectionid_.Set(from._internal_connectionid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.UDSCloseCommChannelRequest) +} + +inline void UDSCloseCommChannelRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +UDSCloseCommChannelRequest::~UDSCloseCommChannelRequest() { + // @@protoc_insertion_point(destructor:translator.UDSCloseCommChannelRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void UDSCloseCommChannelRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.appid_.Destroy(); + _impl_.connectionid_.Destroy(); + _impl_.sequenceno_.Destroy(); +} + +void UDSCloseCommChannelRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void UDSCloseCommChannelRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.UDSCloseCommChannelRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.appid_.ClearToEmpty(); + _impl_.connectionid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* UDSCloseCommChannelRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCloseCommChannelRequest.appID")); + } else + goto handle_unusual; + continue; + // string connectionID = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_connectionid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCloseCommChannelRequest.connectionID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCloseCommChannelRequest.sequenceNo")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* UDSCloseCommChannelRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.UDSCloseCommChannelRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCloseCommChannelRequest.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_connectionid().data(), static_cast(this->_internal_connectionid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCloseCommChannelRequest.connectionID"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_connectionid(), target); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCloseCommChannelRequest.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_sequenceno(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.UDSCloseCommChannelRequest) + return target; +} + +size_t UDSCloseCommChannelRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.UDSCloseCommChannelRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connectionid()); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UDSCloseCommChannelRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + UDSCloseCommChannelRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UDSCloseCommChannelRequest::GetClassData() const { return &_class_data_; } + + +void UDSCloseCommChannelRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.UDSCloseCommChannelRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_connectionid().empty()) { + _this->_internal_set_connectionid(from._internal_connectionid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void UDSCloseCommChannelRequest::CopyFrom(const UDSCloseCommChannelRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.UDSCloseCommChannelRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UDSCloseCommChannelRequest::IsInitialized() const { + return true; +} + +void UDSCloseCommChannelRequest::InternalSwap(UDSCloseCommChannelRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.connectionid_, lhs_arena, + &other->_impl_.connectionid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UDSCloseCommChannelRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[5]); +} + +// =================================================================== + +class UDSCloseCommChannelResponse::_Internal { + public: +}; + +UDSCloseCommChannelResponse::UDSCloseCommChannelResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.UDSCloseCommChannelResponse) +} +UDSCloseCommChannelResponse::UDSCloseCommChannelResponse(const UDSCloseCommChannelResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + UDSCloseCommChannelResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_connectionid().empty()) { + _this->_impl_.connectionid_.Set(from._internal_connectionid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_responsecode().empty()) { + _this->_impl_.responsecode_.Set(from._internal_responsecode(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.UDSCloseCommChannelResponse) +} + +inline void UDSCloseCommChannelResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +UDSCloseCommChannelResponse::~UDSCloseCommChannelResponse() { + // @@protoc_insertion_point(destructor:translator.UDSCloseCommChannelResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void UDSCloseCommChannelResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.appid_.Destroy(); + _impl_.connectionid_.Destroy(); + _impl_.sequenceno_.Destroy(); + _impl_.responsecode_.Destroy(); +} + +void UDSCloseCommChannelResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void UDSCloseCommChannelResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.UDSCloseCommChannelResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.appid_.ClearToEmpty(); + _impl_.connectionid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _impl_.responsecode_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* UDSCloseCommChannelResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCloseCommChannelResponse.appID")); + } else + goto handle_unusual; + continue; + // string connectionID = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_connectionid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCloseCommChannelResponse.connectionID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCloseCommChannelResponse.sequenceNo")); + } else + goto handle_unusual; + continue; + // string responseCode = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_responsecode(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.UDSCloseCommChannelResponse.responseCode")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* UDSCloseCommChannelResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.UDSCloseCommChannelResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCloseCommChannelResponse.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_connectionid().data(), static_cast(this->_internal_connectionid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCloseCommChannelResponse.connectionID"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_connectionid(), target); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCloseCommChannelResponse.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_sequenceno(), target); + } + + // string responseCode = 4; + if (!this->_internal_responsecode().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_responsecode().data(), static_cast(this->_internal_responsecode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.UDSCloseCommChannelResponse.responseCode"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_responsecode(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.UDSCloseCommChannelResponse) + return target; +} + +size_t UDSCloseCommChannelResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.UDSCloseCommChannelResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connectionid()); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + // string responseCode = 4; + if (!this->_internal_responsecode().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_responsecode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UDSCloseCommChannelResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + UDSCloseCommChannelResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UDSCloseCommChannelResponse::GetClassData() const { return &_class_data_; } + + +void UDSCloseCommChannelResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.UDSCloseCommChannelResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_connectionid().empty()) { + _this->_internal_set_connectionid(from._internal_connectionid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + if (!from._internal_responsecode().empty()) { + _this->_internal_set_responsecode(from._internal_responsecode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void UDSCloseCommChannelResponse::CopyFrom(const UDSCloseCommChannelResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.UDSCloseCommChannelResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UDSCloseCommChannelResponse::IsInitialized() const { + return true; +} + +void UDSCloseCommChannelResponse::InternalSwap(UDSCloseCommChannelResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.connectionid_, lhs_arena, + &other->_impl_.connectionid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.responsecode_, lhs_arena, + &other->_impl_.responsecode_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UDSCloseCommChannelResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[6]); +} + +// =================================================================== + +class ReadDataByIdentifierRequest::_Internal { + public: +}; + +ReadDataByIdentifierRequest::ReadDataByIdentifierRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.ReadDataByIdentifierRequest) +} +ReadDataByIdentifierRequest::ReadDataByIdentifierRequest(const ReadDataByIdentifierRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ReadDataByIdentifierRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.did_){from._impl_.did_} + , decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_connectionid().empty()) { + _this->_impl_.connectionid_.Set(from._internal_connectionid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.ReadDataByIdentifierRequest) +} + +inline void ReadDataByIdentifierRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.did_){arena} + , decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ReadDataByIdentifierRequest::~ReadDataByIdentifierRequest() { + // @@protoc_insertion_point(destructor:translator.ReadDataByIdentifierRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ReadDataByIdentifierRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.did_.~RepeatedPtrField(); + _impl_.appid_.Destroy(); + _impl_.connectionid_.Destroy(); + _impl_.sequenceno_.Destroy(); +} + +void ReadDataByIdentifierRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ReadDataByIdentifierRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.ReadDataByIdentifierRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.did_.Clear(); + _impl_.appid_.ClearToEmpty(); + _impl_.connectionid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ReadDataByIdentifierRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierRequest.appID")); + } else + goto handle_unusual; + continue; + // string connectionID = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_connectionid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierRequest.connectionID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierRequest.sequenceNo")); + } else + goto handle_unusual; + continue; + // repeated string did = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_did(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierRequest.did")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ReadDataByIdentifierRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.ReadDataByIdentifierRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierRequest.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_connectionid().data(), static_cast(this->_internal_connectionid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierRequest.connectionID"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_connectionid(), target); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierRequest.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_sequenceno(), target); + } + + // repeated string did = 4; + for (int i = 0, n = this->_internal_did_size(); i < n; i++) { + const auto& s = this->_internal_did(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierRequest.did"); + target = stream->WriteString(4, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.ReadDataByIdentifierRequest) + return target; +} + +size_t ReadDataByIdentifierRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.ReadDataByIdentifierRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string did = 4; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.did_.size()); + for (int i = 0, n = _impl_.did_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.did_.Get(i)); + } + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connectionid()); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReadDataByIdentifierRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ReadDataByIdentifierRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReadDataByIdentifierRequest::GetClassData() const { return &_class_data_; } + + +void ReadDataByIdentifierRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.ReadDataByIdentifierRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.did_.MergeFrom(from._impl_.did_); + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_connectionid().empty()) { + _this->_internal_set_connectionid(from._internal_connectionid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ReadDataByIdentifierRequest::CopyFrom(const ReadDataByIdentifierRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.ReadDataByIdentifierRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ReadDataByIdentifierRequest::IsInitialized() const { + return true; +} + +void ReadDataByIdentifierRequest::InternalSwap(ReadDataByIdentifierRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.did_.InternalSwap(&other->_impl_.did_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.connectionid_, lhs_arena, + &other->_impl_.connectionid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ReadDataByIdentifierRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[7]); +} + +// =================================================================== + +class ReadResponse::_Internal { + public: +}; + +ReadResponse::ReadResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.ReadResponse) +} +ReadResponse::ReadResponse(const ReadResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ReadResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.did_){} + , decltype(_impl_.value_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.did_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.did_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_did().empty()) { + _this->_impl_.did_.Set(from._internal_did(), + _this->GetArenaForAllocation()); + } + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_value().empty()) { + _this->_impl_.value_.Set(from._internal_value(), + _this->GetArenaForAllocation()); + } + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_responsecode().empty()) { + _this->_impl_.responsecode_.Set(from._internal_responsecode(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.ReadResponse) +} + +inline void ReadResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.did_){} + , decltype(_impl_.value_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.did_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.did_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ReadResponse::~ReadResponse() { + // @@protoc_insertion_point(destructor:translator.ReadResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ReadResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.did_.Destroy(); + _impl_.value_.Destroy(); + _impl_.responsecode_.Destroy(); +} + +void ReadResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ReadResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.ReadResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.did_.ClearToEmpty(); + _impl_.value_.ClearToEmpty(); + _impl_.responsecode_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ReadResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string did = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_did(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadResponse.did")); + } else + goto handle_unusual; + continue; + // string value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadResponse.value")); + } else + goto handle_unusual; + continue; + // string responseCode = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_responsecode(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadResponse.responseCode")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ReadResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.ReadResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string did = 1; + if (!this->_internal_did().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_did().data(), static_cast(this->_internal_did().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadResponse.did"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_did(), target); + } + + // string value = 2; + if (!this->_internal_value().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_value().data(), static_cast(this->_internal_value().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadResponse.value"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_value(), target); + } + + // string responseCode = 3; + if (!this->_internal_responsecode().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_responsecode().data(), static_cast(this->_internal_responsecode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadResponse.responseCode"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_responsecode(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.ReadResponse) + return target; +} + +size_t ReadResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.ReadResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string did = 1; + if (!this->_internal_did().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_did()); + } + + // string value = 2; + if (!this->_internal_value().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_value()); + } + + // string responseCode = 3; + if (!this->_internal_responsecode().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_responsecode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReadResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ReadResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReadResponse::GetClassData() const { return &_class_data_; } + + +void ReadResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.ReadResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_did().empty()) { + _this->_internal_set_did(from._internal_did()); + } + if (!from._internal_value().empty()) { + _this->_internal_set_value(from._internal_value()); + } + if (!from._internal_responsecode().empty()) { + _this->_internal_set_responsecode(from._internal_responsecode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ReadResponse::CopyFrom(const ReadResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.ReadResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ReadResponse::IsInitialized() const { + return true; +} + +void ReadResponse::InternalSwap(ReadResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.did_, lhs_arena, + &other->_impl_.did_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.value_, lhs_arena, + &other->_impl_.value_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.responsecode_, lhs_arena, + &other->_impl_.responsecode_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ReadResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[8]); +} + +// =================================================================== + +class ReadDataByIdentifierResponse::_Internal { + public: +}; + +ReadDataByIdentifierResponse::ReadDataByIdentifierResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:translator.ReadDataByIdentifierResponse) +} +ReadDataByIdentifierResponse::ReadDataByIdentifierResponse(const ReadDataByIdentifierResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ReadDataByIdentifierResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.data_){from._impl_.data_} + , decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_appid().empty()) { + _this->_impl_.appid_.Set(from._internal_appid(), + _this->GetArenaForAllocation()); + } + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_connectionid().empty()) { + _this->_impl_.connectionid_.Set(from._internal_connectionid(), + _this->GetArenaForAllocation()); + } + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_sequenceno().empty()) { + _this->_impl_.sequenceno_.Set(from._internal_sequenceno(), + _this->GetArenaForAllocation()); + } + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_responsecode().empty()) { + _this->_impl_.responsecode_.Set(from._internal_responsecode(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:translator.ReadDataByIdentifierResponse) +} + +inline void ReadDataByIdentifierResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.data_){arena} + , decltype(_impl_.appid_){} + , decltype(_impl_.connectionid_){} + , decltype(_impl_.sequenceno_){} + , decltype(_impl_.responsecode_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.appid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.appid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.connectionid_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sequenceno_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.responsecode_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ReadDataByIdentifierResponse::~ReadDataByIdentifierResponse() { + // @@protoc_insertion_point(destructor:translator.ReadDataByIdentifierResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ReadDataByIdentifierResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.data_.~RepeatedPtrField(); + _impl_.appid_.Destroy(); + _impl_.connectionid_.Destroy(); + _impl_.sequenceno_.Destroy(); + _impl_.responsecode_.Destroy(); +} + +void ReadDataByIdentifierResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ReadDataByIdentifierResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:translator.ReadDataByIdentifierResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.data_.Clear(); + _impl_.appid_.ClearToEmpty(); + _impl_.connectionid_.ClearToEmpty(); + _impl_.sequenceno_.ClearToEmpty(); + _impl_.responsecode_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ReadDataByIdentifierResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string appID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_appid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierResponse.appID")); + } else + goto handle_unusual; + continue; + // string connectionID = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_connectionid(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierResponse.connectionID")); + } else + goto handle_unusual; + continue; + // string sequenceNo = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_sequenceno(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierResponse.sequenceNo")); + } else + goto handle_unusual; + continue; + // repeated .translator.ReadResponse data = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_data(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // string responseCode = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_responsecode(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "translator.ReadDataByIdentifierResponse.responseCode")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ReadDataByIdentifierResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:translator.ReadDataByIdentifierResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string appID = 1; + if (!this->_internal_appid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_appid().data(), static_cast(this->_internal_appid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierResponse.appID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_appid(), target); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_connectionid().data(), static_cast(this->_internal_connectionid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierResponse.connectionID"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_connectionid(), target); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sequenceno().data(), static_cast(this->_internal_sequenceno().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierResponse.sequenceNo"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_sequenceno(), target); + } + + // repeated .translator.ReadResponse data = 4; + for (unsigned i = 0, + n = static_cast(this->_internal_data_size()); i < n; i++) { + const auto& repfield = this->_internal_data(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); + } + + // string responseCode = 5; + if (!this->_internal_responsecode().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_responsecode().data(), static_cast(this->_internal_responsecode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "translator.ReadDataByIdentifierResponse.responseCode"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_responsecode(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:translator.ReadDataByIdentifierResponse) + return target; +} + +size_t ReadDataByIdentifierResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:translator.ReadDataByIdentifierResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .translator.ReadResponse data = 4; + total_size += 1UL * this->_internal_data_size(); + for (const auto& msg : this->_impl_.data_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string appID = 1; + if (!this->_internal_appid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_appid()); + } + + // string connectionID = 2; + if (!this->_internal_connectionid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connectionid()); + } + + // string sequenceNo = 3; + if (!this->_internal_sequenceno().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sequenceno()); + } + + // string responseCode = 5; + if (!this->_internal_responsecode().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_responsecode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReadDataByIdentifierResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ReadDataByIdentifierResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReadDataByIdentifierResponse::GetClassData() const { return &_class_data_; } + + +void ReadDataByIdentifierResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:translator.ReadDataByIdentifierResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.data_.MergeFrom(from._impl_.data_); + if (!from._internal_appid().empty()) { + _this->_internal_set_appid(from._internal_appid()); + } + if (!from._internal_connectionid().empty()) { + _this->_internal_set_connectionid(from._internal_connectionid()); + } + if (!from._internal_sequenceno().empty()) { + _this->_internal_set_sequenceno(from._internal_sequenceno()); + } + if (!from._internal_responsecode().empty()) { + _this->_internal_set_responsecode(from._internal_responsecode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ReadDataByIdentifierResponse::CopyFrom(const ReadDataByIdentifierResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:translator.ReadDataByIdentifierResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ReadDataByIdentifierResponse::IsInitialized() const { + return true; +} + +void ReadDataByIdentifierResponse::InternalSwap(ReadDataByIdentifierResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.data_.InternalSwap(&other->_impl_.data_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.appid_, lhs_arena, + &other->_impl_.appid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.connectionid_, lhs_arena, + &other->_impl_.connectionid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sequenceno_, lhs_arena, + &other->_impl_.sequenceno_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.responsecode_, lhs_arena, + &other->_impl_.responsecode_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ReadDataByIdentifierResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_translator_2dprotobuf_2eproto_getter, &descriptor_table_translator_2dprotobuf_2eproto_once, + file_level_metadata_translator_2dprotobuf_2eproto[9]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace translator +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::translator::GetClaimedAddressRequest* +Arena::CreateMaybeMessage< ::translator::GetClaimedAddressRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::GetClaimedAddressRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::GetClaimedAddressResponse* +Arena::CreateMaybeMessage< ::translator::GetClaimedAddressResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::GetClaimedAddressResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::UDSCANFormat* +Arena::CreateMaybeMessage< ::translator::UDSCANFormat >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::UDSCANFormat >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::UDSOpenCommChannelRequest* +Arena::CreateMaybeMessage< ::translator::UDSOpenCommChannelRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::UDSOpenCommChannelRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::UDSOpenCommChannelResponse* +Arena::CreateMaybeMessage< ::translator::UDSOpenCommChannelResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::UDSOpenCommChannelResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::UDSCloseCommChannelRequest* +Arena::CreateMaybeMessage< ::translator::UDSCloseCommChannelRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::UDSCloseCommChannelRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::UDSCloseCommChannelResponse* +Arena::CreateMaybeMessage< ::translator::UDSCloseCommChannelResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::UDSCloseCommChannelResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::ReadDataByIdentifierRequest* +Arena::CreateMaybeMessage< ::translator::ReadDataByIdentifierRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::ReadDataByIdentifierRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::ReadResponse* +Arena::CreateMaybeMessage< ::translator::ReadResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::ReadResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::translator::ReadDataByIdentifierResponse* +Arena::CreateMaybeMessage< ::translator::ReadDataByIdentifierResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::translator::ReadDataByIdentifierResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/up-cpp-server/translator.cpp b/src/up-cpp-server/translator.cpp new file mode 100644 index 0000000..c2d001f --- /dev/null +++ b/src/up-cpp-server/translator.cpp @@ -0,0 +1,29 @@ +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#include "translator.h" + +google::protobuf::Struct UDS::OpenCommunicationChannel(const std::string &message) +{ + translator::UDSOpenCommChannelRequest opencommrequest; + std::string sequenceno; + if(opencommrequest.ParseFromString(message)) + { + + sequenceno = opencommrequest.sequenceno(); + spdlog::info("Sequence number is {}",sequenceno); + } + google::protobuf::Struct responsepayload; + auto& fields = *responsepayload.mutable_fields(); + fields["appid"].set_string_value("up_cpp_client"); + fields["connectionid"].set_string_value("0x12345678"); + fields["sequenceno"].set_string_value(sequenceno); + fields["responsecode"].set_string_value("0"); + return responsepayload; +} \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..6a037b2 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +cmake_minimum_required(VERSION 3.5) + +add_subdirectory(test-up-cpp-server) + +set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE ON) diff --git a/test/test-up-cpp-server/CMakeLists.txt b/test/test-up-cpp-server/CMakeLists.txt new file mode 100644 index 0000000..d54588e --- /dev/null +++ b/test/test-up-cpp-server/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 9-7-2024 Cummins Inc +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 + +cmake_minimum_required(VERSION 3.5) +project(test-up-cpp-server) + +find_package(GTest REQUIRED) + +include_directories( + ${GTEST_INCLUDE_DIRS} + ../../src/up-cpp-server/include/ + ) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2a -fprofile-arcs -g -D GTEST" ) +set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE ON) +file(GLOB_RECURSE TEST_SOURCES LIST_DIRECTORIES false *.h *.cpp) + +set(SOURCES ${TEST_SOURCES}) + +add_executable(${TEST_BINARY} ${TEST_SOURCES}) + +add_test(NAME ${TEST_BINARY} COMMAND ${TEST_BINARY}) +target_link_libraries(${TEST_BINARY} ${GTEST_LIBRARIES} pthread up-cpp-server -lspdlog -lgmock -lpaho-mqttpp3 -lpaho-mqtt3a) +install(TARGETS ${TEST_BINARY} DESTINATION /usr/local/bin) \ No newline at end of file diff --git a/test/test-up-cpp-server/main.cpp b/test/test-up-cpp-server/main.cpp new file mode 100644 index 0000000..9166c8a --- /dev/null +++ b/test/test-up-cpp-server/main.cpp @@ -0,0 +1,27 @@ + +/* + * main.cpp + */ + +/********************************************************************* +* Copyright (c) 9-7-2024 Cummins Inc +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +**********************************************************************/ +#include +#include +#include "Application.h" + +/* + main function. +*/ +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..8582464 --- /dev/null +++ b/version.txt @@ -0,0 +1,3 @@ +major=0 +minor=1 +patch=0