diff --git a/CMakeLists.txt b/CMakeLists.txt index b9336a8a..3518e41f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,8 @@ set(UCLIENT_HARD_LIVELINESS_CHECK_TIMEOUT 10000 CACHE STRING "Set the hard livel # Off-standard features and tweaks option(UCLIENT_TWEAK_XRCE_WRITE_LIMIT "This feature uses a tweak to allow XRCE WRITE DATA submessages grater than 64 kB." ON) +set(UCLIENT_C_STANDARD 99 CACHE STRING "Version of the C language used to build the library") + ############################################################################### # Dependencies ############################################################################### @@ -90,7 +92,7 @@ list(APPEND _deps "microcdr\;${_microcdr_version}") ############################################################################### set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) if(NOT UCLIENT_SUPERBUILD) - project(microxrcedds_client VERSION "2.3.0" LANGUAGES C) + project(microxrcedds_client VERSION "2.4.0" LANGUAGES C) else() project(uclient_superbuild NONE) include(${PROJECT_SOURCE_DIR}/cmake/SuperBuild.cmake) @@ -144,6 +146,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") set(UCLIENT_PLATFORM_LINUX ON) elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(UCLIENT_PLATFORM_WINDOWS ON) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(UCLIENT_PLATFORM_MACOS ON) elseif(CMAKE_SYSTEM_NAME STREQUAL "Generic") if(PLATFORM_NAME STREQUAL "nuttx") set(UCLIENT_PLATFORM_NUTTX ON) @@ -158,7 +162,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Generic") endif() endif() -if(UCLIENT_PLATFORM_LINUX OR UCLIENT_PLATFORM_NUTTX OR UCLIENT_PLATFORM_ZEPHYR) +if(UCLIENT_PLATFORM_LINUX OR UCLIENT_PLATFORM_MACOS OR UCLIENT_PLATFORM_NUTTX OR UCLIENT_PLATFORM_ZEPHYR) set(UCLIENT_PLATFORM_POSIX ON) endif() @@ -319,7 +323,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} C_STANDARD - 99 + ${UCLIENT_C_STANDARD} C_STANDARD_REQUIRED YES POSITION_INDEPENDENT_CODE diff --git a/include/uxr/client/core/session/create_entities_ref.h b/include/uxr/client/core/session/create_entities_ref.h index 7b4afd35..4049e5d6 100644 --- a/include/uxr/client/core/session/create_entities_ref.h +++ b/include/uxr/client/core/session/create_entities_ref.h @@ -51,7 +51,7 @@ UXRDLLAPI uint16_t uxr_buffer_create_participant_ref( uxrSession* session, uxrStreamId stream_id, uxrObjectId object_id, - int16_t domain_id, + uint16_t domain_id, const char* ref, uint8_t mode); diff --git a/include/uxr/client/core/session/session.h b/include/uxr/client/core/session/session.h index e93fee69..d319fcc4 100644 --- a/include/uxr/client/core/session/session.h +++ b/include/uxr/client/core/session/session.h @@ -122,7 +122,7 @@ typedef void (* uxrOnRequestFunc) ( * @param reply_id Identifier of the reply. * @param ub Serialized request data. * @param length Length of the serialized data. - * @param args User pointer data. + * @param args User pointer data. */ typedef void (* uxrOnReplyFunc) ( struct uxrSession* session, @@ -136,6 +136,7 @@ typedef void (* uxrOnReplyFunc) ( /** * @brief Function signature used for flush_callback callbacks. * @param session Session structure related to the buffer to be flushed. + * @param args Flush callback args pointer. */ typedef bool (* uxrOnBuffersFull) ( struct uxrSession* session, diff --git a/src/c/core/session/create_entities_ref.c b/src/c/core/session/create_entities_ref.c index f64cfeaf..ec131c93 100644 --- a/src/c/core/session/create_entities_ref.c +++ b/src/c/core/session/create_entities_ref.c @@ -20,7 +20,7 @@ uint16_t uxr_buffer_create_participant_ref( uxrSession* session, uxrStreamId stream_id, uxrObjectId object_id, - int16_t domain_id, + uint16_t domain_id, const char* ref, uint8_t mode) { @@ -28,7 +28,7 @@ uint16_t uxr_buffer_create_participant_ref( CREATE_Payload payload; payload.object_representation.kind = DDS_XRCE_OBJK_PARTICIPANT; - payload.object_representation._.participant.domain_id = domain_id; + payload.object_representation._.participant.domain_id = (int16_t)domain_id; return create_entity_ref(session, stream_id, object_id, ref, mode, &payload); } diff --git a/src/c/core/session/session.c b/src/c/core/session/session.c index d0a37ef0..45900b1a 100644 --- a/src/c/core/session/session.c +++ b/src/c/core/session/session.c @@ -1269,4 +1269,4 @@ bool run_session_until_sync( } while (remaining_time > 0 && !session->synchronized); return session->synchronized; -} \ No newline at end of file +} diff --git a/utils/doxygen/pages/DoxygenLayout.xml b/utils/doxygen/pages/DoxygenLayout.xml index 247ac176..0400b448 100644 --- a/utils/doxygen/pages/DoxygenLayout.xml +++ b/utils/doxygen/pages/DoxygenLayout.xml @@ -18,8 +18,7 @@ - - +