diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/client.h b/iceoryx_binding_c/include/iceoryx_binding_c/client.h index 7d8666af0d..314ebe00c4 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/client.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/client.h @@ -38,10 +38,10 @@ typedef struct bool connectOnCreate; /// @brief Sets whether the server blocks when the client response queue is full - IOX_ENUM iox_QueueFullPolicy responseQueueFullPolicy; + enum iox_QueueFullPolicy responseQueueFullPolicy; /// @brief Sets whether the client blocks when the server request queue is full - IOX_ENUM iox_ConsumerTooSlowPolicy serverTooSlowPolicy; + enum iox_ConsumerTooSlowPolicy serverTooSlowPolicy; /// @brief this value will be set exclusively by 'iox_client_options_init' and is not supposed to be modified /// otherwise @@ -87,9 +87,8 @@ void iox_client_deinit(iox_client_t const self); /// describes the error /// @note for the user-payload alignment 'IOX_C_CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT' is used /// for a custom user-payload alignment please use 'iox_client_loan_aligned_request' -IOX_ENUM iox_AllocationResult iox_client_loan_request(iox_client_t const self, - void** const payload, - const uint64_t payloadSize); +enum iox_AllocationResult +iox_client_loan_request(iox_client_t const self, void** const payload, const uint64_t payloadSize); /// @brief allocates a request in the shared memory with a custom alignment for the user-payload /// @param[in] self handle of the client @@ -98,10 +97,10 @@ IOX_ENUM iox_AllocationResult iox_client_loan_request(iox_client_t const self, /// @param[in] payloadAlignment user-payload alignment of the allocated request /// @return on success it returns AllocationResult_SUCCESS otherwise a value which /// describes the error -IOX_ENUM iox_AllocationResult iox_client_loan_aligned_request(iox_client_t const self, - void** const payload, - const uint64_t payloadSize, - const uint32_t payloadAlignment); +enum iox_AllocationResult iox_client_loan_aligned_request(iox_client_t const self, + void** const payload, + const uint64_t payloadSize, + const uint32_t payloadAlignment); /// @brief releases ownership of a previously allocated loaned request without sending it @@ -114,7 +113,7 @@ void iox_client_release_request(iox_client_t const self, void* const payload); /// @param[in] payload pointer to the user-payload of the request which should be send /// @return on success it returns ClientSendResult_SUCCESS otherwise a value which /// describes the error -IOX_ENUM iox_ClientSendResult iox_client_send(iox_client_t const self, void* const payload); +enum iox_ClientSendResult iox_client_send(iox_client_t const self, void* const payload); /// @brief connects to the service /// @param[in] self handle to the client @@ -128,14 +127,14 @@ void iox_client_disconnect(iox_client_t const self); /// @param[in] self handle to the client /// @return ConnectionState_CONNECTED when successfully connected otherwise an enum which /// describes the current state -IOX_ENUM iox_ConnectionState iox_client_get_connection_state(iox_client_t const self); +enum iox_ConnectionState iox_client_get_connection_state(iox_client_t const self); /// @brief retrieve a received respone /// @param[in] self handle to the client /// @param[in] payload pointer in which the pointer to the user-payload of the response is stored /// @return if a chunk could be received it returns ChunkReceiveResult_SUCCESS otherwise /// an enum which describes the error -IOX_ENUM iox_ChunkReceiveResult iox_client_take_response(iox_client_t const self, const void** const payload); +enum iox_ChunkReceiveResult iox_client_take_response(iox_client_t const self, const void** const payload); /// @brief release a previously acquired response (via iox_client_take_response) /// @param[in] self handle to the client diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_binding.h b/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_binding.h index b05981f0e7..a30a218441 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_binding.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_binding.h @@ -22,7 +22,6 @@ #include #define IOX_CLASS class -#define IOX_ENUM #else @@ -30,7 +29,6 @@ #include #define IOX_CLASS struct -#define IOX_ENUM enum #endif diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_enum_translation.hpp b/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_enum_translation.hpp index 5d51f1aa26..3b444d2eb3 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_enum_translation.hpp +++ b/iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_enum_translation.hpp @@ -24,8 +24,8 @@ namespace c2cpp { -iox::popo::ConsumerTooSlowPolicy consumerTooSlowPolicy(const IOX_ENUM iox_ConsumerTooSlowPolicy policy) noexcept; -iox::popo::QueueFullPolicy queueFullPolicy(const IOX_ENUM iox_QueueFullPolicy policy) noexcept; +iox::popo::ConsumerTooSlowPolicy consumerTooSlowPolicy(const enum iox_ConsumerTooSlowPolicy policy) noexcept; +iox::popo::QueueFullPolicy queueFullPolicy(const enum iox_QueueFullPolicy policy) noexcept; iox::popo::SubscriberEvent subscriberEvent(const iox_SubscriberEvent value) noexcept; iox::popo::SubscriberState subscriberState(const iox_SubscriberState value) noexcept; diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/listener.h b/iceoryx_binding_c/include/iceoryx_binding_c/listener.h index 51c7f382a1..88e337533b 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/listener.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/listener.h @@ -44,10 +44,10 @@ void iox_listener_deinit(iox_listener_t const self); /// @param[in] subscriberEvent the event which should trigger the listener /// @param[in] callback the callback which is called when an event triggers the listener /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult iox_listener_attach_subscriber_event(iox_listener_t const self, - iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent, - void (*callback)(iox_sub_t)); +enum iox_ListenerResult iox_listener_attach_subscriber_event(iox_listener_t const self, + iox_sub_t const subscriber, + const enum iox_SubscriberEvent subscriberEvent, + void (*callback)(iox_sub_t)); /// @brief Attaches a subscriber event to the listener. The callback has an additional contextData argument to provide /// access to user defined data. @@ -57,10 +57,10 @@ IOX_ENUM iox_ListenerResult iox_listener_attach_subscriber_event(iox_listener_t /// @param[in] callback the callback which is called when an event triggers the listener /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult +enum iox_ListenerResult iox_listener_attach_subscriber_event_with_context_data(iox_listener_t const self, iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent, + const enum iox_SubscriberEvent subscriberEvent, void (*callback)(iox_sub_t, void*), void* const contextData); @@ -69,9 +69,9 @@ iox_listener_attach_subscriber_event_with_context_data(iox_listener_t const self /// @param[in] userTrigger user trigger which emits the event /// @param[in] callback the callback which is called when the user trigger triggers the listener /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult iox_listener_attach_user_trigger_event(iox_listener_t const self, - iox_user_trigger_t const userTrigger, - void (*callback)(iox_user_trigger_t)); +enum iox_ListenerResult iox_listener_attach_user_trigger_event(iox_listener_t const self, + iox_user_trigger_t const userTrigger, + void (*callback)(iox_user_trigger_t)); /// @brief Attaches a user trigger to the listener. The callback has an additional contextData argument to provide /// access to user defined data. @@ -80,11 +80,11 @@ IOX_ENUM iox_ListenerResult iox_listener_attach_user_trigger_event(iox_listener_ /// @param[in] callback the callback which is called when the user trigger triggers the listener /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult -iox_listener_attach_user_trigger_event_with_context_data(iox_listener_t const self, - iox_user_trigger_t const userTrigger, - void (*callback)(iox_user_trigger_t, void*), - void* const contextData); +enum iox_ListenerResult iox_listener_attach_user_trigger_event_with_context_data(iox_listener_t const self, + iox_user_trigger_t const userTrigger, + void (*callback)(iox_user_trigger_t, + void*), + void* const contextData); /// @brief Detaches a subscriber event from the listener /// @param[in] self listener from which the event should be detached @@ -92,7 +92,7 @@ iox_listener_attach_user_trigger_event_with_context_data(iox_listener_t const se /// @param[in] subscriberEvent the subscriber event which is registered at the listener void iox_listener_detach_subscriber_event(iox_listener_t const self, iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent); + const enum iox_SubscriberEvent subscriberEvent); /// @brief Detaches a user trigger from the listener /// @param[in] self listener from which the event should be detached @@ -116,10 +116,10 @@ uint64_t iox_listener_capacity(iox_listener_t const self); /// @param[in] clientEvent the event which should trigger the listener /// @param[in] callback the callback which is called when an event triggers the listener /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult iox_listener_attach_client_event(iox_listener_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent, - void (*callback)(iox_client_t)); +enum iox_ListenerResult iox_listener_attach_client_event(iox_listener_t const self, + iox_client_t const client, + const enum iox_ClientEvent clientEvent, + void (*callback)(iox_client_t)); /// @brief Attaches a client event to the listener. The callback has an additional contextData argument to provide /// access to user defined data. @@ -129,12 +129,11 @@ IOX_ENUM iox_ListenerResult iox_listener_attach_client_event(iox_listener_t cons /// @param[in] callback the callback which is called when an event triggers the listener /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult -iox_listener_attach_client_event_with_context_data(iox_listener_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent, - void (*callback)(iox_client_t, void*), - void* const contextData); +enum iox_ListenerResult iox_listener_attach_client_event_with_context_data(iox_listener_t const self, + iox_client_t const client, + const enum iox_ClientEvent clientEvent, + void (*callback)(iox_client_t, void*), + void* const contextData); /// @brief Detaches a client from the listener /// @param[in] self listener from which the event should be detached @@ -142,7 +141,7 @@ iox_listener_attach_client_event_with_context_data(iox_listener_t const self, /// @param[in] clientEvent the event which should be removed from the listener void iox_listener_detach_client_event(iox_listener_t const self, iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent); + const enum iox_ClientEvent clientEvent); /// @brief Attaches a server event to the listener /// @param[in] self listener to which the event should be attached to @@ -150,10 +149,10 @@ void iox_listener_detach_client_event(iox_listener_t const self, /// @param[in] serverEvent the event which should trigger the listener /// @param[in] callback the callback which is called when an event triggers the listener /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult iox_listener_attach_server_event(iox_listener_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent, - void (*callback)(iox_server_t)); +enum iox_ListenerResult iox_listener_attach_server_event(iox_listener_t const self, + iox_server_t const server, + const enum iox_ServerEvent serverEvent, + void (*callback)(iox_server_t)); /// @brief Attaches a server event to the listener. The callback has an additional contextData argument to provide /// access to user defined data. @@ -163,12 +162,11 @@ IOX_ENUM iox_ListenerResult iox_listener_attach_server_event(iox_listener_t cons /// @param[in] callback the callback which is called when an event triggers the listener /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult -iox_listener_attach_server_event_with_context_data(iox_listener_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent, - void (*callback)(iox_server_t, void*), - void* const contextData); +enum iox_ListenerResult iox_listener_attach_server_event_with_context_data(iox_listener_t const self, + iox_server_t const server, + const enum iox_ServerEvent serverEvent, + void (*callback)(iox_server_t, void*), + void* const contextData); /// @brief Detaches a server from the listener /// @param[in] self listener from which the event should be detached @@ -176,7 +174,7 @@ iox_listener_attach_server_event_with_context_data(iox_listener_t const self, /// @param[in] serverEvent the event which should be removed from the listener void iox_listener_detach_server_event(iox_listener_t const self, iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent); + const enum iox_ServerEvent serverEvent); /// @brief Attaches a service discovery event to the listener /// @param[in] self listener to which the event should be attached to @@ -184,10 +182,10 @@ void iox_listener_detach_server_event(iox_listener_t const self, /// @param[in] serviceDiscoveryEvent the event which should trigger the listener /// @param[in] callback the callback which is called when an event triggers the listener /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult +enum iox_ListenerResult iox_listener_attach_service_discovery_event(iox_listener_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, void (*callback)(iox_service_discovery_t)); /// @brief Attaches a service discovery event to the listener. The callback has an additional contextData argument to @@ -198,10 +196,10 @@ iox_listener_attach_service_discovery_event(iox_listener_t const self, /// @param[in] callback the callback which is called when an event triggers the listener /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error -IOX_ENUM iox_ListenerResult iox_listener_attach_service_discovery_event_with_context_data( +enum iox_ListenerResult iox_listener_attach_service_discovery_event_with_context_data( iox_listener_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, void (*callback)(iox_service_discovery_t, void*), void* const contextData); @@ -211,6 +209,6 @@ IOX_ENUM iox_ListenerResult iox_listener_attach_service_discovery_event_with_con /// @param[in] serviceDiscoveryEvent the service discovery event which should be removed from the listener void iox_listener_detach_service_discovery_event(iox_listener_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent); + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent); #endif diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/publisher.h b/iceoryx_binding_c/include/iceoryx_binding_c/publisher.h index 06d2e2c0e1..bfe0b16520 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/publisher.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/publisher.h @@ -40,7 +40,7 @@ typedef struct bool offerOnCreate; /// @brief describes whether a publisher blocks when subscriber queue is full - IOX_ENUM iox_ConsumerTooSlowPolicy subscriberTooSlowPolicy; + enum iox_ConsumerTooSlowPolicy subscriberTooSlowPolicy; /// @brief this value will be set exclusively by 'iox_pub_options_init' and is not supposed to be modified otherwise uint64_t initCheck; @@ -85,9 +85,8 @@ void iox_pub_deinit(iox_pub_t const self); /// describes the error /// @note for the user-payload alignment 'IOX_C_CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT' is used /// for a custom user-payload alignment please use 'iox_pub_loan_aligned_chunk' -IOX_ENUM iox_AllocationResult iox_pub_loan_chunk(iox_pub_t const self, - void** const userPayload, - const uint64_t userPayloadSize); +enum iox_AllocationResult +iox_pub_loan_chunk(iox_pub_t const self, void** const userPayload, const uint64_t userPayloadSize); /// @brief allocates a chunk in the shared memory with a custom alignment for the user-payload /// @param[in] self handle of the publisher @@ -96,10 +95,10 @@ IOX_ENUM iox_AllocationResult iox_pub_loan_chunk(iox_pub_t const self, /// @param[in] userPayloadAlignment user-payload alignment of the allocated chunk /// @return on success it returns AllocationResult_SUCCESS otherwise a value which /// describes the error -IOX_ENUM iox_AllocationResult iox_pub_loan_aligned_chunk(iox_pub_t const self, - void** const userPayload, - const uint64_t userPayloadSize, - const uint32_t userPayloadAlignment); +enum iox_AllocationResult iox_pub_loan_aligned_chunk(iox_pub_t const self, + void** const userPayload, + const uint64_t userPayloadSize, + const uint32_t userPayloadAlignment); /// @brief allocates a chunk in the shared memory with a section for the user-header and a custom alignment for the /// user-payload @@ -111,12 +110,12 @@ IOX_ENUM iox_AllocationResult iox_pub_loan_aligned_chunk(iox_pub_t const self, /// @param[in] userHeaderAlignment user-header alignment of the allocated chunk /// @return on success it returns AllocationResult_SUCCESS otherwise a value which /// describes the error -IOX_ENUM iox_AllocationResult iox_pub_loan_aligned_chunk_with_user_header(iox_pub_t const self, - void** const userPayload, - const uint64_t userPayloadSize, - const uint32_t userPayloadAlignment, - const uint32_t userHeaderSize, - const uint32_t userHeaderAlignment); +enum iox_AllocationResult iox_pub_loan_aligned_chunk_with_user_header(iox_pub_t const self, + void** const userPayload, + const uint64_t userPayloadSize, + const uint32_t userPayloadAlignment, + const uint32_t userHeaderSize, + const uint32_t userHeaderAlignment); /// @brief releases ownership of a previously allocated chunk without sending it /// @param[in] self handle of the publisher diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/server.h b/iceoryx_binding_c/include/iceoryx_binding_c/server.h index d69832d8db..ce596e9087 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/server.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/server.h @@ -38,10 +38,10 @@ typedef struct bool offerOnCreate; /// @brief Sets whether the client blocks when the server request queue is full - IOX_ENUM iox_QueueFullPolicy requestQueueFullPolicy; + enum iox_QueueFullPolicy requestQueueFullPolicy; /// @brief Sets whether the server blocks when the client response queue is full - IOX_ENUM iox_ConsumerTooSlowPolicy clientTooSlowPolicy; + enum iox_ConsumerTooSlowPolicy clientTooSlowPolicy; /// @brief this value will be set exclusively by 'iox_server_options_init' and is not supposed to be modified /// otherwise @@ -84,7 +84,7 @@ void iox_server_deinit(iox_server_t const self); /// @param[in] payload pointer in which the pointer to the user-payload of the request is stored /// @return if a chunk could be received it returns ChunkReceiveResult_SUCCESS otherwise /// an enum which describes the error -IOX_ENUM iox_ServerRequestResult iox_server_take_request(iox_server_t const self, const void** const payload); +enum iox_ServerRequestResult iox_server_take_request(iox_server_t const self, const void** const payload); /// @brief release a previously acquired request (via iox_server_take_request) /// @param[in] self handle to the server @@ -100,10 +100,10 @@ void iox_server_release_request(iox_server_t const self, const void* const paylo /// describes the error /// @note for the user-payload alignment 'IOX_C_CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT' is used /// for a custom user-payload alignment please use 'iox_server_loan_aligned_response' -IOX_ENUM iox_AllocationResult iox_server_loan_response(iox_server_t const self, - const void* const requestPayload, - void** const payload, - const uint64_t payloadSize); +enum iox_AllocationResult iox_server_loan_response(iox_server_t const self, + const void* const requestPayload, + void** const payload, + const uint64_t payloadSize); /// @brief allocates a response in the shared memory /// @param[in] self handle of the server @@ -113,18 +113,18 @@ IOX_ENUM iox_AllocationResult iox_server_loan_response(iox_server_t const self, /// @param[in] payloadAlignment user-payload alignment of the allocated request /// @return on success it returns AllocationResult_SUCCESS otherwise a value which /// describes the error -IOX_ENUM iox_AllocationResult iox_server_loan_aligned_response(iox_server_t const self, - const void* const requestPayload, - void** const payload, - const uint64_t payloadSize, - const uint32_t payloadAlignment); +enum iox_AllocationResult iox_server_loan_aligned_response(iox_server_t const self, + const void* const requestPayload, + void** const payload, + const uint64_t payloadSize, + const uint32_t payloadAlignment); /// @brief sends a previously loaned response /// @param[in] self handle of the server /// @param[in] payload pointer to the user-payload of the response which should be send /// @return on success it returns ServerSendResult_SUCCESS otherwise a value which /// describes the error -IOX_ENUM iox_ServerSendResult iox_server_send(iox_server_t const self, void* const payload); +enum iox_ServerSendResult iox_server_send(iox_server_t const self, void* const payload); /// @brief releases ownership of a previously allocated loaned response without sending it /// @param[in] self handle of the server diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/service_discovery.h b/iceoryx_binding_c/include/iceoryx_binding_c/service_discovery.h index 197d4ab48e..aeef820f5a 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/service_discovery.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/service_discovery.h @@ -53,7 +53,7 @@ uint64_t iox_service_discovery_find_service(iox_service_discovery_t const self, iox_service_description_t* const serviceContainer, const uint64_t serviceContainerCapacity, uint64_t* missedServices, - const IOX_ENUM iox_MessagingPattern pattern); + const enum iox_MessagingPattern pattern); /// @brief Searches all services with the given messaging pattern that match the provided service description and /// applies a function to each of them @@ -68,7 +68,7 @@ void iox_service_discovery_find_service_apply_callable(iox_service_discovery_t c const char* const instance, const char* const event, void (*callable)(const iox_service_description_t), - const IOX_ENUM iox_MessagingPattern pattern); + const enum iox_MessagingPattern pattern); /// @brief Searches all services with the given messaging pattern that match the provided service description and /// applies a function to each of them. A second parameter for the function can be provided as contextData. @@ -86,6 +86,6 @@ void iox_service_discovery_find_service_apply_callable_with_context_data( const char* const event, void (*callable)(const iox_service_description_t, void*), void* const contextData, - const IOX_ENUM iox_MessagingPattern pattern); + const enum iox_MessagingPattern pattern); #endif diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/subscriber.h b/iceoryx_binding_c/include/iceoryx_binding_c/subscriber.h index 964370cd01..f1567131d6 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/subscriber.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/subscriber.h @@ -43,7 +43,7 @@ typedef struct bool subscribeOnCreate; /// @brief describes whether a publisher blocks when subscriber queue is full - IOX_ENUM iox_QueueFullPolicy queueFullPolicy; + enum iox_QueueFullPolicy queueFullPolicy; /// @brief Indicates whether we require the publisher to have historyCapacity > 0. /// If true and the condition is not met (i.e. historyCapacity = 0), the subscriber will @@ -97,14 +97,14 @@ void iox_sub_unsubscribe(iox_sub_t const self); /// @param[in] self handle to the subscriber /// @return SubscribeState_SUBSCRIBED when successfully subscribed otherwise an enum which /// describes the current state -IOX_ENUM iox_SubscribeState iox_sub_get_subscription_state(iox_sub_t const self); +enum iox_SubscribeState iox_sub_get_subscription_state(iox_sub_t const self); /// @brief retrieve a received chunk /// @param[in] self handle to the subscriber /// @param[in] userPayload pointer in which the pointer to the user-payload of the chunk is stored /// @return if a chunk could be received it returns ChunkReceiveResult_SUCCESS otherwise /// an enum which describes the error -IOX_ENUM iox_ChunkReceiveResult iox_sub_take_chunk(iox_sub_t const self, const void** const userPayload); +enum iox_ChunkReceiveResult iox_sub_take_chunk(iox_sub_t const self, const void** const userPayload); /// @brief release a previously acquired chunk (via iox_sub_take_chunk) /// @param[in] self handle to the subscriber diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/wait_set.h b/iceoryx_binding_c/include/iceoryx_binding_c/wait_set.h index 4602e98a93..5257bd1b18 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/wait_set.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/wait_set.h @@ -89,11 +89,11 @@ void iox_ws_mark_for_destruction(iox_ws_t const self); /// @param[in] callback a callback which is attached to the state /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_subscriber_state(iox_ws_t const self, - iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberState subscriberState, - const uint64_t id, - void (*callback)(iox_sub_t)); +enum iox_WaitSetResult iox_ws_attach_subscriber_state(iox_ws_t const self, + iox_sub_t const subscriber, + const enum iox_SubscriberState subscriberState, + const uint64_t id, + void (*callback)(iox_sub_t)); /// @brief attaches a subscriber state to a waitset. The callback has an additional contextData argument to provide /// access to user defined data. @@ -105,13 +105,12 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_subscriber_state(iox_ws_t const self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult -iox_ws_attach_subscriber_state_with_context_data(iox_ws_t const self, - iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberState subscriberState, - const uint64_t id, - void (*callback)(iox_sub_t, void*), - void* const contextData); +enum iox_WaitSetResult iox_ws_attach_subscriber_state_with_context_data(iox_ws_t const self, + iox_sub_t const subscriber, + const enum iox_SubscriberState subscriberState, + const uint64_t id, + void (*callback)(iox_sub_t, void*), + void* const contextData); /// @brief attaches a subscriber event to a waitset /// @param[in] self handle to the waitset @@ -121,11 +120,11 @@ iox_ws_attach_subscriber_state_with_context_data(iox_ws_t const self, /// @param[in] callback a callback which is attached to the event /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_subscriber_event(iox_ws_t const self, - iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent, - const uint64_t eventId, - void (*callback)(iox_sub_t)); +enum iox_WaitSetResult iox_ws_attach_subscriber_event(iox_ws_t const self, + iox_sub_t const subscriber, + const enum iox_SubscriberEvent subscriberEvent, + const uint64_t eventId, + void (*callback)(iox_sub_t)); /// @brief attaches a subscriber event to a waitset. The callback has an additional contextData argument to provide /// access to user defined data. @@ -137,13 +136,12 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_subscriber_event(iox_ws_t const self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult -iox_ws_attach_subscriber_event_with_context_data(iox_ws_t const self, - iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent, - const uint64_t eventId, - void (*callback)(iox_sub_t, void*), - void* const contextData); +enum iox_WaitSetResult iox_ws_attach_subscriber_event_with_context_data(iox_ws_t const self, + iox_sub_t const subscriber, + const enum iox_SubscriberEvent subscriberEvent, + const uint64_t eventId, + void (*callback)(iox_sub_t, void*), + void* const contextData); /// @brief attaches a user trigger event to a waitset /// @param[in] self handle to the waitset @@ -152,10 +150,10 @@ iox_ws_attach_subscriber_event_with_context_data(iox_ws_t const self, /// @param[in] callback a callback which is attached to the event /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_user_trigger_event(iox_ws_t const self, - iox_user_trigger_t const userTrigger, - const uint64_t eventId, - void (*callback)(iox_user_trigger_t)); +enum iox_WaitSetResult iox_ws_attach_user_trigger_event(iox_ws_t const self, + iox_user_trigger_t const userTrigger, + const uint64_t eventId, + void (*callback)(iox_user_trigger_t)); /// @brief attaches a user trigger event to a waitset. The callback has an additional contextData argument to provide /// access to user defined data. @@ -166,12 +164,11 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_user_trigger_event(iox_ws_t const self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_user_trigger_event_with_context_data(iox_ws_t const self, - iox_user_trigger_t const userTrigger, - const uint64_t eventId, - void (*callback)(iox_user_trigger_t, - void*), - void* const contextData); +enum iox_WaitSetResult iox_ws_attach_user_trigger_event_with_context_data(iox_ws_t const self, + iox_user_trigger_t const userTrigger, + const uint64_t eventId, + void (*callback)(iox_user_trigger_t, void*), + void* const contextData); /// @brief detaches a subscriber event from a waitset /// @param[in] self handle to the waitset @@ -179,7 +176,7 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_user_trigger_event_with_context_data(io /// @param[in] subscriberEvent the event which should be detached from the subscriber void iox_ws_detach_subscriber_event(iox_ws_t const self, iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent); + const enum iox_SubscriberEvent subscriberEvent); /// @brief detaches a subscriber state from a waitset /// @param[in] self handle to the waitset @@ -187,7 +184,7 @@ void iox_ws_detach_subscriber_event(iox_ws_t const self, /// @param[in] subscriberState the state which should be detached from the subscriber void iox_ws_detach_subscriber_state(iox_ws_t const self, iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberState subscriberState); + const enum iox_SubscriberState subscriberState); /// @brief detaches a user trigger event from a waitset /// @param[in] self handle to the waitset @@ -202,11 +199,11 @@ void iox_ws_detach_user_trigger_event(iox_ws_t const self, iox_user_trigger_t co /// @param[in] callback a callback which is attached to the event /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_client_event(const iox_ws_t self, - const iox_client_t client, - const IOX_ENUM iox_ClientEvent clientEvent, - const uint64_t eventId, - void (*callback)(iox_client_t)); +enum iox_WaitSetResult iox_ws_attach_client_event(const iox_ws_t self, + const iox_client_t client, + const enum iox_ClientEvent clientEvent, + const uint64_t eventId, + void (*callback)(iox_client_t)); /// @brief attaches a client event to a waitset with additional context data for the callback /// @param[in] self handle to the waitset @@ -217,12 +214,12 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_client_event(const iox_ws_t self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_client_event_with_context_data(iox_ws_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent, - const uint64_t eventId, - void (*callback)(iox_client_t, void*), - void* const contextData); +enum iox_WaitSetResult iox_ws_attach_client_event_with_context_data(iox_ws_t const self, + iox_client_t const client, + const enum iox_ClientEvent clientEvent, + const uint64_t eventId, + void (*callback)(iox_client_t, void*), + void* const contextData); /// @brief attaches a client state to a waitset /// @param[in] self handle to the waitset @@ -232,11 +229,11 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_client_event_with_context_data(iox_ws_t /// @param[in] callback a callback which is attached to the state /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_client_state(const iox_ws_t self, - const iox_client_t client, - const IOX_ENUM iox_ClientState clientState, - const uint64_t eventId, - void (*callback)(iox_client_t)); +enum iox_WaitSetResult iox_ws_attach_client_state(const iox_ws_t self, + const iox_client_t client, + const enum iox_ClientState clientState, + const uint64_t eventId, + void (*callback)(iox_client_t)); /// @brief attaches a client state to a waitset with additional context data for the callback /// @param[in] self handle to the waitset @@ -247,28 +244,24 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_client_state(const iox_ws_t self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_client_state_with_context_data(iox_ws_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientState clientState, - const uint64_t eventId, - void (*callback)(iox_client_t, void*), - void* const contextData); +enum iox_WaitSetResult iox_ws_attach_client_state_with_context_data(iox_ws_t const self, + iox_client_t const client, + const enum iox_ClientState clientState, + const uint64_t eventId, + void (*callback)(iox_client_t, void*), + void* const contextData); /// @brief detaches a client event from a waitset /// @param[in] self handle to the waitset /// @param[in] client the client which should be detached /// @param[in] clientEvent the event which should be detached from the client -void iox_ws_detach_client_event(iox_ws_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent); +void iox_ws_detach_client_event(iox_ws_t const self, iox_client_t const client, const enum iox_ClientEvent clientEvent); /// @brief detaches a client state from a waitset /// @param[in] self handle to the waitset /// @param[in] client the client which should be detached /// @param[in] clientState the state which should be detached from the client -void iox_ws_detach_client_state(iox_ws_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientState clientState); +void iox_ws_detach_client_state(iox_ws_t const self, iox_client_t const client, const enum iox_ClientState clientState); /// @brief attaches a server event to a waitset /// @param[in] self handle to the waitset @@ -278,11 +271,11 @@ void iox_ws_detach_client_state(iox_ws_t const self, /// @param[in] callback a callback which is attached to the event /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_server_event(const iox_ws_t self, - const iox_server_t server, - const IOX_ENUM iox_ServerEvent serverEvent, - const uint64_t eventId, - void (*callback)(iox_server_t)); +enum iox_WaitSetResult iox_ws_attach_server_event(const iox_ws_t self, + const iox_server_t server, + const enum iox_ServerEvent serverEvent, + const uint64_t eventId, + void (*callback)(iox_server_t)); /// @brief attaches a server event to a waitset with additional context data for the callback /// @param[in] self handle to the waitset @@ -293,12 +286,12 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_server_event(const iox_ws_t self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_server_event_with_context_data(iox_ws_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent, - const uint64_t eventId, - void (*callback)(iox_server_t, void*), - void* const contextData); +enum iox_WaitSetResult iox_ws_attach_server_event_with_context_data(iox_ws_t const self, + iox_server_t const server, + const enum iox_ServerEvent serverEvent, + const uint64_t eventId, + void (*callback)(iox_server_t, void*), + void* const contextData); /// @brief attaches a server state to a waitset /// @param[in] self handle to the waitset @@ -308,11 +301,11 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_server_event_with_context_data(iox_ws_t /// @param[in] callback a callback which is attached to the state /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_server_state(const iox_ws_t self, - const iox_server_t server, - const IOX_ENUM iox_ServerState serverState, - const uint64_t eventId, - void (*callback)(iox_server_t)); +enum iox_WaitSetResult iox_ws_attach_server_state(const iox_ws_t self, + const iox_server_t server, + const enum iox_ServerState serverState, + const uint64_t eventId, + void (*callback)(iox_server_t)); /// @brief attaches a server state to a waitset with additional context data for the callback /// @param[in] self handle to the waitset @@ -323,28 +316,24 @@ IOX_ENUM iox_WaitSetResult iox_ws_attach_server_state(const iox_ws_t self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult iox_ws_attach_server_state_with_context_data(iox_ws_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerState serverState, - const uint64_t eventId, - void (*callback)(iox_server_t, void*), - void* const contextData); +enum iox_WaitSetResult iox_ws_attach_server_state_with_context_data(iox_ws_t const self, + iox_server_t const server, + const enum iox_ServerState serverState, + const uint64_t eventId, + void (*callback)(iox_server_t, void*), + void* const contextData); /// @brief detaches a server event from a waitset /// @param[in] self handle to the waitset /// @param[in] server the server which should be detached /// @param[in] serverEvent the event which should be detached from the server -void iox_ws_detach_server_event(iox_ws_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent); +void iox_ws_detach_server_event(iox_ws_t const self, iox_server_t const server, const enum iox_ServerEvent serverEvent); /// @brief detaches a server state from a waitset /// @param[in] self handle to the waitset /// @param[in] server the server which should be detached /// @param[in] serverState the state which should be detached from the server -void iox_ws_detach_server_state(iox_ws_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerState serverState); +void iox_ws_detach_server_state(iox_ws_t const self, iox_server_t const server, const enum iox_ServerState serverState); /// @brief attaches a service discovery event to a waitset /// @param[in] self handle to the waitset @@ -354,12 +343,11 @@ void iox_ws_detach_server_state(iox_ws_t const self, /// @param[in] callback a callback which is attached to the event /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult -iox_ws_attach_service_discovery_event(const iox_ws_t self, - const iox_service_discovery_t serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, - const uint64_t eventId, - void (*callback)(iox_service_discovery_t)); +enum iox_WaitSetResult iox_ws_attach_service_discovery_event(const iox_ws_t self, + const iox_service_discovery_t serviceDiscovery, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const uint64_t eventId, + void (*callback)(iox_service_discovery_t)); /// @brief attaches a service discovery event to a waitset with additional context data for the callback /// @param[in] self handle to the waitset @@ -370,10 +358,10 @@ iox_ws_attach_service_discovery_event(const iox_ws_t self, /// @param[in] contextData a void pointer which is provided as second argument to the callback /// @return if the attaching was successfull it returns WaitSetResult_SUCCESS, otherwise /// an enum which describes the error -IOX_ENUM iox_WaitSetResult +enum iox_WaitSetResult iox_ws_attach_service_discovery_event_with_context_data(iox_ws_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, const uint64_t eventId, void (*callback)(iox_service_discovery_t, void*), void* const contextData); @@ -384,6 +372,6 @@ iox_ws_attach_service_discovery_event_with_context_data(iox_ws_t const self, /// @param[in] serviceDiscoveryEvent the event which should be detached from the service discovery void iox_ws_detach_service_discovery_event(iox_ws_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent); + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent); #endif diff --git a/iceoryx_binding_c/source/c2cpp_enum_translation.cpp b/iceoryx_binding_c/source/c2cpp_enum_translation.cpp index cc5b60dc04..2e34186055 100644 --- a/iceoryx_binding_c/source/c2cpp_enum_translation.cpp +++ b/iceoryx_binding_c/source/c2cpp_enum_translation.cpp @@ -21,7 +21,7 @@ namespace c2cpp { -iox::popo::ConsumerTooSlowPolicy consumerTooSlowPolicy(const IOX_ENUM iox_ConsumerTooSlowPolicy policy) noexcept +iox::popo::ConsumerTooSlowPolicy consumerTooSlowPolicy(const enum iox_ConsumerTooSlowPolicy policy) noexcept { switch (policy) { @@ -35,7 +35,7 @@ iox::popo::ConsumerTooSlowPolicy consumerTooSlowPolicy(const IOX_ENUM iox_Consum return iox::popo::ConsumerTooSlowPolicy::DISCARD_OLDEST_DATA; } -iox::popo::QueueFullPolicy queueFullPolicy(const IOX_ENUM iox_QueueFullPolicy policy) noexcept +iox::popo::QueueFullPolicy queueFullPolicy(const enum iox_QueueFullPolicy policy) noexcept { switch (policy) { diff --git a/iceoryx_binding_c/source/c_listener.cpp b/iceoryx_binding_c/source/c_listener.cpp index 9279491f99..774fbf1886 100644 --- a/iceoryx_binding_c/source/c_listener.cpp +++ b/iceoryx_binding_c/source/c_listener.cpp @@ -49,10 +49,10 @@ void iox_listener_deinit(iox_listener_t const self) delete self; } -IOX_ENUM iox_ListenerResult iox_listener_attach_subscriber_event(iox_listener_t const self, - iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent, - void (*callback)(iox_sub_t)) +enum iox_ListenerResult iox_listener_attach_subscriber_event(iox_listener_t const self, + iox_sub_t const subscriber, + const enum iox_SubscriberEvent subscriberEvent, + void (*callback)(iox_sub_t)) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(subscriber != nullptr, "'subscriver' must not be a 'nullptr'"); @@ -69,10 +69,10 @@ IOX_ENUM iox_ListenerResult iox_listener_attach_subscriber_event(iox_listener_t return ListenerResult_SUCCESS; } -IOX_ENUM iox_ListenerResult +enum iox_ListenerResult iox_listener_attach_subscriber_event_with_context_data(iox_listener_t const self, iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent, + const enum iox_SubscriberEvent subscriberEvent, void (*callback)(iox_sub_t, void*), void* const contextData) { @@ -91,9 +91,9 @@ iox_listener_attach_subscriber_event_with_context_data(iox_listener_t const self return ListenerResult_SUCCESS; } -IOX_ENUM iox_ListenerResult iox_listener_attach_user_trigger_event(iox_listener_t const self, - iox_user_trigger_t const userTrigger, - void (*callback)(iox_user_trigger_t)) +enum iox_ListenerResult iox_listener_attach_user_trigger_event(iox_listener_t const self, + iox_user_trigger_t const userTrigger, + void (*callback)(iox_user_trigger_t)) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(userTrigger != nullptr, "'userTrigger' must not be a 'nullptr'"); @@ -108,11 +108,11 @@ IOX_ENUM iox_ListenerResult iox_listener_attach_user_trigger_event(iox_listener_ return ListenerResult_SUCCESS; } -IOX_ENUM iox_ListenerResult -iox_listener_attach_user_trigger_event_with_context_data(iox_listener_t const self, - iox_user_trigger_t const userTrigger, - void (*callback)(iox_user_trigger_t, void*), - void* const contextData) +enum iox_ListenerResult iox_listener_attach_user_trigger_event_with_context_data(iox_listener_t const self, + iox_user_trigger_t const userTrigger, + void (*callback)(iox_user_trigger_t, + void*), + void* const contextData) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(userTrigger != nullptr, "'userTrigger' must not be a 'nullptr'"); @@ -133,7 +133,7 @@ iox_listener_attach_user_trigger_event_with_context_data(iox_listener_t const se void iox_listener_detach_subscriber_event(iox_listener_t const self, iox_sub_t const subscriber, - const IOX_ENUM iox_SubscriberEvent subscriberEvent) + const enum iox_SubscriberEvent subscriberEvent) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(subscriber != nullptr, "'subscriver' must not be a 'nullptr'"); @@ -165,7 +165,7 @@ uint64_t iox_listener_capacity(iox_listener_t const self) iox_ListenerResult iox_listener_attach_client_event(iox_listener_t const self, iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent, + const enum iox_ClientEvent clientEvent, void (*callback)(iox_client_t)) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); @@ -181,7 +181,7 @@ iox_ListenerResult iox_listener_attach_client_event(iox_listener_t const self, iox_ListenerResult iox_listener_attach_client_event_with_context_data(iox_listener_t const self, iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent, + const enum iox_ClientEvent clientEvent, void (*callback)(iox_client_t, void*), void* const contextData) { @@ -199,7 +199,7 @@ iox_ListenerResult iox_listener_attach_client_event_with_context_data(iox_listen void iox_listener_detach_client_event(iox_listener_t const self, iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent) + const enum iox_ClientEvent clientEvent) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(client != nullptr, "'client' must not be a 'nullptr'"); @@ -210,7 +210,7 @@ void iox_listener_detach_client_event(iox_listener_t const self, iox_ListenerResult iox_listener_attach_server_event(iox_listener_t const self, iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent, + const enum iox_ServerEvent serverEvent, void (*callback)(iox_server_t)) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); @@ -226,7 +226,7 @@ iox_ListenerResult iox_listener_attach_server_event(iox_listener_t const self, iox_ListenerResult iox_listener_attach_server_event_with_context_data(iox_listener_t const self, iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent, + const enum iox_ServerEvent serverEvent, void (*callback)(iox_server_t, void*), void* const contextData) { @@ -244,7 +244,7 @@ iox_ListenerResult iox_listener_attach_server_event_with_context_data(iox_listen void iox_listener_detach_server_event(iox_listener_t const self, iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent) + const enum iox_ServerEvent serverEvent) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(server != nullptr, "'server' must not be a 'nullptr'"); @@ -255,7 +255,7 @@ void iox_listener_detach_server_event(iox_listener_t const self, iox_ListenerResult iox_listener_attach_service_discovery_event(iox_listener_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, void (*callback)(iox_service_discovery_t)) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); @@ -273,7 +273,7 @@ iox_listener_attach_service_discovery_event(iox_listener_t const self, iox_ListenerResult iox_listener_attach_service_discovery_event_with_context_data( iox_listener_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, void (*callback)(iox_service_discovery_t, void*), void* const contextData) { @@ -291,7 +291,7 @@ iox_ListenerResult iox_listener_attach_service_discovery_event_with_context_data void iox_listener_detach_service_discovery_event(iox_listener_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent) + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(serviceDiscovery != nullptr, "'serviceDiscovery' must not be a 'nullptr'"); diff --git a/iceoryx_binding_c/source/c_service_discovery.cpp b/iceoryx_binding_c/source/c_service_discovery.cpp index 1ecb6165fd..2f7cb892ed 100644 --- a/iceoryx_binding_c/source/c_service_discovery.cpp +++ b/iceoryx_binding_c/source/c_service_discovery.cpp @@ -50,7 +50,7 @@ uint64_t iox_service_discovery_find_service(iox_service_discovery_t const self, iox_service_description_t* const serviceContainer, const uint64_t serviceContainerCapacity, uint64_t* missedServices, - const IOX_ENUM iox_MessagingPattern pattern) + const enum iox_MessagingPattern pattern) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(serviceContainer != nullptr, "'serviceContainer' must not be a 'nullptr'"); @@ -94,7 +94,7 @@ void iox_service_discovery_find_service_apply_callable(iox_service_discovery_t c const char* const instance, const char* const event, void (*callable)(const iox_service_description_t), - const IOX_ENUM iox_MessagingPattern pattern) + const enum iox_MessagingPattern pattern) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(callable != nullptr, "'callable' must not be a 'nullptr'"); @@ -126,7 +126,7 @@ void iox_service_discovery_find_service_apply_callable_with_context_data( const char* const event, void (*callable)(const iox_service_description_t, void*), void* const contextData, - const IOX_ENUM iox_MessagingPattern pattern) + const enum iox_MessagingPattern pattern) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(callable != nullptr, "'callable' must not be a 'nullptr'"); diff --git a/iceoryx_binding_c/source/c_wait_set.cpp b/iceoryx_binding_c/source/c_wait_set.cpp index f0e5eacb85..feebf947fb 100644 --- a/iceoryx_binding_c/source/c_wait_set.cpp +++ b/iceoryx_binding_c/source/c_wait_set.cpp @@ -259,7 +259,7 @@ iox_WaitSetResult iox_ws_attach_client_event(const iox_ws_t self, iox_WaitSetResult iox_ws_attach_client_event_with_context_data(iox_ws_t const self, iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent, + const enum iox_ClientEvent clientEvent, const uint64_t eventId, void (*callback)(iox_client_t, void*), void* const contextData) @@ -290,7 +290,7 @@ iox_WaitSetResult iox_ws_attach_client_state(const iox_ws_t self, iox_WaitSetResult iox_ws_attach_client_state_with_context_data(iox_ws_t const self, iox_client_t const client, - const IOX_ENUM iox_ClientState clientState, + const enum iox_ClientState clientState, const uint64_t eventId, void (*callback)(iox_client_t, void*), void* const contextData) @@ -306,9 +306,7 @@ iox_WaitSetResult iox_ws_attach_client_state_with_context_data(iox_ws_t const se return (result.has_error()) ? cpp2c::waitSetResult(result.error()) : iox_WaitSetResult::WaitSetResult_SUCCESS; } -void iox_ws_detach_client_event(iox_ws_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientEvent clientEvent) +void iox_ws_detach_client_event(iox_ws_t const self, iox_client_t const client, const enum iox_ClientEvent clientEvent) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(client != nullptr, "'client' must not be a 'nullptr'"); @@ -316,9 +314,7 @@ void iox_ws_detach_client_event(iox_ws_t const self, self->detachEvent(*client, c2cpp::clientEvent(clientEvent)); } -void iox_ws_detach_client_state(iox_ws_t const self, - iox_client_t const client, - const IOX_ENUM iox_ClientState clientState) +void iox_ws_detach_client_state(iox_ws_t const self, iox_client_t const client, const enum iox_ClientState clientState) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(client != nullptr, "'client' must not be a 'nullptr'"); @@ -328,7 +324,7 @@ void iox_ws_detach_client_state(iox_ws_t const self, iox_WaitSetResult iox_ws_attach_server_event(const iox_ws_t self, const iox_server_t server, - const IOX_ENUM iox_ServerEvent serverEvent, + const enum iox_ServerEvent serverEvent, const uint64_t eventId, void (*callback)(iox_server_t)) { @@ -341,7 +337,7 @@ iox_WaitSetResult iox_ws_attach_server_event(const iox_ws_t self, iox_WaitSetResult iox_ws_attach_server_event_with_context_data(iox_ws_t const self, iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent, + const enum iox_ServerEvent serverEvent, const uint64_t eventId, void (*callback)(iox_server_t, void*), void* const contextData) @@ -359,7 +355,7 @@ iox_WaitSetResult iox_ws_attach_server_event_with_context_data(iox_ws_t const se iox_WaitSetResult iox_ws_attach_server_state(const iox_ws_t self, const iox_server_t server, - const IOX_ENUM iox_ServerState serverState, + const enum iox_ServerState serverState, const uint64_t eventId, void (*callback)(iox_server_t)) { @@ -372,7 +368,7 @@ iox_WaitSetResult iox_ws_attach_server_state(const iox_ws_t self, iox_WaitSetResult iox_ws_attach_server_state_with_context_data(iox_ws_t const self, iox_server_t const server, - const IOX_ENUM iox_ServerState serverState, + const enum iox_ServerState serverState, const uint64_t eventId, void (*callback)(iox_server_t, void*), void* const contextData) @@ -388,9 +384,7 @@ iox_WaitSetResult iox_ws_attach_server_state_with_context_data(iox_ws_t const se return (result.has_error()) ? cpp2c::waitSetResult(result.error()) : iox_WaitSetResult::WaitSetResult_SUCCESS; } -void iox_ws_detach_server_event(iox_ws_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerEvent serverEvent) +void iox_ws_detach_server_event(iox_ws_t const self, iox_server_t const server, const enum iox_ServerEvent serverEvent) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(server != nullptr, "'server' must not be a 'nullptr'"); @@ -398,9 +392,7 @@ void iox_ws_detach_server_event(iox_ws_t const self, self->detachEvent(*server, c2cpp::serverEvent(serverEvent)); } -void iox_ws_detach_server_state(iox_ws_t const self, - iox_server_t const server, - const IOX_ENUM iox_ServerState serverState) +void iox_ws_detach_server_state(iox_ws_t const self, iox_server_t const server, const enum iox_ServerState serverState) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(server != nullptr, "'server' must not be a 'nullptr'"); @@ -410,7 +402,7 @@ void iox_ws_detach_server_state(iox_ws_t const self, iox_WaitSetResult iox_ws_attach_service_discovery_event(const iox_ws_t self, const iox_service_discovery_t serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, const uint64_t eventId, void (*callback)(iox_service_discovery_t)) { @@ -425,7 +417,7 @@ iox_WaitSetResult iox_ws_attach_service_discovery_event(const iox_ws_t self, iox_WaitSetResult iox_ws_attach_service_discovery_event_with_context_data(iox_ws_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent, + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent, const uint64_t eventId, void (*callback)(iox_service_discovery_t, void*), void* const contextData) @@ -444,7 +436,7 @@ iox_ws_attach_service_discovery_event_with_context_data(iox_ws_t const self, void iox_ws_detach_service_discovery_event(iox_ws_t const self, iox_service_discovery_t const serviceDiscovery, - const IOX_ENUM iox_ServiceDiscoveryEvent serviceDiscoveryEvent) + const enum iox_ServiceDiscoveryEvent serviceDiscoveryEvent) { IOX_ENFORCE(self != nullptr, "'self' must not be a 'nullptr'"); IOX_ENFORCE(serviceDiscovery != nullptr, "'serviceDiscovery' must not be a 'nullptr'");