summaryrefslogtreecommitdiff
path: root/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp
diff options
context:
space:
mode:
authorJuergen Gehring <juergen.gehring@bmw.de>2018-05-22 02:56:40 -0700
committerJuergen Gehring <juergen.gehring@bmw.de>2018-05-22 02:56:40 -0700
commit2f0fdc596d24621c2bd4223cc63c8c1fb5b4c2d8 (patch)
tree9bcfdaa7f58c4928b21964e00fdc995929032738 /implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp
parent3f591262507bbce2a57e182ef8a1c40951a31018 (diff)
downloadvSomeIP-2f0fdc596d24621c2bd4223cc63c8c1fb5b4c2d8.tar.gz
vsomeip 2.10.112.10.11
Diffstat (limited to 'implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp')
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp b/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp
new file mode 100644
index 0000000..7080329
--- /dev/null
+++ b/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp
@@ -0,0 +1,41 @@
+// 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_E2E_PROFILE_CUSTOM_CHECKER_HPP
+#define VSOMEIP_E2E_PROFILE_CUSTOM_CHECKER_HPP
+
+#include "../profile_custom/profile_custom.hpp"
+#include "../profile_interface/checker.hpp"
+#include <mutex>
+
+namespace vsomeip {
+namespace e2e {
+namespace profile_custom {
+
+class profile_custom_checker final : public vsomeip::e2e::profile_interface::checker {
+
+ public:
+ profile_custom_checker(void) = delete;
+
+ explicit profile_custom_checker(const vsomeip::e2e::profile_custom::profile_config &_config) :
+ config_(_config) {}
+
+ virtual void check(const e2e_buffer &_buffer,
+ vsomeip::e2e::profile_interface::generic_check_status &_generic_check_status);
+
+ private:
+ uint32_t read_crc(const e2e_buffer &_buffer) const;
+
+private:
+ profile_config config_;
+ std::mutex check_mutex_;
+
+};
+
+} // namespace profile_custom
+} // namespace e2e
+} // namespace vsomeip
+
+#endif // VSOMEIP_E2E_PROFILE_CUSTOM_CHECKER_HPP