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_TRACE_HPP_
7 #define VSOMEIP_V3_CFG_TRACE_HPP_
8 
9 #include <string>
10 #include <vector>
11 
12 #include <vsomeip/primitive_types.hpp>
13 #include <vsomeip/trace.hpp>
14 
15 namespace vsomeip_v3 {
16 namespace cfg {
17 
18 struct trace_channel {
19     trace_channel_t id_;
20     std::string name_;
21 };
22 
23 struct trace_filter {
trace_filtervsomeip_v3::cfg::trace_filter24     trace_filter()
25         : is_positive_(true),
26           is_range_(false) {
27     }
28 
29     std::vector<trace_channel_t> channels_;
30     bool is_positive_;
31     bool is_range_;
32     std::vector<vsomeip_v3::trace::match_t> matches_;
33 };
34 
35 struct trace {
tracevsomeip_v3::cfg::trace36     trace()
37         : is_enabled_(false),
38           is_sd_enabled_(false),
39           channels_(),
40           filters_() {
41     }
42 
43     bool is_enabled_;
44     bool is_sd_enabled_;
45 
46     std::vector<std::shared_ptr<trace_channel>> channels_;
47     std::vector<std::shared_ptr<trace_filter>> filters_;
48 };
49 
50 } // namespace cfg
51 } // namespace vsomeip_v3
52 
53 #endif // VSOMEIP_V3_CFG_TRACE_HPP_
54