summaryrefslogtreecommitdiff
path: root/implementation/tracing/include
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/tracing/include')
-rw-r--r--implementation/tracing/include/channel_impl.hpp23
-rw-r--r--implementation/tracing/include/connector_impl.hpp10
-rw-r--r--implementation/tracing/include/defines.hpp2
-rw-r--r--implementation/tracing/include/enumeration_types.hpp5
-rw-r--r--implementation/tracing/include/header.hpp2
5 files changed, 31 insertions, 11 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_
};
diff --git a/implementation/tracing/include/connector_impl.hpp b/implementation/tracing/include/connector_impl.hpp
index 8274b9f..e5c90d2 100644
--- a/implementation/tracing/include/connector_impl.hpp
+++ b/implementation/tracing/include/connector_impl.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-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/.
@@ -7,8 +7,10 @@
#define VSOMEIP_V3_TRACE_CONNECTOR_HPP_
#ifdef USE_DLT
+#ifndef ANDROID
#include <dlt/dlt.h>
#endif
+#endif
#include <mutex>
#include <vector>
@@ -58,7 +60,7 @@ public:
VSOMEIP_EXPORT std::shared_ptr<channel> get_channel(const std::string &_id) const;
VSOMEIP_EXPORT void trace(const byte_t *_header, uint16_t _header_size,
- const byte_t *_data, uint16_t _data_size);
+ const byte_t *_data, uint32_t _data_size);
private:
bool is_enabled_;
@@ -67,10 +69,14 @@ private:
std::map<std::string, std::shared_ptr<channel_impl>> channels_;
mutable std::mutex channels_mutex_;
+ std::shared_ptr<channel_impl> get_channel_impl(const std::string &_id) const;
+
#ifdef USE_DLT
+#ifndef ANDROID
std::map<std::string, std::shared_ptr<DltContext>> contexts_;
mutable std::mutex contexts_mutex_;
#endif
+#endif
};
diff --git a/implementation/tracing/include/defines.hpp b/implementation/tracing/include/defines.hpp
index 022f42f..fd5e8f8 100644
--- a/implementation/tracing/include/defines.hpp
+++ b/implementation/tracing/include/defines.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-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/.
diff --git a/implementation/tracing/include/enumeration_types.hpp b/implementation/tracing/include/enumeration_types.hpp
index 3f83586..9f5f6e8 100644
--- a/implementation/tracing/include/enumeration_types.hpp
+++ b/implementation/tracing/include/enumeration_types.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-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/.
@@ -11,7 +11,8 @@ namespace trace {
enum class filter_type_e : uint8_t {
NEGATIVE = 0x00,
- POSITIVE = 0x01
+ POSITIVE = 0x01,
+ HEADER_ONLY = 0x02
};
} // namespace trace
diff --git a/implementation/tracing/include/header.hpp b/implementation/tracing/include/header.hpp
index e3dc4c1..190a15f 100644
--- a/implementation/tracing/include/header.hpp
+++ b/implementation/tracing/include/header.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2016-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2016-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/.