|
SMACC2
|
#include <smacc_signal_detector.hpp>

Public Member Functions | |
| SignalDetector (SmaccFifoScheduler *scheduler, ExecutionModel executionModel=ExecutionModel::SINGLE_THREAD_SPINNER) | |
| void | initialize (ISmaccStateMachine *stateMachine) |
| void | setProcessorHandle (SmaccFifoScheduler::processor_handle processorHandle) |
| void | runThread () |
| void | join () |
| void | stop () |
| void | terminateScheduler () |
| void | pollingLoop () |
| template<typename EventType > | |
| void | postEvent (EventType *ev) |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () |
| void | notifyStateConfigured (ISmaccState *currentState) |
| void | notifyStateExited (ISmaccState *currentState) |
Private Member Functions | |
| void | pollOnce () |
| void | findUpdatableClientsAndComponents () |
| void | findUpdatableStateElements (ISmaccState *currentState) |
Private Attributes | |
| ISmaccStateMachine * | smaccStateMachine_ |
| std::vector< ISmaccUpdatable * > | updatableClients_ |
| std::vector< std::vector< ISmaccUpdatable * > > | updatableStateElements_ |
| std::atomic< int64_t > | lastState_ |
| double | loop_rate_hz |
| std::atomic< bool > | end_ |
| std::atomic< bool > | initialized_ |
| rclcpp::Publisher< smacc2_msgs::msg::SmaccStatus >::SharedPtr | statusPub_ |
| SmaccFifoScheduler * | scheduler_ |
| SmaccFifoScheduler::processor_handle | processorHandle_ |
| boost::thread | signalDetectorThread_ |
| ExecutionModel | executionModel_ |
Definition at line 37 of file smacc_signal_detector.hpp.
| smacc2::SignalDetector::SignalDetector | ( | SmaccFifoScheduler * | scheduler, |
| ExecutionModel | executionModel = ExecutionModel::SINGLE_THREAD_SPINNER ) |
Definition at line 49 of file signal_detector.cpp.
References end_, executionModel_, initialized_, loop_rate_hz, and scheduler_.
|
private |
findUpdatableClientsAndComponents()
Definition at line 80 of file signal_detector.cpp.
References smacc2::introspection::demangleType(), getLogger(), smacc2::ISmaccStateMachine::getOrthogonals(), smaccStateMachine_, and updatableClients_.
Referenced by initialize(), and pollOnce().


|
private |
findUpdatableClientBehaviors()
Definition at line 123 of file signal_detector.cpp.
References smacc2::introspection::demangleType(), smacc2::ISmaccState::getEventGenerators(), getLogger(), smacc2::ISmaccStateMachine::getOrthogonals(), smacc2::ISmaccState::getStateReactors(), smaccStateMachine_, and updatableStateElements_.
Referenced by notifyStateConfigured().


|
inline |
Definition at line 68 of file smacc_signal_detector.hpp.
References getNode().
Referenced by findUpdatableClientsAndComponents(), findUpdatableStateElements(), pollingLoop(), pollOnce(), and terminateScheduler().


| rclcpp::Node::SharedPtr smacc2::SignalDetector::getNode | ( | ) |
Definition at line 58 of file signal_detector.cpp.
References smacc2::ISmaccStateMachine::getNode(), and smaccStateMachine_.
Referenced by getLogger(), initialize(), pollingLoop(), and pollOnce().


| void smacc2::SignalDetector::initialize | ( | ISmaccStateMachine * | stateMachine | ) |
Definition at line 65 of file signal_detector.cpp.
References findUpdatableClientsAndComponents(), getNode(), initialized_, lastState_, loop_rate_hz, and smaccStateMachine_.
Referenced by smacc2::ISmaccStateMachine::ISmaccStateMachine().


| void smacc2::SignalDetector::join | ( | ) |
Definition at line 217 of file signal_detector.cpp.
References signalDetectorThread_.
| void smacc2::SignalDetector::notifyStateConfigured | ( | ISmaccState * | currentState | ) |
Definition at line 182 of file signal_detector.cpp.
References findUpdatableStateElements().
Referenced by smacc2::ISmaccStateMachine::notifyOnRuntimeConfigurationFinished().


| void smacc2::SignalDetector::notifyStateExited | ( | ISmaccState * | currentState | ) |
Definition at line 187 of file signal_detector.cpp.
References updatableStateElements_.
Referenced by smacc2::ISmaccStateMachine::notifyOnStateExited().

| void smacc2::SignalDetector::pollingLoop | ( | ) |
Definition at line 332 of file signal_detector.cpp.
References end_, executionModel_, getLogger(), getNode(), initialized_, loop_rate_hz, pollOnce(), and smacc2::SINGLE_THREAD_SPINNER.
Referenced by smacc2::run(), smacc2::run_async(), and runThread().


|
private |
poll()
Definition at line 245 of file signal_detector.cpp.
References smacc2::introspection::demangleType(), findUpdatableClientsAndComponents(), getLogger(), smacc2::ISmaccStateMachine::getNode(), getNode(), smacc2::ISmaccStateMachine::m_mutex_, smacc2_state_update_start, smaccStateMachine_, smacc2::STATE_CONFIGURING, smacc2::STATE_ENTERING, smacc2::STATE_EXITING, smacc2::ISmaccStateMachine::stateMachineCurrentAction, TRACEPOINT(), smacc2::TRANSITIONING, updatableClients_, and updatableStateElements_.
Referenced by pollingLoop().


|
inline |
Definition at line 61 of file smacc_signal_detector.hpp.
References processorHandle_, and scheduler_.
Referenced by smacc2::ISmaccStateMachine::postEvent().

| void smacc2::SignalDetector::runThread | ( | ) |
Definition at line 207 of file signal_detector.cpp.
References pollingLoop(), and signalDetectorThread_.

| void smacc2::SignalDetector::setProcessorHandle | ( | SmaccFifoScheduler::processor_handle | processorHandle | ) |
Definition at line 197 of file signal_detector.cpp.
References processorHandle_.
Referenced by smacc2::run(), and smacc2::run_async().

| void smacc2::SignalDetector::stop | ( | ) |
Definition at line 224 of file signal_detector.cpp.
References end_.
Referenced by smacc2::onSignalShutdown().

| void smacc2::SignalDetector::terminateScheduler | ( | ) |
Definition at line 231 of file signal_detector.cpp.
References getLogger(), and scheduler_.
Referenced by smacc2::run().


|
private |
Definition at line 91 of file smacc_signal_detector.hpp.
Referenced by pollingLoop(), SignalDetector(), and stop().
|
private |
Definition at line 105 of file smacc_signal_detector.hpp.
Referenced by pollingLoop(), and SignalDetector().
|
private |
Definition at line 93 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
|
private |
Definition at line 82 of file smacc_signal_detector.hpp.
Referenced by initialize().
|
private |
Definition at line 89 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
|
private |
Definition at line 101 of file smacc_signal_detector.hpp.
Referenced by postEvent(), and setProcessorHandle().
|
private |
Definition at line 99 of file smacc_signal_detector.hpp.
Referenced by postEvent(), SignalDetector(), and terminateScheduler().
|
private |
Definition at line 103 of file smacc_signal_detector.hpp.
Referenced by join(), and runThread().
|
private |
Definition at line 77 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), findUpdatableStateElements(), getNode(), initialize(), and pollOnce().
|
private |
Definition at line 95 of file smacc_signal_detector.hpp.
|
private |
Definition at line 79 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), and pollOnce().
|
private |
Definition at line 81 of file smacc_signal_detector.hpp.
Referenced by findUpdatableStateElements(), notifyStateExited(), and pollOnce().