1f9c0a111104f06a63a0fa9f322fda21ed723f68
2 3 - 迁移 IMqttServiceManager 接口到 DMS.Core 4 - 在 DataCenterService 中添加 MQTT 服务器和变量别名的加载逻辑 5 - 实现 MqttPublishProcessor 的核心处理逻辑 6 - 为 DTO 和 ViewModel 的 MqttAliases 属性提供默认空列表初始化 7 - 更新 AutoMapper 映射配置以支持 VariableMqttAliasDto
PMSWPF
OPC UA Service
This project includes an OPC UA service implementation that provides the following functionalities:
Features
- Connect to OPC UA servers
- Browse nodes in the OPC UA address space
- Read and write values from/to OPC UA nodes
- Add subscriptions for monitoring node changes
Usage
// Create an instance of the OPC UA service
var opcUaService = new OpcUaService();
// Connect to an OPC UA server
await opcUaService.CreateSession("opc.tcp://localhost:4840");
// Check connection status
if (opcUaService.IsConnected())
{
// Browse nodes
var rootNodeId = ObjectIds.RootFolder;
var references = opcUaService.BrowseNodes(rootNodeId);
// Read a value
var value = opcUaService.ReadValue(someNodeId);
// Write a value
opcUaService.WriteValue(someNodeId, newValue);
// Add a subscription
var subscription = opcUaService.AddSubscription("MySubscription");
}
// Disconnect when done
opcUaService.Disconnect();
Testing
Unit tests for the OPC UA service are included in the DMS.Infrastructure.UnitTests project. Run them using your preferred test runner.
Description