Version 1.34

Version 1.34
-Ajout du log des requêtes d'écriture Modbus dans le IngLog
This commit is contained in:
jfmartel 2025-11-16 09:18:28 -05:00
parent 004e7234f2
commit cec26f952b
7 changed files with 70 additions and 61 deletions

View File

@ -93,10 +93,10 @@ ENGLOG=3
#STATION=HONORE_BEAUGRAND #STATION=HONORE_BEAUGRAND
#STATION=ANGRIGNON #STATION=ANGRIGNON
#STATION=HENRI_BOURASSA #STATION=HENRI_BOURASSA
STATION=COTE_VERTU #STATION=COTE_VERTU
#STATION=BERRI_UQAM #STATION=BERRI_UQAM
#STATION=LONGUEIL #STATION=LONGUEIL
#STATION=SAINT_MICHEL STATION=SAINT_MICHEL
#STATION=SNOWDON_L5 #STATION=SNOWDON_L5
#STATION=MONTMORENCY #STATION=MONTMORENCY
#STATION=MONTMORENCY_10_12 #STATION=MONTMORENCY_10_12

Binary file not shown.

View File

@ -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 ./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 CVRT-LogZT.txt put ./LOG/LogZT.txt SMIC-LogZT.txt
put ./ING/IngLog.txt CVRT-IngLog.txt put ./ING/IngLog.txt SMIC-IngLog.txt

View File

@ -185,6 +185,8 @@ int CModbusBackend::AnalyzeModbusRequest(CModbusTransaction Transaction)
qDebug("debug... 2000"); 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("Slave Rx Write Single Register. Address: %d, Value: 0x%s",StartAdress, data.toHex().data());
// qDebug("Data: %s",data.toHex().data()); // qDebug("Data: %s",data.toHex().data());
@ -233,8 +235,10 @@ int CModbusBackend::AnalyzeModbusRequest(CModbusTransaction Transaction)
//Write register data //Write register data
mModbusRepo->WriteHRData(StartAdress,NbRegisters,data); mModbusRepo->WriteHRData(StartAdress,NbRegisters,data);
// qDebug("\nSlave Rx Write Multiple Registers. Address: %d, Nb Reg: %d",StartAdress, NbRegisters); CEngLog::instance()->AddLogString(QString().sprintf("Slave Rx Write Multiple Registers. Address: %d, Nb Reg: %d",StartAdress, NbRegisters));
// qDebug("Data: %s\n",data.toHex().data()); 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. 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); SendModbusResponse(Transaction, data);

View File

@ -49,56 +49,57 @@ unsigned int CSimulationScenario::CreateScenario()
/// //MPM10 /// //MPM10
// InsertNewStep(STEP_ACTION_REGISTER_ZT1_ITI,300); InsertNewStep(STEP_ACTION_REGISTER_ZT1_ITI,300);
// InsertNewStep(STEP_ACTION_OCCUPY_ZT1_APPROACH,300); InsertNewStep(STEP_ACTION_OCCUPY_ZT1_APPROACH,300);
// InsertNewStep(STEP_ACTION_OCCUPY_ZT1,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*/) //if(bogie != 5 /*&& bogie != 6*/)
//// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0); // InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0);
//// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5); // InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5);
// InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY); InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY);
// InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY); InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY);
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0); InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0);
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,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);
// InsertNewStep(STEP_ACTION_ACTIVATE_FN,5); // InsertNewStep(STEP_ACTION_ACTIVATE_FN,5);
//// if(bogie == 12) // if(bogie == 12)
//// InsertNewStep(STEP_ACTION_ACTIVATE_PPI,0); // InsertNewStep(STEP_ACTION_ACTIVATE_PPI,0);
// InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY); InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY);
// InsertNewStep(STEP_ACTION_DEACTIVATE_S2,SENSOR_DELAY); InsertNewStep(STEP_ACTION_DEACTIVATE_S2,SENSOR_DELAY);
// InsertNewStep(STEP_ACTION_DEACTIVATE_FN,5); // InsertNewStep(STEP_ACTION_DEACTIVATE_FN,5);
// InsertNewStep(STEP_ACTION_DEACTIVATE_PPI,5); // InsertNewStep(STEP_ACTION_DEACTIVATE_PPI,5);
// InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY); InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY);
// InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY); InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY);
// //if(bogie != 5 /*&& bogie != 6 && bogie != 7*/) //if(bogie != 5 /*&& bogie != 6 && bogie != 7*/)
//// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0); // InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0);
//// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5); // InsertNewStep(STEP_ACTION_ACTIVATE_PGE,5);
// InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY); InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY);
// InsertNewStep(STEP_ACTION_DEACTIVATE_S2,BOGIE_DELAY); InsertNewStep(STEP_ACTION_DEACTIVATE_S2,BOGIE_DELAY);
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0); InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0);
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0); InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
// } }
// // InsertNewStep(STEP_ACTION_DESTROY_ZT1_ITI,800); // InsertNewStep(STEP_ACTION_DESTROY_ZT1_ITI,800);
// InsertNewStep(STEP_ACTION_FREE_ZT1_APPROACH,800); InsertNewStep(STEP_ACTION_FREE_ZT1_APPROACH,800);
// InsertNewStep(STEP_ACTION_FREE_ZT1,800); InsertNewStep(STEP_ACTION_FREE_ZT1,800);
@ -107,39 +108,39 @@ unsigned int CSimulationScenario::CreateScenario()
/// //ZT2 /// //ZT2
InsertNewStep(STEP_ACTION_REGISTER_ZT2_ITI,300); // InsertNewStep(STEP_ACTION_REGISTER_ZT2_ITI,300);
InsertNewStep(STEP_ACTION_OCCUPY_ZT2,300); // InsertNewStep(STEP_ACTION_OCCUPY_ZT2,300);
for(int bogie = 1; bogie <= 18; bogie++) // for(int bogie = 1; bogie <= 18; bogie++)
{ // {
InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY); // InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY);
InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY); // InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY);
// if(bogie == 5 || bogie == 2) // // if(bogie == 5 || bogie == 2)
{ // {
// InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPE,5); // // InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPE,5);
// InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPE,1); // // InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPE,1);
} // }
// if(bogie == 3 || bogie == 10) // // if(bogie == 3 || bogie == 10)
{ // {
// InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPI,3); //// InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_PPI,3);
// InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPI,1); //// InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_PPI,1);
} // }
//if(bogie != 3) // //if(bogie != 3)
{ // {
InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY); // InsertNewStep(STEP_ACTION_ACTIVATE_ZT2_S1,SENSOR_DELAY);
InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY); // InsertNewStep(STEP_ACTION_DEACTIVATE_ZT2_S1,BOGIE_DELAY);
} // }
} // }
InsertNewStep(STEP_ACTION_DESTROY_ZT2_ITI,800); // InsertNewStep(STEP_ACTION_DESTROY_ZT2_ITI,800);
InsertNewStep(STEP_ACTION_FREE_ZT2,800); // InsertNewStep(STEP_ACTION_FREE_ZT2,800);

View File

@ -29,9 +29,12 @@
#ifndef ZTVERSION_H #ifndef ZTVERSION_H
#define ZTVERSION_H #define ZTVERSION_H
#define ZT_SOFT_VERSION "V1.33" #define ZT_SOFT_VERSION "V1.34"
//LOG DES CHANGEMENTS //LOG DES CHANGEMENTS
//Version 1.34
//-Ajout du log des requêtes d'écriture Modbus dans le IngLog
//Version 1.33 //Version 1.33
//-Inhibition des déclenchements PEQ avec la désactivation des TK //-Inhibition des déclenchements PEQ avec la désactivation des TK
//-Remise à zéro du Nb de passage aujourd'hui avec le reste à 3h //-Remise à zéro du Nb de passage aujourd'hui avec le reste à 3h

View File

@ -65,6 +65,7 @@
#ifdef USE_NETWORKING #ifdef USE_NETWORKING
#include "NetworkManager.h" #include "NetworkManager.h"
#endif #endif