zoulei 1 gadu atpakaļ
vecāks
revīzija
5477e8af24

BIN
Service/CapMoni/1.dat


+ 14 - 0
Service/CapMoni/App.config

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+	<appSettings>
+		<!--采集文件存放目录-->
+		<add key="FileDir" value="D:\data2"/>
+		<!--采集时长(S)-->
+		<add key="Duration" value="6"/>
+		<!--频点(MHz)多个-->
+		<add key="Freqs" value="310.85;310.95"/>
+	</appSettings>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+    </startup>
+</configuration>

+ 60 - 0
Service/CapMoni/CapMoni.csproj

@@ -0,0 +1,60 @@
+<?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>{205094BA-1381-43F3-8F42-0E1175587754}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>CapMoni</RootNamespace>
+    <AssemblyName>CapMoni</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </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="System" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Configuration.ConfigurationManager, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll</HintPath>
+    </Reference>
+    <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="1.dat">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 71 - 0
Service/CapMoni/Program.cs

@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Configuration;
+using System.IO;
+using System.Threading;
+
+namespace CapMoni
+{
+    internal class Program
+    {
+        static void Main(string[] args)
+        {
+
+            Console.WriteLine("开始采集...");
+            var fileDir = ConfigurationManager.AppSettings["FileDir"].Trim();//采集文件存放目录
+            var duration = ConfigurationManager.AppSettings["Duration"].Trim();//采集时长
+            if (!int.TryParse(duration, out int durationInt))
+            {
+                Console.WriteLine("请在配置文件中配置正确的时长信息");
+                return;
+            }
+            var freqs = ConfigurationManager.AppSettings["Freqs"].Trim();//频点
+
+            while (true)
+            {
+                var dateNow = DateTime.Now;
+                var fileNameDate = dateNow.ToString("yyyy_MM_dd_HH_mm_ss");
+                var fileNameTime = $"{fileNameDate}_000000000";
+                if (!Directory.Exists(fileDir))
+                    Directory.CreateDirectory(fileDir);
+                var fileDate = dateNow.ToString("yyyy_MM_dd_HH");
+                var fileDirDate = Path.Combine(fileDir, fileDate);
+                if (!Directory.Exists(fileDirDate))
+                    Directory.CreateDirectory(fileDirDate);
+                var freqList = freqs.Split(new string[] { ";" }, System.StringSplitOptions.RemoveEmptyEntries);
+                Parallel.For(0, freqList.Length, idx =>
+                {
+                    var fileName = $"{fileNameTime}_ch11_-1___N43.333333_E57.222222_96000.000Hz_{freqList[idx]}MHz_ch1_xd{idx + 1}";
+                    var filePath = Path.Combine(fileDirDate, $"{fileName}.dat");
+                    BinaryWriter datFile1 = new BinaryWriter(new FileStream(filePath, FileMode.Create), Encoding.UTF8);
+
+                    fileName = $"{fileNameTime}_ch22_-1___N43.333333_E57.222222_96000.000Hz_{freqList[idx]}MHz_ch2_xd{idx + 1}";
+                    filePath = Path.Combine(fileDirDate, $"{fileName}.dat");
+                    BinaryWriter datFile2 = new BinaryWriter(new FileStream(filePath, FileMode.Create), Encoding.UTF8);
+
+                    fileName = $"{fileNameTime}_ch33_-1___N43.333333_E57.222222_96000.000Hz_{freqList[idx]}MHz_ch3_xd{idx + 1}";
+                    filePath = Path.Combine(fileDirDate, $"{fileName}.dat");
+                    BinaryWriter datFile3 = new BinaryWriter(new FileStream(filePath, FileMode.Create), Encoding.UTF8);
+
+                    Thread.Sleep(durationInt * 1000);
+                    var dataCon = File.ReadAllBytes("1.dat");
+                    datFile1.Write(dataCon);
+                    datFile2.Write(dataCon);
+                    datFile3.Write(dataCon);
+                    //Thread.Sleep(6000);
+                    datFile1.Flush();
+                    datFile1.Close();
+                    datFile2.Flush();
+                    datFile2.Close();
+                    datFile3.Flush();
+                    datFile3.Close();
+
+                    Console.WriteLine($"{filePath}采集完毕");
+                });
+            }
+        }
+    }
+}

+ 36 - 0
Service/CapMoni/Properties/AssemblyInfo.cs

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

+ 1 - 0
Service/CheckServer/CheckServer.csproj

@@ -238,6 +238,7 @@ del BouncyCastle*.xml
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns
+move AddIns\$(TargetName).pdb .
 copy $(SolutionDir)Service.svg Service.svg
 rmdir logs /S/Q
 rmdir wwwroot /S/Q

+ 1 - 0
Service/CpuCgServer/CpuCgServer.csproj

@@ -190,6 +190,7 @@ del BouncyCastle*.xml
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns
+move AddIns\$(TargetName).pdb .
 copy $(SolutionDir)Service.svg Service.svg
 rmdir logs /S/Q
 rmdir wwwroot /S/Q

+ 1 - 0
Service/GpuCgServer/GpuCgServer.csproj

@@ -206,6 +206,7 @@ del BouncyCastle*.xml
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns
+move AddIns\$(TargetName).pdb .
 copy $(SolutionDir)Service.svg Service.svg
 rmdir logs /S/Q
 rmdir wwwroot /S/Q

+ 1 - 0
Service/X2D1NoRefTaskServer/X2D1NoRefTaskServer.csproj

@@ -222,6 +222,7 @@ del BouncyCastle*.xml
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns
+move AddIns\$(TargetName).pdb .
 copy $(SolutionDir)Service.svg Service.svg
 rmdir logs /S/Q
 rmdir wwwroot /S/Q</PostBuildEvent>

+ 1 - 0
Service/X2D1TaskServer54/X3TaskServer54.csproj

@@ -209,6 +209,7 @@ del BouncyCastle*.xml
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns
+move AddIns\$(TargetName).pdb .
 copy $(SolutionDir)Service.svg Service.svg
 rmdir logs /S/Q
 rmdir wwwroot /S/Q</PostBuildEvent>

+ 1 - 0
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -637,6 +637,7 @@ copy $(SolutionDir)geo.txt geo.txt
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns
+move AddIns\$(TargetName).pdb .
 
 xcopy x64 AddIns\x64 /EHCIY
 xcopy x86 AddIns\x86 /EHCIY

+ 1 - 0
XdCxRhDW.Sender/XdCxRhDW.Sender.csproj

@@ -138,6 +138,7 @@
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns
+move AddIns\$(TargetName).pdb .
 del *.dll.config
 copy $(SolutionDir)Service.svg Service.svg</PostBuildEvent>
   </PropertyGroup>

+ 7 - 0
XdCxRhDW.sln

@@ -31,6 +31,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GpuCgServer", "Service\GpuC
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CpuCgServer", "Service\CpuCgServer\CpuCgServer.csproj", "{993D7982-3BB0-4339-ADD8-10D0C422FA5A}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CapMoni", "Service\CapMoni\CapMoni.csproj", "{205094BA-1381-43F3-8F42-0E1175587754}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -89,6 +91,10 @@ Global
 		{993D7982-3BB0-4339-ADD8-10D0C422FA5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{993D7982-3BB0-4339-ADD8-10D0C422FA5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{993D7982-3BB0-4339-ADD8-10D0C422FA5A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{205094BA-1381-43F3-8F42-0E1175587754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{205094BA-1381-43F3-8F42-0E1175587754}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{205094BA-1381-43F3-8F42-0E1175587754}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{205094BA-1381-43F3-8F42-0E1175587754}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -99,6 +105,7 @@ Global
 		{F3DE685F-37E5-41FE-B0E5-338CCF34AEF0} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
 		{36EF70B3-C602-4346-BDA2-D87B40C789A3} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
 		{993D7982-3BB0-4339-ADD8-10D0C422FA5A} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
+		{205094BA-1381-43F3-8F42-0E1175587754} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {657E89B6-AB65-4E75-965C-06D70796CB71}