• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Pan-Sensor<a name="EN-US_TOPIC_0000001078062432"></a>
2
3## Introduction<a name="section11660541593"></a>
4
5The pan-sensor service subsystem provides a lightweight sensor service framework, through which you can perform the following operations:
6
7-   Query the sensor list.
8-   Enable or disable a sensor.
9-   Subscribe to or unsubscribe from sensor data.
10-   Set the data reporting mode of a sensor.
11
12The following figure shows the architecture of the pan-sensor service framework.
13
14**Figure1**  Pan-sensor service architecture
15
16![](figures/en-us_image_0000001106694563.png)
17
18## Directory Structure<a name="section161941989596"></a>
19
20```
21/base/sensors
22├── sensor_lite          # Sensor directory
23│   ├── frameworks       # Framework code
24│   ├── interfaces       # Native APIs
25│   └── services         # Code of services
26└── miscdevice_lite      # Misc device directory
27```
28
29## Usage<a name="section1312121216216"></a>
30
31The following modules work cooperatively to implement pan-sensor capabilities: Sensor API, Sensor Framework, and Sensor Service.
32
33-   Sensor API: provides APIs for performing basic operations on sensors, including querying the sensor list, enabling or disabling sensors, and subscribing to or unsubscribing from sensor data.
34-   Sensor Framework: manages sensor data subscription, creates and destroys data channels, subscribes to or unsubscribes from sensor data, and implements communication with the Sensor Service module.
35-   Sensor Service: interacts with the HDF module to receive, parse, and distribute data, manages sensor services and sensor data reporting, and controls sensor permissions.
36
37## Repositories Involved<a name="section1371113476307"></a>
38
39**Pan-sensor subsystem**
40
41[sensors_sensor_lite](https://gitee.com/openharmony/sensors_sensor_lite/blob/master/README.md)
42
43[sensors_miscdevice_lite](https://gitee.com/openharmony/sensors_miscdevice_lite/blob/master/README.md)
44
45