SMACC2
|
#include <smacc_asynchronous_client_behavior.hpp>
Public Member Functions | |
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 () |
ISmaccStateMachine * | getStateMachine () |
std::string | getName () const |
template<typename SmaccClientType > | |
void | requiresClient (SmaccClientType *&storage) |
template<typename SmaccComponentType > | |
void | requiresComponent (SmaccComponentType *&storage) |
Protected Member Functions | |
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 () |
ISmaccState * | getCurrentState () |
virtual void | dispose () |
virtual rclcpp::Node::SharedPtr | getNode () |
virtual rclcpp::Logger | getLogger () |
Private Member Functions | |
void | waitFutureIfNotFinished (std::future< int > &threadfut) |
void | executeOnEntry () override |
void | executeOnExit () override |
Private Attributes | |
std::future< int > | onEntryThread_ |
std::future< int > | onExitThread_ |
std::function< void()> | postFinishEventFn_ |
std::function< void()> | postSuccessEventFn_ |
std::function< void()> | postFailureEventFn_ |
SmaccSignal< void()> | onFinished_ |
SmaccSignal< void()> | onSuccess_ |
SmaccSignal< void()> | onFailure_ |
bool | isShutdownRequested_ |
Definition at line 56 of file smacc_asynchronous_client_behavior.hpp.
|
virtual |
Definition at line 112 of file smacc_client_async_behavior.cpp.
|
overrideprotectedvirtual |
Reimplemented from smacc2::ISmaccClientBehavior.
Definition at line 89 of file smacc_client_async_behavior.cpp.
References smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), and onExitThread_.
|
overrideprivatevirtual |
Reimplemented from smacc2::ISmaccClientBehavior.
Definition at line 27 of file smacc_client_async_behavior.cpp.
References smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), smacc2::ISmaccClientBehavior::onEntry(), onEntryThread_, and postFinishEventFn_.
|
overrideprivatevirtual |
Reimplemented from smacc2::ISmaccClientBehavior.
Definition at line 75 of file smacc_client_async_behavior.cpp.
References smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), onEntryThread_, smacc2::ISmaccClientBehavior::onExit(), onExitThread_, and waitFutureIfNotFinished().
|
inlineprotected |
Definition at line 79 of file smacc_asynchronous_client_behavior.hpp.
References isShutdownRequested_.
Referenced by smacc2::client_behaviors::CbWaitNode::onEntry().
boost::signals2::connection smacc2::SmaccAsyncClientBehavior::onFailure | ( | TCallback | callback, |
T * | object | ||
) |
Definition at line 59 of file smacc_asynchronous_client_behavior_impl.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClientBehavior::getStateMachine(), and onFailure_.
boost::signals2::connection smacc2::SmaccAsyncClientBehavior::onFinished | ( | TCallback | callback, |
T * | object | ||
) |
Definition at line 53 of file smacc_asynchronous_client_behavior_impl.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClientBehavior::getStateMachine(), and onFinished_.
void smacc2::SmaccAsyncClientBehavior::onOrthogonalAllocation |
Definition at line 28 of file smacc_asynchronous_client_behavior_impl.hpp.
References onFailure_, onFinished_, onSuccess_, postFailureEventFn_, postFinishEventFn_, and postSuccessEventFn_.
boost::signals2::connection smacc2::SmaccAsyncClientBehavior::onSuccess | ( | TCallback | callback, |
T * | object | ||
) |
Definition at line 47 of file smacc_asynchronous_client_behavior_impl.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClientBehavior::getStateMachine(), and onSuccess_.
|
protected |
Definition at line 116 of file smacc_client_async_behavior.cpp.
References postFailureEventFn_.
Referenced by cl_move_group_interface::CbMoveEndEffectorTrajectory::executeJointSpaceTrajectory(), cl_move_group_interface::CbMoveJoints::moveJoints(), cl_move_group_interface::CbMoveEndEffectorRelative::moveRelative(), cl_move_group_interface::CbMoveCartesianRelative::moveRelativeCartesian(), cl_move_group_interface::CbMoveEndEffector::moveToAbsolutePose(), smacc2::client_behaviors::CbWaitActionServer::onEntry(), smacc2::client_behaviors::CbWaitNode::onEntry(), cl_move_group_interface::CbAttachObject::onEntry(), cl_move_group_interface::CbDetachObject::onEntry(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onEntry(), cl_nav2z::CbWaitPose::onEntry(), cl_nav2z::CbWaitTransform::onEntry(), and cl_nav2z::CbNav2ZClientBehaviorBase::propagateFailureEvent().
|
protected |
Definition at line 114 of file smacc_client_async_behavior.cpp.
References postSuccessEventFn_.
Referenced by cl_move_group_interface::CbMoveEndEffectorTrajectory::executeJointSpaceTrajectory(), cl_move_group_interface::CbMoveJoints::moveJoints(), cl_move_group_interface::CbMoveEndEffectorRelative::moveRelative(), cl_move_group_interface::CbMoveCartesianRelative::moveRelativeCartesian(), cl_move_group_interface::CbMoveEndEffector::moveToAbsolutePose(), smacc2::client_behaviors::CbWaitActionServer::onEntry(), smacc2::client_behaviors::CbWaitNode::onEntry(), cl_move_group_interface::CbAttachObject::onEntry(), cl_move_group_interface::CbDetachObject::onEntry(), cl_nav2z::CbWaitPose::onEntry(), cl_nav2z::CbWaitTransform::onEntry(), sm_dance_bot_warehouse_3::cl_nav2zclient::CbPureSpinning::onEntry(), cl_nav2z::CbWaitNav2Nodes::onMessageReceived(), smacc2::client_behaviors::CbWaitTopicMessage< TMessage >::onMessageReceived(), and cl_nav2z::CbNav2ZClientBehaviorBase::propagateSuccessEvent().
|
private |
Definition at line 39 of file smacc_client_async_behavior.cpp.
References smacc2::introspection::demangleType(), smacc2::ISmaccClientBehavior::getLogger(), and smacc2::ISmaccClientBehavior::getNode().
Referenced by executeOnExit().
|
private |
Definition at line 100 of file smacc_asynchronous_client_behavior.hpp.
Referenced by isShutdownRequested().
|
private |
Definition at line 83 of file smacc_asynchronous_client_behavior.hpp.
Referenced by executeOnEntry(), and executeOnExit().
|
private |
Definition at line 84 of file smacc_asynchronous_client_behavior.hpp.
Referenced by dispose(), and executeOnExit().
|
private |
Definition at line 92 of file smacc_asynchronous_client_behavior.hpp.
Referenced by onFailure(), and onOrthogonalAllocation().
|
private |
Definition at line 90 of file smacc_asynchronous_client_behavior.hpp.
Referenced by onFinished(), and onOrthogonalAllocation().
|
private |
Definition at line 91 of file smacc_asynchronous_client_behavior.hpp.
Referenced by onOrthogonalAllocation(), and onSuccess().
|
private |
Definition at line 88 of file smacc_asynchronous_client_behavior.hpp.
Referenced by onOrthogonalAllocation(), and postFailureEvent().
|
private |
Definition at line 86 of file smacc_asynchronous_client_behavior.hpp.
Referenced by executeOnEntry(), and onOrthogonalAllocation().
|
private |
Definition at line 87 of file smacc_asynchronous_client_behavior.hpp.
Referenced by onOrthogonalAllocation(), and postSuccessEvent().