diff options
Diffstat (limited to 'implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp')
-rw-r--r-- | implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp b/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp index c16eb10..2ed3ebd 100644 --- a/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp +++ b/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2020-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/. @@ -6,6 +6,8 @@ #ifndef VSOMEIP_V3_E2E_PROFILE04_CHECKER_HPP #define VSOMEIP_V3_E2E_PROFILE04_CHECKER_HPP +#include <map> + #include "../profile04/profile_04.hpp" #include "../profile_interface/checker.hpp" @@ -20,14 +22,14 @@ public: // [SWS_E2E_00389] initialize state explicit profile_04_checker(const profile_config &_config) : - config_(_config), counter_(0xffff) {} + config_(_config) {} void check(const e2e_buffer &_buffer, instance_t _instance, e2e::profile_interface::check_status_t &_generic_check_status) override final; private: bool verify_input(const e2e_buffer &_buffer) const; - bool verify_counter(uint16_t _received_counter) const; + bool verify_counter(instance_t _instance, uint16_t _received_counter); bool read_16(const e2e_buffer &_buffer, uint16_t &_data, size_t _index) const; bool read_32(const e2e_buffer &_buffer, uint32_t &_data, size_t _index) const; @@ -35,7 +37,7 @@ private: std::mutex check_mutex_; profile_config config_; - uint16_t counter_; + std::map<instance_t, uint16_t> counter_; }; } // namespace profile_04 |