V1.19 : Corrections suite aux essais CC du 19 février 2019
//Version 1.19 //-Suite aux essais sur site, changement des CDV d'acquitement des alarmes // À Montmorency (12BC -> 12A et 22BC -> 22A). //-Correction d'un bug qui causait systématiquement une erreur de comptage // lorsqu'une panne équipement survenait alors que l'analyse était inhibée.
This commit is contained in:
parent
dbb8472fd0
commit
d235255053
@ -80,7 +80,7 @@ ENGLOG=3
|
||||
#STATION=LONGUEIL
|
||||
#STATION=SAINT_MICHEL
|
||||
#STATION=SNOWDON_L5
|
||||
#STATION=MONTMORENCY
|
||||
STATION=MONTMORENCY
|
||||
#STATION=MONTMORENCY_10_12
|
||||
#STATION=MONTMORENCY_10_22
|
||||
STATION=DU_COLLEGE
|
||||
#STATION=DU_COLLEGE
|
||||
|
||||
@ -133,6 +133,12 @@ unsigned int CDiscreteTKTransport::SetInputStates(bool AN1State, bool ZT1CDVStat
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
unsigned int CDiscreteTKTransport::ClearTKForNewTrain()
|
||||
{
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void CDiscreteTKTransport::ExecZT1SM()
|
||||
{
|
||||
switch(mZT1TKGeneratorState)
|
||||
|
||||
@ -60,6 +60,7 @@ public:
|
||||
unsigned int EnterMaintenance();
|
||||
unsigned int SetInputStates(bool AN1State, bool ZT1CDVState, bool AN2State, bool ZT2CDVState);
|
||||
unsigned int BeginTKEmission();
|
||||
virtual unsigned int ClearTKForNewTrain();
|
||||
|
||||
bool IsTKProcessing();
|
||||
bool IsZT1TKProcessing();
|
||||
|
||||
@ -12,6 +12,7 @@ CModbusTKTransport::CModbusTKTransport(CModbusRepository *Repo)
|
||||
mZT1TKDataList.clear();
|
||||
mZT2TKDataList.clear();
|
||||
mZT1Clear = mZT2Clear = false;
|
||||
mNewTrainIncoming = false;
|
||||
|
||||
mModbusTKZT1SMState = MODBUS_ZT1_TK_STANDBY_STATE;
|
||||
mModbusTKZT2SMState = MODBUS_ZT2_TK_STANDBY_STATE;
|
||||
@ -466,6 +467,18 @@ unsigned int CModbusTKTransport::SetInputStates(bool AN1State, bool ZT1CDVState,
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
unsigned int CModbusTKTransport::ClearTKForNewTrain()
|
||||
{
|
||||
if(mModbusTKZT1SMState == MODBUS_ZT1_TK_WAIT_FOR_CLEAR_STATE)
|
||||
{
|
||||
mNewTrainIncoming = true;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
mNewTrainIncoming = false;
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
unsigned int CModbusTKTransport::CancelAllTK()
|
||||
{
|
||||
|
||||
@ -596,6 +609,14 @@ void CModbusTKTransport::ExecZT1SM()
|
||||
ClearTK(ZT1_TYPE_ID);
|
||||
mModbusTKZT1SMState = MODBUS_ZT1_TK_STANDBY_STATE;
|
||||
}
|
||||
else if(mNewTrainIncoming)
|
||||
{
|
||||
//A new train is incoming and is on the ZT CDV. Clear the alarms
|
||||
CZTLog::instance()->AddLogString("Un nouveau train arrive en ZT1. Acquitement automatique des alarmes ZT1 au PCC",true);
|
||||
ClearTK(ZT1_TYPE_ID);
|
||||
mModbusTKZT1SMState = MODBUS_ZT1_TK_STANDBY_STATE;
|
||||
mNewTrainIncoming = false;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -604,6 +625,7 @@ void CModbusTKTransport::ExecZT1SM()
|
||||
mZT1TKDataList.clear();
|
||||
mZT1TKStateMachineTimer->stop();
|
||||
ResetAlarmCount(ZT1_TYPE_ID);
|
||||
mNewTrainIncoming = false;
|
||||
|
||||
// //In maintenance mode, it is possible to have ZT2 events at the same time
|
||||
// //than ZT1. So if any ZT2 events are waiting in the qeue, send them...
|
||||
|
||||
@ -51,6 +51,7 @@ public:
|
||||
int ClearTK(int ZT);
|
||||
unsigned int CancelAllTK();
|
||||
|
||||
|
||||
virtual bool IsZT2TKProcessing();
|
||||
virtual bool IsZT1TKProcessing();
|
||||
virtual bool IsTKProcessing();
|
||||
@ -58,6 +59,7 @@ public:
|
||||
virtual int AddNewZT2Detection(CZTDetectionData Detection);
|
||||
virtual unsigned int BeginTKEmission();
|
||||
virtual unsigned int SetInputStates(bool AN1State, bool ZT1CDVState, bool AN2State, bool ZT2CDVState);
|
||||
virtual unsigned int ClearTKForNewTrain();
|
||||
|
||||
|
||||
virtual unsigned int CancelMaintenanceCurrentTK();
|
||||
@ -72,6 +74,7 @@ private:
|
||||
int mModbusTKZT1SMState,mModbusTKZT2SMState;
|
||||
QTimer *mZT1TKStateMachineTimer, *mZT2TKStateMachineTimer;
|
||||
bool mZT1Clear, mZT2Clear;
|
||||
bool mNewTrainIncoming;
|
||||
|
||||
int RegOffset(qint16 Reg){return (int)Reg-MODBUS_ZT_DATA_BASE_REG;}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ unsigned int CSimulationScenario::CreateScenario()
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0);
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
|
||||
|
||||
//// if(bogie != 5 && bogie != 6)
|
||||
// if(bogie != 5 && bogie != 6)
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_FN,5);
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_FN,5);
|
||||
|
||||
@ -165,7 +165,7 @@ unsigned int CSimulationScenario::CreateScenario()
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
|
||||
|
||||
//FN DETECTION
|
||||
// if(bogie != 5 && bogie != 8 && bogie != 3)
|
||||
if(bogie != 7 /*&& bogie != 8 && bogie != 3*/)
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_FN,0);
|
||||
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY);
|
||||
@ -177,7 +177,7 @@ unsigned int CSimulationScenario::CreateScenario()
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_PPI,0);
|
||||
|
||||
//FN DETECTION
|
||||
// if(bogie != 5 && bogie != 8 && bogie != 3)
|
||||
if(bogie != 7 /*&& bogie != 8 && bogie != 3*/)
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_FN,0);
|
||||
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY);
|
||||
|
||||
@ -188,11 +188,11 @@ unsigned int CMontmorencyStation::BuildStationCDVList()
|
||||
|
||||
NewCDV = new CCDV(MONTMORENCY_IN_ZT1_10_12_ITI_MASK,MONTMORENCY_IN_CDV_12BC_MASK,CDV_NORMAL_TYPE,"12BC",1,4);
|
||||
mCDVList.append(NewCDV);
|
||||
m10_12AlarmAutoAcquireCDV = NewCDV; //Memorize it...
|
||||
NewCDV->SetCDVDeck(true);
|
||||
|
||||
NewCDV = new CCDV(MONTMORENCY_IN_ZT1_10_12_ITI_MASK,MONTMORENCY_IN_CDV_12A_MASK,CDV_NORMAL_TYPE,"12A",1,5);
|
||||
mZT1AlarmAutoAcquireCDV = NewCDV;
|
||||
m10_12AlarmAutoAcquireCDV = NewCDV; //Memorize it...
|
||||
mCDVList.append(NewCDV);
|
||||
NewCDV->SetCDVDeck(true);
|
||||
|
||||
@ -211,12 +211,9 @@ unsigned int CMontmorencyStation::BuildStationCDVList()
|
||||
|
||||
NewCDV = new CCDV(MONTMORENCY_IN_ZT1_10_22_ITI_MASK,MONTMORENCY_IN_CDV_22BC_MASK,CDV_NORMAL_TYPE,"22BC",2,4);
|
||||
mCDVList.append(NewCDV);
|
||||
m10_22AlarmAutoAcquireCDV = NewCDV; //Memorize it.
|
||||
|
||||
|
||||
|
||||
NewCDV = new CCDV(MONTMORENCY_IN_ZT1_10_22_ITI_MASK,MONTMORENCY_IN_CDV_22A_MASK,CDV_NORMAL_TYPE,"22A",2,5);
|
||||
|
||||
m10_22AlarmAutoAcquireCDV = NewCDV; //Memorize it.
|
||||
mCDVList.append(NewCDV);
|
||||
|
||||
|
||||
|
||||
@ -64,6 +64,7 @@ class CTKGenerator : public QObject
|
||||
virtual unsigned int EnterMaintenance() = 0;
|
||||
virtual unsigned int SetInputStates(bool AN1State, bool ZT1CDVState, bool AN2State, bool ZT2CDVState) = 0;
|
||||
virtual unsigned int BeginTKEmission() = 0;
|
||||
virtual unsigned int ClearTKForNewTrain() = 0;
|
||||
|
||||
|
||||
void LogTK(CZTDetectionData DetectionData);
|
||||
|
||||
@ -195,7 +195,7 @@ void CZTSettingsFileMgr::LogSettings(CZTSettingsData *SettingsData, bool LogStat
|
||||
stream << " Analyse FN = " << SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_FN].AnalysisActive;
|
||||
CZTLog::instance()->AddLogString(temp,true);
|
||||
temp.clear();
|
||||
stream << " Analyse PG = " << SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_PP].AnalysisActive;
|
||||
stream << " Analyse PG = " << SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive;
|
||||
CZTLog::instance()->AddLogString(temp,true);
|
||||
temp.clear();
|
||||
stream << " Analyse PP ZT1 = " << SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_PP].AnalysisActive;
|
||||
|
||||
@ -393,6 +393,7 @@ unsigned int CZTStateMachine::ZT1StateMachine(unsigned int Event, unsigned int S
|
||||
InsertZT1LogItem();
|
||||
|
||||
mZT1WorkerThread->UpdateDetectionConfig(mZTDetectionConfig);
|
||||
mTKGenerator->ClearTKForNewTrain();
|
||||
mTKGenerator->UpdateDetectionConfig(mZTDetectionConfig);
|
||||
mZT1SMThread->start(QThread::NormalPriority);
|
||||
|
||||
@ -572,7 +573,7 @@ unsigned int CZTStateMachine::AnalyzeZT1PostDetection()
|
||||
//of the sensor count error), then ignore the PEQ1...
|
||||
if(MagSensorCountError == true && mZT1PEQType == PEQ1_FN_STUCK_LOW_TYPE)
|
||||
{
|
||||
PostAnalyseData = true;
|
||||
PostAnalyseData = true; //This flag is used to re-analyze the data in case of a mag sensor count error
|
||||
}
|
||||
//If the detection is de-activated, ignore it
|
||||
else if((mZT1PEQType == PEQ1_FN_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_FN].AnalysisActive == false) ||
|
||||
@ -583,7 +584,18 @@ unsigned int CZTStateMachine::AnalyzeZT1PostDetection()
|
||||
(mZT1PEQType == PEQ1_LAZER_SENSOR_INT_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive == false) ||
|
||||
(mZT1PEQType == PEQ1_PG_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive == false))
|
||||
{
|
||||
PostAnalyseData = true;
|
||||
//The PEQ1 is invalid because analysis was deactivated. Remove it from detection buffer.
|
||||
for(int i = 0; i < mZT1DetectionsLog.size(); i++)
|
||||
{
|
||||
if(mZT1DetectionsLog.at(i)->mDetectionID == DETECTION_PEQ1_DETECTION)
|
||||
{
|
||||
mZT1DetectionsLog.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
PEQ1Error = false;
|
||||
PostAnalyseData = false;
|
||||
CZTLog::instance()->AddBufferString("[POST DETECTION]--> Annulation de la Panne Équipement ZT1 car l'analyse de cette panne est désactivée.");
|
||||
}
|
||||
else //We need to consider PEQ1. Clear all detections and send only PEQ1...
|
||||
{
|
||||
@ -634,7 +646,7 @@ unsigned int CZTStateMachine::AnalyzeZT1PostDetection()
|
||||
}
|
||||
}
|
||||
|
||||
if(PostAnalyseData == true) //check if we need to do a post-analysis of the data.
|
||||
if(PostAnalyseData == true) //check if we need to do a post-analysis of the data. ONLY IF THERE ARE MAG SENSOR COUNT ERROR!!!
|
||||
{
|
||||
int S1Count = 0, S2Count = 0, FNCount = 0, PGCount = 0, PPICount = 0, PPECount = 0;
|
||||
|
||||
|
||||
@ -28,9 +28,15 @@
|
||||
#ifndef ZTVERSION_H
|
||||
#define ZTVERSION_H
|
||||
|
||||
#define ZT_SOFT_VERSION "V1.18"
|
||||
#define ZT_SOFT_VERSION "V1.19"
|
||||
|
||||
//LOG DES CHANGEMENTS
|
||||
//Version 1.19
|
||||
//-Suite aux essais sur site, changement des CDV d'acquitement des alarmes
|
||||
// À Montmorency (12BC -> 12A et 22BC -> 22A).
|
||||
//-Correction d'un bug qui causait systématiquement une erreur de comptage
|
||||
// lorsqu'une panne équipement survenait alors que l'analyse était inhibée.
|
||||
|
||||
//Version 1.18
|
||||
//-Correction du bug qui loggait une erreur de PEQ1 frotteur négatif collé à 1
|
||||
// systématiquement pour n'importe quelle panne.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user