|
|
|
@ -9,8 +9,6 @@
|
|
|
|
|
using IEC61850.SCL.DataModel;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Runtime.InteropServices.ComTypes;
|
|
|
|
|
using System.Xml.Linq;
|
|
|
|
|
|
|
|
|
|
namespace IEC61850.SCL
|
|
|
|
|
{
|
|
|
|
@ -228,7 +226,7 @@ namespace IEC61850.SCL
|
|
|
|
|
else
|
|
|
|
|
output.Write("0 ");
|
|
|
|
|
|
|
|
|
|
if(smv.SclSMVControl.SmpRate != -1)
|
|
|
|
|
if (smv.SclSMVControl.SmpRate != -1)
|
|
|
|
|
output.Write(smv.SclSMVControl.SmpRate + " ");
|
|
|
|
|
else
|
|
|
|
|
output.Write("0 ");
|
|
|
|
@ -296,7 +294,7 @@ namespace IEC61850.SCL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(lcb.SclLogControl.IntgPd is null)
|
|
|
|
|
if (lcb.SclLogControl.IntgPd is null)
|
|
|
|
|
output.Write("0 ");
|
|
|
|
|
else
|
|
|
|
|
output.Write(lcb.SclLogControl.IntgPd + " ");
|
|
|
|
@ -440,7 +438,7 @@ namespace IEC61850.SCL
|
|
|
|
|
{
|
|
|
|
|
DataObject parentObject = null;
|
|
|
|
|
|
|
|
|
|
while(!(dataAttribute.Parent is DataObject))
|
|
|
|
|
while (!(dataAttribute.Parent is DataObject))
|
|
|
|
|
{
|
|
|
|
|
dataAttribute = dataAttribute.Parent as DataAttribute;
|
|
|
|
|
}
|
|
|
|
@ -482,9 +480,9 @@ namespace IEC61850.SCL
|
|
|
|
|
SclDAI getDAIInternal(SclSDI sclSDI, DataAttribute dataAttribute)
|
|
|
|
|
{
|
|
|
|
|
SclDAI returnValue = null;
|
|
|
|
|
foreach(SclDAI sclDAI1 in sclSDI.SclDAIs)
|
|
|
|
|
foreach (SclDAI sclDAI1 in sclSDI.SclDAIs)
|
|
|
|
|
{
|
|
|
|
|
if(sclDAI1.Name == dataAttribute.Name)
|
|
|
|
|
if (sclDAI1.Name == dataAttribute.Name)
|
|
|
|
|
{
|
|
|
|
|
if (dataAttribute.ObjRef.EndsWith("." + sclSDI.Name + "." + sclDAI1.Name))
|
|
|
|
|
{
|
|
|
|
@ -520,10 +518,10 @@ namespace IEC61850.SCL
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
foreach (SclSDI sclSDI in sclSDI1.SclSDIs)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
string fValue = getSDIValue(dataAttribute, sclSDI);
|
|
|
|
|
if (fValue != null)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
value = fValue;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -567,7 +565,7 @@ namespace IEC61850.SCL
|
|
|
|
|
string getObjRef(string initialString, SclSDI sclSDI)
|
|
|
|
|
{
|
|
|
|
|
object parent = sclSDI.Parent;
|
|
|
|
|
while(!(parent is SclDOI))
|
|
|
|
|
while (!(parent is SclDOI))
|
|
|
|
|
{
|
|
|
|
|
SclSDI sclSDI1 = parent as SclSDI;
|
|
|
|
|
parent = sclSDI1.Parent;
|
|
|
|
@ -658,16 +656,16 @@ namespace IEC61850.SCL
|
|
|
|
|
|
|
|
|
|
foreach (SclDOI sclDOI1 in logicalNode.SclElement.DOIs)
|
|
|
|
|
{
|
|
|
|
|
foreach(SclSDI sclSDI in sclDOI1.SclSDIs)
|
|
|
|
|
foreach (SclSDI sclSDI in sclDOI1.SclSDIs)
|
|
|
|
|
{
|
|
|
|
|
returnSDI = getSDI(logicalNode, dataObject, sclSDI);
|
|
|
|
|
if(returnSDI != null)
|
|
|
|
|
if (returnSDI != null)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(returnSDI != null)
|
|
|
|
|
if (returnSDI != null)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -694,7 +692,7 @@ namespace IEC61850.SCL
|
|
|
|
|
|
|
|
|
|
SclDOI sclDOI = logicalNode.SclElement.DOIs.Find(x => x.Name == dataObject.Name);
|
|
|
|
|
|
|
|
|
|
if(sclDOI == null)
|
|
|
|
|
if (sclDOI == null)
|
|
|
|
|
{
|
|
|
|
|
sclDOI = getSDO(logicalNode, dataObject);
|
|
|
|
|
}
|
|
|
|
|