From da18094e5c06b2388ee6033c7505e323c98d4d99 Mon Sep 17 00:00:00 2001 From: Louis Brunner Date: Tue, 30 May 2023 15:53:43 +0100 Subject: [PATCH 1/6] fix: proper CMake syntax when cppzmq has already been installed (#42) --- cpp/CMakeLists.txt | 2 +- source/communication_interfaces/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index a430ed5..8abd8fd 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -40,7 +40,7 @@ include(FindPkgConfig) add_project_dependency(control_libraries 7.0.0 REQUIRED COMPONENTS state_representation) add_project_dependency(clproto 7.0.0 REQUIRED) -if (NOT ${cppzmq_FOUND}) # provided by parent CMakeLists.txt (if used) +if (NOT cppzmq_POPULATED) # provided by parent CMakeLists.txt (if used) add_project_dependency(cppzmq 4.7.1 REQUIRED) endif() diff --git a/source/communication_interfaces/CMakeLists.txt b/source/communication_interfaces/CMakeLists.txt index 83d7500..42ee54f 100644 --- a/source/communication_interfaces/CMakeLists.txt +++ b/source/communication_interfaces/CMakeLists.txt @@ -38,7 +38,7 @@ include(GNUInstallDirs) include(CMakePackageConfigHelpers) include(FindPkgConfig) -if (NOT ${cppzmq_FOUND}) # provided by parent CMakeLists.txt (if used) +if (NOT cppzmq_POPULATED) # provided by parent CMakeLists.txt (if used) add_project_dependency(cppzmq 4.7.1 REQUIRED) endif() From 7cddc3a64c3fdf8274d8e59d1c3c46471faf504e Mon Sep 17 00:00:00 2001 From: Dominic Reber <71256590+domire8@users.noreply.github.com> Date: Tue, 6 Jun 2023 11:37:22 +0200 Subject: [PATCH 2/6] Make install script executable (#44) --- source/install.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 source/install.sh diff --git a/source/install.sh b/source/install.sh old mode 100644 new mode 100755 From bb6a5e90f600330933a027e18384a090678c513b Mon Sep 17 00:00:00 2001 From: Enrico Eberhard <32450951+eeberhard@users.noreply.github.com> Date: Sun, 11 Jun 2023 13:36:38 +0200 Subject: [PATCH 3/6] Set ZMQSubscriber socket options before opening the socket (#45) * The conflate option must be set before connection, otherwise it has no effect and messages build up in the queue --- source/communication_interfaces/src/sockets/ZMQSubscriber.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp b/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp index e9a8d94..dfce313 100644 --- a/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp +++ b/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp @@ -6,9 +6,9 @@ ZMQSubscriber::ZMQSubscriber(ZMQSocketConfiguration configuration) : ZMQSocket(s void ZMQSubscriber::open() { this->socket_ = std::make_shared(*this->config_.context, ZMQ_SUB); - this->open_socket(); this->socket_->set(zmq::sockopt::conflate, 1); this->socket_->set(zmq::sockopt::subscribe, ""); + this->open_socket(); } bool ZMQSubscriber::send_bytes(const std::string&) { From 406311fdf0e5543af0d200bf450bf883266a3ff0 Mon Sep 17 00:00:00 2001 From: Dominic Reber <71256590+domire8@users.noreply.github.com> Date: Wed, 28 Jun 2023 11:49:49 +0200 Subject: [PATCH 4/6] Fix CMakeLists with correct linking and install (#48) Co-authored-by: Louis Brunner --- .../communication_interfaces/CMakeLists.txt | 19 ++++++++++++++++--- .../communication_interfaces-config.cmake.in | 3 ++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/source/communication_interfaces/CMakeLists.txt b/source/communication_interfaces/CMakeLists.txt index 42ee54f..3c403d0 100644 --- a/source/communication_interfaces/CMakeLists.txt +++ b/source/communication_interfaces/CMakeLists.txt @@ -42,8 +42,6 @@ if (NOT cppzmq_POPULATED) # provided by parent CMakeLists.txt (if used) add_project_dependency(cppzmq 4.7.1 REQUIRED) endif() -include_directories(include) - add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCE_DIR}/src/sockets/UDPSocket.cpp ${PROJECT_SOURCE_DIR}/src/sockets/UDPClient.cpp @@ -55,7 +53,10 @@ add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCE_DIR}/src/sockets/TCPSocket.cpp ${PROJECT_SOURCE_DIR}/src/sockets/TCPClient.cpp ${PROJECT_SOURCE_DIR}/src/sockets/TCPServer.cpp) -target_include_directories(${PROJECT_NAME} PUBLIC include) +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ +) target_link_libraries(${PROJECT_NAME} PUBLIC cppzmq) install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) @@ -74,6 +75,18 @@ if(BUILD_TESTING) add_test(NAME test_${PROJECT_NAME} COMMAND test_${PROJECT_NAME}) endif() +# export the target and its associated config (includes, linked libraries, etc) +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) +install(EXPORT ${PROJECT_NAME}Targets + FILE ${PROJECT_NAME}Targets.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} +) # generate the version file for the config file write_basic_package_version_file( diff --git a/source/communication_interfaces/communication_interfaces-config.cmake.in b/source/communication_interfaces/communication_interfaces-config.cmake.in index cc4e2c5..f2d28d9 100644 --- a/source/communication_interfaces/communication_interfaces-config.cmake.in +++ b/source/communication_interfaces/communication_interfaces-config.cmake.in @@ -1,4 +1,5 @@ @PACKAGE_INIT@ include(CMakeFindDependencyMacro) -find_dependency(cppzmq) \ No newline at end of file +find_dependency(cppzmq) +include(${CMAKE_CURRENT_LIST_DIR}/communication_interfacesTargets.cmake) From 522eb13919f32b2c58cf3347de0999db37fa90e4 Mon Sep 17 00:00:00 2001 From: Dominic Reber <71256590+domire8@users.noreply.github.com> Date: Fri, 30 Jun 2023 09:11:18 +0200 Subject: [PATCH 5/6] Update docker-tag-from-git version (#49) --- .github/workflows/build-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 79a89d4..f49a194 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -16,7 +16,7 @@ jobs: tag: ${{ steps.parse-tag.outputs.tag }} steps: - uses: actions/checkout@v3 - - uses: aica-technology/.github/.github/actions/docker-tag-from-git@v0.5.0 + - uses: aica-technology/.github/.github/actions/docker-tag-from-git@v0.6.1 id: parse-tag build: From c4a4697a9985091d7a39bbada6a4f7e36227989a Mon Sep 17 00:00:00 2001 From: Dominic Reber Date: Thu, 20 Jul 2023 07:59:16 +0200 Subject: [PATCH 6/6] Update CHANGELOG and increase versions --- CHANGELOG.md | 12 ++++++++++++ cpp/CMakeLists.txt | 2 +- python/setup.py | 2 +- source/communication_interfaces/CMakeLists.txt | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee87578..9357b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,24 @@ Release Versions: +- [1.4.0](#140) +- [1.3.0](#130) - [1.2.0](#120) - [1.1.0](#110) - [1.0.0](#100) - [0.2.0](#020) - [0.1.0](#010) +## 1.4.0 + +Version 1.4.0 includes a first stable version of communication interfaces. + +## 1.3.0 + +Version 1.3.0 introduces the first version of the communication_interfaces library, which is a more standalone and +versatile alternative of network_interfaces for socket communication. It doesn't have dependencies on control libraries +or clproto. Additionally, the release includes automated builds for the CI. + ## 1.2.0 Version 1.2.0 is an update to support the latest release of diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 8abd8fd..e0acf1b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.15) -set (NETWORK_INTERFACES_VERSION 1.2.0) +set (NETWORK_INTERFACES_VERSION 1.4.0) project(network_interfaces VERSION ${NETWORK_INTERFACES_VERSION}) option(BUILD_TESTING "Build tests." OFF) diff --git a/python/setup.py b/python/setup.py index 5b7b36f..855abc3 100644 --- a/python/setup.py +++ b/python/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="network_interfaces", - version="1.2.0", + version="1.4.0", description="This package implements network interfaces of AICA", maintainer="Dominic Reber", maintainer_email="dominic@aica.tech", diff --git a/source/communication_interfaces/CMakeLists.txt b/source/communication_interfaces/CMakeLists.txt index 3c403d0..e419509 100644 --- a/source/communication_interfaces/CMakeLists.txt +++ b/source/communication_interfaces/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.15) -set(COMMUNICATION_INTERFACES_VERSION 0.0.1) +set(COMMUNICATION_INTERFACES_VERSION 0.0.2) project(communication_interfaces VERSION ${COMMUNICATION_INTERFACES_VERSION}) option(BUILD_TESTING "Build tests." OFF)