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>
133 lines
3.1 KiB
C++
133 lines
3.1 KiB
C++
// **************************************************************************
|
|
//
|
|
// (C) Copyright 2009 Swiss SIMTEC AG
|
|
//
|
|
// **************************************************************************
|
|
//
|
|
// $HeadURL$
|
|
// $LastChangedBy$
|
|
// $LastChangedDate$
|
|
// $LastChangedRevision$
|
|
//
|
|
// **************************************************************************
|
|
|
|
#pragma once
|
|
|
|
#include "PrtCnvThread.hpp"
|
|
#include <queue>
|
|
#include <set>
|
|
|
|
class QTcpServer;
|
|
class QMutex;
|
|
|
|
namespace N_CoPrtCnv
|
|
{
|
|
class CoPrtCnvCentralTelegram;
|
|
}
|
|
|
|
namespace PrtCnv
|
|
{
|
|
class PrtCnvInjectionSocket;
|
|
/**
|
|
* This class represents a thread, which acts as TCP-Server. The LogView-
|
|
* application can connect to it and send radio- or central-telegrams. The
|
|
* telegrams will be stored within this class and can be taken by another thread.
|
|
* This mechanism will be used for inject telegrams to protocol-converter.
|
|
*
|
|
* @author alois.wismer
|
|
* @version 1.0
|
|
* @created 05-Aug-2010 11:17:06
|
|
*/
|
|
class PrtCnvInjectionThread : public PrtCnvThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
~PrtCnvInjectionThread();
|
|
|
|
/**
|
|
*
|
|
* @param a_parent
|
|
*/
|
|
explicit PrtCnvInjectionThread(PrtCnvThreadStarter* a_parent);
|
|
|
|
|
|
int32_t create(NGL::Settings *settings) override;
|
|
|
|
|
|
int32_t init() override;
|
|
|
|
/**
|
|
* Starts the thread and listen for TCP-clients
|
|
*/
|
|
int32_t start() override;
|
|
|
|
/**
|
|
* Returns the next central-telegram to be injected. It will automatically be
|
|
* taken out of the list.
|
|
* The caller is responsible to delete the telegram, if no longer used.
|
|
* Returns NULL if no central-telegram available
|
|
*/
|
|
N_CoPrtCnv::CoPrtCnvCentralTelegram *getNextCentralInjectionTelegram();
|
|
|
|
/**
|
|
* Returns the next radio-telegram to be injected. It will automatically be taken
|
|
* out of the list.
|
|
* The caller is responsible to delete the telegram, if no longer used.
|
|
* Returns NULL if no radio-telegram available
|
|
*/
|
|
N_CoPrtCnv::CoPrtCnvCentralTelegram *getNextRadioInjectionTelegram();
|
|
|
|
/**
|
|
*
|
|
* @param a_telegram
|
|
*/
|
|
void addToCentralList(N_CoPrtCnv::CoPrtCnvCentralTelegram *a_telegram);
|
|
|
|
/**
|
|
*
|
|
* @param a_telegram
|
|
*/
|
|
void addToRadioList(N_CoPrtCnv::CoPrtCnvCentralTelegram *a_telegram);
|
|
|
|
protected: /**
|
|
* The port of the injection-server (configurable with key 'Port' in group
|
|
* [Injection])
|
|
*/
|
|
uint16_t m_Port;
|
|
/**
|
|
* true if injection-server is enabled (configurable with key 'Enable' in group
|
|
* [Injection])
|
|
*/
|
|
bool m_Enabled;
|
|
QTcpServer *m_Server;
|
|
|
|
|
|
std::queue<N_CoPrtCnv::CoPrtCnvCentralTelegram *> m_CentralTelegramList;
|
|
QMutex *m_CentralListMutex;
|
|
|
|
|
|
std::queue<N_CoPrtCnv::CoPrtCnvCentralTelegram *> m_RadioTelegramList;
|
|
QMutex *m_RadioListMutex;
|
|
|
|
|
|
std::set<PrtCnvInjectionSocket*> m_SocketList;
|
|
|
|
|
|
|
|
public slots:
|
|
/**
|
|
* Connects a TCP-client
|
|
*/
|
|
void connectClient();
|
|
/**
|
|
* Disconnects a TCP-client
|
|
*
|
|
* @param a_injectionSocket
|
|
*/
|
|
void disconnectClient(PrtCnvInjectionSocket* a_injectionSocket);
|
|
|
|
};
|
|
|
|
}
|