# Sensor subsystem APIs

Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/sensor_functions.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/sensor_functions.html)

QESDK provides sensor APIs to communicate with sensor subsystems to get sensor data.
    Some APIs are used to manage the session and some APIs are used to communicate with the sensors
    in the sensor subsystem.

- **[Constructor](https://docs.qualcomm.com/doc/80-PK177-134/topic/create_session.html)**  

Creates a session and returns a session ID that can be used by other QESDK sensor         APIs in the current session. A sensor session facilitates communication between the         application and sensor subsystem. Each application can create only one simultaneous session.         For example, if you call create\_session while sensor\_session\_id is already created, another         create\_session API call returns -1. If you need to create new session, you should call         delete\_session first to delete the existing session and create a sensor session.
- **[get_sensors_list](https://docs.qualcomm.com/doc/80-PK177-134/topic/get_sensors_list.html)**  

Returns the list of available sensors, NULL is returned if the sensor is not available.     The client application can check if the interested sensor data type is present in the returned     list and use it further for SUID query. See [Requesting message](https://docs.qualcomm.com/doc/80-PK177-134/topic/requesting_message.html) for SUID     request. This API can be called before sensor session is created. Only activity recognition is     supported.
- **[delete_session](https://docs.qualcomm.com/doc/80-PK177-134/topic/delete_session.html)**  

Deletes sessions from the sensors subsystem. All sensor communication is terminated         when this API is called.
- **[send_request](https://docs.qualcomm.com/doc/80-PK177-134/topic/send_request.html)**  

Sends request messages to the sensor subsystem with the session. The messages the client can send are described in [Encoding and decoding protobuf messages](https://docs.qualcomm.com/doc/80-PK177-134/topic/encoding_and_decoding_protobuf_messages.html) . If the client tries to send messages to unavailable sensors, the client gets an error as a return.
- **[register_event_callback](https://docs.qualcomm.com/doc/80-PK177-134/topic/register_event_callback.html)**  

Registers a callback interface, `Ievent_callback_type` for sensor events. The registered callback is called whenever the sensor events are generated from the sensor that client activated.
- **[register_error_callback](https://docs.qualcomm.com/doc/80-PK177-134/topic/register_error_callback.html)**  

Registers a callback interface, `cb`, for error events. The registered callback is called when there is an error, which must be reported to the client from the sensor subsystem.

**Parent Topic:** [Sensor API](https://docs.qualcomm.com/doc/80-PK177-134/topic/qesdk_sensor_apis.html)

Last Published: Nov 14, 2024

[Previous Topic
Sensor API](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/qesdk_sensor_apis.md) [Next Topic
Constructor](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/create_session.md)