managed_robot_activity.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2018, University of Luxembourg
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of University of Luxembourg nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *
35  * Author: Maciej Zurad
36  *********************************************************************/
38 
39 namespace robot_activity
40 {
41 
43 {
44  ROS_DEBUG_STREAM("ManagedRobotActivity dtor [" << getNamespace() << "]");
45 }
46 
48 {
49  ROS_DEBUG("onCreate");
51 }
52 
54 {
55  ROS_DEBUG("onTerminate");
57 }
58 
60 {
61  ROS_DEBUG("onConfigure");
62  return onManagedConfigure();
63 }
64 
66 {
67  ROS_DEBUG("onUnconfigure");
68  return onManagedUnconfigure();
69 }
70 
72 {
73  ROS_DEBUG("onStart");
76  return onManagedStart();
77 }
78 
80 {
81  ROS_DEBUG("onStop");
84  return onManagedStop();
85 }
86 
88 {
89  ROS_DEBUG("onPause");
92  return onManagedPause();
93 }
94 
96 {
97  ROS_DEBUG("onResume");
100  return onManagedResume();
101 }
102 
103 } // namespace robot_activity
bool onResume() final
Overriden onResume, which calls onManagedResume. Cannot be overriden further by the child class of Ma...
bool onStart() final
Overriden onStart, which calls onManagedStart. Cannot be overriden further by the child class of Mana...
void pauseAll()
Pauses all managed resources.
void resumeAll()
Resumes all managed resources.
virtual void onManagedTerminate()=0
User-defined function that&#39;s called at the end of transition from UNCONFIGURED to TERMINATED state...
void acquireAll(const ros::NodeHandlePtr &node_handle)
Acquires all managed resources.
resource::SubscriberManager subscriber_manager
Manager for subscribing to ROS topics.
virtual bool onManagedStop()=0
User-defined function that&#39;s called at the end of transition from PAUSED to STOPPED state User has to...
virtual bool onManagedResume()=0
User-defined function that&#39;s called at the end of transition from PAUSED to RUNNING state User has to...
virtual ~ManagedRobotActivity()
Virtual destructor.
void onCreate() final
Overriden onCreate, which calls onManagedCreate. Cannot be overriden further by the child class of Ma...
resource::ServiceServerManager service_manager
Manager for advertising ROS services.
void onTerminate() final
Overriden onTerminate, which calls onManagedTerminate. Cannot be overriden further by the child class...
virtual bool onManagedPause()=0
User-defined function that&#39;s called at the end of transition from RUNNING to PAUSED state User has to...
virtual bool onManagedConfigure()=0
User-defined function that&#39;s called at the end of transition from UNCONFIGURED to STOPPED state User ...
bool onStop() final
Overriden onStop, which calls onManagedStop. Cannot be overriden further by the child class of Manage...
virtual bool onManagedUnconfigure()=0
User-defined function that&#39;s called at the end of transition from STOPPED to UNCONFIGURED state User ...
bool onUnconfigure() final
Overriden onUnconfigure, which calls onManagedUnconfigure. Cannot be overriden further by the child c...
#define ROS_DEBUG_STREAM(args)
ros::NodeHandlePtr node_handle_
bool onConfigure() final
Overriden onConfigure, which calls onManagedConfigure. Cannot be overriden further by the child class...
void releaseAll()
Releases all managed resources.
virtual void onManagedCreate()=0
User-defined function that&#39;s called at the end of transition from LAUNCHING to UNCONFIGURED state...
virtual bool onManagedStart()=0
User-defined function that&#39;s called at the end of transition from STOPPED to PAUSED state User has to...
ManagedRobotActivity class implements ROS node lifecycle with managed subscriptions and services...
bool onPause() final
Overriden onPause, which calls onManagedPause. Cannot be overriden further by the child class of Mana...
std::string getNamespace() const
Returns the full private namespace.
#define ROS_DEBUG(...)


robot_activity
Author(s): Maciej ZURAD
autogenerated on Thu Jun 6 2019 19:32:17