2024-12-19 16:07:07 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using JiShe.CollectBus.Interfaces;
|
|
|
|
|
|
using Volo.Abp.Domain.Entities;
|
2024-11-13 17:50:52 +08:00
|
|
|
|
|
2025-03-14 14:28:04 +08:00
|
|
|
|
namespace JiShe.CollectBus.IotSystems.Protocols
|
2024-09-30 17:10:43 +08:00
|
|
|
|
{
|
2024-12-19 16:07:07 +08:00
|
|
|
|
public class ProtocolInfo : AggregateRoot<Guid>, IProtocolInfo
|
2024-09-30 17:10:43 +08:00
|
|
|
|
{
|
2024-12-19 16:07:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
///
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="name"></param>
|
|
|
|
|
|
/// <param name="baseProtocol"></param>
|
|
|
|
|
|
/// <param name="type"></param>
|
|
|
|
|
|
/// <param name="description"></param>
|
|
|
|
|
|
/// <param name="regularExpression"></param>
|
2024-10-08 14:41:41 +08:00
|
|
|
|
public ProtocolInfo(string name, string baseProtocol, string type, string description, string regularExpression)
|
2024-09-30 17:10:43 +08:00
|
|
|
|
{
|
2025-04-22 21:01:28 +08:00
|
|
|
|
Code = $"PL-{DateTime.Now:yyyyMMddHHmmss}";
|
2024-09-30 17:10:43 +08:00
|
|
|
|
Name = name;
|
|
|
|
|
|
Type = type;
|
|
|
|
|
|
Description = description;
|
|
|
|
|
|
RegularExpression = regularExpression;
|
|
|
|
|
|
BaseProtocol = baseProtocol;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-22 21:01:28 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 协议编码,唯一识别
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Code { get; set; }
|
|
|
|
|
|
|
2024-09-30 17:10:43 +08:00
|
|
|
|
/// <summary>
|
2024-10-08 14:41:41 +08:00
|
|
|
|
/// 协议名称
|
2024-09-30 17:10:43 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-10-08 14:41:41 +08:00
|
|
|
|
/// 基础协议 376.1/645
|
2024-09-30 17:10:43 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string BaseProtocol { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-10-08 14:41:41 +08:00
|
|
|
|
/// 协议类型 TCP/UDP
|
2024-09-30 17:10:43 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Type { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-10-08 14:41:41 +08:00
|
|
|
|
/// 协议备注
|
2024-09-30 17:10:43 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-10-08 14:41:41 +08:00
|
|
|
|
/// 型号正则匹配
|
2024-09-30 17:10:43 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string RegularExpression { get; set; }
|
|
|
|
|
|
}
|
2024-10-08 14:41:41 +08:00
|
|
|
|
}
|