mirror of
https://github.com/ThingsGateway/ThingsGateway.git
synced 2026-10-28 03:37:45 +08:00
整理
This commit is contained in:
@@ -1407,7 +1407,7 @@ public class OPCUAClient : DisposableObject
|
||||
EndpointConfiguration endpointConfiguration = EndpointConfiguration.Create(m_configuration);
|
||||
|
||||
ConfiguredEndpoint endpoint = new ConfiguredEndpoint(null, endpointDescription, endpointConfiguration);
|
||||
var d= await m_application.CheckApplicationInstanceCertificate(true, 0);
|
||||
var d = await m_application.CheckApplicationInstanceCertificate(true, 0);
|
||||
//var x509 = await m_configuration.SecurityConfiguration.ApplicationCertificate.Find(true);
|
||||
m_session = await Opc.Ua.Client.Session.Create(
|
||||
m_configuration,
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
global using System;
|
||||
|
||||
global using TouchSocket.Core;
|
||||
global using TouchSocket.Sockets;
|
||||
|
||||
@@ -5,9 +5,7 @@ using System.Threading.Tasks;
|
||||
|
||||
using ThingsGateway.Foundation.Extension;
|
||||
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Resources;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace ThingsGateway.Foundation.Adapter.Siemens
|
||||
{
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
global using TouchSocket.Core;
|
||||
global using TouchSocket.Sockets;
|
||||
@@ -6,9 +6,6 @@ using ThingsGateway.Foundation;
|
||||
using ThingsGateway.Foundation.Serial;
|
||||
using ThingsGateway.Web.Foundation;
|
||||
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace ThingsGateway.Modbus
|
||||
{
|
||||
public class ModbusRtu : DriverBase, IDisposable
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
using ThingsGateway.Foundation;
|
||||
using ThingsGateway.Web.Foundation;
|
||||
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace ThingsGateway.Modbus
|
||||
{
|
||||
public class ModbusRtuOverTcp : DriverBase, IDisposable
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
using ThingsGateway.Foundation;
|
||||
using ThingsGateway.Web.Foundation;
|
||||
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace ThingsGateway.Modbus
|
||||
{
|
||||
public class ModbusRtuOverUdp : DriverBase
|
||||
|
||||
@@ -9,9 +9,6 @@ using ThingsGateway.Foundation.Adapter.Modbus;
|
||||
using ThingsGateway.Foundation.Extension;
|
||||
using ThingsGateway.Web.Foundation;
|
||||
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace ThingsGateway.Modbus
|
||||
{
|
||||
public class ModbusServer : UpLoadBase
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
using ThingsGateway.Foundation;
|
||||
using ThingsGateway.Web.Foundation;
|
||||
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace ThingsGateway.Modbus
|
||||
{
|
||||
public class ModbusTcp : DriverBase
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
using ThingsGateway.Foundation;
|
||||
using ThingsGateway.Web.Foundation;
|
||||
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
|
||||
namespace ThingsGateway.Modbus
|
||||
{
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace ThingsGateway.Mqtt
|
||||
foreach (var item in devData)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var devMessage = new MqttApplicationMessageBuilder()
|
||||
.WithTopic($"{DeviceTopic}")
|
||||
.WithPayload(item.GetSciptListValue(BigTextScriptDeviceModel)).Build();
|
||||
|
||||
@@ -121,7 +121,7 @@ public partial class OPCUAServer : UpLoadBase
|
||||
|
||||
private void VariableValueChange(CollectVariableRunTime collectVariableRunTime)
|
||||
{
|
||||
CollectVariableRunTimes.Enqueue(collectVariableRunTime.Adapt<VariableData>());
|
||||
CollectVariableRunTimes.Enqueue(collectVariableRunTime.Adapt<VariableData>());
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ public partial class OPCUAServer : UpLoadBase
|
||||
TrustedPeerCertificates = new CertificateTrustList()
|
||||
{
|
||||
StoreType = CertificateStoreType.Directory,
|
||||
StorePath = "%CommonApplicationData%\\ThingsGateway\\pki\\issuer",
|
||||
StorePath = "%CommonApplicationData%\\ThingsGateway\\pki\\issuer",
|
||||
},
|
||||
|
||||
TrustedIssuerCertificates = new CertificateTrustList()
|
||||
|
||||
@@ -96,12 +96,12 @@ public class ThingsGatewayNodeManager : CustomNodeManager2
|
||||
/// <summary>
|
||||
/// 读取历史数据
|
||||
/// </summary>
|
||||
public override void HistoryRead(OperationContext context,
|
||||
HistoryReadDetails details,
|
||||
TimestampsToReturn timestampsToReturn,
|
||||
bool releaseContinuationPoints,
|
||||
IList<HistoryReadValueId> nodesToRead,
|
||||
IList<HistoryReadResult> results,
|
||||
public override void HistoryRead(OperationContext context,
|
||||
HistoryReadDetails details,
|
||||
TimestampsToReturn timestampsToReturn,
|
||||
bool releaseContinuationPoints,
|
||||
IList<HistoryReadValueId> nodesToRead,
|
||||
IList<HistoryReadResult> results,
|
||||
IList<ServiceResult> errors)
|
||||
{
|
||||
base.HistoryRead(context, details, timestampsToReturn, releaseContinuationPoints, nodesToRead, results, errors);
|
||||
|
||||
@@ -233,7 +233,7 @@ public partial class ThingsGatewayServer : StandardServer
|
||||
"Security token is not a valid username token. An empty password is not accepted.");
|
||||
}
|
||||
var _openApiUserService = _serviceScope.ServiceProvider.GetService<IOpenApiUserService>();
|
||||
var userInfo = _openApiUserService.GetUserByAccount(userName).GetAwaiter().GetResult();//获取用户信息
|
||||
var userInfo = _openApiUserService.GetUserByAccount(userName).GetAwaiter().GetResult();//获取用户信息
|
||||
if (userInfo == null)
|
||||
{
|
||||
// construct translation object with default text.
|
||||
@@ -259,7 +259,7 @@ public partial class ThingsGatewayServer : StandardServer
|
||||
{
|
||||
return new UserIdentity(userNameToken);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
private void VerifyUserTokenCertificate(X509Certificate2 certificate)
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
using NewLife.Serialization;
|
||||
|
||||
using RabbitMQ.Client;
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
@@ -14,8 +12,6 @@ using ThingsGateway.Foundation;
|
||||
using ThingsGateway.Foundation.Extension;
|
||||
using ThingsGateway.Web.Foundation;
|
||||
|
||||
using TouchSocket.Core;
|
||||
|
||||
namespace ThingsGateway.RabbitMQ
|
||||
{
|
||||
public class RabbitMQClient : UpLoadBase
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
global using System.Net;
|
||||
|
||||
global using ThingsGateway.Foundation.Adapter.Siemens;
|
||||
global using ThingsGateway.Web.Foundation;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace ThingsGateway.Application
|
||||
{
|
||||
|
||||
|
||||
/// <inheritdoc cref="IUserCenterService"/>
|
||||
[Injection(Proxy = typeof(OperDispatchProxy))]
|
||||
public class UserCenterService : DbRepository<SysUser>, IUserCenterService
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace ThingsGateway.Foundation.Extension
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public static class StringExtension
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
{
|
||||
private byte[] sendBytes = new byte[] { };
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public int BodyLength { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public byte[] HeadBytes { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public virtual int HeadBytesLength { get; }
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public byte[] ReceivedBytes { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public byte[] SendBytes
|
||||
{
|
||||
get
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public abstract bool CheckHeadBytes(byte[] head);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
/// </summary>
|
||||
public enum BcdFormat
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
C8421 = 1,
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
C5421 = 2,
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
C2421 = 3,
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
C3 = 4,
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
Gray = 5,
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ namespace ThingsGateway.Foundation
|
||||
var task = m_waitHandle.WaitOneAsync();
|
||||
if (Task.WhenAny(task, Task.Delay(millisecond)).GetAwaiter().GetResult() == task)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user