Skip to content

Commit

Permalink
Pluralize endpoints in API
Browse files Browse the repository at this point in the history
Signed-off-by: Ananya Muddukrishna <ananya.x.muddukrishna@ericsson.com>
  • Loading branch information
Ananya Muddukrishna committed Feb 25, 2021
1 parent 8a511d1 commit 56a8a1d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions rmw/include/rmw/get_network_flow_endpoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef RMW__GET_NETWORK_FLOW_ENDPOINT_H_
#define RMW__GET_NETWORK_FLOW_ENDPOINT_H_
#ifndef RMW__GET_NETWORK_FLOW_ENDPOINTS_H_
#define RMW__GET_NETWORK_FLOW_ENDPOINTS_H_

#ifdef __cplusplus
extern "C"
Expand All @@ -40,7 +40,7 @@ extern "C"
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_publisher_get_network_flow_endpoint(
rmw_publisher_get_network_flow_endpoints(
const rmw_publisher_t * publisher,
rcutils_allocator_t * allocator,
rmw_network_flow_endpoint_array_t * network_flow_endpoint_array);
Expand All @@ -61,7 +61,7 @@ rmw_publisher_get_network_flow_endpoint(
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_subscription_get_network_flow_endpoint(
rmw_subscription_get_network_flow_endpoints(
const rmw_subscription_t * subscription,
rcutils_allocator_t * allocator,
rmw_network_flow_endpoint_array_t * network_flow_endpoint_array);
Expand All @@ -70,4 +70,4 @@ rmw_subscription_get_network_flow_endpoint(
}
#endif

#endif // RMW__GET_NETWORK_FLOW_ENDPOINT_H_
#endif // RMW__GET_NETWORK_FLOW_ENDPOINTS_H_
34 changes: 17 additions & 17 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,23 @@ typedef enum RMW_PUBLIC_TYPE rmw_endpoint_type_t
RMW_ENDPOINT_SUBSCRIPTION
} rmw_endpoint_type_t;

/// Unique network flow endpoint requirement enumeration
typedef enum RMW_PUBLIC_TYPE rmw_unique_network_flow_endpoint_requirement_t
/// Unique network flow endpoints requirement enumeration
typedef enum RMW_PUBLIC_TYPE rmw_unique_network_flow_endpoints_requirement_t
{
/// Unique network flow endpoint not required
RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_NOT_REQUIRED = 0,
/// Unique network flow endpoints not required
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED = 0,

/// Unique network flow endpoint strictly required.
/// Unique network flow endpoins strictly required.
/// Error if not provided by RMW implementation.
RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_STRICTLY_REQUIRED,
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_STRICTLY_REQUIRED,

/// Unique network flow endpoint optionally required.
/// Unique network flow endpoints optionally required.
/// No error if not provided RMW implementation.
RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_OPTIONALLY_REQUIRED,
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_OPTIONALLY_REQUIRED,

/// Unique network flow endpoint requirement decided by system.
RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_SYSTEM_DEFAULT
} rmw_unique_network_flow_endpoint_requirement_t;
/// Unique network flow endpoints requirement decided by system.
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_SYSTEM_DEFAULT
} rmw_unique_network_flow_endpoints_requirement_t;

/// Options that can be used to configure the creation of a publisher in rmw.
typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_t
Expand All @@ -104,14 +104,14 @@ typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_t
*/
void * rmw_specific_publisher_payload;

/// Require middleware to generate unique network flow endpoint.
/// Require middleware to generate unique network flow endpoints.
/**
* Unique network flow endpoints are required to differentiate the QoS provided by
* networks for flows between publishers and subscribers in communicating
* nodes.
* Default value is RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_NOT_REQUIRED.
* Default value is RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED.
*/
rmw_unique_network_flow_endpoint_requirement_t require_unique_network_flow_endpoint;
rmw_unique_network_flow_endpoints_requirement_t require_unique_network_flow_endpoints;
} rmw_publisher_options_t;

/// Structure which encapsulates an rmw publisher
Expand Down Expand Up @@ -168,14 +168,14 @@ typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_t
*/
bool ignore_local_publications;

/// Require middleware to generate unique network flow endpoint.
/// Require middleware to generate unique network flow endpoints.
/**
* Unique network flow endpoints are required to differentiate the QoS provided by
* networks for flows between publishers and subscribers in communicating
* nodes.
* Default value is RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_NOT_REQUIRED.
* Default value is RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED.
*/
rmw_unique_network_flow_endpoint_requirement_t require_unique_network_flow_endpoint;
rmw_unique_network_flow_endpoints_requirement_t require_unique_network_flow_endpoints;
} rmw_subscription_options_t;

typedef struct RMW_PUBLIC_TYPE rmw_subscription_t
Expand Down
2 changes: 1 addition & 1 deletion rmw/src/publisher_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rmw_get_default_publisher_options(void)
{
rmw_publisher_options_t publisher_options = {
.rmw_specific_publisher_payload = NULL,
.require_unique_network_flow_endpoint = RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_NOT_REQUIRED,
.require_unique_network_flow_endpoints = RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED,
};
return publisher_options;
}
Expand Down
2 changes: 1 addition & 1 deletion rmw/src/subscription_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rmw_get_default_subscription_options(void)
rmw_subscription_options_t subscription_options = {
.rmw_specific_subscription_payload = NULL,
.ignore_local_publications = false,
.require_unique_network_flow_endpoint = RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_NOT_REQUIRED,
.require_unique_network_flow_endpoints = RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED,
};
return subscription_options;
}
Expand Down
4 changes: 2 additions & 2 deletions rmw/test/test_publisher_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ TEST(rmw_publisher_options, get_default_publisher_options)
rmw_publisher_options_t options = rmw_get_default_publisher_options();
EXPECT_EQ(options.rmw_specific_publisher_payload, nullptr);
EXPECT_EQ(
options.require_unique_network_flow_endpoint,
RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_NOT_REQUIRED);
options.require_unique_network_flow_endpoints,
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED);
}
4 changes: 2 additions & 2 deletions rmw/test/test_subscription_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ TEST(rmw_subscription_options, get_default_subscription_options)
EXPECT_EQ(options.rmw_specific_subscription_payload, nullptr);
EXPECT_EQ(options.ignore_local_publications, false);
EXPECT_EQ(
options.require_unique_network_flow_endpoint,
RMW_UNIQUE_NETWORK_FLOW_ENDPOINT_NOT_REQUIRED);
options.require_unique_network_flow_endpoints,
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED);
}

0 comments on commit 56a8a1d

Please sign in to comment.