35 lines
1.1 KiB
C#
Raw Normal View History

2025-04-24 19:31:28 +08:00
using JiShe.CollectBus.Common.Extensions;
2025-04-25 14:35:59 +08:00
using JiShe.CollectBus.Protocol.Interfaces;
2025-04-24 19:31:28 +08:00
using Microsoft.Extensions.Logging;
2025-04-27 09:16:37 +08:00
namespace JiShe.CollectBus.Protocol.T37612012.Appendix
2025-04-24 19:31:28 +08:00
{
/// <summary>
/// 年时区数 p≤14
/// </summary>
public class Appendix_04000201 : IAnalysisStrategy<List<string>>
2025-04-24 19:31:28 +08:00
{
private int valueByteCount = 1;
private readonly ILogger<Appendix_04000201> _logger;
public Appendix_04000201(ILogger<Appendix_04000201> logger)
{
_logger = logger;
}
public async Task<bool> ExecuteAsync(List<string> data, Action<dynamic>? result = null)
2025-04-24 19:31:28 +08:00
{
List<string> values = new List<string>();
values.Insert(0, "10_94");
values.Insert(0, "年时区数");
values.Add((data.Count / valueByteCount).ToString());//值总数
foreach (var item in data)
{
values.Add(item.HexToDec().ToString());
}
result?.Invoke(values);
return await Task.FromResult(true);
2025-04-24 19:31:28 +08:00
}
}
}