EgtExecutor 1.9e5 :

- aggiunta funzione Exe e Lua estimate.
This commit is contained in:
Dario Sassi
2018-05-31 06:47:28 +00:00
parent a6d6282277
commit 98dc896a01
3 changed files with 31 additions and 3 deletions
+20 -2
View File
@@ -2715,7 +2715,7 @@ LuaSimStop( lua_State* L)
}
//-------------------------------------------------------------------------------
// Generation
// Generation & T&L estimation
//-------------------------------------------------------------------------------
static int
LuaGenerate( lua_State* L)
@@ -2733,6 +2733,23 @@ LuaGenerate( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaEstimate( lua_State* L)
{
// 1 o 2 parametro : sEstFile [, sInfo]
string sEstFile ;
LuaCheckParam( L, 1, sEstFile)
string sInfo ;
LuaGetParam( L, 2, sInfo) ;
LuaClearStack( L) ;
// eseguo la stima dei tempi e delle lunghezze di lavorazione
bool bOk = ExeEstimate( sEstFile, sInfo) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
// Machine Calc
//-------------------------------------------------------------------------------
@@ -3482,8 +3499,9 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetMoveInfo", LuaSimGetMoveInfo) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimSetStep", LuaSimSetStep) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimStop", LuaSimStop) ;
// Generation
// Generation & T&L estimation
bOk = bOk && luaMgr.RegisterFunction( "EgtGenerate", LuaGenerate) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtEstimate", LuaEstimate) ;
// Machine
bOk = bOk && luaMgr.RegisterFunction( "EgtGetBaseId", LuaGetBaseId) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableId", LuaGetTableId) ;