Adds initial intermediate qt6 porting state
This commit is contained in:
11247 files changed
+1891537
No files matched your search
+66
@@ -0,0 +1,66 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "logger.h"
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
#include <ComponentMonitor/cmo.hpp>
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
|
||||
namespace DDSConnector
|
||||
{
|
||||
class DdsConnector;
|
||||
}
|
||||
|
||||
namespace ComponentMonitor
|
||||
{
|
||||
class DdsHandler;
|
||||
|
||||
|
||||
|
||||
class ComponentStatusHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
using CONT_T = QMap<int, ComponentStatus>;
|
||||
using ITERATOR_T = QMap<int, ComponentStatus>::iterator;
|
||||
using CONST_ITERATOR_T = QMap<int, ComponentStatus>::ConstIterator;
|
||||
|
||||
public:
|
||||
ComponentStatusHandler();
|
||||
~ComponentStatusHandler();
|
||||
|
||||
bool initialize(const std::shared_ptr<DdsHandler> &ddsHandler);
|
||||
|
||||
long statusMapSize() const { return m_statusMap.size(); }
|
||||
std::vector<std::string> getHostnames() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void onNewState(const QString &hostname, bool reachable, long long lastCheckSec);
|
||||
|
||||
|
||||
void onUpdateLastCheckTimeDirect(const QStringList &hostnamesForUpdateLastCheckTime, qint64 lastCheckSec);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onInstrumentationAssetChanged(const InfrastructureManagement::InstrumentationAsset &iAsset, DataModification dataMod);
|
||||
|
||||
void dump();
|
||||
|
||||
protected:
|
||||
bool addUpdateInstrumentationAsset(ITERATOR_T it, const ComponentStatus &cs);
|
||||
bool removeInstrumentationAsset(ITERATOR_T it);
|
||||
|
||||
private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
||||
|
||||
CONT_T m_statusMap;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user