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_INCLUDED__
18 #define _IGN_TRANSPORT_TRANSPORTTYPES_HH_INCLUDED__
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 
50  // same process uuid.
51  using MsgAddresses_M = std::map<std::string, std::vector<MessagePublisher>>;
52 
58  using SrvAddresses_M = std::map<std::string, std::vector<ServicePublisher>>;
59 
62  using ProtoMsg = google::protobuf::Message;
63 
66  using ProtoMsgPtr = std::shared_ptr<ProtoMsg>;
67 
70  using ISubscriptionHandlerPtr = std::shared_ptr<ISubscriptionHandler>;
71 
78  std::map<std::string, ISubscriptionHandlerPtr>;
79 
82  using IRepHandlerPtr = std::shared_ptr<IRepHandler>;
83 
86  using IReqHandlerPtr = std::shared_ptr<IReqHandler>;
87 
93  using IReqHandler_M =
94  std::map<std::string, std::map<std::string, IReqHandlerPtr>>;
95 
101  using MsgDiscoveryCallback =
102  std::function<void(const MessagePublisher&_publisher)>;
103 
109  using SrvDiscoveryCallback =
110  std::function<void(const ServicePublisher&_publisher)>;
111 
114  using Timestamp = std::chrono::steady_clock::time_point;
115  }
116 }
117 #endif
std::map< std::string, std::vector< ServicePublisher >> SrvAddresses_M
Definition: TransportTypes.hh:58
google::protobuf::Message ProtoMsg
Definition: TransportTypes.hh:62
std::shared_ptr< IRepHandler > IRepHandlerPtr
Definition: TransportTypes.hh:82
std::shared_ptr< ProtoMsg > ProtoMsgPtr
Definition: TransportTypes.hh:66
std::map< std::string, std::vector< MessagePublisher >> MsgAddresses_M
Definition: TransportTypes.hh:51
std::function< void(const ServicePublisher &_publisher)> SrvDiscoveryCallback
Definition: TransportTypes.hh:110
std::shared_ptr< ISubscriptionHandler > ISubscriptionHandlerPtr
Definition: TransportTypes.hh:70
std::function< void(const MessagePublisher &_publisher)> MsgDiscoveryCallback
Definition: TransportTypes.hh:102
std::shared_ptr< IReqHandler > IReqHandlerPtr
Definition: TransportTypes.hh:86
std::map< std::string, ISubscriptionHandlerPtr > ISubscriptionHandler_M
Definition: TransportTypes.hh:78
std::chrono::steady_clock::time_point Timestamp
Definition: TransportTypes.hh:114
Definition: AdvertiseOptions.hh:25
std::map< std::string, std::map< std::string, IReqHandlerPtr >> IReqHandler_M
Definition: TransportTypes.hh:94