[성현모] CPXV2 Init
This commit is contained in:
33
SystemX.Net.CP.Platform/SystemX.PLC/PLCInstanciation.cs
Normal file
33
SystemX.Net.CP.Platform/SystemX.PLC/PLCInstanciation.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SystemX.PLC.Interface;
|
||||
using SystemX.PLC.Interface.McProtocol;
|
||||
using SystemX.PLC.Interface.MxComponent;
|
||||
|
||||
namespace SystemX.PLC
|
||||
{
|
||||
public enum ConnectionType
|
||||
{
|
||||
Mitsubishi_McProtocol = 0,
|
||||
Mitsubishi_MxComponent
|
||||
}
|
||||
|
||||
public static class PLCInstanciation
|
||||
{
|
||||
public static PLCCommManager CreatePLCCommManager(ConnectionType type, string strConfigFilePath)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case ConnectionType.Mitsubishi_McProtocol:
|
||||
return new PLCCommMcPMgr(strConfigFilePath);
|
||||
case ConnectionType.Mitsubishi_MxComponent:
|
||||
return new PLCCommMxCMgr(strConfigFilePath);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user