Activation SFTP même sans Modbus avec la CC

This commit is contained in:
jfmartel 2024-06-03 13:51:21 -04:00
parent 6c4d2c5256
commit f5510f58ea
3 changed files with 18 additions and 16 deletions

Binary file not shown.

View File

@ -29,9 +29,14 @@
#ifndef ZTVERSION_H #ifndef ZTVERSION_H
#define ZTVERSION_H #define ZTVERSION_H
#define ZT_SOFT_VERSION "V1.25.1" #define ZT_SOFT_VERSION "V1.26"
//LOG DES CHANGEMENTS //LOG DES CHANGEMENTS
//Version 1.26
//-Ajout de la possibilité d'activer le module SFTP pour copier les logs sans que la
// communication avec la CC soit activée (ZT branchée sur le réseau mais interface
// avec la CC en fil-à-fil).
//Version 1.25.1 //Version 1.25.1
//-Deplacement de la notification de sychronisation de la date & heure SACL vers le //-Deplacement de la notification de sychronisation de la date & heure SACL vers le
// log d'ingenierie pour ne pas polluer ZTLog. // log d'ingenierie pour ne pas polluer ZTLog.

View File

@ -655,21 +655,6 @@ unsigned int CZoneTest::InitZT()
connect(mZTStateMachine,SIGNAL(NewTrainLogSaved(QString,bool)),&mNetworkDriveMgr,SLOT(NewTrainFileSaved(QString,bool))); connect(mZTStateMachine,SIGNAL(NewTrainLogSaved(QString,bool)),&mNetworkDriveMgr,SLOT(NewTrainFileSaved(QString,bool)));
} }
bool EnableSFTPClient = CZTConfigMgr::instance()->GetSFTPActivated();
QString SFTPLogin = CZTConfigMgr::instance()->GetSFTPLogin();
QString SFTPPassword = CZTConfigMgr::instance()->GetSFTPPassword();
QString SFTPServerAddress = CZTConfigMgr::instance()->GetSFTPServerAddress();
QString SFTPRemoteDir = CZTConfigMgr::instance()->GetSFTPServerRemoteDir();
bool UseEngLog = CZTConfigMgr::instance()->GetEngLog() != -1;
mSFTPManager.InitFTPServerManager(EnableSFTPClient,SFTPLogin,SFTPPassword,SFTPServerAddress,SFTPRemoteDir,mZTStation->GetStationShortName(),UseEngLog);
if(EnableSFTPClient == true)
{
connect(mZTStateMachine,SIGNAL(NewTrainLogSaved(QString,bool)),&mSFTPManager,SLOT(NewTrainFileSaved(QString,bool)));
}
} }
else else
{ {
@ -682,6 +667,18 @@ unsigned int CZoneTest::InitZT()
} }
connect(mTKTransportInterface,SIGNAL(TKOutputStatesChanged(bool,bool)),panel.mMaintenancePage,SLOT(TKOutputChanged(bool,bool))); connect(mTKTransportInterface,SIGNAL(TKOutputStatesChanged(bool,bool)),panel.mMaintenancePage,SLOT(TKOutputChanged(bool,bool)));
//Start SFTP file copy service
bool EnableSFTPClient = CZTConfigMgr::instance()->GetSFTPActivated();
QString SFTPLogin = CZTConfigMgr::instance()->GetSFTPLogin();
QString SFTPPassword = CZTConfigMgr::instance()->GetSFTPPassword();
QString SFTPServerAddress = CZTConfigMgr::instance()->GetSFTPServerAddress();
QString SFTPRemoteDir = CZTConfigMgr::instance()->GetSFTPServerRemoteDir();
bool UseEngLog = CZTConfigMgr::instance()->GetEngLog() != -1;
mSFTPManager.InitFTPServerManager(EnableSFTPClient,SFTPLogin,SFTPPassword,SFTPServerAddress,SFTPRemoteDir,mZTStation->GetStationShortName(),UseEngLog);
if(EnableSFTPClient == true)
{
connect(mZTStateMachine,SIGNAL(NewTrainLogSaved(QString,bool)),&mSFTPManager,SLOT(NewTrainFileSaved(QString,bool)));
}
if(mSimulationON == true) if(mSimulationON == true)
{ {