iceoryx v2.0.0🔗
v2.0.0 (2022-03-14)🔗
Features:
- block publisher when subscriber queue full #615
- extend chunk header for gateways and recompute #711
- Basic Windows 10 support #33
- Common puml file for common settings #865
- Relocatable Pointers - Version 2.0 #926
- Implement
waitForTerminationRequest
#973 - Partial enable iceoryx building with msvc2015+clang #965
- C binding for posh configuration #930
- Enhance MacOS performance with timed{send,receive} functionality in unix domain socket#903
- Multi-Publisher support for DDS gateway and generic gateway class #900
- Replace
iox-gw-iceoryx2dds
andiox-gw-dds2iceoryx
gateways withiox-dds-gateway
#900 - Enhance
posixCall
#805 - Git Hooks on iceoryx #486
- static memory alternative for std::function #391
- Adding support for Helix QAC 2021.1 #755 thanks to @toniglandy1
- Axivion analysis on CI #409
- Cpptoml can be provided by an external source #951
- Extend
cxx::optional
constructor for in place construction so that copy/move for values inside the optional even could be deleted #967 - Add templated
from
/into
free functions to formalize conversions from enums and other types #992 UniqueId
class for unique IDs within a process #1010- Add
requirePublisherHistorySupport
option at subscriber side (if set to true requires historyCapacity > 0 to be eligible for connection) #1029, #1278 - Add
/tools/scripts/ice_env.sh
shell script to provide simple access to docker containers for CI debugging #1049 - Introduce
cxx::FunctionalInterface
to enrich nullable classes withand_then
,or_else
,value_or
,expect
#996 - Add C++17
std::perms
ascxx::perms
toiceoryx_hoofs/cxx/filesystem.hpp
. #1059 - Support FreeBSD as a representative for the UNIX platforms #1054
- Add event parameter to
findService
method #415 - Implement stream operator for
ChunkReceiveResult
andAllocationError
to be able to use it with ostream and LogStream #1062 - Replace IPC-channel-based
findService
with pub/sub-based on #415 - Add
findService
method toServiceDiscovery
which applies a callable to all matching services #1105 - Increase limits of
ServiceRegistry
to support the maximum number of publishers and servers that are configured iniceoryx_posh_types.hpp
#1074 - C binding for service discovery #1142
- Introduce
iox::popo::MessagingPattern
tofindService
to allow separate searches for publishers (MessagingPattern::PUB_SUB
) and servers (iox::popo::MessagingPattern::REQ_RES
) #27 - Request/Response communication with iceoryx #27
- Set
MAX_NUMBER_OF_NOTIFIERS
to 256 and prepare configuration via CMake#1144 - Reorganize code in publisher.hpp/.inl and subscriber.hpp/inl #1173
- Install headers to
include/iceoryx/vX.Y.Z
by default and add CMake optionMAKE_UNIQUE_INCLUDEDIR
to control the behavior #1194
Bugfixes:
- Analyse suppressed errors of AddressSanitizer, LeakSanitizer & UndefinedBehaviorSanitizer #423
- CMake file duplicate option in build_options.cmake #709 thanks to @ZhenshengLee
- SharedChunk should internally store an absolute pointer #713
- loanPreviousChunk is broken #729
- Runtime Error in SubscriberImpl #714
- Wrong Values of iox-cpp-subscriber and iox-cpp-publisher #781
- CMake fails during googletest step with gcc 11.1.0 #798
- NewType Copy-Assign raises compiler warning on GCC 8.4.0 #282
- Apply noexcept all the things rule to posh, hoofs and binding_c #916
- Doxygen shows wrong include paths #922
find_package(iceoryx_posh)
fails #944 thanks to @ijnek- iox-roudi report error when running in docker #946
- compile error: duration.inl - duration literals are not found (Windows) #1078
cxx::string
initialization with nullptr leads to segfault #1108- Fix support for libc++ on clang #905
- Fix warnings for gcc-11.1 #838
- Incremental builds with the build script are broken #821
- Compile failed because of missing
<limits>
for GCC 11 #811 thanks to @homalozoa - Unable to build cyclone dds
idlpp-cxx
#736 - Fix format string issues with introspection client #960 thanks to @roehling
- Add support for Multi-Arch install destinations #961 thanks to @roehling
- Fix a few misspellings in log messages #962 thanks to @roehling
- Fix typos in goals/non-goals document #968 thanks to @ fb913bf0de288ba84fe98f7a23d35edfdb22381
- Catch deserialization errors for enums in publisher and subscriber options #989
- Fix linker error on QNX #1013
- When posix mutex fails a correct error message is reported on the console #999
- Only use
std::result_of
for C++14 to be able to use iceoryx in C++20 projects #1076 - Set stack size for windows in
singleprocess
example and posh tests #1082 - Roudi console timestamps are out of date #1130
- Application can't create publisher repeatedly with previous one already destroyed #938
- Prevent creation of
popo::Publisher
's with internalServiceDescription
#1120 - RelativePointer is now type safe, i.e. can only be constructed from pointers with a valid convertion to the raw pointer #1121
- Clamping
historyRequest
toqueueCapacity
#1192 - C binding storage sizes do not match for multiple OS's and architectures #1218
- Update cyclone dds version used by gateway to support aarch64 #1223
- The file lock posix wrapper unlocks and removes a file correctly #1216
- Minor fixes for the examples #743
- Fix race condition in Windows platform semaphore/mutex posix implementation #1271
- Fix race condition in Windows platform HandleTranslator #1264
- Fix race condition in Windows platform shared memory implementation #1269
Refactoring:
- implement Module-Tests for smart_lock #588
- improve Helix QAC parsing coverage #759 thanks to @toniglandy1
- Write "ROS 2" with a space between "ROS" and "2" #762 thanks to @christophebedard
- Enforce unix line endings #794
- Rename utils to hoofs #790
- Cleanup MemoryProvider and MemoryBlock #842
- Remove #define private public from all tests #529
- Write example on how to use iceoryx in a docker environment #924
- Allow cpptoml to be provided externally and not vendored by CMake #950 thanks to @photex
- Reworked iceoryx examples #482
- Handle nullptr callbacks in waitset and listener #932
- Add CI job that checks formatting with clang-format #887
- Add clang-tidy rules for iceoryx_hoofs #889
- Consolidate CI jobs in one workflow #891
- Move all tests into an anonymous namespace #563
- Refactor
smart_c
to use contract by design and expected #418 PoshRuntime
Mock #449- Clean-up Doxygen for dds #583
- Rename utils to hoofs #790
- plantuml in design documentation #787
- Refine quality levels #425
- Clean-up std::terminate usage #261
- Add Quality Declaration Document #910
- Make
cxx::string::capacity
astatic
method #979 - Restructure iceoryx tools #471
- Use cxx::expected for MemoryManager::getChunk #954
- Upgrade GTest/GMock to v1.10 #841
- Remove the requirement for INVALID_STATE for the cxx::expected #987
- Add unique test identifers #988
- Remove
ApplicationPort
andApplicationPortData
classes #415 - Remove creation pattern from
MemoryMap
and replace it withMemoryMapBuilder
#1036 - Fix error handling of
TypedUniqueId
and refactor it toUniquePortId
#861 - Updating Codecov API and enforce CMake version 3.16 for building iceoryx #774 and #1031
- Remove
InvalidIdString
andisValid()
fromServiceDescription
, replace Wildcard string withiox::cxx::nullopt
#415 - Remove creation pattern from
SharedMemory
and replace it withSharedMemoryBuilder
#1036 - Remove the leading slash requirement from the name of a shared memory in
SharedMemory
andSharedMemoryObject
#439
New API features:
-
Introduce
iceoryx_hoofs/cxx/filesystem.hpp
which implementsstd::perms
ascxx::perms
.#include "iceoryx_hoofs/cxx/filesystem.hpp" // ... cxx::perms filePermissions; filePermissions = cxx::perms::owner_read | cxx::perms::group_write; std::cout << filePermissions << std::endl;
API Breaking Changes:
-
The CMake files in iceoryx expect to have CMake version 3.16 or greater installed, otherwise the build fails. (Hint: Ubuntu 18 users can install
cmake-mozilla
from the universe repository provided by Canonical) -
Dependency for building the
iceoryx_dds
gateway changed fromopenjdk
(Java) tobison
-
Change include from
iceoryx_hoofs/cxx/helplets.hpp
toiceoryx_hoofs/cxx/requires.hpp
when usingcxx::Expects
orcxx::Ensures
// before #include "iceoryx_hoofs/cxx/helplets.hpp" iox::cxx::Expects(someCondition); iox::cxx::Ensures(anotherCondition); // after #include "iceoryx_hoofs/cxx/requires.hpp" iox::cxx::Expects(someCondition); iox::cxx::Ensures(anotherCondition);
-
Replace Creation pattern from
MemoryMap
withMemoryMapBuilder
.// before auto memoryMapResult = posix::MemoryMap::create(baseAddress, length, fileDescriptor, accessMode, flags, offset); // after auto memoryMapResult = posix::MemoryMapBuilder().baseAddressHint(baseAddress) .length(length).fileDescriptor(fileDescriptor) .accessMode(accessMode).flags(flags) .offset(0).create();
-
Rename utils to hoofs:
In CMake you need now to find and link the package
iceoryx_hoofs
instead oficeoryx_utils
# before find_package(iceoryx_utils REQUIRED) target_link_libraries(${target} iceoryx_utils::iceoryx_utils) # after find_package(iceoryx_hoofs REQUIRED) target_link_libraries(${target} iceoryx_hoofs::iceoryx_hoofs)
The include paths for
iceoryx_utils
are nowiceoryx_hoofs
// before #include "iceoryx_utils/cxx/string.hpp" // after #include "iceoryx_hoofs/cxx/string.hpp"
-
Refactoring SmartC:
- Renaming SmartC wrapper to posixCall.
- Removed
getErrorString()
from posixCall, please usegetHumanReadableErrnum()
instead. - Enhanced posixCall to handle a common case were multiple errnos are ignored just to suppress error logging
// before #include "iceoryx_utils/cxx/smart_c.hpp" auto unlinkCallPublisher = iox::cxx::makeSmartC( unlink, iox::cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {ERROR_CODE}, {ENOENT}, sockAddrPublisher.sun_path); if (unlinkCallPublisher.hasErrors()) { std::cout << "unlink error" << std::endl; exit(1); } // after #include "iceoryx_utils/posix_wrapper/posix_call.hpp" iox::posix::posixCall(unlink)(sockAddrPublisher.sun_path) .failureReturnValue(ERROR_CODE) .ignoreErrnos(ENOENT, EBUSY) // can be a comma-separated list of errnos .evaluate() .or_else([](auto& r) { std::cout << "unlink error " << r.getHumanReadableErrnum() << std::endl; exit(1); });
-
Refactoring of
ServiceDescription
- A
ServiceDescription
is now only string-based and no more wildcards are allowed. - A well-defined
ServiceDescription
consists of three non-empty strings.
// before ServiceDescription myServiceDescription1(1U, 2U, 3U); ServiceDescription myServiceDescription3("First", "Second"); ServiceDescription myServiceDescription3(iox::capro::AnyServiceString, iox::capro::AnyInstanceString, iox::capro::AnyEventString); // after ServiceDescription myServiceDescription1("Foo", "Bar", "Baz"); ServiceDescription myServiceDescription2("First", "Second", "DontCare"); ServiceDescription myServiceDescription3("Foo", "Bar", "Baz");
- A
-
Instead of using a constructor a
ServiceDescription
is now deserialized via a static method with error handling:// before iox::cxx::Serialization serializedObj; iox::capro::ServiceDescription service(serializedObj); // after iox::cxx::Serialization serialisedObj; capro::ServiceDescription::deserialize(serialisedObj) .and_then([](auto& value){ // Do something with the deserialized object }) .or_else([](auto& error){ // Handle the error });
-
The
InvalidIdString
was removed fromServiceDescription
and the Wildcard string was replaced with aiox::cxx::nullopt
. With this, every string is allowed within theServiceDescription
. The defaultServiceDescription
consists of empty strings. -
The service-related methods have been moved from
PoshRuntime
toServiceDiscovery
. TheofferService
andstopOfferService
methods have been removed andfindService
has now an additional event parameter. Furthermore it requires a function to be provided which is applied to eachServiceDescription
in the search result (and can be used to collect them in a container etc.).
The iox::popo::MessagingPattern
parameter allows to search publishers (PUB_SUB
) or
servers (REQ_RES
).
```cpp
// before
#include "iceoryx_posh/runtime/posh_runtime.hpp"
poshRuntime.offerService(myServiceDescription);
poshRuntime.stopOfferService(myServiceDescription);
poshRuntime.findService({"ServiceA", iox::capro::AnyInstanceString});
// after
#include "iceoryx_posh/runtime/service_discovery.hpp"
void printSearchResult(const iox::capro::ServiceDescription& service)
{
std::cout << "- " << service << std::endl;
}
serviceDiscovery.findService("ServiceA", Wildcard, Wildcard, printSearchResult, iox::popo::MessagingPattern::PUB_SUB);
```
-
The following classes have now an constructor marked as
explicit
:explicit DeadlineTimer(const iox::units::Duration timeToWait); explicit GenericRAII(const std::function<void()>& cleanupFunction); explicit mutex(const bool f_isRecursive); explicit PosixUser(const uid_t f_id); explicit PosixUser(const string_t& f_name);
-
Renaming in
FileReader
class and logging of iceoryx_hoofs// before iox::cxx::FileReader reader("filename"); std::string str; if(reader.IsOpen()) { reader.ReadLine(str); } static auto& logger = CreateLogger("", "", iox::log::LogManager::GetLogManager().DefaultLogLevel()); // after iox::cxx::FileReader reader("filename"); std::string str; if(reader.isOpen()) { reader.readLine(str); } static auto& logger = createLogger("", "", iox::log::LogManager::GetLogManager().DefaultLogLevel());
-
The
iox::cxx::expected
has dropped the requirement forINVALID_STATE
. With this, theErrorTypeAdapter
which was necessary for non enum types was also removed. The specialization ofErrorTypeAdapter
for custom types must therefore also be removed in the user code. -
The queue port policy enums are adjusted to use them with
Client
andServer
. -
The
QueueFullPolicy::BLOCK_PUBLISHER
is replaced with the more genericQueueFullPolicy::BLOCK_PRODUCER
.// old iox::popo::SubscriberOptions options; options.queueFullPolicy = iox::popo::QueueFullPolicy::BLOCK_PUBLISHER; // new iox::popo::SubscriberOptions options; options.queueFullPolicy = iox::popo::QueueFullPolicy::BLOCK_PRODUCER;
Similar, for
binding_c
it isQueueFullPolicy_BLOCK_PRODUCER
instead ofQueueFullPolicy_BLOCK_PUBLISHER
// old iox_sub_options_t options; iox_sub_options_init(&options); options.queueFullPolicy = QueueFullPolicy_BLOCK_PUBLISHER; // new iox_sub_options_t options; iox_sub_options_init(&options); options.queueFullPolicy = QueueFullPolicy_BLOCK_PRODUCER;
-
The
SubscriberTooSlowPolicy
is replaced with the more genericConsumerTooSlowPolicy
andSubscriberTooSlowPolicy::WAIT_FOR_SUBSCRIBER
becameConsumerTooSlowPolicy::WAIT_FOR_CONSUMER
.// old iox::popo::PublisherOptions options; options.subscriberTooSlowPolicy = iox::popo::SubscriberTooSlowPolicy::WAIT_FOR_SUBSCRIBER; // new iox::popo::PublisherOptions options; options.subscriberTooSlowPolicy = iox::popo::ConsumerTooSlowPolicy::WAIT_FOR_CONSUMER;
And with the
binding_c
// old iox_pub_options_t options; iox_pub_options_init(&options); options.subscriberTooSlowPolicy = SubscriberTooSlowPolicy_WAIT_FOR_SUBSCRIBER; // new iox_pub_options_t options; iox_pub_options_init(&options); options.subscriberTooSlowPolicy = ConsumerTooSlowPolicy_WAIT_FOR_CONSUMER;
-
The
CaproMessageSubType
enum is renamed toCaproServiceType
and the values are renamed fromNOSUBTYPE
,SERVICE
,EVENT
andFIELD
toNONE
,PUBLISHER
andSERVER
. This change only affectsInterfacePorts
which used this enum to communicate whether theCaproMessage
was from aSERVICE
,EVENT
orFIELD
. This was quite ara::com specific and with the introduction of theServerPort
changes were needed. The distinction between aFIELD
and anEVENT
can be made by checkingCaproMessage::m_historyCapacity
.// old caproMessage.m_subType = CaproMessageSubType::EVENT; // new caproMessage.m_serviceType = CaproServiceType::PUBLISHER;