Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+43
-43
@@ -575,9 +575,9 @@ void HandlerBaseDownload::receiveFlmData()
|
||||
data.name = query->value(i++).toString();
|
||||
data.isTemplate = query->value(i++).toBool();
|
||||
data.folderId = query->value(i++).toLongLong();
|
||||
data.fileCategoryId = static_cast<FileManagement::FileCategory_def::type>(query->value(i++).toInt());
|
||||
data.fileTypeId = static_cast<FileManagement::FileType_def::type>(query->value(i++).toInt());
|
||||
data.fileStatusId = static_cast<FileManagement::FileStatus_def::type>(query->value(i++).toInt());
|
||||
data.fileCategoryId = static_cast<FileManagement::FileCategory>(query->value(i++).toInt());
|
||||
data.fileTypeId = static_cast<FileManagement::FileType>(query->value(i++).toInt());
|
||||
data.fileStatusId = static_cast<FileManagement::FileStatus>(query->value(i++).toInt());
|
||||
data.exerciseId = query->value(i++);
|
||||
data.phaseId = query->value(i++);
|
||||
data.operatorId = query->value(i++).toInt();
|
||||
@@ -725,15 +725,15 @@ void HandlerBaseDownload::updateBaseDownloadReply()
|
||||
|
||||
void HandlerBaseDownload::onStartBaseDownloadRequest(const rti::core::SampleIdentity &cookie, const StartBaseDownloadRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Got Request, check for old one : " << request.hostname();
|
||||
DEBUG_LOG(m_logger) << "Got Request, check for old one : " << request.hostname;
|
||||
|
||||
if (request.timeStamp() < (QDateTime::currentMSecsSinceEpoch() - 10 * 1000)) //(5Sekunden)
|
||||
if (request.timeStamp < (QDateTime::currentMSecsSinceEpoch() - 10 * 1000)) //(5Sekunden)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "old call? ignore! ";
|
||||
m_reply.progress(0);
|
||||
m_reply.errorString(std::string());
|
||||
m_reply.currentStep(std::string());
|
||||
m_reply.replyState(Core::FtReplyState::Error);
|
||||
m_reply.progress = 0;
|
||||
m_reply.errorString = std::string();
|
||||
m_reply.currentStep = std::string();
|
||||
m_reply.replyState = Core::FtReplyState::Error;
|
||||
|
||||
m_fts->startBaseDownloadReply(m_baseDownloadCookie, m_reply);
|
||||
|
||||
@@ -742,13 +742,13 @@ void HandlerBaseDownload::onStartBaseDownloadRequest(const rti::core::SampleIden
|
||||
// m_webSocket->setCurrentDownload(WebSocketInterface::CurrentDownload::BASE);
|
||||
|
||||
m_baseDownloadCookie = cookie;
|
||||
m_exerciseId = request.exerciseId();
|
||||
m_operatorId = request.loggedInOperatorId();
|
||||
m_exerciseId = request.exerciseId;
|
||||
m_operatorId = request.loggedInOperatorId;
|
||||
m_hostname = Settings::remoteDbHostName();
|
||||
m_reply.progress(0);
|
||||
m_reply.errorString(std::string());
|
||||
m_reply.currentStep(std::string());
|
||||
m_reply.replyState(Core::FtReplyState::InProgress);
|
||||
m_reply.progress = 0;
|
||||
m_reply.errorString = std::string();
|
||||
m_reply.currentStep = std::string();
|
||||
m_reply.replyState = Core::FtReplyState::InProgress;
|
||||
|
||||
m_fts->startBaseDownloadReply(m_baseDownloadCookie, m_reply);
|
||||
|
||||
@@ -763,7 +763,7 @@ void HandlerBaseDownload::onLifeUpdateRequest(const rti::core::SampleIdentity &c
|
||||
|
||||
// handling PPM ExN data
|
||||
using namespace ParticipantManagement;
|
||||
m_exerciseId = request.timeStamp();
|
||||
m_exerciseId = request.timeStamp;
|
||||
//m_hostname = QStringLiteral("EXCDBS01");
|
||||
openRemoteDbConnection(QStringLiteral("lts_ets_pro"));
|
||||
openDbConnection(currentDatabaseName());
|
||||
@@ -786,15 +786,15 @@ void HandlerBaseDownload::switchLog(HandlerBaseDownload::State state, const std:
|
||||
{
|
||||
NOTICE_LOG(m_logger) << "Switching state from " << m_currentState << " to " << state << " - " << currentStep;
|
||||
m_currentState = state;
|
||||
m_reply.currentStep(currentStep);
|
||||
m_reply.currentStep = currentStep;
|
||||
|
||||
if (state != Finished)
|
||||
{
|
||||
m_reply.progress(m_reply.progress() + SingleStepSize);
|
||||
m_reply.progress = m_reply.progress + SingleStepSize;
|
||||
updateBaseDownloadReply();
|
||||
}
|
||||
else
|
||||
m_reply.progress(100); // updateBaseDownloadReply is called in cleanup which is executed next
|
||||
m_reply.progress = 100; // updateBaseDownloadReply is called in cleanup which is executed next
|
||||
|
||||
m_baseDownloadReplyUpdateTimer->start();
|
||||
}
|
||||
@@ -949,7 +949,7 @@ void HandlerBaseDownload::dropOldDatabase()
|
||||
const int idx = dbNameTmpl.lastIndexOf(QLatin1Char('_'));
|
||||
Q_ASSERT(idx > 0);
|
||||
bool bOk;
|
||||
const int curId = dbNameTmpl.midRef(idx + 1).toInt(&bOk);
|
||||
const int curId = dbNameTmpl.mid(idx + 1).toInt(&bOk);
|
||||
|
||||
if (!openDbConnection(currentDatabaseName()))
|
||||
{
|
||||
@@ -967,7 +967,7 @@ void HandlerBaseDownload::dropOldDatabase()
|
||||
while (q.next())
|
||||
{
|
||||
const QString val = q.value(0).toString();
|
||||
const int revId = val.midRef(idx + 1).toInt(&bOk);
|
||||
const int revId = val.mid(idx + 1).toInt(&bOk);
|
||||
if (!bOk)
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << val << ", " << revId << ", " << curId;
|
||||
@@ -1599,8 +1599,8 @@ void HandlerBaseDownload::cleanup(const Core::FtReplyState &replyState, const st
|
||||
closeDb(m_remoteDbConnection);
|
||||
|
||||
// prepare reply
|
||||
m_reply.errorString(errStr);
|
||||
m_reply.replyState(replyState);
|
||||
m_reply.errorString = errStr;
|
||||
m_reply.replyState = replyState;
|
||||
|
||||
m_baseDownloadReplyUpdateTimer->stop();
|
||||
|
||||
@@ -1608,9 +1608,9 @@ void HandlerBaseDownload::cleanup(const Core::FtReplyState &replyState, const st
|
||||
|
||||
m_currentState = NotStarted;
|
||||
m_exerciseId = 0;
|
||||
m_reply.progress(0);
|
||||
m_reply.errorString(std::string());
|
||||
m_reply.currentStep(std::string());
|
||||
m_reply.progress = 0;
|
||||
m_reply.errorString = std::string();
|
||||
m_reply.currentStep = std::string();
|
||||
m_hostname = NGL::Connections::hostName(NGL::Connections::eConnection::SCM_WEBSOCKET);
|
||||
}
|
||||
|
||||
@@ -1871,7 +1871,7 @@ void HandlerBaseDownload::copyOldFlmData(const QSqlDatabase &dbIn, const QSqlDat
|
||||
for (auto data : qAsConst(flmData))
|
||||
{
|
||||
if (data.folderId == folderId || //snapshots
|
||||
(data.fileTypeId.underlying() == FileManagement::FileType::Pdf)) //old PDF
|
||||
(data.fileTypeId == FileManagement::FileType::Pdf)) //old PDF
|
||||
{
|
||||
data.id = 0;
|
||||
flmDataToCopy.push_back(data);
|
||||
@@ -2161,15 +2161,15 @@ void HandlerBaseDownload::updateLtsConfig()
|
||||
const QMap<int32_t, ServiceManagement::GroupInformation> groups = m_scmDtc->groupInformations();
|
||||
for (const auto &group : groups)
|
||||
{
|
||||
if (group.type() == Core::ServiceGroupType::Master ||
|
||||
group.type() == Core::ServiceGroupType::Core)
|
||||
if (group.type == Core::ServiceGroupType::Master ||
|
||||
group.type == Core::ServiceGroupType::Core)
|
||||
continue;
|
||||
request.type(group.type());
|
||||
request.domainId(group.domainId());
|
||||
request.exercisePartitionId(group.exercisePartitionId());
|
||||
request.replayPartitionId(group.replayPartitionId());
|
||||
request.requestId(group.id());
|
||||
m_stopGroupIds += group.id();
|
||||
request.type = group.type;
|
||||
request.domainId = group.domainId;
|
||||
request.exercisePartitionId = group.exercisePartitionId;
|
||||
request.replayPartitionId = group.replayPartitionId;
|
||||
request.requestId = group.id;
|
||||
m_stopGroupIds += group.id;
|
||||
m_scmFtc->stopGroupRequest(request, this);
|
||||
}
|
||||
|
||||
@@ -2201,19 +2201,19 @@ void HandlerBaseDownload::restartCoreGroup()
|
||||
const QMap<int32_t, ServiceManagement::GroupInformation> groups = m_scmDtc->groupInformations();
|
||||
for (const auto &group : groups)
|
||||
{
|
||||
if (group.type() != Core::ServiceGroupType::Core)
|
||||
if (group.type != Core::ServiceGroupType::Core)
|
||||
continue;
|
||||
request.type(group.type());
|
||||
request.domainId(group.domainId());
|
||||
request.exercisePartitionId(group.exercisePartitionId());
|
||||
request.replayPartitionId(group.replayPartitionId());
|
||||
request.requestId(group.id());
|
||||
request.type = group.type;
|
||||
request.domainId = group.domainId;
|
||||
request.exercisePartitionId = group.exercisePartitionId;
|
||||
request.replayPartitionId = group.replayPartitionId;
|
||||
request.requestId = group.id;
|
||||
break; // only one core
|
||||
}
|
||||
|
||||
// we are also restarted... so answer here directly with 'finished'
|
||||
stateFinished();
|
||||
if (request.type() != Core::ServiceGroupType::Core)
|
||||
if (request.type != Core::ServiceGroupType::Core)
|
||||
WARNING_LOG(m_logger) << "Could not find core group to restart...";
|
||||
|
||||
const auto restartCb = [this, request]()
|
||||
@@ -2246,7 +2246,7 @@ QString HandlerBaseDownload::nextDatabaseName() const
|
||||
const QString dbName = currentDatabaseName();
|
||||
int idx = dbName.lastIndexOf(QLatin1Char('_'));
|
||||
bool bOk;
|
||||
int id = dbName.midRef(idx + 1).toInt(&bOk) + 1;
|
||||
int id = dbName.mid(idx + 1).toInt(&bOk) + 1;
|
||||
return bOk ? QString(dbName.left(idx + 1) + QString::number(id))
|
||||
: QString(dbName + QLatin1Char('_') + QString::number(id));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user