Function rmw_subscription_set_content_filter

Function Documentation

rmw_ret_t rmw_subscription_set_content_filter(rmw_subscription_t *subscription, const rmw_subscription_content_filter_options_t *options)

Set the content filter options for the subscription.

This function will set a filter expression and an array of expression parameters for the given subscription.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

Maybe [1]

Lock-Free

Maybe [1]

[1] implementation defined, check the implementation documentation

Parameters:
  • subscription[in] The subscription to set content filter options.

  • options[in] The content filter options. Use options.filter_expression with an empty(“”) string to reset/clean content filtered topic for the subscription.

Returns:

RMW_RET_OK if successful, or

Returns:

RMW_RET_INVALID_ARGUMENT if an argument is null, or

Returns:

RMW_RET_INCORRECT_RMW_IMPLEMENTATION if the subscription implementation identifier does not match this implementation, or

Returns:

RMW_RET_UNSUPPORTED if the implementation does not support content filtered topic, or

Returns:

RMW_RET_ERROR if an unspecified error occurs.