Ignition Transport

API Reference

4.0.0
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 IGN_TRANSPORT_TRANSPORTTYPES_HH_
18 #define IGN_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 
36 
37 namespace ignition
38 {
39  namespace transport
40  {
42  class IRepHandler;
43  class IReqHandler;
44  class ISubscriptionHandler;
45  class RawSubscriptionHandler;
46  class MessageInfo;
47 
53  template<typename T>
55 
59 
63 
66  using ProtoMsg = google::protobuf::Message;
67 
71 
75 
79 
87 
94 
98 
102 
108  using IReqHandler_M =
110 
116  template <typename T>
117  using DiscoveryCallback = std::function<void(const T &_publisher)>;
118 
122  using MsgDiscoveryCallback =
123  std::function<void(const MessagePublisher &_publisher)>;
124 
128  using SrvDiscoveryCallback =
129  std::function<void(const ServicePublisher &_publisher)>;
130 
135  template <typename T>
136  using MsgCallback =
137  std::function<void(const T &_msg, const MessageInfo &_info)>;
138 
145  using RawCallback =
146  std::function<void(const char *_msgData, const size_t _size,
147  const MessageInfo &_info)>;
148 
151  using Timestamp = std::chrono::steady_clock::time_point;
152 
167  using DeallocFunc = void(void *_data, void *_hint);
168 
170  const std::string kGenericMessageType = "google.protobuf.Message";
171  }
172 }
173 #endif
STL class.
STL class.
STL class.
const std::string kGenericMessageType
The string type used for generic messages.
Definition: TransportTypes.hh:170
A class that provides information about the message received.
Definition: MessageInfo.hh:33
void(void *_data, void *_hint) DeallocFunc
Definition: TransportTypes.hh:167
This class stores all the information about a message publisher.
Definition: Publisher.hh:198
This class stores all the information about a service publisher.
Definition: Publisher.hh:314
google::protobuf::Message ProtoMsg
Definition: TransportTypes.hh:66
std::chrono::steady_clock::time_point Timestamp
Definition: TransportTypes.hh:151
Definition: AdvertiseOptions.hh:27