SMACC2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
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
 
- 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=false)
 
virtual void onEntry ()
 
virtual void onExit ()
 
virtual void executeOnEntry ()
 
virtual void executeOnExit ()
 

Public Attributes

WaypointNavigatorwaypointsNavigator_
 
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()

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< std::string > seekWaypointName_
std::optional< int > count_

◆ ~CbSeekWaypoint()

cl_nav2z::CbSeekWaypoint::~CbSeekWaypoint ( )
virtual

Definition at line 30 of file cb_seek_waypoint.cpp.

30{}

Member Function Documentation

◆ onEntry()

void cl_nav2z::CbSeekWaypoint::onEntry ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 32 of file cb_seek_waypoint.cpp.

33{
34 cl_nav2z::ClNav2Z * nav2zClient_;
35 this->requiresClient(nav2zClient_);
36 waypointsNavigator_ = nav2zClient_->getComponent<WaypointNavigator>();
37
38 if (count_)
39 {
41 count_ = std::nullopt;
42 }
43 else if (seekWaypointName_)
44 {
46 seekWaypointName_ = std::nullopt;
47 }
48}
WaypointNavigator * waypointsNavigator_
void seekName(std::string name)
void requiresClient(SmaccClientType *&storage)
TComponent * getComponent()

References count_, cl_nav2z::WaypointNavigator::forward(), smacc2::ISmaccClient::getComponent(), smacc2::ISmaccClientBehavior::requiresClient(), cl_nav2z::WaypointNavigator::seekName(), seekWaypointName_, and waypointsNavigator_.

Here is the call graph for this function:

◆ onExit()

void cl_nav2z::CbSeekWaypoint::onExit ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 50 of file cb_seek_waypoint.cpp.

50{}

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_

WaypointNavigator* 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: