- 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>
74 lines
1.8 KiB
C++
Executable File
74 lines
1.8 KiB
C++
Executable File
/**
|
|
* DdsHandler for DDS
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLSE, 2015-09-02
|
|
*/
|
|
|
|
#include "dds_handler.h"
|
|
|
|
#include <QtCore/QTimer>
|
|
|
|
namespace ExerciseEventManagement
|
|
{
|
|
|
|
DdsHandler::DdsHandler(int domainId, int partitionId, IDL::PartitionType partitionType)
|
|
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, partitionType, partitionId))
|
|
{
|
|
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
|
}
|
|
|
|
DdsHandler::~DdsHandler()
|
|
{
|
|
}
|
|
|
|
bool DdsHandler::init(const QStringList &qosFileList)
|
|
{
|
|
TRACE_LOG(m_logger) << " START, this=" << this;
|
|
|
|
if (!m_ddsConnector->init(qosFileList))
|
|
{
|
|
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
|
return false;
|
|
}
|
|
|
|
// default initialize Publisher and Subscriber
|
|
m_ddsConnector->initPublisherSubscriber();
|
|
|
|
// has to be false, because Snapshot Data Topics can be very large and fragmentation is not supported for batched writers!
|
|
m_ddsConnector->enableBatchedWriter(false);
|
|
|
|
// Pacemaker
|
|
m_pacemaker = new Core::Pacemaker(m_ddsConnector);
|
|
|
|
m_ddsDts = ExerciseEventManagement::Interface::Dts::create(m_ddsConnector);
|
|
|
|
bool bRet = m_ddsDts->enableAll();
|
|
INFO_LOG(m_logger) << "Dts initialised";
|
|
|
|
// Subsribe for InfrastructureManagement::MainStructureElement
|
|
m_dtcIsm = InfrastructureManagement::Interface::Dtc::create(m_ddsConnector);
|
|
|
|
TRACE_LOG(m_logger) << " END, this=" << this;
|
|
return bRet;
|
|
}
|
|
|
|
void DdsHandler::setRunningState(Core::RunningState rs)
|
|
{
|
|
if (!m_pacemaker)
|
|
return;
|
|
m_pacemaker->setNewState(rs);
|
|
}
|
|
|
|
void DdsHandler::addPortToPacemaker(quint16 port, Core::PortType type)
|
|
{
|
|
if (!m_pacemaker)
|
|
return;
|
|
m_pacemaker->addPort(port, type);
|
|
}
|
|
|
|
|
|
|
|
} // Namespace ExerciseEventManagement
|