EgtMachKernel 1.6s2 :

- aggiunta funzione TdbGetToolFromUUID per avere nome utensile da UUID
- aggiunta funzione GetTable per avere nome tavola corrente.
This commit is contained in:
Dario Sassi
2016-07-02 15:02:23 +00:00
parent ae5d94cb33
commit 6065c07c98
4 changed files with 35 additions and 0 deletions
+21
View File
@@ -90,6 +90,27 @@ MachMgr::TdbGetNextTool( int nFamily, string& sName, int& nType) const
return pTsMgr->GetNextTool( nFamily, sName, nType) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetToolFromUUID( const string& sTuuid, string& sName) const
{
// pulisco il parametro di ritorno
sName.clear() ;
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// cerco l'utensile con l'UUID, se trovato ne restituisco il nome
EgtUUID Tuuid ;
if ( ! FromString( sTuuid, Tuuid))
return false ;
const ToolData* pTdata = pTsMgr->GetTool( Tuuid) ;
if ( pTdata == nullptr)
return false ;
sName = pTdata->m_sName ;
return true ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbSetCurrTool( const string& sName)