Skip to content

Commit

Permalink
iox-#2327 Replace macro ENUM with IOX_ENUM and CLASS with IOX_CLASS
Browse files Browse the repository at this point in the history
Command: sed -i -e 's/\<ENUM\>/IOX_ENUM/g' $(find -type f)
Command: sed -i -e 's/\<CLASS\>/IOX_CLASS/g' $(find -type f)

Had to revert a few changes manually that were in comments.

Signed-off-by: Michael Bentley <[email protected]>
  • Loading branch information
mikebentley15 committed Aug 19, 2024
1 parent 912931a commit c5c7fe6
Show file tree
Hide file tree
Showing 18 changed files with 256 additions and 233 deletions.
1 change: 1 addition & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@

**Bugfixes:**

- Fix compile-time conflict with Apache Arrow [\#2327](https://github.com/eclipse-iceoryx/iceoryx/issues/2327)
- FreeBSD CI build is broken [\#1338](https://github.com/eclipse-iceoryx/iceoryx/issues/1338)
- High CPU load in blocked publisher is reduced by introducing smart busy loop waiting (adaptive_wait) [\#1347](https://github.com/eclipse-iceoryx/iceoryx/issues/1347)
- Compile Error : iceoryx_dds/Mempool.hpp: No such file or directory [\#1364](https://github.com/eclipse-iceoryx/iceoryx/issues/1364)
Expand Down
26 changes: 13 additions & 13 deletions iceoryx_binding_c/include/iceoryx_binding_c/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "iceoryx_binding_c/types.h"

/// @brief client handle
typedef CLASS UntypedClient* iox_client_t;
typedef IOX_CLASS UntypedClient* iox_client_t;

/// @brief options to be set for a client
typedef struct
Expand All @@ -38,10 +38,10 @@ typedef struct
bool connectOnCreate;

/// @brief Sets whether the server blocks when the client response queue is full
ENUM iox_QueueFullPolicy responseQueueFullPolicy;
IOX_ENUM iox_QueueFullPolicy responseQueueFullPolicy;

/// @brief Sets whether the client blocks when the server request queue is full
ENUM iox_ConsumerTooSlowPolicy serverTooSlowPolicy;
IOX_ENUM iox_ConsumerTooSlowPolicy serverTooSlowPolicy;

/// @brief this value will be set exclusively by 'iox_client_options_init' and is not supposed to be modified
/// otherwise
Expand Down Expand Up @@ -87,9 +87,9 @@ 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'
ENUM iox_AllocationResult iox_client_loan_request(iox_client_t const self,
void** const payload,
const uint64_t payloadSize);
IOX_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
Expand All @@ -98,10 +98,10 @@ 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
ENUM iox_AllocationResult iox_client_loan_aligned_request(iox_client_t const self,
void** const payload,
const uint64_t payloadSize,
const uint32_t payloadAlignment);
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);


/// @brief releases ownership of a previously allocated loaned request without sending it
Expand All @@ -114,7 +114,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
ENUM iox_ClientSendResult iox_client_send(iox_client_t const self, void* const payload);
IOX_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
Expand All @@ -128,14 +128,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
ENUM iox_ConnectionState iox_client_get_connection_state(iox_client_t const self);
IOX_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
ENUM iox_ChunkReceiveResult iox_client_take_response(iox_client_t const self, const void** const payload);
IOX_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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@

#include <cstdint>

#define CLASS class
#define ENUM
#define IOX_CLASS class
#define IOX_ENUM

#else

#include <stdbool.h>
#include <stdint.h>

#define CLASS struct
#define ENUM enum
#define IOX_CLASS struct
#define IOX_ENUM enum

#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

namespace c2cpp
{
iox::popo::ConsumerTooSlowPolicy consumerTooSlowPolicy(const ENUM iox_ConsumerTooSlowPolicy policy) noexcept;
iox::popo::QueueFullPolicy queueFullPolicy(const ENUM iox_QueueFullPolicy policy) noexcept;
iox::popo::ConsumerTooSlowPolicy consumerTooSlowPolicy(const IOX_ENUM iox_ConsumerTooSlowPolicy policy) noexcept;
iox::popo::QueueFullPolicy queueFullPolicy(const IOX_ENUM iox_QueueFullPolicy policy) noexcept;
iox::popo::SubscriberEvent subscriberEvent(const iox_SubscriberEvent value) noexcept;
iox::popo::SubscriberState subscriberState(const iox_SubscriberState value) noexcept;

Expand Down
Loading

0 comments on commit c5c7fe6

Please sign in to comment.