|
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) |
| void | notifyRosInitialized () |
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_ |
| std::atomic< bool > | rosInitialized_ |
| 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 64 of file signal_detector.cpp.
References end_, executionModel_, initialized_, loop_rate_hz, rosInitialized_, and scheduler_.
|
private |
findUpdatableClientsAndComponents()
Definition at line 96 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 139 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(), notifyRosInitialized(), pollingLoop(), pollOnce(), and terminateScheduler().


| rclcpp::Node::SharedPtr smacc2::SignalDetector::getNode | ( | ) |
Definition at line 74 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 81 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 239 of file signal_detector.cpp.
References signalDetectorThread_.
| void smacc2::SignalDetector::notifyRosInitialized | ( | ) |
Definition at line 208 of file signal_detector.cpp.
References getLogger(), and rosInitialized_.
Referenced by smacc2::ISmaccStateMachine::initializeROS().


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


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

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


|
private |
poll()
Definition at line 267 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, 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 229 of file signal_detector.cpp.
References pollingLoop(), and signalDetectorThread_.

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

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

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


|
private |
Definition at line 95 of file smacc_signal_detector.hpp.
Referenced by pollingLoop(), SignalDetector(), and stop().
|
private |
Definition at line 112 of file smacc_signal_detector.hpp.
Referenced by pollingLoop(), and SignalDetector().
|
private |
Definition at line 97 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
|
private |
Definition at line 86 of file smacc_signal_detector.hpp.
Referenced by initialize().
|
private |
Definition at line 93 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
|
private |
Definition at line 108 of file smacc_signal_detector.hpp.
Referenced by postEvent(), and setProcessorHandle().
|
private |
Definition at line 100 of file smacc_signal_detector.hpp.
Referenced by notifyRosInitialized(), pollingLoop(), and SignalDetector().
|
private |
Definition at line 106 of file smacc_signal_detector.hpp.
Referenced by postEvent(), SignalDetector(), and terminateScheduler().
|
private |
Definition at line 110 of file smacc_signal_detector.hpp.
Referenced by join(), and runThread().
|
private |
Definition at line 81 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), findUpdatableStateElements(), getNode(), initialize(), and pollOnce().
|
private |
Definition at line 102 of file smacc_signal_detector.hpp.
|
private |
Definition at line 83 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), and pollOnce().
|
private |
Definition at line 85 of file smacc_signal_detector.hpp.
Referenced by findUpdatableStateElements(), notifyStateExited(), and pollOnce().