Gestion des nouveaux fichiers avec info du Modbus

This commit is contained in:
JF
2018-02-07 11:46:14 -05:00
parent 15a3f9abaa
commit db917394e0
10 changed files with 713 additions and 456 deletions
+2
View File
@@ -731,6 +731,8 @@ int CDatabaseImporterThread::ArchiveDB()
}
delete m7zipProcess;
int IgnoredFiles = 0;
+51 -11
View File
@@ -514,12 +514,34 @@ void CLogsListPage::LogsTableCellClicked(int row, int column)
Problem = "NON";
}
MeanSpeed = ZT1LogElement->mMeanSpeed;
Summary.sprintf("Passage:\n\nDate: %s\nHeure: %s\nZone Test : ZT1\nTrain : %s\nNombre d'éléments: %d\nProblématique: %s\n\n\nDéclenchements: \n",
ZT1LogElement->mPassageDateTime.toString("yyyy/MM/dd").toAscii().data(),
ZT1LogElement->mPassageDateTime.toString("hh:mm:ss").toAscii().data(),
CZTData::GetTrainTypeString(ZT1LogElement->mTrainType),
ZT1LogElement->mNbElements,
Problem.toAscii().data());
QString TrainType = CZTData::GetModbusTrainTypeString(ZT1LogElement->mFlags.mModbusTrainType);
if(TrainType == "Inconnu")
{
TrainType = CZTData::GetTrainTypeString(ZT1LogElement->mTrainType);
}
QString TrainCompo = "Non Disponible";
if(ZT1LogElement->mFlags.mTrainCompo1 != 0)
{
TrainCompo = QString("%1-%2-%3").arg(ZT1LogElement->mFlags.mTrainCompo1)\
.arg(ZT1LogElement->mFlags.mTrainCompo2)
.arg(ZT1LogElement->mFlags.mTrainCompo3);
}
Summary = QString("Passage:\n\nDate: %1\nHeure: %2\nZone Test : ZT1\nTrain : %3\nCompo: %6\nNombre d'éléments: %4\nProblématique: %5\n\n\nDéclenchements: \n")\
.arg(ZT1LogElement->mPassageDateTime.toString("yyyy/MM/dd"))\
.arg(ZT1LogElement->mPassageDateTime.toString("hh:mm:ss"))\
.arg(TrainType)\
.arg(ZT1LogElement->mNbElements)\
.arg(Problem)
.arg(TrainCompo);
// Summary.sprintf("Passage:\n\nDate: %s\nHeure: %s\nZone Test : ZT1\nTrain : %s\nNombre d'éléments: %d\nProblématique: %s\n\n\nDéclenchements: \n",
// ZT1LogElement->mPassageDateTime.toString("yyyy/MM/dd").toAscii().data(),
// ZT1LogElement->mPassageDateTime.toString("hh:mm:ss").toAscii().data(),
// CZTData::GetTrainTypeString(ZT1LogElement->mTrainType),
// ZT1LogElement->mNbElements,
// Problem.toAscii().data());
if(ZT1LogElement->mZTDetections.size() > 0)
{
@@ -570,11 +592,29 @@ void CLogsListPage::LogsTableCellClicked(int row, int column)
{
Problem = "NON";
}
Summary.sprintf("Statistiques du passage:\n\nDate: %s\nHeure: %s\nZone Test: ZT2\nNombre d'éléments: %d\nProblématique: %s\n\n\n\nDéclenchements: \n",
ZT2LogElement->mPassageDateTime.toString("yyyy/MM/dd").toAscii().data(),
ZT2LogElement->mPassageDateTime.toString("hh:mm:ss").toAscii().data(),
ZT2LogElement->mNbElements,
Problem.toAscii().data());
// Summary.sprintf("Statistiques du passage:\n\nDate: %s\nHeure: %s\nZone Test: ZT2\nNombre d'éléments: %d\nProblématique: %s\n\n\n\nDéclenchements: \n",
// ZT2LogElement->mPassageDateTime.toString("yyyy/MM/dd").toAscii().data(),
// ZT2LogElement->mPassageDateTime.toString("hh:mm:ss").toAscii().data(),
// ZT2LogElement->mNbElements,
// Problem.toAscii().data());
QString TrainType = CZTData::GetModbusTrainTypeString(ZT2LogElement->mFlags.mModbusTrainType);
QString TrainCompo = "Non Disponible";
if(ZT2LogElement->mFlags.mTrainCompo1 != 0)
{
TrainCompo = QString("%1-%2-%3").arg(ZT2LogElement->mFlags.mTrainCompo1)\
.arg(ZT2LogElement->mFlags.mTrainCompo2)
.arg(ZT2LogElement->mFlags.mTrainCompo3);
}
Summary = QString("Passage:\n\nDate: %1\nHeure: %2\nZone Test : ZT2\nTrain : %3\nCompo: %6\nNombre d'éléments: %4\nProblématique: %5\n\n\nDéclenchements: \n")\
.arg(ZT2LogElement->mPassageDateTime.toString("yyyy/MM/dd"))\
.arg(ZT2LogElement->mPassageDateTime.toString("hh:mm:ss"))\
.arg(TrainType)\
.arg(ZT2LogElement->mNbElements)\
.arg(Problem)
.arg(TrainCompo);
if(ZT2LogElement->mZTDetections.size() > 0)
{