Files
qt-migration-legatus/qt5-before/dlbo/TetraIF/PrtCnv/PrtCnvTelegramLogThread.hpp
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

118 lines
2.9 KiB
C++

// **************************************************************************
//
// (C) Copyright 2009 Swiss SIMTEC AG
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// **************************************************************************
#pragma once
#include "PrtCnvThread.hpp"
namespace N_CoPrtCnv
{
class CoPrtCnvCentralTelegram;
}
namespace TrainingAreaBase
{
namespace TetraIcd
{
struct TrainingAreaTelegram;
}
}
namespace PrtCnv
{
/**
* This thread is used to log telegrams in a log-file. This action is separated
* from central/radio-thead because of 2 reasons:
*
* 1. An unwanted synchronisation of radio- and central thread will be avoided
* 2. Storing to a file is very slow and would thwart the radio and central-thread
* @author alois.wismer
* @version 1.0
* @updated 03-Mai-2010 17:57:34
*/
class PrtCnvTelegramLogThread final : public PrtCnvThread
{
Q_OBJECT
public:
/**
*
* @param a_parent
*/
explicit PrtCnvTelegramLogThread(PrtCnvThreadStarter* a_parent);
int32_t create(NGL::Settings *settings) override;
int32_t init() override;
public slots:
/**
* Writes a received or sent central-telegram into log-file
*/
void writeCentralTelegramLog(N_CoPrtCnv::CoPrtCnvCentralTelegram *a_centralTelegram, bool a_isSend, int a_priority);
/**
* Writes a received or sent central-telegram into log-file
*/
void writeWlsTelegramLog(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *tele, bool a_isSend, int a_priority);
/**
* Writes a received or sent radio-telegram into log-file
*/
void writeRadioTelegramLog(const QByteArray &tele, bool a_isSend, int a_priority);
private:
signals:
/**
* This signal will be emitted when this thread receives a new telegram to log
*
* @param a_data
* @param a_protocolType
* @param a_isSend
* @param a_priority
*/
void telegramLogReceived(const QByteArray &a_data, int a_protocolType, int a_priority);
private slots:
/**
* Writes the telegram to the file
*
* @param a_data
* @param a_protocolType
* @param a_isSend
* @param a_priority
*/
void writeTelegramLog(const QByteArray &a_data, int a_protocolType, int a_priority);
protected:
/**
* The directory where we want to log the telegrams (configureable over parameter
* file)
*/
QString m_LogTelegramPathWithPrefix;
/**
* True if we want to log central-telegrams (configureable over parameter file)
*/
bool m_DoLogCentralTelegram;
/**
* True if we want to log wls-telegrams (configureable over parameter file)
*/
bool m_DoLogWlsTelegram;
/**
* True if we want to log TETRA-telegrams (configureable over parameter file)
*/
bool m_DoLogRadioTelegram;
};
}