David P.G e43c0df1cf 完成的变更:
1. 向 VariableTableManagementService 添加了 IEventService 依赖
   2. 将内存操作和事件触发逻辑合并到数据库操作方法中:
      - CreateVariableTableAsync 现在会在数据库创建后自动添加到内存并触发事件
      - UpdateVariableTableAsync 现在会在数据库更新后自动更新内存并触发事件
      - DeleteVariableTableAsync 现在会在数据库删除后自动从内存移除并触发事件
   3. 从类中删除了独立的内存操作方法
   4. 从接口中移除了内存操作方法
   5. 更新了所有调用这些服务的代码,使它们不再调用已删除的内存方法
   6. 扩展了 IEventService 以支持 VariableTableChanged 事件
2025-10-01 19:16:47 +08:00
2025-10-01 19:16:47 +08:00
2025-10-01 19:16:47 +08:00
2025-10-01 19:16:47 +08:00
2025-10-01 19:16:47 +08:00
2025-09-16 12:29:09 +08:00
2025-09-04 14:46:50 +08:00
2025-08-25 20:16:57 +08:00
2025-09-06 12:03:39 +08:00
2025-09-07 19:01:58 +08:00

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.

Trigger System

The trigger system has been updated to support associating triggers with multiple variables instead of just one. This allows for more flexible trigger configurations where a single trigger can monitor multiple variables.

Key Changes

  • Modified TriggerDefinition to use a list of variable IDs instead of a single variable ID
  • Added a new TriggerVariables table to maintain the many-to-many relationship between triggers and variables
  • Updated the UI to support selecting multiple variables when creating or editing triggers
  • Updated all related services and repositories to handle the new many-to-many relationship
Description
设备管理系统
Readme 2.5 MiB