rmw
master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
|
#include "rmw/macros.h"
#include "rmw/names_and_types.h"
#include "rmw/types.h"
#include "rmw/visibility_control.h"
Go to the source code of this file.
Functions | |
rmw_ret_t | rmw_get_subscriber_names_and_types_by_node (const rmw_node_t *node, rcutils_allocator_t *allocator, const char *node_name, const char *node_namespace, bool demangle, rmw_names_and_types_t *topics_names_and_types) |
Return a list of subscribed topic names and their types. More... | |
rmw_ret_t | rmw_get_publisher_names_and_types_by_node (const rmw_node_t *node, rcutils_allocator_t *allocator, const char *node_name, const char *node_namespace, bool demangle, rmw_names_and_types_t *topic_names_and_types) |
Return a list of published topic names and their types. More... | |
rmw_ret_t | rmw_get_service_names_and_types_by_node (const rmw_node_t *node, rcutils_allocator_t *allocator, const char *node_name, const char *node_namespace, rmw_names_and_types_t *service_names_and_types) |
Return a list of service topic names and their types. More... | |
rmw_ret_t | rmw_get_client_names_and_types_by_node (const rmw_node_t *node, rcutils_allocator_t *allocator, const char *node_name, const char *node_namespace, rmw_names_and_types_t *service_names_and_types) |
Return a list of service client topic names and their types. More... | |
rmw_ret_t rmw_get_subscriber_names_and_types_by_node | ( | const rmw_node_t * | node, |
rcutils_allocator_t * | allocator, | ||
const char * | node_name, | ||
const char * | node_namespace, | ||
bool | demangle, | ||
rmw_names_and_types_t * | topics_names_and_types | ||
) |
Return a list of subscribed topic names and their types.
This function returns a list of subscribed topic names and their types.
The node parameter must not be NULL
, and must point to a valid node.
The topic_names_and_types parameter must be allocated and zero initialized. The topic_names_and_types is the output for this function, and contains allocated memory. Therefore, it should be passed to rmw_names_and_types_fini() when it is no longer needed. Failing to do so will result in leaked memory.
[in] | node | the handle to the node being used to query the ROS graph |
[in] | allocator | allocator to be used when allocating space for strings |
[in] | node_name | the name of the node to get information for |
[in] | node_namespace | the namespace of the node to get information for |
[in] | no_demangle | if true, list all topics without any demangling |
[out] | topic_names_and_types | list of topic names and their types the node_name is subscribed to |
RMW_RET_OK
if the query was successful, or RMW_RET_INVALID_ARGUMENT
if the node is invalid, or RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or RMW_RET_NODE_NAME_NON_EXISTENT
if the node name wasn't found, or RMW_RET_BAD_ALLOC
if memory allocation fails, or RMW_RET_ERROR
if an unspecified error occurs. rmw_ret_t rmw_get_publisher_names_and_types_by_node | ( | const rmw_node_t * | node, |
rcutils_allocator_t * | allocator, | ||
const char * | node_name, | ||
const char * | node_namespace, | ||
bool | demangle, | ||
rmw_names_and_types_t * | topic_names_and_types | ||
) |
Return a list of published topic names and their types.
This function returns a list of published topic names and their types.
The node parameter must not be NULL
, and must point to a valid node.
The topic_names_and_types parameter must be allocated and zero initialized. The topic_names_and_types is the output for this function, and contains allocated memory. Therefore, it should be passed to rmw_names_and_types_fini() when it is no longer needed. Failing to do so will result in leaked memory.
[in] | node | the handle to the node being used to query the ROS graph |
[in] | allocator | allocator to be used when allocating space for strings |
[in] | node_name | the name of the node to get information for |
[in] | node_namespace | the namespace of the node to get information for |
[in] | no_demangle | if true, list all topics without any demangling |
[out] | topic_names_and_types | list of topic names and their types the node_name is publishing |
RMW_RET_OK
if the query was successful, or RMW_RET_INVALID_ARGUMENT
if the node is invalid, or RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or RMW_RET_NODE_NAME_NON_EXISTENT
if the node name wasn't found, or RMW_RET_BAD_ALLOC
if memory allocation fails, or RMW_RET_ERROR
if an unspecified error occurs. rmw_ret_t rmw_get_service_names_and_types_by_node | ( | const rmw_node_t * | node, |
rcutils_allocator_t * | allocator, | ||
const char * | node_name, | ||
const char * | node_namespace, | ||
rmw_names_and_types_t * | service_names_and_types | ||
) |
Return a list of service topic names and their types.
This function returns a list of service topic names and their types.
The node parameter must not be NULL
, and must point to a valid node.
The topic_names_and_types parameter must be allocated and zero initialized. The topic_names_and_types is the output for this function, and contains allocated memory. Therefore, it should be passed to rmw_names_and_types_fini() when it is no longer needed. Failing to do so will result in leaked memory.
[in] | node | the handle to the node being used to query the ROS graph |
[in] | allocator | allocator to be used when allocating space for strings |
[in] | node_name | the name of the node to get information for |
[in] | node_namespace | the namespace of the node to get information for |
[out] | topic_names_and_types | list of topic names and their types the node_name has created a service for |
RMW_RET_OK
if the query was successful, or RMW_RET_INVALID_ARGUMENT
if the node is invalid, or RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or RMW_RET_NODE_NAME_NON_EXISTENT
if the node name wasn't found, or RMW_RET_BAD_ALLOC
if memory allocation fails, or RMW_RET_ERROR
if an unspecified error occurs. rmw_ret_t rmw_get_client_names_and_types_by_node | ( | const rmw_node_t * | node, |
rcutils_allocator_t * | allocator, | ||
const char * | node_name, | ||
const char * | node_namespace, | ||
rmw_names_and_types_t * | service_names_and_types | ||
) |
Return a list of service client topic names and their types.
This function returns a list of service client topic names and their types.
The node parameter must not be NULL
, and must point to a valid node.
The topic_names_and_types parameter must be allocated and zero initialized. The topic_names_and_types is the output for this function, and contains allocated memory. Therefore, it should be passed to rmw_names_and_types_fini() when it is no longer needed. Failing to do so will result in leaked memory.
[in] | node | the handle to the node being used to query the ROS graph |
[in] | allocator | allocator to be used when allocating space for strings |
[in] | node_name | the name of the node to get information for |
[in] | node_namespace | the namespace of the node to get information for |
[out] | topic_names_and_types | list of topic names and their types the node_name has created a service client for |
RMW_RET_OK
if the query was successful, or RMW_RET_INVALID_ARGUMENT
if the node is invalid, or RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or RMW_RET_NODE_NAME_NON_EXISTENT
if the node name wasn't found, or RMW_RET_BAD_ALLOC
if memory allocation fails, or RMW_RET_ERROR
if an unspecified error occurs.