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 118 of file smacc_client_async_behavior.cpp.
|
overrideprotectedvirtual |
Reimplemented from smacc2::ISmaccClientBehavior.
Definition at line 95 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 78 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 62 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 56 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 50 of file smacc_asynchronous_client_behavior_impl.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClientBehavior::getStateMachine(), and onSuccess_.
|
protected |
Definition at line 122 of file smacc_client_async_behavior.cpp.
References postFailureEventFn_.
Referenced by smacc2::client_behaviors::CbWaitActionServer::onEntry(), and smacc2::client_behaviors::CbWaitNode::onEntry().
|
protected |
Definition at line 120 of file smacc_client_async_behavior.cpp.
References postSuccessEventFn_.
Referenced by smacc2::client_behaviors::CbWaitActionServer::onEntry(), smacc2::client_behaviors::CbWaitNode::onEntry(), and smacc2::client_behaviors::CbWaitTopicMessage< TMessage >::onMessageReceived().
|
private |
Definition at line 42 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().