ntminer 5 年之前
父节点
当前提交
47650d0dad

+ 1 - 1
src/AppModels/MinerStudio/Vms/GpuProfilesPageViewModel.cs

@@ -1,5 +1,5 @@
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using NTMiner.Core.Profile;
 using NTMiner.JsonDb;
 using NTMiner.Vms;

+ 1 - 1
src/AppModels/MinerStudio/Vms/GpuSpeedDataViewModel.cs

@@ -1,5 +1,5 @@
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using NTMiner.Vms;
 using System;
 using System.Windows.Media;

+ 1 - 1
src/AppModels/MinerStudio/Vms/GpuSpeedDataViewModels.cs

@@ -1,4 +1,4 @@
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using NTMiner.Vms;
 using System;
 using System.Collections.Generic;

+ 1 - 1
src/AppModels/MinerStudio/Vms/MinerClientViewModel.cs

@@ -1,5 +1,5 @@
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using NTMiner.Core.MinerServer;
 using NTMiner.RemoteDesktop;
 using NTMiner.Vms;

+ 1 - 1
src/NTMinerDataSchemas/Core/MinerClient/GpuData.cs → src/NTMinerDataSchemas/Core/Gpus/GpuData.cs

@@ -1,4 +1,4 @@
-namespace NTMiner.Core.MinerClient {
+namespace NTMiner.Core.Gpus {
     public class GpuData : IGpuStaticData {
         public GpuData() {
             this.PowerDefault = 100;

+ 1 - 1
src/NTMinerDataSchemas/Core/MinerClient/GpuSpeedData.cs → src/NTMinerDataSchemas/Core/Gpus/GpuSpeedData.cs

@@ -1,4 +1,4 @@
-namespace NTMiner.Core.MinerClient {
+namespace NTMiner.Core.Gpus {
     public class GpuSpeedData : IGpuSpeedData {
         public GpuSpeedData() {
         }

+ 9 - 0
src/NTMinerDataSchemas/Core/Gpus/IGpuName.cs

@@ -0,0 +1,9 @@
+namespace NTMiner.Core.Gpus {
+    public interface IGpuName {
+        string Name { get; }
+        /// <summary>
+        /// 单位Byte
+        /// </summary>
+        ulong TotalMemory { get; set; }
+    }
+}

+ 1 - 1
src/NTMinerDataSchemas/Core/MinerClient/IGpuSpeedData.cs → src/NTMinerDataSchemas/Core/Gpus/IGpuSpeedData.cs

@@ -1,4 +1,4 @@
-namespace NTMiner.Core.MinerClient {
+namespace NTMiner.Core.Gpus {
     public interface IGpuSpeedData {
         int Index { get; }
 

+ 2 - 8
src/NTMinerDataSchemas/Core/MinerClient/IGpuStaticData.cs → src/NTMinerDataSchemas/Core/Gpus/IGpuStaticData.cs

@@ -1,17 +1,11 @@
-namespace NTMiner.Core.MinerClient {
-    public interface IGpuStaticData {
+namespace NTMiner.Core.Gpus {
+    public interface IGpuStaticData : IGpuName {
         GpuType GpuType { get; }
         int Index { get; }
         /// <summary>
         /// 必须是数字格式
         /// </summary>
         string BusId { get; }
-        string Name { get; }
-
-        /// <summary>
-        /// 单位Byte
-        /// </summary>
-        ulong TotalMemory { get; set; }
         int CoreClockDeltaMin { get; set; }
         int CoreClockDeltaMax { get; set; }
 

+ 1 - 1
src/NTMinerDataSchemas/Core/MinerServer/ClientData.cs

@@ -1,6 +1,6 @@
 using LiteDB;
 using Newtonsoft.Json;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using NTMiner.Report;
 using System;
 using System.Collections.Generic;

+ 1 - 1
src/NTMinerDataSchemas/JsonDb/GpuProfilesJsonDb.cs

@@ -1,5 +1,5 @@
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using NTMiner.Core.Profile;
 using System;
 using System.Collections.Generic;

+ 1 - 1
src/NTMinerDataSchemas/JsonDb/IGpuProfilesJsonDb.cs

@@ -1,5 +1,5 @@
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using NTMiner.Core.Profile;
 using System.Collections.Generic;
 

+ 6 - 4
src/NTMinerDataSchemas/NTMinerDataSchemas.csproj

@@ -42,6 +42,7 @@
   <ItemGroup>
     <Compile Include="Base64Util.cs" />
     <Compile Include="Core\CaptchaData.cs" />
+    <Compile Include="Core\Gpus\IGpuName.cs" />
     <Compile Include="Core\ICaptcha.cs" />
     <Compile Include="Core\IOperationResult.cs" />
     <Compile Include="Core\LocalMessageDto.cs" />
@@ -158,7 +159,7 @@
     <Compile Include="Ws\IWsClient.cs" />
     <Compile Include="Ws\WsClientState.cs" />
     <Compile Include="Ws\WsMessage.cs" />
-    <Compile Include="Core\MinerClient\IGpuSpeedData.cs" />
+    <Compile Include="Core\Gpus\IGpuSpeedData.cs" />
     <Compile Include="Core\MinerClient\ILocalIp.cs" />
     <Compile Include="Report\ISpeedDto.cs" />
     <Compile Include="Core\MinerClient\LocalIpDto.cs" />
@@ -178,8 +179,8 @@
     <Compile Include="Core\ILocalMessage.cs" />
     <Compile Include="Core\KernelOutputKeywordData.cs" />
     <Compile Include="Core\LocalMessageData.cs" />
-    <Compile Include="Core\MinerClient\GpuData.cs" />
-    <Compile Include="Core\MinerClient\IGpuStaticData.cs" />
+    <Compile Include="Core\Gpus\GpuData.cs" />
+    <Compile Include="Core\Gpus\IGpuStaticData.cs" />
     <Compile Include="Core\MinerServer\MinerData.cs" />
     <Compile Include="Core\MinerServer\MinerIdsRequest.cs" />
     <Compile Include="Core\Profile\CoinOverClockData.cs" />
@@ -190,7 +191,7 @@
     <Compile Include="ILevelEntity`1.cs" />
     <Compile Include="Core\IPool.cs" />
     <Compile Include="ISortable.cs" />
-    <Compile Include="Core\MinerClient\GpuSpeedData.cs" />
+    <Compile Include="Core\Gpus\GpuSpeedData.cs" />
     <Compile Include="DataRequest`1.cs" />
     <Compile Include="Core\AppSettingData.cs" />
     <Compile Include="Core\MinerServer\AppSettingRequest.cs" />
@@ -253,5 +254,6 @@
     <None Include="packages.config" />
     <None Include="README.md" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 1 - 1
src/NTMinerDataSchemas/Report/ISpeedDto.cs

@@ -1,5 +1,5 @@
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using System;
 
 namespace NTMiner.Report {

+ 1 - 1
src/NTMinerDataSchemas/Report/SpeedData.cs

@@ -1,6 +1,6 @@
 using Newtonsoft.Json;
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using System;
 
 namespace NTMiner.Report {

+ 1 - 1
src/NTMinerDataSchemas/Report/SpeedDto.cs

@@ -1,5 +1,5 @@
 using NTMiner.Core;
-using NTMiner.Core.MinerClient;
+using NTMiner.Core.Gpus;
 using System;
 
 namespace NTMiner.Report {