Browse Source

Merge pull request #5 from zhangfl0220/new

New
pull/17/head
zhangfl0220 9 years ago
committed by GitHub
parent
commit
ca5e79535e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .gitignore
  2. 3
      .vs/ProjectSettings.json
  3. BIN
      .vs/SharpSCADA/v15/.suo
  4. 9
      .vs/VSWorkspaceState.json
  5. BIN
      .vs/slnx.sqlite
  6. BIN
      SCADA/Program/.vs/DataExchange/v15/.suo
  7. 0
      SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/db.lock
  8. BIN
      SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide
  9. 0
      SCADA/Program/.vs/DataExchange/v15/sqlite3/db.lock
  10. BIN
      SCADA/Program/.vs/DataExchange/v15/sqlite3/storage.ide
  11. 27
      SCADA/Program/BatchCoreService/BatchCoreService.csproj
  12. 16
      SCADA/Program/BatchCoreService/BatchCoreService.csproj.user
  13. 2
      SCADA/Program/BatchCoreService/DAService.cs
  14. 40
      SCADA/Program/BatchCoreService/bin/Debug/App.config
  15. BIN
      SCADA/Program/BatchCoreService/bin/Debug/BatchCoreService.exe
  16. 40
      SCADA/Program/BatchCoreService/bin/Debug/BatchCoreService.exe.config
  17. BIN
      SCADA/Program/BatchCoreService/bin/Debug/BatchCoreService.pdb
  18. BIN
      SCADA/Program/BatchCoreService/bin/Debug/ClientDriver.dll
  19. BIN
      SCADA/Program/BatchCoreService/bin/Debug/ClientDriver.pdb
  20. BIN
      SCADA/Program/BatchCoreService/bin/Debug/DataHelper.dll
  21. 9
      SCADA/Program/BatchCoreService/bin/Debug/DataHelper.dll.config
  22. BIN
      SCADA/Program/BatchCoreService/bin/Debug/DataHelper.pdb
  23. BIN
      SCADA/Program/BatchCoreService/bin/Debug/DataService.dll
  24. BIN
      SCADA/Program/BatchCoreService/bin/Debug/DataService.pdb
  25. BIN
      SCADA/Program/BatchCoreService/bin/Debug/MySql.Data.dll
  26. BIN
      SCADA/Program/BatchCoreService/bin/Debug/SiemensPLCDriver.dll
  27. BIN
      SCADA/Program/BatchCoreService/bin/Debug/SiemensPLCDriver.pdb
  28. BIN
      SCADA/Program/BatchCoreService/bin/Debug/libnodave.net.dll
  29. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.BatchCoreService.resources
  30. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.ProjectInstaller.resources
  31. 0
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.CopyComplete
  32. 1
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.CoreCompileInputs.cache
  33. 22
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.FileListAbsolute.txt
  34. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.GenerateResource.Cache
  35. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csprojResolveAssemblyReference.cache
  36. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.exe
  37. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.pdb
  38. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
  39. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  40. 10
      SCADA/Program/BatchCoreTest/BatchCoreTest.csproj.user
  41. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.exe
  42. 40
      SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.exe.config
  43. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.pdb
  44. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/ClientDriver.dll
  45. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/ClientDriver.pdb
  46. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/DataHelper.dll
  47. 9
      SCADA/Program/BatchCoreTest/bin/Debug/DataHelper.dll.config
  48. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/DataHelper.pdb
  49. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/DataService.dll
  50. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/DataService.pdb
  51. BIN
      SCADA/Program/BatchCoreTest/bin/Debug/MySql.Data.dll
  52. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreService.Properties.Resources.resources
  53. 0
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.CopyComplete
  54. 1
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.CoreCompileInputs.cache
  55. 17
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.FileListAbsolute.txt
  56. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.GenerateResource.Cache
  57. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csprojResolveAssemblyReference.cache
  58. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.exe
  59. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.pdb
  60. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
  61. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  62. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
  63. 1
      SCADA/Program/BatchCoreTest/obj/x86/Release/BatchCoreTest.csproj.CoreCompileInputs.cache
  64. BIN
      SCADA/Program/ClientDriver/bin/Debug/ClientDriver.dll
  65. BIN
      SCADA/Program/ClientDriver/bin/Debug/ClientDriver.pdb
  66. BIN
      SCADA/Program/ClientDriver/bin/Debug/DataService.dll
  67. BIN
      SCADA/Program/ClientDriver/bin/Debug/DataService.pdb
  68. 0
      SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csproj.CopyComplete
  69. 1
      SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csproj.CoreCompileInputs.cache
  70. 8
      SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csproj.FileListAbsolute.txt
  71. BIN
      SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csprojResolveAssemblyReference.cache
  72. BIN
      SCADA/Program/ClientDriver/obj/Debug/ClientDriver.dll
  73. BIN
      SCADA/Program/ClientDriver/obj/Debug/ClientDriver.pdb
  74. BIN
      SCADA/Program/ClientDriver/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  75. BIN
      SCADA/Program/ClientDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  76. 6
      SCADA/Program/ConsoleApp1/App.config
  77. 61
      SCADA/Program/ConsoleApp1/ConsoleApp1.csproj
  78. 19
      SCADA/Program/ConsoleApp1/Program.cs
  79. 36
      SCADA/Program/ConsoleApp1/Properties/AssemblyInfo.cs
  80. 1
      SCADA/Program/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache
  81. 2
      SCADA/Program/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt
  82. BIN
      SCADA/Program/ConsoleApp1/obj/Debug/ConsoleApp1.csprojResolveAssemblyReference.cache
  83. BIN
      SCADA/Program/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  84. BIN
      SCADA/Program/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  85. 0
      SCADA/Program/ConsoleApp1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
  86. 0
      SCADA/Program/ConsoleApp1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
  87. 0
      SCADA/Program/ConsoleApp1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
  88. 11
      SCADA/Program/CoreTest/App.xaml.cs
  89. 32
      SCADA/Program/CoreTest/ClientService.cs
  90. BIN
      SCADA/Program/CoreTest/bin/Debug/ClientDriver.dll
  91. BIN
      SCADA/Program/CoreTest/bin/Debug/ClientDriver.pdb
  92. BIN
      SCADA/Program/CoreTest/bin/Debug/CoreTest.exe
  93. BIN
      SCADA/Program/CoreTest/bin/Debug/CoreTest.pdb
  94. BIN
      SCADA/Program/CoreTest/bin/Debug/DataHelper.dll
  95. 9
      SCADA/Program/CoreTest/bin/Debug/DataHelper.dll.config
  96. BIN
      SCADA/Program/CoreTest/bin/Debug/DataHelper.pdb
  97. BIN
      SCADA/Program/CoreTest/bin/Debug/DataService.dll
  98. BIN
      SCADA/Program/CoreTest/bin/Debug/DataService.pdb
  99. BIN
      SCADA/Program/CoreTest/bin/Debug/DynamicDataDisplay.dll
  100. BIN
      SCADA/Program/CoreTest/bin/Debug/HMIControl.dll

3
.gitignore

@ -6,4 +6,5 @@ ehthumbs.db
Desktop.ini Desktop.ini
!*.exe !*.exe
!*.dll !*.dll
!*.bak !*.bak
*\Debug\*

3
.vs/ProjectSettings.json

@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}

BIN
.vs/SharpSCADA/v15/.suo

Binary file not shown.

9
.vs/VSWorkspaceState.json

@ -0,0 +1,9 @@
{
"ExpandedNodes": [
"",
"\\SCADA",
"\\SCADA\\Program"
],
"SelectedNode": "\\SCADA\\Program\\DataExchange.sln",
"PreviewInSolutionExplorer": false
}

BIN
.vs/slnx.sqlite

Binary file not shown.

BIN
SCADA/Program/.vs/DataExchange/v15/.suo

Binary file not shown.

0
SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/db.lock

BIN
SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide

Binary file not shown.

0
SCADA/Program/.vs/DataExchange/v15/sqlite3/db.lock

BIN
SCADA/Program/.vs/DataExchange/v15/sqlite3/storage.ide

Binary file not shown.

27
SCADA/Program/BatchCoreService/BatchCoreService.csproj

@ -14,6 +14,21 @@
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -24,6 +39,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -77,6 +93,10 @@
<Project>{8965e389-6466-4b30-bd43-83c909044637}</Project> <Project>{8965e389-6466-4b30-bd43-83c909044637}</Project>
<Name>DataService</Name> <Name>DataService</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SiemensPLCDriver\SiemensPLCDriver.csproj">
<Project>{9cebfda4-cf05-44d1-881b-13775aa46b27}</Project>
<Name>SiemensPLCDriver</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config"> <None Include="App.config">
@ -92,6 +112,13 @@
<DependentUpon>ProjectInstaller.cs</DependentUpon> <DependentUpon>ProjectInstaller.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

16
SCADA/Program/BatchCoreService/BatchCoreService.csproj.user

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
</PropertyGroup>
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>zh-CN</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

2
SCADA/Program/BatchCoreService/DAService.cs

@ -530,7 +530,7 @@ namespace BatchCoreService
break; break;
} }
cond.AddSubCondition(new SubCondition((SubAlarmType)dataReader.GetInt32(9), dataReader.GetFloat(10), cond.AddSubCondition(new SubCondition((SubAlarmType)dataReader.GetInt32(9), dataReader.GetFloat(10),
(Severity)dataReader.GetByte(11), dataReader.GetString(12), dataReader.GetBoolean(13))); (Severity)dataReader.GetByte(11), dataReader.GetString(12), dataReader.GetBoolean(13)));//读取数据库表Meta_SubCondition里的值
cond.IsEnabled = dataReader.GetBoolean(3); cond.IsEnabled = dataReader.GetBoolean(3);
var simpcond = cond as SimpleCondition; var simpcond = cond as SimpleCondition;

40
SCADA/Program/BatchCoreService/bin/Debug/App.config

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<system.serviceModel>
<services>
<!-- This section is optional with the new configuration model
introduced in .NET Framework 4. -->
<service name="BatchCoreService.DAService" behaviorConfiguration="DAServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/SCADA/service"/>
</baseAddresses>
</host>
<!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/SCADA/service -->
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="Binding1" bindingNamespace="http://BatchCoreService" contract="BatchCoreService.IDataExchangeService"/>
<!-- the mex endpoint is exposed at http://localhost:8000/SCADA/service/mex -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="Binding1" sendTimeout="00:10:00" transferMode="Streamed" messageEncoding="Text" textEncoding="utf-8" maxReceivedMessageSize="9223372036854775807">
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DAServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>

BIN
SCADA/Program/BatchCoreService/bin/Debug/BatchCoreService.exe

Binary file not shown.

40
SCADA/Program/BatchCoreService/bin/Debug/BatchCoreService.exe.config

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<system.serviceModel>
<services>
<!-- This section is optional with the new configuration model
introduced in .NET Framework 4. -->
<service name="BatchCoreService.DAService" behaviorConfiguration="DAServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/SCADA/service"/>
</baseAddresses>
</host>
<!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/SCADA/service -->
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="Binding1" bindingNamespace="http://BatchCoreService" contract="BatchCoreService.IDataExchangeService"/>
<!-- the mex endpoint is exposed at http://localhost:8000/SCADA/service/mex -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="Binding1" sendTimeout="00:10:00" transferMode="Streamed" messageEncoding="Text" textEncoding="utf-8" maxReceivedMessageSize="9223372036854775807">
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DAServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>

BIN
SCADA/Program/BatchCoreService/bin/Debug/BatchCoreService.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/ClientDriver.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/ClientDriver.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/DataHelper.dll

Binary file not shown.

9
SCADA/Program/BatchCoreService/bin/Debug/DataHelper.dll.config

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data></configuration>

BIN
SCADA/Program/BatchCoreService/bin/Debug/DataHelper.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/DataService.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/DataService.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/MySql.Data.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/SiemensPLCDriver.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/SiemensPLCDriver.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/bin/Debug/libnodave.net.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.BatchCoreService.resources

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.ProjectInstaller.resources

Binary file not shown.

0
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.CopyComplete

1
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.CoreCompileInputs.cache

@ -0,0 +1 @@
9ab3fc88db97861a90c71afeb1c43b79b048e08d

22
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.FileListAbsolute.txt

@ -0,0 +1,22 @@
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\App.config
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\BatchCoreService.exe.config
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\BatchCoreService.exe
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\BatchCoreService.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\ClientDriver.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\DataHelper.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\DataService.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\SiemensPLCDriver.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\libnodave.net.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\MySql.Data.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\ClientDriver.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\SiemensPLCDriver.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\DataHelper.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\DataHelper.dll.config
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\bin\Debug\DataService.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\obj\x86\Debug\BatchCoreService.csprojResolveAssemblyReference.cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\obj\x86\Debug\BatchCoreService.BatchCoreService.resources
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\obj\x86\Debug\BatchCoreService.ProjectInstaller.resources
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\obj\x86\Debug\BatchCoreService.csproj.GenerateResource.Cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\obj\x86\Debug\BatchCoreService.csproj.CoreCompileInputs.cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\obj\x86\Debug\BatchCoreService.exe
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreService\obj\x86\Debug\BatchCoreService.pdb

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csproj.GenerateResource.Cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.exe

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/BatchCoreService.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

10
SCADA/Program/BatchCoreTest/BatchCoreTest.csproj.user

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
</PropertyGroup>
</Project>

BIN
SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.exe

Binary file not shown.

40
SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.exe.config

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<system.serviceModel>
<services>
<!-- This section is optional with the new configuration model
introduced in .NET Framework 4. -->
<service name="BatchCoreService.DAService" behaviorConfiguration="DAServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/SCADA/service"/>
</baseAddresses>
</host>
<!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/SCADA/service -->
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="Binding1" bindingNamespace="http://BatchCoreService" contract="BatchCoreService.IDataExchangeService"/>
<!-- the mex endpoint is exposed at http://localhost:8000/SCADA/service/mex -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="Binding1" sendTimeout="00:10:00" transferMode="Streamed" messageEncoding="Text" textEncoding="utf-8" maxReceivedMessageSize="9223372036854775807">
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DAServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>

BIN
SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/bin/Debug/ClientDriver.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/bin/Debug/ClientDriver.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/bin/Debug/DataHelper.dll

Binary file not shown.

9
SCADA/Program/BatchCoreTest/bin/Debug/DataHelper.dll.config

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data></configuration>

BIN
SCADA/Program/BatchCoreTest/bin/Debug/DataHelper.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/bin/Debug/DataService.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/bin/Debug/DataService.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/bin/Debug/MySql.Data.dll

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreService.Properties.Resources.resources

Binary file not shown.

0
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.CopyComplete

1
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.CoreCompileInputs.cache

@ -0,0 +1 @@
b26ca3168a18148b179a6df0704c8885b4d4735f

17
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.FileListAbsolute.txt

@ -0,0 +1,17 @@
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\BatchCoreTest.exe.config
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\BatchCoreTest.exe
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\BatchCoreTest.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\ClientDriver.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\DataHelper.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\DataService.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\MySql.Data.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\ClientDriver.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\DataHelper.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\DataHelper.dll.config
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\DataService.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\obj\x86\Debug\BatchCoreTest.csprojResolveAssemblyReference.cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\obj\x86\Debug\BatchCoreService.Properties.Resources.resources
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\obj\x86\Debug\BatchCoreTest.csproj.GenerateResource.Cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\obj\x86\Debug\BatchCoreTest.csproj.CoreCompileInputs.cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\obj\x86\Debug\BatchCoreTest.exe
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\BatchCoreTest\obj\x86\Debug\BatchCoreTest.pdb

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.GenerateResource.Cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.exe

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.pdb

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll

Binary file not shown.

1
SCADA/Program/BatchCoreTest/obj/x86/Release/BatchCoreTest.csproj.CoreCompileInputs.cache

@ -0,0 +1 @@
e8f1d7f6ef83eaca26e875858efdc3026510c94a

BIN
SCADA/Program/ClientDriver/bin/Debug/ClientDriver.dll

Binary file not shown.

BIN
SCADA/Program/ClientDriver/bin/Debug/ClientDriver.pdb

Binary file not shown.

BIN
SCADA/Program/ClientDriver/bin/Debug/DataService.dll

Binary file not shown.

BIN
SCADA/Program/ClientDriver/bin/Debug/DataService.pdb

Binary file not shown.

0
SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csproj.CopyComplete

1
SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csproj.CoreCompileInputs.cache

@ -0,0 +1 @@
d217e5fd43981a769fca9cc01f418626086e9fcc

8
SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csproj.FileListAbsolute.txt

@ -0,0 +1,8 @@
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\bin\Debug\ClientDriver.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\bin\Debug\ClientDriver.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\bin\Debug\DataService.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\bin\Debug\DataService.pdb
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\obj\Debug\ClientDriver.csprojResolveAssemblyReference.cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\obj\Debug\ClientDriver.csproj.CoreCompileInputs.cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\obj\Debug\ClientDriver.dll
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ClientDriver\obj\Debug\ClientDriver.pdb

BIN
SCADA/Program/ClientDriver/obj/Debug/ClientDriver.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
SCADA/Program/ClientDriver/obj/Debug/ClientDriver.dll

Binary file not shown.

BIN
SCADA/Program/ClientDriver/obj/Debug/ClientDriver.pdb

Binary file not shown.

BIN
SCADA/Program/ClientDriver/obj/Debug/DesignTimeResolveAssemblyReferences.cache

Binary file not shown.

BIN
SCADA/Program/ClientDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

6
SCADA/Program/ConsoleApp1/App.config

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

61
SCADA/Program/ConsoleApp1/ConsoleApp1.csproj

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{41917E21-8ED7-4486-AEEF-4D6158F10B14}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleApp1</RootNamespace>
<AssemblyName>ConsoleApp1</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="libnodave.net">
<HintPath>..\..\dll\libnodave.net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SiemensPLCDriver\SiemensPLCDriver.csproj">
<Project>{9cebfda4-cf05-44d1-881b-13775aa46b27}</Project>
<Name>SiemensPLCDriver</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

19
SCADA/Program/ConsoleApp1/Program.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SiemensPLCDriver;
using static libnodave;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
SiemensPLCDriver psDriver=new SiemensPLCDriver();
}
}
}

36
SCADA/Program/ConsoleApp1/Properties/AssemblyInfo.cs

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ConsoleApp1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApp1")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("41917e21-8ed7-4486-aeef-4d6158f10b14")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

1
SCADA/Program/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache

@ -0,0 +1 @@
0b201921e66baf8f9bd57dd91251e04b09f75571

2
SCADA/Program/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt

@ -0,0 +1,2 @@
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ConsoleApp1\obj\Debug\ConsoleApp1.csprojResolveAssemblyReference.cache
C:\Users\IMG\Documents\GitHub\SharpSCADA\SCADA\Program\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache

BIN
SCADA/Program/ConsoleApp1/obj/Debug/ConsoleApp1.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
SCADA/Program/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache

Binary file not shown.

BIN
SCADA/Program/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

0
SCADA/Program/ConsoleApp1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

0
SCADA/Program/ConsoleApp1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

0
SCADA/Program/ConsoleApp1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

11
SCADA/Program/CoreTest/App.xaml.cs

@ -11,7 +11,7 @@ namespace CoreTest
/// <summary> /// <summary>
/// Interaction logic for App.xaml /// Interaction logic for App.xaml
/// </summary> /// </summary>
public partial class App : System.Windows.Application public partial class App : System.Windows.Application//App类另一段代码是自动生成的,App类是程序的起点,可以搜索App看到。
{ {
const string MYCOSLOGSOURCE = "MyWEM Application"; const string MYCOSLOGSOURCE = "MyWEM Application";
const string MYCOSLOGNAME = "MyWEM"; const string MYCOSLOGNAME = "MyWEM";
@ -20,8 +20,9 @@ namespace CoreTest
static readonly string machine = Environment.MachineName; static readonly string machine = Environment.MachineName;
public static readonly DAServer Server = new DAServer(); public static readonly DAServer Server = new DAServer();
#region 定义当前用户的名称
static IPrincipal _princ; static IPrincipal _princ;
public static IPrincipal Principal public static IPrincipal Principal//定义用户对象的基本功能
{ {
get get
{ {
@ -33,7 +34,7 @@ namespace CoreTest
} }
} }
public static string LogSource public static string LogSource//获取当前用户的名称
{ {
get get
{ {
@ -46,7 +47,7 @@ namespace CoreTest
{ {
get { return eventLog; } get { return eventLog; }
} }
#endregion
static App() static App()
{ {
var curr = Process.GetCurrentProcess(); var curr = Process.GetCurrentProcess();
@ -86,7 +87,7 @@ namespace CoreTest
Current.DispatcherUnhandledException += App_DispatcherUnhandledException; Current.DispatcherUnhandledException += App_DispatcherUnhandledException;
base.OnStartup(e); base.OnStartup(e);
#region #region
if (Screen.AllScreens.Length == 1)//Server.SD.ScreenCount if (Screen.AllScreens.Length == 1)//Server.SD.ScreenCount
{ {
w1 = new MainWindow(); w1 = new MainWindow();

32
SCADA/Program/CoreTest/ClientService.cs

@ -13,8 +13,8 @@ namespace CoreTest
{ {
public sealed class DAServer : IDataServer, IAlarmServer, IHDAServer public sealed class DAServer : IDataServer, IAlarmServer, IHDAServer
{ {
int ALARMLIMIT = 1000; int ALARMLIMIT = 1000;//报警限制1000个
int CYCLE = 60000; int CYCLE = 60000;//循环时间1分钟
const char SPLITCHAR = '.'; const char SPLITCHAR = '.';
const string SERVICELOGSOURCE = "ClientService"; const string SERVICELOGSOURCE = "ClientService";
@ -23,6 +23,8 @@ namespace CoreTest
static EventLog Log; static EventLog Log;
#region 索引器
public ITag this[short id] public ITag this[short id]
{ {
get get
@ -47,6 +49,8 @@ namespace CoreTest
} }
} }
#endregion
List<TagMetaData> _list; List<TagMetaData> _list;
public IList<TagMetaData> MetaDataList public IList<TagMetaData> MetaDataList
{ {
@ -117,15 +121,15 @@ namespace CoreTest
_scales = new List<Scaling>(); _scales = new List<Scaling>();
_linkedList = new QueueCollection<AlarmItem>(ALARMLIMIT + 10); _linkedList = new QueueCollection<AlarmItem>(ALARMLIMIT + 10);
reval = new ExpressionEval(this); reval = new ExpressionEval(this);
InitClient(); InitClient(); //初始化客户端,初始化服务器,初始化连接。
InitServerByDatabase(); InitServerByDatabase();
InitConnection(); InitConnection();
} }
void InitClient() void InitClient()//初始化客户端
{ {
string sLine = DataHelper.HostName; string sLine = DataHelper.HostName;//如果HostName为空值,则是当前环境的机器名称,否则是Sline的值
AddDriver(1, "Client1", string.IsNullOrEmpty(sLine) ? Environment.MachineName : sLine, 20000, null, null, null, null); AddDriver(1, "Client1", string.IsNullOrEmpty(sLine) ? Environment.MachineName : sLine, 20000, null, null, null, null);//如果
} }
void InitConnection() void InitConnection()
@ -154,17 +158,17 @@ namespace CoreTest
void InitServerByDatabase() void InitServerByDatabase()
{ {
try try
{ {//执行SQL中的存储过程的算法。@TYPE=1为客户端
using (var dataReader = DataHelper.Instance.ExecuteProcedureReader("InitServer", DataHelper.CreateParam("@TYPE", System.Data.SqlDbType.Int, 1))) using (var dataReader = DataHelper.Instance.ExecuteProcedureReader("InitServer", DataHelper.CreateParam("@TYPE", System.Data.SqlDbType.Int, 1)))
{ {
if (dataReader == null) Environment.Exit(0); if (dataReader == null) Environment.Exit(0);
//dataReader.Read(); //dataReader.Read();
dataReader.Read(); dataReader.Read();//通过执行的存储过程,读取变量的个数
int count = dataReader.GetInt32(0); int count = dataReader.GetInt32(0);
_list = new List<TagMetaData>(count); _list = new List<TagMetaData>(count);
_mapping = new Dictionary<string, ITag>(count); _mapping = new Dictionary<string, ITag>(count);////通过字典来查找Itag
dataReader.NextResult(); dataReader.NextResult();
while (dataReader.Read()) while (dataReader.Read())//通过执行的存储过程,读取全部变量
{ {
_list.Add(new TagMetaData(dataReader.GetInt16(0), dataReader.GetInt16(1), dataReader.GetString(2), dataReader.GetString(3), (DataType)dataReader.GetByte(4), _list.Add(new TagMetaData(dataReader.GetInt16(0), dataReader.GetInt16(1), dataReader.GetString(2), dataReader.GetString(3), (DataType)dataReader.GetByte(4),
(ushort)dataReader.GetInt16(5), dataReader.GetBoolean(6), dataReader.GetFloat(7), dataReader.GetFloat(8), dataReader.GetInt32(9))); (ushort)dataReader.GetInt16(5), dataReader.GetBoolean(6), dataReader.GetFloat(7), dataReader.GetFloat(8), dataReader.GetInt32(9)));
@ -176,7 +180,7 @@ namespace CoreTest
group = reader.AddGroup("Group1", 1, 0, 0, true) as ClientGroup; group = reader.AddGroup("Group1", 1, 0, 0, true) as ClientGroup;
group.AddItems(_list); group.AddItems(_list);
} }
dataReader.NextResult(); dataReader.NextResult();//通过执行的存储过程,读取报警值
_conditions = new List<ICondition>(); _conditions = new List<ICondition>();
_conditionList = new ObservableCollection<ICondition>(); _conditionList = new ObservableCollection<ICondition>();
while (dataReader.Read()) while (dataReader.Read())
@ -247,7 +251,7 @@ namespace CoreTest
//_conditions.Add(cond);// UpdateCondition(cond); //_conditions.Add(cond);// UpdateCondition(cond);
_conditions.Add(cond); _conditions.Add(cond);
} }
dataReader.NextResult(); dataReader.NextResult();//通过执行的存储过程,读取量程化的值
while (dataReader.Read()) while (dataReader.Read())
{ {
_scales.Add(new Scaling(dataReader.GetInt16(0), (ScaleType)dataReader.GetByte(1), _scales.Add(new Scaling(dataReader.GetInt16(0), (ScaleType)dataReader.GetByte(1),
@ -286,7 +290,7 @@ namespace CoreTest
} }
public IDriver AddDriver(short id, string name, string server, int timeOut, public IDriver AddDriver(short id, string name, string server, int timeOut,
string assembly, string className, string spare1, string spare2) string assembly, string className, string spare1, string spare2)//添加驱动
{ {
if (reader == null) if (reader == null)
{ {
@ -295,7 +299,7 @@ namespace CoreTest
return reader; return reader;
} }
public bool RemoveDriver(IDriver device) public bool RemoveDriver(IDriver device)//移除驱动
{ {
lock (SyncRoot) lock (SyncRoot)
{ {

BIN
SCADA/Program/CoreTest/bin/Debug/ClientDriver.dll

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/ClientDriver.pdb

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/CoreTest.exe

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/CoreTest.pdb

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/DataHelper.dll

Binary file not shown.

9
SCADA/Program/CoreTest/bin/Debug/DataHelper.dll.config

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data></configuration>

BIN
SCADA/Program/CoreTest/bin/Debug/DataHelper.pdb

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/DataService.dll

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/DataService.pdb

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/DynamicDataDisplay.dll

Binary file not shown.

BIN
SCADA/Program/CoreTest/bin/Debug/HMIControl.dll

Binary file not shown.

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save