SMACC2
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
cl_nav2z::CbNav2ZClientBehaviorBase Class Reference

#include <cb_nav2z_client_behavior_base.hpp>

Inheritance diagram for cl_nav2z::CbNav2ZClientBehaviorBase:
Inheritance graph
Collaboration diagram for cl_nav2z::CbNav2ZClientBehaviorBase:
Collaboration graph

Public Member Functions

virtual ~CbNav2ZClientBehaviorBase ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
- Public Member Functions inherited from smacc2::SmaccAsyncClientBehavior
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
virtual ~SmaccAsyncClientBehavior ()
 
template<typename TCallback , typename T >
boost::signals2::connection onSuccess (TCallback callback, T *object)
 
template<typename TCallback , typename T >
boost::signals2::connection onFinished (TCallback callback, T *object)
 
template<typename TCallback , typename T >
boost::signals2::connection onFailure (TCallback callback, T *object)
 
- 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)
 

Protected Attributes

cl_nav2z::ClNav2ZmoveBaseClient_
 
rclcpp_action::ResultCode navigationResult_
 

Private Member Functions

void propagateSuccessEvent (ClNav2Z::WrappedResult &)
 
void propagateFailureEvent (ClNav2Z::WrappedResult &)
 

Additional Inherited Members

- Protected Member Functions inherited from smacc2::SmaccAsyncClientBehavior
void postSuccessEvent ()
 
void postFailureEvent ()
 
virtual void dispose () override
 
bool isShutdownRequested ()
 
- Protected Member Functions inherited from smacc2::ISmaccClientBehavior
virtual void runtimeConfigure ()
 
virtual void onEntry ()
 
virtual void onExit ()
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
ISmaccStategetCurrentState ()
 
virtual void dispose ()
 
virtual rclcpp::Node::SharedPtr getNode ()
 
virtual rclcpp::Logger getLogger ()
 

Detailed Description

Definition at line 28 of file cb_nav2z_client_behavior_base.hpp.

Constructor & Destructor Documentation

◆ ~CbNav2ZClientBehaviorBase()

cl_nav2z::CbNav2ZClientBehaviorBase::~CbNav2ZClientBehaviorBase ( )
virtual

Definition at line 24 of file cb_nav2z_client_behavior_base.cpp.

24{}

Member Function Documentation

◆ onOrthogonalAllocation()

template<typename TOrthogonal , typename TSourceObject >
void cl_nav2z::CbNav2ZClientBehaviorBase::onOrthogonalAllocation ( )
inline

Definition at line 34 of file cb_nav2z_client_behavior_base.hpp.

35 {
37 smacc2::SmaccAsyncClientBehavior::onOrthogonalAllocation<TOrthogonal, TSourceObject>();
41 }
void propagateSuccessEvent(ClNav2Z::WrappedResult &)
void propagateFailureEvent(ClNav2Z::WrappedResult &)
void requiresClient(SmaccClientType *&storage)
boost::signals2::connection onAborted(void(T::*callback)(WrappedResult &), T *object)
boost::signals2::connection onSucceeded(void(T::*callback)(WrappedResult &), T *object)
boost::signals2::connection onCancelled(void(T::*callback)(WrappedResult &), T *object)

References moveBaseClient_, smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded(), propagateFailureEvent(), propagateSuccessEvent(), and smacc2::ISmaccClientBehavior::requiresClient().

Here is the call graph for this function:

◆ propagateFailureEvent()

void cl_nav2z::CbNav2ZClientBehaviorBase::propagateFailureEvent ( ClNav2Z::WrappedResult r)
private

Definition at line 33 of file cb_nav2z_client_behavior_base.cpp.

34{
35 navigationResult_ = r.code;
36 auto name = smacc2::demangleType(typeid(*this));
37 RCLCPP_INFO(getLogger(), "[%s] Propagating failure event from action server", name.c_str());
38 this->postFailureEvent();
39}
std::string demangleType(const std::type_info *tinfo)

References smacc2::introspection::demangleType(), smacc2::ISmaccClientBehavior::getLogger(), navigationResult_, and smacc2::SmaccAsyncClientBehavior::postFailureEvent().

Referenced by onOrthogonalAllocation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ propagateSuccessEvent()

void cl_nav2z::CbNav2ZClientBehaviorBase::propagateSuccessEvent ( ClNav2Z::WrappedResult r)
private

Definition at line 26 of file cb_nav2z_client_behavior_base.cpp.

27{
28 navigationResult_ = r.code;
29 auto name = smacc2::demangleType(typeid(*this));
30 RCLCPP_INFO(getLogger(), "[%s] Propagating success event from action server", name.c_str());
31 this->postSuccessEvent();
32}

References smacc2::introspection::demangleType(), smacc2::ISmaccClientBehavior::getLogger(), navigationResult_, and smacc2::SmaccAsyncClientBehavior::postSuccessEvent().

Referenced by onOrthogonalAllocation().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ moveBaseClient_

cl_nav2z::ClNav2Z* cl_nav2z::CbNav2ZClientBehaviorBase::moveBaseClient_
protected

◆ navigationResult_

rclcpp_action::ResultCode cl_nav2z::CbNav2ZClientBehaviorBase::navigationResult_
protected

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