新增部分消息
This commit is contained in:
parent
c35ab2e336
commit
ea4ee869f9
@ -7,6 +7,9 @@ extern std::string IMEI;
|
|||||||
|
|
||||||
struct RadioInfo
|
struct RadioInfo
|
||||||
{
|
{
|
||||||
|
std::string state; // CONNECT / NOCONN
|
||||||
|
std::string rat; // NR5G-SA / NR5G-NSA / LTE / WCDMA ...
|
||||||
|
|
||||||
int pci = -1; // 物理小区 ID
|
int pci = -1; // 物理小区 ID
|
||||||
int band = -1; // LTE/NR Band(如果你要解析可以填)
|
int band = -1; // LTE/NR Band(如果你要解析可以填)
|
||||||
int arfcn = -1; // 频点号,NR/SA必有字段
|
int arfcn = -1; // 频点号,NR/SA必有字段
|
||||||
|
|||||||
@ -91,6 +91,9 @@ static void parse_qeng_servingcell(const std::string& line)
|
|||||||
|
|
||||||
std::string rat = t[2];
|
std::string rat = t[2];
|
||||||
|
|
||||||
|
std::string state = (t.size() > 1 ? t[1] : "");
|
||||||
|
std::string rat = (t.size() > 2 ? t[2] : "");
|
||||||
|
|
||||||
int pci = -1;
|
int pci = -1;
|
||||||
int band = -1;
|
int band = -1;
|
||||||
int arfcn = -1;
|
int arfcn = -1;
|
||||||
@ -145,6 +148,10 @@ static void parse_qeng_servingcell(const std::string& line)
|
|||||||
|
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(radio_mutex);
|
std::lock_guard<std::mutex> lk(radio_mutex);
|
||||||
|
|
||||||
|
g_radio_info.state = state;
|
||||||
|
g_radio_info.rat = rat;
|
||||||
|
|
||||||
g_radio_info.pci = pci;
|
g_radio_info.pci = pci;
|
||||||
g_radio_info.rsrp = rsrp;
|
g_radio_info.rsrp = rsrp;
|
||||||
g_radio_info.rsrq = rsrq;
|
g_radio_info.rsrq = rsrq;
|
||||||
@ -153,8 +160,17 @@ static void parse_qeng_servingcell(const std::string& line)
|
|||||||
g_radio_info.raw = line;
|
g_radio_info.raw = line;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("[serial_at] QENG parsed: RAT=" + rat + " PCI=" + std::to_string(pci) + " ARFCN=" + std::to_string(arfcn) +
|
LOG_INFO("[serial_at][QENG] " + rat + " pci=" + std::to_string(pci) + " band=" + std::to_string(band) +
|
||||||
" RSRP=" + std::to_string(rsrp) + " RSRQ=" + std::to_string(rsrq) + " SINR=" + std::to_string(sinr));
|
" arfcn=" + std::to_string(arfcn) + " | rsrp=" + std::to_string(rsrp) +
|
||||||
|
" dBm"
|
||||||
|
" rsrq=" +
|
||||||
|
std::to_string(rsrq) +
|
||||||
|
" dB"
|
||||||
|
" sinr=" +
|
||||||
|
std::to_string(sinr) +
|
||||||
|
" dB"
|
||||||
|
" (" +
|
||||||
|
state + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_imei_ready()
|
static bool is_imei_ready()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user