Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+55
View File
@@ -0,0 +1,55 @@
/**
* DbWriter for RecordingManagement
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QObject>
#include <QTimer>
#include <QVector>
#include <PluginInterfaces/record_replay_plugin.h>
#include <ngldb/nsqlquery.h>
#include "logger.h"
namespace LtsPluginManager
{
struct PluginInstance;
}
namespace RecordingManagement
{
class DatabaseInterface;
class DbWriterSnapshot;
class DbWriterSnapshotThread;
class DbWriter : public QObject
{
Q_OBJECT
public:
explicit DbWriter(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector);
~DbWriter();
bool init(const std::shared_ptr<DatabaseInterface> &db);
protected:
bool initSnapshot();
bool loadPlugin(const LtsPluginManager::PluginInstance &pi);
private Q_SLOTS:
void ddsTopicsToDatabase();
private:
NSqlQuery *m_query{nullptr};
QTimer *m_recordTimer{nullptr};
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
QVector<RecordReplay::RecordReplayPlugin *> m_plugins;
DbWriterSnapshot *m_dbWriterSnapshot{nullptr};
DbWriterSnapshotThread *m_dbWriterSnapshotThread{nullptr};
std::shared_ptr<DatabaseInterface> m_db;
LOGGER_T m_logger;
};
} // namespace RecordingManagement