Quellcode durchsuchen

JsonRpcLite.dll更新1.0.1.2,JsonRpc调用均为异步,远程维护心跳间隔从Server端获取,

felix vor 1 Jahr
Ursprung
Commit
c2480b8c95

+ 4 - 0
Vinno.vCloud.Common.FIS/AfterSales/AfterSalesHeartRateKeeper.cs

@@ -19,6 +19,10 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
         public AfterSalesHeartRateKeeperV2(IDeviceService deviceService, string token, int heartRate = 5)
         {
             _deviceService = deviceService;
+            if (heartRate <= 0)
+            {
+                heartRate = 5;
+            }
             _heartRate = heartRate;
             _token = token;
         }

+ 1 - 1
Vinno.vCloud.Common.FIS/AfterSales/AfterSalesV2.cs

@@ -1092,7 +1092,7 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
         {
             if (_heartRateKeeper == null)
             {
-                _heartRateKeeper = new AfterSalesHeartRateKeeperV2(_deviceService, _token);
+                _heartRateKeeper = new AfterSalesHeartRateKeeperV2(_deviceService, _token, vCloudServerConfig.Instance.RemoteControlHeartRateSeconds);
                 _heartRateKeeper.Start();
             }
         }

+ 4 - 0
Vinno.vCloud.Common.FIS/HeartRateKeeperV2.cs

@@ -18,6 +18,10 @@ namespace Vinno.vCloud.Common.FIS
         public HeartRateKeeperV2(IDeviceService deviceService, string token, int heartRate = 300)
         {
             _deviceService = deviceService;
+            if (heartRate <= 0)
+            {
+                heartRate = 300;
+            }
             _heartRate = heartRate;
             _token = token;
         }

+ 4 - 0
Vinno.vCloud.Common.FIS/LiveVideos/PushHeartRateKeeperV2.cs

@@ -33,6 +33,10 @@ namespace Vinno.vCloud.Common.FIS.LiveVideos
             _heartRateType = EnumHeartRateType.LiveConsultation;
             _token = token;
             _heartRateCode = consultationCode;
+            if (checkInterval <= 0)
+            {
+                checkInterval = 5;
+            }
             _checkInterval = checkInterval;
             _liveConsultationService = liveConsultationService;
         }

+ 2 - 2
Vinno.vCloud.Common.FIS/vCloudServerConfig.cs

@@ -37,7 +37,7 @@ namespace Vinno.vCloud.Common.FIS
 
         public bool IsSelfRtcService { get; set; }
 
-        public int RemoteControlAskTimeoutSec { get; set; }
+        public int RemoteControlHeartRateSeconds { get; set; }
 
         public string LiveProtocol { get; set; }
 
@@ -54,7 +54,7 @@ namespace Vinno.vCloud.Common.FIS
 
         public override string ToString()
         {
-            return $"IsUploadThumbnail:{IsUploadThumbnail},PatientType:{PatientType},HeartRateSeconds:{HeartRateSeconds},NotificationUrl:{NotificationUrl},MergedChannel:{MergedChannel},LiveConsultationRateSeconds:{LiveConsultationRateSeconds},MergedVideoOutputWidth:{MergedVideoOutputWidth},MergedVideoOutputHeight:{MergedVideoOutputHeight},IsSelfRtcService:{IsSelfRtcService},RemoteControlAskTimeoutSec:{RemoteControlAskTimeoutSec},LiveProtocol:{LiveProtocol},LiveProtocolType:{LiveProtocolType}";
+            return $"IsUploadThumbnail:{IsUploadThumbnail},PatientType:{PatientType},HeartRateSeconds:{HeartRateSeconds},NotificationUrl:{NotificationUrl},MergedChannel:{MergedChannel},LiveConsultationRateSeconds:{LiveConsultationRateSeconds},MergedVideoOutputWidth:{MergedVideoOutputWidth},MergedVideoOutputHeight:{MergedVideoOutputHeight},IsSelfRtcService:{IsSelfRtcService},RemoteControlHeartRateSeconds:{RemoteControlHeartRateSeconds},LiveProtocol:{LiveProtocol},LiveProtocolType:{LiveProtocolType}";
         }
     }
 }

+ 1 - 1
Vinno.vCloud.Common.FIS/vCloudTerminalV2.cs

@@ -369,7 +369,7 @@ namespace Vinno.vCloud.Common.FIS
                 vCloudServerConfig.Instance.MergedVideoOutputHeight = result.MergedVideoOutputHeight;
                 vCloudServerConfig.Instance.MergedVideoOutputWidth = result.MergedVideoOutputWidth;
                 vCloudServerConfig.Instance.IsSelfRtcService = result.IsSelfRtcService;
-                vCloudServerConfig.Instance.RemoteControlAskTimeoutSec = result.RemoteControlAskTimeoutSec;
+                vCloudServerConfig.Instance.RemoteControlHeartRateSeconds = result.RemoteControlHeartRateSeconds;
                 vCloudServerConfig.Instance.LiveProtocol = result.LiveProtocol;
                 vCloudServerConfig.Instance.LiveProtocolType = result.LiveProtocolType;
                 vCloudServerConfig.Instance.FISWebUrl = result.FISWebUrl;

BIN
packages/JsonRpcLite.dll


BIN
packages/WingInterfaceLibrary.dll