| 
    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 | 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< uint64_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  | 
        ||
| ) | 
SignalDetector()
Definition at line 44 of file signal_detector.cpp.
References end_, executionModel_, initialized_, loop_rate_hz, and scheduler_.
      
  | 
  private | 
findUpdatableClientsAndComponents()
Definition at line 75 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 118 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 66 of file smacc_signal_detector.hpp.
References getNode().
Referenced by findUpdatableClientsAndComponents(), findUpdatableStateElements(), pollingLoop(), and pollOnce().


| rclcpp::Node::SharedPtr smacc2::SignalDetector::getNode | ( | ) | 
Definition at line 53 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 60 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 212 of file signal_detector.cpp.
References signalDetectorThread_.
| void smacc2::SignalDetector::notifyStateConfigured | ( | ISmaccState * | currentState | ) | 
Definition at line 177 of file signal_detector.cpp.
References findUpdatableStateElements().
Referenced by smacc2::ISmaccStateMachine::notifyOnRuntimeConfigurationFinished().


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

| void smacc2::SignalDetector::pollingLoop | ( | ) | 
Definition at line 313 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 226 of file signal_detector.cpp.
References smacc2::introspection::demangleType(), findUpdatableClientsAndComponents(), getLogger(), getNode(), smacc2::ISmaccStateMachine::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 59 of file smacc_signal_detector.hpp.
References processorHandle_, and scheduler_.
Referenced by smacc2::ISmaccStateMachine::postEvent().

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

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

| void smacc2::SignalDetector::stop | ( | ) | 
      
  | 
  private | 
Definition at line 89 of file smacc_signal_detector.hpp.
Referenced by pollingLoop(), SignalDetector(), and stop().
      
  | 
  private | 
Definition at line 103 of file smacc_signal_detector.hpp.
Referenced by pollingLoop(), and SignalDetector().
      
  | 
  private | 
Definition at line 91 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
      
  | 
  private | 
Definition at line 80 of file smacc_signal_detector.hpp.
Referenced by initialize().
      
  | 
  private | 
Definition at line 87 of file smacc_signal_detector.hpp.
Referenced by initialize(), pollingLoop(), and SignalDetector().
      
  | 
  private | 
Definition at line 99 of file smacc_signal_detector.hpp.
Referenced by postEvent(), and setProcessorHandle().
      
  | 
  private | 
Definition at line 97 of file smacc_signal_detector.hpp.
Referenced by postEvent(), and SignalDetector().
      
  | 
  private | 
Definition at line 101 of file smacc_signal_detector.hpp.
Referenced by join(), and runThread().
      
  | 
  private | 
Definition at line 75 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), findUpdatableStateElements(), getNode(), initialize(), and pollOnce().
      
  | 
  private | 
Definition at line 93 of file smacc_signal_detector.hpp.
      
  | 
  private | 
Definition at line 77 of file smacc_signal_detector.hpp.
Referenced by findUpdatableClientsAndComponents(), and pollOnce().
      
  | 
  private | 
Definition at line 79 of file smacc_signal_detector.hpp.
Referenced by findUpdatableStateElements(), notifyStateExited(), and pollOnce().