Skip to content

Commit

Permalink
Merge pull request eclipse-iceoryx#1559 from ApexAI/iox-#590-move-unu…
Browse files Browse the repository at this point in the history
…sed-classes-to-separate-package

iox-eclipse-iceoryx#590 Move unused and quality level 2 classes to separate packages
  • Loading branch information
mossmaurice authored Aug 8, 2022
2 parents faf1656 + e63815c commit be2272f
Show file tree
Hide file tree
Showing 121 changed files with 562 additions and 3,201 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,16 @@ Please see the dedicated [README.md](tools/docker/README.md) for information on
Please see the [Quality Declaration](./QUALITY_DECLARATION.md) for details of the quality measures according to ROS 2 guidelines.

|CMake project/target | Current Level | Target Level QNX | Target Level <br> Linux, Windows, macOS | Comment |
|-----------------------|:-------------:|:-----------------:|:---------------------------------------:|:-----------------------------------:|
| iceoryx_hoofs | 2 | 1+ | 1 | Except code in the namespace `aux` |
| iceoryx_posh | 2 | 1+, 2 | 1 | Except code in the namespace `aux` |
| iceoryx_binding_c | 2 | 1+ | 1 | |
| iceoryx_examples | 5 | 4 | 4 | All example code in this folder |
| iceoryx_dds | 4 | 4 | 4 | |
| iceoryx_introspection | 5 | 4 | 4 | |
| iceoryx_meta | 5 | 5 | 5 | |
|CMake project/target | Current Level | Target Level QNX | Target Level <br> Linux, Windows, macOS |
|-----------------------|:-------------:|:-----------------:|:---------------------------------------:|
| iceoryx_hoofs | 2 | 1+ | 1 |
| iceoryx_posh | 2 | 1+, 2 | 1 |
| iceoryx_dust | 2 | 2 | 2 |
| iceoryx_binding_c | 2 | 2 | 2 |
| iceoryx_examples | 5 | 4 | 4 |
| iceoryx_dds | 4 | 4 | 4 |
| iceoryx_introspection | 5 | 4 | 4 |
| iceoryx_meta | 5 | 5 | 5 |

Is something missing or you've got ideas for other nifty examples? Jump right away to the next section!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ package iceoryx_hoofs {

}
component posix <<namespace>>

' Building blocks which only meet quality level 5
' Can be analysed with tools/analyse_blacklisted_namespaces_in_binary.sh
' component aux <<namespace>>
}
}

Expand Down
5 changes: 5 additions & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
- Remove AtomicRelocatablePointer [\#1512](https://github.com/eclipse-iceoryx/iceoryx/issues/1512)
- `SignalHandler` returns an `expected` in `registerSignalHandler` [\#1196](https://github.com/eclipse-iceoryx/iceoryx/issues/1196)
- Remove the unused `PosixRights` struct [\#1556](https://github.com/eclipse-iceoryx/iceoryx/issues/1556)
- Moved quality level 2 classes to new package `iceoryx_dust` [\#590](https://github.com/eclipse-iceoryx/iceoryx/issues/590)
- Removed unused classes from `iceoryx_hoofs` [\#590](https://github.com/eclipse-iceoryx/iceoryx/issues/590)
- `cxx::PoorMansHeap`
- Other `internal` classes


**Workflow:**

Expand Down
2 changes: 1 addition & 1 deletion iceoryx_dds/source/gateway/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#include "iceoryx_dds/gateway/dds_to_iox.hpp"
#include "iceoryx_dds/gateway/iox_to_dds.hpp"
#include "iceoryx_dds/internal/log/logging.hpp"
#include "iceoryx_dust/posix_wrapper/signal_watcher.hpp"
#include "iceoryx_hoofs/cxx/helplets.hpp"
#include "iceoryx_hoofs/cxx/optional.hpp"
#include "iceoryx_hoofs/platform/signal.hpp"
#include "iceoryx_hoofs/posix_wrapper/signal_watcher.hpp"
#include "iceoryx_posh/gateway/gateway_config.hpp"
#include "iceoryx_posh/gateway/toml_gateway_config_parser.hpp"
#include "iceoryx_posh/runtime/posh_runtime.hpp"
Expand Down
29 changes: 29 additions & 0 deletions iceoryx_dust/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2022 by Apex.AI Inc. All rights reserved.
#
# Licensed 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-License-Identifier: Apache-2.0

load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
name = "iceoryx_dust",
srcs = glob([
"source/**/*.cpp",
"source/**/*.hpp",
]),
hdrs = glob(["include/**"]),
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = ["//iceoryx_hoofs"],
)
66 changes: 66 additions & 0 deletions iceoryx_dust/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright (c) 2022 by Apex.AI Inc. All rights reserved.
#
# Licensed 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-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.16)

set(IOX_VERSION_STRING "2.90.0")

project(iceoryx_dust VERSION ${IOX_VERSION_STRING})

find_package(iceoryx_hoofs REQUIRED)

include(IceoryxPackageHelper)
include(IceoryxPlatform)

if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
endif()

#
########## build iceoryx dust lib ##########
#

iox_add_library(
TARGET iceoryx_dust
NAMESPACE iceoryx_dust
PROJECT_PREFIX ${PREFIX}
PRIVATE_LIBS ${ICEORYX_SANITIZER_FLAGS}
PRIVATE_LIBS_LINUX ${CODE_COVERAGE_LIBS}
PUBLIC_LIBS iceoryx_hoofs::iceoryx_hoofs
BUILD_INTERFACE ${PROJECT_SOURCE_DIR}/include
INSTALL_INTERFACE include/${PREFIX}
FILES
source/cxx/file_reader.cpp
source/posix_wrapper/named_pipe.cpp
source/posix_wrapper/signal_watcher.cpp
source/posix_wrapper/message_queue.cpp
)

#
########## dust testing ##########
#

# Finding gtest and adding the subdirectories is split to support the use case of
# building the testing lib without the tests by providing gtest externally
if(NOT GTest_FOUND AND BUILD_TEST)
find_package(GTest CONFIG REQUIRED)
endif()

if(GTest_FOUND)
if(BUILD_TEST)
add_subdirectory(test)
endif()
endif()
18 changes: 18 additions & 0 deletions iceoryx_dust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Eclipse iceoryx dust overview

Similar to iceoryx hoofs `iceoryx_dust` (**D**eemed **u**seful **s**oftware **t**hingies) is a library for basic building blocks.
Compared to hoofs classes in `iceoryx_dust`, the difference is that the classes in dust only conform to quality level 2.

There are a wide variety of building blocks
grouped together in categories or namespace, depending on where or how they are used.

| class/file | description |
|:---------------------:|:------------------------------------------------------------------------------------------------------------------------|
|`forward_list` | Heap and exception free, relocatable implementation of `std::forward_list` |
|`ObjectPool` | Container which stores raw objects without calling the ctor of the objects. |
|`FileReader` | Wrapper for opening files and reading them. |
|`MessageQueue` | Interface for Message Queues, see [ManPage mq_overview](https://www.man7.org/linux/man-pages/man7/mq_overview.7.html). |
|`SignalWatcher` | Batteries included signal handling with polling and optional blocking wait for `SIGINT` and `SIGTERM`. |
|`NamedPipe` | Shared memory based ipc channel. Mainly a `UnixDomainSocket` replacement on Windows. |
|`relocatable_ptr` | |
25 changes: 25 additions & 0 deletions iceoryx_dust/cmake/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2020 by Robert Bosch GmbH All rights reserved.
#
# Licensed 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-License-Identifier: Apache-2.0

@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

find_dependency(iceoryx_hoofs)

include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
list(APPEND CMAKE_MODULE_PATH "@DESTINATION_CONFIGDIR@")
check_required_components("@PROJECT_NAME@")
25 changes: 25 additions & 0 deletions iceoryx_dust/cmake/iceoryx_dustConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
#
# Licensed 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-License-Identifier: Apache-2.0

#
########## dummyConfig.cmake to be able to use find_package with the source tree ##########
#

if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED)
message(STATUS "The package '${CMAKE_FIND_PACKAGE_NAME}' is used in source code version.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED true CACHE INTERNAL "")
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
24 changes: 24 additions & 0 deletions iceoryx_dust/cmake/iceoryx_dust_testingConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
#
# Licensed 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-License-Identifier: Apache-2.0

#
########## dummyConfig.cmake to be able to use find_package with the source tree ##########
#

if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED)
message(STATUS "The package '${CMAKE_FIND_PACKAGE_NAME}' is used in source code version.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED true CACHE INTERNAL "")
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_FILE_READER_FILE_READER_HPP
#define IOX_HOOFS_FILE_READER_FILE_READER_HPP
#ifndef IOX_DUST_FILE_READER_FILE_READER_HPP
#define IOX_DUST_FILE_READER_FILE_READER_HPP

#include <fstream>

Expand Down Expand Up @@ -75,4 +75,4 @@ class FileReader
} // namespace cxx
} // namespace iox

#endif // IOX_HOOFS_FILE_READER_FILE_READER_HPP
#endif // IOX_DUST_FILE_READER_FILE_READER_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_CXX_FORWARD_LIST_HPP
#define IOX_HOOFS_CXX_FORWARD_LIST_HPP
#ifndef IOX_DUST_CXX_FORWARD_LIST_HPP
#define IOX_DUST_CXX_FORWARD_LIST_HPP

#include "iceoryx_hoofs/cxx/helplets.hpp"

Expand Down Expand Up @@ -368,6 +368,6 @@ class forward_list
} // namespace cxx
} // namespace iox

#include "iceoryx_hoofs/internal/cxx/forward_list.inl"
#include "iceoryx_dust/internal/cxx/forward_list.inl"

#endif // IOX_HOOFS_CXX_FORWARD_LIST_HPP
#endif // IOX_DUST_CXX_FORWARD_LIST_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_OBJECTPOOL_OBJECTPOOL_HPP
#define IOX_HOOFS_OBJECTPOOL_OBJECTPOOL_HPP
#ifndef IOX_DUST_OBJECTPOOL_OBJECTPOOL_HPP
#define IOX_DUST_OBJECTPOOL_OBJECTPOOL_HPP

#include <cstddef> //for size_t
#include <cstdint>
Expand Down Expand Up @@ -451,4 +451,4 @@ class ObjectPool
} // namespace cxx
} // namespace iox

#endif // IOX_HOOFS_OBJECTPOOL_OBJECTPOOL_HPP
#endif // IOX_DUST_OBJECTPOOL_OBJECTPOOL_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_CXX_FORWARD_LIST_INL
#define IOX_HOOFS_CXX_FORWARD_LIST_INL
#ifndef IOX_DUST_CXX_FORWARD_LIST_INL
#define IOX_DUST_CXX_FORWARD_LIST_INL


#include "iceoryx_hoofs/cxx/forward_list.hpp"
#include "iceoryx_dust/cxx/forward_list.hpp"


namespace iox
Expand Down Expand Up @@ -619,4 +619,4 @@ inline void forward_list<T, Capacity>::errorMessage(const char* source, const ch
} // namespace cxx
} // namespace iox

#endif // IOX_HOOFS_CXX_FORWARD_LIST_INL
#endif // IOX_DUST_CXX_FORWARD_LIST_INL
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#define IOX_HOOFS_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#ifndef IOX_DUST_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#define IOX_DUST_POSIX_WRAPPER_MESSAGE_QUEUE_HPP

#include "iceoryx_hoofs/cxx/optional.hpp"
#include "iceoryx_hoofs/design_pattern/creation.hpp"
Expand Down Expand Up @@ -128,4 +128,4 @@ class MessageQueue : public DesignPattern::Creation<MessageQueue, IpcChannelErro
} // namespace posix
} // namespace iox

#endif // IOX_HOOFS_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#endif // IOX_DUST_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_POSIX_WRAPPER_NAMED_PIPE_HPP
#define IOX_HOOFS_POSIX_WRAPPER_NAMED_PIPE_HPP
#ifndef IOX_DUST_POSIX_WRAPPER_NAMED_PIPE_HPP
#define IOX_DUST_POSIX_WRAPPER_NAMED_PIPE_HPP

#include "iceoryx_hoofs/concurrent/lockfree_queue.hpp"
#include "iceoryx_hoofs/cxx/string.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
#define IOX_HOOFS_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
#ifndef IOX_DUST_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
#define IOX_DUST_POSIX_WRAPPER_SIGNAL_WATCHER_HPP

#include "iceoryx_hoofs/posix_wrapper/signal_handler.hpp"
#include "iceoryx_hoofs/posix_wrapper/unnamed_semaphore.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#define IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#ifndef IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#define IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP

#include <cstdint>
#include <type_traits>
Expand Down Expand Up @@ -144,6 +144,6 @@ bool operator!=(const relocatable_ptr<T>& lhs, const relocatable_ptr<T>& rhs) no
} // namespace rp
} // namespace iox

#include "iceoryx_hoofs/internal/relocatable_pointer/relocatable_ptr.inl"
#include "iceoryx_dust/relocatable_pointer/relocatable_ptr.inl"

#endif // IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#endif // IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
Loading

0 comments on commit be2272f

Please sign in to comment.