summaryrefslogtreecommitdiff
path: root/implementation/tracing/include/channel_impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/tracing/include/channel_impl.hpp')
-rw-r--r--implementation/tracing/include/channel_impl.hpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/implementation/tracing/include/channel_impl.hpp b/implementation/tracing/include/channel_impl.hpp
index cc2e583..a00d8c5 100644
--- a/implementation/tracing/include/channel_impl.hpp
+++ b/implementation/tracing/include/channel_impl.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2017-2021 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/.
@@ -12,12 +12,13 @@
#include <mutex>
#include <string>
+#include "enumeration_types.hpp"
#include <vsomeip/trace.hpp>
namespace vsomeip_v3 {
namespace trace {
-typedef std::function<bool (service_t, instance_t, method_t)> filter_func_t;
+using filter_func_t = std::function<bool (service_t, instance_t, method_t)>;
class channel_impl : public channel {
public:
@@ -28,6 +29,10 @@ public:
filter_id_t add_filter(
const match_t &_match,
+ filter_type_e _type);
+
+ filter_id_t add_filter(
+ const match_t &_match,
bool _is_positive);
filter_id_t add_filter(
@@ -35,23 +40,31 @@ public:
bool _is_positive);
filter_id_t add_filter(
+ const std::vector<match_t> &_matches,
+ filter_type_e _type);
+
+ filter_id_t add_filter(
const match_t &_from, const match_t &_to,
bool _is_positive);
+ filter_id_t add_filter(
+ const match_t &_from, const match_t &_to,
+ filter_type_e _type);
+
void remove_filter(
filter_id_t _id);
- bool matches(service_t _service, instance_t _instance, method_t _method);
+ std::pair<bool, bool> matches(service_t _service, instance_t _instance, method_t _method);
private:
- filter_id_t add_filter_intern(const filter_func_t& _func, bool _is_positive);
+ filter_id_t add_filter_intern(const filter_func_t& _func, filter_type_e _type);
std::string id_;
std::string name_;
std::atomic<filter_id_t> current_filter_id_;
- std::map<filter_id_t, filter_func_t> positive_;
+ std::map<filter_id_t, std::pair<filter_func_t, bool>> positive_;
std::map<filter_id_t, filter_func_t> negative_;
std::mutex mutex_; // protects positive_ & negative_
};