SMACC2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
cl_nitrosz::CbSeekWaypoint Class Reference

#include <cb_seek_waypoint.hpp>

Inheritance diagram for cl_nitrosz::CbSeekWaypoint:
Inheritance graph
Collaboration diagram for cl_nitrosz::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 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()

cl_nitrosz::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()

cl_nitrosz::CbSeekWaypoint::~CbSeekWaypoint ( )
virtual

Definition at line 30 of file cb_seek_waypoint.cpp.

30{}

Member Function Documentation

◆ onEntry()

void cl_nitrosz::CbSeekWaypoint::onEntry ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 32 of file cb_seek_waypoint.cpp.

33{
34 cl_nitrosz::ClNitrosZ * nitroszClient_;
35 this->requiresClient(nitroszClient_);
36 waypointsNavigator_ = nitroszClient_->getComponent<CpWaypointNavigator>();
37
38 if (count_)
39 {
41 count_ = std::nullopt;
42 }
43 else if (seekWaypointName_)
44 {
46 seekWaypointName_ = std::nullopt;
47 }
48}
CpWaypointNavigator * waypointsNavigator_
void requiresClient(SmaccClientType *&storage)

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

Here is the call graph for this function:

◆ onExit()

void cl_nitrosz::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_nitrosz::CbSeekWaypoint::count_
private

Definition at line 45 of file cb_seek_waypoint.hpp.

Referenced by onEntry().

◆ options_

NavigateNextWaypointOptions cl_nitrosz::CbSeekWaypoint::options_

Definition at line 42 of file cb_seek_waypoint.hpp.

◆ seekWaypointName_

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

Definition at line 46 of file cb_seek_waypoint.hpp.

Referenced by onEntry().

◆ waypointsNavigator_

CpWaypointNavigator* cl_nitrosz::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: