expose explicit transition calls (#334)
This commit is contained in:
parent
a4f00dc574
commit
2847e4aefd
2 changed files with 60 additions and 0 deletions
|
@ -371,21 +371,46 @@ public:
|
|||
const State &
|
||||
trigger_transition(uint8_t transition_id);
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
const State &
|
||||
configure();
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
const State &
|
||||
cleanup();
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
const State &
|
||||
activate();
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
const State &
|
||||
deactivate();
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
const State &
|
||||
shutdown();
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
bool
|
||||
register_on_configure(std::function<rcl_lifecycle_ret_t(const State &)> fcn);
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
bool
|
||||
register_on_cleanup(std::function<rcl_lifecycle_ret_t(const State &)> fcn);
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
bool
|
||||
register_on_shutdown(std::function<rcl_lifecycle_ret_t(const State &)> fcn);
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
bool
|
||||
register_on_activate(std::function<rcl_lifecycle_ret_t(const State &)> fcn);
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
bool
|
||||
register_on_deactivate(std::function<rcl_lifecycle_ret_t(const State &)> fcn);
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
bool
|
||||
register_on_error(std::function<rcl_lifecycle_ret_t(const State &)> fcn);
|
||||
|
|
|
@ -305,6 +305,41 @@ LifecycleNode::trigger_transition(uint8_t transition_id)
|
|||
return impl_->trigger_transition(transition_id);
|
||||
}
|
||||
|
||||
const State &
|
||||
LifecycleNode::configure()
|
||||
{
|
||||
return impl_->trigger_transition(
|
||||
lifecycle_msgs::msg::Transition::TRANSITION_CONFIGURE);
|
||||
}
|
||||
|
||||
const State &
|
||||
LifecycleNode::cleanup()
|
||||
{
|
||||
return impl_->trigger_transition(
|
||||
lifecycle_msgs::msg::Transition::TRANSITION_CLEANUP);
|
||||
}
|
||||
|
||||
const State &
|
||||
LifecycleNode::activate()
|
||||
{
|
||||
return impl_->trigger_transition(
|
||||
lifecycle_msgs::msg::Transition::TRANSITION_ACTIVATE);
|
||||
}
|
||||
|
||||
const State &
|
||||
LifecycleNode::deactivate()
|
||||
{
|
||||
return impl_->trigger_transition(
|
||||
lifecycle_msgs::msg::Transition::TRANSITION_DEACTIVATE);
|
||||
}
|
||||
|
||||
const State &
|
||||
LifecycleNode::shutdown()
|
||||
{
|
||||
return impl_->trigger_transition(
|
||||
lifecycle_msgs::msg::Transition::TRANSITION_SHUTDOWN);
|
||||
}
|
||||
|
||||
void
|
||||
LifecycleNode::add_publisher_handle(
|
||||
std::shared_ptr<rclcpp_lifecycle::LifecyclePublisherInterface> pub)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue