1 // Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
2 // This Source Code Form is subject to the terms of the Mozilla Public
3 // License, v. 2.0. If a copy of the MPL was not distributed with this
4 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 
6 #ifndef VSOMEIP_V3_E2E_PROFILE_CUSTOM_CHECKER_HPP
7 #define VSOMEIP_V3_E2E_PROFILE_CUSTOM_CHECKER_HPP
8 
9 #include "../profile_custom/profile_custom.hpp"
10 #include "../profile_interface/checker.hpp"
11 #include <mutex>
12 
13 namespace vsomeip_v3 {
14 namespace e2e {
15 namespace profile_custom {
16 
17 class profile_custom_checker final
18         : public e2e::profile_interface::checker {
19 
20 public:
21     profile_custom_checker(void) = delete;
22 
profile_custom_checker(const e2e::profile_custom::profile_config & _config)23     explicit profile_custom_checker(const e2e::profile_custom::profile_config &_config) :
24             config_(_config) {}
25 
26     void check(const e2e_buffer &_buffer, instance_t _instance,
27             e2e::profile_interface::check_status_t &_generic_check_status) override final;
28 
29 private:
30     uint32_t read_crc(const e2e_buffer &_buffer) const;
31 
32 private:
33     profile_config config_;
34     std::mutex check_mutex_;
35 
36 };
37 
38 } // namespace profile_custom
39 } // namespace e2e
40 } // namespace vsomeip_v3
41 
42 #endif // VSOMEIP_V3_E2E_PROFILE_CUSTOM_CHECKER_HPP
43