public void CreateIED(SCL sCL, TreeNode nodeSCL) { tIED iED = new tIED(); iED.configVersion = "0"; this.objectManagement.AddObjectToArrayObjectOfParentObject(iED, sCL); tAccessPoint accessPoint = new tAccessPoint(); this.objectManagement.AddObjectToArrayObjectOfParentObject(accessPoint, iED); accessPoint.Server = new tServer(); accessPoint.Server.Authentication = new tServerAuthentication(); tLDevice lDevice = new tLDevice(); this.objectManagement.AddObjectToArrayObjectOfParentObject(lDevice, accessPoint.Server); lDevice.LN0 = new LN0(); tLN lN = new tLN(); lN.lnType = "LPHD1"; lN.inst = 1; lN.lnClass = tLNClassEnum.LPHD.ToString(); lDevice.AddLN(lN); this.treeViewSCL.GetNodesItemOfArray(sCL.IED, sCL.GetType(), nodeSCL.TreeView.Nodes["root"].Nodes["SCL"]); this.CreatingDependenciesLN(sCL, sCL.IED[sCL.IED.Length - 1].AccessPoint[0].Server .LDevice[0].LN0, nodeSCL.TreeView.Nodes["root"].Nodes["SCL"] .Nodes["tIED[]"].Nodes[sCL.IED.Length - 1].Nodes["tAccessPoint[]"] .Nodes[0].Nodes["tServer"].Nodes["tLDevice[]"].Nodes[0].Nodes["LN0"]); this.CreatingDependenciesLN(sCL, sCL.IED[sCL.IED.Length - 1].AccessPoint[0].Server .LDevice[0].LN[0], nodeSCL.TreeView.Nodes["root"].Nodes["SCL"] .Nodes["tIED[]"].Nodes[sCL.IED.Length - 1].Nodes["tAccessPoint[]"] .Nodes[0].Nodes["tServer"].Nodes["tLDevice[]"].Nodes[0].Nodes["tLN[]"].Nodes[0]); }
/// <summary> /// This method sets and gets the FCDA of an LN. /// </summary> /// <param name="ldInst"> /// Attribute "inst" that belongs to LDevice class, it is used on the FCDA class. /// </param> /// <param name="lN"> /// Logical node selected where FCDA will be assigned. /// </param> /// <param name="dataTypeTemplates"> /// DataTypeTemplates Node of the SCL project. This node is used to create and assign the information /// to the Logical Node. /// </param> /// <returns> /// It returns the FCDA of the logical Node selected. /// </returns> public tDataSet GetLNFCDAs(tLDevice ld, tLN lN, tDataTypeTemplates dataTypeTemplates) { this.ldevice = ld; this.ldInst = ld.inst; //this.objectManagement = new ObjectManagement(); this.prefix = lN.prefix; this.lnClass = lN.lnClass; this.lnInst = lN.inst.ToString(); this.lnType = lN.lnType; this.CreateFCDAs(lN, dataTypeTemplates); return(this.dataSet); }