You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently one needs to provide all headers for all platform, even if they are simply forwarding to the system header. This can be simplified by the C++17 feature __has_include
Detailed information
The platform would provide a generic implementation of the header. If the specific platform does not provide a custoom header, the generic one would be used.
This is an example for iceoryx_platform/include/iox/platform/semaphor.hpp
For Linux, Unix, QNX and potentially other POSIX operating systems it would work out of the box.
FreeRTOS would specify a iceoryx_platform/freertos/include/iox/platform/override/semaphore.hpp header and partially reuse the generic header
#ifndef IOX_PLATFORM_FREERTOS_SEMAPHORE_HPP
#defineIOX_PLATFORM_FREERTOS_SEMAPHORE_HPP
#defineSEM_FAILEDnullptr
#defineIOX_PLATFORM_OVERRIDE_SEM_UNLINK
#include"iox/platform/generic/semaphore.hpp"inlineintiox_sem_unlink(constchar*)
{
// Named semaphores are not supported in FreeRTOS+POSIXconfigASSERT(false);
return0;
}
#endif// IOX_PLATFORM_FREERTOS_SEMAPHORE_HPP
Windows (and macOS) would have a full re-implementation in iceoryx_platform/windows/iox/platform/override/semaphore.hpp
#ifndef IOX_PLATFORM_WINDOWS_SEMAPHORE_HPP
#defineIOX_PLATFORM_WINDOWS_SEMAPHORE_HPP// fully custom implementation without using the generic header
#endif// IOX_PLATFORM_WINDOWS_SEMAPHORE_HPP
To use an out-of-tree platform one just needs to specify the path to iceoryx_platform/os/ like it is nowadays but it would be much simpler to add an maintain a platform which is mostly compatible with the generic platform.
Brief feature description
Currently one needs to provide all headers for all platform, even if they are simply forwarding to the system header. This can be simplified by the C++17 feature
__has_include
Detailed information
The platform would provide a generic implementation of the header. If the specific platform does not provide a custoom header, the generic one would be used.
This is an example for
iceoryx_platform/include/iox/platform/semaphor.hpp
The generic implementation in
iceoryx_platform/generic/include/iox/platform/generic/semaphore.hpp
would look like thisFor Linux, Unix, QNX and potentially other POSIX operating systems it would work out of the box.
FreeRTOS would specify a
iceoryx_platform/freertos/include/iox/platform/override/semaphore.hpp
header and partially reuse the generic headerWindows (and macOS) would have a full re-implementation in
iceoryx_platform/windows/iox/platform/override/semaphore.hpp
To use an out-of-tree platform one just needs to specify the path to
iceoryx_platform/os/
like it is nowadays but it would be much simpler to add an maintain a platform which is mostly compatible with the generic platform.Tasks
website/advanced/custom-iceoryx-platform.md
The text was updated successfully, but these errors were encountered: