summaryrefslogtreecommitdiff
path: root/implementation/tracing
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/tracing')
-rw-r--r--implementation/tracing/include/channel_impl.hpp12
-rw-r--r--implementation/tracing/include/connector_impl.hpp15
-rw-r--r--implementation/tracing/include/defines.hpp10
-rw-r--r--implementation/tracing/include/enumeration_types.hpp10
-rw-r--r--implementation/tracing/include/header.hpp10
-rw-r--r--implementation/tracing/src/channel_impl.cpp8
-rw-r--r--implementation/tracing/src/connector_impl.cpp10
-rw-r--r--implementation/tracing/src/header.cpp8
8 files changed, 40 insertions, 43 deletions
diff --git a/implementation/tracing/include/channel_impl.hpp b/implementation/tracing/include/channel_impl.hpp
index 9034657..cc2e583 100644
--- a/implementation/tracing/include/channel_impl.hpp
+++ b/implementation/tracing/include/channel_impl.hpp
@@ -3,8 +3,8 @@
// 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_TRACING_CHANNEL_IMPL_HPP_
-#define VSOMEIP_TRACING_CHANNEL_IMPL_HPP_
+#ifndef VSOMEIP_V3_TRACE_CHANNEL_IMPL_HPP_
+#define VSOMEIP_V3_TRACE_CHANNEL_IMPL_HPP_
#include <atomic>
#include <functional>
@@ -14,7 +14,7 @@
#include <vsomeip/trace.hpp>
-namespace vsomeip {
+namespace vsomeip_v3 {
namespace trace {
typedef std::function<bool (service_t, instance_t, method_t)> filter_func_t;
@@ -44,7 +44,7 @@ public:
bool matches(service_t _service, instance_t _instance, method_t _method);
private:
- filter_id_t add_filter_intern(filter_func_t _func, bool _is_positive);
+ filter_id_t add_filter_intern(const filter_func_t& _func, bool _is_positive);
std::string id_;
std::string name_;
@@ -57,6 +57,6 @@ private:
};
} // namespace trace
-} // namespace vsomeip
+} // namespace vsomeip_v3
-#endif // VSOMEIP_TRACING_CHANNEL_IMPL_HPP_
+#endif // VSOMEIP_V3_TRACE_CHANNEL_IMPL_HPP_
diff --git a/implementation/tracing/include/connector_impl.hpp b/implementation/tracing/include/connector_impl.hpp
index 3234fed..8274b9f 100644
--- a/implementation/tracing/include/connector_impl.hpp
+++ b/implementation/tracing/include/connector_impl.hpp
@@ -3,8 +3,8 @@
// 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_TC_TRACE_CONNECTOR_HPP
-#define VSOMEIP_TC_TRACE_CONNECTOR_HPP
+#ifndef VSOMEIP_V3_TRACE_CONNECTOR_HPP_
+#define VSOMEIP_V3_TRACE_CONNECTOR_HPP_
#ifdef USE_DLT
#include <dlt/dlt.h>
@@ -24,10 +24,10 @@
#include "header.hpp"
#include "../../endpoints/include/buffer.hpp"
-namespace vsomeip {
+namespace vsomeip_v3 {
namespace cfg {
- struct trace;
+ struct trace;
}
namespace trace {
@@ -53,7 +53,7 @@ public:
VSOMEIP_EXPORT bool is_sd_message(const byte_t *_data, uint16_t _data_size) const;
VSOMEIP_EXPORT std::shared_ptr<channel> add_channel(const std::string &_id,
- const std::string &_description);
+ const std::string &_description);
VSOMEIP_EXPORT bool remove_channel(const std::string &_id);
VSOMEIP_EXPORT std::shared_ptr<channel> get_channel(const std::string &_id) const;
@@ -63,19 +63,18 @@ public:
private:
bool is_enabled_;
bool is_sd_enabled_;
- bool is_initialized_;
std::map<std::string, std::shared_ptr<channel_impl>> channels_;
mutable std::mutex channels_mutex_;
#ifdef USE_DLT
- std::map<std::string, std::shared_ptr<DltContext>> contexts_;
+ std::map<std::string, std::shared_ptr<DltContext>> contexts_;
mutable std::mutex contexts_mutex_;
#endif
};
} // namespace trace
-} // namespace vsomeip
+} // namespace vsomeip_v3
#endif // VSOMEIP_TC_TRACE_CONNECTOR_HPP
diff --git a/implementation/tracing/include/defines.hpp b/implementation/tracing/include/defines.hpp
index 2325259..022f42f 100644
--- a/implementation/tracing/include/defines.hpp
+++ b/implementation/tracing/include/defines.hpp
@@ -3,13 +3,13 @@
// 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 TRACING_INCLUDE_DEFINES_HPP_
-#define TRACING_INCLUDE_DEFINES_HPP_
+#ifndef VSOMEIP_TRACE_DEFINES_HPP_
+#define VSOMEIP_TRACE_DEFINES_HPP_
#define VSOMEIP_TC_DEFAULT_CHANNEL_NAME "Trace Connector Network Logging"
#define VSOMEIP_TC_DEFAULT_FILTER_TYPE "positive"
-#define VSOMEIP_TC_INSTANCE_POS_MIN 8
-#define VSOMEIP_TC_INSTANCE_POS_MAX 9
+#define VSOMEIP_TC_INSTANCE_POS_MIN 8
+#define VSOMEIP_TC_INSTANCE_POS_MAX 9
-#endif /* TRACING_INCLUDE_DEFINES_HPP_ */
+#endif // VSOMEIP_TRACE_DEFINES_HPP_
diff --git a/implementation/tracing/include/enumeration_types.hpp b/implementation/tracing/include/enumeration_types.hpp
index 352ddd3..3f83586 100644
--- a/implementation/tracing/include/enumeration_types.hpp
+++ b/implementation/tracing/include/enumeration_types.hpp
@@ -3,10 +3,10 @@
// 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_TRACE_ENUMERATION_TYPES_HPP
-#define VSOMEIP_TRACE_ENUMERATION_TYPES_HPP
+#ifndef VSOMEIP_V3_TRACE_ENUMERATION_TYPES_HPP_
+#define VSOMEIP_V3_TRACE_ENUMERATION_TYPES_HPP_
-namespace vsomeip {
+namespace vsomeip_v3 {
namespace trace {
enum class filter_type_e : uint8_t {
@@ -15,6 +15,6 @@ enum class filter_type_e : uint8_t {
};
} // namespace trace
-} // namespace vsomeip
+} // namespace vsomeip_v3
-#endif // VSOMEIP_TC_ENUMERATION_TYPES_HPP
+#endif // VSOMEIP_V3_TRACE_ENUMERATION_TYPES_HPP_
diff --git a/implementation/tracing/include/header.hpp b/implementation/tracing/include/header.hpp
index 55ec73e..e3dc4c1 100644
--- a/implementation/tracing/include/header.hpp
+++ b/implementation/tracing/include/header.hpp
@@ -3,8 +3,8 @@
// 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_TRACE_HEADER_HPP
-#define VSOMEIP_TRACE_HEADER_HPP
+#ifndef VSOMEIP_V3_TRACE_HEADER_HPP_
+#define VSOMEIP_V3_TRACE_HEADER_HPP_
#include <memory>
@@ -14,7 +14,7 @@
#define VSOMEIP_TRACE_HEADER_SIZE 10
-namespace vsomeip {
+namespace vsomeip_v3 {
class endpoint;
@@ -40,6 +40,6 @@ struct header {
};
} // namespace trace
-} // namespace vsomeip
+} // namespace vsomeip_v3
-#endif // VSOMEIP_TRACE_HEADER_HPP
+#endif // VSOMEIP_V3_TRACE_HEADER_HPP_
diff --git a/implementation/tracing/src/channel_impl.cpp b/implementation/tracing/src/channel_impl.cpp
index 58f67e6..c0bc391 100644
--- a/implementation/tracing/src/channel_impl.cpp
+++ b/implementation/tracing/src/channel_impl.cpp
@@ -3,9 +3,9 @@
// 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/.
#include "../include/channel_impl.hpp"
-#include "../../logging/include/logger.hpp"
+#include <vsomeip/internal/logger.hpp>
-namespace vsomeip {
+namespace vsomeip_v3 {
namespace trace {
const filter_id_t FILTER_ID_ERROR(0);
@@ -231,7 +231,7 @@ void channel_impl::remove_filter(filter_id_t _id) {
negative_.erase(_id);
}
-filter_id_t channel_impl::add_filter_intern(filter_func_t _func, bool _is_positive) {
+filter_id_t channel_impl::add_filter_intern(const filter_func_t& _func, bool _is_positive) {
filter_id_t its_id = current_filter_id_.fetch_add(1);
std::lock_guard<std::mutex> its_lock(mutex_);
@@ -270,4 +270,4 @@ bool channel_impl::matches(
}
} // namespace trace
-} // namespace vsomeip
+} // namespace vsomeip_v3
diff --git a/implementation/tracing/src/connector_impl.cpp b/implementation/tracing/src/connector_impl.cpp
index f8655db..f71c92e 100644
--- a/implementation/tracing/src/connector_impl.cpp
+++ b/implementation/tracing/src/connector_impl.cpp
@@ -4,16 +4,15 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <vsomeip/constants.hpp>
+#include <vsomeip/internal/logger.hpp>
#include "../include/channel_impl.hpp"
#include "../include/connector_impl.hpp"
#include "../include/defines.hpp"
-#include "../../configuration/include/internal.hpp"
#include "../../configuration/include/trace.hpp"
-#include "../../logging/include/logger.hpp"
#include "../../utility/include/byteorder.hpp"
-namespace vsomeip {
+namespace vsomeip_v3 {
namespace trace {
const char *VSOMEIP_TC_DEFAULT_CHANNEL_ID = "TC";
@@ -25,8 +24,7 @@ std::shared_ptr<connector_impl> connector_impl::get() {
connector_impl::connector_impl() :
is_enabled_(false),
- is_sd_enabled_(false),
- is_initialized_(false) {
+ is_sd_enabled_(false) {
channels_[VSOMEIP_TC_DEFAULT_CHANNEL_ID]
= std::make_shared<channel_impl>(VSOMEIP_TC_DEFAULT_CHANNEL_ID,
@@ -223,4 +221,4 @@ void connector_impl::trace(const byte_t *_header, uint16_t _header_size,
}
} // namespace trace
-} // namespace vsomeip
+} // namespace vsomeip_v3
diff --git a/implementation/tracing/src/header.cpp b/implementation/tracing/src/header.cpp
index 2f4f3f8..0940e59 100644
--- a/implementation/tracing/src/header.cpp
+++ b/implementation/tracing/src/header.cpp
@@ -10,7 +10,7 @@
#include "../../endpoints/include/client_endpoint.hpp"
#include "../../utility/include/byteorder.hpp"
-namespace vsomeip {
+namespace vsomeip_v3 {
namespace trace {
bool header::prepare(const std::shared_ptr<endpoint> &_endpoint,
@@ -52,8 +52,8 @@ bool header::prepare(const endpoint *_endpoint, bool _is_sending,
}
void header::prepare(const boost::asio::ip::address_v4 &_address,
- std::uint16_t _port, protocol_e _protocol,
- bool _is_sending, instance_t _instance) {
+ std::uint16_t _port, protocol_e _protocol,
+ bool _is_sending, instance_t _instance) {
unsigned long its_address_as_long = _address.to_ulong();
data_[0] = VSOMEIP_LONG_BYTE3(its_address_as_long);
data_[1] = VSOMEIP_LONG_BYTE2(its_address_as_long);
@@ -68,4 +68,4 @@ void header::prepare(const boost::asio::ip::address_v4 &_address,
}
} // namespace trace
-} // namespace vsomeip
+} // namespace vsomeip_v3