- added server1 example to dotnet
This commit is contained in:
parent
da21182077
commit
4d5a9e27a1
19 changed files with 437 additions and 108 deletions
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{C35D624E-5506-4560-8074-1728F1FA1A4D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>iec61850dotnet</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0BECEC77-2315-4B95-AFF9-E6007E644BBF}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>authenticate</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{C351CFA4-E54E-49A1-86CE-69643535541A}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>control</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{D5C7DD38-032A-49B6-B74F-FFD9724A8AE4}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>datasets</RootNamespace>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{C616A6DF-831E-443C-9310-3F343A6E3D1A}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>example1</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2A226B6D-1D1F-4BFE-B8CC-158116F71270}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>example2</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{5E5D0FE0-DF44-48D8-A10E-1FB07D34DEA2}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>example3</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{77127456-19B9-4D1A-AEF9-40F8D1C5695E}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>files</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{14C71267-2F38-460D-AA55-6803EE80AFB4}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>log_client</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{59B85486-F48D-4978-BD35-8F5C3A8288D4}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>model_browsing</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{71485F99-2976-45E6-B73D-4946E594C15C}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>report_new_dataset</RootNamespace>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9E29B4CE-EE5F-4CA6-85F6-5D1FF8B27BF8}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>reporting</RootNamespace>
|
||||
|
|
55
dotnet/server1/Program.cs
Normal file
55
dotnet/server1/Program.cs
Normal file
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
}
|
27
dotnet/server1/Properties/AssemblyInfo.cs
Normal file
27
dotnet/server1/Properties/AssemblyInfo.cs
Normal file
|
@ -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("")]
|
||||
|
237
dotnet/server1/model.cfg
Normal file
237
dotnet/server1/model.cfg
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
44
dotnet/server1/server1.csproj
Normal file
44
dotnet/server1/server1.csproj
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{9286D2AB-96ED-4631-AB3C-ED20FF5D6E6C}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>server1</RootNamespace>
|
||||
<AssemblyName>server1</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IEC61850forCSharp\IEC61850forCSharp.csproj">
|
||||
<Project>{C35D624E-5506-4560-8074-1728F1FA1A4D}</Project>
|
||||
<Name>IEC61850forCSharp</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FBDFE530-DBEB-474B-BA54-9AB287DD57B3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>tests</RootNamespace>
|
||||
<AssemblyName>tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="nunit.framework">
|
||||
<Package>nunit</Package>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Test.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IEC61850forCSharp\IEC61850forCSharp.csproj">
|
||||
<Project>{C35D624E-5506-4560-8074-1728F1FA1A4D}</Project>
|
||||
<Name>IEC61850forCSharp</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{FBDFE530-DBEB-474B-BA54-9AB287DD57B3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>tests</RootNamespace>
|
||||
<AssemblyName>tests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Test.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IEC61850forCSharp\IEC61850forCSharp.csproj">
|
||||
<Project>{C35D624E-5506-4560-8074-1728F1FA1A4D}</Project>
|
||||
<Name>IEC61850forCSharp</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Add table
Reference in a new issue