EgtExecutor 1.8h4 :

- aggiunta a Exe e Lua SimGetOperationInfo.
This commit is contained in:
Dario Sassi
2017-08-18 17:24:51 +00:00
parent de83a284ae
commit fe8e148d7f
3 changed files with 33 additions and 0 deletions
+10
View File
@@ -2481,6 +2481,16 @@ ExeSimGetToolInfo( string& sName, double& dSpeed)
return pMachMgr->SimGetToolInfo( sName, dSpeed) ;
}
//-----------------------------------------------------------------------------
bool
ExeSimGetOperationInfo( string& sName, int& nType)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero dati della operazione
return pMachMgr->SimGetOperationInfo( sName, nType) ;
}
//-----------------------------------------------------------------------------
bool
ExeSimGetMoveInfo( int& nGmove, double& dFeed)
BIN
View File
Binary file not shown.
+23
View File
@@ -2623,6 +2623,28 @@ LuaSimGetToolInfo( lua_State* L)
return 2 ;
}
//-------------------------------------------------------------------------------
static int
LuaSimGetOperationInfo( lua_State* L)
{
// nessun parametro
LuaClearStack( L) ;
// recupero nome e tipo dell'operazione corrente
string sName ;
int nType ;
bool bOk = ExeSimGetOperationInfo( sName, nType) ;
// restituisco il risultato
if ( bOk) {
LuaSetParam( L, sName) ;
LuaSetParam( L, nType) ;
}
else {
LuaSetParam( L) ;
LuaSetParam( L) ;
}
return 2 ;
}
//-------------------------------------------------------------------------------
static int
LuaSimGetMoveInfo( lua_State* L)
@@ -3442,6 +3464,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSimHome", LuaSimHome) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetAxisInfoPos", LuaSimGetAxisInfoPos) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetToolInfo", LuaSimGetToolInfo) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetOperationInfo", LuaSimGetOperationInfo) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimGetMoveInfo", LuaSimGetMoveInfo) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimSetStep", LuaSimSetStep) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimStop", LuaSimStop) ;