EgtMachKernel 1.6j4 :

- modifiche a DB utensili per gestione utensile corrente
- prima versione generatore codice.
This commit is contained in:
Dario Sassi
2015-10-31 09:45:57 +00:00
parent a4525dd059
commit 2324a8b3f4
22 changed files with 835 additions and 184 deletions
+94 -82
View File
@@ -18,6 +18,18 @@
using namespace std ;
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetToolNewName( string& sName)
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// verifico nome ed eventualmente lo modifico per renderlo nuovo
return pTsMgr->GetToolNewName( sName) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbAddTool( const string& sName, int nType)
@@ -80,98 +92,98 @@ MachMgr::TdbGetNextTool( int nFamily, string& sName, int& nType)
//----------------------------------------------------------------------------
bool
MachMgr::TdbSetToolParam( const string& sName, int nType, int nVal)
{
// recupero l'utensile
ToolData* pTdata = TdbGetToolData( sName) ;
if ( pTdata == nullptr)
return false ;
// assegno il parametro
return pTdata->SetParam( nType, nVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbSetToolParam( const string& sName, int nType, double dVal)
{
// recupero l'utensile
ToolData* pTdata = TdbGetToolData( sName) ;
if ( pTdata == nullptr)
return false ;
// assegno il parametro
return pTdata->SetParam( nType, dVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbSetToolParam( const string& sName, int nType, const string& sVal)
{
// recupero l'utensile
ToolData* pTdata = TdbGetToolData( sName) ;
if ( pTdata == nullptr)
return false ;
// assegno il parametro
return pTdata->SetParam( nType, sVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetToolParam( const string& sName, int nType, int& nVal) const
{
// recupero l'utensile
const ToolData* pTdata = TdbGetToolData( sName) ;
if ( pTdata == nullptr)
return false ;
// recupero il parametro
return pTdata->GetParam( nType, nVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetToolParam( const string& sName, int nType, double& dVal) const
{
// recupero l'utensile
const ToolData* pTdata = TdbGetToolData( sName) ;
if ( pTdata == nullptr)
return false ;
// recupero il parametro
return pTdata->GetParam( nType, dVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetToolParam( const string& sName, int nType, string& sVal) const
{
// recupero l'utensile
const ToolData* pTdata = TdbGetToolData( sName) ;
if ( pTdata == nullptr)
return false ;
// recupero il parametro
return pTdata->GetParam( nType, sVal) ;
}
//----------------------------------------------------------------------------
ToolData*
MachMgr::TdbGetToolData( const string& sName)
MachMgr::TdbSetCurrTool( const string& sName)
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return nullptr ;
// recupero l'utensile
return pTsMgr->GetTool( sName) ;
return false ;
// imposto l'utensile corrente
return pTsMgr->SetCurrTool( sName) ;
}
//----------------------------------------------------------------------------
const ToolData*
MachMgr::TdbGetToolData( const string& sName) const
bool
MachMgr::TdbSaveCurrTool( void)
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return nullptr ;
// recupero l'utensile
return pTsMgr->GetTool( sName) ;
return false ;
// salvo l'utensile corrente
return pTsMgr->SaveCurrTool() ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbSetCurrToolParam( int nType, int nVal)
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// assegno il parametro
return pTsMgr->SetCurrToolParam( nType, nVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbSetCurrToolParam( int nType, double dVal)
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// assegno il parametro
return pTsMgr->SetCurrToolParam( nType, dVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbSetCurrToolParam( int nType, const string& sVal)
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// assegno il parametro
return pTsMgr->SetCurrToolParam( nType, sVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetCurrToolParam( int nType, int& nVal) const
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// recupero il parametro
return pTsMgr->GetCurrToolParam( nType, nVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetCurrToolParam( int nType, double& dVal) const
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// recupero il parametro
return pTsMgr->GetCurrToolParam( nType, dVal) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::TdbGetCurrToolParam( int nType, string& sVal) const
{
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return false ;
// recupero il parametro
return pTsMgr->GetCurrToolParam( nType, sVal) ;
}
//----------------------------------------------------------------------------
@@ -182,6 +194,6 @@ MachMgr::TdbSave( void) const
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
return nullptr ;
// recupero l'utensile
// salvo il db utensili
return pTsMgr->Save() ;
}