Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- 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>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+12
-13
@@ -26,7 +26,6 @@ AvsInterface::AvsInterface(bool enableTryReconnect, QObject *parent)
|
||||
, m_keepAliveTime(Settings::getAvsKeepAliveTime())
|
||||
, m_avsIfConnectionState(AvsIfConnectionState::Undefined)
|
||||
, m_socket(nullptr)
|
||||
, m_logger(getLogger("AVS_Interface"))
|
||||
{
|
||||
doConnect();
|
||||
|
||||
@@ -46,7 +45,7 @@ AvsInterface::~AvsInterface()
|
||||
|
||||
void AvsInterface::doConnect()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "doConnect TCP-Socket ";
|
||||
DEBUG_LOG() << "doConnect TCP-Socket ";
|
||||
|
||||
if (m_socket)
|
||||
m_socket->deleteLater();
|
||||
@@ -63,7 +62,7 @@ void AvsInterface::doConnect()
|
||||
|
||||
if (m_tryReconnect)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Try reconnect to host: " << m_hostName
|
||||
INFO_LOG() << "Try reconnect to host: " << m_hostName
|
||||
<< " port: " << m_hostPort
|
||||
<< " ip-address: " << m_ipAddressDNS;
|
||||
|
||||
@@ -79,12 +78,12 @@ void AvsInterface::start(const QString &hostName, quint16 port)
|
||||
const QList<QHostAddress> ipList = hostInfo.addresses();
|
||||
if (ipList.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Non ip-address found for hostname: " << hostName;
|
||||
ERROR_LOG() << "Non ip-address found for hostname: " << hostName;
|
||||
m_ipAddressDNS.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(m_logger) << "Try connect to AVS: " << hostName
|
||||
INFO_LOG() << "Try connect to AVS: " << hostName
|
||||
<< " port: " << port
|
||||
<< " ip-address: " << ipList.at(0).toString();
|
||||
|
||||
@@ -98,7 +97,7 @@ void AvsInterface::start(const QString &hostName, quint16 port)
|
||||
|
||||
void AvsInterface::onConnected()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Connected to "
|
||||
INFO_LOG() << "Connected to "
|
||||
<< m_socket->peerAddress().toString()
|
||||
<< ":" << m_socket->peerPort();
|
||||
m_waitTime = 1;
|
||||
@@ -113,7 +112,7 @@ void AvsInterface::onConnected()
|
||||
|
||||
void AvsInterface::onDisonnected()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Disconnected from " << m_socket->peerAddress().toString()
|
||||
INFO_LOG() << "Disconnected from " << m_socket->peerAddress().toString()
|
||||
<< ":" << m_socket->peerPort();
|
||||
|
||||
m_avsKeepAliveTimer->stop();
|
||||
@@ -126,7 +125,7 @@ void AvsInterface::onError(QAbstractSocket::SocketError err)
|
||||
{
|
||||
if (m_enableTryReconnect)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Socket error: " << err
|
||||
ERROR_LOG() << "Socket error: " << err
|
||||
<< " \"" << m_socket->errorString() << "\""
|
||||
<< " Hostname: " << m_hostName
|
||||
<< " Port:" << m_hostPort
|
||||
@@ -135,7 +134,7 @@ void AvsInterface::onError(QAbstractSocket::SocketError err)
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Socket error: " << err
|
||||
ERROR_LOG() << "Socket error: " << err
|
||||
<< " \"" << m_socket->errorString() << "\""
|
||||
<< " Hostname: " << m_hostName
|
||||
<< " Port:" << m_hostPort
|
||||
@@ -180,7 +179,7 @@ void AvsInterface::onReadyRead()
|
||||
if (data.isEmpty())
|
||||
continue;
|
||||
|
||||
INFO_LOG(m_logger) << "Incoming RCP_AVA: '" << data << "'";
|
||||
INFO_LOG() << "Incoming RCP_AVA: '" << data << "'";
|
||||
int cmdNr = -1;
|
||||
bool bOk = false;
|
||||
|
||||
@@ -237,11 +236,11 @@ bool AvsInterface::sendCommand(const QByteArray &qba)
|
||||
{
|
||||
bool bOk = true;
|
||||
|
||||
INFO_LOG(m_logger) << "Send command: " << qba.trimmed();
|
||||
INFO_LOG() << "Send command: " << qba.trimmed();
|
||||
|
||||
if (m_socket->state() != QTcpSocket::ConnectedState)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "sendCommand()"
|
||||
ERROR_LOG() << "sendCommand()"
|
||||
<< " '" << qba.trimmed()
|
||||
<< "' No socket connection established.";
|
||||
return false;
|
||||
@@ -252,7 +251,7 @@ bool AvsInterface::sendCommand(const QByteArray &qba)
|
||||
if (trxBytes != qba.size())
|
||||
{
|
||||
bOk = false;
|
||||
ERROR_LOG(m_logger) << "Insufficient number of tansfered bytes."
|
||||
ERROR_LOG() << "Insufficient number of tansfered bytes."
|
||||
<< " Soll: " << trxBytes << " Ist: " << qba.size();
|
||||
}
|
||||
m_socket->flush();
|
||||
|
||||
@@ -117,7 +117,7 @@ private: // attributes
|
||||
QTcpSocket *m_socket; ///< pointer to tcpsocket object
|
||||
|
||||
QByteArray m_buffer; ///< data buffer to hold incoming data form tcpsocket
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -15,19 +15,18 @@ namespace VideoOverlayManagement
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool DdsHandler::init(const QStringList &qosFileList)
|
||||
{
|
||||
INFO_LOG(m_logger) << "--- Start VideoOverlayManagement DDSHandler.";
|
||||
INFO_LOG() << "--- Start VideoOverlayManagement DDSHandler.";
|
||||
|
||||
if (!m_ddsConnector->init(qosFileList))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
||||
ERROR_LOG() << "Error initializing dds connections - aborting";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@ public:
|
||||
private:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<Core::Pacemaker> m_pacemaker;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace VideoOverlayManagement
|
||||
+12
-13
@@ -17,7 +17,6 @@ HandlerInfrastructureData::HandlerInfrastructureData(const std::shared_ptr<DdsHa
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_exerciseId(0)
|
||||
, m_logger(getLogger("HandlerInfrastructureData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -34,7 +33,7 @@ bool HandlerInfrastructureData::init(int exerciseId)
|
||||
m_dtc = InfrastructureManagement::Interface::Dtc::create(m_ddsHandler->dds());
|
||||
if (m_dtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create DTC InfrastructureManagement";
|
||||
ERROR_LOG() << "Could not create DTC InfrastructureManagement";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -45,7 +44,7 @@ bool HandlerInfrastructureData::init(int exerciseId)
|
||||
!m_dtc->waitForHistoricalDataMountingPointAsset() ||
|
||||
!m_dtc->waitForHistoricalDataInstrumentationAsset())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "init() DTC InfrastructureManagement failed";
|
||||
ERROR_LOG() << "init() DTC InfrastructureManagement failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +58,7 @@ bool HandlerInfrastructureData::init(int exerciseId)
|
||||
};
|
||||
if (!m_dtc->getAllAssetsPerRoom(predicate, assetsMap))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "HandlerInfrastructureData::getAllAssetsPerRoom() failed"
|
||||
WARNING_LOG() << "HandlerInfrastructureData::getAllAssetsPerRoom() failed"
|
||||
<< " assetsMap.size(): " << assetsMap.size();
|
||||
}
|
||||
|
||||
@@ -72,7 +71,7 @@ bool HandlerInfrastructureData::init(int exerciseId)
|
||||
asset.availableInExercise().end(), m_exerciseId);
|
||||
if (it == asset.availableInExercise().end())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Asset " << asset.id()
|
||||
DEBUG_LOG() << "Asset " << asset.id()
|
||||
<< " is not available in current exercise - skipping";
|
||||
continue;
|
||||
}
|
||||
@@ -80,16 +79,16 @@ bool HandlerInfrastructureData::init(int exerciseId)
|
||||
m_roomId2CameraNameMap.insert(roomId, QString::fromStdString(asset.name()));
|
||||
// und fuer subscribe in m_assetId2RoomIdMap eintragen
|
||||
m_assetId2RoomIdMap.insert(asset.id(), roomId);
|
||||
DEBUG_LOG(m_logger) << " assetId: " << asset.id()
|
||||
DEBUG_LOG() << " assetId: " << asset.id()
|
||||
<< " mountingPointTypeId: " << asset.mountingPointTypeId()
|
||||
<< " name: " << asset.name();
|
||||
}
|
||||
} // for(auto i = assetMap...
|
||||
|
||||
INFO_LOG(m_logger) << "m_roomId2CameraNameMap.size(): " << m_roomId2CameraNameMap.size();
|
||||
INFO_LOG() << "m_roomId2CameraNameMap.size(): " << m_roomId2CameraNameMap.size();
|
||||
for (auto i = m_roomId2CameraNameMap.begin(); i != m_roomId2CameraNameMap.end(); ++i)
|
||||
{
|
||||
INFO_LOG(m_logger) << "roomId: " << i.key()
|
||||
INFO_LOG() << "roomId: " << i.key()
|
||||
<< " cameraName: " << i.value();
|
||||
}
|
||||
|
||||
@@ -101,7 +100,7 @@ bool HandlerInfrastructureData::init(int exerciseId)
|
||||
m_dtc->enableMainStructureElement(false);
|
||||
m_dtc->enableMountingPointAsset(false);
|
||||
|
||||
INFO_LOG(m_logger) << "HandlerInfrastructureData::init() finished. "
|
||||
INFO_LOG() << "HandlerInfrastructureData::init() finished. "
|
||||
<< " m_roomId2CameraNameMap.size(): " << m_roomId2CameraNameMap.size();
|
||||
return true;
|
||||
} // end of init()
|
||||
@@ -117,7 +116,7 @@ QString HandlerInfrastructureData::getStreamNameFromRoomId(int roomId) const
|
||||
{
|
||||
auto it = m_roomId2CameraNameMap.find(roomId);
|
||||
const QString qs(it == m_roomId2CameraNameMap.end() ? QString() : it.value());
|
||||
DEBUG_LOG(m_logger) << "streamName for roomId: " << roomId << " '" << qs << "' ";
|
||||
DEBUG_LOG() << "streamName for roomId: " << roomId << " '" << qs << "' ";
|
||||
|
||||
return qs;
|
||||
} // end of getStreamNameFromRoomId()
|
||||
@@ -129,7 +128,7 @@ void HandlerInfrastructureData::onAssetChanged(const InfrastructureManagement::I
|
||||
if (data.mountingPointTypeId() != InfrastructureManagement::MountingPointType::IndoorCamera)
|
||||
return;
|
||||
|
||||
INFO_LOG(m_logger) << "onAssetChanged()"
|
||||
INFO_LOG() << "onAssetChanged()"
|
||||
<< " assetId: " << data.id()
|
||||
<< " name: " << data.name();
|
||||
|
||||
@@ -137,7 +136,7 @@ void HandlerInfrastructureData::onAssetChanged(const InfrastructureManagement::I
|
||||
data.availableInExercise().end(), m_exerciseId);
|
||||
if (it == data.availableInExercise().end())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Asset " << data.id()
|
||||
DEBUG_LOG() << "Asset " << data.id()
|
||||
<< " is not available in current exercise - skipping";
|
||||
return;
|
||||
}
|
||||
@@ -147,7 +146,7 @@ void HandlerInfrastructureData::onAssetChanged(const InfrastructureManagement::I
|
||||
|
||||
for (auto i = m_roomId2CameraNameMap.begin(); i != m_roomId2CameraNameMap.end(); ++i)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_roomId2CameraNameMap changed... "
|
||||
DEBUG_LOG() << "m_roomId2CameraNameMap changed... "
|
||||
<< " m_roomId2CameraNameMap.size(): " << m_roomId2CameraNameMap.size()
|
||||
<< " roomId: " << i.key()
|
||||
<< " cameraName: " << *i;
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ private: // attributes
|
||||
QMap<int, QString> m_roomId2CameraNameMap; ///< Reference map roomId to camera name(roomId, cameraName) Condition: per room one camera!
|
||||
int m_exerciseId;
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace VideoOverlayManagement
|
||||
|
||||
+11
-12
@@ -25,7 +25,6 @@ HandlerOverlays::HandlerOverlays(AvsInterface *avsIf,
|
||||
, m_handlerParticipantData(handlerParticipantData)
|
||||
, m_handlerInfrastructureData(handlerInfrastructureData)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_logger(getLogger("HandlerOverlays"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -37,7 +36,7 @@ HandlerOverlays::~HandlerOverlays()
|
||||
|
||||
bool HandlerOverlays::init()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Start VideoOverlay Handler.";
|
||||
INFO_LOG() << "Start VideoOverlay Handler.";
|
||||
|
||||
// internal Signal/Slot connection (must be done before calling initParticipantsInRoomMap() !)
|
||||
connect(this, &HandlerOverlays::participantsInRoomMapChanged,
|
||||
@@ -49,7 +48,7 @@ bool HandlerOverlays::init()
|
||||
connect(m_handlerParticipantData.get(), &HandlerParticipantData::participantPositionChanged,
|
||||
this, &HandlerOverlays::onParticipantPositionChanged);
|
||||
|
||||
INFO_LOG(m_logger) << "VOM Handler initialized. ";
|
||||
INFO_LOG() << "VOM Handler initialized. ";
|
||||
|
||||
return true;
|
||||
} // end of init()
|
||||
@@ -57,7 +56,7 @@ bool HandlerOverlays::init()
|
||||
|
||||
void HandlerOverlays::onParticipantPositionChanged(int oldRoomId, int newRoomId, int participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onParticipantPositionChanged() "
|
||||
DEBUG_LOG() << "onParticipantPositionChanged() "
|
||||
<< " oldRoomId: " << oldRoomId
|
||||
<< " newRoomId: " << newRoomId
|
||||
<< " participantId: " << participantId
|
||||
@@ -73,7 +72,7 @@ void HandlerOverlays::onParticipantPositionChanged(int oldRoomId, int newRoomId,
|
||||
|
||||
void HandlerOverlays::onParticipantsInRoomMapChanged(int roomId, const QSet<int> &participants)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onParticipantsInRoomMapChanged() "
|
||||
DEBUG_LOG() << "onParticipantsInRoomMapChanged() "
|
||||
<< " roomId: " << roomId
|
||||
<< " partId: " << getAllEquipmentNumbers(participants, false)
|
||||
<< " eqNo: " << getAllEquipmentNumbers(participants, true)
|
||||
@@ -82,7 +81,7 @@ void HandlerOverlays::onParticipantsInRoomMapChanged(int roomId, const QSet<int>
|
||||
|
||||
if (!m_handlerInfrastructureData->isCameraAvailable(roomId))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "onParticipantsInRoomMapChanged() Non camera available in roomId: " << roomId << " No data will be send to AVS.";
|
||||
WARNING_LOG() << "onParticipantsInRoomMapChanged() Non camera available in roomId: " << roomId << " No data will be send to AVS.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -94,7 +93,7 @@ void HandlerOverlays::onParticipantsInRoomMapChanged(int roomId, const QSet<int>
|
||||
|
||||
if (streamName.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "onParticipantsInRoomMapChanged() No streamName found for roomId: " << roomId << " No data will be send to AVS.";
|
||||
ERROR_LOG() << "onParticipantsInRoomMapChanged() No streamName found for roomId: " << roomId << " No data will be send to AVS.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -117,7 +116,7 @@ void HandlerOverlays::onParticipantsInRoomMapChanged(int roomId, const QSet<int>
|
||||
QByteArray qba = cmd.toLatin1();
|
||||
qba += "\r\n";
|
||||
|
||||
INFO_LOG(m_logger) << "onParticipantsInRoomMapChanged() sendCommand: " << qba ;
|
||||
INFO_LOG() << "onParticipantsInRoomMapChanged() sendCommand: " << qba ;
|
||||
m_avsIf->sendCommand(qba);
|
||||
|
||||
// room entry der keine participants enthaelt loeschen
|
||||
@@ -138,7 +137,7 @@ void HandlerOverlays::initParticipantsInRoomMap()
|
||||
|
||||
void HandlerOverlays::addPartIdToParticipantsInRoomMap(int roomId, int participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "addPartIdToParticipantsInRoomMap() "
|
||||
DEBUG_LOG() << "addPartIdToParticipantsInRoomMap() "
|
||||
<< " roomId: " << roomId
|
||||
<< " participantId: " << participantId
|
||||
;
|
||||
@@ -155,7 +154,7 @@ void HandlerOverlays::addPartIdToParticipantsInRoomMap(int roomId, int participa
|
||||
m_participantsInRoomMap.insert(roomId, participants);
|
||||
|
||||
///
|
||||
DEBUG_LOG(m_logger) << "emit participantsInRoomMapChanged()"
|
||||
DEBUG_LOG() << "emit participantsInRoomMapChanged()"
|
||||
<< " roomId: " << roomId
|
||||
<< " partId: " << getAllEquipmentNumbers(participants, false)
|
||||
<< " eqNo: " << getAllEquipmentNumbers(participants, true)
|
||||
@@ -168,7 +167,7 @@ void HandlerOverlays::addPartIdToParticipantsInRoomMap(int roomId, int participa
|
||||
|
||||
void HandlerOverlays::removePartIdFromParticipantsInRoomMap(int roomId, int participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "removePartIdFromParticipantsInRoomMap() "
|
||||
DEBUG_LOG() << "removePartIdFromParticipantsInRoomMap() "
|
||||
<< " roomId: " << roomId
|
||||
<< " participantId: " << participantId
|
||||
;
|
||||
@@ -182,7 +181,7 @@ void HandlerOverlays::removePartIdFromParticipantsInRoomMap(int roomId, int part
|
||||
participants.remove(participantId);
|
||||
m_participantsInRoomMap.insert(roomId, participants);
|
||||
|
||||
DEBUG_LOG(m_logger) << "emit participantsInRoomMapChanged()"
|
||||
DEBUG_LOG() << "emit participantsInRoomMapChanged()"
|
||||
<< " roomId: " << roomId
|
||||
<< " partId: " << getAllEquipmentNumbers(participants, false)
|
||||
<< " eqNo: " << getAllEquipmentNumbers(participants, true)
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ private: // attributes
|
||||
std::shared_ptr<HandlerParticipantData> m_handlerParticipantData; ///< Pointer to participant data handler
|
||||
std::shared_ptr<HandlerInfrastructureData> m_handlerInfrastructureData; ///< Pointer to infrastructure data handler
|
||||
int m_exerciseId; ///< Exercise id
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
QMap<int, QSet<int>> m_participantsInRoomMap; ///< Includes all participants (player) in one room (roomId, Set<participantId>)
|
||||
};
|
||||
|
||||
+6
-7
@@ -16,7 +16,6 @@ using namespace VideoOverlayManagement;
|
||||
HandlerParticipantData::HandlerParticipantData(const std::shared_ptr<DdsHandler> &ddsHandler, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_logger(getLogger("HandlerParticipantData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -32,14 +31,14 @@ bool HandlerParticipantData::init()
|
||||
m_dtc = ParticipantManagement::Interface::Dtc::create(m_ddsHandler->dds());
|
||||
if (m_dtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create DTC ParticipantManagement";
|
||||
ERROR_LOG() << "Could not create DTC ParticipantManagement";
|
||||
return false;
|
||||
}
|
||||
|
||||
// only subscribe to the topics we're interested in
|
||||
if (!m_dtc->enableParticipant() || !m_dtc->enableParticipantPosition())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "init() DTC ParticipantManagement failed";
|
||||
ERROR_LOG() << "init() DTC ParticipantManagement failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,7 +60,7 @@ bool HandlerParticipantData::init()
|
||||
};
|
||||
m_dtc->participantPositions(cbParticipantPos);
|
||||
|
||||
INFO_LOG(m_logger) << "HandlerParticipantData::init() finished. "
|
||||
INFO_LOG() << "HandlerParticipantData::init() finished. "
|
||||
<< " m_partId2EquipNoMap.size(): " << m_partId2EquipNoMap.size()
|
||||
<< " m_participantsPositionMap.size(): " << m_participantsPositionMap.size();
|
||||
return true;
|
||||
@@ -88,7 +87,7 @@ QMap<int, int> HandlerParticipantData::getAllAssignedParticipants() const
|
||||
|
||||
void HandlerParticipantData::onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onParticipantChanged() participantId:" << data.id();
|
||||
INFO_LOG() << "onParticipantChanged() participantId:" << data.id();
|
||||
|
||||
if (modType != DataModification::eRemoved && data.equipmentNumber().is_set())
|
||||
m_partId2EquipNoMap.insert(data.id(), data.equipmentNumber().get());
|
||||
@@ -98,7 +97,7 @@ void HandlerParticipantData::onParticipantChanged(const ParticipantManagement::P
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
for (auto i = m_partId2EquipNoMap.begin(); i != m_partId2EquipNoMap.end(); ++i)
|
||||
DEBUG_LOG(m_logger) << " partId2EquipNoMap.size(): " << m_partId2EquipNoMap.size()
|
||||
DEBUG_LOG() << " partId2EquipNoMap.size(): " << m_partId2EquipNoMap.size()
|
||||
<< " partId: " << i.key()
|
||||
<< " eqNo: " << i.value();
|
||||
}
|
||||
@@ -117,7 +116,7 @@ void HandlerParticipantData::onParticipantPositionChanged(const ParticipantManag
|
||||
if (newRoomId != oldRoomId)
|
||||
emit participantPositionChanged(oldRoomId, newRoomId, data.participantId());
|
||||
|
||||
INFO_LOG(m_logger) << "onParticipantPositionChanged()"
|
||||
INFO_LOG() << "onParticipantPositionChanged()"
|
||||
<< " oldRoomId: " << oldRoomId
|
||||
<< " newRoomId: " << newRoomId
|
||||
<< " participantId: " << data.participantId();
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ private: // attributes
|
||||
QMap<int, int> m_partId2EquipNoMap; ///< Reference map participant (player) to equipment number (participantId, equipmentNo)
|
||||
QMap<int, int> m_participantsPositionMap; ///< Reference map participant (player) to room id (participantId, roomId)
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace VideoOverlayManagement
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "vom_export.h"
|
||||
|
||||
namespace VideoOverlayManagement
|
||||
{
|
||||
|
||||
+17
-18
@@ -27,7 +27,6 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_checkConnectTimer(new QTimer(this))
|
||||
, m_keepAliveTriggerTimer(new QTimer(this))
|
||||
, m_bAvsSocketWarnedOnce(false)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -40,14 +39,14 @@ MainHandler::~MainHandler()
|
||||
|
||||
bool MainHandler::init(int domainId, int exerciseId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Start VideoOverlayManagement MainHandler.";
|
||||
INFO_LOG() << "Start VideoOverlayManagement MainHandler.";
|
||||
|
||||
m_exerciseId = exerciseId;
|
||||
|
||||
// init AVS-Interface
|
||||
QString hostName = Settings::getAvsHostname();
|
||||
quint16 port = Settings::getAvsAvaPort();
|
||||
INFO_LOG(m_logger) << "Init AVS-Interface Hostname/Ip:" << hostName
|
||||
INFO_LOG() << "Init AVS-Interface Hostname/Ip:" << hostName
|
||||
<< " Port: " << port;
|
||||
|
||||
m_avsIf->start(hostName, port);
|
||||
@@ -69,7 +68,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
m_ddsHandler.reset(new DdsHandler(domainId, exerciseId));
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
|
||||
ERROR_LOG() << "Initialisation DdsHandler failed.";
|
||||
if (m_ddsHandler->pacemaker())
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
@@ -80,7 +79,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerParticipantData->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerPlayerData failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerPlayerData failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -90,7 +89,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerInfrastructureData->init(m_exerciseId))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerInfrastructreData failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerInfrastructreData failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -100,7 +99,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
this, &MainHandler::onTryToInitOverlayHandler);
|
||||
m_checkConnectTimer->start(1000);
|
||||
|
||||
INFO_LOG(m_logger) << "VOM Handler initialized. (Connection to AVS may be still pending) ";
|
||||
INFO_LOG() << "VOM Handler initialized. (Connection to AVS may be still pending) ";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Starting);
|
||||
|
||||
return true;
|
||||
@@ -115,7 +114,7 @@ bool MainHandler::onTryToInitOverlayHandler()
|
||||
if (!m_bAvsSocketWarnedOnce)
|
||||
{
|
||||
m_bAvsSocketWarnedOnce = true;
|
||||
WARNING_LOG(m_logger) << "MainHandler::onTryToInitOverlayHandler()"
|
||||
WARNING_LOG() << "MainHandler::onTryToInitOverlayHandler()"
|
||||
<< " Wait for AvsIfConnectionState::Connected... ";
|
||||
}
|
||||
return false;
|
||||
@@ -129,12 +128,12 @@ bool MainHandler::onTryToInitOverlayHandler()
|
||||
|
||||
if (!m_handlerOverlays->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerOverlays failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerOverlays failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StoppedError);
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "VOM Handler initialized. (Connection to AVS established) ";
|
||||
INFO_LOG() << "VOM Handler initialized. (Connection to AVS established) ";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running);
|
||||
|
||||
return true;
|
||||
@@ -146,7 +145,7 @@ void MainHandler::onAvsIfConnectionState(AvsIfConnectionState state)
|
||||
switch (state)
|
||||
{
|
||||
case AvsIfConnectionState::Connected:
|
||||
INFO_LOG(m_logger) << "AvsIfConnectionState::Connected ... start keepAliveTriggerTimer";
|
||||
INFO_LOG() << "AvsIfConnectionState::Connected ... start keepAliveTriggerTimer";
|
||||
m_keepAliveTriggerTimer->start(Settings::getAvsKeepAliveTriggerRequestTime());
|
||||
break;
|
||||
case AvsIfConnectionState::Disconnected:
|
||||
@@ -156,13 +155,13 @@ void MainHandler::onAvsIfConnectionState(AvsIfConnectionState state)
|
||||
m_keepAliveTriggerTimer->stop();
|
||||
break;
|
||||
case AvsIfConnectionState::ConnectionError:
|
||||
ERROR_LOG(m_logger) << "AvsIfConnectionState::ConnectionError !";
|
||||
ERROR_LOG() << "AvsIfConnectionState::ConnectionError !";
|
||||
m_keepAliveTriggerTimer->stop();
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StoppedError);
|
||||
break;
|
||||
case AvsIfConnectionState::Undefined:
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "Undefined AvsIfConnectionState !";
|
||||
WARNING_LOG() << "Undefined AvsIfConnectionState !";
|
||||
break;
|
||||
}
|
||||
} // end of onAvsIfConnectionState()
|
||||
@@ -174,17 +173,17 @@ void MainHandler::onAvsCmdState(AvsCmdState state)
|
||||
switch (state)
|
||||
{
|
||||
case AvsCmdState::Ok:
|
||||
INFO_LOG(m_logger) << "AvsCmdState::Ok";
|
||||
INFO_LOG() << "AvsCmdState::Ok";
|
||||
bOk = true;
|
||||
break;
|
||||
case AvsCmdState::BadArguments:
|
||||
WARNING_LOG(m_logger) << "AvsCmdState::BadArguments";
|
||||
WARNING_LOG() << "AvsCmdState::BadArguments";
|
||||
break;
|
||||
case AvsCmdState::CommandNotStateValid:
|
||||
WARNING_LOG(m_logger) << "AvsCmdState::CommandNotStateValid";
|
||||
WARNING_LOG() << "AvsCmdState::CommandNotStateValid";
|
||||
break;
|
||||
case AvsCmdState::KeepAlive:
|
||||
DEBUG_LOG(m_logger) << "AvsCmdState::KeepAlive";
|
||||
DEBUG_LOG() << "AvsCmdState::KeepAlive";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -200,7 +199,7 @@ void MainHandler::onAvsCmdState(AvsCmdState state)
|
||||
void MainHandler::onAvsKeepAliveTimeout()
|
||||
{
|
||||
// ToDo: Fehlermeldung an ServiceManagement senden
|
||||
WARNING_LOG(m_logger) << "AVS KeepAlive timeout !";
|
||||
WARNING_LOG() << "AVS KeepAlive timeout !";
|
||||
} // end of onAvsKeepAliveTimeout()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ private: // attributes
|
||||
QTimer *m_keepAliveTriggerTimer; ///< Timer for triggering the keep alive request
|
||||
bool m_bAvsSocketWarnedOnce;
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace VideoOverlayManagement
|
||||
Reference in new issue
Block a user