30 lines
604 B
C++
30 lines
604 B
C++
#pragma once
|
||
|
||
#include "serial_port.h"
|
||
|
||
// 全局 IMEI(读取成功后写入)
|
||
extern std::string IMEI;
|
||
|
||
struct RadioInfo
|
||
{
|
||
int rsrp = -999; // dBm
|
||
int rsrq = -999; // dB
|
||
int sinr = -999; // dB
|
||
|
||
int pci = -1; // 物理小区 ID
|
||
int band = -1; // 频点 Band
|
||
|
||
std::string raw; // 原始 AT 返回内容
|
||
};
|
||
|
||
extern RadioInfo g_radio_info;
|
||
|
||
// 初始化 AT 串口(启动线程)
|
||
void init_serial_at(const std::string& device, int baudrate);
|
||
|
||
// 停止 AT 串口(停止线程,join)
|
||
void stop_serial_at();
|
||
|
||
void start_http_server(int port);
|
||
void stop_http_server();
|