diff --git a/dotnet/IEC61850forCSharp/IEC61850forCSharp.csproj b/dotnet/IEC61850forCSharp/IEC61850forCSharp.csproj index e64649d..dc2a4dc 100644 --- a/dotnet/IEC61850forCSharp/IEC61850forCSharp.csproj +++ b/dotnet/IEC61850forCSharp/IEC61850forCSharp.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {C35D624E-5506-4560-8074-1728F1FA1A4D} Library iec61850dotnet diff --git a/dotnet/authenticate/authenticate.csproj b/dotnet/authenticate/authenticate.csproj index 4521ac5..09bbea2 100644 --- a/dotnet/authenticate/authenticate.csproj +++ b/dotnet/authenticate/authenticate.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {0BECEC77-2315-4B95-AFF9-E6007E644BBF} Exe authenticate diff --git a/dotnet/control/control.csproj b/dotnet/control/control.csproj index 28c7e79..c6a4e07 100644 --- a/dotnet/control/control.csproj +++ b/dotnet/control/control.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {C351CFA4-E54E-49A1-86CE-69643535541A} Exe control diff --git a/dotnet/datasets/datasets.csproj b/dotnet/datasets/datasets.csproj index 1b1240b..1780261 100644 --- a/dotnet/datasets/datasets.csproj +++ b/dotnet/datasets/datasets.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {D5C7DD38-032A-49B6-B74F-FFD9724A8AE4} Exe datasets diff --git a/dotnet/dotnet.sln b/dotnet/dotnet.sln index 9583a43..79e8b7f 100644 --- a/dotnet/dotnet.sln +++ b/dotnet/dotnet.sln @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IEC61850forCSharp", "IEC61850forCSharp\IEC61850forCSharp.csproj", "{C35D624E-5506-4560-8074-1728F1FA1A4D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example1", "example1\example1.csproj", "{C616A6DF-831E-443C-9310-3F343A6E3D1A}" @@ -27,6 +29,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "report_new_dataset", "repor EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log_client", "log_client\log_client.csproj", "{14C71267-2F38-460D-AA55-6803EE80AFB4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{0D2F61F1-A173-44E7-BFB0-B698A1D44D12}" + ProjectSection(SolutionItems) = preProject + .nuget\packages.config = .nuget\packages.config + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "server1", "server1\server1.csproj", "{9286D2AB-96ED-4631-AB3C-ED20FF5D6E6C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +70,10 @@ Global {77127456-19B9-4D1A-AEF9-40F8D1C5695E}.Debug|Any CPU.Build.0 = Debug|Any CPU {77127456-19B9-4D1A-AEF9-40F8D1C5695E}.Release|Any CPU.ActiveCfg = Release|Any CPU {77127456-19B9-4D1A-AEF9-40F8D1C5695E}.Release|Any CPU.Build.0 = Release|Any CPU + {9286D2AB-96ED-4631-AB3C-ED20FF5D6E6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9286D2AB-96ED-4631-AB3C-ED20FF5D6E6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9286D2AB-96ED-4631-AB3C-ED20FF5D6E6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9286D2AB-96ED-4631-AB3C-ED20FF5D6E6C}.Release|Any CPU.Build.0 = Release|Any CPU {9E29B4CE-EE5F-4CA6-85F6-5D1FF8B27BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9E29B4CE-EE5F-4CA6-85F6-5D1FF8B27BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU {9E29B4CE-EE5F-4CA6-85F6-5D1FF8B27BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -85,14 +98,8 @@ Global {FBDFE530-DBEB-474B-BA54-9AB287DD57B3}.Debug|Any CPU.Build.0 = Debug|Any CPU {FBDFE530-DBEB-474B-BA54-9AB287DD57B3}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBDFE530-DBEB-474B-BA54-9AB287DD57B3}.Release|Any CPU.Build.0 = Release|Any CPU - {740DC107-F506-416C-B145-F71649A4A5A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {740DC107-F506-416C-B145-F71649A4A5A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {740DC107-F506-416C-B145-F71649A4A5A0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {740DC107-F506-416C-B145-F71649A4A5A0}.Release|Any CPU.Build.0 = Release|Any CPU - {EDC263E3-0419-4B23-91A4-250EF0A6DD62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EDC263E3-0419-4B23-91A4-250EF0A6DD62}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EDC263E3-0419-4B23-91A4-250EF0A6DD62}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EDC263E3-0419-4B23-91A4-250EF0A6DD62}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 @@ -104,23 +111,6 @@ Global $2.TabsToSpaces = False $2.inheritsSet = VisualStudio $2.inheritsScope = text/plain - $2.scope = text/plain - $0.TextStylePolicy = $3 - $3.inheritsSet = null - $3.scope = text/microsoft-resx - $0.XmlFormattingPolicy = $4 - $4.inheritsSet = null - $4.scope = text/microsoft-resx - $0.TextStylePolicy = $5 - $5.inheritsSet = null - $5.scope = application/xml - $0.XmlFormattingPolicy = $6 - $6.inheritsSet = Mono - $6.inheritsScope = application/xml - $6.scope = application/xml - $0.StandardHeader = $7 - $7.Text = - $7.IncludeInNewFiles = True StartupItem = IEC61850forCSharp\IEC61850forCSharp.csproj EndGlobalSection GlobalSection(SolutionProperties) = preSolution diff --git a/dotnet/example1/example1.csproj b/dotnet/example1/example1.csproj index 087f4e6..453058e 100644 --- a/dotnet/example1/example1.csproj +++ b/dotnet/example1/example1.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {C616A6DF-831E-443C-9310-3F343A6E3D1A} Exe example1 diff --git a/dotnet/example2/example2.csproj b/dotnet/example2/example2.csproj index 18f5443..496e11c 100644 --- a/dotnet/example2/example2.csproj +++ b/dotnet/example2/example2.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {2A226B6D-1D1F-4BFE-B8CC-158116F71270} Exe example2 diff --git a/dotnet/example3/example3.csproj b/dotnet/example3/example3.csproj index 1274bc4..5328521 100644 --- a/dotnet/example3/example3.csproj +++ b/dotnet/example3/example3.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {5E5D0FE0-DF44-48D8-A10E-1FB07D34DEA2} Exe example3 diff --git a/dotnet/files/files.csproj b/dotnet/files/files.csproj index e78b862..2ecf30f 100644 --- a/dotnet/files/files.csproj +++ b/dotnet/files/files.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {77127456-19B9-4D1A-AEF9-40F8D1C5695E} Exe files diff --git a/dotnet/log_client/log_client.csproj b/dotnet/log_client/log_client.csproj index 2a8d37e..28c90c2 100644 --- a/dotnet/log_client/log_client.csproj +++ b/dotnet/log_client/log_client.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {14C71267-2F38-460D-AA55-6803EE80AFB4} Exe log_client diff --git a/dotnet/model_browsing/model_browsing.csproj b/dotnet/model_browsing/model_browsing.csproj index 40bd89b..0827b41 100644 --- a/dotnet/model_browsing/model_browsing.csproj +++ b/dotnet/model_browsing/model_browsing.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {59B85486-F48D-4978-BD35-8F5C3A8288D4} Exe model_browsing diff --git a/dotnet/report_new_dataset/report_new_dataset.csproj b/dotnet/report_new_dataset/report_new_dataset.csproj index b1eff69..b91d522 100644 --- a/dotnet/report_new_dataset/report_new_dataset.csproj +++ b/dotnet/report_new_dataset/report_new_dataset.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {71485F99-2976-45E6-B73D-4946E594C15C} Exe report_new_dataset diff --git a/dotnet/reporting/reporting.csproj b/dotnet/reporting/reporting.csproj index d4050d4..81a9d0e 100644 --- a/dotnet/reporting/reporting.csproj +++ b/dotnet/reporting/reporting.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {9E29B4CE-EE5F-4CA6-85F6-5D1FF8B27BF8} Exe reporting diff --git a/dotnet/server1/Program.cs b/dotnet/server1/Program.cs new file mode 100644 index 0000000..52d8fc1 --- /dev/null +++ b/dotnet/server1/Program.cs @@ -0,0 +1,55 @@ +using System; +using IEC61850.Server; +using IEC61850.Common; +using System.Threading; + +namespace server1 +{ + class MainClass + { + public static void Main (string[] args) + { + bool running = true; + + /* run until Ctrl-C is pressed */ + Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e) { + e.Cancel = true; + running = false; + }; + + IedModel iedModel = ConfigFileParser.CreateModelFromConfigFile ("../../model.cfg"); + + if (iedModel == null) { + Console.WriteLine ("No valid data model found!"); + return; + } + + DataObject spcso1 = (DataObject)iedModel.GetModelNodeByShortObjectReference ("GenericIO/GGIO1.SPCSO1"); + + IedServer iedServer = new IedServer (iedModel); + + iedServer.SetControlHandler (spcso1, delegate(DataObject controlObject, object parameter, MmsValue ctlVal, bool test) { + bool val = ctlVal.GetBoolean(); + + if (val) + Console.WriteLine("received binary control command: on"); + else + Console.WriteLine("received binary control command: off"); + + return ControlHandlerResult.OK; + }, null); + + iedServer.Start (102); + Console.WriteLine ("Server started"); + + while (running) { + Thread.Sleep (1); + } + + iedServer.Stop (); + Console.WriteLine ("Server stopped"); + + iedServer.Destroy (); + } + } +} diff --git a/dotnet/server1/Properties/AssemblyInfo.cs b/dotnet/server1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bee540c --- /dev/null +++ b/dotnet/server1/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle ("server1")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("")] +[assembly: AssemblyProduct ("")] +[assembly: AssemblyCopyright ("mzillgit")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion ("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/dotnet/server1/model.cfg b/dotnet/server1/model.cfg new file mode 100644 index 0000000..6f33242 --- /dev/null +++ b/dotnet/server1/model.cfg @@ -0,0 +1,237 @@ +MODEL(simpleIO){ +LD(GenericIO){ +LN(LLN0){ +DO(Mod 0){ +DA(stVal 0 12 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +DA(ctlModel 0 12 4 0 0)=0; +} +DO(Beh 0){ +DA(stVal 0 12 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Health 0){ +DA(stVal 0 3 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(NamPlt 0){ +DA(vendor 0 20 5 0 0); +DA(swRev 0 20 5 0 0); +DA(d 0 20 5 0 0); +DA(configRev 0 20 5 0 0); +DA(ldNs 0 20 11 0 0); +} +DS(Events){ +DE(GGIO1$ST$SPCSO1$stVal); +DE(GGIO1$ST$SPCSO2$stVal); +DE(GGIO1$ST$SPCSO3$stVal); +DE(GGIO1$ST$SPCSO4$stVal); +} +DS(AnalogValues){ +DE(GGIO1$MX$AnIn1); +DE(GGIO1$MX$AnIn2); +DE(GGIO1$MX$AnIn3); +DE(GGIO1$MX$AnIn4); +} +RC(EventsRCB01 Events 0 Events 1 24 111 50 1000); +RC(AnalogValuesRCB01 AnalogValues 0 AnalogValues 1 24 111 50 1000); +LC(EventLog Events GenericIO/LLN0$EventLog 19 0 0 1); +LC(GeneralLog - - 19 0 0 1); +LOG(GeneralLog); +LOG(EventLog); +GC(gcbEvents events Events 2 0 -1 -1 ){ +PA(4 273 4096 010ccd010001); +} +GC(gcbAnalogValues analog AnalogValues 2 0 -1 -1 ){ +PA(4 273 4096 010ccd010001); +} +} +LN(LPHD1){ +DO(PhyNam 0){ +DA(vendor 0 20 5 0 0); +} +DO(PhyHealth 0){ +DA(stVal 0 3 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Proxy 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +} +LN(GGIO1){ +DO(Mod 0){ +DA(stVal 0 12 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +DA(ctlModel 0 12 4 0 0)=0; +} +DO(Beh 0){ +DA(stVal 0 12 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Health 0){ +DA(stVal 0 3 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(NamPlt 0){ +DA(vendor 0 20 5 0 0); +DA(swRev 0 20 5 0 0); +DA(d 0 20 5 0 0); +} +DO(AnIn1 0){ +DA(mag 0 27 1 1 0){ +DA(f 0 10 1 1 0); +} +DA(q 0 23 1 2 0); +DA(t 0 22 1 0 0); +} +DO(AnIn2 0){ +DA(mag 0 27 1 1 101){ +DA(f 0 10 1 1 0); +} +DA(q 0 23 1 2 0); +DA(t 0 22 1 0 102); +} +DO(AnIn3 0){ +DA(mag 0 27 1 1 0){ +DA(f 0 10 1 1 0); +} +DA(q 0 23 1 2 0); +DA(t 0 22 1 0 0); +} +DO(AnIn4 0){ +DA(mag 0 27 1 1 0){ +DA(f 0 10 1 1 0); +} +DA(q 0 23 1 2 0); +DA(t 0 22 1 0 0); +} +DO(SPCSO1 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(Oper 0 27 12 0 0){ +DA(ctlVal 0 0 12 0 0); +DA(origin 0 27 12 0 0){ +DA(orCat 0 12 12 0 0); +DA(orIdent 0 13 12 0 0); +} +DA(ctlNum 0 6 12 0 0); +DA(T 0 22 12 0 0); +DA(Test 0 0 12 0 0); +DA(Check 0 24 12 0 0); +} +DA(ctlModel 0 12 4 0 0)=1; +DA(t 0 22 0 0 0); +} +DO(SPCSO2 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(Oper 0 27 12 0 0){ +DA(ctlVal 0 0 12 0 0); +DA(origin 0 27 12 0 0){ +DA(orCat 0 12 12 0 0); +DA(orIdent 0 13 12 0 0); +} +DA(ctlNum 0 6 12 0 0); +DA(T 0 22 12 0 0); +DA(Test 0 0 12 0 0); +DA(Check 0 24 12 0 0); +} +DA(ctlModel 0 12 4 0 0)=1; +DA(t 0 22 0 0 0); +} +DO(SPCSO3 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(Oper 0 27 12 0 0){ +DA(ctlVal 0 0 12 0 0); +DA(origin 0 27 12 0 0){ +DA(orCat 0 12 12 0 0); +DA(orIdent 0 13 12 0 0); +} +DA(ctlNum 0 6 12 0 0); +DA(T 0 22 12 0 0); +DA(Test 0 0 12 0 0); +DA(Check 0 24 12 0 0); +} +DA(ctlModel 0 12 4 0 0)=1; +DA(t 0 22 0 0 0); +} +DO(SPCSO4 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(Oper 0 27 12 0 0){ +DA(ctlVal 0 0 12 0 0); +DA(origin 0 27 12 0 0){ +DA(orCat 0 12 12 0 0); +DA(orIdent 0 13 12 0 0); +} +DA(ctlNum 0 6 12 0 0); +DA(T 0 22 12 0 0); +DA(Test 0 0 12 0 0); +DA(Check 0 24 12 0 0); +} +DA(ctlModel 0 12 4 0 0)=1; +DA(t 0 22 0 0 0); +} +DO(Ind1 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Ind2 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Ind3 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Ind4 0){ +DA(stVal 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +} +LN(PDUP1){ +DO(Beh 0){ +DA(stVal 0 12 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Mod 0){ +DA(stVal 0 12 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +DA(ctlModel 0 12 4 0 0)=0; +} +DO(Str 0){ +DA(general 0 0 0 1 0); +DA(dirGeneral 0 12 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(Op 0){ +DA(general 0 0 0 1 0); +DA(q 0 23 0 2 0); +DA(t 0 22 0 0 0); +} +DO(OpDlTmms 0){ +DA(setVal 0 3 2 1 0); +} +DO(RsDlTmms 0){ +DA(setVal 0 3 2 1 0); +} +} +} +} diff --git a/dotnet/server1/server1.csproj b/dotnet/server1/server1.csproj new file mode 100644 index 0000000..617705c --- /dev/null +++ b/dotnet/server1/server1.csproj @@ -0,0 +1,44 @@ + + + + Debug + AnyCPU + {9286D2AB-96ED-4631-AB3C-ED20FF5D6E6C} + Exe + server1 + server1 + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + true + + + full + true + bin\Release + prompt + 4 + true + + + + + + + + + + + + {C35D624E-5506-4560-8074-1728F1FA1A4D} + IEC61850forCSharp + + + \ No newline at end of file diff --git a/dotnet/tests/Test.cs b/dotnet/tests/Test.cs index acb7efa..8925422 100644 --- a/dotnet/tests/Test.cs +++ b/dotnet/tests/Test.cs @@ -176,7 +176,7 @@ namespace tests modelNode = iedModel.GetModelNodeByShortObjectReference ("GenericIO/GGIO1.AnIn1.mag.f"); - Assert.IsTrue (modelNode.GetType ().Equals (typeof(DataAttribute))); + Assert.IsTrue (modelNode.GetType ().Equals (typeof(IEC61850.Server.DataAttribute))); Assert.IsNotNull (modelNode); } @@ -188,13 +188,13 @@ namespace tests ModelNode ind1 = iedModel.GetModelNodeByShortObjectReference ("GenericIO/GGIO1.Ind1.stVal"); - Assert.IsTrue (ind1.GetType ().Equals (typeof(DataAttribute))); + Assert.IsTrue (ind1.GetType ().Equals (typeof(IEC61850.Server.DataAttribute))); IedServer iedServer = new IedServer (iedModel); iedServer.Start (10002); - iedServer.UpdateBooleanAttributeValue((DataAttribute) ind1, true); + iedServer.UpdateBooleanAttributeValue((IEC61850.Server.DataAttribute) ind1, true); IedConnection connection = new IedConnection (); @@ -204,7 +204,7 @@ namespace tests Assert.IsTrue (stVal); - iedServer.UpdateBooleanAttributeValue((DataAttribute) ind1, false); + iedServer.UpdateBooleanAttributeValue((IEC61850.Server.DataAttribute) ind1, false); stVal = connection.ReadBooleanValue ("simpleIOGenericIO/GGIO1.Ind1.stVal", FunctionalConstraint.ST); @@ -224,19 +224,19 @@ namespace tests IedModel iedModel = ConfigFileParser.CreateModelFromConfigFile ("../../model.cfg"); - DataAttribute opDlTmms = (DataAttribute) iedModel.GetModelNodeByShortObjectReference("GenericIO/PDUP1.OpDlTmms.setVal"); - DataAttribute rsDlTmms = (DataAttribute)iedModel.GetModelNodeByShortObjectReference ("GenericIO/PDUP1.RsDlTmms.setVal"); + IEC61850.Server.DataAttribute opDlTmms = (IEC61850.Server.DataAttribute) iedModel.GetModelNodeByShortObjectReference("GenericIO/PDUP1.OpDlTmms.setVal"); + IEC61850.Server.DataAttribute rsDlTmms = (IEC61850.Server.DataAttribute)iedModel.GetModelNodeByShortObjectReference ("GenericIO/PDUP1.RsDlTmms.setVal"); IedServer iedServer = new IedServer (iedModel); int opDlTmmsValue = 0; - iedServer.HandleWriteAccess (opDlTmms, delegate(DataAttribute dataAttr, MmsValue value, ClientConnection con, object parameter) { + iedServer.HandleWriteAccess (opDlTmms, delegate(IEC61850.Server.DataAttribute dataAttr, MmsValue value, ClientConnection con, object parameter) { opDlTmmsValue = value.ToInt32(); return MmsDataAccessError.DATA_ACCESS_ERROR_SUCCESS; }, null); - iedServer.HandleWriteAccess (rsDlTmms, delegate(DataAttribute dataAttr, MmsValue value, ClientConnection con, object parameter) { + iedServer.HandleWriteAccess (rsDlTmms, delegate(IEC61850.Server.DataAttribute dataAttr, MmsValue value, ClientConnection con, object parameter) { if (value.ToInt32() > 1000) return MmsDataAccessError.DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID; else @@ -280,12 +280,12 @@ namespace tests IedModel iedModel = ConfigFileParser.CreateModelFromConfigFile ("../../model.cfg"); - DataAttribute opDlTmms = (DataAttribute) iedModel.GetModelNodeByShortObjectReference("GenericIO/PDUP1.OpDlTmms.setVal"); - DataAttribute rsDlTmms = (DataAttribute)iedModel.GetModelNodeByShortObjectReference ("GenericIO/PDUP1.RsDlTmms.setVal"); + IEC61850.Server.DataAttribute opDlTmms = (IEC61850.Server.DataAttribute) iedModel.GetModelNodeByShortObjectReference("GenericIO/PDUP1.OpDlTmms.setVal"); + IEC61850.Server.DataAttribute rsDlTmms = (IEC61850.Server.DataAttribute)iedModel.GetModelNodeByShortObjectReference("GenericIO/PDUP1.RsDlTmms.setVal"); IedServer iedServer = new IedServer (iedModel); - iedServer.HandleWriteAccess (opDlTmms, delegate(DataAttribute dataAttr, MmsValue value, ClientConnection con, object parameter) { + iedServer.HandleWriteAccess (opDlTmms, delegate(IEC61850.Server.DataAttribute dataAttr, MmsValue value, ClientConnection con, object parameter) { return MmsDataAccessError.DATA_ACCESS_ERROR_SUCCESS; }, null); diff --git a/dotnet/tests/tests.csproj b/dotnet/tests/tests.csproj index 76e97b7..8d35ba8 100644 --- a/dotnet/tests/tests.csproj +++ b/dotnet/tests/tests.csproj @@ -1,47 +1,47 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {FBDFE530-DBEB-474B-BA54-9AB287DD57B3} - Library - tests - tests - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - - - none - true - bin\Release - prompt - 4 - false - - - - - nunit - - - - - - - - - {C35D624E-5506-4560-8074-1728F1FA1A4D} - IEC61850forCSharp - - + + + + Debug + AnyCPU + {FBDFE530-DBEB-474B-BA54-9AB287DD57B3} + Library + tests + tests + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + none + true + bin\Release + prompt + 4 + false + + + + + + + + {C35D624E-5506-4560-8074-1728F1FA1A4D} + IEC61850forCSharp + + + + + + + + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + \ No newline at end of file