- training_area_telegrams.cpp: Fixed QJsonObject initializer syntax (Qt6 requires {{}} not ({}))
- training_area_telegrams.cpp: Fixed fromJson() methods to access m_* members directly
- training_area_telegrams.cpp: Fixed brace mismatches in multiple toJson() methods
- training_area_telegrams.h: Changed Header struct to public members for consistency
- tx_mixin.cpp: Fixed getEquipmentNumber() template for direct member access
- lts_coordinate.cpp: Added missing #include <iomanip>
- MIGRATION_STATUS.md: Added migration progress tracking document
C++17 constraint enforced due to RTI Connext DDS 7.7.0 incompatibility with C++20+
Build status: BUILD_RTI=OFF successful (0 errors, warnings only)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
77 lines
2.0 KiB
C++
Executable File
77 lines
2.0 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ImportHandler
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Astrid Müller, Christian Fröbel, SLSE, 2017-12-12
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AudioVideoManagement/exercise_context.h>
|
|
#include <AudioVideoManagement/avm_db.h>
|
|
#include <QtCore/QObject>
|
|
#include <map>
|
|
#include <cstdint>
|
|
|
|
enum class DataModification;
|
|
|
|
namespace AssetManagement
|
|
{
|
|
class Asset;
|
|
|
|
namespace Interface
|
|
{
|
|
class Dtc;
|
|
} // namespace Interface
|
|
} // namespace AssetManagement
|
|
|
|
namespace AudioVideoManagement
|
|
{
|
|
|
|
class ExerciseHandler;
|
|
|
|
/**
|
|
* The ImportHandler is responsible for the creation of the IMPORT_VIDEO_CHANNEL entries
|
|
* in avm.device_config for each Workstation for the given Exercise.
|
|
*
|
|
* @author Astrid Müller, Christian Fröbel
|
|
*/
|
|
class ImportHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/** Creates the instance *and* connects the relevant signals. */
|
|
static ImportHandler *create(ExerciseHandler *exerciseHandler, DatabaseInterface *db, AssetManagement::Interface::Dtc *asmDtc);
|
|
|
|
/** Don't use, use create() instead. Only provided for UnitTests. */
|
|
ImportHandler(const ExerciseContext &context, DatabaseInterface *db, AssetManagement::Interface::Dtc *asmDtc);
|
|
virtual ~ImportHandler() = default;
|
|
|
|
signals:
|
|
/** Signalled after device_config modifications. */
|
|
void avDbReloadNeeded();
|
|
|
|
private slots:
|
|
void onContextActivated();
|
|
void onContextDeactivated();
|
|
|
|
void onAssetChanged(const AssetManagement::Asset &asset, DataModification modType);
|
|
|
|
private:
|
|
void addToDb(const AssetManagement::Asset &asset);
|
|
void removeFromDb(const AssetManagement::Asset &asset);
|
|
|
|
ExerciseContext m_context;
|
|
bool m_isActive{false};
|
|
DatabaseInterface *m_db;
|
|
AssetManagement::Interface::Dtc *m_asmDtc;
|
|
using AssetId = int32_t;
|
|
std::map<AssetId, Database::AvmDeviceConfig> m_deviceConfigs;
|
|
};
|
|
|
|
} // namespace AudioVideoManagement
|
|
|