Go to file
18434362016 43b32520b0 添加前台应用监听权限
Signed-off-by: 18434362016 <18434362016@163.com>
Change-Id: I5d694c3d12874eebbf94046d5ad638bfb2a580e5
2024-04-22 08:46:47 +00:00
etc/init 添加前台应用监听权限 2024-04-22 08:46:47 +00:00
bundle.json 部件化整改 2023-04-28 03:20:51 +00:00
LICENSE Signed-off-by:hellohyh001<huiyuehong@huawei.com> 2021-09-24 06:22:16 +00:00
OAT.xml Signed-off-by:hellohyh001<huiyuehong@huawei.com> 2021-09-24 06:22:16 +00:00
README_zh.md Signed-off-by:hellohyh001<huiyuehong@huawei.com> 2021-12-27 14:57:56 +08:00
README.md Signed-off-by:hellohyh001<huiyuehong@huawei.com> 2021-12-27 14:57:56 +08:00

Sensor

Introduction

Start sensor, vibrator and other small device services.

Directory Structure

The sample code for importing the start module is as follows:

/base/sensors/start
├── etc
    └── init                # Place the startup file for the hsensor process

Usage

The repository places the startup file of the sensors process to start sensor and small device services such as vibrator. Sensor and small device services such as vibrator share the sensors process.
Service code for sensor and small device services such as vibrator is sensors_sensor and sensors_miscdevice part compartments, respectively. when selecting a part, the product may select either or both parts as needed. This requires that the startup file of the sensors process be placed in a separate start-up part compartment, shared by the two parts, so that any part silo with the starter part can start the sensors process and prevent duplicate start-up of the process.
Service startup profiles for sensor and small device services such as vibrator are in the sa_profile directory of sensors_sensor and sensors_miscdevice part, respectively.The resulting system/profile/sensors.xml file is compiled, as follows.Of these, 3601 and 3602 serve the sensor and vibrator.If only the sensors_sensor code is compiled, the sensors.xml file contains only the configuration items for the 3601 service. The sensors.xml file starts the service when the sensors process is started.

<?xml version="1.0" encoding="utf-8"?>
<info>
    <process>sensors</process>
    <loadlibs>
        <libpath>libmiscdevice_service.z.so</libpath>
        <libpath>libsensor_service.z.so</libpath>
    </loadlibs>
    <systemability>
        <name>3602</name>
        <libpath>libmiscdevice_service.z.so</libpath>
        <run-on-create>true</run-on-create>
        <distributed>false</distributed>
        <dump-level>1</dump-level>
    </systemability>
    <systemability>
        <name>3601</name>
        <libpath>libsensor_service.z.so</libpath>
        <run-on-create>true</run-on-create>
        <distributed>false</distributed>
        <dump-level>1</dump-level>
    </systemability>
</info>

Repositories Involved

Pan-sensor subsystem

sensors_sensor

sensors_miscdevice

sensors_start