当前位置:首页>学习笔记>BLE 中心设备学习笔记

BLE 中心设备学习笔记

  • 2026-03-14 14:52:16
BLE 中心设备学习笔记

BLE 中心设备学习笔记

概述

本文记录了基于 CH573 芯片的 BLE(蓝牙低功耗)中心设备如何扫描、连接周边设备,并获取其服务、特征和描述符的完整流程。

BLE GATT 协议基础

GATT 层次结构

code
Profile(配置文件)
    └── Service(服务)
            └── Characteristic(特征)
                    ├── Value(值)
                    └── Descriptor(描述符)

核心概念

服务(Service):一组相关特征的集合,实现特定功能

特征(Characteristic):包含数据值和访问属性(读、写、通知等)

描述符(Descriptor):特征的附加信息,如 CCCD(客户端特征配置描述符)

句柄(Handle):用于标识属性的唯一数字

完整工作流程

1. 设备初始化

初始化入口函数

c
voidCentral_Init()
{
// 注册任务,获取任务ID
    centralTaskId = TMOS_ProcessEventRegister(Central_ProcessEvent);

// 设置 GAP 参数
GAP_SetParamValue(TGAP_DISC_SCAN, DEFAULT_SCAN_DURATION);
GAP_SetParamValue(TGAP_CONN_EST_INT_MIN, DEFAULT_MIN_CONNECTION_INTERVAL);

// 初始化 GAP Bond Manager 参数
    uint32_t passkey = DEFAULT_PASSCODE;
    uint8_t  pairMode = DEFAULT_PAIRING_MODE;
    uint8_t  mitm = DEFAULT_MITM_MODE;
    uint8_t  ioCap = DEFAULT_IO_CAPABILITIES;
    uint8_t  bonding = DEFAULT_BONDING_MODE;

GAPBondMgr_SetParameter(GAPBOND_CENT_DEFAULT_PASSCODE, sizeof(uint32_t), &passkey);
GAPBondMgr_SetParameter(GAPBOND_CENT_PAIRING_MODE, sizeof(uint8_t), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_CENT_MITM_PROTECTION, sizeof(uint8_t), &mitm);
GAPBondMgr_SetParameter(GAPBOND_CENT_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_CENT_BONDING_ENABLED, sizeof(uint8_t), &bonding);

// 初始化 GATT Client
GATT_InitClient();

// 注册接收 ATT 指示/通知
GATT_RegisterForInd(centralTaskId);

// 设置延迟启动设备
tmos_set_event(centralTaskId, START_DEVICE_EVT);
}

启动设备角色

c
if(events & START_DEVICE_EVT)
{
// 启动中心设备
GAPRole_CentralStartDevice(centralTaskId, &centralBondCB, &centralRoleCB);
return (events ^ START_DEVICE_EVT);
}

2. 设备扫描

扫描函数

c
GAPRole_CentralStartDiscovery(DEFAULT_DISCOVERY_MODE,
                              DEFAULT_DISCOVERY_ACTIVE_SCAN,
                              DEFAULT_DISCOVERY_WHITE_LIST);

扫描参数

DEFAULT_DISCOVERY_MODE:发现模式

DEFAULT_DISCOVERY_ACTIVE_SCAN:是否启用主动扫描

DEFAULT_DISCOVERY_WHITE_LIST:是否使用白名单

扫描触发时机

1.初始化完成后GAP_DEVICE_INIT_DONE_EVENT 事件

2.设备未找到时GAP_DEVICE_DISCOVERY_EVENT 事件中重新扫描

3.连接断开后GAP_LINK_TERMINATED_EVENT 事件中重新扫描

扫描到设备处理

c
case GAP_DEVICE_INFO_EVENT:
{
// 添加设备到列表
centralAddDeviceInfo(pEvent->deviceInfo.addr, pEvent->deviceInfo.addrType);
}
break;

扫描完成处理

c
case GAP_DEVICE_DISCOVERY_EVENT:
{
// 检查是否找到目标设备
for(i = 0; i < centralScanRes; i++)
    {
if(tmos_memcmp(PeerAddrDef, centralDevList[i].addr, B_ADDR_LEN))
            break;
    }

// 未找到目标设备
if(i == centralScanRes)
    {
PRINT("Device not found...\n");
        centralScanRes = 0;
GAPRole_CentralStartDiscovery(DEFAULT_DISCOVERY_MODE,
                                      DEFAULT_DISCOVERY_ACTIVE_SCAN,
                                      DEFAULT_DISCOVERY_WHITE_LIST);
PRINT("Discovering...\n");
    }
// 找到目标设备
else
    {
PRINT("Device found...\n");
GAPRole_CentralEstablishLink(DEFAULT_LINK_HIGH_DUTY_CYCLE,
                                     DEFAULT_LINK_WHITE_LIST,
                                     centralDevList[i].addrType,
                                     centralDevList[i].addr);

// 启动连接超时事件
tmos_start_task(centralTaskId, ESTABLISH_LINK_TIMEOUT_EVT, ESTABLISH_LINK_TIMEOUT);
PRINT("Connecting...\n");
    }
}
break;

3. 连接建立

发起连接

c
GAPRole_CentralEstablishLink(DEFAULT_LINK_HIGH_DUTY_CYCLE,
                             DEFAULT_LINK_WHITE_LIST,
                             centralDevList[i].addrType,
                             centralDevList[i].addr);

连接参数

DEFAULT_LINK_HIGH_DUTY_CYCLE:连接占空比

DEFAULT_LINK_WHITE_LIST:白名单设置

centralDevList[i].addrType:目标设备地址类型

centralDevList[i].addr:目标设备蓝牙地址

连接建立事件处理

c
case GAP_LINK_ESTABLISHED_EVENT:
{
// 停止连接超时任务
tmos_stop_task(centralTaskId, ESTABLISH_LINK_TIMEOUT_EVT);

if(pEvent->gap.hdr.status == SUCCESS)
    {
        centralState = BLE_STATE_CONNECTED;
        centralConnHandle = pEvent->linkCmpl.connectionHandle;
        centralProcedureInProgress = TRUE;

// 更新 MTU
        attExchangeMTUReq_t req = {
            .clientRxMTU = BLE_BUFF_MAX_LEN - 4,
        };

GATT_ExchangeMTU(centralConnHandle, &req, centralTaskId);

// 启动服务发现
tmos_start_task(centralTaskId, START_SVC_DISCOVERY_EVT, DEFAULT_SVC_DISCOVERY_DELAY);

// 启动连接参数更新(如果配置)
if(centralParamUpdate)
        {
tmos_start_task(centralTaskId, START_PARAM_UPDATE_EVT, DEFAULT_PARAM_UPDATE_DELAY);
        }

// 启动 RSSI 轮询(如果配置)
if(centralRssi)
        {
tmos_start_task(centralTaskId, START_READ_RSSI_EVT, DEFAULT_RSSI_PERIOD);
        }

PRINT("Connected...\n");
    }
else
    {
PRINT("Connect Failed...Reason:%X\n", pEvent->gap.hdr.status);
PRINT("Discovering...\n");
        centralScanRes = 0;
GAPRole_CentralStartDiscovery(DEFAULT_DISCOVERY_MODE,
                                      DEFAULT_DISCOVERY_ACTIVE_SCAN,
                                      DEFAULT_DISCOVERY_WHITE_LIST);
    }
}
break;

4. 服务发现

服务发现启动事件

c
if(events & START_SVC_DISCOVERY_EVT)
{
// 开始服务发现
centralStartDiscovery();
return (events ^ START_SVC_DISCOVERY_EVT);
}

服务发现函数

c
staticvoidcentralStartDiscovery(void)
{
    uint8_t uuid[ATT_BT_UUID_SIZE] = {LO_UINT16(SIMPLEPROFILE_SERV_UUID),
HI_UINT16(SIMPLEPROFILE_SERV_UUID)};

// 初始化缓存句柄
    centralSvcStartHdl = centralSvcEndHdl = centralCharHdl = 0;

    centralDiscState = BLE_DISC_STATE_SVC;

// 通过 UUID 发现主服务
GATT_DiscPrimaryServiceByUUID(centralConnHandle,
                                  uuid,
                                  ATT_BT_UUID_SIZE,
                                  centralTaskId);
}

服务发现结果处理

c
if(centralDiscState == BLE_DISC_STATE_SVC)
{
// 服务发现,存储句柄
if(pMsg->method == ATT_FIND_BY_TYPE_VALUE_RSP &&
       pMsg->msg.findByTypeValueRsp.numInfo > 0)
    {
        centralSvcStartHdl = ATT_ATTR_HANDLE(pMsg->msg.findByTypeValueRsp.pHandlesInfo, 0);
        centralSvcEndHdl = ATT_GRP_END_HANDLE(pMsg->msg.findByTypeValueRsp.pHandlesInfo, 0);

PRINT("Found Profile Service handle : %x ~ %x \n", centralSvcStartHdl, centralSvcEndHdl);
    }

// 过程完成
if((pMsg->method == ATT_FIND_BY_TYPE_VALUE_RSP &&
        pMsg->hdr.status == bleProcedureComplete) ||
       (pMsg->method == ATT_ERROR_RSP))
    {
if(centralSvcStartHdl != 0)
        {
// 发现特征
            centralDiscState = BLE_DISC_STATE_CHAR;
            req.startHandle = centralSvcStartHdl;
            req.endHandle = centralSvcEndHdl;
            req.type.len = ATT_BT_UUID_SIZE;
            req.type.uuid[0] = LO_UINT16(SIMPLEPROFILE_CHAR1_UUID);
            req.type.uuid[1] = HI_UINT16(SIMPLEPROFILE_CHAR1_UUID);

GATT_ReadUsingCharUUID(centralConnHandle, &req, centralTaskId);
        }
    }
}

5. 特征发现

特征发现过程

在服务句柄范围内,通过 UUID 查找特征。

c
elseif(centralDiscState == BLE_DISC_STATE_CHAR)
{
// 特征发现,存储句柄
if(pMsg->method == ATT_READ_BY_TYPE_RSP &&
       pMsg->msg.readByTypeRsp.numPairs > 0)
    {
        centralCharHdl = BUILD_UINT16(pMsg->msg.readByTypeRsp.pDataList[0],
                                      pMsg->msg.readByTypeRsp.pDataList[1]);

// 开始读写操作
tmos_start_task(centralTaskId, START_READ_OR_WRITE_EVT, DEFAULT_READ_OR_WRITE_DELAY);

PRINT("Found Characteristic 1 handle : %x \n", centralCharHdl);
    }

if((pMsg->method == ATT_READ_BY_TYPE_RSP &&
        pMsg->hdr.status == bleProcedureComplete) ||
       (pMsg->method == ATT_ERROR_RSP))
    {
// 发现 CCCD
        centralDiscState = BLE_DISC_STATE_CCCD;
        req.startHandle = centralSvcStartHdl;
        req.endHandle = centralSvcEndHdl;
        req.type.len = ATT_BT_UUID_SIZE;
        req.type.uuid[0] = LO_UINT16(GATT_CLIENT_CHAR_CFG_UUID);
        req.type.uuid[1] = HI_UINT16(GATT_CLIENT_CHAR_CFG_UUID);

GATT_ReadUsingCharUUID(centralConnHandle, &req, centralTaskId);
    }
}

6. 描述符发现

CCCD 发现过程

CCCD(Client Characteristic Configuration Descriptor)用于启用或禁用特征的通知功能。

c
elseif(centralDiscState == BLE_DISC_STATE_CCCD)
{
// 特征发现,存储句柄
if(pMsg->method == ATT_READ_BY_TYPE_RSP &&
       pMsg->msg.readByTypeRsp.numPairs > 0)
    {
        centralCCCDHdl = BUILD_UINT16(pMsg->msg.readByTypeRsp.pDataList[0],
                                      pMsg->msg.readByTypeRsp.pDataList[1]);
        centralProcedureInProgress = FALSE;

// 开始写 CCCD
tmos_start_task(centralTaskId, START_WRITE_CCCD_EVT, DEFAULT_WRITE_CCCD_DELAY);

PRINT("Found client characteristic configuration handle : %x \n", centralCCCDHdl);
    }
    centralDiscState = BLE_DISC_STATE_IDLE;
}

7. 数据读写

读写事件处理

c
if(events & START_READ_OR_WRITE_EVT)
{
if(centralProcedureInProgress == FALSE)
    {
if(centralDoWrite)
        {
// 写操作
            attWriteReq_t req;

            req.cmd = FALSE;
            req.sig = FALSE;
            req.handle = centralCharHdl;
            req.len = 1;
            req.pValue = GATT_bm_alloc(centralConnHandle, ATT_WRITE_REQ, req.len, NULL, 0);
if(req.pValue != NULL)
            {
                *req.pValue = centralCharVal;

if(GATT_WriteCharValue(centralConnHandle, &req, centralTaskId) == SUCCESS)
                {
                    centralProcedureInProgress = TRUE;
                    centralDoWrite = !centralDoWrite;
tmos_start_task(centralTaskId, START_READ_OR_WRITE_EVT, DEFAULT_READ_OR_WRITE_DELAY);
                }
else
                {
GATT_bm_free((gattMsg_t *)&req, ATT_WRITE_REQ);
                }
            }
        }
else
        {
// 读操作
            attReadReq_t req;

            req.handle = centralCharHdl;
if(GATT_ReadCharValue(centralConnHandle, &req, centralTaskId) == SUCCESS)
            {
                centralProcedureInProgress = TRUE;
                centralDoWrite = !centralDoWrite;
            }
        }
    }
return (events ^ START_READ_OR_WRITE_EVT);
}

GATT 消息处理

c
staticvoidcentralProcessGATTMsg(gattMsgEvent_t *pMsg)
{
if(centralState != BLE_STATE_CONNECTED)
    {
GATT_bm_free(&pMsg->msg, pMsg->method);
return;
    }

// 处理读响应
if((pMsg->method == ATT_READ_RSP) ||
       ((pMsg->method == ATT_ERROR_RSP) &&
        (pMsg->msg.errorRsp.reqOpcode == ATT_READ_REQ)))
    {
if(pMsg->method == ATT_ERROR_RSP)
        {
            uint8_t status = pMsg->msg.errorRsp.errCode;
PRINT("Read Error: %x\n", status);
        }
else
        {
PRINT("Read rsp: %x\n", *pMsg->msg.readRsp.pValue);
        }
        centralProcedureInProgress = FALSE;
    }
// 处理写响应
elseif((pMsg->method == ATT_WRITE_RSP) ||
            ((pMsg->method == ATT_ERROR_RSP) &&
             (pMsg->msg.errorRsp.reqOpcode == ATT_WRITE_REQ)))
    {
if(pMsg->method == ATT_ERROR_RSP)
        {
            uint8_t status = pMsg->msg.errorRsp.errCode;
PRINT("Write Error: %x\n", status);
        }
else
        {
PRINT("Write success \n");
        }
        centralProcedureInProgress = FALSE;
    }
// 处理通知
elseif(pMsg->method == ATT_HANDLE_VALUE_NOTI)
    {
PRINT("Receive noti: %x\n", *pMsg->msg.handleValueNoti.pValue);
    }
// 处理服务发现
elseif(centralDiscState != BLE_DISC_STATE_IDLE)
    {
centralGATTDiscoveryEvent(pMsg);
    }
GATT_bm_free(&pMsg->msg, pMsg->method);
}

关键函数总结

GAP 层函数

1.GAPRole_CentralStartDevice() - 启动中心设备角色

2.GAPRole_CentralStartDiscovery() - 开始设备扫描

3.GAPRole_CentralEstablishLink() - 发起连接

4.GAPRole_TerminateLink() - 终止连接

GATT 层函数

1.GATT_DiscPrimaryServiceByUUID() - 通过 UUID 发现服务

2.GATT_ReadUsingCharUUID() - 通过 UUID 发现特征

3.GATT_ReadCharValue() - 读取特征值

4.GATT_WriteCharValue() - 写入特征值

5.GATT_ExchangeMTU() - 交换 MTU

GAP Bond Manager 函数

1.GAPBondMgr_SetParameter() - 设置绑定参数

2.GAPBondMgr_PasscodeRsp() - 密码响应

状态机设计

服务发现状态

c
enum {
    BLE_DISC_STATE_IDLE = 0,      // 空闲状态
    BLE_DISC_STATE_SVC,            // 服务发现状态
    BLE_DISC_STATE_CHAR,           // 特征发现状态
    BLE_DISC_STATE_CCCD,           // CCCD 发现状态
};

连接状态

c
enum {
    BLE_STATE_IDLE = 0,            // 空闲状态
    BLE_STATE_CONNECTING,           // 连接中状态
    BLE_STATE_CONNECTED,            // 已连接状态
};

学习要点总结

1.分步发现:BLE GATT 采用分步发现机制,先发现服务,再发现特征,最后发现描述符

2.句柄管理:使用句柄来标识和访问属性,避免重复传输 UUID

3.事件驱动:整个流程基于事件驱动模型,使用 TMOS 任务系统

4.状态机:通过状态机管理发现过程,确保流程有序进行

5.异步操作:所有 GATT 操作都是异步的,通过回调和事件通知结果

6.MTU 协商:连接建立后协商 MTU,优化数据传输效率

7.安全配对:通过 GAP Bond Manager 管理安全配对和绑定

8.通知机制:通过 CCCD 启用特征通知,实现主动数据推送

扩展阅读

蓝牙核心规范(Bluetooth Core Specification)

GATT 协议详解

CH573 BLE 开发文档

TMOS 操作系统使用指南


学习日期:2026-03-12

学习内容:BLE 中心设备服务、特征、描述符发现流程

开发平台:CH573

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-15 18:26:02 HTTP/2.0 GET : https://67808.cn/a/474073.html
  2. 运行时间 : 0.236035s [ 吞吐率:4.24req/s ] 内存消耗:4,620.00kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=4a9f101229c605b78e3e5f8fc12dcdbd
  1. /yingpanguazai/ssd/ssd1/www/no.67808.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/no.67808.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/no.67808.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/no.67808.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/no.67808.cn/runtime/temp/6df755f970a38e704c5414acbc6e8bcd.php ( 12.06 KB )
  140. /yingpanguazai/ssd/ssd1/www/no.67808.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000999s ] mysql:host=127.0.0.1;port=3306;dbname=no_67808;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001747s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000769s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000639s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001383s ]
  6. SELECT * FROM `set` [ RunTime:0.000613s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001469s ]
  8. SELECT * FROM `article` WHERE `id` = 474073 LIMIT 1 [ RunTime:0.001127s ]
  9. UPDATE `article` SET `lasttime` = 1773570363 WHERE `id` = 474073 [ RunTime:0.003264s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 65 LIMIT 1 [ RunTime:0.000698s ]
  11. SELECT * FROM `article` WHERE `id` < 474073 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001169s ]
  12. SELECT * FROM `article` WHERE `id` > 474073 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001082s ]
  13. SELECT * FROM `article` WHERE `id` < 474073 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.015921s ]
  14. SELECT * FROM `article` WHERE `id` < 474073 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.014803s ]
  15. SELECT * FROM `article` WHERE `id` < 474073 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.026220s ]
0.239959s