EgtMachKernel 2.6k4 :
- modifiche a SimulatorMP per file stima speciale con path specifica (EMT.MPSEST) per poter funzionare in modalità multitask.
This commit is contained in:
Binary file not shown.
+2
-1
@@ -185,8 +185,9 @@ static const std::string GVAR_SAFEDIST = ".SAFEDIST" ; // (num) distanza
|
||||
static const std::string GVAR_SIMVMID = ".SIMVMID" ; // (int) identificativo grezzo Vmill in collisione
|
||||
static const std::string GVAR_SIMCOBIND = ".SIMCOBIND" ; // (int) indice oggetto in collisione
|
||||
static const std::string GVAR_MPSIM = ".MPSIM" ; // (bool) flag simulazione multiprocesso
|
||||
static const std::string GVAR_MPSEST = ".MPSEST" ; // (string) path del file di stima speciale per simulazione multiprocesso
|
||||
static const std::string GVAR_RECORD = ".RECORD" ; // (bool) flag modalità registrazione comandi in simulazione
|
||||
static const std::string GVAR_OPERID = ".OPERID" ; // (int/s) identificativi ordinati operazioni per simulazione multiprocesso
|
||||
static const std::string GVAR_OPERID = ".OPERID" ; // (int/s) identificativi ordinati operazioni per simulazione multiprocesso
|
||||
// Funzioni generazione
|
||||
static const std::string ON_START = "OnStart" ;
|
||||
static const std::string ON_END = "OnEnd" ;
|
||||
|
||||
+19
-5
@@ -205,11 +205,24 @@ SimulatorMP::Start( bool bFirst)
|
||||
if ( ! VerifySetup())
|
||||
bOk = false ;
|
||||
// Eseguo stima speciale
|
||||
string sEstFile ;
|
||||
ExeGetTempDir( sEstFile) ;
|
||||
sEstFile += "\\Simul.sest" ;
|
||||
EraseFile( sEstFile) ;
|
||||
if ( ! m_pMchMgr->Estimate( sEstFile, ""))
|
||||
string sTemp ;
|
||||
if ( ExeGetCurrFilePath( sTemp)) {
|
||||
// direttorio
|
||||
string sDir = GetDirectory( sTemp) ;
|
||||
ReplaceString( sDir, "/", "\\") ;
|
||||
// nome
|
||||
string sName = GetFileTitleEgt( sTemp) ;
|
||||
// nome macchinata
|
||||
string sMGrp = m_pMchMgr->GetMachGroupName( m_pMchMgr->GetCurrMachGroup()) ;
|
||||
// path completa
|
||||
m_sSpecEstim = sDir + "\\" + sName + "_" + sMGrp + ".sest" ;
|
||||
}
|
||||
else {
|
||||
ExeGetTempDir( sTemp) ;
|
||||
m_sSpecEstim = sTemp + "\\Simul.sest" ;
|
||||
}
|
||||
EraseFile( m_sSpecEstim) ;
|
||||
if ( ! m_pMchMgr->Estimate( m_sSpecEstim, ""))
|
||||
bOk = false ;
|
||||
}
|
||||
|
||||
@@ -242,6 +255,7 @@ SimulatorMP::Start( bool bFirst)
|
||||
m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_VER, GetEMkVer()) ;
|
||||
m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MACHNAME, m_pMachine->GetMachineName()) ;
|
||||
m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MPSIM, true) ;
|
||||
m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MPSEST, m_sSpecEstim) ;
|
||||
|
||||
// Se appena entrati in simulazione
|
||||
if ( m_nStatus == SIS_INITIALIZED) {
|
||||
|
||||
@@ -162,6 +162,7 @@ class SimulatorMP : public ISimulator
|
||||
IGeomDB* m_pGeomDB ; // puntatore al DB geometrico
|
||||
Machine* m_pMachine ; // puntatore alla macchina
|
||||
PerformanceCounter* m_pPerfCnt ; // timer per calcolo FPS
|
||||
std::string m_sSpecEstim ; // path del file con i dati della stima speciale
|
||||
int m_nStatus ; // stato interno del simulatore (creato, inizializzato, pronto al movimento)
|
||||
double m_dStep ; // lunghezza di riferimento per la velocità di simulazione
|
||||
int m_nUiStatus ; // stato simulazione a livello utente
|
||||
|
||||
Reference in New Issue
Block a user