/** * Send / Receive telegrams to/from TX/RX directory * $Id$ * $HeadURL$ * $Author$ * Created by Christian Ehrlicher, SLSE, 2016-09-26 */ #pragma once #include #include #include #include "../TetraJson/convert_from_json.h" #include "convert_to_json_file.h" class XDR_DirHandler_emit; namespace TetraRadio { class DirectoryCleaner; class DirectoryDispatcher final : public TrainingAreaBase::Plugin::Interface, protected ConvertFromJson { Q_OBJECT public: explicit DirectoryDispatcher(const std::shared_ptr &recvFromTabCb, const QString &txDir, const QString &rxDir); ~DirectoryDispatcher(); bool init() override; std::shared_ptr sendToTab() override; bool isDebugInterface() const override { return true; } bool canSendData() const override { return true; } void exerciseChanged() override { return; } const char *name() const override { return tr_lts("dds", "Debug Directory XDR Dispatcher"); } void handleAcknowledge(qint64, int) override {} void handleTetraConnectionChanged(bool) override {} private Q_SLOTS: void newTelegramArrived(const QString &fullPath); private: std::shared_ptr m_tx; std::shared_ptr m_rx; XDR_DirHandler_emit *m_xdrDirHandler; DirectoryCleaner *m_txCleaner; QString m_txDir; QString m_rxDir; }; } // namespace TetraRadio