Beispiel #1
0
 /// <summary>
 /// 以OPCConfig初始化SZOPCReader实例
 /// </summary>
 /// <param name="config"></param>
 public OpcReader(OpcConfig config)
 {
     //Init
     Config = config;
     //Connect
     base.HostIP = Config.IP;
     base.ServerName = Config.ServerName;
 }
Beispiel #2
0
 /// <summary>
 /// 以OPCConfig初始化SZOPCReader实例
 /// </summary>
 /// <param name="config"></param>
 public OpcReader(OpcConfig config)
 {
     //Init
     Config = config;
     //Connect
     base.HostIP     = Config.IP;
     base.ServerName = Config.ServerName;
 }
Beispiel #3
0
 /// <summary>
 /// 进行配置文件解析
 /// </summary>
 /// <returns>包含配置信息的OPCConfig</returns>
 private OpcConfig Configure()
 {
     configXml   = XElement.Load(filename);
     opcInfos    = from xml in configXml.Descendants("opcInfo").Where(t => t.Attribute((XName)"type").Value == type) select xml;
     result      = new OpcConfig();
     result.Type = type;
     GetIP();
     GetServerName();
     GetGroup();
     GetRawDataProcessor();
     return(result);
 }
Beispiel #4
0
 /// <summary>
 /// 进行配置文件解析
 /// </summary>
 /// <returns>包含配置信息的OPCConfig</returns>
 private OpcConfig Configure()
 {
     configXml = XElement.Load(filename);
     opcInfos = from xml in configXml.Descendants("opcInfo").Where(t => t.Attribute((XName)"type").Value == type) select xml;
     result = new OpcConfig();
     result.Type = type;
     GetIP();
     GetServerName();
     GetGroup();
     GetRawDataProcessor();
     return result;
 }
Beispiel #5
0
 public PhListener(OpcConfig config)
     : base(config)
 {
 }
Beispiel #6
0
 /// <summary>
 /// 使用OPCConfig来初始化新的OPCListener实例
 /// </summary>
 /// <param name="config"></param>
 public OpcListener(OpcConfig config)
     : base(config)
 {
 }
Beispiel #7
0
 public GeneralListener(OpcConfig config)
     : base(config)
 {
 }