rmw
master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
|
#include <stdint.h>
#include "rcutils/allocator.h"
#include "rmw/domain_id.h"
#include "rmw/localhost.h"
#include "rmw/macros.h"
#include "rmw/ret_types.h"
#include "rmw/security_options.h"
#include "rmw/visibility_control.h"
Go to the source code of this file.
Classes | |
struct | rmw_init_options_t |
Options structure used during rmw_init(). More... | |
Typedefs | |
typedef struct rmw_init_options_impl_t | rmw_init_options_impl_t |
Implementation defined options structure used during rmw_init(). More... | |
typedef struct RMW_PUBLIC_TYPE rmw_init_options_t | rmw_init_options_t |
Options structure used during rmw_init(). More... | |
Functions | |
rmw_init_options_t | rmw_get_zero_initialized_init_options (void) |
Return a zero initialized init options structure. More... | |
rmw_ret_t | rmw_init_options_init (rmw_init_options_t *init_options, rcutils_allocator_t allocator) |
Initialize given init options with the default values and implementation specific values. More... | |
rmw_ret_t | rmw_init_options_copy (const rmw_init_options_t *src, rmw_init_options_t *dst) |
Copy the given source init options to the destination init options. More... | |
rmw_ret_t | rmw_init_options_fini (rmw_init_options_t *init_options) |
Finalize the given init options. More... | |
typedef struct rmw_init_options_impl_t rmw_init_options_impl_t |
Implementation defined options structure used during rmw_init().
This should be defined by the rmw implementation.
typedef struct RMW_PUBLIC_TYPE rmw_init_options_t rmw_init_options_t |
Options structure used during rmw_init().
rmw_init_options_t rmw_get_zero_initialized_init_options | ( | void | ) |
Return a zero initialized init options structure.
rmw_ret_t rmw_init_options_init | ( | rmw_init_options_t * | init_options, |
rcutils_allocator_t | allocator | ||
) |
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.
RMW_RET_INVALID_ARGUMENT
.Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes |
This should be defined by the rmw implementation.
[in,out] | init_options | object to be setup |
[in] | allocator | to be used during setup and during initialization |
RMW_RET_OK
if setup is successful, or RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or RMW_RET_BAD_ALLOC
if allocating memory failed, or RMW_RET_ERROR
if an unspecified error occurs. rmw_ret_t rmw_init_options_copy | ( | const rmw_init_options_t * | src, |
rmw_init_options_t * | dst | ||
) |
Copy the given source init options to the destination init options.
The allocator from the source is used for any allocations and stored in the destination.
rmw_init_options_init()
called on. RMW_RET_INVALID_ARGUMENT
. RMW_RET_INVALID_ARGUMENT
.Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes |
This should be defined by the rmw implementation.
[in] | src | rcl_init_options_t object to be copied from |
[out] | dst | rcl_init_options_t object to be copied into |
RMW_RET_OK
if the copy is successful, or RMW_RET_INCORRECT_RMW_IMPLEMENTATION
if the implementation identifier for src does not match the implementation of this function, or RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or RMW_RET_BAD_ALLOC
if allocating memory failed, or RMW_RET_ERROR
if an unspecified error occurs. rmw_ret_t rmw_init_options_fini | ( | rmw_init_options_t * | init_options | ) |
Finalize the given init options.
This function will return early if a logical error, such as RMW_RET_INVALID_ARGUMENT
or RMW_RET_INCORRECT_RMW_IMPLEMENTATION
, ensues, leaving the given init options unchanged. Otherwise, it will proceed despite errors, freeing as much resources as it can and zero initializing the given init options.
rmw_init_options_init()
called on.RMW_RET_INVALID_ARGUMENT
is returned.Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes |
This should be defined by the rmw implementation.
[in,out] | init_options | object to finalized |
RMW_RET_OK
if finalization is successful, or RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or RMW_RET_INCORRECT_RMW_IMPLEMENTATION
if the implementation identifier does not match the implementation of this function, or RMW_RET_ERROR
if an unspecified error occurs.