29template <
typename DerivedStateMachine,
typename InitialStateType>
32 public sc::asynchronous_state_machine<
33 DerivedStateMachine, InitialStateType, SmaccFifoScheduler, SmaccAllocator>
38 sc::asynchronous_state_machine<
52 smacc2::run<DerivedStateMachine>();
74 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] Introspecting state machine via typeWalker");
75 this->buildStateMachineInfo<InitialStateType>();
77 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] initiate_impl");
82 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] Initializing ROS communication mechanisms");
86 auto transitionInfo = std::make_shared<SmaccTransitionInfo>();
87 transitionInfo->destinyState = this->
stateMachineInfo_->getState<InitialStateType>();
90 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] Initializing state machine");
91 sc::state_machine<DerivedStateMachine, InitialStateType, SmaccAllocator>::initiate();
void publishTransition(const SmaccTransitionInfo &transitionInfo)
rclcpp::Node::SharedPtr getNode()
virtual void onInitialize()
this function should be implemented by the user to create the orthogonals
rclcpp::Logger getLogger()
void initializeROS(std::string smshortname)
std::shared_ptr< SmaccStateMachineInfo > stateMachineInfo_
boost::statechart::processor_container< boost::statechart::fifo_scheduler<>, boost::function0< void >, std::allocator< boost::statechart::none > >::processor_context my_context
rclcpp::Node::SharedPtr globalNh_
std::allocator< boost::statechart::none > SmaccAllocator
std::string cleanShortTypeName(const std::type_info &tinfo)
boost::statechart::fifo_scheduler< SmaccFifoWorker, SmaccAllocator > SmaccFifoScheduler
SmaccStateMachineBase(my_context ctx, SignalDetector *signalDetector)
virtual ~SmaccStateMachineBase()
void initiate_impl() override