Gazebo Transport
API Reference
14.0.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-transport
include
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)
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"
37
#include "
gz/transport/Publisher.hh
"
38
39
namespace
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>
59
using
Addresses_M
=
std::map<std::string, std::vector<T>
>;
60
63
using
MsgAddresses_M
=
Addresses_M<MessagePublisher>
;
64
67
using
SrvAddresses_M
=
Addresses_M<ServicePublisher>
;
68
71
using
ProtoMsg
= google::protobuf::Message;
72
75
using
ProtoMsgPtr
=
std::shared_ptr<ProtoMsg>
;
76
79
using
ISubscriptionHandlerPtr
=
std::shared_ptr<ISubscriptionHandler>
;
80
83
using
RawSubscriptionHandlerPtr
=
std::shared_ptr<RawSubscriptionHandler>
;
84
90
using
ISubscriptionHandler_M
=
91
std::map<std::string, ISubscriptionHandlerPtr>
;
92
97
using
RawSubscriptionHandler_M
=
98
std::map<std::string, RawSubscriptionHandlerPtr>
;
99
102
using
IRepHandlerPtr
=
std::shared_ptr<IRepHandler>
;
103
106
using
IReqHandlerPtr
=
std::shared_ptr<IReqHandler>
;
107
113
using
IReqHandler_M
=
114
std::map<std::string, std::map<std::string, IReqHandlerPtr>
>;
115
121
template
<
typename
T>
122
using
DiscoveryCallback
=
std::function
<void(
const
T &_publisher)>;
123
127
using
MsgDiscoveryCallback
=
128
std::function
<void(
const
MessagePublisher
&_publisher)>;
129
133
using
SrvDiscoveryCallback
=
134
std::function
<void(
const
ServicePublisher
&_publisher)>;
135
140
template
<
typename
T>
141
using
MsgCallback
=
142
std::function
<void(
const
T &_msg,
const
MessageInfo
&_info)>;
143
150
using
RawCallback
=
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