summaryrefslogtreecommitdiff
path: root/implementation/configuration/include/trace.hpp
blob: 3ffdf0093a0da237e133aa5dd0a79e33776956e5 (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
54
55
56
57
58
59
60
61
62
63
64
// Copyright (C) 2014-2016 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 CONFIGURATION_INCLUDE_TRACE_HPP_
#define CONFIGURATION_INCLUDE_TRACE_HPP_

#include <vsomeip/primitive_types.hpp>

#include "../../tracing/include/defines.hpp"

namespace vsomeip {
namespace cfg {

struct trace_channel {

    trace_channel() :
        id_(VSOMEIP_TC_DEFAULT_CHANNEL_ID),
        name_(VSOMEIP_TC_DEFAULT_CHANNEL_NAME) {

    }

    trace_channel_t id_;
    std::string name_;
};

struct trace_filter_rule {

    trace_filter_rule() :
        channel_(VSOMEIP_TC_DEFAULT_CHANNEL_ID),
        services_(),
        methods_(),
        clients_() {

    }

    trace_channel_t channel_;
    std::vector<service_t> services_;
    std::vector<method_t> methods_;
    std::vector<client_t> clients_;
};

struct trace {

    trace() :
        channels_(),
        filter_rules_(),
        is_enabled_(false),
        is_sd_enabled_(false) {
        channels_.push_back(std::make_shared<trace_channel>());
    }

    std::vector<std::shared_ptr<trace_channel>> channels_;
    std::vector<std::shared_ptr<trace_filter_rule>> filter_rules_;

    bool is_enabled_;
    bool is_sd_enabled_;
};

} // namespace cfg
} // namespace vsomeip

#endif /* CONFIGURATION_INCLUDE_TRACE_HPP_ */