EgtInterface 1.6j3 :

- aggiornamento interfaccia per gestione DB utensili
- migliorie a simulazione e gestione macchina corrente
- aggiunta funzione per installare gestione eventi di interfaccia.
This commit is contained in:
Dario Sassi
2015-10-27 10:16:37 +00:00
parent b268a46d68
commit 888b409cfa
3 changed files with 140 additions and 0 deletions
+133
View File
@@ -20,6 +20,7 @@
using namespace std ;
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtInitMachMgr( const wchar_t* wsMachinesDir)
@@ -27,6 +28,17 @@ __stdcall EgtInitMachMgr( const wchar_t* wsMachinesDir)
return ( ExeInitMachMgr( wstrztoA( wsMachinesDir)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
// Machines
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSetCurrMachine( const wchar_t* wsMachineName)
{
return ( ExeSetCurrMachine( wstrztoA( wsMachineName)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
// Machining Groups
//-----------------------------------------------------------------------------
int
__stdcall EgtGetMachGroupCount( void)
@@ -103,6 +115,8 @@ __stdcall EgtGetCurrMachGroup( void)
return ExeGetCurrMachGroup() ;
}
//-----------------------------------------------------------------------------
// Raw Parts
//-----------------------------------------------------------------------------
int
__stdcall EgtGetRawPartCount( void)
@@ -181,6 +195,8 @@ __stdcall EgtRemovePartFromRawPart( int nPartId)
return ( ExeRemovePartFromRawPart( nPartId) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
// Table & Fixtures
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSetTable( const wchar_t* wsTable)
@@ -222,6 +238,116 @@ __stdcall EgtShowOnlyTable( bool bVal)
return ( ExeShowOnlyTable( bVal) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
// Tools DataBase
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbAddTool( const wchar_t* wsName, int nType)
{
return ( ExeTdbAddTool( wstrztoA( wsName), nType) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbCopyTool( const wchar_t* wsSource, const wchar_t* wsName)
{
return ( ExeTdbCopyTool( wstrztoA( wsSource), wstrztoA( wsName)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbRemoveTool( const wchar_t* wsName)
{
return ( ExeTdbRemoveTool( wstrztoA( wsName)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbGetFirstTool( int nFamily, wchar_t*& wsName, int* pnType)
{
if ( &wsName == nullptr || pnType == nullptr)
return FALSE ;
string sName ;
if ( ! ExeTdbGetFirstTool( nFamily, sName, *pnType))
return FALSE ;
wsName = _wcsdup( stringtoW( sName)) ;
return (( wsName == nullptr) ? FALSE : TRUE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbGetNextTool( int nFamily, wchar_t*& wsName, int* pnType)
{
if ( &wsName == nullptr || pnType == nullptr)
return FALSE ;
string sName ;
if ( ! ExeTdbGetNextTool( nFamily, sName, *pnType))
return FALSE ;
wsName = _wcsdup( stringtoW( sName)) ;
return (( wsName == nullptr) ? FALSE : TRUE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbSetToolParamInt( const wchar_t* wsName, int nType, int nVal)
{
return ( ExeTdbSetToolParam( wstrztoA( wsName), nType, nVal) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbSetToolParamDouble( const wchar_t* wsName, int nType, double dVal)
{
return ( ExeTdbSetToolParam( wstrztoA( wsName), nType, dVal) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbSetToolParamString( const wchar_t* wsName, int nType, const wchar_t* wsVal)
{
return ( ExeTdbSetToolParam( wstrztoA( wsName), nType, wstrztoA( wsVal)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbGetToolParamInt( const wchar_t* wsName, int nType, int* pnVal)
{
if ( pnVal == nullptr)
return FALSE ;
return ( ExeTdbGetToolParam( wstrztoA( wsName), nType, *pnVal) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbGetToolParamDouble( const wchar_t* wsName, int nType, double* pdVal)
{
if ( pdVal == nullptr)
return FALSE ;
return ( ExeTdbGetToolParam( wstrztoA( wsName), nType, *pdVal) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbGetToolParamString( const wchar_t* wsName, int nType, wchar_t*& wsVal)
{
if ( &wsVal == nullptr)
return FALSE ;
string sVal ;
if ( ! ExeTdbGetToolParam( wstrztoA( wsName), nType, sVal))
return FALSE ;
wsVal = _wcsdup( stringtoW( sVal)) ;
return (( wsVal == nullptr) ? FALSE : TRUE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbSave( void)
{
return ( ExeTdbSave() ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
// Simulation
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSimStart( void)
@@ -236,6 +362,13 @@ __stdcall EgtSimMove( void)
return ( ExeSimMove() ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSimHome( void)
{
return ( ExeSimHome() ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSimSetStep( double dStep)