Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
rtt_actionlib::RTTSimpleActionServer< ActionSpec > Class Template Reference

#include <rtt_simple_action_server.h>

Public Member Functions

bool abortActive (const Result &result, const std::string &msg="")
 Abort active goal. Abort active goal with given result, do nothing if there is no active goal. More...
 
bool acceptPending (const Result &result, const std::string &msg="")
 Accept pending goal. Accept pending goal, preempt the active goal with result if present. Do nothing if there is no pending goal. More...
 
bool cancelActive (const Result &result, const std::string &msg="")
 Cancel active goal. Cancel active goal with given result, do nothing if there is no active goal. More...
 
boost::shared_ptr< const Goal > getActiveGoal () const
 
boost::shared_ptr< const Goal > getPendingGoal () const
 
bool isActive () const
 
bool isPending () const
 
bool isPreempting () const
 
bool publishFeedback (const Feedback &feedpack)
 Publish feedback on active goal. Publish feedback on active goal, do nothing if there is no active goal. More...
 
bool ready ()
 
bool rejectPending (const Result &result, const std::string &msg="")
 Reject pending goal. Reject pending goal with result, do nothing if there is no pending goal. More...
 
 RTTSimpleActionServer (boost::shared_ptr< RTT::Service > owner_service)
 
void setCancelHook (boost::function< void()> _cancelGoalHook)
 Setup cancel hook. More...
 
void setGoalHook (boost::function< void(const Goal &)> _newGoalHook)
 Setup goal hook. More...
 
void shutdown ()
 
bool start ()
 
bool succeedActive (const Result &result, const std::string &msg="")
 Succeed active goal. Succeed active goal with given result, do nothing if there is no active goal. More...
 

Protected Types

typedef actionlib::ServerGoalHandle< ActionSpec > GoalHandle
 

Protected Member Functions

 ACTION_DEFINITION (ActionSpec)
 
void cancelCallback (GoalHandle gh)
 
void goalCallback (GoalHandle gh)
 

Protected Attributes

RTTActionServer< ActionSpec > action_server
 
boost::function< void()> cancelGoalHook
 
GoalHandle goal_active
 
GoalHandle goal_pending
 
boost::function< void(const Goal &)> newGoalHook
 

Detailed Description

template<class ActionSpec>
class rtt_actionlib::RTTSimpleActionServer< ActionSpec >

Definition at line 14 of file rtt_simple_action_server.h.

Member Typedef Documentation

template<class ActionSpec >
typedef actionlib::ServerGoalHandle<ActionSpec> rtt_actionlib::RTTSimpleActionServer< ActionSpec >::GoalHandle
protected

Definition at line 18 of file rtt_simple_action_server.h.

Constructor & Destructor Documentation

template<class ActionSpec >
rtt_actionlib::RTTSimpleActionServer< ActionSpec >::RTTSimpleActionServer ( boost::shared_ptr< RTT::Service owner_service)
inline

Create RTTSimpleActionServer in given Service.

Create ports, register callbacks.

Parameters
owner_servicePointer to owner service.

Definition at line 44 of file rtt_simple_action_server.h.

Member Function Documentation

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::abortActive ( const Result &  result,
const std::string &  msg = "" 
)

Abort active goal. Abort active goal with given result, do nothing if there is no active goal.

Parameters
resultResult of the aborted active goal.
Returns
true if active goal is aborted.

Definition at line 225 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::acceptPending ( const Result &  result,
const std::string &  msg = "" 
)

Accept pending goal. Accept pending goal, preempt the active goal with result if present. Do nothing if there is no pending goal.

Parameters
resultResult of the preemted active goal.
Returns
true if pending goal is accepted.

Definition at line 185 of file rtt_simple_action_server.h.

template<class ActionSpec >
rtt_actionlib::RTTSimpleActionServer< ActionSpec >::ACTION_DEFINITION ( ActionSpec  )
protected
template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::cancelActive ( const Result &  result,
const std::string &  msg = "" 
)

Cancel active goal. Cancel active goal with given result, do nothing if there is no active goal.

Parameters
resultResult of the aborted active goal.
Returns
true if goal is been canceled.

Definition at line 237 of file rtt_simple_action_server.h.

template<class ActionSpec >
void rtt_actionlib::RTTSimpleActionServer< ActionSpec >::cancelCallback ( GoalHandle  gh)
protected

Definition at line 277 of file rtt_simple_action_server.h.

template<class ActionSpec >
boost::shared_ptr<const Goal> rtt_actionlib::RTTSimpleActionServer< ActionSpec >::getActiveGoal ( ) const
inline

Return pointer to active goal.

Definition at line 96 of file rtt_simple_action_server.h.

template<class ActionSpec >
boost::shared_ptr<const Goal> rtt_actionlib::RTTSimpleActionServer< ActionSpec >::getPendingGoal ( ) const
inline

Return pointer to pending goal.

Definition at line 105 of file rtt_simple_action_server.h.

template<class ActionSpec >
void rtt_actionlib::RTTSimpleActionServer< ActionSpec >::goalCallback ( GoalHandle  gh)
protected

Definition at line 261 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::isActive ( void  ) const
inline

Check, if active goal is present.

Definition at line 75 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::isPending ( ) const
inline

Check, if pending goal is present.

Definition at line 89 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::isPreempting ( ) const
inline

Check, if active goal is being preempted.

Definition at line 82 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::publishFeedback ( const Feedback &  feedpack)

Publish feedback on active goal. Publish feedback on active goal, do nothing if there is no active goal.

Parameters
feedbackaction feedback
Returns
true if active goal is present.

Definition at line 218 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::ready ( void  )
inline

Check all connections.

Definition at line 55 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::rejectPending ( const Result &  result,
const std::string &  msg = "" 
)

Reject pending goal. Reject pending goal with result, do nothing if there is no pending goal.

Parameters
resultResult of the rejected pending goal.
Returns
true if pending goal is rejected..

Definition at line 206 of file rtt_simple_action_server.h.

template<class ActionSpec >
void rtt_actionlib::RTTSimpleActionServer< ActionSpec >::setCancelHook ( boost::function< void()>  _cancelGoalHook)
inline

Setup cancel hook.

Parameters
cancelGoalHookA function, being called when active goal is canceled.

Definition at line 171 of file rtt_simple_action_server.h.

template<class ActionSpec >
void rtt_actionlib::RTTSimpleActionServer< ActionSpec >::setGoalHook ( boost::function< void(const Goal &)>  _newGoalHook)
inline

Setup goal hook.

Parameters
newGoalHookA function, being called if new goal arrives.

Definition at line 163 of file rtt_simple_action_server.h.

template<class ActionSpec >
void rtt_actionlib::RTTSimpleActionServer< ActionSpec >::shutdown ( )
inline

Stop action server.

Definition at line 68 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::start ( void  )

Start action server in given TaskContext.

Definition at line 176 of file rtt_simple_action_server.h.

template<class ActionSpec >
bool rtt_actionlib::RTTSimpleActionServer< ActionSpec >::succeedActive ( const Result &  result,
const std::string &  msg = "" 
)

Succeed active goal. Succeed active goal with given result, do nothing if there is no active goal.

Parameters
resultResult of the succeed active goal.
Returns
true if active goal is succeed.

Definition at line 249 of file rtt_simple_action_server.h.

Member Data Documentation

template<class ActionSpec >
RTTActionServer<ActionSpec> rtt_actionlib::RTTSimpleActionServer< ActionSpec >::action_server
protected

Definition at line 23 of file rtt_simple_action_server.h.

template<class ActionSpec >
boost::function<void()> rtt_actionlib::RTTSimpleActionServer< ActionSpec >::cancelGoalHook
protected

Definition at line 29 of file rtt_simple_action_server.h.

template<class ActionSpec >
GoalHandle rtt_actionlib::RTTSimpleActionServer< ActionSpec >::goal_active
protected

Definition at line 24 of file rtt_simple_action_server.h.

template<class ActionSpec >
GoalHandle rtt_actionlib::RTTSimpleActionServer< ActionSpec >::goal_pending
protected

Definition at line 25 of file rtt_simple_action_server.h.

template<class ActionSpec >
boost::function<void(const Goal&)> rtt_actionlib::RTTSimpleActionServer< ActionSpec >::newGoalHook
protected

Definition at line 28 of file rtt_simple_action_server.h.


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


rtt_actionlib
Author(s): Jonathan Bohren
autogenerated on Mon May 10 2021 02:45:37