SMACC2
Loading...
Searching...
No Matches
cl_ros2_timer::CbTimer Class Reference

#include <cb_ros2_timer.hpp>

Inheritance diagram for cl_ros2_timer::CbTimer:
Inheritance graph
Collaboration diagram for cl_ros2_timer::CbTimer:
Collaboration graph

Public Member Functions

void onEntry () override
 
void onExit () override
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
void onClientTimerTickCallback ()
 
- Public Member Functions inherited from smacc2::SmaccClientBehavior
virtual ~SmaccClientBehavior ()
 
void onEntry () override
 
void onExit () override
 
- Public Member Functions inherited from smacc2::ISmaccClientBehavior
 ISmaccClientBehavior ()
 
virtual ~ISmaccClientBehavior ()
 
ISmaccStateMachinegetStateMachine ()
 
std::string getName () const
 
template<typename SmaccClientType >
void requiresClient (SmaccClientType *&storage)
 
template<typename SmaccComponentType >
void requiresComponent (SmaccComponentType *&storage, bool throwExceptionIfNotExist)
 
template<typename SmaccComponentType >
void requiresComponent (SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
 
virtual void executeOnEntry ()
 
virtual void executeOnExit ()
 

Private Attributes

ClRos2TimertimerClient_
 
std::function< void()> postTimerEvent_
 
boost::signals2::scoped_connection c_
 

Additional Inherited Members

- Protected Member Functions inherited from smacc2::ISmaccClientBehavior
virtual void runtimeConfigure ()
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
ISmaccStategetCurrentState ()
 
virtual void dispose ()
 
virtual rclcpp::Node::SharedPtr getNode () const
 
virtual rclcpp::Logger getLogger () const
 

Detailed Description

Definition at line 22 of file cb_ros2_timer.hpp.

Member Function Documentation

◆ onClientTimerTickCallback()

void cl_ros2_timer::CbTimer::onClientTimerTickCallback ( )
inline

Definition at line 46 of file cb_ros2_timer.hpp.

46{ this->postTimerEvent_(); }
std::function< void()> postTimerEvent_

References postTimerEvent_.

Referenced by onEntry().

Here is the caller graph for this function:

◆ onEntry()

void cl_ros2_timer::CbTimer::onEntry ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 25 of file cb_ros2_timer.hpp.

26 {
28
29 // Get the timer listener component
31 this->requiresComponent(timerListener);
32
33 // Connect to the timer listener component
35 }
boost::signals2::connection onTimerCompleted(void(T::*callback)(), T *object)
void requiresComponent(SmaccComponentType *&storage, bool throwExceptionIfNotExist)
void requiresClient(SmaccClientType *&storage)

References onClientTimerTickCallback(), cl_ros2_timer::components::CpTimerListener1::onTimerCompleted(), smacc2::ISmaccClientBehavior::requiresClient(), smacc2::ISmaccClientBehavior::requiresComponent(), and timerClient_.

Here is the call graph for this function:

◆ onExit()

void cl_ros2_timer::CbTimer::onExit ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 37 of file cb_ros2_timer.hpp.

37{}

◆ onStateOrthogonalAllocation()

template<typename TOrthogonal , typename TSourceObject >
void cl_ros2_timer::CbTimer::onStateOrthogonalAllocation ( )
inline

Definition at line 40 of file cb_ros2_timer.hpp.

41 {
42 this->postTimerEvent_ = [this]()
44 }

References smacc2::ISmaccClientBehavior::postEvent(), and postTimerEvent_.

Here is the call graph for this function:

Member Data Documentation

◆ c_

boost::signals2::scoped_connection cl_ros2_timer::CbTimer::c_
private

Definition at line 51 of file cb_ros2_timer.hpp.

◆ postTimerEvent_

std::function<void()> cl_ros2_timer::CbTimer::postTimerEvent_
private

Definition at line 50 of file cb_ros2_timer.hpp.

Referenced by onClientTimerTickCallback(), and onStateOrthogonalAllocation().

◆ timerClient_

ClRos2Timer* cl_ros2_timer::CbTimer::timerClient_
private

Definition at line 49 of file cb_ros2_timer.hpp.

Referenced by onEntry().


The documentation for this class was generated from the following file: