use rcl_allocator for rcl_lifecycle & namespaced topics (#142)
* use rcl_allocator for rcl_lifecycle * correct return value interpretation * fix unsigned comparison * use namespace for lifecycle in-built topics * linters
This commit is contained in:
parent
0f2519944a
commit
c37bfec072
13 changed files with 612 additions and 193 deletions
|
@ -44,6 +44,7 @@ typedef struct rcl_lifecycle_state_t
|
|||
// is "unconfigured_shutdown". However, the user only specifies
|
||||
// "shutdown". So we register the "unconfigured_shutdown"
|
||||
// transition with the impuls "shutdown".
|
||||
// TODO(karsten1987): Introduce new type for valid_transition_keys
|
||||
rcl_lifecycle_ret_t * valid_transition_keys;
|
||||
rcl_lifecycle_transition_t * valid_transitions;
|
||||
unsigned int valid_transition_size;
|
||||
|
@ -84,8 +85,6 @@ typedef struct rcl_lifecycle_state_machine_t
|
|||
rcl_lifecycle_transition_map_t transition_map;
|
||||
// Communication interface into a ROS world
|
||||
rcl_lifecycle_com_interface_t com_interface;
|
||||
// Allocator used.
|
||||
rcl_allocator_t allocator;
|
||||
} rcl_lifecycle_state_machine_t;
|
||||
|
||||
#if __cplusplus
|
||||
|
|
|
@ -40,14 +40,16 @@ rcl_lifecycle_state_machine_init(
|
|||
const rosidl_service_type_support_t * ts_srv_get_state,
|
||||
const rosidl_service_type_support_t * ts_srv_get_available_states,
|
||||
const rosidl_service_type_support_t * ts_srv_get_available_transitions,
|
||||
bool default_states);
|
||||
bool default_states,
|
||||
const rcl_allocator_t * allocator);
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
rcl_ret_t
|
||||
rcl_lifecycle_state_machine_fini(
|
||||
rcl_lifecycle_state_machine_t * state_machine,
|
||||
rcl_node_t * node_handle);
|
||||
rcl_node_t * node_handle,
|
||||
const rcl_allocator_t * allocator);
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
|
|
|
@ -25,17 +25,39 @@ extern "C"
|
|||
#endif
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
void
|
||||
rcl_lifecycle_register_state(
|
||||
rcl_lifecycle_transition_map_t * map,
|
||||
rcl_lifecycle_state_t state);
|
||||
RCL_WARN_UNUSED
|
||||
rcl_lifecycle_transition_map_t
|
||||
rcl_lifecycle_get_zero_initialized_transition_map();
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
void
|
||||
RCL_WARN_UNUSED
|
||||
rcl_ret_t
|
||||
rcl_lifecycle_transition_map_is_initialized(
|
||||
const rcl_lifecycle_transition_map_t * transition_map);
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
rcl_ret_t
|
||||
rcl_lifecycle_transition_map_fini(
|
||||
rcl_lifecycle_transition_map_t * transition_map,
|
||||
const rcl_allocator_t * allocator);
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
rcl_ret_t
|
||||
rcl_lifecycle_register_state(
|
||||
rcl_lifecycle_transition_map_t * map,
|
||||
rcl_lifecycle_state_t state,
|
||||
const rcl_allocator_t * allocator);
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
rcl_ret_t
|
||||
rcl_lifecycle_register_transition(
|
||||
rcl_lifecycle_transition_map_t * transition_map,
|
||||
rcl_lifecycle_transition_t transition,
|
||||
rcl_lifecycle_ret_t key);
|
||||
rcl_lifecycle_ret_t key,
|
||||
const rcl_allocator_t * allocator);
|
||||
|
||||
RCL_LIFECYCLE_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue