using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace CoreAgent.ProtocolClient.Models
{
///
/// 小区配置实体,对应无线参数配置
/// 用于存储LTE小区的各种物理层和协议层配置参数
/// 支持JSON序列化,属性名与外部API保持一致
///
public class CellConfig
{
/// 下行天线数量
[JsonProperty("n_antenna_dl")]
public int NAntennaDl { get; set; }
/// 上行天线数量
[JsonProperty("n_antenna_ul")]
public int NAntennaUl { get; set; }
/// 下行传输层数
[JsonProperty("n_layer_dl")]
public int NLayerDl { get; set; }
/// 上行传输层数
[JsonProperty("n_layer_ul")]
public int NLayerUl { get; set; }
/// 天线增益(dB)
[JsonProperty("gain")]
public int Gain { get; set; }
/// 上行链路是否禁用
[JsonProperty("ul_disabled")]
public bool UlDisabled { get; set; }
/// 射频端口号
[JsonProperty("rf_port")]
public int RfPort { get; set; }
/// 下行QAM调制阶数
[JsonProperty("dl_qam")]
public int DlQam { get; set; }
/// 上行QAM调制阶数
[JsonProperty("ul_qam")]
public int UlQam { get; set; }
/// 物理小区标识(PCI)
[JsonProperty("n_id_cell")]
public int NIdCell { get; set; }
/// 下行资源块数量
[JsonProperty("n_rb_dl")]
public int NRbDl { get; set; }
/// 上行资源块数量
[JsonProperty("n_rb_ul")]
public int NRbUl { get; set; }
/// 下行E-UTRA绝对射频信道号
[JsonProperty("dl_earfcn")]
public int DlEarfcn { get; set; }
/// 上行E-UTRA绝对射频信道号
[JsonProperty("ul_earfcn")]
public int UlEarfcn { get; set; }
/// LTE频段号
[JsonProperty("band")]
public int Band { get; set; }
/// 下行载波频率(Hz)
[JsonProperty("dl_freq")]
public long DlFreq { get; set; }
/// 上行载波频率(Hz)
[JsonProperty("ul_freq")]
public long UlFreq { get; set; }
/// 双工模式(FDD/TDD)
[JsonProperty("mode")]
public string Mode { get; set; } = string.Empty;
/// PRACH序列索引
[JsonProperty("prach_sequence_index")]
public int PrachSequenceIndex { get; set; }
/// 下行循环前缀类型
[JsonProperty("dl_cyclic_prefix")]
public string DlCyclicPrefix { get; set; } = string.Empty;
/// 上行循环前缀类型
[JsonProperty("ul_cyclic_prefix")]
public string UlCyclicPrefix { get; set; } = string.Empty;
/// PRACH配置索引
[JsonProperty("prach_config_index")]
public int PrachConfigIndex { get; set; }
/// PRACH频域偏移
[JsonProperty("prach_freq_offset")]
public int PrachFreqOffset { get; set; }
/// PUCCH delta shift参数
[JsonProperty("delta_pucch_shift")]
public int DeltaPucchShift { get; set; }
/// CQI报告的资源块数量
[JsonProperty("n_rb_cqi")]
public int NRbCqi { get; set; }
/// 循环移位天线端口数量
[JsonProperty("n_cs_an")]
public int NCsAn { get; set; }
/// PUCCH资源配置列表
[JsonProperty("pucch_allocation")]
public List PucchAllocation { get; set; } = new();
/// PUCCH ACK/NACK起始位置
[JsonProperty("pucch_ack_nack_start")]
public int PucchAckNackStart { get; set; }
/// PUCCH保留资源块列表
[JsonProperty("pucch_reserved_rbs")]
public List PucchReservedRbs { get; set; } = new();
/// 调度请求(SR)资源数量
[JsonProperty("sr_resource_count")]
public int SrResourceCount { get; set; }
/// CQI资源数量
[JsonProperty("cqi_resource_count")]
public int CqiResourceCount { get; set; }
/// SRS资源配置
[JsonProperty("srs_resources")]
public SrsResources SrsResources { get; set; } = new();
/// 保证比特率(GBR)配置
[JsonProperty("gbr")]
public GbrConfig Gbr { get; set; } = new();
/// 跟踪区域码(TAC)
[JsonProperty("tac")]
public int Tac { get; set; }
/// 公共陆地移动网络(PLMN)列表
[JsonProperty("plmn_list")]
public List PlmnList { get; set; } = new();
}
///
/// PUCCH资源配置结构
/// 定义物理上行控制信道的资源配置参数
///
public class PucchAllocation
{
/// PUCCH格式类型
[JsonProperty("type")]
public string Type { get; set; } = string.Empty;
/// 分配的资源块数量
[JsonProperty("rbs")]
public int Rbs { get; set; }
/// PUCCH参数n
[JsonProperty("n")]
public int N { get; set; }
}
///
/// SRS资源配置结构
/// 定义探测参考信号的资源配置参数
///
public class SrsResources
{
/// 频域偏移
[JsonProperty("offsets")]
public int Offsets { get; set; }
/// 频点数量
[JsonProperty("freqs")]
public int Freqs { get; set; }
/// 总资源数量
[JsonProperty("total")]
public int Total { get; set; }
}
///
/// 保证比特率(GBR)配置结构
/// 定义服务质量相关的比特率限制
///
public class GbrConfig
{
/// 下行速率限制(bps)
[JsonProperty("dl_limit")]
public int DlLimit { get; set; }
/// 上行速率限制(bps)
[JsonProperty("ul_limit")]
public int UlLimit { get; set; }
}
///
/// PLMN配置项
/// 定义公共陆地移动网络的配置信息
///
public class PlmnItem
{
/// PLMN编码(MCC+MNC)
[JsonProperty("plmn")]
public string Plmn { get; set; } = string.Empty;
/// 是否为保留PLMN
[JsonProperty("reserved")]
public bool Reserved { get; set; }
}
}