- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
125 lines
2.9 KiB
C++
Executable File
125 lines
2.9 KiB
C++
Executable File
/**
|
|
* AVS-Interface for VideoOverlayManagement
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by hjl, SLSE, 2016-06-24
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtNetwork/QHostAddress>
|
|
#include "logger.h"
|
|
|
|
// Forwarddeclarations
|
|
class QTcpSocket;
|
|
class QTimer;
|
|
|
|
namespace VideoOverlayManagement
|
|
{
|
|
|
|
enum class AvsIfConnectionState
|
|
{
|
|
Undefined = 0,
|
|
Connected,
|
|
Disconnected,
|
|
TryReconnect,
|
|
ConnectionError,
|
|
};
|
|
|
|
enum class AvsCmdState
|
|
{
|
|
Ok = 200,
|
|
KeepAlive = 298,
|
|
BadArguments = 402,
|
|
CommandNotStateValid = 455
|
|
};
|
|
|
|
|
|
class AvsInterface
|
|
: public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
/**
|
|
* Constructor connect to plugboard
|
|
* @param[in] enableTryReconnect if true, try reconnection
|
|
* @param[in] parent Pointer to parent qObject
|
|
*/
|
|
AvsInterface(bool enableTryReconnect, QObject *parent = nullptr);
|
|
|
|
~AvsInterface();
|
|
|
|
/**
|
|
* Connect to AVS RCP_AVA
|
|
* @param[in] hostName Hostname or Ip address to get access to AVS
|
|
* @param[in] port Ip port to get access to AVS
|
|
*/
|
|
void start(const QString &hostName, quint16 port);
|
|
|
|
AvsIfConnectionState getAvsIfState()
|
|
{
|
|
return m_avsIfConnectionState;
|
|
}
|
|
|
|
/**
|
|
* Send data to connected TcpSocket
|
|
* @param[in] qba Data to be transfered completed with "\r\n"
|
|
*/
|
|
bool sendCommand(const QByteArray &qba);
|
|
|
|
|
|
Q_SIGNALS:
|
|
/**
|
|
* Signals current AVS connection state
|
|
*/
|
|
void avsIfConnectionState(AvsIfConnectionState);
|
|
/**
|
|
* Signals current AVS command state
|
|
*/
|
|
void avsCmdState(AvsCmdState);
|
|
|
|
/**
|
|
* Signals an missing AVS keep-alive
|
|
* If the parameter 'enableTryReconnect' is set
|
|
* the connection attempting to restore automatically
|
|
*/
|
|
void avsKeepAliveTimeout();
|
|
|
|
/**
|
|
* Define the signal/slots connects uesd for TcpSocket
|
|
*/
|
|
protected Q_SLOTS:
|
|
void doConnect();
|
|
void onConnected();
|
|
void onDisonnected();
|
|
void onError(QAbstractSocket::SocketError);
|
|
void onReadyRead();
|
|
void onAvsKeepAliveTimeout();
|
|
|
|
private: // methode
|
|
void tryReconnect();
|
|
|
|
private: // attributes
|
|
QString m_hostName; ///< Hostname or Ip address to get access to AVS
|
|
QString m_ipAddressDNS; ///< DNS IP address of AVS
|
|
quint16 m_hostPort; ///< Ip port to get access to AVS
|
|
qint32 m_waitTime; ///< delay before try reconnection
|
|
bool m_enableTryReconnect; ///< if true, enables try reconnection
|
|
bool m_tryReconnect; ///< if true, try reconnection
|
|
|
|
QTimer *m_avsKeepAliveTimer; ///< AVS keep-alive timer
|
|
qint32 m_keepAliveTime; ///< AVS keep-alive time intervall in msec
|
|
|
|
AvsIfConnectionState m_avsIfConnectionState; ///< AVS Interface connection state
|
|
|
|
QTcpSocket *m_socket; ///< pointer to tcpsocket object
|
|
|
|
QByteArray m_buffer; ///< data buffer to hold incoming data form tcpsocket
|
|
|
|
|
|
};
|
|
|
|
} // namespace VideoOverlayManagement
|