8bc0e986b2
- esecutore e lua scorporato in EgtExecutor.
105 lines
3.0 KiB
C++
105 lines
3.0 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2015
|
|
//----------------------------------------------------------------------------
|
|
// File : API_MachMgr.cpp Data : 23.03.15 Versione : 1.6c8
|
|
// Contenuto : Funzioni Machining Manager per API.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 23.03.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "API.h"
|
|
#include "/EgtDev/Include/EInAPI.h"
|
|
#include "/EgtDev/Include/EXeExecutor.h"
|
|
#include "/EgtDev/Include/EGnStringConverter.h"
|
|
|
|
using namespace std ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtInitMachMgr( const wchar_t* wsMachinesDir)
|
|
{
|
|
return ( ExeInitMachMgr( wstrztoA( wsMachinesDir)) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtGetMachGroupNbr( void)
|
|
{
|
|
return ExeGetMachGroupNbr() ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtGetFirstMachGroup( void)
|
|
{
|
|
return ExeGetFirstMachGroup() ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtGetNextMachGroup( int nId)
|
|
{
|
|
return ExeGetNextMachGroup( nId) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtAddMachGroup( const wchar_t* wsName, const wchar_t* wsMachineName)
|
|
{
|
|
return ExeAddMachGroup( wstrztoA( wsName), wstrztoA( wsMachineName)) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtRemoveMachGroup( int nMGroupId)
|
|
{
|
|
return ( ExeRemoveMachGroup( nMGroupId) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtGetMachGroupName( int nMGroupInd, wchar_t*& wsName)
|
|
{
|
|
if ( &wsName == nullptr)
|
|
return FALSE ;
|
|
string sName ;
|
|
if ( ! ExeGetMachGroupName( nMGroupInd, sName))
|
|
return FALSE ;
|
|
wsName = _wcsdup( stringtoW( sName)) ;
|
|
return (( wsName == nullptr) ? FALSE : TRUE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtGetMachGroupId( const wchar_t* wsName)
|
|
{
|
|
return ExeGetMachGroupId( wstrztoA( wsName)) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtSetCurrMachGroup( int nMGroupId)
|
|
{
|
|
return ( ExeSetCurrMachGroup( nMGroupId) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtResetCurrMachGroup( void)
|
|
{
|
|
return ( ExeResetCurrMachGroup() ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtGetCurrMachGroup( void)
|
|
{
|
|
return ExeGetCurrMachGroup() ;
|
|
}
|