From 539440ed42c2983afb6955ca1786bb5b524f0b5a Mon Sep 17 00:00:00 2001
From: root <295172551@qq.com>
Date: Sun, 29 Jun 2025 15:56:09 +0800
Subject: [PATCH] dsda1
---
LTEMvcApp/Models/LTEClient.cs | 483 +++++++++++++++++++++++++++++++---
LTEMvcApp/Models/LTELog.cs | 52 ++++
2 files changed, 502 insertions(+), 33 deletions(-)
diff --git a/LTEMvcApp/Models/LTEClient.cs b/LTEMvcApp/Models/LTEClient.cs
index 73d624e..ddb5d0f 100644
--- a/LTEMvcApp/Models/LTEClient.cs
+++ b/LTEMvcApp/Models/LTEClient.cs
@@ -1,5 +1,6 @@
using System.Collections.Immutable;
using System.Text.RegularExpressions;
+using System.Threading;
using Newtonsoft.Json;
namespace LTEMvcApp.Models;
@@ -21,6 +22,13 @@ public class LTEClient
///
private const int LOGS_MAX = 2000000;
+ ///
+ /// BSR表 - 对应JavaScript中的_bsr_table
+ ///
+ private static readonly int[] BsrTable = {
+ 0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91, 107, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826, 967, 1132, 1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5476, 6411, 7505, 8787, 10287, 12043, 14099, 16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201, 79846, 93479, 109439, 128125, 150000, 500000
+ };
+
#endregion
#region 正则表达式
@@ -768,47 +776,34 @@ public class LTEClient
continue;
}
- var infoMatch = RegExpInfo1.Match(log.Message);
- if (infoMatch.Success)
+ var rrcInfoMatch = RegExpInfo1.Match(log.Message);
+ if (rrcInfoMatch.Success)
{
- if (!SetLogInfo(log, infoMatch.Groups[1].Value)) continue;
- log.Message = infoMatch.Groups[2].Value;
+ if (!SetLogInfo(log, rrcInfoMatch.Groups[1].Value)) continue;
+ log.Message = rrcInfoMatch.Groups[2].Value;
ProcessRrcLog(log);
}
- var bcMatch = RegExpRRC_BC.Match(log.Message);
- if (bcMatch.Success)
+ var rrcBcMatch = RegExpRRC_BC.Match(log.Message);
+ if (rrcBcMatch.Success)
{
try
{
var data = log.GetDataString();
var jsonData = JsonConvert.DeserializeObject