* protect state_machine_ with mutex lock.
protect state_handle_ with mutex lock.
reconsider mutex lock scope.
remove mutex lock from constructors.
lock just once during initialization of LifecycleNodeInterfaceImpl.
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
* Move updating of current_state to right after initialization.
This is slightly more correct in the case that registering one
of the services fails.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
We should only need to update the current state when it changes,
so we do that in the change_state method (which is not const).
Then we can just return the current_state_ object in
get_current_state, and then mark it as const.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Split lifecycle_node_interface_impl into header and implementation.
There is no reason it should all be in the header file. No
functional change.
* Mark LifecycleNodeInterfaceImpl as final.
* Update documentation about return codes.
* Mark a bunch of LifecycleNodeInterfaceImpl methods as const.
* Make most of LifecycleNodeInterfaceImpl private.
* Mark some LifecycleNode methods as const.
* Disable copies on LifecycleNodeInterfaceImpl.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>