summaryrefslogtreecommitdiff
path: root/implementation/configuration/include/trace.hpp
blob: c9eb8cb29b98340ea3ff104e5215dc9ddf0eb318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef VSOMEIP_V3_CFG_TRACE_HPP_
#define VSOMEIP_V3_CFG_TRACE_HPP_

#include <string>
#include <vector>

#include <vsomeip/primitive_types.hpp>
#include <vsomeip/trace.hpp>

namespace vsomeip_v3 {
namespace cfg {

struct trace_channel {
    trace_channel_t id_;
    std::string name_;
};

struct trace_filter {
    trace_filter()
        : is_positive_(true),
          is_range_(false) {
    }

    std::vector<trace_channel_t> channels_;
    bool is_positive_;
    bool is_range_;
    std::vector<vsomeip_v3::trace::match_t> matches_;
};

struct trace {
    trace()
        : is_enabled_(false),
          is_sd_enabled_(false),
          channels_(),
          filters_() {
    }

    bool is_enabled_;
    bool is_sd_enabled_;

    std::vector<std::shared_ptr<trace_channel>> channels_;
    std::vector<std::shared_ptr<trace_filter>> filters_;
};

} // namespace cfg
} // namespace vsomeip_v3

#endif // VSOMEIP_V3_CFG_TRACE_HPP_