You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
3.6 KiB
117 lines
3.6 KiB
using System;
|
|
|
|
namespace CoreAgent.ProtocolClient.Models
|
|
{
|
|
/// <summary>
|
|
/// TMSI匹配结果模型
|
|
/// 用于存储通过TMSI匹配的请求UE ID和接收UE ID
|
|
/// </summary>
|
|
public class TmsiMatchResult
|
|
{
|
|
/// <summary>
|
|
/// TMSI标识符
|
|
/// </summary>
|
|
public uint Tmsi { get; set; }
|
|
|
|
/// <summary>
|
|
/// 请求UE ID
|
|
/// </summary>
|
|
public int RequestUeId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 接收UE ID
|
|
/// </summary>
|
|
public int ReceiveUeId { get; set; }
|
|
|
|
/// <summary>
|
|
/// IMSI标识符
|
|
/// </summary>
|
|
public string Imsi { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="tmsi">TMSI标识符</param>
|
|
/// <param name="requestUeId">请求UE ID</param>
|
|
/// <param name="receiveUeId">接收UE ID</param>
|
|
/// <param name="imsi">IMSI标识符</param>
|
|
public TmsiMatchResult(uint tmsi, int requestUeId, int receiveUeId, string imsi = "")
|
|
{
|
|
Tmsi = tmsi;
|
|
RequestUeId = requestUeId;
|
|
ReceiveUeId = receiveUeId;
|
|
Imsi = imsi;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 重写ToString方法,提供友好的字符串表示
|
|
/// </summary>
|
|
/// <returns>格式化的字符串</returns>
|
|
public override string ToString()
|
|
{
|
|
var imsiInfo = string.IsNullOrEmpty(Imsi) ? "" : $", IMSI: {Imsi}";
|
|
return $"TMSI: 0x{Tmsi:X8}, RequestUE: {RequestUeId}, ReceiveUE: {ReceiveUeId}{imsiInfo}";
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Service Request TMSI映射实体
|
|
/// 用于平铺 SrTmsiToUeId 字典数据,包含 IMSI、TMSI、UE ID、Root UE ID 四个字段
|
|
/// </summary>
|
|
public class SrTmsiMapping
|
|
{
|
|
/// <summary>
|
|
/// IMSI标识符
|
|
/// </summary>
|
|
public string Imsi { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Service Request TMSI标识符
|
|
/// </summary>
|
|
public uint Tmsi { get; set; }
|
|
|
|
/// <summary>
|
|
/// UE ID
|
|
/// </summary>
|
|
public int UeId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Root UE ID(链的根节点)
|
|
/// </summary>
|
|
public int RootUeId { get; set; }
|
|
|
|
/// <summary>
|
|
/// PLMN标识符
|
|
/// </summary>
|
|
public string Plmn { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="imsi">IMSI标识符</param>
|
|
/// <param name="tmsi">Service Request TMSI标识符</param>
|
|
/// <param name="ueId">UE ID</param>
|
|
/// <param name="rootUeId">Root UE ID</param>
|
|
/// <param name="plmn">PLMN标识符</param>
|
|
public SrTmsiMapping(string imsi, uint tmsi, int ueId, int rootUeId = 0, string plmn = "")
|
|
{
|
|
Imsi = imsi;
|
|
Tmsi = tmsi;
|
|
UeId = ueId;
|
|
RootUeId = rootUeId;
|
|
Plmn = plmn;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 重写ToString方法,提供友好的字符串表示
|
|
/// </summary>
|
|
/// <returns>格式化的字符串</returns>
|
|
public override string ToString()
|
|
{
|
|
var imsiInfo = string.IsNullOrEmpty(Imsi) ? "" : $", IMSI: {Imsi}";
|
|
var rootInfo = RootUeId > 0 ? $", Root UE: {RootUeId}" : "";
|
|
var plmnInfo = string.IsNullOrEmpty(Plmn) ? "" : $", PLMN: {Plmn}";
|
|
return $"SR-TMSI: 0x{Tmsi:X8}, UE ID: {UeId}{imsiInfo}{rootInfo}{plmnInfo}";
|
|
}
|
|
}
|
|
}
|