2025-04-26 19:04:50 +08:00
|
|
|
|
using JiShe.CollectBus.Common.Enums;
|
2025-05-12 16:09:53 +08:00
|
|
|
|
using JiShe.CollectBus.Common.Extensions;
|
2025-04-29 11:43:16 +08:00
|
|
|
|
using System;
|
2025-05-12 14:02:22 +08:00
|
|
|
|
using System.Collections.Generic;
|
2025-04-26 19:04:50 +08:00
|
|
|
|
|
|
|
|
|
|
namespace JiShe.CollectBus.Protocol.Dto
|
2025-04-22 16:48:53 +08:00
|
|
|
|
{
|
2025-04-24 19:31:28 +08:00
|
|
|
|
public class UnitDataAnalysis
|
2025-04-22 16:48:53 +08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 集中器地址
|
|
|
|
|
|
/// </summary>
|
2025-04-25 14:35:59 +08:00
|
|
|
|
public string Code { get; set; } = null!;
|
2025-04-22 16:48:53 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// AFN功能码
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int AFN { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 信息点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int Pn { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 信息类
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int Fn { get; set; }
|
|
|
|
|
|
|
2025-04-25 14:35:59 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 主站地址 MSA
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int MSA { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 响应帧序号
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int PSEQ { get; set; }
|
|
|
|
|
|
|
2025-04-26 19:04:50 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 响应帧
|
|
|
|
|
|
/// </summary>
|
2025-05-12 14:02:22 +08:00
|
|
|
|
public string? ReceivedHexMessage { get; set; } = null;
|
2025-04-26 19:04:50 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 消息ID
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string? MessageId { get; set; }
|
|
|
|
|
|
|
2025-04-29 11:43:16 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 消息时间
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public DateTime? ReceivedTime { get; set; }
|
|
|
|
|
|
|
2025-04-26 19:04:50 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 采集密度
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int TimeDensity { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 采集密度单位
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public DensityUnit DensityUnit { get; set; }= DensityUnit.Minute;
|
2025-05-12 16:09:53 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 数据类型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string DataType { get; set; }= null!;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 数据项编码
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ItemCode => $"{AFN.HexToDecStr().PadLeft(2, '0')}_{Fn}";
|
|
|
|
|
|
|
2025-04-24 19:31:28 +08:00
|
|
|
|
}
|
2025-04-22 16:48:53 +08:00
|
|
|
|
|
2025-04-24 19:31:28 +08:00
|
|
|
|
public class UnitDataAnalysis<T>: UnitDataAnalysis
|
|
|
|
|
|
{
|
2025-04-22 16:48:53 +08:00
|
|
|
|
/// <summary>
|
2025-04-24 19:31:28 +08:00
|
|
|
|
/// 数据
|
2025-04-22 16:48:53 +08:00
|
|
|
|
/// </summary>
|
2025-04-24 19:31:28 +08:00
|
|
|
|
public T? Data { get; set; }
|
2025-04-22 16:48:53 +08:00
|
|
|
|
}
|
2025-04-24 19:31:28 +08:00
|
|
|
|
|
2025-04-22 16:48:53 +08:00
|
|
|
|
}
|