54 RCLCPP_ERROR_STREAM(
logger_->get_logger(),
"Unhandled port drayage state: " <<
state_ <<
"!");
55 throw std::invalid_argument(
"Unhandled port drayage state");
std::function< void()> on_received_new_destination_
void processEvent(PortDrayageEvent event)
std::function< void()> on_drayage_completed_
void setOnDrayageCompletedCallback(const std::function< void()> &cb)
Set the callback to be invoked upon transitioning into the inactive state.
void setOnArrivedAtDestinationCallback(const std::function< void()> &cb)
Set the callback to be invoked upon transitioning into the AWAITING_DESTINATION state.
void setOnReceivedNewDestinationCallback(const std::function< void()> &cb)
Set the callback to be invoked upon transitioning into the EN_ROUTE state.
std::function< void()> on_system_startup_
void setOnSystemStartupCallback(const std::function< void()> &cb)
Set the callback to be invoked upon transitioning out of the inactive state.
std::function< void()> on_arrived_at_destination_
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger_
PortDrayageState getState() const
Get the current state of the state machine.
PortDrayageEvent
Enum containing the event values that cause changes in the PortDrayagePlugin state machine.
@ RECEIVED_NEW_DESTINATION
PortDrayageState
Enum containing the possible state values for the PortDrayagePlugin.
@ EN_ROUTE_TO_INITIAL_DESTINATION
@ EN_ROUTE_TO_RECEIVED_DESTINATION