TetraIF migration and Unittest Implementation for it
Entire-Checkpoint: 14d1fef0cf36
This commit is contained in:
1 parent
a86f9b5bac
commit
ba212f9dce
78 files changed
+1611
-640
No files matched your search
@@ -19,7 +19,9 @@
|
||||
#include <PrtCnv/PrtCnvRadioThread.hpp>
|
||||
#include <PrtCnv/PrtCnvThreadStarter.hpp>
|
||||
|
||||
TetraIF::TetraIF(const QHostAddress &addr, unsigned short port, unsigned short issi) : QObject()
|
||||
TetraIF::TetraIF(const QHostAddress &addr, unsigned short port, unsigned short issi)
|
||||
: QObject()
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_addr(addr)
|
||||
, m_port(port)
|
||||
, m_issi(issi)
|
||||
@@ -30,12 +32,11 @@ TetraIF::TetraIF(const QHostAddress &addr, unsigned short port, unsigned short i
|
||||
, m_secondFragment(0)
|
||||
, m_timer(nullptr)
|
||||
, m_SendCounter(0)
|
||||
),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
{
|
||||
connect(m_socket, &QTcpSocket::connected, this, &TetraIF::onConnected);
|
||||
connect(m_socket, &QTcpSocket::disconnected, this, &TetraIF::onDisconnected);
|
||||
connect(m_socket, &QTcpSocket::readyRead, this, &TetraIF::onReadyRead);
|
||||
connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &TetraIF::onError);
|
||||
connect(m_socket, &QTcpSocket::errorOccurred, this, &TetraIF::onError);
|
||||
|
||||
m_outputDir = QCoreApplication::applicationDirPath();
|
||||
m_outputDir += QLatin1Char('/') + QString::number(m_issi) + QLatin1Char('-');
|
||||
@@ -303,7 +304,7 @@ void TetraIF::dumpData(const QByteArray &data)
|
||||
const qint64 msecs = QDateTime::currentMSecsSinceEpoch();
|
||||
const QString timeStr = QStringLiteral("%1.%2").arg(msecs / 1000).arg(msecs % 1000);
|
||||
{
|
||||
QFile f(m_outputDir + timeStr + QLatin1String(".dat"));
|
||||
QFile f(m_outputDir + timeStr + QStringLiteral(".dat"));
|
||||
if (!f.open(QIODevice::WriteOnly))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error opening file "
|
||||
@@ -406,7 +407,7 @@ QString TetraIF::getIssisAsString() const
|
||||
{
|
||||
QString ret;
|
||||
for (unsigned short issi : std::as_const(m_issiList))
|
||||
ret += QString::number(issi) + QLatin1String(", ");
|
||||
ret += QString::number(issi) + QStringLiteral(", ");
|
||||
return ret.left(ret.size() - 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user