rcl  master
C API providing common ROS client library functionality.
Classes | Macros | Typedefs | Functions
node_options.h File Reference
#include "rcl/allocator.h"
#include "rcl/arguments.h"
Include dependency graph for node_options.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rcl_node_options_t
 Structure which encapsulates the options for creating a rcl_node_t. More...
 

Macros

#define RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID   SIZE_MAX
 Constant which indicates that the default domain id should be used. More...
 

Typedefs

typedef struct rcl_node_options_t rcl_node_options_t
 Structure which encapsulates the options for creating a rcl_node_t. More...
 

Functions

rcl_node_options_t rcl_node_get_default_options (void)
 Return the default node options in a rcl_node_options_t. More...
 
rcl_ret_t rcl_node_options_copy (const rcl_node_options_t *options, rcl_node_options_t *options_out)
 Copy one options structure into another. More...
 
rcl_ret_t rcl_node_options_fini (rcl_node_options_t *options)
 Finalize the given node_options. More...
 

Macro Definition Documentation

◆ RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID

#define RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID   SIZE_MAX

Constant which indicates that the default domain id should be used.

Typedef Documentation

◆ rcl_node_options_t

Structure which encapsulates the options for creating a rcl_node_t.

Function Documentation

◆ rcl_node_get_default_options()

rcl_node_options_t rcl_node_get_default_options ( void  )

Return the default node options in a rcl_node_options_t.

The default values are:

◆ rcl_node_options_copy()

rcl_ret_t rcl_node_options_copy ( const rcl_node_options_t options,
rcl_node_options_t options_out 
)

Copy one options structure into another.


Attribute Adherence
Allocates Memory Yes
Thread-Safe No
Uses Atomics No
Lock-Free Yes
Parameters
[in]optionsThe structure to be copied. Its allocator is used to copy memory into the new structure.
[out]options_outAn options structure containing default values.
Returns
RCL_RET_OK if the structure was copied successfully, or
RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
RCL_RET_BAD_ALLOC if allocating memory failed, or
RCL_RET_ERROR if an unspecified error occurs.

◆ rcl_node_options_fini()

rcl_ret_t rcl_node_options_fini ( rcl_node_options_t options)

Finalize the given node_options.

The given node_options must be non-NULL and valid, i.e. had rcl_node_get_default_options() called on it but not this function yet.


Attribute Adherence
Allocates Memory Yes
Thread-Safe No
Uses Atomics Yes
Lock-Free Yes
Parameters
[in,out]node_optionsobject to be finalized
Returns
RCL_RET_OK if setup is successful, or
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
RCL_RET_ERROR if an unspecified error occurs.