Files
qt5-legatus-legacy/TetraIF/PrtCnv/PrtCnvStoredCentralTelegram.hpp
T
2026-08-13 18:33:10 +02:00

52 lines
1.3 KiB
C++

/**
* Helper to store/fetch a central telegram into/from database
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2016-04-22
*/
#pragma once
#include "PrtCnvStoredTelegram.hpp"
#include <CoPrtCnv/CoPrtCnvCentralTelegram.hpp>
namespace PrtCnv
{
class PrtCnvStoredCentralTelegram : public PrtCnv::PrtCnvStoredTelegram
{
public:
PrtCnvStoredCentralTelegram(const std::shared_ptr<N_CoPrtCnv::CoPrtCnvCentralTelegram> &a_centralTelegram,
const std::shared_ptr<N_CoPrtCnv::CoPrtCnvRadioTelegram> &a_radioTelegram)
: PrtCnvStoredTelegram(a_radioTelegram)
, m_CentralTelegram(a_centralTelegram)
{}
int writeCounter() const { return m_WriteCounter; }
/**
* Assigned central-telegram.
*/
std::shared_ptr<N_CoPrtCnv::CoPrtCnvCentralTelegram> m_CentralTelegram;
/**
* The number of unsuccessful attempts to send the telegram to central
*/
uint32_t m_Attempts = 0;
/**
* The counter while sending this telegram to central
*/
int m_WriteCounter = 0;
/**
* True if the telegram must be resent.
*/
bool m_DoResend = false;
/**
* True if the telegram must be deleted.
* Use this boolean only if you want delete a telegram as an exception (i.e.
* corrupt telegram, which cannot be sent)
*/
bool m_DoDelete = false;
};
}