27#include <lttng/tracepoint.h>
38using namespace std::chrono_literals;
63 lastState_ = std::numeric_limits<int64_t>::quiet_NaN();
96 std::vector<std::shared_ptr<ISmaccComponent>> components;
97 client->getComponents(components);
257 catch (
const std::exception &
e)
270 this->smaccStateMachine_->stateMachineCurrentAction !=
272 this->smaccStateMachine_->stateMachineCurrentAction !=
274 this->smaccStateMachine_->stateMachineCurrentAction !=
288 getLogger(),
"pollOnce update client behavior call: "
298 catch (std::exception &
ex)
304 rclcpp::spin_some(
nh);
316 rclcpp::Node::SharedPtr
_;
326 if (!
nh->get_parameter(
"signal_detector_loop_freq",
this->loop_rate_hz))
330 "Signal detector frequency (ros param signal_detector_loop_freq) was not set, using default "
338 getLogger(),
"Signal detector frequency (ros param signal_detector_loop_freq): %lf",
342 nh->set_parameter(rclcpp::Parameter(
"signal_detector_loop_freq", this->
loop_rate_hz));
351 while (rclcpp::ok() && !
end_)
356 rclcpp::spin_some(
nh);
364 rclcpp::executors::MultiThreadedExecutor
executor;
372 RCLCPP_INFO(rclcpp::get_logger(
"SMACC"),
"SignalDetector: SIGQUIT received");
StateMachineInternalAction stateMachineCurrentAction
rclcpp::Node::SharedPtr getNode()
const std::map< std::string, std::shared_ptr< smacc2::ISmaccOrthogonal > > & getOrthogonals() const
std::recursive_mutex m_mutex_
std::vector< std::shared_ptr< StateReactor > > & getStateReactors()
std::vector< std::shared_ptr< SmaccEventGenerator > > & getEventGenerators()
SmaccFifoScheduler * scheduler_
boost::thread signalDetectorThread_
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_
SignalDetector(SmaccFifoScheduler *scheduler, ExecutionModel executionModel=ExecutionModel::SINGLE_THREAD_SPINNER)
std::atomic< int64_t > lastState_
std::vector< ISmaccUpdatable * > updatableClients_
void setProcessorHandle(SmaccFifoScheduler::processor_handle processorHandle)
void findUpdatableStateElements(ISmaccState *currentState)
void findUpdatableClientsAndComponents()
ISmaccStateMachine * smaccStateMachine_
void notifyStateConfigured(ISmaccState *currentState)
std::atomic< bool > initialized_
std::string demangleType(const std::type_info *tinfo)
boost::statechart::fifo_scheduler< SmaccFifoWorker, SmaccAllocator > SmaccFifoScheduler
void TRACEPOINT(spinOnce)
smacc2_state_update_start