2024-04-09 16:53:02 +08:00

45 lines
1.0 KiB
C++

#pragma once
#include "../config/bean/IOCfg.h"
#include "../config/bean/SystemBase.h"
#include "../plc/SysParam.h"
#include "../plc/SignalState.h"
#include "../LanguageManager.h"
class Machine {
public:
Machine(MachineTypeCfg::MachineTypeId type);
virtual ~Machine();
static Machine* CreateInstance(int type);
//void SetIO (IOCfgWrapper* io){
// m_IOCfgWrapper = io;
//}
void Init();
void SetAxisAndSignal(SysParamWrapper* sysParamWrapper, AxisRecordWrapper* axisRecordWrapper/*, PLCAxis* axis*/)
{
m_SysParamWrapper = sysParamWrapper;
m_AxisRecordWrapper = axisRecordWrapper;
/*m_Axis = axis;*/
}
virtual void CheckIO() {}
void DrawIO(bool* isShow);
virtual void DrawAnalogExt();
protected:
MachineTypeCfg::MachineTypeId m_Type;
SysParamWrapper* m_SysParamWrapper;
AxisRecordWrapper* m_AxisRecordWrapper;
SignalStateWrapper* m_SignalStateWrapper;
SignalState m_SignalState;
void* m_PLC; //wxxtest
//AlarmCfgWrapper* m_AlarmCfgWrapper;
IOCfgWrapper* m_IOCfgWrapper;
RunCfg* m_RunCfg;
//PLCAxis* m_Axis;
};