Removed obsolete sendCmdSendVersionToIsmas().

This commit is contained in:
Gerhard Hoffmann 2023-08-16 10:37:59 +02:00
parent f20be9ddcf
commit 1eba5338e4

View File

@ -1179,84 +1179,6 @@ PSAInstalled Worker::getPSAInstalled() {
return psaInstalled;
}
QString Worker::sendCmdSendVersionToIsmas() {
QStringList const dcVersion = getDCVersion();
QString const deviceControllerVersionHW = dcVersion.first();
QString const deviceControllerVersionSW = dcVersion.last();
qInfo() << "CURRENT DC-HW-VERSION: " << deviceControllerVersionHW;
qInfo() << "CURRENT DC-SW-VERSION: " << deviceControllerVersionSW;
QString const deviceControllerGitBlob = "N/A";
QString const deviceControllerGitLastCommit = "N/A";
PSAInstalled psaInstalled;
QString printSysDir("/etc/psa_config");
QString tariffSysDir("/etc/psa_tariff");
QString absPathName;
if (m_zoneNr != 0) {
QString const &n = QString("%1").arg(m_zoneNr).rightJustified(2, '0');
psaInstalled.tariff.name = QString("tariff%1.json").arg(n);
absPathName = QDir::cleanPath(tariffSysDir + QDir::separator() + psaInstalled.tariff.name);
psaInstalled.tariff.blob = m_gc.gitBlob(absPathName);
psaInstalled.tariff.size = getFileSize(absPathName);
psaInstalled.tariff.zone = m_zoneNr;
}
psaInstalled.tariff.project = "Szeged";
psaInstalled.tariff.info = "N/A";
psaInstalled.tariff.loadTime = "N/A"; // QDateTime::currentDateTime().toString(Qt::ISODateWithMs);
psaInstalled.tariff.version = "N/A";
psaInstalled.hw.linuxVersion = m_osVersion;
psaInstalled.hw.cpuSerial = m_cpuSerial;
psaInstalled.dc.versionHW = deviceControllerVersionHW;
psaInstalled.dc.versionSW = deviceControllerVersionSW;
psaInstalled.dc.gitBlob = "N/A";
psaInstalled.dc.gitLastCommit = "N/A";
psaInstalled.dc.size = -1;
psaInstalled.sw.raucVersion = m_raucVersion;
psaInstalled.sw.opkgVersion = m_opkgVersion;
psaInstalled.sw.atbQTVersion = m_atbqtVersion;
psaInstalled.pluginVersion.deviceController = m_pluginVersionATBDeciceController;
psaInstalled.pluginVersion.ingenicoISelfCC = m_pluginVersionIngenicoISelf;
psaInstalled.pluginVersion.mobilisisCalculatePrice = m_pluginVersionMobilisisCalc;
psaInstalled.pluginVersion.mobilisisCalculatePriceConfigUi = m_pluginVersionMobilisisCalcConfig;
psaInstalled.pluginVersion.prmCalculatePrice = m_pluginVersionPrmCalc;
psaInstalled.pluginVersion.prmCalculatePriceConfigUi = m_pluginVersionPrmCalcConfig;
psaInstalled.pluginVersion.tcpZVT = m_pluginVersionTcpZvt;
psaInstalled.cash.name = "DC2C_cash.json";
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.cash.name);
psaInstalled.cash.blob = m_gc.gitBlob(absPathName);
psaInstalled.cash.size = getFileSize(absPathName);
psaInstalled.conf.name = "DC2C_conf.json";
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.conf.name);
psaInstalled.conf.blob = m_gc.gitBlob(absPathName);
psaInstalled.conf.size = getFileSize(absPathName);
psaInstalled.device.name = "DC2C_device.json";
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.device.name);
psaInstalled.device.blob = m_gc.gitBlob(absPathName);
psaInstalled.device.size = getFileSize(absPathName);
for (int i=0; i < 32; ++i) {
QString const &n = QString("%1").arg(i+1).rightJustified(2, '0');
psaInstalled.print[i].name = QString("DC2C_print%1.json").arg(n);
absPathName = QDir::cleanPath(printSysDir + QDir::separator() + psaInstalled.print[i].name);
psaInstalled.print[i].blob = m_gc.gitBlob(absPathName);
psaInstalled.print[i].size = getFileSize(absPathName);
}
// QByteArray data = "#M=APISM#C=CMD_SENDVERSION#J=";
return m_ismasClient.updateOfPSASendVersion(psaInstalled);
}
/************************************************************************************************
* operators
*/