|
SMACC2
|
#include <cb_px4_client_behavior_base.hpp>


Public Member Functions | |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| virtual | ~CbPx4ClientBehaviorBase () |
| void | setTimeout (std::chrono::milliseconds timeout) |
| void | update () override |
Public Member Functions inherited from smacc2::SmaccAsyncClientBehavior | |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| virtual | ~SmaccAsyncClientBehavior () |
| template<typename TCallback , typename T > | |
| smacc2::SmaccSignalConnection | onSuccess (TCallback callback, T *object) |
| template<typename TCallback , typename T > | |
| smacc2::SmaccSignalConnection | onFinished (TCallback callback, T *object) |
| template<typename TCallback , typename T > | |
| smacc2::SmaccSignalConnection | onFailure (TCallback callback, T *object) |
| void | requestForceFinish () |
| void | executeOnEntry () override |
| void | executeOnExit () override |
| void | waitOnEntryThread (bool requestFinish) |
| template<typename TCallbackMethod , typename T > | |
| smacc2::SmaccSignalConnection | onSuccess (TCallbackMethod callback, T *object) |
| template<typename TCallbackMethod , typename T > | |
| smacc2::SmaccSignalConnection | onFinished (TCallbackMethod callback, T *object) |
| template<typename TCallbackMethod , typename T > | |
| smacc2::SmaccSignalConnection | onFailure (TCallbackMethod 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, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename SmaccComponentType > | |
| void | requiresComponent (std::string name, SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| virtual void | onEntry () |
| virtual void | onExit () |
Public Member Functions inherited from smacc2::ISmaccUpdatable | |
| ISmaccUpdatable () | |
| ISmaccUpdatable (rclcpp::Duration duration) | |
| void | executeUpdate (rclcpp::Node::SharedPtr node) |
| void | setUpdatePeriod (rclcpp::Duration duration) |
Protected Member Functions | |
| virtual void | wireCompletionSignals () |
| void | postPx4Success () |
| void | postPx4Failure () |
Protected Member Functions inherited from smacc2::SmaccAsyncClientBehavior | |
| void | postSuccessEvent () |
| void | postFailureEvent () |
| virtual void | dispose () override |
| bool | isShutdownRequested () |
| onEntry is executed in a new thread. However the current state cannot be left until the onEntry thread finishes. This flag can be checked from the onEntry thread to force finishing the thread. | |
Protected Member Functions inherited from smacc2::ISmaccClientBehavior | |
| virtual void | runtimeConfigure () |
| template<typename EventType > | |
| void | postEvent (const EventType &ev) |
| template<typename EventType > | |
| void | postEvent () |
| ISmaccState * | getCurrentState () |
| virtual rclcpp::Node::SharedPtr | getNode () const |
| virtual rclcpp::Logger | getLogger () const |
Protected Member Functions inherited from smacc2::ISmaccUpdatable | |
Protected Attributes | |
| CpVehicleCommand * | vehicleCommand_ = nullptr |
| CpVehicleStatus * | vehicleStatus_ = nullptr |
| CpTrajectorySetpoint * | trajectorySetpoint_ = nullptr |
| CpGoalChecker * | goalChecker_ = nullptr |
| CpVehicleLocalPosition * | localPosition_ = nullptr |
| CpOffboardKeepAlive * | offboardKeepAlive_ = nullptr |
Private Attributes | |
| std::atomic< bool > | completed_ {false} |
| std::optional< std::chrono::milliseconds > | timeout_ |
| std::optional< std::chrono::steady_clock::time_point > | watchdogStart_ |
Definition at line 59 of file cb_px4_client_behavior_base.hpp.
|
inlinevirtual |
Definition at line 79 of file cb_px4_client_behavior_base.hpp.
|
inline |
Definition at line 64 of file cb_px4_client_behavior_base.hpp.
References goalChecker_, localPosition_, offboardKeepAlive_, smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation(), smacc2::ISmaccClientBehavior::requiresComponent(), smacc2::SOFT, trajectorySetpoint_, vehicleCommand_, vehicleStatus_, and wireCompletionSignals().
Referenced by cl_px4_mr::CbConnectMicroRosAgent::onStateOrthogonalAllocation().


|
inlineprotected |
Definition at line 121 of file cb_px4_client_behavior_base.hpp.
References completed_, and smacc2::SmaccAsyncClientBehavior::postFailureEvent().
Referenced by cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbConnectMicroRosAgent::onEntry(), and update().


|
inlineprotected |
Definition at line 113 of file cb_px4_client_behavior_base.hpp.
References completed_, and smacc2::SmaccAsyncClientBehavior::postSuccessEvent().
Referenced by cl_px4_mr::CbDisarmPX4::onDisarmedCallback(), cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbConnectMicroRosAgent::onEntry(), cl_px4_mr::CbFollowWaypoints::onEntry(), cl_px4_mr::CbChangeAltitude::onGoalReachedCallback(), cl_px4_mr::CbFollowWaypoints::onGoalReachedCallback(), cl_px4_mr::CbGoToLocation::onGoalReachedCallback(), cl_px4_mr::CbReturnToHome::onGoalReachedCallback(), cl_px4_mr::CbTakeOff::onGoalReachedCallback(), cl_px4_mr::CbLand::onLandedCallback(), cl_px4_mr::CbFigureEight::update(), cl_px4_mr::CbHoldPosition::update(), cl_px4_mr::CbOrbitLocation::update(), cl_px4_mr::CbSpiralPattern::update(), and cl_px4_mr::CbYawRotate::update().


|
inline |
Definition at line 83 of file cb_px4_client_behavior_base.hpp.
References timeout_.
|
inlineoverridevirtual |
Implements smacc2::ISmaccUpdatable.
Reimplemented in cl_px4_mr::CbSpiralPattern, and cl_px4_mr::CbYawRotate.
Definition at line 85 of file cb_px4_client_behavior_base.hpp.
References completed_, smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), postPx4Failure(), timeout_, and watchdogStart_.
Referenced by cl_px4_mr::CbFigureEight::update(), cl_px4_mr::CbHoldPosition::update(), cl_px4_mr::CbOrbitLocation::update(), cl_px4_mr::CbSpiralPattern::update(), and cl_px4_mr::CbYawRotate::update().


|
inlineprotectedvirtual |
Reimplemented in cl_px4_mr::CbArmPX4, cl_px4_mr::CbChangeAltitude, cl_px4_mr::CbDisarmPX4, cl_px4_mr::CbFollowWaypoints, cl_px4_mr::CbGoToLocation, cl_px4_mr::CbLand, cl_px4_mr::CbReturnToHome, and cl_px4_mr::CbTakeOff.
Definition at line 111 of file cb_px4_client_behavior_base.hpp.
Referenced by onStateOrthogonalAllocation().

|
private |
Definition at line 137 of file cb_px4_client_behavior_base.hpp.
Referenced by postPx4Failure(), postPx4Success(), and update().
|
protected |
Definition at line 132 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbFollowWaypoints::commandCurrentWaypoint(), cl_px4_mr::CbChangeAltitude::onEntry(), cl_px4_mr::CbGoToLocation::onEntry(), cl_px4_mr::CbReturnToHome::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), cl_px4_mr::CbChangeAltitude::onExit(), cl_px4_mr::CbFollowWaypoints::onExit(), cl_px4_mr::CbGoToLocation::onExit(), cl_px4_mr::CbReturnToHome::onExit(), onStateOrthogonalAllocation(), cl_px4_mr::CbChangeAltitude::wireCompletionSignals(), cl_px4_mr::CbFollowWaypoints::wireCompletionSignals(), cl_px4_mr::CbGoToLocation::wireCompletionSignals(), cl_px4_mr::CbReturnToHome::wireCompletionSignals(), and cl_px4_mr::CbTakeOff::wireCompletionSignals().
|
protected |
Definition at line 133 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbChangeAltitude::onEntry(), cl_px4_mr::CbOrbitLocation::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), cl_px4_mr::CbYawRotate::onEntry(), onStateOrthogonalAllocation(), and cl_px4_mr::CbYawRotate::update().
|
protected |
Definition at line 134 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbLand::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), and onStateOrthogonalAllocation().
|
private |
Definition at line 138 of file cb_px4_client_behavior_base.hpp.
Referenced by setTimeout(), and update().
|
protected |
Definition at line 131 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbFollowWaypoints::commandCurrentWaypoint(), cl_px4_mr::CbChangeAltitude::onEntry(), cl_px4_mr::CbFigureEight::onEntry(), cl_px4_mr::CbGoToLocation::onEntry(), cl_px4_mr::CbHoldPosition::onEntry(), cl_px4_mr::CbOrbitLocation::onEntry(), cl_px4_mr::CbReturnToHome::onEntry(), cl_px4_mr::CbSpiralPattern::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), cl_px4_mr::CbYawRotate::onEntry(), onStateOrthogonalAllocation(), cl_px4_mr::CbFigureEight::update(), cl_px4_mr::CbOrbitLocation::update(), and cl_px4_mr::CbSpiralPattern::update().
|
protected |
Definition at line 129 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbDisarmPX4::onEntry(), cl_px4_mr::CbLand::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), and onStateOrthogonalAllocation().
|
protected |
Definition at line 130 of file cb_px4_client_behavior_base.hpp.
Referenced by onStateOrthogonalAllocation(), cl_px4_mr::CbArmPX4::wireCompletionSignals(), cl_px4_mr::CbDisarmPX4::wireCompletionSignals(), and cl_px4_mr::CbLand::wireCompletionSignals().
|
private |
Definition at line 139 of file cb_px4_client_behavior_base.hpp.
Referenced by update().