public ConnectedAPRef(SCL scl, int subnetwork, int cap_index, int ied_index, int ap_index) { this.scl = scl; this.sn_index = subnetwork; this.cap_index = cap_index; this.ied_index = ied_index; this.ap_index = ap_index; }
ImportIED(SCL conf) { if (conf == null) { return(null); } if (conf.IED == null) { return(null); } string now = System.DateTime.Now.ToString(); // Add Types, if one template already exist it is ignored if (conf.DataTypeTemplates != null) { this.DataTypeTemplates.AddLNodeTypeArray(conf.DataTypeTemplates.LNodeType); this.DataTypeTemplates.AddDOType(conf.DataTypeTemplates.DOType); this.DataTypeTemplates.AddDAType(conf.DataTypeTemplates.DAType); this.DataTypeTemplates.AddEnumType(conf.DataTypeTemplates.EnumType); } // Subnetworks if (this.Communication != null) { if (this.Communication.SubNetwork != null) { if (conf.Communication != null) { this.Communication.AddSubNetworkArray(conf.Communication.SubNetwork); } } else { this.Communication.SubNetwork = conf.Communication.SubNetwork; } } else { this.Communication = conf.Communication; } // Add IEDs, only new IED are added, if not, they are ignored System.Collections.Generic.List <tIED> ignored = this.AddIED(conf.IED, conf.Header.version, conf.Header.revision); // Update Revision number due to IEDs added this.Header.UpdateRevision(); // History items if (this.Header != null) { if (this.Header.History != null) { if (conf.Header != null) { if (conf.Header.History != null) { if (conf.Header.History.Length > 0) { if (conf.Header.History[0] != null) { string why = "[ImpSC;Strc:" + conf.Header.nameStructure + ";id:" + conf.Header.id + ";V:" + conf.Header.version + ";R:" + conf.Header.revision + "]"; this.Header.AddHistoryItem(conf.Header.History, why); } } } } } } else { this.Header = conf.Header; } return(ignored); }