#ifndef __LIBBC_BC_PAYLOADS_HOTPLUGLEAVE_HPP__ #define __LIBBC_BC_PAYLOADS_HOTPLUGLEAVE_HPP__ /* * 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 https://mozilla.org/MPL/2.0/. */ /** * @file * @brief main header file for the BC::Payloads::HotPlugLeave payload * @author Dominik Meyer * @date 2019-02-05 * @copyright 2019 no yet defined */ #include #include #include #include namespace BC { namespace Payloads { /** * @brief class representing the payload of a HotPlugLeave message * * the HotPlugLeave messages is transmitted by every PubSub Service before disconnecting * from the network. * It provides information about the type of service, the id and the underlying * network/transport layer addresses. * */ class HotPlugLeave : public BC::transmittable { public: HotPlugLeave()=default; /** * @brief constructor to recreate the HotPlugJoin payload from a a std::vector */ explicit HotPlugLeave(std::vector v); /// the address of the underlying network layer used to join the network unsigned char networkLayerAddress[16]; /// the address of the underlying transport layer used to join the network uint32_t transportLayerAddress; /** * @brief converts the information of the class (the attributes) to a byte vector * * @param byteVector - returns a std::vector of bytes representing the class */ std::vector toByteVector() const override; }; }; //namespace Payloads }; //namespace BC #endif