1 // Copyright (C) 2014-2018 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_SD_PROTECTION_OPTION_IMPL_HPP_ 7 #define VSOMEIP_V3_SD_PROTECTION_OPTION_IMPL_HPP_ 8 9 #include "../include/primitive_types.hpp" 10 #include "../include/option_impl.hpp" 11 12 namespace vsomeip_v3 { 13 namespace sd { 14 15 class protection_option_impl: public option_impl { 16 public: 17 protection_option_impl(); 18 virtual ~protection_option_impl(); 19 20 bool operator ==(const option_impl &_other) const; 21 22 alive_counter_t get_alive_counter() const; 23 void set_alive_counter(alive_counter_t _counter); 24 25 crc_t get_crc() const; 26 void set_crc(crc_t _crc); 27 28 bool serialize(vsomeip_v3::serializer *_to) const; 29 bool deserialize(vsomeip_v3::deserializer *_from); 30 31 private: 32 alive_counter_t counter_; 33 crc_t crc_; 34 }; 35 36 } // namespace sd 37 } // namespace vsomeip_v3 38 39 #endif // VSOMEIP_V3_SD_PROTECTION_OPTION_IMPL_HPP_ 40