using DMS.Core.Models; using DMS.Infrastructure.Models; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace DMS.Infrastructure.Interfaces.Services { /// /// 定义OPC UA服务管理器的接口 /// public interface IOpcUaServiceManager : IDisposable { /// /// 初始化服务管理器 /// Task InitializeAsync(CancellationToken cancellationToken = default); /// /// 添加设备到监控列表 /// void AddDevice(DMS.Core.Models.Device device); /// /// 移除设备监控 /// Task RemoveDeviceAsync(int deviceId, CancellationToken cancellationToken = default); /// /// 更新设备变量 /// void UpdateVariables(int deviceId, List variables); /// /// 获取设备连接状态 /// bool IsDeviceConnected(int deviceId); /// /// 重新连接设备 /// Task ReconnectDeviceAsync(int deviceId, CancellationToken cancellationToken = default); /// /// 获取所有监控的设备ID /// IEnumerable GetMonitoredDeviceIds(); /// /// 连接指定设备 /// Task ConnectDeviceAsync(int deviceId, CancellationToken cancellationToken = default); /// /// 断开指定设备连接 /// Task DisconnectDeviceAsync(int deviceId, CancellationToken cancellationToken = default); /// /// 批量连接设备 /// Task ConnectDevicesAsync(IEnumerable deviceIds, CancellationToken cancellationToken = default); /// /// 批量断开设备连接 /// Task DisconnectDevicesAsync(IEnumerable deviceIds, CancellationToken cancellationToken = default); } }