Files
SimControl/include/CommService/PayLoads/Pong.hpp
Henry Winkel 80dc1ab043 Squashed 'libs/CommService/' changes from 7ccc0fc..e3612a5
e3612a5 FIX: fixed the termination of the processes

git-subtree-dir: libs/CommService
git-subtree-split: e3612a55032895575a2f3394511d6c09b2a98988
2022-09-15 11:15:23 +02:00

54 lines
1.3 KiB
C++

#ifndef __LIBBC_BC_PAYLOADS_PONG_HPP__
#define __LIBBC_BC_PAYLOADS_PONG_HPP__
/**
* @file
* @brief main header file for the Pong payload
* @author Henry Winkel
* @date 15.09.2022
* @copyright
*/
#include <CommService/transmittable.hpp>
#include <cstdint>
#include <vector>
namespace CommService
{
namespace PayLoads
{
/**
* @brief class representing the payload of a Pong message
*
* the Pong messages is the reply to a ping message.
*
*/
class Pong : public transmittable
{
public:
Pong()=default;
/**
* @brief constructor to recreate the HotPlugJoin payload from a a std::vector<unsigned char>
*/
explicit Pong(std::vector<unsigned char> v);
/// message id uniqly identifying one ping message
uint64_t pingMessageID;
/// ping transmission time
int pingTransmissionTime;
/// the sequence number of the ping
uint64_t sequenceNr;
/**
* @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<unsigned char> toByteVector() const override;
};
}; //namespace Payloads
}; //namespace BC
#endif