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_CFG_SERVICE_HPP
7 #define VSOMEIP_V3_CFG_SERVICE_HPP
8 
9 #include <memory>
10 
11 #include <vsomeip/primitive_types.hpp>
12 
13 namespace vsomeip_v3 {
14 namespace cfg {
15 
16 struct event;
17 struct eventgroup;
18 
19 struct service {
20     service_t service_;
21     instance_t instance_;
22 
23     std::string unicast_address_;
24 
25     uint16_t reliable_;
26     uint16_t unreliable_;
27 
28     major_version_t major_;
29     minor_version_t minor_;
30     ttl_t ttl_;
31 
32     std::string multicast_address_;
33     uint16_t multicast_port_;
34 
35     std::string protocol_;
36 
37     // [0] = debounce_time
38     // [1] = retention_time
39     typedef std::map<method_t, std::array<std::chrono::nanoseconds, 2>> npdu_time_configuration_t;
40     npdu_time_configuration_t debounce_times_requests_;
41     npdu_time_configuration_t debounce_times_responses_;
42 
43     std::shared_ptr<servicegroup> group_;
44     std::map<event_t, std::shared_ptr<event> > events_;
45     std::map<eventgroup_t, std::shared_ptr<eventgroup> > eventgroups_;
46 
47     // SOME/IP-TP
48     std::set<method_t> tp_segment_messages_client_to_service_;
49     std::set<method_t> tp_segment_messages_service_to_client_;
50 };
51 
52 } // namespace cfg
53 } // namespace vsomeip_v3
54 
55 #endif // VSOMEIP_V3_CFG_SERVICE_HPP
56