Gazebo Transport

API Reference

11.4.2
gz/transport/TransportTypes.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GZ_TRANSPORT_TRANSPORTTYPES_HH_
18 #define GZ_TRANSPORT_TRANSPORTTYPES_HH_
19 
20 #ifdef _MSC_VER
21 #pragma warning(push, 0)
22 #endif
23 #include <google/protobuf/message.h>
24 #ifdef _MSC_VER
25 #pragma warning(pop)
26 #endif
27 
28 #include <chrono>
29 #include <functional>
30 #include <map>
31 #include <memory>
32 #include <string>
33 #include <vector>
34 
35 #include "gz/transport/config.hh"
37 
38 namespace ignition::transport
39 {
40  // Inline bracket to help doxygen filtering.
41  inline namespace IGNITION_TRANSPORT_VERSION_NAMESPACE {
42  //
44  class IRepHandler;
45  class IReqHandler;
46  class ISubscriptionHandler;
47  class RawSubscriptionHandler;
48  class MessageInfo;
49 
55  template<typename T>
57 
61 
65 
68  using ProtoMsg = google::protobuf::Message;
69 
73 
77 
81 
89 
96 
100 
104 
110  using IReqHandler_M =
112 
118  template <typename T>
119  using DiscoveryCallback = std::function<void(const T &_publisher)>;
120 
124  using MsgDiscoveryCallback =
125  std::function<void(const MessagePublisher &_publisher)>;
126 
130  using SrvDiscoveryCallback =
131  std::function<void(const ServicePublisher &_publisher)>;
132 
137  template <typename T>
138  using MsgCallback =
139  std::function<void(const T &_msg, const MessageInfo &_info)>;
140 
147  using RawCallback =
148  std::function<void(const char *_msgData, const size_t _size,
149  const MessageInfo &_info)>;
150 
153  using Timestamp = std::chrono::steady_clock::time_point;
154 
169  using DeallocFunc = void(void *_data, void *_hint);
170 
172  const std::string kGenericMessageType = "google.protobuf.Message";
173 
176  const int kDefaultRcvHwm = 1000;
177 
180  const int kDefaultSndHwm = 1000;
181  }
182 }
183 #endif
STL class.
STL class.
google::protobuf::Message ProtoMsg
Definition: gz/transport/TransportTypes.hh:68
const int kDefaultRcvHwm
The high water mark of the recieve message buffer.
Definition: gz/transport/TransportTypes.hh:176
This class stores all the information about a message publisher.
Definition: gz/transport/Publisher.hh:176
std::chrono::steady_clock::time_point Timestamp
Definition: gz/transport/TransportTypes.hh:153
A class that provides information about the message received.
Definition: gz/transport/MessageInfo.hh:35
STL class.
Definition: gz/transport/AdvertiseOptions.hh:28
const int kDefaultSndHwm
The high water mark of the send message buffer.
Definition: gz/transport/TransportTypes.hh:180
This class stores all the information about a service publisher.
Definition: gz/transport/Publisher.hh:291
const std::string kGenericMessageType
The string type used for generic messages.
Definition: gz/transport/TransportTypes.hh:172
void(void *_data, void *_hint) DeallocFunc
Definition: gz/transport/TransportTypes.hh:169