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

#include <cb_timer_countdown_once.hpp>

Inheritance diagram for cl_ros2_timer::CbTimerCountdownOnce:
Inheritance graph
Collaboration diagram for cl_ros2_timer::CbTimerCountdownOnce:
Collaboration graph

Public Member Functions

 CbTimerCountdownOnce (int64_t triggerTickCount)
 
void onEntry () override
 
void onExit () override
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
template<typename T >
boost::signals2::connection onTimerTick (void(T::*callback)(), T *object)
 
- 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 Member Functions

void onClientTimerTickCallback ()
 

Private Attributes

int64_t tickCounter_
 
int64_t tickTriggerCount_
 
ClRos2TimertimerClient_
 
std::function< void()> postCountDownEvent_
 
smacc2::SmaccSignal< void()> onTimerTick_
 

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_timer_countdown_once.hpp.

Constructor & Destructor Documentation

◆ CbTimerCountdownOnce()

cl_ros2_timer::CbTimerCountdownOnce::CbTimerCountdownOnce ( int64_t triggerTickCount)
inline

Member Function Documentation

◆ onClientTimerTickCallback()

void cl_ros2_timer::CbTimerCountdownOnce::onClientTimerTickCallback ( )
inlineprivate

Definition at line 64 of file cb_timer_countdown_once.hpp.

65 {
67
69 {
72 }
73 }

References onTimerTick_, postCountDownEvent_, tickCounter_, and tickTriggerCount_.

Referenced by onEntry().

Here is the caller graph for this function:

◆ onEntry()

void cl_ros2_timer::CbTimerCountdownOnce::onEntry ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 30 of file cb_timer_countdown_once.hpp.

31 {
33
34 // Get the core timer component
36 this->requiresComponent(timerComponent);
37
38 // Connect to the core timer component
40 }
void requiresComponent(SmaccComponentType *&storage, bool throwExceptionIfNotExist)
void requiresClient(SmaccClientType *&storage)
boost::signals2::connection onTimerTick(void(T::*callback)(), T *object)

References onClientTimerTickCallback(), smacc2::client_core_components::CpRos2Timer::onTimerTick(), smacc2::ISmaccClientBehavior::requiresClient(), smacc2::ISmaccClientBehavior::requiresComponent(), and timerClient_.

Here is the call graph for this function:

◆ onExit()

void cl_ros2_timer::CbTimerCountdownOnce::onExit ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 42 of file cb_timer_countdown_once.hpp.

42{}

◆ onStateOrthogonalAllocation()

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

Definition at line 45 of file cb_timer_countdown_once.hpp.

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

Here is the call graph for this function:

◆ onTimerTick()

template<typename T >
boost::signals2::connection cl_ros2_timer::CbTimerCountdownOnce::onTimerTick ( void(T::* callback )(),
T * object )
inline

Definition at line 52 of file cb_timer_countdown_once.hpp.

53 {
54 return this->getStateMachine()->createSignalConnection(onTimerTick_, callback, object);
55 }
boost::signals2::connection createSignalConnection(TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object)

References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClientBehavior::getStateMachine(), and onTimerTick_.

Here is the call graph for this function:

Member Data Documentation

◆ onTimerTick_

smacc2::SmaccSignal<void()> cl_ros2_timer::CbTimerCountdownOnce::onTimerTick_
private

Definition at line 63 of file cb_timer_countdown_once.hpp.

Referenced by onClientTimerTickCallback(), and onTimerTick().

◆ postCountDownEvent_

std::function<void()> cl_ros2_timer::CbTimerCountdownOnce::postCountDownEvent_
private

◆ tickCounter_

int64_t cl_ros2_timer::CbTimerCountdownOnce::tickCounter_
private

Definition at line 58 of file cb_timer_countdown_once.hpp.

Referenced by onClientTimerTickCallback().

◆ tickTriggerCount_

int64_t cl_ros2_timer::CbTimerCountdownOnce::tickTriggerCount_
private

Definition at line 59 of file cb_timer_countdown_once.hpp.

Referenced by onClientTimerTickCallback().

◆ timerClient_

ClRos2Timer* cl_ros2_timer::CbTimerCountdownOnce::timerClient_
private

Definition at line 61 of file cb_timer_countdown_once.hpp.

Referenced by onEntry().


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