Files
EgtMachKernel/SetupMgr.h
T
DarioS e10933bbad EgtMachKernel 2.3f1 :
- allo script OnSetupHead aggiunto dato noto EMC.TCPOS.
2021-06-11 08:01:02 +02:00

65 lines
2.7 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2017-2017
//----------------------------------------------------------------------------
// File : SetupMgr.h Data : 18.01.17 Versione : 1.6x8
// Contenuto : Dichiarazione della classe ToolsMgr.
//
//
//
// Modifiche : 18.01.17 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EgtStringBase.h"
class MachMgr ;
class IGeomDB ;
class Machine ;
//----------------------------------------------------------------------------
struct SetupData
{
std::string m_sTcPos ; // posizione in macchina
std::string m_sHead ; // testa macchina
int m_nExit ; // uscita sulla testa
std::string m_sTuuid ; // identificativo universale dell'utensile
std::string m_sName ; // nome dell'utensile attrezzato
SetupData( void) : m_nExit( 0) {}
SetupData( const std::string& sTcPos, const std::string& sHead, int nExit, const std::string& Tuuid, const std::string& sName)
{ m_sTcPos = sTcPos ; m_sHead = sHead ; m_nExit = nExit ; m_sTuuid = Tuuid ; m_sName = sName ; }
} ;
//----------------------------------------------------------------------------
class SetupMgr
{
public :
SetupMgr( void) ;
bool Init( MachMgr* pMchMgr) ;
bool Reset( void) ;
bool Clear( void) ;
bool Load( void) ;
bool Save( void) const ;
bool Import( const std::string& sFileName) ;
bool Exists( void) const
{ return ! m_vStuData.empty() ; }
bool FindTool( const std::string& sName) const ;
bool GetPosData( int nPos, std::string& sTcPos, std::string& sHead, int& nExit, std::string& sName) const ;
bool GetToolData( const std::string& sName, std::string& sTcPos, std::string& sHead, int& nExit, int* pnPos = nullptr) const ;
bool GetToolSetupPos( const std::string& sName, std::string& sTcPos) const
{ std::string sH ; int nE ; return GetToolData( sName, sTcPos, sH, nE) ; }
bool GetToolName( const std::string& sHead, int nExit, std::string& sName) const ;
bool GetToolsInSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) const ;
private :
typedef std::vector< SetupData> STUDVECTOR ;
private :
MachMgr* m_pMchMgr ; // puntatore al gestore di tutte le lavorazioni
IGeomDB* m_pGeomDB ; // puntatore al DB geometrico
Machine* m_pMachine ; // puntatore alla macchina
STUDVECTOR m_vStuData ; // vettore dati di attrezzaggio
} ;