Gazebo Transport

API Reference

14.0.0~pre1
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)
22#pragma warning(disable: 4251)
23#endif
24#include <google/protobuf/message.h>
25#ifdef _MSC_VER
26#pragma warning(pop)
27#endif
28
29#include <chrono>
30#include <functional>
31#include <map>
32#include <memory>
33#include <string>
34#include <vector>
35
36#include "gz/transport/config.hh"
38
39namespace gz
40{
41 namespace transport
42 {
43 // Inline bracket to help doxygen filtering.
44 inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
45 //
47 class IRepHandler;
48 class IReqHandler;
49 class ISubscriptionHandler;
50 class RawSubscriptionHandler;
51 class MessageInfo;
52
58 template<typename T>
60
64
68
71 using ProtoMsg = google::protobuf::Message;
72
76
80
84
92
99
103
107
115
121 template <typename T>
122 using DiscoveryCallback = std::function<void(const T &_publisher)>;
123
128 std::function<void(const MessagePublisher &_publisher)>;
129
134 std::function<void(const ServicePublisher &_publisher)>;
135
140 template <typename T>
142 std::function<void(const T &_msg, const MessageInfo &_info)>;
143
151 std::function<void(const char *_msgData, const size_t _size,
152 const MessageInfo &_info)>;
153
156 using Timestamp = std::chrono::steady_clock::time_point;
157
172 using DeallocFunc = void(void *_data, void *_hint);
173
175 const std::string kGenericMessageType = "google.protobuf.Message";
176
179 const int kDefaultRcvHwm = 1000;
180
183 const int kDefaultSndHwm = 1000;
184 }
185 }
186}
187#endif