将所有的VariableData改为Variable,将DataVariables改为Variables,修复了变量添加MQTT服务器后,服务器列表不更新的问题
This commit is contained in:
23
Services/Processors/LoggingProcessor.cs
Normal file
23
Services/Processors/LoggingProcessor.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PMSWPF.Helper;
|
||||
using PMSWPF.Models;
|
||||
|
||||
namespace PMSWPF.Services.Processors;
|
||||
|
||||
/// <summary>
|
||||
/// 一个简单的数据处理器实现,用于演示。
|
||||
/// 其主要功能是记录接收到的变量数据的名称和值。
|
||||
/// </summary>
|
||||
public class LoggingProcessor : IVariableProcessor
|
||||
{
|
||||
public LoggingProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
public Task ProcessAsync(VariableContext context)
|
||||
{
|
||||
// NlogHelper.Info($"处理数据: {context.Data.Name}, 值: {context.Data.DataValue}");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user