SMACC2
Loading...
Searching...
No Matches
cl_nav2z::CbSeekWaypoint Class Reference

#include <cb_seek_waypoint.hpp>

Inheritance diagram for cl_nav2z::CbSeekWaypoint:
Inheritance graph
Collaboration diagram for cl_nav2z::CbSeekWaypoint:
Collaboration graph

Public Member Functions

 CbSeekWaypoint (std::string skip_until_name)
 
virtual ~CbSeekWaypoint ()
 
void onEntry () override
 
void onExit () override
 
 CbSeekWaypoint (std::string skip_until_name)
 
virtual ~CbSeekWaypoint ()
 
void onEntry () override
 
void onExit () override
 
- 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 ()
 

Public Attributes

CpWaypointNavigatorwaypointsNavigator_
 
NavigateNextWaypointOptions options_
 

Private Attributes

std::optional< int > count_
 
std::optional< std::string > seekWaypointName_
 

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 29 of file cb_seek_waypoint.hpp.

Constructor & Destructor Documentation

◆ CbSeekWaypoint() [1/2]

cl_nav2z::CbSeekWaypoint::CbSeekWaypoint ( std::string skip_until_name)

Definition at line 25 of file cb_seek_waypoint.cpp.

26: count_(std::nullopt), seekWaypointName_(seekWaypointName)
27{
28}
std::optional< int > count_
std::optional< std::string > seekWaypointName_

◆ ~CbSeekWaypoint() [1/2]

cl_nav2z::CbSeekWaypoint::~CbSeekWaypoint ( )
virtual

Definition at line 30 of file cb_seek_waypoint.cpp.

30{}

◆ CbSeekWaypoint() [2/2]

cl_nav2z::CbSeekWaypoint::CbSeekWaypoint ( std::string skip_until_name)

◆ ~CbSeekWaypoint() [2/2]

virtual cl_nav2z::CbSeekWaypoint::~CbSeekWaypoint ( )
virtual

Member Function Documentation

◆ onEntry() [1/2]

void cl_nav2z::CbSeekWaypoint::onEntry ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 32 of file cb_seek_waypoint.cpp.

33{
34 this->requiresComponent(waypointsNavigator_, ComponentRequirement::HARD);
35
36 if (count_)
37 {
39 count_ = std::nullopt;
40 }
41 else if (seekWaypointName_)
42 {
44 seekWaypointName_ = std::nullopt;
45 }
46}
CpWaypointNavigator * waypointsNavigator_
void requiresComponent(SmaccComponentType *&storage, bool throwExceptionIfNotExist)

References count_, cl_nav2z::CpWaypointNavigatorBase::forward(), smacc2::ISmaccClientBehavior::requiresComponent(), cl_nav2z::CpWaypointNavigatorBase::seekName(), seekWaypointName_, and waypointsNavigator_.

Here is the call graph for this function:

◆ onEntry() [2/2]

void cl_nav2z::CbSeekWaypoint::onEntry ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

◆ onExit() [1/2]

void cl_nav2z::CbSeekWaypoint::onExit ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 48 of file cb_seek_waypoint.cpp.

48{}

◆ onExit() [2/2]

void cl_nav2z::CbSeekWaypoint::onExit ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Member Data Documentation

◆ count_

std::optional< int > cl_nav2z::CbSeekWaypoint::count_
private

Definition at line 45 of file cb_seek_waypoint.hpp.

Referenced by onEntry().

◆ options_

NavigateNextWaypointOptions cl_nav2z::CbSeekWaypoint::options_

Definition at line 42 of file cb_seek_waypoint.hpp.

◆ seekWaypointName_

std::optional< std::string > cl_nav2z::CbSeekWaypoint::seekWaypointName_
private

Definition at line 46 of file cb_seek_waypoint.hpp.

Referenced by onEntry().

◆ waypointsNavigator_

CpWaypointNavigator * cl_nav2z::CbSeekWaypoint::waypointsNavigator_

Definition at line 40 of file cb_seek_waypoint.hpp.

Referenced by onEntry().


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