From 18db0cb9c946052d6e0e2f010645d322c01e36db Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 16 Nov 2015 08:17:46 +0000 Subject: [PATCH] EgtExecutor 1.6k6 : - aggiunta funzione per gestione info e posizione assi in simulazione - aggiunta gestione callback per output testi. --- EXE.h | 3 +++ EXE_General.cpp | 19 +++++++++++++++++++ EXE_MachMgr.cpp | 20 ++++++++++++++++++++ EgtExecutor.rc | Bin 11694 -> 11694 bytes LUA_General.cpp | 16 ++++++++++++++++ LUA_MachMgr.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 6 files changed, 102 insertions(+), 3 deletions(-) diff --git a/EXE.h b/EXE.h index 8076c35..7b5df28 100644 --- a/EXE.h +++ b/EXE.h @@ -24,3 +24,6 @@ bool IsCmdLog( void) ; //---------------------------------------------------------------------------- int ProcessEvents( int nProg, int nPause) ; + +//---------------------------------------------------------------------------- +bool OutText( const std::string& sText) ; diff --git a/EXE_General.cpp b/EXE_General.cpp index aa99d8b..910742a 100644 --- a/EXE_General.cpp +++ b/EXE_General.cpp @@ -40,6 +40,7 @@ static bool s_bCmdLog = false ; static Logger* s_pCmdLog = nullptr ; static string s_sKey ; static pfProcEvents s_pFunProcEvents = nullptr ; +static pfOutText s_pFunOutText = nullptr ; //----------------------------------------------------------------------------- bool @@ -335,6 +336,14 @@ ExeSetProcessEvents( pfProcEvents pFun) return ( pFun != nullptr) ; } +//----------------------------------------------------------------------------- +bool +ExeSetOutText( pfOutText pFun) +{ + s_pFunOutText = pFun ; + return ( pFun != nullptr) ; +} + //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -376,3 +385,13 @@ ProcessEvents( int nProg, int nPause) else return 0 ; } + +//----------------------------------------------------------------------------- +bool +OutText( const string& sText) +{ + if ( s_pFunOutText != nullptr) + return s_pFunOutText( sText) ; + else + return false ; +} diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index aee4722..130cbaa 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -1050,6 +1050,16 @@ ExeAddMachining( const string& sName, const std::string& sMachining) return pGseCtx->m_pMachMgr->AddMachining( sName, sMachining) ; } +//----------------------------------------------------------------------------- +bool +ExeSetCurrMachining( int nId) +{ + GseContext* pGseCtx = GetCurrGseContext() ; + VERIFY_CTX_MACHMGR( pGseCtx, false) + // imposto la lavorazione di identificativo Id come corrnte + return pGseCtx->m_pMachMgr->SetCurrMachining( nId) ; +} + //----------------------------------------------------------------------------- bool ExeSetMachiningParam( int nType, bool bVal) @@ -1142,6 +1152,16 @@ ExeSimHome( void) return pGseCtx->m_pMachMgr->ResetAllAxesPos() ; } +//----------------------------------------------------------------------------- +bool +ExeSimGetAxisInfoPos( int nI, std::string& sName, double& dVal) +{ + GseContext* pGseCtx = GetCurrGseContext() ; + VERIFY_CTX_MACHMGR( pGseCtx, false) + // recupero stringa con quote degli assi attivi + return pGseCtx->m_pMachMgr->SimGetAxisInfoPos( nI, sName, dVal) ; +} + //----------------------------------------------------------------------------- bool ExeSimSetStep( double dStep) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 6903ce5b756382ac792016e16268775cd4b2b55d..1a687c127408e701a40db54c0112ccf39e084577 100644 GIT binary patch delta 105 zcmZ1%y)JsgA2vp_%@@V4Gflq2nKwB}L}GFQr`YBKt{N7g_(8eLOp^}?BE$`p+!!}6 e64qk|YjR~q(%{Fqd6G0(;-H)(Lc&0)jvD~(JR=+c delta 97 zcmZ1%y)JsgA2vqQ%@@V4Gflq2na5~4Ignd-a{*Tk3sCf++-0W82LxfF21;&>n->Y| cF@rU@0x76sKgP|Iq`|@m