diff options
Diffstat (limited to 'implementation/e2e_protection/include/e2e/profile/profile_custom')
3 files changed, 15 insertions, 10 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 index 73f1bbb..e233205 100644 --- a/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp +++ b/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp @@ -23,10 +23,10 @@ public: explicit profile_custom_checker(const e2e::profile_custom::profile_config &_config) : config_(_config) {} - virtual void check(const e2e_buffer &_buffer, - e2e::profile_interface::check_status_t &_generic_check_status); + void check(const e2e_buffer &_buffer, instance_t _instance, + e2e::profile_interface::check_status_t &_generic_check_status) override final; - private: +private: uint32_t read_crc(const e2e_buffer &_buffer) const; private: diff --git a/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp b/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp index 1cabefa..244989d 100644 --- a/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp +++ b/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp @@ -7,6 +7,9 @@ #define VSOMEIP_V3_E2E_PROFILE_CUSTOM_PROFILE_CUSTOM_HPP #include <cstdint> + +#include <vsomeip/defines.hpp> + #include "../../../buffer/buffer.hpp" namespace vsomeip_v3 { @@ -23,15 +26,17 @@ class profile_custom { }; struct profile_config { - uint16_t crc_offset_; - profile_config() = delete; profile_config(uint16_t _crc_offset) - : crc_offset_(_crc_offset) { + : crc_offset_(_crc_offset), + base_(VSOMEIP_FULL_HEADER_SIZE) { } profile_config(const profile_config &_config) = default; profile_config &operator=(const profile_config &_config) = default; + + uint16_t crc_offset_; + size_t base_; }; } // namespace profile_custom diff --git a/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp b/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp index 31b976b..a2ec5d1 100644 --- a/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp +++ b/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp @@ -15,18 +15,18 @@ namespace e2e { namespace profile_custom { class protector final : public e2e::profile_interface::protector { - public: +public: protector(void) = delete; explicit protector(const profile_config &_config) : config_(_config){}; - void protect(e2e_buffer &_buffer) override final; + void protect(e2e_buffer &_buffer, instance_t _instance) override final; - private: +private: void write_crc(e2e_buffer &_buffer, uint32_t _computed_crc); - private: +private: profile_config config_; std::mutex protect_mutex_; }; |