1 // Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
2 // This Source Code Form is subject to the terms of the Mozilla Public
3 // License, v. 2.0. If a copy of the MPL was not distributed with this
4 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 
6 #ifndef VSOMEIP_V3_ROUTING_TYPES_HPP_
7 #define VSOMEIP_V3_ROUTING_TYPES_HPP_
8 
9 #include <map>
10 #include <memory>
11 #include <boost/asio/ip/address.hpp>
12 
13 #include <vsomeip/primitive_types.hpp>
14 #include <vsomeip/constants.hpp>
15 
16 namespace vsomeip_v3 {
17 
18 class serviceinfo;
19 class endpoint_definition;
20 
21 
22 typedef std::map<service_t,
23                  std::map<instance_t,
24                           std::shared_ptr<serviceinfo> > > services_t;
25 
26 class eventgroupinfo;
27 
28 typedef std::map<service_t,
29                  std::map<instance_t,
30                           std::map<eventgroup_t,
31                                    std::shared_ptr<
32                                        eventgroupinfo> > > > eventgroups_t;
33 
34 enum class registration_type_e : std::uint8_t {
35     REGISTER = 0x1,
36     DEREGISTER = 0x2,
37     DEREGISTER_ON_ERROR = 0x3
38 };
39 
40 enum class remote_subscription_state_e : std::uint8_t {
41     SUBSCRIPTION_PENDING = 0x00,
42 
43     SUBSCRIPTION_ACKED   = 0x01,
44     SUBSCRIPTION_NACKED  = 0x02,
45 
46     SUBSCRIPTION_ERROR   = 0x03,
47     SUBSCRIPTION_UNKNOWN = 0xFF
48 };
49 
50 typedef std::uint16_t remote_subscription_id_t;
51 typedef std::uint32_t pending_remote_offer_id_t;
52 
53 struct msg_statistic_t {
54     uint32_t counter_;
55     length_t avg_length_;
56 };
57 
58 }
59 // namespace vsomeip_v3
60 
61 #endif // VSOMEIP_V3_ROUTING_TYPES_HPP_
62