- 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>
63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
|
|
|
|
#include <QtCore/QCoreApplication>
|
|
#include <QtCore/QStringList>
|
|
#include <QtNetwork/QHostAddress>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "tetra_if.h"
|
|
|
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
QCoreApplication app(argc, argv);
|
|
|
|
|
|
NGL::NGLLoggerBootstrap::createNGLRootLogger("log4cxx_tetra.props", false);
|
|
|
|
NGL::INGLLogger &logger(NGL::NGLLoggerBootstrap::getNGLRootLogger());
|
|
|
|
const QStringList args = app.arguments().mid(1);
|
|
if (args.count() < 4)
|
|
TetraIF::usage();
|
|
QHostAddress tetra(args[0]);
|
|
if (tetra.isNull())
|
|
{
|
|
ERROR_LOG(logger) << "Invalid IP address " << args[0];
|
|
TetraIF::usage();
|
|
}
|
|
bool bOk;
|
|
unsigned short port = args[1].toUShort(&bOk);
|
|
if (!bOk)
|
|
{
|
|
ERROR_LOG(logger) << "Invalid IP port " << args[1];
|
|
TetraIF::usage();
|
|
}
|
|
unsigned short issi = args[2].toUShort(&bOk);
|
|
if (!bOk)
|
|
{
|
|
ERROR_LOG(logger) << "Invalid ISSI id " << args[2];
|
|
TetraIF::usage();
|
|
}
|
|
const QString mode = args[3].toLower();
|
|
if (mode != QLatin1String("listen") &&
|
|
mode != QLatin1String("send_random") &&
|
|
mode != QLatin1String("send_file"))
|
|
{
|
|
ERROR_LOG(logger) << "Invalid mode " << args[3];
|
|
TetraIF::usage();
|
|
}
|
|
TetraIF t(tetra, port, issi);
|
|
if (mode == QLatin1String("listen"))
|
|
t.listenMode(args.mid(4));
|
|
else if (mode == QLatin1String("send_random"))
|
|
t.randomMode(args.mid(4));
|
|
else if (mode == QLatin1String("send_file"))
|
|
t.fileMode(args.mid(4));
|
|
|
|
t.start();
|
|
|
|
return app.exec();
|
|
}
|