Function rcl_context_get_domain_id

Function Documentation

rcl_ret_t rcl_context_get_domain_id(rcl_context_t *context, size_t *domain_id)

Returns the context domain id.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes [1]

Uses Atomics

No

Lock-Free

No

[1] Calling the function asynchronously with rcl_init() or rcl_shutdown() can result in the function sometimes succeeding and sometimes returning RCL_RET_INVALID_ARGUMENT.

Pre:

If context is uninitialized, then it is undefined behavior.

Parameters:
  • context[in] from which the domain id should be retrieved.

  • domain_id[out] output variable where the domain id will be returned.

Returns:

RCL_RET_INVALID_ARGUMENT if context is invalid (see rcl_context_is_valid()), or

Returns:

RCL_RET_INVALID_ARGUMENT if domain_id is NULL, or

Returns:

RCL_RET_OK if the domain id was correctly retrieved.