Function rcl_node_get_domain_id
Defined in File node.h
Function Documentation
-
rcl_ret_t rcl_node_get_domain_id(const rcl_node_t *node, size_t *domain_id)
Return the ROS domain ID that the node is using.
This function returns the ROS domain ID that the node is in.
This function should be used to determine what
domain_id
was used rather than checking the domain_id field in the node options, because if RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID is used when creating the node then it is not changed after creation, but this function will return the actualdomain_id
used.The
domain_id
field must point to an allocatedsize_t
object to which the ROS domain ID will be written.Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
node – [in] the handle to the node being queried
domain_id – [out] storage for the domain id
- Returns:
RCL_RET_OK if node the domain ID was retrieved successfully, or
- Returns:
RCL_RET_NODE_INVALID if the node is invalid, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
- Returns:
RCL_RET_ERROR if an unspecified error occurs.