diff --git a/Configuration/ZT.cfg b/Configuration/ZT.cfg index 0894139..1d39718 100644 --- a/Configuration/ZT.cfg +++ b/Configuration/ZT.cfg @@ -93,10 +93,10 @@ ENGLOG=3 #STATION=HONORE_BEAUGRAND #STATION=ANGRIGNON #STATION=HENRI_BOURASSA -STATION=COTE_VERTU +#STATION=COTE_VERTU #STATION=BERRI_UQAM #STATION=LONGUEIL -#STATION=SAINT_MICHEL +STATION=SAINT_MICHEL #STATION=SNOWDON_L5 #STATION=MONTMORENCY #STATION=MONTMORENCY_10_12 diff --git a/Configuration/ZTSettings.ztc b/Configuration/ZTSettings.ztc index d7191e9..accb593 100644 Binary files a/Configuration/ZTSettings.ztc and b/Configuration/ZTSettings.ztc differ diff --git a/sftpbatch b/sftpbatch index 064a43f..cb2c534 100644 --- a/sftpbatch +++ b/sftpbatch @@ -1,3 +1,3 @@ -put ./Trains/LOGZT2_2024-08-15-13-45-44-992.bin CVRT-N-LOGZT2_2024-08-15-13-45-44-992.bin -put ./LOG/LogZT.txt CVRT-LogZT.txt -put ./ING/IngLog.txt CVRT-IngLog.txt \ No newline at end of file +put ./Trains/LOGZT1_2025-07-16-10-44-34-842.bin SMIC-D-LOGZT1_2025-07-16-10-44-34-842.bin +put ./LOG/LogZT.txt SMIC-LogZT.txt +put ./ING/IngLog.txt SMIC-IngLog.txt \ No newline at end of file diff --git a/sources/Modbus/ModbusBackend.cpp b/sources/Modbus/ModbusBackend.cpp index 70fff8b..5ad83bb 100644 --- a/sources/Modbus/ModbusBackend.cpp +++ b/sources/Modbus/ModbusBackend.cpp @@ -185,6 +185,8 @@ int CModbusBackend::AnalyzeModbusRequest(CModbusTransaction Transaction) qDebug("debug... 2000"); } + CEngLog::instance()->AddLogString(QString().sprintf("Slave Rx Write Single Register. Address: %d, Value: 0x%s",StartAdress, data.toHex().data())); + CEngLog::instance()->AddLogString(QString().sprintf("Data: %s\n",data.toHex().data())); // qDebug("Slave Rx Write Single Register. Address: %d, Value: 0x%s",StartAdress, data.toHex().data()); // qDebug("Data: %s",data.toHex().data()); @@ -233,8 +235,10 @@ int CModbusBackend::AnalyzeModbusRequest(CModbusTransaction Transaction) //Write register data mModbusRepo->WriteHRData(StartAdress,NbRegisters,data); - // qDebug("\nSlave Rx Write Multiple Registers. Address: %d, Nb Reg: %d",StartAdress, NbRegisters); - // qDebug("Data: %s\n",data.toHex().data()); + CEngLog::instance()->AddLogString(QString().sprintf("Slave Rx Write Multiple Registers. Address: %d, Nb Reg: %d",StartAdress, NbRegisters)); + CEngLog::instance()->AddLogString(QString().sprintf("Data: %s\n",data.toHex().data())); + //qDebug("\nSlave Rx Write Multiple Registers. Address: %d, Nb Reg: %d",StartAdress, NbRegisters); + //qDebug("Data: %s\n",data.toHex().data()); data = Transaction.mPDU.mData.left(4); //The response corresponds to the Start Adress and Nb of Regs. Which is the first 4 bytes of the initial request. SendModbusResponse(Transaction, data); diff --git a/sources/Simulator/SimulationScenario.cpp b/sources/Simulator/SimulationScenario.cpp index e80f1f6..199e007 100644 --- a/sources/Simulator/SimulationScenario.cpp +++ b/sources/Simulator/SimulationScenario.cpp @@ -49,56 +49,57 @@ unsigned int CSimulationScenario::CreateScenario() /// //MPM10 -// InsertNewStep(STEP_ACTION_REGISTER_ZT1_ITI,300); -// InsertNewStep(STEP_ACTION_OCCUPY_ZT1_APPROACH,300); -// InsertNewStep(STEP_ACTION_OCCUPY_ZT1,300); + InsertNewStep(STEP_ACTION_REGISTER_ZT1_ITI,300); + InsertNewStep(STEP_ACTION_OCCUPY_ZT1_APPROACH,300); + InsertNewStep(STEP_ACTION_OCCUPY_ZT1,300); + InsertNewStep(STEP_ACTION_ACTIVATE_FN,0); -// for(int bogie = 1; bogie <= 18; bogie++) -// { + for(int bogie = 1; bogie <= 18; bogie++) + { -// //if(bogie != 5 /*&& bogie != 6*/) -//// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0); -//// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5); + //if(bogie != 5 /*&& bogie != 6*/) +// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0); +// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5); -// InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY); -// InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY); + InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY); + InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY); -// InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0); -// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0); + InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0); + InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0); // if(bogie != 5 && bogie != 6) // InsertNewStep(STEP_ACTION_ACTIVATE_FN,5); // InsertNewStep(STEP_ACTION_ACTIVATE_FN,5); -//// if(bogie == 12) -//// InsertNewStep(STEP_ACTION_ACTIVATE_PPI,0); +// if(bogie == 12) +// InsertNewStep(STEP_ACTION_ACTIVATE_PPI,0); -// InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY); -// InsertNewStep(STEP_ACTION_DEACTIVATE_S2,SENSOR_DELAY); + InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY); + InsertNewStep(STEP_ACTION_DEACTIVATE_S2,SENSOR_DELAY); // InsertNewStep(STEP_ACTION_DEACTIVATE_FN,5); // InsertNewStep(STEP_ACTION_DEACTIVATE_PPI,5); -// InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY); -// InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY); + InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY); + InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY); -// //if(bogie != 5 /*&& bogie != 6 && bogie != 7*/) -//// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0); -//// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5); -// InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY); -// InsertNewStep(STEP_ACTION_DEACTIVATE_S2,BOGIE_DELAY); -// InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0); -// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0); + //if(bogie != 5 /*&& bogie != 6 && bogie != 7*/) +// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0); +// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5); + InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY); + InsertNewStep(STEP_ACTION_DEACTIVATE_S2,BOGIE_DELAY); + InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0); + InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0); -// } + } -// // InsertNewStep(STEP_ACTION_DESTROY_ZT1_ITI,800); -// InsertNewStep(STEP_ACTION_FREE_ZT1_APPROACH,800); -// InsertNewStep(STEP_ACTION_FREE_ZT1,800); + // InsertNewStep(STEP_ACTION_DESTROY_ZT1_ITI,800); + InsertNewStep(STEP_ACTION_FREE_ZT1_APPROACH,800); + InsertNewStep(STEP_ACTION_FREE_ZT1,800); @@ -107,39 +108,39 @@ unsigned int CSimulationScenario::CreateScenario() /// //ZT2 - InsertNewStep(STEP_ACTION_REGISTER_ZT2_ITI,300); - InsertNewStep(STEP_ACTION_OCCUPY_ZT2,300); +// InsertNewStep(STEP_ACTION_REGISTER_ZT2_ITI,300); +// InsertNewStep(STEP_ACTION_OCCUPY_ZT2,300); - for(int bogie = 1; bogie <= 18; bogie++) - { - InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY); - InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY); +// for(int bogie = 1; bogie <= 18; bogie++) +// { +// InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY); +// InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY); - // if(bogie == 5 || bogie == 2) - { - // InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPE,5); - // InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPE,1); +// // if(bogie == 5 || bogie == 2) +// { +// // InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPE,5); +// // InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPE,1); - } +// } - // if(bogie == 3 || bogie == 10) - { -// InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPI,3); -// InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPI,1); +// // if(bogie == 3 || bogie == 10) +// { +//// InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPI,3); +//// InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPI,1); - } +// } - //if(bogie != 3) - { - InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY); - InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY); - } +// //if(bogie != 3) +// { +// InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY); +// InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY); +// } - } +// } - InsertNewStep(STEP_ACTION_DESTROY_ZT2_ITI,800); - InsertNewStep(STEP_ACTION_FREE_ZT2,800); +// InsertNewStep(STEP_ACTION_DESTROY_ZT2_ITI,800); +// InsertNewStep(STEP_ACTION_FREE_ZT2,800); diff --git a/sources/ZTVersion.h b/sources/ZTVersion.h index fac0176..91138c6 100755 --- a/sources/ZTVersion.h +++ b/sources/ZTVersion.h @@ -29,9 +29,12 @@ #ifndef ZTVERSION_H #define ZTVERSION_H -#define ZT_SOFT_VERSION "V1.33" +#define ZT_SOFT_VERSION "V1.34" //LOG DES CHANGEMENTS +//Version 1.34 +//-Ajout du log des requêtes d'écriture Modbus dans le IngLog + //Version 1.33 //-Inhibition des déclenchements PEQ avec la désactivation des TK //-Remise à zéro du Nb de passage aujourd'hui avec le reste à 3h diff --git a/sources/Zonetest.cpp b/sources/Zonetest.cpp index cd33c41..4999c0e 100644 --- a/sources/Zonetest.cpp +++ b/sources/Zonetest.cpp @@ -65,6 +65,7 @@ + #ifdef USE_NETWORKING #include "NetworkManager.h" #endif