From 40ef4bd123bafee7276e7d5fff217d8f0253c35a Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Thu, 29 Feb 2024 12:11:59 +0200 Subject: [PATCH 01/33] Update README.md --- README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/README.md b/README.md index bdd42ad..03bf2b4 100644 --- a/README.md +++ b/README.md @@ -56,17 +56,6 @@ $ cd up-cpp-client-zenoh $ conan create . ``` -#### Compiling sample apps - -``` -$ cd up-cpp-client-zenoh -$ conan install samples/conaninfo/ --output-folder=. -$ cd build/Release -$ cmake ../../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -$ make -j -``` - - ## Show your support Give a ⭐️ if this project helped you! From 22a97285fa68e90a47fab8019d8c5e11f3531615 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Thu, 29 Feb 2024 12:12:40 +0200 Subject: [PATCH 02/33] Delete samples directory --- samples/CMakeLists.txt | 23 ---- samples/conaninfo/conanfile.txt | 13 --- samples/pubsub/CMakeLists.txt | 83 ------------- samples/pubsub/src/main_pub.cpp | 144 ----------------------- samples/pubsub/src/main_sub.cpp | 174 ---------------------------- samples/rpc/CMakeLists.txt | 80 ------------- samples/rpc/src/main_rpc_client.cpp | 112 ------------------ samples/rpc/src/main_rpc_server.cpp | 139 ---------------------- 8 files changed, 768 deletions(-) delete mode 100644 samples/CMakeLists.txt delete mode 100644 samples/conaninfo/conanfile.txt delete mode 100644 samples/pubsub/CMakeLists.txt delete mode 100644 samples/pubsub/src/main_pub.cpp delete mode 100644 samples/pubsub/src/main_sub.cpp delete mode 100644 samples/rpc/CMakeLists.txt delete mode 100644 samples/rpc/src/main_rpc_client.cpp delete mode 100644 samples/rpc/src/main_rpc_server.cpp diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt deleted file mode 100644 index 39f2c50..0000000 --- a/samples/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2023 General Motors GTO LLC -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -cmake_minimum_required(VERSION 3.20) -project(samples VERSION 0.1.0 LANGUAGES CXX) - -add_subdirectory(pubsub) -add_subdirectory(rpc) \ No newline at end of file diff --git a/samples/conaninfo/conanfile.txt b/samples/conaninfo/conanfile.txt deleted file mode 100644 index 9efe70e..0000000 --- a/samples/conaninfo/conanfile.txt +++ /dev/null @@ -1,13 +0,0 @@ -[requires] -up-cpp/0.1 -up-client-zenoh-cpp/0.1 -protobuf/3.21.12 -spdlog/1.13.0 - -[generators] -CMakeDeps -CMakeToolchain - -[layout] -cmake_layout - diff --git a/samples/pubsub/CMakeLists.txt b/samples/pubsub/CMakeLists.txt deleted file mode 100644 index 69f7536..0000000 --- a/samples/pubsub/CMakeLists.txt +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright (c) 2023 General Motors GTO LLC -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -cmake_minimum_required(VERSION 3.20) -project(pubsub VERSION 0.1.0 LANGUAGES CXX) - - -if(BUILD_UNBUNDLED) - find_package(up-cpp REQUIRED) - find_package(zenohc REQUIRED) -else() - find_library(ZENOH_LIB zenohc) - find_package(up-cpp REQUIRED) - find_package(up-client-zenoh-cpp REQUIRED) - find_package(fmt REQUIRED) - find_package(spdlog REQUIRED) - find_package(Protobuf REQUIRED) -endif() - -add_definitions(-DSPDLOG_FMT_EXTERNAL) - -add_executable(sub src/main_sub.cpp) - -if(BUILD_UNBUNDLED) - target_link_libraries(sub - PRIVATE - up-cpp::up-cpp - up-client-zenoh-cpp::up-client-zenoh-cpp - zenohc::lib) -else() - target_link_libraries( - sub - up-client-zenoh-cpp::up-client-zenoh-cpp - up-cpp::up-cpp - fmt::fmt - spdlog::spdlog - ${ZENOH_LIB}) - - target_include_directories(sub - PRIVATE - ${up-client-zenoh-cpp_INCLUDE_DIR} - ${spdlog_INCLUDE_DIR}) -endif() - - - -add_executable(pub src/main_pub.cpp) - -if(BUILD_UNBUNDLED) - target_link_libraries(pub - PRIVATE - up-cpp::up-cpp - up-client-zenoh-cpp::up-client-zenoh-cpp - zenohc::lib) - -else() - target_link_libraries(pub - up-client-zenoh-cpp::up-client-zenoh-cpp - up-cpp::up-cpp - fmt::fmt - spdlog::spdlog - ${ZENOH_LIB}) - - target_include_directories(pub - PRIVATE - ${up-client-zenoh-cpp_INCLUDE_DIR} - ${spdlog_INCLUDE_DIR}) -endif() diff --git a/samples/pubsub/src/main_pub.cpp b/samples/pubsub/src/main_pub.cpp deleted file mode 100644 index eec7d50..0000000 --- a/samples/pubsub/src/main_pub.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2023 General Motors GTO LLC - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include -#include -#include - -using namespace uprotocol::utransport; -using namespace uprotocol::uri; -using namespace uprotocol::uuid; -using namespace uprotocol::v1; - -bool gTerminate = false; - -void signalHandler(int signal) { - if (signal == SIGINT) { - std::cout << "Ctrl+C received. Exiting..." << std::endl; - gTerminate = true; - } -} - -static uint8_t* getTime() { - - auto currentTime = std::chrono::system_clock::now(); - auto duration = currentTime.time_since_epoch(); - - auto timeMilli = std::chrono::duration_cast(duration).count(); - - static uint8_t buf[8]; - - memcpy(buf, &timeMilli, sizeof(timeMilli)); - - return buf; -} - -static uint8_t* getRandom() { - int32_t val = rand(); - - static uint8_t buf[4]; - - memcpy(buf, &val, sizeof(val)); - - return buf; -} - -static uint8_t* getCounter() { - static uint8_t counter = 0; - - ++counter; - - return &counter; -} - -UCode sendMessage(UUri &uri, - uint8_t *buffer, - size_t size) { - - auto uuid = Uuidv8Factory::create(); - - UAttributesBuilder builder(uuid, UMessageType::PUBLISH, UPriority::STANDARD); - - UAttributes attributes = builder.build(); - - UPayload payload(buffer, size, UPayloadType::VALUE); - - if (UCode::OK != ZenohUTransport::instance().send(uri, payload, attributes).code()) { - spdlog::error("ZenohUTransport::instance().send failed"); - return UCode::UNAVAILABLE; - } - - return UCode::OK; -} - -int main(int argc, char **argv) { - - signal(SIGINT, signalHandler); - - if (1 < argc) { - if (0 == strcmp("-d", argv[1])) { - spdlog::set_level(spdlog::level::debug); - } - } - - if (UCode::OK != ZenohUTransport::instance().init().code()) { - spdlog::error("ZenohUTransport::instance().init failed"); - return -1; - } - - // /entity/ - auto timeUri = LongUriSerializer::deserialize("/test.app/1/milliseconds"); - auto randomUri = LongUriSerializer::deserialize("/test.app/1/32bit"); - auto counterUri = LongUriSerializer::deserialize("/test.app/1/counter"); - - while (!gTerminate) { - - if (UCode::OK != sendMessage(timeUri, getTime(), 8)) { - spdlog::error("sendMessage failed"); - break; - } - - if (UCode::OK != sendMessage(randomUri, getRandom(), 4)) { - spdlog::error("sendMessage failed"); - break; - } - - if (UCode::OK != sendMessage(counterUri, getCounter(), 1)) { - spdlog::error("sendMessage failed"); - break; - } - - sleep(1); - } - - if (UCode::OK != ZenohUTransport::instance().term().code()) { - spdlog::error("ZenohUTransport::instance().term() failed"); - return -1; - } - - return 0; -} \ No newline at end of file diff --git a/samples/pubsub/src/main_sub.cpp b/samples/pubsub/src/main_sub.cpp deleted file mode 100644 index 47cfddc..0000000 --- a/samples/pubsub/src/main_sub.cpp +++ /dev/null @@ -1,174 +0,0 @@ - -/* - * Copyright (c) 2023 General Motors GTO LLC - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include - -using namespace uprotocol::utransport; -using namespace uprotocol::uuid; -using namespace uprotocol::v1; -using namespace uprotocol::uri; - -bool gTerminate = false; - -void signalHandler(int signal) { - if (signal == SIGINT) { - std::cout << "Ctrl+C received. Exiting..." << std::endl; - gTerminate = true; - } -} - -class TimeListener : public UListener { - - UStatus onReceive(const UUri &uri, - const UPayload &payload, - const UAttributes &attributes) const { - - uint64_t timeInMilliseconds; - - memcpy(&timeInMilliseconds, payload.data(), payload.size()); - - spdlog::info("time = {}", timeInMilliseconds); - - UStatus status; - - status.set_code(UCode::OK); - - return status; - } -}; - -class RandomListener : public UListener { - - UStatus onReceive(const UUri &uri, - const UPayload &payload, - const UAttributes &attributes) const { - - uint32_t random; - - memcpy(&random, payload.data(), payload.size()); - - spdlog::info("random = {}", random); - - UStatus status; - - status.set_code(UCode::OK); - - return status; - } -}; - -class CounterListener : public UListener { - - UStatus onReceive(const UUri &uri, - const UPayload &payload, - const UAttributes &attributes) const { - - uint8_t counter; - - memcpy(&counter, payload.data(), payload.size()); - - spdlog::info("counter = {}", counter); - - UStatus status; - - status.set_code(UCode::OK); - - return status; - } -}; - -int main(int argc, char **argv) { - - signal(SIGINT, signalHandler); - - TimeListener timeListener; - RandomListener randomListener; - CounterListener counterListener; - - if (1 < argc) { - if (0 == strcmp("-d", argv[1])) { - spdlog::set_level(spdlog::level::debug); - } - } - - if (UCode::OK != ZenohUTransport::instance().init().code()) { - spdlog::error("ZenohUTransport::instance().init failed"); - return -1; - } - - auto timeUri = LongUriSerializer::deserialize("/test.app/1/milliseconds"); - auto randomUri = LongUriSerializer::deserialize("/test.app/1/32bit"); - auto counterUri = LongUriSerializer::deserialize("/test.app/1/counter"); - - if (UCode::OK != ZenohUTransport::instance().registerListener(timeUri, timeListener).code()) { - - spdlog::error("ZenohUTransport::instance().registerListener failed"); - return -1; - } - - if (UCode::OK != ZenohUTransport::instance().registerListener(randomUri, randomListener).code()) { - - spdlog::error("ZenohUTransport::instance().registerListener failed"); - return -1; - } - - if (UCode::OK != ZenohUTransport::instance().registerListener(counterUri, counterListener).code()) { - - spdlog::error("ZenohUTransport::instance().registerListener failed"); - return -1; - } - - while(!gTerminate) { - sleep(1); - } - - if (UCode::OK != ZenohUTransport::instance().unregisterListener(timeUri, timeListener).code()) { - - spdlog::error("ZenohUTransport::instance().unregisterListener failed"); - return -1; - } - - if (UCode::OK != ZenohUTransport::instance().unregisterListener(randomUri, randomListener).code()) { - - spdlog::error("ZenohUTransport::instance().unregisterListener failed"); - return -1; - } - - if (UCode::OK != ZenohUTransport::instance().unregisterListener(counterUri, counterListener).code()) { - - spdlog::error("ZenohUTransport::instance().unregisterListener failed"); - return -1; - } - - if (UCode::OK != ZenohUTransport::instance().term().code()) { - spdlog::error("ZenohUTransport::instance().term failed"); - return -1; - } - - return 0; -} \ No newline at end of file diff --git a/samples/rpc/CMakeLists.txt b/samples/rpc/CMakeLists.txt deleted file mode 100644 index dbb585f..0000000 --- a/samples/rpc/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (c) 2023 General Motors GTO LLC -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -cmake_minimum_required(VERSION 3.20) -project(rpc VERSION 0.1.0 LANGUAGES CXX) - -if(BUILD_UNBUNDLED) - find_package(up-cpp REQUIRED) - find_package(zenohc REQUIRED) -else() - find_library(ZENOH_LIB zenohc) - find_package(up-cpp REQUIRED) - find_package(up-client-zenoh-cpp REQUIRED) - find_package(fmt REQUIRED) - find_package(spdlog REQUIRED) - find_package(Protobuf REQUIRED) -endif() - -add_definitions(-DSPDLOG_FMT_EXTERNAL) - -add_executable(rpc_server src/main_rpc_server.cpp) - -if(BUILD_UNBUNDLED) - target_link_libraries(rpc_server - PRIVATE - up-cpp::up-cpp - up-client-zenoh-cpp::up-client-zenoh-cpp - zenohc::lib) -else() - target_link_libraries(rpc_server - up-client-zenoh-cpp::up-client-zenoh-cpp - up-cpp::up-cpp - fmt::fmt - spdlog::spdlog - ${ZENOH_LIB}) - - target_include_directories(rpc_server - PRIVATE - ${up-client-zenoh-cpp_INCLUDE_DIR} - ${spdlog_INCLUDE_DIR}) - -endif() - -#rpc client -add_executable(rpc_client src/main_rpc_client.cpp) - -if(BUILD_UNBUNDLED) - target_link_libraries(rpc_client - PRIVATE - up-cpp::up-cpp - up-client-zenoh-cpp::up-client-zenoh-cpp - zenohc::lib) -else() - target_link_libraries(rpc_client - up-client-zenoh-cpp::up-client-zenoh-cpp - up-cpp::up-cpp - fmt::fmt - spdlog::spdlog - ${ZENOH_LIB}) - - target_include_directories(rpc_client - PRIVATE - ${up-client-zenoh-cpp_INCLUDE_DIR} - ${spdlog_INCLUDE_DIR}) -endif() diff --git a/samples/rpc/src/main_rpc_client.cpp b/samples/rpc/src/main_rpc_client.cpp deleted file mode 100644 index 82abfd4..0000000 --- a/samples/rpc/src/main_rpc_client.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2023 General Motors GTO LLC - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include -#include -#include -#include - -using namespace uprotocol::utransport; -using namespace uprotocol::uuid; -using namespace uprotocol::v1; -using namespace uprotocol::uri; - -bool gTerminate = false; - -void signalHandler(int signal) { - if (signal == SIGINT) { - std::cout << "Ctrl+C received. Exiting..." << std::endl; - gTerminate = true; - } -} - -UPayload sendRPC(UUri &uri) { - - auto uuid = Uuidv8Factory::create(); - auto type = UMessageType::REQUEST; - auto priority = UPriority::STANDARD; - - UAttributesBuilder builder(uuid, type, priority); - - UAttributes attributes = builder.build(); - - uint8_t buffer[1]; - - UPayload payload(buffer, sizeof(buffer), UPayloadType::VALUE); - - std::future result = ZenohRpcClient::instance().invokeMethod(uri, payload, attributes); - - if (false == result.valid()) { - spdlog::error("future is invalid"); - return UPayload(nullptr, 0, UPayloadType::UNDEFINED); - } - - result.wait(); - - return result.get(); -} - -int main(int argc, char **argv) -{ - signal(SIGINT, signalHandler); - - if (1 < argc) { - if (0 == strcmp("-d", argv[1])) { - spdlog::set_level(spdlog::level::debug); - } - } - - if (UCode::OK != ZenohRpcClient::instance().init().code()) - { - spdlog::error("ZenohRpcClient::instance().init failed"); - return -1; - } - - auto rpcUri = LongUriSerializer::deserialize("/test_rpc.app/1/rpc.milliseconds"); - - while (!gTerminate) { - - auto response = sendRPC(rpcUri); - - uint64_t milliseconds; - - if (nullptr != response.data()) { - - memcpy(&milliseconds, response.data(), response.size()); - - spdlog::info("received = {}", milliseconds); - } - sleep(1); - } - - if (UCode::OK != ZenohRpcClient::instance().term().code()) { - spdlog::error("ZenohRpcClient::instance().term() failed"); - return -1; - } - - return 0; -} diff --git a/samples/rpc/src/main_rpc_server.cpp b/samples/rpc/src/main_rpc_server.cpp deleted file mode 100644 index 7d7d974..0000000 --- a/samples/rpc/src/main_rpc_server.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2023 General Motors GTO LLC - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include -#include -#include - -using namespace uprotocol::utransport; -using namespace uprotocol::uuid; -using namespace uprotocol::v1; -using namespace uprotocol::uri; - - -bool gTerminate = false; - -void signalHandler(int signal) { - if (signal == SIGINT) { - std::cout << "Ctrl+C received. Exiting..." << std::endl; - gTerminate = true; - } -} - -class RpcListener : public UListener { - - UStatus onReceive(const UUri &uri, - const UPayload &payload, - const UAttributes &attributes) const { - - auto currentTime = std::chrono::system_clock::now(); - auto duration = currentTime.time_since_epoch(); - - auto timeMilli = std::chrono::duration_cast(duration).count(); - - static uint8_t buf[8]; - - memcpy(buf, &timeMilli, sizeof(timeMilli)); - - UPayload response(buf, sizeof(buf), UPayloadType::VALUE); - - UAttributesBuilder builder(attributes.id(), UMessageType::RESPONSE, UPriority::STANDARD); - - ZenohUTransport::instance().send(uri, response, builder.build()); - - UStatus status; - status.set_code(UCode::OK); - - return status; - } - -}; - -UPayload sendRPC(UUri &uri) { - - auto uuid = Uuidv8Factory::create(); - - UAttributesBuilder builder(uuid, UMessageType::REQUEST, UPriority::STANDARD); - - UAttributes attributes = builder.build(); - - uint8_t buffer[1]; - - UPayload payload(buffer, sizeof(buffer), UPayloadType::VALUE); - - std::future result = ZenohRpcClient::instance().invokeMethod(uri, payload, attributes); - - if (false == result.valid()) { - spdlog::error("future is invalid"); - return UPayload(nullptr, 0, UPayloadType::UNDEFINED); - } - - result.wait(); - - return result.get(); -} - -int main(int argc, char **argv) -{ - RpcListener listener; - - signal(SIGINT, signalHandler); - - if (1 < argc) { - if (0 == strcmp("-d", argv[1])) { - spdlog::set_level(spdlog::level::debug); - } - } - - if (UCode::OK != ZenohUTransport::instance().init().code()) { - spdlog::error("ZenohRpcServer::instance().init failed"); - return -1; - } - - auto rpcUri = LongUriSerializer::deserialize("/test_rpc.app/1/rpc.milliseconds"); - - if (UCode::OK != ZenohUTransport::instance().registerListener(rpcUri, listener).code()) { - spdlog::error("ZenohRpcServer::instance().registerListener failed"); - return -1; - } - - while (!gTerminate) { - sleep(1); - } - - if (UCode::OK != ZenohUTransport::instance().unregisterListener(rpcUri, listener).code()) { - spdlog::error("ZenohRpcServer::instance().unregisterListener failed"); - return -1; - } - - if (UCode::OK != ZenohUTransport::instance().term().code()) { - spdlog::error("ZenohUTransport::instance().term failed"); - return -1; - } - - return 0; -} \ No newline at end of file From 783f9f0b14e80385400c7c7154eade12a0698aef Mon Sep 17 00:00:00 2001 From: Michael Melamud Date: Sun, 10 Mar 2024 07:46:10 +0000 Subject: [PATCH 03/33] enabling full build --- conanfile.py | 11 +++++------ lib/CMakeLists.txt | 6 +++--- lib/src/zenohUTransport.cpp | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/conanfile.py b/conanfile.py index 4846ebd..707b5c7 100644 --- a/conanfile.py +++ b/conanfile.py @@ -39,14 +39,13 @@ class UpClientZenoh(ConanFile): # self.options["up-cpp"].shared = True def requirements(self): - if self.options.build_unbundled: + self.requires("protobuf/3.21.12" + ("@cross/cross" if self.options.build_cross_compiling else "")) + self.requires("spdlog/1.13.0") + if self.options.build_testing: + self.requires("gtest/1.14.0") + if self.options.build_unbundled: #each componenet is built independently self.requires("up-cpp/0.1.5.0-dev") self.requires("zenohc/cci.20240213") - self.requires("protobuf/3.21.12" + ("@cross/cross" if self.options.build_cross_compiling else "")) - else: - self.requires("up-cpp/0.1") - self.requires("spdlog/1.13.0") - self.requires("protobuf/3.21.12") def generate(self): tc = CMakeToolchain(self) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 954cb4f..411a0f4 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -19,14 +19,14 @@ cmake_minimum_required(VERSION 3.20) project(up-client-zenoh-cpp VERSION 0.1.0 LANGUAGES CXX) +find_package(Protobuf REQUIRED) +find_package(spdlog REQUIRED) + if(BUILD_UNBUNDLED) find_package(up-cpp REQUIRED) find_package(zenohc REQUIRED) else() find_library(ZENOH_LIB zenohc) - find_package(up-cpp REQUIRED) - find_package(Protobuf REQUIRED) - find_package(spdlog REQUIRED) endif() # Support pulling headers outside of /usr/local diff --git a/lib/src/zenohUTransport.cpp b/lib/src/zenohUTransport.cpp index bfdae58..4f64827 100644 --- a/lib/src/zenohUTransport.cpp +++ b/lib/src/zenohUTransport.cpp @@ -93,7 +93,7 @@ UStatus ZenohUTransport::term() noexcept { if (0 == refCount_) { - uint8_t retries; + uint8_t retries = 0; termPending_ = true; @@ -277,6 +277,7 @@ UCode ZenohUTransport::sendPublish(const UUri &uri, UCode ZenohUTransport::sendQueryable(const UUri &uri, const UPayload &payload, const UAttributes &attributes) noexcept { + if (UMessageType::RESPONSE != attributes.type()) { spdlog::error("Wrong message type = {}", UMessageTypeToString(attributes.type()).value()); return UCode::INVALID_ARGUMENT; From 39fecbe67873a713fa4951823df6eee6b851008a Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 12:13:22 +0200 Subject: [PATCH 04/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 411a0f4..35a58f9 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -27,6 +27,7 @@ if(BUILD_UNBUNDLED) find_package(zenohc REQUIRED) else() find_library(ZENOH_LIB zenohc) + find_package(up-cpp REQUIRED) endif() # Support pulling headers outside of /usr/local @@ -64,7 +65,17 @@ else() ${up-cpp_INCLUDE_DIR} include ) - target_link_libraries(${PROJECT_NAME} PRIVATE up-cpp::up-cpp ${ZENOH_LIB}) + if (${up-cpp_FOUND}) + target_link_libraries(${PROJECT_NAME} + PRIVATE + up-cpp::up-cpp + ${ZENOH_LIB}) + else() + target_link_libraries(${PROJECT_NAME} + PRIVATE + up-cpp + ${ZENOH_LIB}) + endif() endif() INSTALL(TARGETS ${PROJECT_NAME}) From 8ab3cf36c364f30e0263a759cb35f5b069b18049 Mon Sep 17 00:00:00 2001 From: Michael Melamud Date: Sun, 10 Mar 2024 10:52:24 +0000 Subject: [PATCH 05/33] fixing compilation --- lib/CMakeLists.txt | 40 +++++++++++++------------------------- lib/src/zenohRpcClient.cpp | 10 +++++----- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 35a58f9..b6f8b0b 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -27,7 +27,7 @@ if(BUILD_UNBUNDLED) find_package(zenohc REQUIRED) else() find_library(ZENOH_LIB zenohc) - find_package(up-cpp REQUIRED) + find_package(up-cpp QUIET) endif() # Support pulling headers outside of /usr/local @@ -40,42 +40,28 @@ set(SRC_FILES src/zenohRpcClient.cpp src/zenohSessionManager.cpp src/messageBuilder.cpp - src/messageParser.cpp - ) + src/messageParser.cpp) add_library(${PROJECT_NAME} ${SRC_FILES}) add_library(up-client-zenoh-cpp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src) + if(BUILD_UNBUNDLED) - target_include_directories(${PROJECT_NAME} - PUBLIC - $ - $ - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/src - ) target_link_libraries(${PROJECT_NAME} PRIVATE up-cpp::up-cpp - zenohc::lib - ) + zenohc::lib) else() - target_include_directories(${PROJECT_NAME} - PRIVATE - ${up-cpp_INCLUDE_DIR} - include - ) - if (${up-cpp_FOUND}) - target_link_libraries(${PROJECT_NAME} - PRIVATE + target_link_libraries(${PROJECT_NAME} + PUBLIC up-cpp::up-cpp - ${ZENOH_LIB}) - else() - target_link_libraries(${PROJECT_NAME} - PRIVATE - up-cpp - ${ZENOH_LIB}) - endif() + ${ZENOH_LIB}) endif() INSTALL(TARGETS ${PROJECT_NAME}) diff --git a/lib/src/zenohRpcClient.cpp b/lib/src/zenohRpcClient.cpp index 82bb18b..c7655ab 100644 --- a/lib/src/zenohRpcClient.cpp +++ b/lib/src/zenohRpcClient.cpp @@ -119,17 +119,17 @@ std::future ZenohRpcClient::invokeMethod(const UUri &uri, if (0 == refCount_) { spdlog::error("ZenohRpcClient is not initialized"); - return std::move(future); + return future; } if (false == isRPCMethod(uri.resource())) { spdlog::error("URI is not of RPC type"); - return std::move(future); + return future; } if (UMessageType::REQUEST != attributes.type()) { spdlog::error("Wrong message type = {}", UMessageTypeToString(attributes.type()).value()); - return std::move(future); + return future; } auto uriHash = std::hash{}(LongUriSerializer::serialize(uri)); @@ -137,7 +137,7 @@ std::future ZenohRpcClient::invokeMethod(const UUri &uri, auto header = MessageBuilder::buildHeader(attributes); if (header.empty()) { spdlog::error("Failed to build header"); - return std::move(future); + return future; } z_bytes_t bytes; @@ -167,7 +167,7 @@ std::future ZenohRpcClient::invokeMethod(const UUri &uri, if (0 != z_get(z_loan(session_), z_keyexpr(std::to_string(uriHash).c_str()), "", z_move(channel->send), &opts)) { spdlog::error("z_get failure"); z_drop(&map); - return std::move(future); + return future; } future = threadPool_->submit(handleReply, channel); From c5aa5c8c4782368b92b5f83164c927e7d416c97e Mon Sep 17 00:00:00 2001 From: Michael Melamud Date: Sun, 10 Mar 2024 10:56:31 +0000 Subject: [PATCH 06/33] fixing compilation --- conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conanfile.py b/conanfile.py index 707b5c7..26d5cd2 100644 --- a/conanfile.py +++ b/conanfile.py @@ -46,6 +46,8 @@ def requirements(self): if self.options.build_unbundled: #each componenet is built independently self.requires("up-cpp/0.1.5.0-dev") self.requires("zenohc/cci.20240213") + else: + self.requires("up-cpp/0.1") def generate(self): tc = CMakeToolchain(self) From 9c0821428737c60d8de80b5e6aced4d2e0d9043c Mon Sep 17 00:00:00 2001 From: Michael Melamud Date: Sun, 10 Mar 2024 10:57:58 +0000 Subject: [PATCH 07/33] updating version --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 26d5cd2..606e087 100644 --- a/conanfile.py +++ b/conanfile.py @@ -16,7 +16,7 @@ class UpClientZenoh(ConanFile): options = {"shared": [True, False], "fPIC": [True, False]} conan_version = None generators = "CMakeDeps" - version = "0.1" + version = "0.1.1-dev" exports_sources = "CMakeLists.txt", "lib/*" options = { From 94779f7d90065e7c6c74db402200260161f1cffd Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:37:40 +0200 Subject: [PATCH 08/33] Update conanfile.py --- conanfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index 606e087..e3cf000 100644 --- a/conanfile.py +++ b/conanfile.py @@ -24,6 +24,7 @@ class UpClientZenoh(ConanFile): "fPIC": [True, False], "build_testing": [True, False], "build_unbundled": [True, False], + "zenoh_package" [True, False], "build_cross_compiling": [True, False], } @@ -32,6 +33,7 @@ class UpClientZenoh(ConanFile): "fPIC": False, "build_testing": False, "build_unbundled": False, + "zenoh_package": True, "build_cross_compiling": False, } @@ -44,10 +46,9 @@ def requirements(self): if self.options.build_testing: self.requires("gtest/1.14.0") if self.options.build_unbundled: #each componenet is built independently - self.requires("up-cpp/0.1.5.0-dev") - self.requires("zenohc/cci.20240213") - else: - self.requires("up-cpp/0.1") + self.requires("up-cpp/0.1.5.1-dev") + if self.options.zenoh_package: + self.requires("zenohc/cci.20240213") def generate(self): tc = CMakeToolchain(self) From 238b3e306a7b74ea08ac190c6f5b81a287d790ea Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:39:15 +0200 Subject: [PATCH 09/33] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58d110f..65b3e18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: Build && install up-client-zenoh-cpp shell: bash run: | - conan install conaninfo/ --output-folder=. + conan install conaninfo/ -o build_unbundled=True -o zenoh_package=False --output-folder=. cd build/Release cmake ../../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local cmake --build . --target install --config Release -- -j @@ -69,4 +69,4 @@ jobs: if: always() steps: - name: Check whether all jobs pass - run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' \ No newline at end of file + run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' From 8d7a2329fbf9fe4762ca0f1787c0a5f17e5b7ca6 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:25:08 +0200 Subject: [PATCH 10/33] Delete conaninfo directory --- conaninfo/conanfile.txt | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 conaninfo/conanfile.txt diff --git a/conaninfo/conanfile.txt b/conaninfo/conanfile.txt deleted file mode 100644 index d4f5ad4..0000000 --- a/conaninfo/conanfile.txt +++ /dev/null @@ -1,11 +0,0 @@ -[requires] -up-cpp/0.1 -protobuf/3.21.12 -spdlog/1.13.0 - -[generators] -CMakeDeps -CMakeToolchain - -[layout] -cmake_layout \ No newline at end of file From 6e24e1fc85ef227068247b55f2b8ccbf632092b6 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:26:55 +0200 Subject: [PATCH 11/33] Update ci.yml --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65b3e18..c1ada09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,9 +33,8 @@ jobs: - name: Create up-cpp Conan package shell: bash run: | - git clone https://github.com/eclipse-uprotocol/up-cpp.git + git clone https://github.com/MelamudMichael/up-cpp.git cd up-cpp - git clone -b uprotocol-core-api-1.5.6 https://github.com/eclipse-uprotocol/up-core-api.git git submodule update --init --recursive conan create . --build=missing From fd385a64d57f22ef8e616d3fda79da86563142b6 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:35:07 +0200 Subject: [PATCH 12/33] Update conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index e3cf000..e9debd3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -24,7 +24,7 @@ class UpClientZenoh(ConanFile): "fPIC": [True, False], "build_testing": [True, False], "build_unbundled": [True, False], - "zenoh_package" [True, False], + "zenoh_package": [True, False], "build_cross_compiling": [True, False], } From 72ce57bd587e3c3145977fc0bfe3b73c4c87f2e4 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:36:48 +0200 Subject: [PATCH 13/33] Update ci.yml --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1ada09..4460507 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,9 +49,10 @@ jobs: - name: Build && install up-client-zenoh-cpp shell: bash run: | - conan install conaninfo/ -o build_unbundled=True -o zenoh_package=False --output-folder=. - cd build/Release - cmake ../../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local + mkdir build + cd build + conan install ../ -o build_unbundled=True -o zenoh_package=False + cmake ../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local cmake --build . --target install --config Release -- -j From bc234f01a1c9f0b08111e61bba78f2bf950623ec Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:43:00 +0200 Subject: [PATCH 14/33] Update conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index e9debd3..31ceb9f 100644 --- a/conanfile.py +++ b/conanfile.py @@ -16,7 +16,7 @@ class UpClientZenoh(ConanFile): options = {"shared": [True, False], "fPIC": [True, False]} conan_version = None generators = "CMakeDeps" - version = "0.1.1-dev" + version = "0.1.2-dev" exports_sources = "CMakeLists.txt", "lib/*" options = { From 67e535e9ebf2995d7ac65459fc670a3ec26e5faa Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:48:53 +0200 Subject: [PATCH 15/33] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4460507..dfea41b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: mkdir build cd build conan install ../ -o build_unbundled=True -o zenoh_package=False - cmake ../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local + cmake ../ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local cmake --build . --target install --config Release -- -j From a76d23cd7a9cbd3fed5018c30d7216fe5cb27b55 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 18:44:27 +0200 Subject: [PATCH 16/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index b6f8b0b..5053c42 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -26,7 +26,7 @@ if(BUILD_UNBUNDLED) find_package(up-cpp REQUIRED) find_package(zenohc REQUIRED) else() - find_library(ZENOH_LIB zenohc) + find_library(ZENOH_LIB zenohc HINTS ~/local) find_package(up-cpp QUIET) endif() From 2eb775248f703a82a7b5d63a38e6b568580fed19 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 18:53:10 +0200 Subject: [PATCH 17/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 5053c42..b6f8b0b 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -26,7 +26,7 @@ if(BUILD_UNBUNDLED) find_package(up-cpp REQUIRED) find_package(zenohc REQUIRED) else() - find_library(ZENOH_LIB zenohc HINTS ~/local) + find_library(ZENOH_LIB zenohc) find_package(up-cpp QUIET) endif() From 2950ae79cd22f4d08b89890ec74fb3655ac0b114 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 20:51:46 +0200 Subject: [PATCH 18/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index b6f8b0b..70dcadf 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -49,6 +49,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC $ $ + ${CMAKE_INCLUDE_PATH} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) From 07a2ef2541c53f07c49ee262df7c73bd0997e5eb Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:09:11 +0200 Subject: [PATCH 19/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 70dcadf..925ed37 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -45,6 +45,7 @@ set(SRC_FILES add_library(${PROJECT_NAME} ${SRC_FILES}) add_library(up-client-zenoh-cpp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +message("MICHAEL ${CMAKE_INCLUDE_PATH}) target_include_directories(${PROJECT_NAME} PUBLIC $ From 0a717e53bec26b61603985dbf58384c058ef7774 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:14:21 +0200 Subject: [PATCH 20/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 925ed37..8fe16ab 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -45,7 +45,7 @@ set(SRC_FILES add_library(${PROJECT_NAME} ${SRC_FILES}) add_library(up-client-zenoh-cpp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) -message("MICHAEL ${CMAKE_INCLUDE_PATH}) +message("MICHAEL ${CMAKE_INCLUDE_PATH}") target_include_directories(${PROJECT_NAME} PUBLIC $ From fae945c900b6e02d51accdb3bca69bbc357122c5 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:29:11 +0200 Subject: [PATCH 21/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 8fe16ab..fcf2820 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -50,7 +50,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC $ $ - ${CMAKE_INCLUDE_PATH} + ${CMAKE_ZENOH_INCLUDE_PATH} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) From bcd6493ce4853f656298035502d0709bb63b3ba2 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:41:59 +0200 Subject: [PATCH 22/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index fcf2820..1481785 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -45,12 +45,13 @@ set(SRC_FILES add_library(${PROJECT_NAME} ${SRC_FILES}) add_library(up-client-zenoh-cpp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) -message("MICHAEL ${CMAKE_INCLUDE_PATH}") +message("MICHAEL ${CMAKE_ZENOH_INCLUDE_PATH}") target_include_directories(${PROJECT_NAME} PUBLIC $ $ ${CMAKE_ZENOH_INCLUDE_PATH} + ${HOME}/include PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) From d8ef779031ba6f4cdf7404bbec083dc6e02b89e5 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:48:18 +0200 Subject: [PATCH 23/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 1481785..1cd2bee 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -45,12 +45,12 @@ set(SRC_FILES add_library(${PROJECT_NAME} ${SRC_FILES}) add_library(up-client-zenoh-cpp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) -message("MICHAEL ${CMAKE_ZENOH_INCLUDE_PATH}") +message("MICHAEL $ENV{CMAKE_ZENOH_INCLUDE_PATH}") target_include_directories(${PROJECT_NAME} PUBLIC $ $ - ${CMAKE_ZENOH_INCLUDE_PATH} + $ENV{CMAKE_ZENOH_INCLUDE_PATH} ${HOME}/include PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) From 07ead141d2da4e8416408b2f02a84be78e134826 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Mon, 11 Mar 2024 06:35:15 +0200 Subject: [PATCH 24/33] Update CMakeLists.txt --- lib/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 1cd2bee..8513ede 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -45,7 +45,6 @@ set(SRC_FILES add_library(${PROJECT_NAME} ${SRC_FILES}) add_library(up-client-zenoh-cpp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) -message("MICHAEL $ENV{CMAKE_ZENOH_INCLUDE_PATH}") target_include_directories(${PROJECT_NAME} PUBLIC $ From 37ec538aefc66509f57afbd5ba8b9c07f115f5e9 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Mon, 11 Mar 2024 06:58:25 +0200 Subject: [PATCH 25/33] Update conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 31ceb9f..b3ccd81 100644 --- a/conanfile.py +++ b/conanfile.py @@ -15,7 +15,7 @@ class UpClientZenoh(ConanFile): settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} conan_version = None - generators = "CMakeDeps" + generators = "CMakeDeps", "PkgConfigDeps", "VirtualRunEnv", "VirtualBuildEnv" version = "0.1.2-dev" exports_sources = "CMakeLists.txt", "lib/*" From 1de9db4eb750afb71797a68fb3b8b85d6d7518ea Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Mon, 11 Mar 2024 07:56:12 +0200 Subject: [PATCH 26/33] Update conanfile.py --- conanfile.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/conanfile.py b/conanfile.py index b3ccd81..6d7cda8 100644 --- a/conanfile.py +++ b/conanfile.py @@ -15,7 +15,7 @@ class UpClientZenoh(ConanFile): settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} conan_version = None - generators = "CMakeDeps", "PkgConfigDeps", "VirtualRunEnv", "VirtualBuildEnv" + generators = "CMakeDeps" version = "0.1.2-dev" exports_sources = "CMakeLists.txt", "lib/*" @@ -32,14 +32,11 @@ class UpClientZenoh(ConanFile): "shared": False, "fPIC": False, "build_testing": False, - "build_unbundled": False, - "zenoh_package": True, + "build_unbundled": True, + "zenoh_package": False, "build_cross_compiling": False, } - # def configure(self): - # self.options["up-cpp"].shared = True - def requirements(self): self.requires("protobuf/3.21.12" + ("@cross/cross" if self.options.build_cross_compiling else "")) self.requires("spdlog/1.13.0") From e80537e180930cbe401a024d87a83d888a2a7e1e Mon Sep 17 00:00:00 2001 From: Michael Melamud Date: Mon, 11 Mar 2024 09:41:10 +0000 Subject: [PATCH 27/33] adding unittests stub --- CMakeLists.txt | 5 ++-- conanfile.py | 6 ++-- lib/CMakeLists.txt | 2 +- test/CMakeLists.txt | 41 ++++++++++++++++++++++++++ test/src/main_test.cpp | 65 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+), 5 deletions(-) create mode 100644 test/CMakeLists.txt create mode 100644 test/src/main_test.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e773e4..dfe41a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,7 @@ endif() add_subdirectory(lib) -if(BUILD_SAMPLES) - add_subdirectory(samples) +if(BUILD_TESTING) + enable_testing() + add_subdirectory(test) endif() \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index 6d7cda8..294c7f8 100644 --- a/conanfile.py +++ b/conanfile.py @@ -17,7 +17,7 @@ class UpClientZenoh(ConanFile): conan_version = None generators = "CMakeDeps" version = "0.1.2-dev" - exports_sources = "CMakeLists.txt", "lib/*" + exports_sources = "CMakeLists.txt", "lib/*", "test/*" options = { "shared": [True, False], @@ -31,7 +31,7 @@ class UpClientZenoh(ConanFile): default_options = { "shared": False, "fPIC": False, - "build_testing": False, + "build_testing": True, "build_unbundled": True, "zenoh_package": False, "build_cross_compiling": False, @@ -49,6 +49,7 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = self.options.build_testing tc.generate() def build(self): @@ -62,3 +63,4 @@ def package(self): def package_info(self): self.cpp_info.libs = ["up-client-zenoh-cpp"] + diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 8513ede..b5f4b8d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -56,7 +56,7 @@ target_include_directories(${PROJECT_NAME} if(BUILD_UNBUNDLED) target_link_libraries(${PROJECT_NAME} - PRIVATE + PUBLIC up-cpp::up-cpp zenohc::lib) else() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..f32278b --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,41 @@ +# Copyright (c) 2023 General Motors GTO LLC +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# SPDX-FileType: SOURCE +# SPDX-FileCopyrightText: 2023 General Motors GTO LLC +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20) +project(test VERSION 0.1.0 LANGUAGES CXX) + +find_package(GTest REQUIRED) + +# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) +add_executable(main_test + src/main_test.cpp) +target_link_libraries(main_test + PUBLIC + up-client-zenoh-cpp::up-client-zenoh-cpp + PRIVATE + GTest::gtest_main + GTest::gmock + pthread +) + +add_test("t-18-main_test" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/main_test) diff --git a/test/src/main_test.cpp b/test/src/main_test.cpp new file mode 100644 index 0000000..92f626c --- /dev/null +++ b/test/src/main_test.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2023 General Motors GTO LLC + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * SPDX-FileType: SOURCE + * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include + +using namespace uprotocol::utransport; + +class upClientZenohCppTest : public ::testing::Test { + + public: + + public: + // SetUpTestSuite() is called before all tests in the test suite + static void SetUpTestSuite() { + + if (UCode::OK != ZenohUTransport::instance().init().code()) { + spdlog::error("ZenohUTransport::instance().init failed"); + return; + } + } + + // TearDownTestSuite() is called after all tests in the test suite + static void TearDownTestSuite() { + + if (UCode::OK != ZenohUTransport::instance().term().code()) { + spdlog::error("ZenohUTransport::instance().term() failed"); + return; + } + } +}; + +/* Deprecate non existing topic */ +TEST_F(upClientZenohCppTest, DummyTest) { + +} + +//unsubscribe from non existane topic +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file From dc4de9dd1f730984e4fa609d949775ee47d1e22c Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:48:57 +0200 Subject: [PATCH 28/33] Update conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 294c7f8..0911555 100644 --- a/conanfile.py +++ b/conanfile.py @@ -31,7 +31,7 @@ class UpClientZenoh(ConanFile): default_options = { "shared": False, "fPIC": False, - "build_testing": True, + "build_testing": False, "build_unbundled": True, "zenoh_package": False, "build_cross_compiling": False, From de41aacc4e25fa85aeae41db603d48890b9bb77c Mon Sep 17 00:00:00 2001 From: Michael Melamud Date: Mon, 11 Mar 2024 10:17:44 +0000 Subject: [PATCH 29/33] adding spdlog --- test/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f32278b..80cd960 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -25,6 +25,7 @@ cmake_minimum_required(VERSION 3.20) project(test VERSION 0.1.0 LANGUAGES CXX) find_package(GTest REQUIRED) +find_package(spdlog REQUIRED) # include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) add_executable(main_test @@ -32,6 +33,7 @@ add_executable(main_test target_link_libraries(main_test PUBLIC up-client-zenoh-cpp::up-client-zenoh-cpp + spdlog::spdlog PRIVATE GTest::gtest_main GTest::gmock From 6b3742689afbf04b687976485999adb38e841066 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:43:44 +0200 Subject: [PATCH 30/33] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfea41b..da5a64b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Create up-cpp Conan package shell: bash run: | - git clone https://github.com/MelamudMichael/up-cpp.git + git clone https://github.com/eclipse-uprotocol/up-cpp.git cd up-cpp git submodule update --init --recursive conan create . --build=missing From 12e01804bee4d0b898f9aa6be23e1bc86719e883 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:29:08 +0200 Subject: [PATCH 31/33] Update conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 0911555..b416cce 100644 --- a/conanfile.py +++ b/conanfile.py @@ -43,7 +43,7 @@ def requirements(self): if self.options.build_testing: self.requires("gtest/1.14.0") if self.options.build_unbundled: #each componenet is built independently - self.requires("up-cpp/0.1.5.1-dev") + self.requires("up-cpp/0.1.1-dev") if self.options.zenoh_package: self.requires("zenohc/cci.20240213") From c35bb2ca5e17ba23206e43b2a313dbbd0433ccf7 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Tue, 12 Mar 2024 22:00:28 +0200 Subject: [PATCH 32/33] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 03bf2b4..0f6289e 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,9 @@ This module contains the implementation for pub-sub and RPC API`s defined in the $ git clone https://github.com/eclipse-uprotocol/up-client-zenoh-cpp.git ``` ## How to Use the Library -To add up-cpp to your conan build dependencies, simply add the following to your conanfile.txt: +To add up-client-zenoh-cpp to your conan build dependencies, simply add the following to your conanfile.txt: ``` [requires] -up-cpp/0.1 up-cpp-client-zenoh/0.1 protobuf/3.21.12 @@ -43,10 +42,11 @@ cmake_layout ### Building locally ``` $ cd up-cpp-client-zenoh -$ conan install conaninfo/ --output-folder=. -$ cd build/Release -$ cmake ../../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -$ make -j +$ mkdir build +$ cd build +$ conan install ../ +$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release +$ cmake --build . --config Release -- -j ``` #### Creating conan package locally From aca214d06aabc39b2a8cf342bba5cc898bc6701e Mon Sep 17 00:00:00 2001 From: Michael Melamud Date: Wed, 13 Mar 2024 13:34:03 +0000 Subject: [PATCH 33/33] changing to 2024 --- CMakeLists.txt | 2 +- lib/CMakeLists.txt | 2 +- lib/include/up-client-zenoh-cpp/message/messageBuilder.h | 4 ++-- lib/include/up-client-zenoh-cpp/message/messageCommon.h | 4 ++-- lib/include/up-client-zenoh-cpp/message/messageParser.h | 4 ++-- lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h | 4 ++-- lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h | 4 ++-- lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h | 4 ++-- lib/src/messageBuilder.cpp | 4 ++-- lib/src/messageParser.cpp | 4 ++-- lib/src/zenohRpcClient.cpp | 4 ++-- lib/src/zenohSessionManager.cpp | 4 ++-- lib/src/zenohUTransport.cpp | 4 ++-- test/CMakeLists.txt | 4 ++-- test/src/main_test.cpp | 4 ++-- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfe41a5..2cfad17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 General Motors GTO LLC +# Copyright (c) 2024 General Motors GTO LLC # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index b5f4b8d..ecfa286 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 General Motors GTO LLC +# Copyright (c) 2024 General Motors GTO LLC # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/lib/include/up-client-zenoh-cpp/message/messageBuilder.h b/lib/include/up-client-zenoh-cpp/message/messageBuilder.h index f4f3366..b10a851 100644 --- a/lib/include/up-client-zenoh-cpp/message/messageBuilder.h +++ b/lib/include/up-client-zenoh-cpp/message/messageBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/message/messageCommon.h b/lib/include/up-client-zenoh-cpp/message/messageCommon.h index 07bb2bc..f5592d4 100644 --- a/lib/include/up-client-zenoh-cpp/message/messageCommon.h +++ b/lib/include/up-client-zenoh-cpp/message/messageCommon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/message/messageParser.h b/lib/include/up-client-zenoh-cpp/message/messageParser.h index 25517fe..f7f0e59 100644 --- a/lib/include/up-client-zenoh-cpp/message/messageParser.h +++ b/lib/include/up-client-zenoh-cpp/message/messageParser.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h b/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h index 8bbe009..ae88193 100644 --- a/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h +++ b/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h b/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h index 71fc5a8..d3b0890 100644 --- a/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h +++ b/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h b/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h index 700dc94..1151612 100644 --- a/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h +++ b/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/messageBuilder.cpp b/lib/src/messageBuilder.cpp index 25eb92c..70c9402 100644 --- a/lib/src/messageBuilder.cpp +++ b/lib/src/messageBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/messageParser.cpp b/lib/src/messageParser.cpp index e466cba..588b80c 100644 --- a/lib/src/messageParser.cpp +++ b/lib/src/messageParser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/zenohRpcClient.cpp b/lib/src/zenohRpcClient.cpp index c7655ab..cc3630c 100644 --- a/lib/src/zenohRpcClient.cpp +++ b/lib/src/zenohRpcClient.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/zenohSessionManager.cpp b/lib/src/zenohSessionManager.cpp index 05b63ea..bb954ed 100644 --- a/lib/src/zenohSessionManager.cpp +++ b/lib/src/zenohSessionManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/zenohUTransport.cpp b/lib/src/zenohUTransport.cpp index 4f64827..98ba2ce 100644 --- a/lib/src/zenohUTransport.cpp +++ b/lib/src/zenohUTransport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 80cd960..d8b32f1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 General Motors GTO LLC +# Copyright (c) 2024 General Motors GTO LLC # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ # under the License. # # SPDX-FileType: SOURCE -# SPDX-FileCopyrightText: 2023 General Motors GTO LLC +# SPDX-FileCopyrightText: 2024 General Motors GTO LLC # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.20) diff --git a/test/src/main_test.cpp b/test/src/main_test.cpp index 92f626c..5bc8d11 100644 --- a/test/src/main_test.cpp +++ b/test/src/main_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */