> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 接收传感器温度通知

热核心框架使用 `Netlink` 接口向用户空间提供传感器温度通知。

用户空间应用程序可以使用 thermal Netlink 库接收传感器温度通知并采取相应措施。

## 接收通知

1. 为应用程序需要处理的热事件定义回调,例如热区、触发点、冷却设备和温度事件。
2. 使用这些回调初始化 thermal Netlink 库。
3. 订阅所需的热组播事件组。
4. 运行事件循环,并在相应的回调中处理每个通知。
5. 应用程序退出时释放 thermal Netlink 库的资源。

有关 API 定义和使用示例,请参见:

* [Linux thermal library](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/thermal?h=v6.6)
* [Linux Thermal Engine example](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/thermal/thermal-engine/thermal-engine.c?h=v6.6)

## 后续步骤

* [通过热调优优化性能](optimize-performance-with-thermal-tuning)
