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 {
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  }
121  boost::function<void(const SubscriberLinkPtr&)> push_latched_message_;
122 
126 };
128 
133 {
137 
141 
142  struct
143  {
145  } profile;
146 };
147 typedef boost::function<void(const TimerEvent&)> TimerCallback;
148 
153 {
157 
161 
162  struct
163  {
165  } profile;
166 };
167 typedef boost::function<void(const WallTimerEvent&)> WallTimerCallback;
168 
173 {
177 
181 
182  struct
183  {
185  } profile;
186 };
187 typedef boost::function<void(const SteadyTimerEvent&)> SteadyTimerCallback;
188 
193 class ConnectionManager;
197 class PollManager;
199 
200 }
201 
202 #endif
ros::SteadyTimerEvent::current_expected
SteadyTime current_expected
In a perfect world, this is when the current callback should be happening.
Definition: forwards.h:178
ros::SteadyTimerEvent::last_expected
SteadyTime last_expected
In a perfect world, this is when the last callback should have happened.
Definition: forwards.h:174
datatypes.h
ros::V_PublisherLink
std::vector< PublisherLinkPtr > V_PublisherLink
Definition: forwards.h:80
ros::CallbackInterfacePtr
boost::shared_ptr< CallbackInterface > CallbackInterfacePtr
Definition: callback_queue_interface.h:74
ros::SteadyTimerEvent::current_expired
SteadyTime current_expired
When the current timer actually expired and the callback was added to the queue.
Definition: forwards.h:180
exceptions.h
ros::SubscriberLinkPtr
boost::shared_ptr< SubscriberLink > SubscriberLinkPtr
Definition: forwards.h:69
ros::TransportUDP
UDPROS transport.
Definition: transport_udp.h:67
ros::TimerCallback
boost::function< void(const TimerEvent &)> TimerCallback
Definition: forwards.h:147
boost::shared_ptr
ros::SteadyTimerEvent::last_real
SteadyTime last_real
When the last callback actually happened.
Definition: forwards.h:175
ros::SubscriberCallbacks::connect_
SubscriberStatusCallback connect_
Definition: forwards.h:119
ros::TimerEvent::last_real
Time last_real
When the last callback actually happened.
Definition: forwards.h:135
ros::ServiceManager
Definition: service_manager.h:54
ros::SubscriberCallbacks
Definition: forwards.h:102
ros::SubscriberCallbacksPtr
boost::shared_ptr< SubscriberCallbacks > SubscriberCallbacksPtr
Definition: forwards.h:127
ros::V_SubscriberLink
std::vector< SubscriberLinkPtr > V_SubscriberLink
Definition: forwards.h:71
ros
ros::SubscriberCallbacks::disconnect_
SubscriberStatusCallback disconnect_
Definition: forwards.h:120
ros::SubscriptionPtr
boost::shared_ptr< Subscription > SubscriptionPtr
Definition: forwards.h:72
time.h
ros::Header
ros::WallTimerEvent::profile
struct ros::WallTimerEvent::@1 profile
ros::TransportUDPPtr
boost::shared_ptr< TransportUDP > TransportUDPPtr
Definition: forwards.h:60
ros::ServiceManagerPtr
boost::shared_ptr< ServiceManager > ServiceManagerPtr
Definition: forwards.h:189
ros::SubscriberCallbacks::SubscriberCallbacks
SubscriberCallbacks(const SubscriberStatusCallback &connect=SubscriberStatusCallback(), const SubscriberStatusCallback &disconnect=SubscriberStatusCallback(), const VoidConstPtr &tracked_object=VoidConstPtr(), CallbackQueueInterface *callback_queue=0)
Definition: forwards.h:104
ros::WallTimerEvent::last_duration
WallDuration last_duration
How long the last callback ran for.
Definition: forwards.h:164
ros::TimerEvent::last_duration
WallDuration last_duration
How long the last callback ran for.
Definition: forwards.h:144
ros::VoidWPtr
boost::weak_ptr< void > VoidWPtr
Definition: forwards.h:51
ros::ServicePublication
Manages an advertised service.
Definition: service_publication.h:61
ros::Transport
Abstract base class that allows abstraction of the transport type, eg. TCP, shared memory,...
Definition: transport.h:55
ros::SubscriberStatusCallback
boost::function< void(const SingleSubscriberPublisher &)> SubscriberStatusCallback
Definition: forwards.h:94
ros::WallTimerEvent::current_expected
WallTime current_expected
In a perfect world, this is when the current callback should be happening.
Definition: forwards.h:158
ros::SubscriberCallbacks::has_tracked_object_
bool has_tracked_object_
Definition: forwards.h:123
ros::SteadyTimerEvent::last_duration
WallDuration last_duration
How long the last callback ran for.
Definition: forwards.h:184
ros::WallTimerEvent::last_expired
WallTime last_expired
When the last timer actually expired and the callback was added to the queue.
Definition: forwards.h:156
ros::WallTimerCallback
boost::function< void(const WallTimerEvent &)> WallTimerCallback
Definition: forwards.h:167
ros::Connection
Encapsulates a connection to a remote host, independent of the transport type.
Definition: connection.h:70
ros::L_ServiceServerLink
std::list< ServiceServerLinkPtr > L_ServiceServerLink
Definition: forwards.h:87
ros::SingleSubscriberPublisher
Allows publication of a message to a single subscriber. Only available inside subscriber connection c...
Definition: single_subscriber_publisher.h:43
ros::S_Connection
std::set< ConnectionPtr > S_Connection
Definition: forwards.h:64
ros::PollManager
Definition: poll_manager.h:48
ros::S_Subscription
std::set< SubscriptionPtr > S_Subscription
Definition: forwards.h:77
ros::SubscriberCallbacks::tracked_object_
VoidConstWPtr tracked_object_
Definition: forwards.h:124
ros::VoidConstPtr
boost::shared_ptr< void const > VoidConstPtr
Definition: forwards.h:52
ros::ServicePublicationPtr
boost::shared_ptr< ServicePublication > ServicePublicationPtr
Definition: forwards.h:81
ros::SteadyTime
ros::V_Connection
std::vector< ConnectionPtr > V_Connection
Definition: forwards.h:65
ros::PublisherLinkPtr
boost::shared_ptr< PublisherLink > PublisherLinkPtr
Definition: forwards.h:78
ros::PublicationPtr
boost::shared_ptr< Publication > PublicationPtr
Definition: forwards.h:66
ros::V_Publication
std::vector< PublicationPtr > V_Publication
Definition: forwards.h:68
ros::WallTimerEvent::last_real
WallTime last_real
When the last callback actually happened.
Definition: forwards.h:155
ros::ServiceServerLinkPtr
boost::shared_ptr< ServiceServerLink > ServiceServerLinkPtr
Definition: forwards.h:85
ros::SteadyTimerEvent
Structure passed as a parameter to the callback invoked by a ros::SteadyTimer.
Definition: forwards.h:172
ros::TopicManagerPtr
boost::shared_ptr< TopicManager > TopicManagerPtr
Definition: forwards.h:191
ros::ConnectionManager
Definition: connection_manager.h:44
ros::V_ServicePublication
std::vector< ServicePublicationPtr > V_ServicePublication
Definition: forwards.h:84
ros::NodeHandle
roscpp's interface for creating subscribers, publishers, etc.
Definition: node_handle.h:85
ros::WallTimerEvent::last_expected
WallTime last_expected
In a perfect world, this is when the last callback should have happened.
Definition: forwards.h:154
ros::CallbackInterface
Abstract interface for items which can be added to a CallbackQueueInterface.
Definition: callback_queue_interface.h:48
ros::TimerEvent
Structure passed as a parameter to the callback invoked by a ros::Timer.
Definition: forwards.h:132
ros::V_Subscription
std::vector< SubscriptionPtr > V_Subscription
Definition: forwards.h:76
ros::SubscriptionWPtr
boost::weak_ptr< Subscription > SubscriptionWPtr
Definition: forwards.h:74
ros::WallTime
ros::Publication
A Publication manages an advertised topic.
Definition: publication.h:53
ros::TimerEvent::current_real
Time current_real
This is when the current callback was actually called (Time::now() as of the beginning of the callbac...
Definition: forwards.h:139
ros::WallTimerEvent::current_real
WallTime current_real
This is when the current callback was actually called (Time::now() as of the beginning of the callbac...
Definition: forwards.h:159
ros::SteadyTimerEvent::last_expired
SteadyTime last_expired
When the last timer actually expired and the callback was added to the queue.
Definition: forwards.h:176
ros::TimerEvent::profile
struct ros::TimerEvent::@0 profile
ros::TransportTCP
TCPROS transport.
Definition: transport_tcp.h:56
ros::VoidConstWPtr
boost::weak_ptr< void const > VoidConstWPtr
Definition: forwards.h:53
ros::ConnectionPtr
boost::shared_ptr< Connection > ConnectionPtr
Definition: connection.h:57
ros::SteadyTimerCallback
boost::function< void(const SteadyTimerEvent &)> SteadyTimerCallback
Definition: forwards.h:187
ros::TimerEvent::last_expired
Time last_expired
When the last timer actually expired and the callback was added to the queue.
Definition: forwards.h:136
ros::SubscriberCallbacks::push_latched_message_
boost::function< void(const SubscriberLinkPtr &)> push_latched_message_
Definition: forwards.h:121
ros::WallTimerEvent
Structure passed as a parameter to the callback invoked by a ros::WallTimer.
Definition: forwards.h:152
ros::TransportTCPPtr
boost::shared_ptr< TransportTCP > TransportTCPPtr
Definition: forwards.h:58
ros::Time
ros::CallbackQueue
This is the default implementation of the ros::CallbackQueueInterface.
Definition: callback_queue.h:57
ros::ConnectionManagerPtr
boost::shared_ptr< ConnectionManager > ConnectionManagerPtr
Definition: connection_manager.h:41
ros::Subscription
Manages a subscription on a single topic.
Definition: subscription.h:65
ros::TimerEvent::last_expected
Time last_expected
In a perfect world, this is when the last callback should have happened.
Definition: forwards.h:134
ros::TopicManager
Definition: topic_manager.h:63
ros::WallTimerEvent::current_expired
WallTime current_expired
When the current timer actually expired and the callback was added to the queue.
Definition: forwards.h:160
ros::TimerEvent::current_expected
Time current_expected
In a perfect world, this is when the current callback should be happening.
Definition: forwards.h:138
ros::TransportPtr
boost::shared_ptr< Transport > TransportPtr
Definition: connection.h:55
ros::PollManagerPtr
boost::shared_ptr< PollManager > PollManagerPtr
Definition: connection_manager.h:38
ros::VoidPtr
boost::shared_ptr< void > VoidPtr
Definition: forwards.h:50
ros::WallDuration
ros::XMLRPCManagerPtr
boost::shared_ptr< XMLRPCManager > XMLRPCManagerPtr
Definition: forwards.h:195
macros.h
ros::TimerEvent::current_expired
Time current_expired
When the current timer actually expired and the callback was added to the queue.
Definition: forwards.h:140
ros::L_ServicePublication
std::list< ServicePublicationPtr > L_ServicePublication
Definition: forwards.h:83
ros::NodeHandlePtr
boost::shared_ptr< NodeHandle > NodeHandlePtr
Definition: forwards.h:90
ros::SteadyTimerEvent::current_real
SteadyTime current_real
This is when the current callback was actually called (SteadyTime::now() as of the beginning of the c...
Definition: forwards.h:179
ros::CallbackQueueInterface
Abstract interface for a queue used to handle all callbacks within roscpp.
Definition: callback_queue_interface.h:82
ros::L_Subscription
std::list< SubscriptionPtr > L_Subscription
Definition: forwards.h:75
ros::SubscriberCallbacks::callback_queue_
CallbackQueueInterface * callback_queue_
Definition: forwards.h:125
ros::XMLRPCManager
Definition: xmlrpc_manager.h:94
ros::SteadyTimerEvent::profile
struct ros::SteadyTimerEvent::@2 profile


roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas , Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:35