Template Class ActionClientMock

Inheritance Relationships

Base Type

Class Documentation

template<typename ActionT>
class ActionClientMock : public rtest::MockBase

Public Types

using Goal = typename ActionT::Goal
using GoalHandle = typename rclcpp_action::ClientGoalHandle<ActionT>
using GoalHandleSharedPtr = typename GoalHandle::SharedPtr
using WrappedResult = typename GoalHandle::WrappedResult
using ResultCallback = typename GoalHandle::ResultCallback
using SendGoalOptions = typename rclcpp_action::Client<ActionT>::SendGoalOptions
using CancelRequest = typename ActionT::Impl::CancelGoalService::Request
using CancelResponse = typename ActionT::Impl::CancelGoalService::Response
using CancelCallback = std::function<void(typename CancelResponse::SharedPtr)>

Public Functions

inline explicit ActionClientMock(rclcpp_action::ClientBase *client)
inline ~ActionClientMock()
MOCK_METHOD (std::shared_future< GoalHandleSharedPtr >, async_send_goal,(const Goal &, const SendGoalOptions &),())
MOCK_METHOD (std::shared_future< WrappedResult >, async_get_result,(GoalHandleSharedPtr, ResultCallback),())
MOCK_METHOD (std::shared_future< typename CancelResponse::SharedPtr >, async_cancel_goal,(GoalHandleSharedPtr, CancelCallback),())
MOCK_METHOD (std::shared_future< typename CancelResponse::SharedPtr >, async_cancel_all_goals,(CancelCallback),())
MOCK_METHOD (bool, action_server_is_ready,(),())
MOCK_METHOD (void, stop_callbacks,(GoalHandleSharedPtr),())
MOCK_METHOD (void, stop_callbacks,(const rclcpp_action::GoalUUID &),())
MOCK_METHOD (std::shared_future< typename CancelResponse::SharedPtr >, async_cancel_goals_before,(const rclcpp::Time &, CancelCallback),())
MOCK_METHOD (bool, wait_for_action_server,(std::chrono::nanoseconds),())
template<typename RepT = int64_t, typename RatioT = std::milli>
inline bool wait_for_action_server(std::chrono::duration<RepT, RatioT> timeout = std::chrono::duration<RepT, RatioT>(-1))
inline std::shared_ptr<rclcpp_action::ClientGoalHandle<ActionT>> makeClientGoalHandle()
inline std::shared_future<typename rclcpp_action::ClientGoalHandle<ActionT>::SharedPtr> makeClientGoalHandleFuture(typename rclcpp_action::ClientGoalHandle<ActionT>::SharedPtr goal_handle = nullptr)
inline void simulate_result(const GoalHandleSharedPtr &goal_handle, const WrappedResult &result)