2025-04-25 14:23:06 +08:00
|
|
|
|
using JiShe.CollectBus.Protocol.Dto;
|
|
|
|
|
|
using JiShe.CollectBus.Protocol.Interfaces;
|
|
|
|
|
|
using JiShe.CollectBus.Protocol3761;
|
2025-04-22 16:48:53 +08:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
2025-04-26 19:04:50 +08:00
|
|
|
|
namespace JiShe.CollectBus.Protocol.T37612012.AFN_00H
|
2025-04-22 16:48:53 +08:00
|
|
|
|
{
|
2025-04-22 23:45:08 +08:00
|
|
|
|
/// <summary>
|
2025-04-24 19:31:28 +08:00
|
|
|
|
/// 5.1.3.1 F1:全部确认:对收到报文中的全部数据单元标识进行确认
|
2025-04-22 23:45:08 +08:00
|
|
|
|
/// </summary>
|
2025-04-24 19:31:28 +08:00
|
|
|
|
public class AFN0_F1_Analysis: IAnalysisStrategy<TB3761, UnitDataAnalysis<bool>>
|
2025-04-22 16:48:53 +08:00
|
|
|
|
{
|
|
|
|
|
|
private readonly ILogger<AFN0_F1_Analysis> _logger;
|
|
|
|
|
|
|
|
|
|
|
|
public AFN0_F1_Analysis(ILogger<AFN0_F1_Analysis> logger)
|
|
|
|
|
|
{
|
|
|
|
|
|
_logger = logger;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-24 19:40:51 +08:00
|
|
|
|
public Task<UnitDataAnalysis<bool>> ExecuteAsync(TB3761 tB3761)
|
2025-04-22 16:48:53 +08:00
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArgumentNullException.ThrowIfNull(nameof(tB3761));
|
2025-04-24 19:40:51 +08:00
|
|
|
|
UnitDataAnalysis<bool> dto = new UnitDataAnalysis<bool>
|
2025-04-22 16:48:53 +08:00
|
|
|
|
{
|
2025-04-25 09:28:56 +08:00
|
|
|
|
Code = tB3761.A.Code,
|
|
|
|
|
|
AFN = tB3761.AFN_FC.AFN,
|
|
|
|
|
|
Fn = tB3761.DT.Fn,
|
|
|
|
|
|
Pn = tB3761.DA.Pn,
|
|
|
|
|
|
Data= true
|
2025-04-22 16:48:53 +08:00
|
|
|
|
};
|
|
|
|
|
|
return Task.FromResult(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
2025-04-25 09:28:56 +08:00
|
|
|
|
_logger.LogError(ex, $"00_1解析失败:{tB3761.A.Code}-{tB3761.DT.Fn}-{tB3761.BaseHexMessage.HexMessageString},{ex.Message}");
|
2025-04-22 16:48:53 +08:00
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-04-24 00:34:00 +08:00
|
|
|
|
|
2025-04-22 16:48:53 +08:00
|
|
|
|
}
|