Corrections suite aux essais historien PI
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#include "HistorienData.h"
|
||||
|
||||
CHistorienData::CHistorienData()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
#ifndef HISTORIENDATA_H
|
||||
#define HISTORIENDATA_H
|
||||
|
||||
class CHistorienData
|
||||
{
|
||||
public:
|
||||
CHistorienData();
|
||||
|
||||
int mFNEnabled;
|
||||
int mPPEnabled;
|
||||
int mPGEnabled;
|
||||
int mPPZT2Enabled;
|
||||
int mMaintenanceMode;
|
||||
int mHPCHealth;
|
||||
int mSEIHealth;
|
||||
int mZT1Enabled;
|
||||
int mZT2Enabled;
|
||||
int mCalibPG;
|
||||
int mBootDateYr;
|
||||
int mBootDateMonth;
|
||||
int mBootDateDay;
|
||||
int mBootDateHour;
|
||||
int mBootDateMinutes;
|
||||
int mBootDateSeconds;
|
||||
int mTotalTrains;
|
||||
int mTotalDetections;
|
||||
int mTrainsToday;
|
||||
int mDetectToday;
|
||||
int mFNDetectToday;
|
||||
int mPPIDetectToday;
|
||||
int mPPEDetectToday;
|
||||
int mPGDetectToday;
|
||||
int mPPIZT2DetectToday;
|
||||
int mPPEZT2DetectToday;
|
||||
int mLastTrainYear;
|
||||
int mLastTrainMonth;
|
||||
int mLastTrainDay;
|
||||
int mLastTrainHour;
|
||||
int mLastTrainMinutes;
|
||||
int mLastTrainSeconds;
|
||||
int mLastZone;
|
||||
int mNbDetectLasTrain;
|
||||
int mLastTrainPPI1;
|
||||
int mLastTrainPPI2;
|
||||
int mLastTrainPPI3;
|
||||
int mLastTrainPPI4;
|
||||
int mLastTrainPPE1;
|
||||
int mLastTrainPPE2;
|
||||
int mLastTrainPPE3;
|
||||
int mLastTrainPPE4;
|
||||
int mLastTrainPG1;
|
||||
int mLastTrainPG2;
|
||||
int mLastTrainPG3;
|
||||
int mLastTrainPG4;
|
||||
int mLastTrainFN1;
|
||||
int mLastTrainFN2;
|
||||
int mLastTrainFN3;
|
||||
int mLastTrainFN4;
|
||||
int mLastTrainCountErr;
|
||||
int mLastTrainPEQ;
|
||||
int mLastTrainType;
|
||||
int mLastTrainCompo1;
|
||||
int mLastTrainCompo2;
|
||||
int mLastTrainCompo3;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // HISTORIENDATA_H
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ZTLog.h"
|
||||
#include "ModbusRepository.h"
|
||||
#include "PIHistorianDefs.h"
|
||||
#include "EngLog.h"
|
||||
|
||||
CPIHistorianManager::CPIHistorianManager(CModbusRepository *PIHistorianRepo, int ModbusPort, int ModbusDevID)
|
||||
{
|
||||
@@ -300,7 +301,6 @@ int CPIHistorianManager::NewZT1Passage(CZTPassageInfo ZT1PassageInfo)
|
||||
quint16 NbDecl = ZT1PassageInfo.mDetections->size();
|
||||
|
||||
quint16 NbDeclFN = 0, NbDeclPG = 0, NbDeclPPI = 0, NbDeclPPE = 0;
|
||||
quint16 PEQ = 0, ErrComptage = 0;
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_LAST_TRAIN_NB_DETECTS_REG_ADD,NbDecl);
|
||||
if(NbDecl != 0)
|
||||
{
|
||||
@@ -433,12 +433,12 @@ int CPIHistorianManager::NewZT1Passage(CZTPassageInfo ZT1PassageInfo)
|
||||
mNbPPIZT1Today += NbDeclPPI;
|
||||
mNbPPEZT1Today += NbDeclPPE;
|
||||
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_DETECTIONS_TODAY_REG_ADD,mNbDeclToday);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_DETECTIONS_TOTAL_REG_ADD,ZT1PassageInfo.mNbDeclenchements);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_FN_DETECTS_TODAY_REG_ADD,mNbFNToday);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_PPI_ZT1_DETECTS_TODAY_REG_ADD,mNbPPIZT1Today);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_PPE_ZT1_DETECTS_TODAY_REG_ADD,mNbPPEZT1Today);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_PG_DETECTS_TODAY_REG_ADD,mNbPGToday);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_DETECTIONS_TODAY_REG_ADD,mNbDeclToday);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_DETECTIONS_TOTAL_REG_ADD,ZT1PassageInfo.mNbDeclenchements);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_FN_DETECTS_TODAY_REG_ADD,mNbFNToday);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_PPI_ZT1_DETECTS_TODAY_REG_ADD,mNbPPIZT1Today);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_PPE_ZT1_DETECTS_TODAY_REG_ADD,mNbPPEZT1Today);
|
||||
mPIHistorianRepo->WriteSingleReg(HISTORIAN_PG_DETECTS_TODAY_REG_ADD,mNbPGToday);
|
||||
|
||||
}
|
||||
|
||||
@@ -593,4 +593,6 @@ void CPIHistorianManager::HistorianTimerExpired()
|
||||
|
||||
StartHistorianTimer();
|
||||
|
||||
CEngLog::instance()->AddLogString("Reset des stats historien du jour",2);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user