diff options
author | Juergen Gehring <juergen.gehring@bmw.de> | 2017-06-19 08:03:41 -0700 |
---|---|---|
committer | Juergen Gehring <juergen.gehring@bmw.de> | 2017-06-19 08:03:41 -0700 |
commit | cf67875117ef7b1b9a25fe1f23e8b7ba1197c934 (patch) | |
tree | e6cb18195024eccf224ffd270a924aabf2768285 /implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp | |
parent | 5315798ff81796217b55eb8c622f154bb0a1c487 (diff) | |
download | vSomeIP-cf67875117ef7b1b9a25fe1f23e8b7ba1197c934.tar.gz |
vSomeIP 2.6.32.6.3
Diffstat (limited to 'implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp')
-rw-r--r-- | implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp b/implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp new file mode 100644 index 0000000..7c10f25 --- /dev/null +++ b/implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp @@ -0,0 +1,36 @@ +// 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 E2E_PROFILE_PROFILE01_PROTECTOR_HPP +#define E2E_PROFILE_PROFILE01_PROTECTOR_HPP + +#include <mutex> +#include "../profile01/profile_01.hpp" +#include "../profile_interface/protector.hpp" + +namespace e2e { +namespace profile { +namespace profile01 { + +class protector final : public e2e::profile::profile_interface::protector { + public: + protector(void) = delete; + + explicit protector(const Config &_config) : config(_config){}; + + void protect(buffer::e2e_buffer &_buffer) override final; + + private: + + void write_crc(buffer::e2e_buffer &_buffer, uint8_t _computed_crc); + + private: + Config config; + std::mutex protect_mutex; +}; +} +} +} +#endif |