//---------------------------------------------------------------------------- // EgalTech 2015-2024 //---------------------------------------------------------------------------- // File : Simulator.h Data : 01.09.24 Versione : 2.6i1 // Contenuto : Dichiarazione della classe interfaccia ISimulator. // // // // Modifiche : 01.09.24 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "/EgtDev/Include/EGkVector3d.h" #include "/EgtDev/Include/EMkSimuGenConst.h" #include "/EgtDev/Include/EgtNumCollection.h" #include class MachMgr ; //------------------------ Struttura per movimento esterno assi -------------- struct SimAxMv { std::string sName ; double dEndPos ; double dStep ; SimAxMv( void) : dEndPos( 0), dStep( 0) { } SimAxMv( std::string sN, double dE, double dS) : sName( sN), dEndPos( dE), dStep( dS) {} } ; typedef std::vector SAMVECTOR ; //------------------------ Risultato movimento esterno assi ------------------- enum SimAxMvRes { SIM_AXMV_RES_STOP = -1, SIM_AXMV_RES_ERR = 0, SIM_AXMV_RES_OK = 1} ; //---------------------------------------------------------------------------- class __declspec( novtable) ISimulator { public : virtual ~ISimulator( void) {} virtual bool Init( MachMgr* pMchMgr) = 0 ; virtual bool Start( bool bFirst) = 0 ; virtual bool Move( int& nStatus) = 0 ; virtual bool GoHome( void) = 0 ; virtual bool SetStep( double dStep) = 0 ; virtual bool SetUiStatus( int nUiStatus) = 0 ; virtual bool GetAxisInfoPos( int nI, std::string& sName, std::string& sToken, bool& bLinear, double& dVal) const = 0 ; virtual bool GetToolInfo( std::string& sName, double& dSpeed) const = 0 ; virtual bool GetOperationInfo( std::string& sName, int& nType) const = 0 ; virtual bool GetMoveInfo( int& nGmove, double& dFeed) const = 0 ; virtual bool AddCollisionObj( int nInd, bool bToolOn, int nFrameId, int nType, const Vector3d& vtMove, double dPar1, double dPar2, double dPar3) = 0 ; virtual bool RemoveCollisionObj( int nFrameId) = 0 ; virtual bool GetCollisionObj( int nPos, int& nInd, bool& bToolOn, int& nFrameId, int& nType, Vector3d& vtMove, double& dPar1, double& dPar2, double& dPar3) = 0 ; virtual bool ExecCollisionCheck( int& nCdInd, int& nObjInd, int nMoveType) = 0 ; virtual bool OnCollision( int nCdInd, int nObjInd, int& nErr) = 0 ; virtual bool SetToolForVmill( const std::string& sTool, const std::string& sHead, int nExit, int nFlag, double dPar1, double dPar2, const INTVECTOR& vVmill, bool bFirst) = 0 ; virtual bool EnableToolsForVmill( bool bEnable) = 0 ; virtual bool EnableToolTipTrace( bool bEnable) = 0 ; virtual int MoveAxes( int nMoveType, const SAMVECTOR& vAxNaEpSt) = 0 ; virtual bool SaveCmd( int nType, int nPar, const std::string& sPar, const std::string& sPar2) = 0 ; } ;