23#include <boost/thread.hpp>
25#include <smacc2_msgs/msg/smacc_status.hpp>
58 template <
typename EventType>
65 rclcpp::Node::SharedPtr
getNode();
93 rclcpp::Publisher<smacc2_msgs::msg::SmaccStatus>::SharedPtr
statusPub_;
113template <
typename StateMachineType>
125 SmaccFifoScheduler::processor_handle sm =
131 scheduler1.initiate_processor(sm);
134 boost::thread schedulerThread(boost::bind(&sc::fifo_scheduler<>::operator(), &scheduler1, 0));
146 SmaccFifoScheduler::processor_handle
sm;
149template <
typename StateMachineType>
166 ret->signalDetector->setProcessorHandle(
ret->sm);
168 ret->scheduler1->initiate_processor(
ret->sm);
171 ret->schedulerThread =
172 new boost::thread(boost::bind(&sc::fifo_scheduler<>::operator(),
ret->scheduler1,
NULL));
173 ret->signalDetectorLoop =
SmaccFifoScheduler * scheduler_
boost::thread signalDetectorThread_
void postEvent(EventType *ev)
void notifyStateExited(ISmaccState *currentState)
ExecutionModel executionModel_
void initialize(ISmaccStateMachine *stateMachine)
std::vector< std::vector< ISmaccUpdatable * > > updatableStateElements_
rclcpp::Logger getLogger()
rclcpp::Node::SharedPtr getNode()
SmaccFifoScheduler::processor_handle processorHandle_
std::atomic< int64_t > lastState_
std::vector< ISmaccUpdatable * > updatableClients_
void setProcessorHandle(SmaccFifoScheduler::processor_handle processorHandle)
rclcpp::Publisher< smacc2_msgs::msg::SmaccStatus >::SharedPtr statusPub_
void findUpdatableStateElements(ISmaccState *currentState)
void findUpdatableClientsAndComponents()
ISmaccStateMachine * smaccStateMachine_
void notifyStateConfigured(ISmaccState *currentState)
std::atomic< bool > initialized_
SmExecution * run_async()
void run(ExecutionModel executionModel=ExecutionModel::SINGLE_THREAD_SPINNER)
boost::statechart::fifo_scheduler< SmaccFifoWorker, SmaccAllocator > SmaccFifoScheduler
SmaccFifoScheduler::processor_handle sm
boost::thread * schedulerThread
boost::thread * signalDetectorLoop
SmaccFifoScheduler * scheduler1
SignalDetector * signalDetector