# Architecture If you’re familiar with the Qualcomm® sensing hub (QSH) terminology, architecture, and components, and intend to work with QSH APIs or set up sensor information, then see [Qualcomm® sensing hub APIs](https://docs.qualcomm.com/doc/80-80022-7/topic/qsh_api_reference.html#qsh-api-reference). Note Source code of the low-power application digital signal processor (aDSP), including the QSH framework, is available only to licensed users with authorized access. To upgrade your access, see [Working with Qualcomm](https://www.qualcomm.com/support/working-with-qualcomm). QSH is also known as Qualcomm® Snapdragon™ sensor core (SSC) that offers a unified event-driven framework for drivers and algorithms. QSH supports the same set of APIs for both the hardware-based and software-based sensors. Additionally, QSH supports asynchronous bus transfer and is extendable for new or custom driver features. QSH consists of the following components: > > > - QSH client APIs > - Sensor APIs > - Core framework > - Pre-implemented platform sensors > - Vendor-implemented sensors > - Test modules QSH serves external client applications and provides an interface to access sensor data. The following table describes the terms used in the QSH framework: Table : QSH terminology | **Term** | **Description** | | --- | --- | | Sensor |
Produces a single type of data, for example, accelerometer, gyroscope, timer, interrupt, and rotation vector.
Handles asynchronous data.
Publishes mandatory and custom attributes, and manages its instances.
Runs at a specific configuration, publishes output data events, and can be created per client request or shared among multiple requests.
Physical sensors usually share a single instance.
This service allows a sensor to create and remove a data stream.
For more information about the data stream to send requests and receive events over the data streams, see the adsp_proc/qsh_platform/inc/sns_data_stream.h file.
This service allows a sensor to publish sensor attributes or capabilities.
All standard attribute IDs and expected value types are defined in the sns_std_sensor.proto file.
All attribute values must be in the nanopb-encoded format. For more information, see Nanopb protocol buffer in QSH.
For more information about the attribute service, see the adsp_proc/qsh_platform/inc/services/sns_attribute_service.h file.
This service provides debug message and data log packet services, and defines standard log packet IDs.
For more information about the diagnostic service, see the adsp_proc/qsh_platform/inc/services/sns_diag_service.h file.
This service allows a sensor to publish output events from the source sensor instances.
For more information about the event service, see the adsp_proc/qsh_platform/inc/services/sns_event_service.h file.
This service helps the physical sensors to register and vote for turning the power rails On or Off.
For more information about the power rail service, see the adsp_proc/qsh_platform/inc/services/sns_pwr_rail_service.h file.
Available to the physical sensors to register or deregister the COM port and perform synchronous transfers over the COM port.
For more information about the SCP service, see the adsp_proc/qsh_platform/inc/services/sns_sync_com_port_service.h file.
Available to the physical sensors to read or write the GPIO value.
Effectively abstracts a low-level CoreBSP layer for controlling the GPIOs.
For more information about the GPIO service, see the adsp_proc/qsh_platform/inc/services/sns_gpio_service.h file.
Available to the physical sensors to request for exiting from the island mode.
When an application must access DDR or non-island resources that are available in normal mode, the application code can use the island service.
For more information about the island service, see the adsp_proc/qsh_platform/inc/services/sns_island_service.h file.
Available to the physical sensors for the file service management.
The abstract file system is a part of an application processor stack and is available for local access from a low-power processor.
For more information about the file system service, see the adsp_proc/qsh_platform/inc/services/sns_file_service.h file.
The registry sensor in QSH provides an interface for sensors to access registry data from persistent memory. It allows sensors to create a data stream, send requests, receive data events, subscribe to updates, and remove unnecessary data streams.
For more information about the registry sensor, see Configure sensors.
For more information about the registry sensor API, see the adsp_proc/qsh_api/pb/sns_registry.proto file.
The timer sensor in the QSH has an interface to initiate periodic or one-shot timers. Sensors that require timers must create a data stream, send requests, and read delivered data events.
For more information about the timer sensor API, see the adsp_proc/qsh_platform/api/public_sns/sns_timer.proto file.
The interrupt sensor in the QSH has an interface to register interrupts. Sensors that require interrupts must create a data stream, send requests, and read delivered data events.
For more information about the interrupt sensor API, see the adsp_proc/qsh_platform/api/public_sns/sns_interrupt.proto file.
The ASCP sensor in the QSH has an interface for asynchronous read and write operations over a communication port.
Sensors that require this feature must create a data stream, send requests, and read delivered data events.
For more information about the ASCP sensor API, see the adsp_proc/qsh_platform/api/public_sns/sns_async_com_port.proto file.
The SUID lookup sensor in the QSH provides an API to obtain the SUID of dependent sensors. Its own SUID is available using the sns_get_suid_lookup() function in the sns_sensor_util.h file.
For more information about the SUID lookup sensor API, see the adsp_proc/qsh_api/pb/sns_suid.proto file.
The test sensor customizes and runs sensor-specific use cases.
The test sensor is available in the adsp_proc/qsh_platform/sensors/test directory.
Provides common encode and decode helper functions for all the sensors. For example, encode and decode sns_request messages, encode and publish, and decode data events.
Asynchronous COM port nanopb utilities are available for physical sensor drivers.
Provides common functionalities for sensors, such as finding a sensor instance and getting the SUID of a SUID lookup sensor.
Provides helper functions that encode and publish a sensor attribute.
Provides helper functions for efficient memory management and allocation.
Offers a collection of mathematical functions and operations, such as matrix, fast Fourier transform (FFT), and infinite impulse response (IIR) filter.
Includes helper functions to format and print data.
Provides abstractions for thread creation, deletion, and management
Includes thread synchronization primitives (mutexes, semaphores, condition variables)
Enables platform-independent multi-threaded sensor framework execution
Abstracts OS signal registration and delivery mechanisms
Provides signal attributes configuration and signal mask management
Enables event-driven task scheduling in the sensor framework
Provides mutual exclusion primitives for critical sections
Abstracts platform-specific locking mechanisms
Ensures thread-safe access to shared resources
Provides platform-independent GPIO pin control
Abstracts GPIO configuration, read, and write operations
Enables sensor interrupt and control signal handling
Abstracts communication bus operations (I2C, SPI)
Provides read/write operations with platform-specific implementations
Enables physical sensor communication across different platforms
Abstracts interrupt registration and handling mechanisms
Provides interrupt enable/disable and priority management
Enables sensor interrupt-driven data acquisition
Abstracts clock configuration and power domain management
Provides platform-specific clock gating and power state control
Enables efficient power management for sensor subsystems
Provides abstracted register read/write operations
Abstracts memory-mapped I/O and register access patterns
Enables hardware control across different SoC implementations
Abstracts serial port operations for debug and data logging
Provides platform-independent serial communication
Enables asynchronous COM port operations for sensor drivers