openharmony 鸿蒙 pan-sensor

2022-08-09 浏览 (752)

Pan-Sensor

Introduction

The pan-sensor service subsystem provides a lightweight sensor service framework, through which you can perform the following operations:

  • Query the sensor list.
  • Enable or disable a sensor.
  • Subscribe to or unsubscribe from sensor data.
  • Set the data reporting mode of a sensor.

The following figure shows the architecture of the pan-sensor service framework.

Directory Structure

/base/sensors
├── sensor_lite          # Sensor directory
│   ├── frameworks       # Framework code
│   ├── interfaces       # Native APIs
│   └── services         # Code of services
└── miscdevice_lite      # Misc device directory

Usage

The following modules work cooperatively to implement pan-sensor capabilities: Sensor API, Sensor Framework, and Sensor Service.

  • 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.
  • 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.
  • Sensor Service: interacts with the HDF module to receive, parse, and distribute data, manages sensor services and sensor data reporting, and controls sensor permissions.

Repositories Involved

Pan-sensor subsystem

sensors_sensor_lite

sensors_miscdevice_lite

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkCompiler Runtime

harmony 鸿蒙DeviceProfile

harmony 鸿蒙DistributedDataManager Subsystem

harmony 鸿蒙System Ability Manager

harmony 鸿蒙Security

harmony 鸿蒙Ability Framework

harmony 鸿蒙Account

harmony 鸿蒙AI Subsystem

harmony 鸿蒙Application Access Control

harmony 鸿蒙ArkUI

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/275e3d4a261c4e3494dd32516d4740d9