using JiShe.CollectBus.Protocol.Dto; using JiShe.CollectBus.Protocol.Interfaces; using JiShe.CollectBus.Protocol3761; using Microsoft.Extensions.Logging; namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H { /// /// 5.1.3.1 F1:全部确认:对收到报文中的全部数据单元标识进行确认 /// public class AFN0_F1_Analysis: IAnalysisStrategy> { private readonly ILogger _logger; public AFN0_F1_Analysis(ILogger logger) { _logger = logger; } public Task> ExecuteAsync(TB3761 tB3761) { try { ArgumentNullException.ThrowIfNull(nameof(tB3761)); UnitDataAnalysis dto = new UnitDataAnalysis { Code = tB3761.A.Code, AFN = tB3761.AFN_FC.AFN, Fn = tB3761.DT.Fn, Pn = tB3761.DA.Pn, Data= true }; return Task.FromResult(dto); } catch (Exception ex) { _logger.LogError(ex, $"00_1解析失败:{tB3761.A.Code}-{tB3761.DT.Fn}-{tB3761.BaseHexMessage.HexMessageString},{ex.Message}"); return null; } } } }