|
SMACC2
|
#include <smacc_signal_detector.hpp>

Public Member Functions | |
| SignalDetector (SmaccFifoScheduler *scheduler) | |
| void | initialize (ISmaccStateMachine *stateMachine) |
| void | setProcessorHandle (SmaccFifoScheduler::processor_handle processorHandle) |
| void | runThread () |
| void | join () |
| void | stop () |
| void | pollingLoop () |
| void | pollOnce () |
| template<typename EventType > | |
| void | postEvent (EventType *ev) |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () |
Private Member Functions | |
| void | findUpdatableClientsAndComponents () |
| void | findUpdatableStateElements (ISmaccState *currentState) |
Private Attributes | |
| ISmaccStateMachine * | smaccStateMachine_ |
| std::vector< ISmaccUpdatable * > | updatableClients_ |
| std::vector< ISmaccUpdatable * > | updatableStateElements_ |
| std::atomic< unsigned long > | 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_ |
Definition at line 29 of file smacc_signal_detector.hpp.
| smacc2::SignalDetector::SignalDetector | ( | SmaccFifoScheduler * | scheduler | ) |
Definition at line 43 of file signal_detector.cpp.
References end_, initialized_, loop_rate_hz, and scheduler_.
|
private |
findUpdatableClientsAndComponents()
Definition at line 73 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 116 of file signal_detector.cpp.
References smacc2::introspection::demangleType(), smacc2::ISmaccState::getEventGenerators(), getLogger(), smacc2::ISmaccStateMachine::getOrthogonals(), smacc2::ISmaccState::getStateReactors(), smaccStateMachine_, and updatableStateElements_.
Referenced by pollOnce().


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


| rclcpp::Node::SharedPtr smacc2::SignalDetector::getNode | ( | ) |
Definition at line 51 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 58 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 197 of file signal_detector.cpp.
References signalDetectorThread_.
| void smacc2::SignalDetector::pollingLoop | ( | ) |
Definition at line 336 of file signal_detector.cpp.
References end_, getLogger(), getNode(), initialized_, loop_rate_hz, and pollOnce().
Referenced by smacc2::run(), and runThread().


| void smacc2::SignalDetector::pollOnce | ( | ) |
poll()
Definition at line 211 of file signal_detector.cpp.
References smacc2::introspection::demangleType(), findUpdatableClientsAndComponents(), findUpdatableStateElements(), smacc2::ISmaccStateMachine::getCurrentState(), smacc2::ISmaccStateMachine::getCurrentStateCounter(), getLogger(), getNode(), smacc2::ISmaccStateMachine::getNode(), lastState_, smacc2::ISmaccStateMachine::m_mutex_, smacc2_state_update_start, smaccStateMachine_, smacc2::STATE_CONFIGURING, smacc2::STATE_EXITING, smacc2::ISmaccStateMachine::stateMachineCurrentAction, TRACEPOINT(), smacc2::TRANSITIONING, updatableClients_, and updatableStateElements_.
Referenced by pollingLoop().


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

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

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

| void smacc2::SignalDetector::stop | ( | ) |
|
private |
Definition at line 75 of file smacc_signal_detector.hpp.
Referenced by pollingLoop(), SignalDetector(), and stop().
|
private |
Definition at line 77 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
|
private |
Definition at line 67 of file smacc_signal_detector.hpp.
Referenced by initialize(), and pollOnce().
|
private |
Definition at line 73 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
|
private |
Definition at line 85 of file smacc_signal_detector.hpp.
Referenced by postEvent(), and setProcessorHandle().
|
private |
Definition at line 83 of file smacc_signal_detector.hpp.
Referenced by postEvent(), and SignalDetector().
|
private |
Definition at line 87 of file smacc_signal_detector.hpp.
Referenced by join(), and runThread().
|
private |
Definition at line 61 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), findUpdatableStateElements(), getNode(), initialize(), and pollOnce().
|
private |
Definition at line 79 of file smacc_signal_detector.hpp.
|
private |
Definition at line 63 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), and pollOnce().
|
private |
Definition at line 65 of file smacc_signal_detector.hpp.
Referenced by findUpdatableStateElements(), and pollOnce().