Public Member Functions | Protected Attributes | Private Member Functions
robot_activity::ManagedRobotActivity Class Reference

Managed RobotActivity class, which adds further functionality to the RobotActivity class. More...

#include <managed_robot_activity.h>

Inheritance diagram for robot_activity::ManagedRobotActivity:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~ManagedRobotActivity ()
 Virtual destructor.

Protected Attributes

resource::ServiceServerManager service_manager
 Manager for advertising ROS services.
resource::SubscriberManager subscriber_manager
 Manager for subscribing to ROS topics.

Private Member Functions

bool onConfigure () final
 Overriden onConfigure, which calls onManagedConfigure. Cannot be overriden further by the child class of ManagedRobotActivity.
void onCreate () final
 Overriden onCreate, which calls onManagedCreate. Cannot be overriden further by the child class of ManagedRobotActivity.
virtual bool onManagedConfigure ()=0
 User-defined function that's called at the end of transition from UNCONFIGURED to STOPPED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.
virtual void onManagedCreate ()=0
 User-defined function that's called at the end of transition from LAUNCHING to UNCONFIGURED state.
virtual bool onManagedPause ()=0
 User-defined function that's called at the end of transition from RUNNING to PAUSED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.
virtual bool onManagedResume ()=0
 User-defined function that's called at the end of transition from PAUSED to RUNNING state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.
virtual bool onManagedStart ()=0
 User-defined function that's called at the end of transition from STOPPED to PAUSED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.
virtual bool onManagedStop ()=0
 User-defined function that's called at the end of transition from PAUSED to STOPPED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.
virtual void onManagedTerminate ()=0
 User-defined function that's called at the end of transition from UNCONFIGURED to TERMINATED state.
virtual bool onManagedUnconfigure ()=0
 User-defined function that's called at the end of transition from STOPPED to UNCONFIGURED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.
bool onPause () final
 Overriden onPause, which calls onManagedPause. Cannot be overriden further by the child class of ManagedRobotActivity. It pauses all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.
bool onResume () final
 Overriden onResume, which calls onManagedResume. Cannot be overriden further by the child class of ManagedRobotActivity. It resumes all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.
bool onStart () final
 Overriden onStart, which calls onManagedStart. Cannot be overriden further by the child class of ManagedRobotActivity. It subscribes and adverties all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.
bool onStop () final
 Overriden onStop, which calls onManagedStop. Cannot be overriden further by the child class of ManagedRobotActivity. It shutdowns all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.
void onTerminate () final
 Overriden onTerminate, which calls onManagedTerminate. Cannot be overriden further by the child class of ManagedRobotActivity.
bool onUnconfigure () final
 Overriden onUnconfigure, which calls onManagedUnconfigure. Cannot be overriden further by the child class of ManagedRobotActivity.

Detailed Description

Managed RobotActivity class, which adds further functionality to the RobotActivity class.

ManagedRobotActivity manages ROS Subscribers and ServiceServers. It automatically pauses all Subscribers and ServiceServers during PAUSED state and resumes them when transitioning to the RUNNING state. It also shutdowns them in STOPPED state and re-acquires them (by re-subscribing or re-advertising) when transitioning from STOPPED to PAUSED.

Definition at line 71 of file managed_robot_activity.h.


Constructor & Destructor Documentation

Virtual destructor.

Definition at line 42 of file managed_robot_activity.cpp.


Member Function Documentation

Overriden onConfigure, which calls onManagedConfigure. Cannot be overriden further by the child class of ManagedRobotActivity.

Returns:
Returns true if onManagedConfigure succeeded

Implements robot_activity::RobotActivity.

Definition at line 59 of file managed_robot_activity.cpp.

Overriden onCreate, which calls onManagedCreate. Cannot be overriden further by the child class of ManagedRobotActivity.

Implements robot_activity::RobotActivity.

Definition at line 47 of file managed_robot_activity.cpp.

virtual bool robot_activity::ManagedRobotActivity::onManagedConfigure ( ) [private, pure virtual]

User-defined function that's called at the end of transition from UNCONFIGURED to STOPPED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.

Returns:
Returns true if transition succeeded
virtual void robot_activity::ManagedRobotActivity::onManagedCreate ( ) [private, pure virtual]

User-defined function that's called at the end of transition from LAUNCHING to UNCONFIGURED state.

virtual bool robot_activity::ManagedRobotActivity::onManagedPause ( ) [private, pure virtual]

User-defined function that's called at the end of transition from RUNNING to PAUSED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.

Returns:
Returns true if transition succeeded
virtual bool robot_activity::ManagedRobotActivity::onManagedResume ( ) [private, pure virtual]

User-defined function that's called at the end of transition from PAUSED to RUNNING state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.

Returns:
Returns true if transition succeeded
virtual bool robot_activity::ManagedRobotActivity::onManagedStart ( ) [private, pure virtual]

User-defined function that's called at the end of transition from STOPPED to PAUSED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.

Returns:
Returns true if transition succeeded
virtual bool robot_activity::ManagedRobotActivity::onManagedStop ( ) [private, pure virtual]

User-defined function that's called at the end of transition from PAUSED to STOPPED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.

Returns:
Returns true if transition succeeded
virtual void robot_activity::ManagedRobotActivity::onManagedTerminate ( ) [private, pure virtual]

User-defined function that's called at the end of transition from UNCONFIGURED to TERMINATED state.

virtual bool robot_activity::ManagedRobotActivity::onManagedUnconfigure ( ) [private, pure virtual]

User-defined function that's called at the end of transition from STOPPED to UNCONFIGURED state User has to return true or false, indicating whether the transition has succeeded or not. In case of failure, the state remains unchanged.

Returns:
Returns true if transition succeeded
bool robot_activity::ManagedRobotActivity::onPause ( ) [private, virtual]

Overriden onPause, which calls onManagedPause. Cannot be overriden further by the child class of ManagedRobotActivity. It pauses all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.

Returns:
Returns true if onManagedPause succeeded

Implements robot_activity::RobotActivity.

Definition at line 87 of file managed_robot_activity.cpp.

Overriden onResume, which calls onManagedResume. Cannot be overriden further by the child class of ManagedRobotActivity. It resumes all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.

Returns:
Returns true if onManagedResume succeeded

Implements robot_activity::RobotActivity.

Definition at line 95 of file managed_robot_activity.cpp.

bool robot_activity::ManagedRobotActivity::onStart ( ) [private, virtual]

Overriden onStart, which calls onManagedStart. Cannot be overriden further by the child class of ManagedRobotActivity. It subscribes and adverties all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.

Returns:
Returns true if onManagedStart succeeded

Implements robot_activity::RobotActivity.

Definition at line 71 of file managed_robot_activity.cpp.

bool robot_activity::ManagedRobotActivity::onStop ( ) [private, virtual]

Overriden onStop, which calls onManagedStop. Cannot be overriden further by the child class of ManagedRobotActivity. It shutdowns all ROS topics and services that were subscribed and advertised with subscription_manager and service_manager before calling onManagedStart.

Returns:
Returns true if onManagedStop succeeded

Implements robot_activity::RobotActivity.

Definition at line 79 of file managed_robot_activity.cpp.

Overriden onTerminate, which calls onManagedTerminate. Cannot be overriden further by the child class of ManagedRobotActivity.

Implements robot_activity::RobotActivity.

Definition at line 53 of file managed_robot_activity.cpp.

Overriden onUnconfigure, which calls onManagedUnconfigure. Cannot be overriden further by the child class of ManagedRobotActivity.

Returns:
Returns true if onManagedUnconfigure succeeded

Implements robot_activity::RobotActivity.

Definition at line 65 of file managed_robot_activity.cpp.


Member Data Documentation

Manager for advertising ROS services.

Definition at line 93 of file managed_robot_activity.h.

Manager for subscribing to ROS topics.

Definition at line 88 of file managed_robot_activity.h.


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


robot_activity
Author(s): Maciej ZURAD
autogenerated on Thu Jun 6 2019 18:10:04