#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(); virtual void InitSignal(SignalStateWrapper* ssw, void* cc) = 0; virtual void InitSysParam(SysParamWrapper* spw, void* cc) = 0; 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; };