rmw
master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
|
Go to the source code of this file.
Classes | |
struct | rmw_topic_endpoint_info_t |
Typedefs | |
typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_t | rmw_topic_endpoint_info_t |
typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_t rmw_topic_endpoint_info_t |
A structure that encapsulates the name, namespace, topic_type, gid and qos_profile of publishers and subscriptions for a topic.
rmw_topic_endpoint_info_t rmw_get_zero_initialized_topic_endpoint_info | ( | void | ) |
Return a rmw_topic_endpoint_info_t struct with members initialized to NULL
.
rmw_ret_t rmw_topic_endpoint_info_fini | ( | rmw_topic_endpoint_info_t * | topic_endpoint_info, |
rcutils_allocator_t * | allocator | ||
) |
Finalize a rmw_topic_endpoint_info_t object.
The rmw_topic_endpoint_info_t struct has members which require memory to be allocated to them before setting values. This function reclaims any allocated resources within the object and zeroes out all other members.
If a non RMW_RET_OK return value is returned, the RMW error message will be set
[in,out] | topic_endpoint_info | object to be finalized |
[in] | allocator | the allocator used to allocate memory to the object |
RMW_RET_OK
on successfully reclaiming memory, or RMW_RET_INVALID_ARGUMENT
if any parameters are NULL, or RMW_RET_ERROR
when an unspecified error occurs. rmw_ret_t rmw_topic_endpoint_info_set_topic_type | ( | rmw_topic_endpoint_info_t * | topic_endpoint_info, |
const char * | topic_type, | ||
rcutils_allocator_t * | allocator | ||
) |
Set the topic_type in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_t has a member topic_type of type const char *; this function allocates memory and copies the value of param passed to it.
If a non RMW_RET_OK return value is returned, the RMW error message will be set
[in,out] | topic_endpoint_info | pointer to an initialized instance of rmw_topic_endpoint_info_t |
[in] | topic_type | the topic_type value to set in rmw_topic_endpoint_info_t |
[in] | allocator | the allocator that will be used to allocate memory |
RMW_RET_OK
on successfully setting the topic_type, or RMW_RET_INVALID_ARGUMENT
if any parameters are NULL, or RMW_RET_ERROR
when an unspecified error occurs. rmw_ret_t rmw_topic_endpoint_info_set_node_name | ( | rmw_topic_endpoint_info_t * | topic_endpoint_info, |
const char * | node_name, | ||
rcutils_allocator_t * | allocator | ||
) |
Set the node_name in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_t has a member node_name of type const char *; this function allocates memory and copies the value of param passed to it.
If a non RMW_RET_OK return value is returned, the RMW error message will be set
[in,out] | topic_endpoint_info | pointer to an initialized instance of rmw_topic_endpoint_info_t |
[in] | node_name | the node_name value to set in rmw_topic_endpoint_info_t |
[in] | allocator | the allocator that will be used to allocate memory |
RMW_RET_OK
on successfully setting the node_name, or RMW_RET_INVALID_ARGUMENT
if any parameters are NULL, or RMW_RET_ERROR
when an unspecified error occurs. rmw_ret_t rmw_topic_endpoint_info_set_node_namespace | ( | rmw_topic_endpoint_info_t * | topic_endpoint_info, |
const char * | node_namespace, | ||
rcutils_allocator_t * | allocator | ||
) |
Set the node_namespace in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_t has a member node_namespace of type const char *; this function allocates memory and copies the value of param passed to it.
If a non RMW_RET_OK return value is returned, the RMW error message will be set
[in,out] | topic_endpoint_info | pointer to an initialized instance of rmw_topic_endpoint_info_t |
[in] | node_namespace | the node_namespace value to set in rmw_topic_endpoint_info_t |
[in] | allocator | the allocator that will be used to allocate memory |
RMW_RET_OK
on successfully setting the node_namespace, or RMW_RET_INVALID_ARGUMENT
if any parameters are NULL, or RMW_RET_ERROR
when an unspecified error occurs. rmw_ret_t rmw_topic_endpoint_info_set_endpoint_type | ( | rmw_topic_endpoint_info_t * | topic_endpoint_info, |
rmw_endpoint_type_t | type | ||
) |
Set the gid in rmw_topic_endpoint_info_t.
Copies the values from gid into the gid member inside topic_endpoint_info.
If a non RMW_RET_OK return value is returned, the RMW error message will be set
[in,out] | topic_endpoint_info | pointer to an initialized instance of rmw_topic_endpoint_info_t |
[in] | gid | the gid value to set in rmw_topic_endpoint_info_t |
[in] | size | the size of the gid param |
RMW_RET_OK
on successfully setting the gid, or RMW_RET_INVALID_ARGUMENT
if any parameters are NULL, or RMW_RET_INVALID_ARGUMENT
size is greater than RMW_GID_STORAGE_SIZE, or RMW_RET_ERROR
when an unspecified error occurs. rmw_ret_t rmw_topic_endpoint_info_set_gid | ( | rmw_topic_endpoint_info_t * | topic_endpoint_info, |
const uint8_t | gid[], | ||
size_t | size | ||
) |
Set the gid in rmw_topic_endpoint_info_t.
Copies the values from gid into the gid member inside topic_endpoint_info.
If a non RMW_RET_OK return value is returned, the RMW error message will be set
[in,out] | topic_endpoint_info | pointer to an initialized instance of rmw_topic_endpoint_info_t |
[in] | gid | the gid value to set in rmw_topic_endpoint_info_t |
[in] | size | the size of the gid param |
RMW_RET_OK
on successfully setting the gid, or RMW_RET_INVALID_ARGUMENT
if any parameters are NULL, or RMW_RET_INVALID_ARGUMENT
size is greater than RMW_GID_STORAGE_SIZE, or RMW_RET_ERROR
when an unspecified error occurs. rmw_ret_t rmw_topic_endpoint_info_set_qos_profile | ( | rmw_topic_endpoint_info_t * | topic_endpoint_info, |
const rmw_qos_profile_t * | qos_profile | ||
) |
Set the qos_profile in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_t has a member qos_profile of type const rmw_qos_profile_t *. This function assigns the passed qos_profile pointer to the member.
If a non RMW_RET_OK return value is returned, the RMW error message will be set
[in,out] | topic_endpoint_info | pointer to an initialized instance of rmw_topic_endpoint_info_t |
[in] | qos_profile | the qos_profile to set in rmw_topic_endpoint_info_t |
RMW_RET_OK
on successfully setting the qos_profile, or RMW_RET_INVALID_ARGUMENT
if any parameters are NULL, or RMW_RET_ERROR
when an unspecified error occurs.