Files
CPXV2/SystemX.Net.CP.Platform/SystemX.PLC/PLCInstanciation.cs
2024-06-26 10:30:00 +09:00

34 lines
904 B
C#

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;
}
}
}
}