From 50abc1ee168dc8b61aac3dc309b970d192f5bdc6 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 16 Nov 2015 08:20:32 +0000 Subject: [PATCH] Include : - aggiornamenti. --- EInAPI.h | 2 ++ EMkMachMgr.h | 1 + EMkMachiningConst.h | 22 ++++++++-------------- EMkOperationConst.h | 26 ++++++++++++++++++-------- EXeExecutor.h | 4 ++++ 5 files changed, 33 insertions(+), 22 deletions(-) diff --git a/EInAPI.h b/EInAPI.h index eea39ad..966e365 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -51,6 +51,8 @@ EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ; EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg) ; typedef int (__stdcall * pfProcEvents) (int, int) ; EIN_EXPORT BOOL __stdcall EgtSetProcessEvents( pfProcEvents pFun) ; +typedef BOOL (__stdcall * pfOutTextW) (wchar_t*&) ; +EIN_EXPORT BOOL __stdcall EgtSetOutText( pfOutTextW pFun) ; // UiUnits EIN_EXPORT BOOL __stdcall EgtSetUiUnits( BOOL bMM) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index 69da879..39f43c1 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -143,6 +143,7 @@ class __declspec( novtable) IMachMgr // Simulation virtual bool SimStart( void) = 0 ; virtual bool SimMove( void) = 0 ; + virtual bool SimGetAxisInfoPos( int nI, std::string& sName, double& dVal) = 0 ; virtual bool SimSetStep( double dStep) = 0 ; virtual bool SimStop( void) = 0 ; // Generation diff --git a/EMkMachiningConst.h b/EMkMachiningConst.h index 38fffed..4b8a5dc 100644 --- a/EMkMachiningConst.h +++ b/EMkMachiningConst.h @@ -13,25 +13,19 @@ #pragma once +#include "\EgtDev\Include\EMkOperationConst.h" #include //---------------------------------------------------------------------------- -// Tipologie di lavorazioni +// Tipologie di lavorazioni (derivano da tipologie di operazioni) enum MachiningType { - MT_NONE = 0, - MT_DRILLING = 256, - MT_SAWING = 512, - MT_MILLING = 1024, - MT_POCKETING = 2048, - MT_MORTISING = 4096 + MT_NONE = OPER_NULL, + MT_DRILLING = OPER_DRILLING, + MT_SAWING = OPER_SAWING, + MT_MILLING = OPER_MILLING, + MT_POCKETING = OPER_POCKETING, + MT_MORTISING = OPER_MORTISING } ; -// Controllo tipo valido -bool inline IsValidMachiningType( int nType) -{ - return ( nType == MT_DRILLING || nType == MT_SAWING || - nType == MT_MILLING || nType == MT_POCKETING || - nType == MT_MORTISING) ; -} //---------------------------------------------------------------------------- // Costanti famiglie di parametri ( i primi 12 bit (0-4095) restano liberi) diff --git a/EMkOperationConst.h b/EMkOperationConst.h index b4cc34a..f30d4c8 100644 --- a/EMkOperationConst.h +++ b/EMkOperationConst.h @@ -14,11 +14,21 @@ #pragma once //------------------------ Costanti per tipo Operazioni ----------------------- -const int OPER_GEN = 0x100 ; -const int OPER_MACH = 0x200 ; -enum OperType { OPER_NULL = 0, // nulla - OPER_DISP = OPER_GEN + 0, // disposizione (256) - OPER_DRILLING = OPER_MACH + 0, // foratura (512) - OPER_SAWING = OPER_MACH + 1, // taglio di lama (513) - OPER_MILLING = OPER_MACH + 2} ; // fresatura (514) - +enum OperType { OPER_NULL = 0, // nulla + OPER_DISP = 256, // disposizione ( 256) + OPER_DRILLING = 512, // foratura ( 512) + OPER_SAWING = 1024, // taglio di lama (1024) + OPER_MILLING = 2048, // fresatura (2048) + OPER_POCKETING = 4096, // svuotatura (4096) + OPER_MORTISING = 8192} ; // mortasatura (8192) +// Controllo tipo valido +bool inline IsValidDispositionType( int nType) +{ + return ( nType == OPER_DISP) ; +} +bool inline IsValidMachiningType( int nType) +{ + return ( nType == OPER_DRILLING || nType == OPER_SAWING || + nType == OPER_MILLING || nType == OPER_POCKETING || + nType == OPER_MORTISING) ; +} diff --git a/EXeExecutor.h b/EXeExecutor.h index aba5391..aa0ce52 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -51,6 +51,8 @@ EXE_EXPORT bool ExeGetMemoryInfo( std::string& sMem) ; EXE_EXPORT bool ExeOutLog( const std::string& sMsg) ; typedef int (__stdcall * pfProcEvents) (int, int) ; EXE_EXPORT bool ExeSetProcessEvents( pfProcEvents pFun) ; +typedef bool (__stdcall * pfOutText) ( const std::string&) ; +EXE_EXPORT bool ExeSetOutText( pfOutText pFun) ; // UiUnits EXE_EXPORT bool ExeSetUiUnits( bool bMM) ; @@ -552,6 +554,7 @@ EXE_EXPORT int ExeGetOperationType( int nId) ; EXE_EXPORT bool ExeRemoveAllOperations( void) ; // Machinings EXE_EXPORT int ExeAddMachining( const std::string& sName, const std::string& sMachining) ; +EXE_EXPORT bool ExeSetCurrMachining( int nId) ; EXE_EXPORT bool ExeSetMachiningParam( int nType, bool bVal) ; EXE_EXPORT bool ExeSetMachiningParam( int nType, int nVal) ; EXE_EXPORT bool ExeSetMachiningParam( int nType, double dVal) ; @@ -562,6 +565,7 @@ EXE_EXPORT bool ExeApplyMachining( void) ; EXE_EXPORT bool ExeSimStart( void) ; EXE_EXPORT bool ExeSimMove( void) ; EXE_EXPORT bool ExeSimHome( void) ; +EXE_EXPORT bool ExeSimGetAxisInfoPos( int nI, std::string& sName, double& dVal) ; EXE_EXPORT bool ExeSimSetStep( double dStep) ; EXE_EXPORT bool ExeSimStop( void) ; // Generation