# query\_thermal\_headroom\_status
Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_query_thermal_headroom_status.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_query_thermal_headroom_status.html)
Queries for current thermal status and returns how much headroom is left from thermal
mitigation.
query_thermal_headroom_status()Copy to clipboard
## Parameters
| **Parameters** | **API type** | **Data type** | **Description** |
| --- | --- | --- | --- |
| ret\_val | Native | int8\_t& | On success this is the actual return value from the API.
- 0: Success with far from mitigation
- 1: 75% headroom from mitigation
- 2: 50% headroom from mitigation
- 3: 30% headroom from mitigation
- 4:10% headroom from mitigation
- 5: 5% headroom from mitigation
- 6: Mitigated (Thermal kick in)
- -1: Failed to apply hint.
- -2: Failed to establish session; check that set_pkg was called before this API
|
## Returns
| **Return** | **API type** | **Data type** | **Description** |
| --- | --- | --- | --- |
| response | Java | int |
- 0: Success with far from mitigation
- 1: 75% headroom from mitigation
- 2: 50% headroom from mitigation
- 3: 30% headroom from mitigation
- 4:10% headroom from mitigation
- 5: 5% headroom from mitigation
- 6: Mitigated (Thermal kick in)
- -1: Failed to apply hint.
- -2: Failed to establish session; check that set_pkg was
called before this API
|
| response | Native | qesdk\_transaction\_status | See [QESDK transaction status for Native APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/native_qesdk_class.html) for usage details. Use qesdk\_transaction\_status to confirm API call invocation. If successful, use the `ret` value for the actual API return value object. |
| | | | |
**Parent Topic:** [QAPE subsystem APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_apis.html)
Last Published: Nov 14, 2024
[Previous Topic
unregister\_thermal\_zone\_callback](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/qape_unregister_thermal_zone_callback.md) [Next Topic
get\_max\_number\_of\_pipeline\_thread](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/qape_get_max_number_of_pipeline_thread.md)