Gazebo Transport
API Reference
13.4.1
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::transport
40
{
41
// Inline bracket to help doxygen filtering.
42
inline
namespace
GZ_TRANSPORT_VERSION_NAMESPACE {
43
//
45
class
IRepHandler;
46
class
IReqHandler;
47
class
ISubscriptionHandler;
48
class
RawSubscriptionHandler;
49
class
MessageInfo;
50
56
template
<
typename
T>
57
using
Addresses_M
=
std::map<std::string, std::vector<T>
>;
58
61
using
MsgAddresses_M
=
Addresses_M<MessagePublisher>
;
62
65
using
SrvAddresses_M
=
Addresses_M<ServicePublisher>
;
66
69
using
ProtoMsg
= google::protobuf::Message;
70
73
using
ProtoMsgPtr
=
std::shared_ptr<ProtoMsg>
;
74
77
using
ISubscriptionHandlerPtr
=
std::shared_ptr<ISubscriptionHandler>
;
78
81
using
RawSubscriptionHandlerPtr
=
std::shared_ptr<RawSubscriptionHandler>
;
82
88
using
ISubscriptionHandler_M
=
89
std::map<std::string, ISubscriptionHandlerPtr>
;
90
95
using
RawSubscriptionHandler_M
=
96
std::map<std::string, RawSubscriptionHandlerPtr>
;
97
100
using
IRepHandlerPtr
=
std::shared_ptr<IRepHandler>
;
101
104
using
IReqHandlerPtr
=
std::shared_ptr<IReqHandler>
;
105
111
using
IReqHandler_M
=
112
std::map<std::string, std::map<std::string, IReqHandlerPtr>
>;
113
119
template
<
typename
T>
120
using
DiscoveryCallback
=
std::function
<void(
const
T &_publisher)>;
121
125
using
MsgDiscoveryCallback
=
126
std::function
<void(
const
MessagePublisher
&_publisher)>;
127
131
using
SrvDiscoveryCallback
=
132
std::function
<void(
const
ServicePublisher
&_publisher)>;
133
138
template
<
typename
T>
139
using
MsgCallback
=
140
std::function
<void(
const
T &_msg,
const
MessageInfo
&_info)>;
141
148
using
RawCallback
=
149
std::function
<void(
const
char
*_msgData,
const
size_t
_size,
150
const
MessageInfo
&_info)>;
151
154
using
Timestamp
= std::chrono::steady_clock::time_point;
155
170
using
DeallocFunc
= void(
void
*_data,
void
*_hint);
171
173
const
std::string
kGenericMessageType
=
"google.protobuf.Message"
;
174
177
const
int
kDefaultRcvHwm
= 1000;
178
181
const
int
kDefaultSndHwm
= 1000;
182
}
183
}
184
#endif