forwards.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008, Morgan Quigley and Willow Garage, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  * * Redistributions of source code must retain the above copyright notice,
7  * this list of conditions and the following disclaimer.
8  * * Redistributions in binary form must reproduce the above copyright
9  * notice, this list of conditions and the following disclaimer in the
10  * documentation and/or other materials provided with the distribution.
11  * * Neither the names of Stanford University or Willow Garage, Inc. nor the names of its
12  * contributors may be used to endorse or promote products derived from
13  * this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  * POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef ROSCPP_FORWARDS_H
29 #define ROSCPP_FORWARDS_H
30 
31 #include <string>
32 #include <vector>
33 #include <map>
34 #include <set>
35 #include <list>
36 
37 #include <boost/shared_ptr.hpp>
38 #include <boost/make_shared.hpp>
39 #include <boost/weak_ptr.hpp>
40 #include <boost/function.hpp>
41 
42 #include <ros/time.h>
43 #include <ros/macros.h>
44 #include "exceptions.h"
45 #include "ros/datatypes.h"
46 
47 namespace ros
48 {
49 
51 typedef boost::weak_ptr<void> VoidWPtr;
53 typedef boost::weak_ptr<void const> VoidConstWPtr;
54 
55 class Header;
56 class Transport;
62 class Connection;
64 typedef std::set<ConnectionPtr> S_Connection;
65 typedef std::vector<ConnectionPtr> V_Connection;
68 typedef std::vector<PublicationPtr> V_Publication;
71 typedef std::vector<SubscriberLinkPtr> V_SubscriberLink;
74 typedef boost::weak_ptr<Subscription> SubscriptionWPtr;
75 typedef std::list<SubscriptionPtr> L_Subscription;
76 typedef std::vector<SubscriptionPtr> V_Subscription;
77 typedef std::set<SubscriptionPtr> S_Subscription;
80 typedef std::vector<PublisherLinkPtr> V_PublisherLink;
83 typedef std::list<ServicePublicationPtr> L_ServicePublication;
84 typedef std::vector<ServicePublicationPtr> V_ServicePublication;
87 typedef std::list<ServiceServerLinkPtr> L_ServiceServerLink;
88 class Transport;
90 class NodeHandle;
92 
93 
95 typedef boost::function<void(const SingleSubscriberPublisher&)> SubscriberStatusCallback;
96 
97 class CallbackQueue;
99 class CallbackInterface;
101 
103 {
104  SubscriberCallbacks(const SubscriberStatusCallback& connect = SubscriberStatusCallback(),
105  const SubscriberStatusCallback& disconnect = SubscriberStatusCallback(),
106  const VoidConstPtr& tracked_object = VoidConstPtr(),
107  CallbackQueueInterface* callback_queue = 0)
108  : connect_(connect)
109  , disconnect_(disconnect)
110  , callback_queue_(callback_queue)
111  {
112  has_tracked_object_ = false;
113  if (tracked_object)
114  {
115  has_tracked_object_ = true;
116  tracked_object_ = tracked_object;
117  }
118  }
119  SubscriberStatusCallback connect_;
120  SubscriberStatusCallback disconnect_;
121 
123  VoidConstWPtr tracked_object_;
125 };
127 
132 {
135 
138 
139  struct
140  {
142  } profile;
143 };
144 typedef boost::function<void(const TimerEvent&)> TimerCallback;
145 
150 {
153 
156 
157  struct
158  {
160  } profile;
161 };
162 typedef boost::function<void(const WallTimerEvent&)> WallTimerCallback;
163 
168 {
171 
174 
175  struct
176  {
178  } profile;
179 };
180 typedef boost::function<void(const SteadyTimerEvent&)> SteadyTimerCallback;
181 
186 class ConnectionManager;
190 class PollManager;
192 
193 }
194 
195 #endif
Manages a subscription on a single topic.
Definition: subscription.h:65
SubscriberCallbacks(const SubscriberStatusCallback &connect=SubscriberStatusCallback(), const SubscriberStatusCallback &disconnect=SubscriberStatusCallback(), const VoidConstPtr &tracked_object=VoidConstPtr(), CallbackQueueInterface *callback_queue=0)
Definition: forwards.h:104
boost::weak_ptr< void > VoidWPtr
Definition: forwards.h:51
boost::shared_ptr< void const > VoidConstPtr
Definition: forwards.h:52
boost::function< void(const SingleSubscriberPublisher &)> SubscriberStatusCallback
Definition: forwards.h:94
boost::shared_ptr< CallbackInterface > CallbackInterfacePtr
Abstract base class that allows abstraction of the transport type, eg. TCP, shared memory...
Definition: transport.h:55
This is the default implementation of the ros::CallbackQueueInterface.
WallDuration last_duration
How long the last callback ran for.
Definition: forwards.h:141
SteadyTime current_real
This is when the current callback was actually called (SteadyTime::now() as of the beginning of the c...
Definition: forwards.h:173
boost::function< void(const TimerEvent &)> TimerCallback
Definition: forwards.h:144
CallbackQueueInterface * callback_queue_
Definition: forwards.h:124
boost::shared_ptr< ServiceManager > ServiceManagerPtr
Definition: forwards.h:182
boost::shared_ptr< XMLRPCManager > XMLRPCManagerPtr
Definition: forwards.h:188
boost::shared_ptr< Transport > TransportPtr
Definition: connection.h:55
std::list< ServiceServerLinkPtr > L_ServiceServerLink
Definition: forwards.h:87
boost::shared_ptr< Connection > ConnectionPtr
Definition: connection.h:57
Abstract interface for items which can be added to a CallbackQueueInterface.
Encapsulates a connection to a remote host, independent of the transport type.
Definition: connection.h:70
WallDuration last_duration
How long the last callback ran for.
Definition: forwards.h:159
std::vector< SubscriptionPtr > V_Subscription
Definition: forwards.h:76
boost::shared_ptr< NodeHandle > NodeHandlePtr
Definition: forwards.h:90
Abstract interface for a queue used to handle all callbacks within roscpp.
SteadyTime last_expected
In a perfect world, this is when the last callback should have happened.
Definition: forwards.h:169
SubscriberStatusCallback connect_
Definition: forwards.h:119
std::vector< PublicationPtr > V_Publication
Definition: forwards.h:68
Allows publication of a message to a single subscriber. Only available inside subscriber connection c...
TCPROS transport.
Definition: transport_tcp.h:56
std::list< ServicePublicationPtr > L_ServicePublication
Definition: forwards.h:83
Time last_real
When the last callback actually happened.
Definition: forwards.h:134
boost::shared_ptr< TransportUDP > TransportUDPPtr
Definition: forwards.h:60
boost::shared_ptr< ConnectionManager > ConnectionManagerPtr
WallTime current_real
This is when the current callback was actually called (Time::now() as of the beginning of the callbac...
Definition: forwards.h:155
SteadyTime current_expected
In a perfect world, this is when the current callback should be happening.
Definition: forwards.h:172
boost::shared_ptr< SubscriberCallbacks > SubscriberCallbacksPtr
Definition: forwards.h:126
boost::weak_ptr< Subscription > SubscriptionWPtr
Definition: forwards.h:74
boost::shared_ptr< PublisherLink > PublisherLinkPtr
Definition: forwards.h:78
Time current_expected
In a perfect world, this is when the current callback should be happening.
Definition: forwards.h:136
boost::shared_ptr< TopicManager > TopicManagerPtr
Definition: forwards.h:184
boost::shared_ptr< SubscriberLink > SubscriberLinkPtr
Definition: forwards.h:69
Manages an advertised service.
boost::weak_ptr< void const > VoidConstWPtr
Definition: forwards.h:53
roscpp&#39;s interface for creating subscribers, publishers, etc.
Definition: node_handle.h:87
boost::function< void(const SteadyTimerEvent &)> SteadyTimerCallback
Definition: forwards.h:180
Time last_expected
In a perfect world, this is when the last callback should have happened.
Definition: forwards.h:133
std::set< ConnectionPtr > S_Connection
Definition: forwards.h:64
boost::shared_ptr< Subscription > SubscriptionPtr
Definition: forwards.h:72
std::vector< PublisherLinkPtr > V_PublisherLink
Definition: forwards.h:80
Structure passed as a parameter to the callback invoked by a ros::SteadyTimer.
Definition: forwards.h:167
WallTime current_expected
In a perfect world, this is when the current callback should be happening.
Definition: forwards.h:154
boost::shared_ptr< Publication > PublicationPtr
Definition: forwards.h:66
std::vector< ConnectionPtr > V_Connection
Definition: forwards.h:65
A Publication manages an advertised topic.
Definition: publication.h:53
WallTime last_real
When the last callback actually happened.
Definition: forwards.h:152
VoidConstWPtr tracked_object_
Definition: forwards.h:123
WallTime last_expected
In a perfect world, this is when the last callback should have happened.
Definition: forwards.h:151
boost::function< void(const WallTimerEvent &)> WallTimerCallback
Definition: forwards.h:162
std::vector< SubscriberLinkPtr > V_SubscriberLink
Definition: forwards.h:71
boost::shared_ptr< TransportTCP > TransportTCPPtr
Definition: forwards.h:58
Time current_real
This is when the current callback was actually called (Time::now() as of the beginning of the callbac...
Definition: forwards.h:137
boost::shared_ptr< ServiceServerLink > ServiceServerLinkPtr
Definition: forwards.h:85
SubscriberStatusCallback disconnect_
Definition: forwards.h:120
std::set< SubscriptionPtr > S_Subscription
Definition: forwards.h:77
UDPROS transport.
Definition: transport_udp.h:67
std::vector< ServicePublicationPtr > V_ServicePublication
Definition: forwards.h:84
std::list< SubscriptionPtr > L_Subscription
Definition: forwards.h:75
SteadyTime last_real
When the last callback actually happened.
Definition: forwards.h:170
Structure passed as a parameter to the callback invoked by a ros::WallTimer.
Definition: forwards.h:149
WallDuration last_duration
How long the last callback ran for.
Definition: forwards.h:177
boost::shared_ptr< ServicePublication > ServicePublicationPtr
Definition: forwards.h:81
boost::shared_ptr< void > VoidPtr
Definition: forwards.h:50
Structure passed as a parameter to the callback invoked by a ros::Timer.
Definition: forwards.h:131
boost::shared_ptr< PollManager > PollManagerPtr


roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim
autogenerated on Sun Feb 3 2019 03:29:54