/** * 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 namespace PrtCnv { class PrtCnvStoredCentralTelegram : public PrtCnv::PrtCnvStoredTelegram { public: PrtCnvStoredCentralTelegram(const std::shared_ptr &a_centralTelegram, const std::shared_ptr &a_radioTelegram) : PrtCnvStoredTelegram(a_radioTelegram) , m_CentralTelegram(a_centralTelegram) {} int writeCounter() const { return m_WriteCounter; } /** * Assigned central-telegram. */ std::shared_ptr 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; }; }