#include "rmw/init.h"
#include "rcl/allocator.h"
#include "rcl/macros.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
Go to the source code of this file.
◆ rcl_init_options_init()
Initialize given init_options with the default values and implementation specific values.
The given allocator is used, if required, during setup of the init options, but is also used during initialization.
In either case the given allocator is stored in the returned init options.
The impl
pointer should not be changed manually.
Attribute | Adherence |
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes |
- Parameters
-
[in,out] | init_options | object to be setup |
[in] | allocator | to be used during setup and during initialization |
- Returns
- RCL_RET_OK if setup is successful, or
-
RCL_RET_ALREADY_INIT if init_options has already be initialized, or
-
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
-
RCL_RET_BAD_ALLOC if allocating memory failed, or
-
RCL_RET_ERROR if an unspecified error occurs.
◆ rcl_init_options_copy()
◆ rcl_init_options_fini()
Finalize the given init_options.
The given init_options must be non-NULL
and valid, i.e. had rcl_init_options_init() 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] | init_options | object to be setup |
- 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.
◆ rcl_init_options_get_domain_id()
Return the domain_id stored in the init options.
Get the domain id from the specified rcl_init_options_t object.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | Yes |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | init_options | object from which the domain id should be retrieved. |
[out] | domain_id | domain id to be set in init_options object. |
- Returns
- RCL_RET_OK if successful, or
-
RCL_RET_INVALID_ARGUMENT if any arguments are invalid.
◆ rcl_init_options_set_domain_id()
Set a domain id in the init options provided.
Store the domain id in the specified init_options object.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | Yes |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | init_options | objects in which to set the specified domain id. |
[in] | domain_id | domain id to be set in init_options object. |
- Returns
- RCL_RET_OK if successful, or
-
RCL_RET_INVALID_ARGUMENT if any arguments are invalid.
◆ rcl_init_options_get_rmw_init_options()
Return the rmw init options which are stored internally.
This function can fail and return NULL
if:
- init_options is NULL
- init_options is invalid, e.g. init_options->impl is NULL
If NULL is returned an error message will have been set.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes |
- Parameters
-
[in] | init_options | object from which the rmw init options should be retrieved |
- Returns
- pointer to the the rcl init options, or
-
NULL
if there was an error
◆ rcl_init_options_get_allocator()
Return the allocator stored in the init_options.
This function can fail and return NULL
if:
- init_options is NULL
- init_options is invalid, e.g. init_options->impl is NULL
If NULL is returned an error message will have been set.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | Yes |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | init_options | object from which the allocator should be retrieved |
- Returns
- pointer to the rcl allocator, or
-
NULL
if there was an error