161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit SensorServiceKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { AsyncCallback, Callback } from './@ohos.base';
2261847f8eSopenharmony_ci
2361847f8eSopenharmony_ci/**
2461847f8eSopenharmony_ci * This module provides the capability to subscribe to sensor data.
2561847f8eSopenharmony_ci * @namespace sensor
2661847f8eSopenharmony_ci * @syscap SystemCapability.Sensors.Sensor
2761847f8eSopenharmony_ci * @since 8
2861847f8eSopenharmony_ci */
2961847f8eSopenharmony_ci/**
3061847f8eSopenharmony_ci * This module provides the capability to subscribe to sensor data.
3161847f8eSopenharmony_ci * @namespace sensor
3261847f8eSopenharmony_ci * @syscap SystemCapability.Sensors.Sensor
3361847f8eSopenharmony_ci * @atomicservice
3461847f8eSopenharmony_ci * @since 11
3561847f8eSopenharmony_ci */
3661847f8eSopenharmony_cideclare namespace sensor {
3761847f8eSopenharmony_ci  /**
3861847f8eSopenharmony_ci   * Enum for obtain the type of sensor.
3961847f8eSopenharmony_ci   * @enum { number }
4061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
4161847f8eSopenharmony_ci   * @since 9
4261847f8eSopenharmony_ci   */
4361847f8eSopenharmony_ci  /**
4461847f8eSopenharmony_ci   * Enum for obtain the type of sensor.
4561847f8eSopenharmony_ci   * @enum { number }
4661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
4761847f8eSopenharmony_ci   * @atomicservice
4861847f8eSopenharmony_ci   * @since 11
4961847f8eSopenharmony_ci   */
5061847f8eSopenharmony_ci  enum SensorId {
5161847f8eSopenharmony_ci    /**
5261847f8eSopenharmony_ci     * Acceleration sensor.
5361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
5461847f8eSopenharmony_ci     * @since 9
5561847f8eSopenharmony_ci     */
5661847f8eSopenharmony_ci    /**
5761847f8eSopenharmony_ci     * Acceleration sensor.
5861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
5961847f8eSopenharmony_ci     * @atomicservice
6061847f8eSopenharmony_ci     * @since 11
6161847f8eSopenharmony_ci     */
6261847f8eSopenharmony_ci    ACCELEROMETER = 1,
6361847f8eSopenharmony_ci
6461847f8eSopenharmony_ci    /**
6561847f8eSopenharmony_ci     * Gyroscope sensor.
6661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
6761847f8eSopenharmony_ci     * @since 9
6861847f8eSopenharmony_ci     */
6961847f8eSopenharmony_ci    /**
7061847f8eSopenharmony_ci     * Gyroscope sensor.
7161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
7261847f8eSopenharmony_ci     * @atomicservice
7361847f8eSopenharmony_ci     * @since 11
7461847f8eSopenharmony_ci     */
7561847f8eSopenharmony_ci    GYROSCOPE = 2,
7661847f8eSopenharmony_ci
7761847f8eSopenharmony_ci    /**
7861847f8eSopenharmony_ci     * Ambient light sensor.
7961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
8061847f8eSopenharmony_ci     * @since 9
8161847f8eSopenharmony_ci     */
8261847f8eSopenharmony_ci    AMBIENT_LIGHT = 5,
8361847f8eSopenharmony_ci
8461847f8eSopenharmony_ci    /**
8561847f8eSopenharmony_ci     * Magnetic field sensor.
8661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
8761847f8eSopenharmony_ci     * @since 9
8861847f8eSopenharmony_ci     */
8961847f8eSopenharmony_ci    MAGNETIC_FIELD = 6,
9061847f8eSopenharmony_ci
9161847f8eSopenharmony_ci    /**
9261847f8eSopenharmony_ci     * Barometric pressure sensor.
9361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
9461847f8eSopenharmony_ci     * @since 9
9561847f8eSopenharmony_ci     */
9661847f8eSopenharmony_ci    BAROMETER = 8,
9761847f8eSopenharmony_ci
9861847f8eSopenharmony_ci    /**
9961847f8eSopenharmony_ci     * Hall effect sensor.
10061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
10161847f8eSopenharmony_ci     * @since 9
10261847f8eSopenharmony_ci     */
10361847f8eSopenharmony_ci    HALL = 10,
10461847f8eSopenharmony_ci
10561847f8eSopenharmony_ci    /**
10661847f8eSopenharmony_ci     * Proximity sensor.
10761847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
10861847f8eSopenharmony_ci     * @since 9
10961847f8eSopenharmony_ci     */
11061847f8eSopenharmony_ci    PROXIMITY = 12,
11161847f8eSopenharmony_ci
11261847f8eSopenharmony_ci    /**
11361847f8eSopenharmony_ci     * Humidity sensor.
11461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
11561847f8eSopenharmony_ci     * @since 9
11661847f8eSopenharmony_ci     */
11761847f8eSopenharmony_ci    HUMIDITY = 13,
11861847f8eSopenharmony_ci
11961847f8eSopenharmony_ci    /**
12061847f8eSopenharmony_ci     * Color sensor.
12161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
12261847f8eSopenharmony_ci     * @systemapi
12361847f8eSopenharmony_ci     * @since 10
12461847f8eSopenharmony_ci     */
12561847f8eSopenharmony_ci    COLOR = 14,
12661847f8eSopenharmony_ci
12761847f8eSopenharmony_ci    /**
12861847f8eSopenharmony_ci     * Sar sensor.
12961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
13061847f8eSopenharmony_ci     * @systemapi
13161847f8eSopenharmony_ci     * @since 10
13261847f8eSopenharmony_ci     */
13361847f8eSopenharmony_ci    SAR = 15,
13461847f8eSopenharmony_ci
13561847f8eSopenharmony_ci    /**
13661847f8eSopenharmony_ci     * Orientation sensor.
13761847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
13861847f8eSopenharmony_ci     * @since 9
13961847f8eSopenharmony_ci     */
14061847f8eSopenharmony_ci    /**
14161847f8eSopenharmony_ci     * Orientation sensor.
14261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
14361847f8eSopenharmony_ci     * @atomicservice
14461847f8eSopenharmony_ci     * @since 11
14561847f8eSopenharmony_ci     */
14661847f8eSopenharmony_ci    ORIENTATION = 256,
14761847f8eSopenharmony_ci
14861847f8eSopenharmony_ci    /**
14961847f8eSopenharmony_ci     * Gravity sensor.
15061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
15161847f8eSopenharmony_ci     * @since 9
15261847f8eSopenharmony_ci     */
15361847f8eSopenharmony_ci    GRAVITY = 257,
15461847f8eSopenharmony_ci
15561847f8eSopenharmony_ci    /**
15661847f8eSopenharmony_ci     * Linear acceleration sensor.
15761847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
15861847f8eSopenharmony_ci     * @since 9
15961847f8eSopenharmony_ci     */
16061847f8eSopenharmony_ci    LINEAR_ACCELEROMETER = 258,
16161847f8eSopenharmony_ci
16261847f8eSopenharmony_ci    /**
16361847f8eSopenharmony_ci     * Rotation vector sensor.
16461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
16561847f8eSopenharmony_ci     * @since 9
16661847f8eSopenharmony_ci     */
16761847f8eSopenharmony_ci    ROTATION_VECTOR = 259,
16861847f8eSopenharmony_ci
16961847f8eSopenharmony_ci    /**
17061847f8eSopenharmony_ci     * Ambient temperature sensor.
17161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
17261847f8eSopenharmony_ci     * @since 9
17361847f8eSopenharmony_ci     */
17461847f8eSopenharmony_ci    AMBIENT_TEMPERATURE = 260,
17561847f8eSopenharmony_ci
17661847f8eSopenharmony_ci    /**
17761847f8eSopenharmony_ci     * Uncalibrated magnetic field sensor.
17861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
17961847f8eSopenharmony_ci     * @since 9
18061847f8eSopenharmony_ci     */
18161847f8eSopenharmony_ci    MAGNETIC_FIELD_UNCALIBRATED = 261,
18261847f8eSopenharmony_ci
18361847f8eSopenharmony_ci    /**
18461847f8eSopenharmony_ci     * Uncalibrated gyroscope sensor.
18561847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
18661847f8eSopenharmony_ci     * @since 9
18761847f8eSopenharmony_ci     */
18861847f8eSopenharmony_ci    GYROSCOPE_UNCALIBRATED = 263,
18961847f8eSopenharmony_ci
19061847f8eSopenharmony_ci    /**
19161847f8eSopenharmony_ci     * Significant motion sensor.
19261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
19361847f8eSopenharmony_ci     * @since 9
19461847f8eSopenharmony_ci     */
19561847f8eSopenharmony_ci    SIGNIFICANT_MOTION = 264,
19661847f8eSopenharmony_ci
19761847f8eSopenharmony_ci    /**
19861847f8eSopenharmony_ci     * Pedometer detection sensor.
19961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
20061847f8eSopenharmony_ci     * @since 9
20161847f8eSopenharmony_ci     */
20261847f8eSopenharmony_ci    PEDOMETER_DETECTION = 265,
20361847f8eSopenharmony_ci
20461847f8eSopenharmony_ci    /**
20561847f8eSopenharmony_ci     * Pedometer sensor.
20661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
20761847f8eSopenharmony_ci     * @since 9
20861847f8eSopenharmony_ci     */
20961847f8eSopenharmony_ci    PEDOMETER = 266,
21061847f8eSopenharmony_ci
21161847f8eSopenharmony_ci    /**
21261847f8eSopenharmony_ci     * Heart rate sensor.
21361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
21461847f8eSopenharmony_ci     * @since 9
21561847f8eSopenharmony_ci     */
21661847f8eSopenharmony_ci    HEART_RATE = 278,
21761847f8eSopenharmony_ci
21861847f8eSopenharmony_ci    /**
21961847f8eSopenharmony_ci     * Wear detection sensor.
22061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
22161847f8eSopenharmony_ci     * @since 9
22261847f8eSopenharmony_ci     */
22361847f8eSopenharmony_ci    WEAR_DETECTION = 280,
22461847f8eSopenharmony_ci
22561847f8eSopenharmony_ci    /**
22661847f8eSopenharmony_ci     * Uncalibrated acceleration sensor.
22761847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
22861847f8eSopenharmony_ci     * @since 9
22961847f8eSopenharmony_ci     */
23061847f8eSopenharmony_ci    ACCELEROMETER_UNCALIBRATED = 281
23161847f8eSopenharmony_ci  }
23261847f8eSopenharmony_ci
23361847f8eSopenharmony_ci  /**
23461847f8eSopenharmony_ci   * Subscribe to color sensor data.
23561847f8eSopenharmony_ci   * @param { SensorId.COLOR } type - Indicate the sensor type to listen for, {@code SensorId.COLOR}.
23661847f8eSopenharmony_ci   * @param { Callback<ColorResponse> } callback - callback color data.
23761847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
23861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
23961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
24061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
24161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
24261847f8eSopenharmony_ci   * @systemapi
24361847f8eSopenharmony_ci   * @since 10
24461847f8eSopenharmony_ci   */
24561847f8eSopenharmony_ci  /**
24661847f8eSopenharmony_ci   * Subscribe to color sensor data.
24761847f8eSopenharmony_ci   * @param { SensorId.COLOR } type - Indicate the sensor type to listen for, {@code SensorId.COLOR}.
24861847f8eSopenharmony_ci   * @param { Callback<ColorResponse> } callback - callback color data.
24961847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
25061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
25161847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
25261847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
25361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission check failed. A non-system application uses the system API.
25461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
25561847f8eSopenharmony_ci   * @systemapi
25661847f8eSopenharmony_ci   * @since 11
25761847f8eSopenharmony_ci   */
25861847f8eSopenharmony_ci  function on(type: SensorId.COLOR, callback: Callback<ColorResponse>, options?: Options): void;
25961847f8eSopenharmony_ci
26061847f8eSopenharmony_ci  /**
26161847f8eSopenharmony_ci   * Subscribe to SAR sensor data.
26261847f8eSopenharmony_ci   * @param { SensorId.SAR } type - Indicate the sensor type to listen for, {@code SensorId.SAR}.
26361847f8eSopenharmony_ci   * @param { Callback<SarResponse> } callback - callback sar data.
26461847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
26561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
26661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
26761847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
26861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
26961847f8eSopenharmony_ci   * @systemapi
27061847f8eSopenharmony_ci   * @since 10
27161847f8eSopenharmony_ci   */
27261847f8eSopenharmony_ci  /**
27361847f8eSopenharmony_ci   * Subscribe to SAR sensor data.
27461847f8eSopenharmony_ci   * @param { SensorId.SAR } type - Indicate the sensor type to listen for, {@code SensorId.SAR}.
27561847f8eSopenharmony_ci   * @param { Callback<SarResponse> } callback - callback sar data.
27661847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
27761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
27861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
27961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
28061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission check failed. A non-system application uses the system API.
28161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
28261847f8eSopenharmony_ci   * @systemapi
28361847f8eSopenharmony_ci   * @since 11
28461847f8eSopenharmony_ci   */
28561847f8eSopenharmony_ci  function on(type: SensorId.SAR, callback: Callback<SarResponse>, options?: Options): void;
28661847f8eSopenharmony_ci
28761847f8eSopenharmony_ci  /**
28861847f8eSopenharmony_ci   * Subscribe to accelerometer sensor data.
28961847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
29061847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
29161847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
29261847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
29361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
29461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
29561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
29661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
29761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
29861847f8eSopenharmony_ci   * @since 9
29961847f8eSopenharmony_ci   */
30061847f8eSopenharmony_ci  /**
30161847f8eSopenharmony_ci   * Subscribe to accelerometer sensor data.
30261847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
30361847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
30461847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
30561847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
30661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
30761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
30861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
30961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
31061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
31161847f8eSopenharmony_ci   * @atomicservice
31261847f8eSopenharmony_ci   * @since 11
31361847f8eSopenharmony_ci   */
31461847f8eSopenharmony_ci  function on(type: SensorId.ACCELEROMETER, callback: Callback<AccelerometerResponse>,
31561847f8eSopenharmony_ci    options?: Options): void;
31661847f8eSopenharmony_ci
31761847f8eSopenharmony_ci  /**
31861847f8eSopenharmony_ci   * Subscribe to uncalibrated accelerometer sensor data.
31961847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
32061847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER_UNCALIBRATED } type - Indicate the sensor type to listen for,{@code SensorId.ACCELEROMETER_UNCALIBRATED}.
32161847f8eSopenharmony_ci   * @param { Callback<AccelerometerUncalibratedResponse> } callback - callback uncalibrated accelerometer data.
32261847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
32361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
32461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
32561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
32661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
32761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
32861847f8eSopenharmony_ci   * @since 9
32961847f8eSopenharmony_ci   */
33061847f8eSopenharmony_ci  function on(type: SensorId.ACCELEROMETER_UNCALIBRATED, callback: Callback<AccelerometerUncalibratedResponse>,
33161847f8eSopenharmony_ci    options?: Options): void;
33261847f8eSopenharmony_ci
33361847f8eSopenharmony_ci  /**
33461847f8eSopenharmony_ci   * Subscribe to ambient light sensor data.
33561847f8eSopenharmony_ci   * @param { SensorId.AMBIENT_LIGHT } type - Indicate the sensor type to listen for, {@code SensorId.AMBIENT_LIGHT}.
33661847f8eSopenharmony_ci   * @param { Callback<LightResponse> } callback - callback ambient data.
33761847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
33861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
33961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
34061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
34161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
34261847f8eSopenharmony_ci   * @since 9
34361847f8eSopenharmony_ci   */
34461847f8eSopenharmony_ci  function on(type: SensorId.AMBIENT_LIGHT, callback: Callback<LightResponse>, options?: Options): void;
34561847f8eSopenharmony_ci
34661847f8eSopenharmony_ci  /**
34761847f8eSopenharmony_ci   * Subscribe to ambient temperature sensor data.
34861847f8eSopenharmony_ci   * @param { SensorId.AMBIENT_TEMPERATURE } type - Indicate the sensor type to listen for, {@code SensorId.AMBIENT_TEMPERATURE}.
34961847f8eSopenharmony_ci   * @param { Callback<AmbientTemperatureResponse> } callback - callback temperature data.
35061847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
35161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
35261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
35361847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
35461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
35561847f8eSopenharmony_ci   * @since 9
35661847f8eSopenharmony_ci   */
35761847f8eSopenharmony_ci  function on(type: SensorId.AMBIENT_TEMPERATURE, callback: Callback<AmbientTemperatureResponse>,
35861847f8eSopenharmony_ci    options?: Options): void;
35961847f8eSopenharmony_ci
36061847f8eSopenharmony_ci  /**
36161847f8eSopenharmony_ci   * Subscribe to barometer sensor data.
36261847f8eSopenharmony_ci   * @param { SensorId.BAROMETER } type - Indicate the sensor type to listen for, {@code SensorId.BAROMETER}.
36361847f8eSopenharmony_ci   * @param { Callback<BarometerResponse> } callback - callback barometer data.
36461847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
36561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
36661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
36761847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
36861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
36961847f8eSopenharmony_ci   * @since 9
37061847f8eSopenharmony_ci   */
37161847f8eSopenharmony_ci  function on(type: SensorId.BAROMETER, callback: Callback<BarometerResponse>, options?: Options): void;
37261847f8eSopenharmony_ci
37361847f8eSopenharmony_ci  /**
37461847f8eSopenharmony_ci   * Subscribe to gravity sensor data.
37561847f8eSopenharmony_ci   * @param { SensorId.GRAVITY } type - Indicate the sensor type to listen for, {@code SensorId.GRAVITY}.
37661847f8eSopenharmony_ci   * @param { Callback<GravityResponse> } callback - callback gravity data.
37761847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
37861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
37961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
38061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
38161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
38261847f8eSopenharmony_ci   * @since 9
38361847f8eSopenharmony_ci   */
38461847f8eSopenharmony_ci  function on(type: SensorId.GRAVITY, callback: Callback<GravityResponse>,
38561847f8eSopenharmony_ci    options?: Options): void;
38661847f8eSopenharmony_ci
38761847f8eSopenharmony_ci  /**
38861847f8eSopenharmony_ci   * Subscribe to gyroscope sensor data.
38961847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
39061847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
39161847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
39261847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
39361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
39461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
39561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
39661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
39761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
39861847f8eSopenharmony_ci   * @since 9
39961847f8eSopenharmony_ci   */
40061847f8eSopenharmony_ci  /**
40161847f8eSopenharmony_ci   * Subscribe to gyroscope sensor data.
40261847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
40361847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
40461847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
40561847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
40661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
40761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
40861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
40961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
41061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
41161847f8eSopenharmony_ci   * @atomicservice
41261847f8eSopenharmony_ci   * @since 11
41361847f8eSopenharmony_ci   */
41461847f8eSopenharmony_ci  function on(type: SensorId.GYROSCOPE, callback: Callback<GyroscopeResponse>,
41561847f8eSopenharmony_ci    options?: Options): void;
41661847f8eSopenharmony_ci
41761847f8eSopenharmony_ci  /**
41861847f8eSopenharmony_ci   * Subscribe to uncalibrated gyroscope sensor data.
41961847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
42061847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE_UNCALIBRATED } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE_UNCALIBRATED}.
42161847f8eSopenharmony_ci   * @param { Callback<GyroscopeUncalibratedResponse> } callback - callback uncalibrated gyroscope data.
42261847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
42361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
42461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
42561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
42661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
42761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
42861847f8eSopenharmony_ci   * @since 9
42961847f8eSopenharmony_ci   */
43061847f8eSopenharmony_ci  function on(type: SensorId.GYROSCOPE_UNCALIBRATED, callback: Callback<GyroscopeUncalibratedResponse>,
43161847f8eSopenharmony_ci    options?: Options): void;
43261847f8eSopenharmony_ci
43361847f8eSopenharmony_ci  /**
43461847f8eSopenharmony_ci   * Subscribe to hall sensor data.
43561847f8eSopenharmony_ci   * @param { SensorId.HALL } type - Indicate the sensor type to listen for, {@code SensorId.HALL}.
43661847f8eSopenharmony_ci   * @param { Callback<HallResponse> } callback - callback uncalibrated gyroscope data.
43761847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
43861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
43961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
44061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
44161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
44261847f8eSopenharmony_ci   * @since 9
44361847f8eSopenharmony_ci   */
44461847f8eSopenharmony_ci  function on(type: SensorId.HALL, callback: Callback<HallResponse>, options?: Options): void;
44561847f8eSopenharmony_ci
44661847f8eSopenharmony_ci  /**
44761847f8eSopenharmony_ci   * Subscribe to heart rate sensor data.
44861847f8eSopenharmony_ci   * @permission ohos.permission.READ_HEALTH_DATA
44961847f8eSopenharmony_ci   * @param { SensorId.HEART_RATE } type - Indicate the sensor type to listen for, {@code SensorId.HEART_RATE}.
45061847f8eSopenharmony_ci   * @param { Callback<HeartRateResponse> } callback - callback heart rate data.
45161847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
45261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
45361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
45461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
45561847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
45661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
45761847f8eSopenharmony_ci   * @since 9
45861847f8eSopenharmony_ci   */
45961847f8eSopenharmony_ci  function on(type: SensorId.HEART_RATE, callback: Callback<HeartRateResponse>,
46061847f8eSopenharmony_ci    options?: Options): void;
46161847f8eSopenharmony_ci
46261847f8eSopenharmony_ci  /**
46361847f8eSopenharmony_ci   * Subscribe to humidity sensor data.
46461847f8eSopenharmony_ci   * @param { SensorId.HUMIDITY } type - Indicate the sensor type to listen for, {@code SensorId.HUMIDITY}.
46561847f8eSopenharmony_ci   * @param { Callback<HumidityResponse> } callback - callback humidity data.
46661847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
46761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
46861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
46961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
47061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
47161847f8eSopenharmony_ci   * @since 9
47261847f8eSopenharmony_ci   */
47361847f8eSopenharmony_ci  function on(type: SensorId.HUMIDITY, callback: Callback<HumidityResponse>,
47461847f8eSopenharmony_ci    options?: Options): void;
47561847f8eSopenharmony_ci
47661847f8eSopenharmony_ci  /**
47761847f8eSopenharmony_ci   * Subscribe to linear acceleration sensor data.
47861847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
47961847f8eSopenharmony_ci   * @param { SensorId.LINEAR_ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.LINEAR_ACCELEROMETER}.
48061847f8eSopenharmony_ci   * @param { Callback<LinearAccelerometerResponse> } callback - callback linear acceleration data.
48161847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
48261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
48361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
48461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
48561847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
48661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
48761847f8eSopenharmony_ci   * @since 9
48861847f8eSopenharmony_ci   */
48961847f8eSopenharmony_ci  function on(type: SensorId.LINEAR_ACCELEROMETER, callback: Callback<LinearAccelerometerResponse>,
49061847f8eSopenharmony_ci    options?: Options): void;
49161847f8eSopenharmony_ci
49261847f8eSopenharmony_ci  /**
49361847f8eSopenharmony_ci   * Subscribe to magnetic field sensor data.
49461847f8eSopenharmony_ci   * @param { SensorId.MAGNETIC_FIELD } type - Indicate the sensor type to listen for, {@code SensorId.MAGNETIC_FIELD}.
49561847f8eSopenharmony_ci   * @param { Callback<MagneticFieldResponse> } callback - callback magnetic field data.
49661847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
49761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
49861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
49961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
50061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
50161847f8eSopenharmony_ci   * @since 9
50261847f8eSopenharmony_ci   */
50361847f8eSopenharmony_ci  function on(type: SensorId.MAGNETIC_FIELD, callback: Callback<MagneticFieldResponse>,
50461847f8eSopenharmony_ci    options?: Options): void;
50561847f8eSopenharmony_ci
50661847f8eSopenharmony_ci  /**
50761847f8eSopenharmony_ci   * Subscribe to uncalibrated magnetic field sensor data.
50861847f8eSopenharmony_ci   * @param { SensorId.MAGNETIC_FIELD_UNCALIBRATED } type - Indicate the sensor type to listen for,
50961847f8eSopenharmony_ci   *        {@code SensorId.MAGNETIC_FIELD_UNCALIBRATED}.
51061847f8eSopenharmony_ci   * @param { Callback<MagneticFieldUncalibratedResponse> } callback - callback uncalibrated magnetic field data.
51161847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
51261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
51361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
51461847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
51561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
51661847f8eSopenharmony_ci   * @since 9
51761847f8eSopenharmony_ci   */
51861847f8eSopenharmony_ci  function on(type: SensorId.MAGNETIC_FIELD_UNCALIBRATED, callback: Callback<MagneticFieldUncalibratedResponse>,
51961847f8eSopenharmony_ci    options?: Options): void;
52061847f8eSopenharmony_ci
52161847f8eSopenharmony_ci  /**
52261847f8eSopenharmony_ci   * Subscribe to orientation sensor data.
52361847f8eSopenharmony_ci   * @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
52461847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
52561847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
52661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
52761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
52861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
52961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
53061847f8eSopenharmony_ci   * @since 9
53161847f8eSopenharmony_ci   */
53261847f8eSopenharmony_ci  /**
53361847f8eSopenharmony_ci   * Subscribe to orientation sensor data.
53461847f8eSopenharmony_ci   * @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
53561847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
53661847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
53761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
53861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
53961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
54061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
54161847f8eSopenharmony_ci   * @atomicservice
54261847f8eSopenharmony_ci   * @since 11
54361847f8eSopenharmony_ci   */
54461847f8eSopenharmony_ci  function on(type: SensorId.ORIENTATION, callback: Callback<OrientationResponse>,
54561847f8eSopenharmony_ci    options?: Options): void;
54661847f8eSopenharmony_ci
54761847f8eSopenharmony_ci  /**
54861847f8eSopenharmony_ci   * Subscribe to pedometer sensor data.
54961847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
55061847f8eSopenharmony_ci   * @param { SensorId.PEDOMETER } type - Indicate the sensor type to listen for, {@code SensorId.PEDOMETER}.
55161847f8eSopenharmony_ci   * @param { Callback<PedometerResponse> } callback - callback pedometer data.
55261847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
55361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
55461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
55561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
55661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
55761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
55861847f8eSopenharmony_ci   * @since 9
55961847f8eSopenharmony_ci   */
56061847f8eSopenharmony_ci  function on(type: SensorId.PEDOMETER, callback: Callback<PedometerResponse>, options?: Options): void;
56161847f8eSopenharmony_ci
56261847f8eSopenharmony_ci  /**
56361847f8eSopenharmony_ci   * Subscribe to pedometer detection sensor data.
56461847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
56561847f8eSopenharmony_ci   * @param { SensorId.PEDOMETER_DETECTION } type - Indicate the sensor type to listen for, {@code SensorId.PEDOMETER_DETECTION}.
56661847f8eSopenharmony_ci   * @param { Callback<PedometerDetectionResponse> } callback - callback pedometer detection data.
56761847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
56861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
56961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
57061847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
57161847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
57261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
57361847f8eSopenharmony_ci   * @since 9
57461847f8eSopenharmony_ci   */
57561847f8eSopenharmony_ci  function on(type: SensorId.PEDOMETER_DETECTION, callback: Callback<PedometerDetectionResponse>,
57661847f8eSopenharmony_ci    options?: Options): void;
57761847f8eSopenharmony_ci
57861847f8eSopenharmony_ci  /**
57961847f8eSopenharmony_ci   * Subscribe to proximity sensor data.
58061847f8eSopenharmony_ci   * @param { SensorId.PROXIMITY } type - Indicate the sensor type to listen for, {@code SensorId.PROXIMITY}.
58161847f8eSopenharmony_ci   * @param { Callback<ProximityResponse> } callback - callback proximity data.
58261847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
58361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
58461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
58561847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
58661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
58761847f8eSopenharmony_ci   * @since 9
58861847f8eSopenharmony_ci   */
58961847f8eSopenharmony_ci  function on(type: SensorId.PROXIMITY, callback: Callback<ProximityResponse>, options?: Options): void;
59061847f8eSopenharmony_ci
59161847f8eSopenharmony_ci  /**
59261847f8eSopenharmony_ci   * Subscribe to rotation vector sensor data.
59361847f8eSopenharmony_ci   * @param { SensorId.ROTATION_VECTOR } type - Indicate the sensor type to listen for, {@code SensorId.ROTATION_VECTOR}.
59461847f8eSopenharmony_ci   * @param { Callback<RotationVectorResponse> } callback - callback rotation vector data.
59561847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
59661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
59761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
59861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
59961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
60061847f8eSopenharmony_ci   * @since 9
60161847f8eSopenharmony_ci   */
60261847f8eSopenharmony_ci  function on(type: SensorId.ROTATION_VECTOR, callback: Callback<RotationVectorResponse>,
60361847f8eSopenharmony_ci    options?: Options): void;
60461847f8eSopenharmony_ci
60561847f8eSopenharmony_ci  /**
60661847f8eSopenharmony_ci   * Subscribe to significant motion sensor data.
60761847f8eSopenharmony_ci   * @param { SensorId.SIGNIFICANT_MOTION } type - Indicate the sensor type to listen for, {@code SensorId.SIGNIFICANT_MOTION}.
60861847f8eSopenharmony_ci   * @param { Callback<SignificantMotionResponse> } callback - callback significant motion data.
60961847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
61061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
61161847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
61261847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
61361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
61461847f8eSopenharmony_ci   * @since 9
61561847f8eSopenharmony_ci   */
61661847f8eSopenharmony_ci  function on(type: SensorId.SIGNIFICANT_MOTION, callback: Callback<SignificantMotionResponse>,
61761847f8eSopenharmony_ci    options?: Options): void;
61861847f8eSopenharmony_ci
61961847f8eSopenharmony_ci  /**
62061847f8eSopenharmony_ci   * Subscribe to wear detection sensor data.
62161847f8eSopenharmony_ci   * @param { SensorId.WEAR_DETECTION } type - Indicate the sensor type to listen for, {@code SensorId.WEAR_DETECTION}.
62261847f8eSopenharmony_ci   * @param { Callback<WearDetectionResponse> } callback - callback wear detection data.
62361847f8eSopenharmony_ci   * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
62461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
62561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
62661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
62761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
62861847f8eSopenharmony_ci   * @since 9
62961847f8eSopenharmony_ci   */
63061847f8eSopenharmony_ci  function on(type: SensorId.WEAR_DETECTION, callback: Callback<WearDetectionResponse>,
63161847f8eSopenharmony_ci    options?: Options): void;
63261847f8eSopenharmony_ci
63361847f8eSopenharmony_ci  /**
63461847f8eSopenharmony_ci   * Subscribe to accelerometer sensor data once.
63561847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
63661847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
63761847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
63861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
63961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
64061847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
64161847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
64261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
64361847f8eSopenharmony_ci   * @since 9
64461847f8eSopenharmony_ci   */
64561847f8eSopenharmony_ci  function once(type: SensorId.ACCELEROMETER, callback: Callback<AccelerometerResponse>): void;
64661847f8eSopenharmony_ci
64761847f8eSopenharmony_ci  /**
64861847f8eSopenharmony_ci   * Subscribe to uncalibrated accelerometer sensor data once.
64961847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
65061847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER_UNCALIBRATED } type - Indicate the sensor type to listen for,{@code SensorId.ACCELEROMETER_UNCALIBRATED}.
65161847f8eSopenharmony_ci   * @param { Callback<AccelerometerUncalibratedResponse> } callback - callback uncalibrated accelerometer data.
65261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
65361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
65461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
65561847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
65661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
65761847f8eSopenharmony_ci   * @since 9
65861847f8eSopenharmony_ci   */
65961847f8eSopenharmony_ci  function once(type: SensorId.ACCELEROMETER_UNCALIBRATED, callback: Callback<AccelerometerUncalibratedResponse>): void;
66061847f8eSopenharmony_ci
66161847f8eSopenharmony_ci  /**
66261847f8eSopenharmony_ci   * Subscribe to ambient light sensor data once.
66361847f8eSopenharmony_ci   * @param { SensorId.AMBIENT_LIGHT } type - Indicate the sensor type to listen for, {@code SensorId.AMBIENT_LIGHT}.
66461847f8eSopenharmony_ci   * @param { Callback<LightResponse> } callback - callback ambient data.
66561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
66661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
66761847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
66861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
66961847f8eSopenharmony_ci   * @since 9
67061847f8eSopenharmony_ci   */
67161847f8eSopenharmony_ci  function once(type: SensorId.AMBIENT_LIGHT, callback: Callback<LightResponse>): void;
67261847f8eSopenharmony_ci
67361847f8eSopenharmony_ci  /**
67461847f8eSopenharmony_ci   * Subscribe to ambient temperature sensor data once.
67561847f8eSopenharmony_ci   * @param { SensorId.AMBIENT_TEMPERATURE } type - Indicate the sensor type to listen for, {@code SensorId.AMBIENT_TEMPERATURE}.
67661847f8eSopenharmony_ci   * @param { Callback<AmbientTemperatureResponse> } callback - callback temperature data.
67761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
67861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
67961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
68061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
68161847f8eSopenharmony_ci   * @since 9
68261847f8eSopenharmony_ci   */
68361847f8eSopenharmony_ci  function once(type: SensorId.AMBIENT_TEMPERATURE, callback: Callback<AmbientTemperatureResponse>): void;
68461847f8eSopenharmony_ci
68561847f8eSopenharmony_ci  /**
68661847f8eSopenharmony_ci   * Subscribe to barometer sensor data once.
68761847f8eSopenharmony_ci   * @param { SensorId.BAROMETER } type - Indicate the sensor type to listen for, {@code SensorId.BAROMETER}.
68861847f8eSopenharmony_ci   * @param { Callback<BarometerResponse> } callback - callback barometer data.
68961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
69061847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
69161847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
69261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
69361847f8eSopenharmony_ci   * @since 9
69461847f8eSopenharmony_ci   */
69561847f8eSopenharmony_ci  function once(type: SensorId.BAROMETER, callback: Callback<BarometerResponse>): void;
69661847f8eSopenharmony_ci
69761847f8eSopenharmony_ci  /**
69861847f8eSopenharmony_ci   * Subscribe to gravity sensor data once.
69961847f8eSopenharmony_ci   * @param { SensorId.GRAVITY } type - Indicate the sensor type to listen for, {@code SensorId.GRAVITY}.
70061847f8eSopenharmony_ci   * @param { Callback<GravityResponse> } callback - callback gravity data.
70161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
70261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
70361847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
70461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
70561847f8eSopenharmony_ci   * @since 9
70661847f8eSopenharmony_ci   */
70761847f8eSopenharmony_ci  function once(type: SensorId.GRAVITY, callback: Callback<GravityResponse>): void;
70861847f8eSopenharmony_ci
70961847f8eSopenharmony_ci  /**
71061847f8eSopenharmony_ci   * Subscribe to gyroscope sensor data once.
71161847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
71261847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
71361847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
71461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
71561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
71661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
71761847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
71861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
71961847f8eSopenharmony_ci   * @since 9
72061847f8eSopenharmony_ci   */
72161847f8eSopenharmony_ci  function once(type: SensorId.GYROSCOPE, callback: Callback<GyroscopeResponse>): void;
72261847f8eSopenharmony_ci
72361847f8eSopenharmony_ci  /**
72461847f8eSopenharmony_ci   * Subscribe to uncalibrated gyroscope sensor data once.
72561847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
72661847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE_UNCALIBRATED } type - Indicate the sensor type to listen for,{@code SensorId.GYROSCOPE_UNCALIBRATED}.
72761847f8eSopenharmony_ci   * @param { Callback<GyroscopeUncalibratedResponse> } callback - callback uncalibrated gyroscope data.
72861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
72961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
73061847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
73161847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
73261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
73361847f8eSopenharmony_ci   * @since 9
73461847f8eSopenharmony_ci   */
73561847f8eSopenharmony_ci  function once(type: SensorId.GYROSCOPE_UNCALIBRATED, callback: Callback<GyroscopeUncalibratedResponse>): void;
73661847f8eSopenharmony_ci
73761847f8eSopenharmony_ci  /**
73861847f8eSopenharmony_ci   * Subscribe to hall sensor data once.
73961847f8eSopenharmony_ci   * @param { SensorId.HALL } type - Indicate the sensor type to listen for, {@code SensorId.HALL}.
74061847f8eSopenharmony_ci   * @param { Callback<HallResponse> } callback - callback uncalibrated gyroscope data.
74161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
74261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
74361847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
74461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
74561847f8eSopenharmony_ci   * @since 9
74661847f8eSopenharmony_ci   */
74761847f8eSopenharmony_ci  function once(type: SensorId.HALL, callback: Callback<HallResponse>): void;
74861847f8eSopenharmony_ci
74961847f8eSopenharmony_ci  /**
75061847f8eSopenharmony_ci   * Subscribe to heart rate sensor data once.
75161847f8eSopenharmony_ci   * @permission ohos.permission.READ_HEALTH_DATA
75261847f8eSopenharmony_ci   * @param { SensorId.HEART_RATE } type - Indicate the sensor type to listen for, {@code SensorId.HEART_RATE}.
75361847f8eSopenharmony_ci   * @param { Callback<HeartRateResponse> } callback - callback heart rate data.
75461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
75561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
75661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
75761847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
75861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
75961847f8eSopenharmony_ci   * @since 9
76061847f8eSopenharmony_ci   */
76161847f8eSopenharmony_ci  function once(type: SensorId.HEART_RATE, callback: Callback<HeartRateResponse>): void;
76261847f8eSopenharmony_ci
76361847f8eSopenharmony_ci  /**
76461847f8eSopenharmony_ci   * Subscribe to humidity sensor data once.
76561847f8eSopenharmony_ci   * @param { SensorId.HUMIDITY } type - Indicate the sensor type to listen for, {@code SensorId.HUMIDITY}.
76661847f8eSopenharmony_ci   * @param { Callback<HumidityResponse> } callback - callback humidity data.
76761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
76861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
76961847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
77061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
77161847f8eSopenharmony_ci   * @since 9
77261847f8eSopenharmony_ci   */
77361847f8eSopenharmony_ci  function once(type: SensorId.HUMIDITY, callback: Callback<HumidityResponse>): void;
77461847f8eSopenharmony_ci
77561847f8eSopenharmony_ci  /**
77661847f8eSopenharmony_ci   * Subscribe to linear acceleration sensor data once.
77761847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
77861847f8eSopenharmony_ci   * @param { SensorId.LINEAR_ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.LINEAR_ACCELEROMETER}.
77961847f8eSopenharmony_ci   * @param { Callback<LinearAccelerometerResponse> } callback - callback linear acceleration data.
78061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
78161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
78261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
78361847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
78461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
78561847f8eSopenharmony_ci   * @since 9
78661847f8eSopenharmony_ci   */
78761847f8eSopenharmony_ci  function once(type: SensorId.LINEAR_ACCELEROMETER, callback: Callback<LinearAccelerometerResponse>): void;
78861847f8eSopenharmony_ci
78961847f8eSopenharmony_ci  /**
79061847f8eSopenharmony_ci   * Subscribe to magnetic field sensor data once.
79161847f8eSopenharmony_ci   * @param { SensorId.MAGNETIC_FIELD } type - Indicate the sensor type to listen for, {@code SensorId.MAGNETIC_FIELD}.
79261847f8eSopenharmony_ci   * @param { Callback<MagneticFieldResponse> } callback - callback magnetic field data.
79361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
79461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
79561847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
79661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
79761847f8eSopenharmony_ci   * @since 9
79861847f8eSopenharmony_ci   */
79961847f8eSopenharmony_ci  function once(type: SensorId.MAGNETIC_FIELD, callback: Callback<MagneticFieldResponse>): void;
80061847f8eSopenharmony_ci
80161847f8eSopenharmony_ci  /**
80261847f8eSopenharmony_ci   * Subscribe to uncalibrated magnetic field sensor data once.
80361847f8eSopenharmony_ci   * @param { SensorId.MAGNETIC_FIELD_UNCALIBRATED } type - Indicate the sensor type to listen for,
80461847f8eSopenharmony_ci   *        {@code SensorId.MAGNETIC_FIELD_UNCALIBRATED}.
80561847f8eSopenharmony_ci   * @param { Callback<MagneticFieldUncalibratedResponse> } callback - callback uncalibrated magnetic field data.
80661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
80761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
80861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
80961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
81061847f8eSopenharmony_ci   * @since 9
81161847f8eSopenharmony_ci   */
81261847f8eSopenharmony_ci  function once(type: SensorId.MAGNETIC_FIELD_UNCALIBRATED, callback: Callback<MagneticFieldUncalibratedResponse>): void;
81361847f8eSopenharmony_ci
81461847f8eSopenharmony_ci  /**
81561847f8eSopenharmony_ci   * Subscribe to orientation sensor data once.
81661847f8eSopenharmony_ci   * @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
81761847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
81861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
81961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
82061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
82161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
82261847f8eSopenharmony_ci   * @since 9
82361847f8eSopenharmony_ci   */
82461847f8eSopenharmony_ci  function once(type: SensorId.ORIENTATION, callback: Callback<OrientationResponse>): void;
82561847f8eSopenharmony_ci
82661847f8eSopenharmony_ci  /**
82761847f8eSopenharmony_ci   * Subscribe to pedometer sensor data once.
82861847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
82961847f8eSopenharmony_ci   * @param { SensorId.PEDOMETER } type - Indicate the sensor type to listen for, {@code SensorId.PEDOMETER}.
83061847f8eSopenharmony_ci   * @param { Callback<PedometerResponse> } callback - callback pedometer data.
83161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
83261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
83361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
83461847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
83561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
83661847f8eSopenharmony_ci   * @since 9
83761847f8eSopenharmony_ci   */
83861847f8eSopenharmony_ci  function once(type: SensorId.PEDOMETER, callback: Callback<PedometerResponse>): void;
83961847f8eSopenharmony_ci
84061847f8eSopenharmony_ci  /**
84161847f8eSopenharmony_ci   * Subscribe to pedometer detection sensor data once.
84261847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
84361847f8eSopenharmony_ci   * @param { SensorId.PEDOMETER_DETECTION } type - Indicate the sensor type to listen for, {@code SensorId.PEDOMETER_DETECTION}.
84461847f8eSopenharmony_ci   * @param { Callback<PedometerDetectionResponse> } callback - callback pedometer detection data.
84561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
84661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
84761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
84861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
84961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
85061847f8eSopenharmony_ci   * @since 9
85161847f8eSopenharmony_ci   */
85261847f8eSopenharmony_ci  function once(type: SensorId.PEDOMETER_DETECTION, callback: Callback<PedometerDetectionResponse>): void;
85361847f8eSopenharmony_ci
85461847f8eSopenharmony_ci  /**
85561847f8eSopenharmony_ci   * Subscribe to proximity sensor data once.
85661847f8eSopenharmony_ci   * @param { SensorId.PROXIMITY } type - Indicate the sensor type to listen for, {@code SensorId.PROXIMITY}.
85761847f8eSopenharmony_ci   * @param { Callback<ProximityResponse> } callback - callback proximity data.
85861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
85961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
86061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
86161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
86261847f8eSopenharmony_ci   * @since 9
86361847f8eSopenharmony_ci   */
86461847f8eSopenharmony_ci  function once(type: SensorId.PROXIMITY, callback: Callback<ProximityResponse>): void;
86561847f8eSopenharmony_ci
86661847f8eSopenharmony_ci  /**
86761847f8eSopenharmony_ci   * Subscribe to rotation vector sensor data once.
86861847f8eSopenharmony_ci   * @param { SensorId.ROTATION_VECTOR } type - Indicate the sensor type to listen for, {@code SensorId.ROTATION_VECTOR}.
86961847f8eSopenharmony_ci   * @param { Callback<RotationVectorResponse> } callback - callback rotation vector data.
87061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
87161847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
87261847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
87361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
87461847f8eSopenharmony_ci   * @since 9
87561847f8eSopenharmony_ci   */
87661847f8eSopenharmony_ci  function once(type: SensorId.ROTATION_VECTOR, callback: Callback<RotationVectorResponse>): void;
87761847f8eSopenharmony_ci
87861847f8eSopenharmony_ci  /**
87961847f8eSopenharmony_ci   * Subscribe to significant motion sensor data once.
88061847f8eSopenharmony_ci   * @param { SensorId.SIGNIFICANT_MOTION } type - Indicate the sensor type to listen for, {@code SensorId.SIGNIFICANT_MOTION}.
88161847f8eSopenharmony_ci   * @param { Callback<SignificantMotionResponse> } callback - callback significant motion data.
88261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
88361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
88461847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
88561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
88661847f8eSopenharmony_ci   * @since 9
88761847f8eSopenharmony_ci   */
88861847f8eSopenharmony_ci  function once(type: SensorId.SIGNIFICANT_MOTION, callback: Callback<SignificantMotionResponse>): void;
88961847f8eSopenharmony_ci
89061847f8eSopenharmony_ci  /**
89161847f8eSopenharmony_ci   * Subscribe to wear detection sensor data once.
89261847f8eSopenharmony_ci   * @param { SensorId.WEAR_DETECTION } type - Indicate the sensor type to listen for, {@code SensorId.WEAR_DETECTION}.
89361847f8eSopenharmony_ci   * @param { Callback<WearDetectionResponse> } callback - callback wear detection data.
89461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
89561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
89661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
89761847f8eSopenharmony_ci   *
89861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
89961847f8eSopenharmony_ci   * @since 9
90061847f8eSopenharmony_ci   */
90161847f8eSopenharmony_ci  function once(type: SensorId.WEAR_DETECTION, callback: Callback<WearDetectionResponse>): void;
90261847f8eSopenharmony_ci
90361847f8eSopenharmony_ci  /**
90461847f8eSopenharmony_ci   * Unsubscribe to color sensor data.
90561847f8eSopenharmony_ci   * @param { SensorId.COLOR } type - Indicate the sensor type to listen for, {@code SensorId.COLOR}.
90661847f8eSopenharmony_ci   * @param { Callback<ColorResponse> } callback - callback color data.
90761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
90861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
90961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
91061847f8eSopenharmony_ci   * @systemapi
91161847f8eSopenharmony_ci   * @since 10
91261847f8eSopenharmony_ci   */
91361847f8eSopenharmony_ci  /**
91461847f8eSopenharmony_ci   * Unsubscribe to color sensor data.
91561847f8eSopenharmony_ci   * @param { SensorId.COLOR } type - Indicate the sensor type to listen for, {@code SensorId.COLOR}.
91661847f8eSopenharmony_ci   * @param { Callback<ColorResponse> } callback - callback color data.
91761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
91861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
91961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission check failed. A non-system application uses the system API.
92061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
92161847f8eSopenharmony_ci   * @systemapi
92261847f8eSopenharmony_ci   * @since 11
92361847f8eSopenharmony_ci   */
92461847f8eSopenharmony_ci  function off(type: SensorId.COLOR, callback?: Callback<ColorResponse>): void;
92561847f8eSopenharmony_ci
92661847f8eSopenharmony_ci  /**
92761847f8eSopenharmony_ci   * Unsubscribe to sar sensor data.
92861847f8eSopenharmony_ci   * @param { SensorId.SAR } type - Indicate the sensor type to listen for, {@code SensorId.SAR}.
92961847f8eSopenharmony_ci   * @param { Callback<SarResponse> } callback - callback sar data.
93061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
93161847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
93261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
93361847f8eSopenharmony_ci   * @systemapi
93461847f8eSopenharmony_ci   * @since 10
93561847f8eSopenharmony_ci   */
93661847f8eSopenharmony_ci  /**
93761847f8eSopenharmony_ci   * Unsubscribe to sar sensor data.
93861847f8eSopenharmony_ci   * @param { SensorId.SAR } type - Indicate the sensor type to listen for, {@code SensorId.SAR}.
93961847f8eSopenharmony_ci   * @param { Callback<SarResponse> } callback - callback sar data.
94061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
94161847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
94261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission check failed. A non-system application uses the system API.
94361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
94461847f8eSopenharmony_ci   * @systemapi
94561847f8eSopenharmony_ci   * @since 11
94661847f8eSopenharmony_ci   */
94761847f8eSopenharmony_ci  function off(type: SensorId.SAR, callback?: Callback<SarResponse>): void;
94861847f8eSopenharmony_ci
94961847f8eSopenharmony_ci  /**
95061847f8eSopenharmony_ci   * Unsubscribe to accelerometer sensor data.
95161847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
95261847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
95361847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
95461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
95561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
95661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
95761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
95861847f8eSopenharmony_ci   * @since 9
95961847f8eSopenharmony_ci   */
96061847f8eSopenharmony_ci  /**
96161847f8eSopenharmony_ci   * Unsubscribe to accelerometer sensor data.
96261847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
96361847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
96461847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
96561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
96661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
96761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
96861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
96961847f8eSopenharmony_ci   * @atomicservice
97061847f8eSopenharmony_ci   * @since 11
97161847f8eSopenharmony_ci   */
97261847f8eSopenharmony_ci  function off(type: SensorId.ACCELEROMETER, callback?: Callback<AccelerometerResponse>): void;
97361847f8eSopenharmony_ci
97461847f8eSopenharmony_ci  /**
97561847f8eSopenharmony_ci   * Unsubscribe to uncalibrated accelerometer sensor data.
97661847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
97761847f8eSopenharmony_ci   * @param { SensorId.ACCELEROMETER_UNCALIBRATED } type - Indicate the sensor type to listen for,
97861847f8eSopenharmony_ci   *        {@code SensorId.ACCELEROMETER_UNCALIBRATED}.
97961847f8eSopenharmony_ci   * @param { Callback<AccelerometerUncalibratedResponse> } callback - callback uncalibrated accelerometer data.
98061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
98161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
98261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
98361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
98461847f8eSopenharmony_ci   * @since 9
98561847f8eSopenharmony_ci   */
98661847f8eSopenharmony_ci  function off(type: SensorId.ACCELEROMETER_UNCALIBRATED, callback?: Callback<AccelerometerUncalibratedResponse>): void;
98761847f8eSopenharmony_ci
98861847f8eSopenharmony_ci  /**
98961847f8eSopenharmony_ci   * Unsubscribe to ambient light sensor data.
99061847f8eSopenharmony_ci   * @param { SensorId.AMBIENT_LIGHT } type - Indicate the sensor type to listen for, {@code SensorId.AMBIENT_LIGHT}.
99161847f8eSopenharmony_ci   * @param { Callback<LightResponse> } callback - callback ambient data.
99261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
99361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
99461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
99561847f8eSopenharmony_ci   * @since 9
99661847f8eSopenharmony_ci   */
99761847f8eSopenharmony_ci  function off(type: SensorId.AMBIENT_LIGHT, callback?: Callback<LightResponse>): void;
99861847f8eSopenharmony_ci
99961847f8eSopenharmony_ci  /**
100061847f8eSopenharmony_ci   * Unsubscribe to ambient temperature sensor data.
100161847f8eSopenharmony_ci   * @param { SensorId.AMBIENT_TEMPERATURE } type - Indicate the sensor type to listen for, {@code SensorId.AMBIENT_TEMPERATURE}.
100261847f8eSopenharmony_ci   * @param { Callback<AmbientTemperatureResponse> } callback - callback temperature data.
100361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
100461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
100561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
100661847f8eSopenharmony_ci   * @since 9
100761847f8eSopenharmony_ci   */
100861847f8eSopenharmony_ci  function off(type: SensorId.AMBIENT_TEMPERATURE, callback?: Callback<AmbientTemperatureResponse>): void;
100961847f8eSopenharmony_ci
101061847f8eSopenharmony_ci  /**
101161847f8eSopenharmony_ci   * Unsubscribe to barometer sensor data.
101261847f8eSopenharmony_ci   * @param { SensorId.BAROMETER } type - Indicate the sensor type to listen for, {@code SensorId.BAROMETER}.
101361847f8eSopenharmony_ci   * @param { Callback<BarometerResponse> } callback - callback barometer data.
101461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
101561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
101661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
101761847f8eSopenharmony_ci   * @since 9
101861847f8eSopenharmony_ci   */
101961847f8eSopenharmony_ci  function off(type: SensorId.BAROMETER, callback?: Callback<BarometerResponse>): void;
102061847f8eSopenharmony_ci
102161847f8eSopenharmony_ci  /**
102261847f8eSopenharmony_ci   * Unsubscribe to gravity sensor data.
102361847f8eSopenharmony_ci   * @param { SensorId.GRAVITY } type - Indicate the sensor type to listen for, {@code SensorId.GRAVITY}.
102461847f8eSopenharmony_ci   * @param { Callback<GravityResponse> } callback - callback gravity data.
102561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
102661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
102761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
102861847f8eSopenharmony_ci   * @since 9
102961847f8eSopenharmony_ci   */
103061847f8eSopenharmony_ci  function off(type: SensorId.GRAVITY, callback?: Callback<GravityResponse>): void;
103161847f8eSopenharmony_ci
103261847f8eSopenharmony_ci  /**
103361847f8eSopenharmony_ci   * Unsubscribe to gyroscope sensor data.
103461847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
103561847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
103661847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
103761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
103861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
103961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
104061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
104161847f8eSopenharmony_ci   * @since 9
104261847f8eSopenharmony_ci   */
104361847f8eSopenharmony_ci  /**
104461847f8eSopenharmony_ci   * Unsubscribe to gyroscope sensor data.
104561847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
104661847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
104761847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
104861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
104961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
105061847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
105161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
105261847f8eSopenharmony_ci   * @atomicservice
105361847f8eSopenharmony_ci   * @since 11
105461847f8eSopenharmony_ci   */
105561847f8eSopenharmony_ci  function off(type: SensorId.GYROSCOPE, callback?: Callback<GyroscopeResponse>): void;
105661847f8eSopenharmony_ci
105761847f8eSopenharmony_ci  /**
105861847f8eSopenharmony_ci   * Unsubscribe to uncalibrated gyroscope sensor data.
105961847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
106061847f8eSopenharmony_ci   * @param { SensorId.GYROSCOPE_UNCALIBRATED } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE_UNCALIBRATED}.
106161847f8eSopenharmony_ci   * @param { Callback<GyroscopeUncalibratedResponse> } callback - callback uncalibrated gyroscope data.
106261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
106361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
106461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
106561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
106661847f8eSopenharmony_ci   * @since 9
106761847f8eSopenharmony_ci   */
106861847f8eSopenharmony_ci  function off(type: SensorId.GYROSCOPE_UNCALIBRATED, callback?: Callback<GyroscopeUncalibratedResponse>): void;
106961847f8eSopenharmony_ci
107061847f8eSopenharmony_ci  /**
107161847f8eSopenharmony_ci   * Unsubscribe to hall sensor data.
107261847f8eSopenharmony_ci   * @param { SensorId.HALL } type - Indicate the sensor type to listen for, {@code SensorId.HALL}.
107361847f8eSopenharmony_ci   * @param { Callback<HallResponse> } callback - callback uncalibrated gyroscope data.
107461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
107561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
107661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
107761847f8eSopenharmony_ci   * @since 9
107861847f8eSopenharmony_ci   */
107961847f8eSopenharmony_ci  function off(type: SensorId.HALL, callback?: Callback<HallResponse>): void;
108061847f8eSopenharmony_ci
108161847f8eSopenharmony_ci  /**
108261847f8eSopenharmony_ci   * Unsubscribe to heart rate sensor data.
108361847f8eSopenharmony_ci   * @permission ohos.permission.READ_HEALTH_DATA
108461847f8eSopenharmony_ci   * @param { SensorId.HEART_RATE } type - Indicate the sensor type to listen for, {@code SensorId.HEART_RATE}.
108561847f8eSopenharmony_ci   * @param { Callback<HeartRateResponse> } callback - callback heart rate data.
108661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
108761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
108861847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
108961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
109061847f8eSopenharmony_ci   * @since 9
109161847f8eSopenharmony_ci   */
109261847f8eSopenharmony_ci  function off(type: SensorId.HEART_RATE, callback?: Callback<HeartRateResponse>): void;
109361847f8eSopenharmony_ci
109461847f8eSopenharmony_ci  /**
109561847f8eSopenharmony_ci   * Unsubscribe to humidity sensor data.
109661847f8eSopenharmony_ci   * @param { SensorId.HUMIDITY } type - Indicate the sensor type to listen for, {@code SensorId.HUMIDITY}.
109761847f8eSopenharmony_ci   * @param { Callback<HumidityResponse> } callback - callback humidity data.
109861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
109961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
110061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
110161847f8eSopenharmony_ci   * @since 9
110261847f8eSopenharmony_ci   */
110361847f8eSopenharmony_ci  function off(type: SensorId.HUMIDITY, callback?: Callback<HumidityResponse>): void;
110461847f8eSopenharmony_ci
110561847f8eSopenharmony_ci  /**
110661847f8eSopenharmony_ci   * Unsubscribe to linear acceleration sensor data.
110761847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
110861847f8eSopenharmony_ci   * @param { SensorId.LINEAR_ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.LINEAR_ACCELEROMETER}.
110961847f8eSopenharmony_ci   * @param { Callback<LinearAccelerometerResponse> } callback - callback linear acceleration data.
111061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
111161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
111261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
111361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
111461847f8eSopenharmony_ci   * @since 9
111561847f8eSopenharmony_ci   */
111661847f8eSopenharmony_ci  function off(type: SensorId.LINEAR_ACCELEROMETER, callback?: Callback<LinearAccelerometerResponse>): void;
111761847f8eSopenharmony_ci
111861847f8eSopenharmony_ci  /**
111961847f8eSopenharmony_ci   * Unsubscribe to magnetic field sensor data.
112061847f8eSopenharmony_ci   * @param { SensorId.MAGNETIC_FIELD } type - Indicate the sensor type to listen for, {@code SensorId.MAGNETIC_FIELD}.
112161847f8eSopenharmony_ci   * @param { Callback<MagneticFieldResponse> } callback - callback magnetic field data.
112261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
112361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
112461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
112561847f8eSopenharmony_ci   * @since 9
112661847f8eSopenharmony_ci   */
112761847f8eSopenharmony_ci  function off(type: SensorId.MAGNETIC_FIELD, callback?: Callback<MagneticFieldResponse>): void;
112861847f8eSopenharmony_ci
112961847f8eSopenharmony_ci  /**
113061847f8eSopenharmony_ci   * Unsubscribe to uncalibrated magnetic field sensor data.
113161847f8eSopenharmony_ci   * @param { SensorId.MAGNETIC_FIELD_UNCALIBRATED } type - Indicate the sensor type to listen for,
113261847f8eSopenharmony_ci   *        {@code SensorId.MAGNETIC_FIELD_UNCALIBRATED}.
113361847f8eSopenharmony_ci   * @param { Callback<MagneticFieldUncalibratedResponse> } callback - callback uncalibrated magnetic field data.
113461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
113561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
113661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
113761847f8eSopenharmony_ci   * @since 9
113861847f8eSopenharmony_ci   */
113961847f8eSopenharmony_ci  function off(type: SensorId.MAGNETIC_FIELD_UNCALIBRATED, callback?: Callback<MagneticFieldUncalibratedResponse>): void;
114061847f8eSopenharmony_ci
114161847f8eSopenharmony_ci  /**
114261847f8eSopenharmony_ci   * Unsubscribe to orientation sensor data.
114361847f8eSopenharmony_ci   * @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
114461847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
114561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
114661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
114761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
114861847f8eSopenharmony_ci   * @since 9
114961847f8eSopenharmony_ci   */
115061847f8eSopenharmony_ci  /**
115161847f8eSopenharmony_ci   * Unsubscribe to orientation sensor data.
115261847f8eSopenharmony_ci   * @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
115361847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
115461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
115561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
115661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
115761847f8eSopenharmony_ci   * @atomicservice
115861847f8eSopenharmony_ci   * @since 11
115961847f8eSopenharmony_ci   */
116061847f8eSopenharmony_ci  function off(type: SensorId.ORIENTATION, callback?: Callback<OrientationResponse>): void;
116161847f8eSopenharmony_ci
116261847f8eSopenharmony_ci  /**
116361847f8eSopenharmony_ci   * Unsubscribe to pedometer sensor data.
116461847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
116561847f8eSopenharmony_ci   * @param { SensorId.PEDOMETER } type - Indicate the sensor type to listen for, {@code SensorId.PEDOMETER}.
116661847f8eSopenharmony_ci   * @param { Callback<PedometerResponse> } callback - callback pedometer data.
116761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
116861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
116961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
117061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
117161847f8eSopenharmony_ci   * @since 9
117261847f8eSopenharmony_ci   */
117361847f8eSopenharmony_ci  function off(type: SensorId.PEDOMETER, callback?: Callback<PedometerResponse>): void;
117461847f8eSopenharmony_ci
117561847f8eSopenharmony_ci  /**
117661847f8eSopenharmony_ci   * Unsubscribe to pedometer detection sensor data.
117761847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
117861847f8eSopenharmony_ci   * @param { SensorId.PEDOMETER_DETECTION } type - Indicate the sensor type to listen for, {@code SensorId.PEDOMETER_DETECTION}.
117961847f8eSopenharmony_ci   * @param { Callback<PedometerDetectionResponse> } callback - callback pedometer detection data.
118061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
118161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
118261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
118361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
118461847f8eSopenharmony_ci   * @since 9
118561847f8eSopenharmony_ci   */
118661847f8eSopenharmony_ci  function off(type: SensorId.PEDOMETER_DETECTION, callback?: Callback<PedometerDetectionResponse>): void;
118761847f8eSopenharmony_ci
118861847f8eSopenharmony_ci  /**
118961847f8eSopenharmony_ci   * Unsubscribe to proximity sensor data.
119061847f8eSopenharmony_ci   * @param { SensorId.PROXIMITY } type - Indicate the sensor type to listen for, {@code SensorId.PROXIMITY}.
119161847f8eSopenharmony_ci   * @param { Callback<ProximityResponse> } callback - callback proximity data.
119261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
119361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
119461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
119561847f8eSopenharmony_ci   * @since 9
119661847f8eSopenharmony_ci   */
119761847f8eSopenharmony_ci  function off(type: SensorId.PROXIMITY, callback?: Callback<ProximityResponse>): void;
119861847f8eSopenharmony_ci
119961847f8eSopenharmony_ci  /**
120061847f8eSopenharmony_ci   * Unsubscribe to rotation vector sensor data.
120161847f8eSopenharmony_ci   * @param { SensorId.ROTATION_VECTOR } type - Indicate the sensor type to listen for, {@code SensorId.ROTATION_VECTOR}.
120261847f8eSopenharmony_ci   * @param { Callback<RotationVectorResponse> } callback - callback rotation vector data.
120361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
120461847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
120561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
120661847f8eSopenharmony_ci   * @since 9
120761847f8eSopenharmony_ci   */
120861847f8eSopenharmony_ci  function off(type: SensorId.ROTATION_VECTOR, callback?: Callback<RotationVectorResponse>): void;
120961847f8eSopenharmony_ci
121061847f8eSopenharmony_ci  /**
121161847f8eSopenharmony_ci   * Unsubscribe to significant motion sensor data.
121261847f8eSopenharmony_ci   * @param { SensorId.SIGNIFICANT_MOTION } type - Indicate the sensor type to listen for, {@code SensorId.SIGNIFICANT_MOTION}.
121361847f8eSopenharmony_ci   * @param { Callback<SignificantMotionResponse> } callback - callback significant motion data.
121461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
121561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
121661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
121761847f8eSopenharmony_ci   * @since 9
121861847f8eSopenharmony_ci   */
121961847f8eSopenharmony_ci  function off(type: SensorId.SIGNIFICANT_MOTION, callback?: Callback<SignificantMotionResponse>): void;
122061847f8eSopenharmony_ci
122161847f8eSopenharmony_ci  /**
122261847f8eSopenharmony_ci   * Unsubscribe to wear detection sensor data.
122361847f8eSopenharmony_ci   * @param { SensorId.WEAR_DETECTION } type - Indicate the sensor type to listen for, {@code SensorId.WEAR_DETECTION}.
122461847f8eSopenharmony_ci   * @param { Callback<WearDetectionResponse> } callback - callback wear detection data.
122561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
122661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
122761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
122861847f8eSopenharmony_ci   * @since 9
122961847f8eSopenharmony_ci   */
123061847f8eSopenharmony_ci  function off(type: SensorId.WEAR_DETECTION, callback?: Callback<WearDetectionResponse>): void;
123161847f8eSopenharmony_ci
123261847f8eSopenharmony_ci  /**
123361847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
123461847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
123561847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ACCELEROMETER } type - Indicate the sensor type to listen for, 
123661847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER}.
123761847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
123861847f8eSopenharmony_ci   * @param { Options } options - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
123961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
124061847f8eSopenharmony_ci   * @since 8
124161847f8eSopenharmony_ci   * @deprecated since 9
124261847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ACCELEROMETER
124361847f8eSopenharmony_ci   */
124461847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback<AccelerometerResponse>,
124561847f8eSopenharmony_ci    options?: Options): void;
124661847f8eSopenharmony_ci
124761847f8eSopenharmony_ci  /**
124861847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
124961847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
125061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED } type - Indicate the sensor type to listen for, 
125161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED}.
125261847f8eSopenharmony_ci   * @param { Callback<AccelerometerUncalibratedResponse> } callback - callback accelerometer uncalibrated data.
125361847f8eSopenharmony_ci   * @param { Options } options - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
125461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
125561847f8eSopenharmony_ci   * @since 8
125661847f8eSopenharmony_ci   * @deprecated since 9
125761847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ACCELEROMETER_UNCALIBRATED
125861847f8eSopenharmony_ci   */
125961847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, callback: Callback<AccelerometerUncalibratedResponse>,
126061847f8eSopenharmony_ci    options?: Options): void;
126161847f8eSopenharmony_ci
126261847f8eSopenharmony_ci  /**
126361847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
126461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT } type - type Indicate the sensor type to listen for, 
126561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT}.
126661847f8eSopenharmony_ci   * @param { Callback<LightResponse> } callback - callback light data.
126761847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
126861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
126961847f8eSopenharmony_ci   * @since 8
127061847f8eSopenharmony_ci   * @deprecated since 9
127161847f8eSopenharmony_ci   * @useinstead sensor.SensorId#AMBIENT_LIGHT
127261847f8eSopenharmony_ci   */
127361847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: Callback<LightResponse>,
127461847f8eSopenharmony_ci    options?: Options): void;
127561847f8eSopenharmony_ci
127661847f8eSopenharmony_ci  /**
127761847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
127861847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE } type - type Indicate the sensor type to listen for, 
127961847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE}.
128061847f8eSopenharmony_ci   * @param { Callback<AmbientTemperatureResponse> } callback - callback ambient temperature data.
128161847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
128261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
128361847f8eSopenharmony_ci   * @since 8
128461847f8eSopenharmony_ci   * @deprecated since 9
128561847f8eSopenharmony_ci   * @useinstead sensor.SensorId#AMBIENT_TEMPERATURE
128661847f8eSopenharmony_ci   */
128761847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback: Callback<AmbientTemperatureResponse>,
128861847f8eSopenharmony_ci    options?: Options): void;
128961847f8eSopenharmony_ci
129061847f8eSopenharmony_ci  /**
129161847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
129261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_BAROMETER } type - type Indicate the sensor type to listen for, 
129361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_BAROMETER}.
129461847f8eSopenharmony_ci   * @param { Callback<BarometerResponse> } callback - callback barometer data.
129561847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
129661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
129761847f8eSopenharmony_ci   * @since 8
129861847f8eSopenharmony_ci   * @deprecated since 9
129961847f8eSopenharmony_ci   * @useinstead sensor.SensorId#BAROMETER
130061847f8eSopenharmony_ci   */
130161847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: Callback<BarometerResponse>,
130261847f8eSopenharmony_ci    options?: Options): void;
130361847f8eSopenharmony_ci
130461847f8eSopenharmony_ci  /**
130561847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
130661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GRAVITY } type - type Indicate the sensor type to listen for, 
130761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GRAVITY}.
130861847f8eSopenharmony_ci   * @param { Callback<GravityResponse> } callback - callback gravity data.
130961847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
131061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
131161847f8eSopenharmony_ci   * @since 8
131261847f8eSopenharmony_ci   * @deprecated since 9
131361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GRAVITY
131461847f8eSopenharmony_ci   */
131561847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: Callback<GravityResponse>,
131661847f8eSopenharmony_ci    options?: Options): void;
131761847f8eSopenharmony_ci
131861847f8eSopenharmony_ci  /**
131961847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
132061847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
132161847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GYROSCOPE } type - type Indicate the sensor type to listen for, 
132261847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE}.
132361847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
132461847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
132561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
132661847f8eSopenharmony_ci   * @since 8
132761847f8eSopenharmony_ci   * @deprecated since 9
132861847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GYROSCOPE
132961847f8eSopenharmony_ci   */
133061847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: Callback<GyroscopeResponse>,
133161847f8eSopenharmony_ci    options?: Options): void;
133261847f8eSopenharmony_ci
133361847f8eSopenharmony_ci  /**
133461847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
133561847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
133661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED } type - type Indicate the sensor type to listen for, 
133761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED}.
133861847f8eSopenharmony_ci   * @param { Callback<GyroscopeUncalibratedResponse> } callback - callback gyroscope uncalibrated data.
133961847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
134061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
134161847f8eSopenharmony_ci   * @since 8
134261847f8eSopenharmony_ci   * @deprecated since 9
134361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GYROSCOPE_UNCALIBRATED
134461847f8eSopenharmony_ci   */
134561847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback: Callback<GyroscopeUncalibratedResponse>,
134661847f8eSopenharmony_ci    options?: Options): void;
134761847f8eSopenharmony_ci
134861847f8eSopenharmony_ci  /**
134961847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
135061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HALL } type - type Indicate the sensor type to listen for, 
135161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HALL}.
135261847f8eSopenharmony_ci   * @param { Callback<HallResponse> } callback - callback hall data.
135361847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
135461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
135561847f8eSopenharmony_ci   * @since 8
135661847f8eSopenharmony_ci   * @deprecated since 9
135761847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HALL
135861847f8eSopenharmony_ci   */
135961847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_HALL, callback: Callback<HallResponse>,
136061847f8eSopenharmony_ci    options?: Options): void;
136161847f8eSopenharmony_ci
136261847f8eSopenharmony_ci  /**
136361847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
136461847f8eSopenharmony_ci   * @permission ohos.permission.HEALTH_DATA
136561847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HEART_RATE } type - type Indicate the sensor type to listen for, 
136661847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HEART_RATE}.
136761847f8eSopenharmony_ci   * @param { Callback<HeartRateResponse> } callback - callback heart rate data.
136861847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
136961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
137061847f8eSopenharmony_ci   * @since 8
137161847f8eSopenharmony_ci   * @deprecated since 9
137261847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HEART_RATE
137361847f8eSopenharmony_ci   */
137461847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback<HeartRateResponse>,
137561847f8eSopenharmony_ci    options?: Options): void;
137661847f8eSopenharmony_ci
137761847f8eSopenharmony_ci  /**
137861847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
137961847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HUMIDITY } type - type Indicate the sensor type to listen for, 
138061847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HUMIDITY}.
138161847f8eSopenharmony_ci   * @param { Callback<HumidityResponse> } callback - callback humidity data.
138261847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
138361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
138461847f8eSopenharmony_ci   * @since 8
138561847f8eSopenharmony_ci   * @deprecated since 9
138661847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HUMIDITY
138761847f8eSopenharmony_ci   */
138861847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: Callback<HumidityResponse>,
138961847f8eSopenharmony_ci    options?: Options): void;
139061847f8eSopenharmony_ci
139161847f8eSopenharmony_ci  /**
139261847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
139361847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
139461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION } type - type Indicate the sensor type to listen for, 
139561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION}.
139661847f8eSopenharmony_ci   * @param { Callback<LinearAccelerometerResponse> } callback - callback linear accelerometer data.
139761847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
139861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
139961847f8eSopenharmony_ci   * @since 8
140061847f8eSopenharmony_ci   * @deprecated since 9
140161847f8eSopenharmony_ci   * @useinstead sensor.SensorId#LINEAR_ACCELEROMETER
140261847f8eSopenharmony_ci   */
140361847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: Callback<LinearAccelerometerResponse>,
140461847f8eSopenharmony_ci    options?: Options): void;
140561847f8eSopenharmony_ci
140661847f8eSopenharmony_ci  /**
140761847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
140861847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD } type - type Indicate the sensor type to listen for, 
140961847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD}.
141061847f8eSopenharmony_ci   * @param { Callback<MagneticFieldResponse> } callback - callback magnetic field data.
141161847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
141261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
141361847f8eSopenharmony_ci   * @since 8
141461847f8eSopenharmony_ci   * @deprecated since 9
141561847f8eSopenharmony_ci   * @useinstead sensor.SensorId#MAGNETIC_FIELD
141661847f8eSopenharmony_ci   */
141761847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: Callback<MagneticFieldResponse>,
141861847f8eSopenharmony_ci    options?: Options): void;
141961847f8eSopenharmony_ci
142061847f8eSopenharmony_ci  /**
142161847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
142261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED } type - type Indicate the sensor type to listen for, 
142361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED}.
142461847f8eSopenharmony_ci   * @param { Callback<MagneticFieldUncalibratedResponse> } callback - callback magnetic field uncalibrated data.
142561847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
142661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
142761847f8eSopenharmony_ci   * @since 8
142861847f8eSopenharmony_ci   * @deprecated since 9
142961847f8eSopenharmony_ci   * @useinstead sensor.SensorId#MAGNETIC_FIELD_UNCALIBRATED
143061847f8eSopenharmony_ci   */
143161847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback: Callback<MagneticFieldUncalibratedResponse>,
143261847f8eSopenharmony_ci    options?: Options): void;
143361847f8eSopenharmony_ci
143461847f8eSopenharmony_ci  /**
143561847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
143661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ORIENTATION } type - type Indicate the sensor type to listen for, 
143761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ORIENTATION}.
143861847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
143961847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
144061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
144161847f8eSopenharmony_ci   * @since 8
144261847f8eSopenharmony_ci   * @deprecated since 9
144361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ORIENTATION
144461847f8eSopenharmony_ci   */
144561847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: Callback<OrientationResponse>,
144661847f8eSopenharmony_ci    options?: Options): void;
144761847f8eSopenharmony_ci
144861847f8eSopenharmony_ci  /**
144961847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
145061847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
145161847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PEDOMETER } type - type Indicate the sensor type to listen for, 
145261847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PEDOMETER}.
145361847f8eSopenharmony_ci   * @param { Callback<PedometerResponse> } callback - callback pedometer data.
145461847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
145561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
145661847f8eSopenharmony_ci   * @since 8
145761847f8eSopenharmony_ci   * @deprecated since 9
145861847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PEDOMETER
145961847f8eSopenharmony_ci   */
146061847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: Callback<PedometerResponse>,
146161847f8eSopenharmony_ci    options?: Options): void;
146261847f8eSopenharmony_ci
146361847f8eSopenharmony_ci  /**
146461847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
146561847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
146661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION } type - type Indicate the sensor type to listen for, 
146761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION}.
146861847f8eSopenharmony_ci   * @param { Callback<PedometerDetectionResponse> } callback - callback pedometer detection data.
146961847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
147061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
147161847f8eSopenharmony_ci   * @since 8
147261847f8eSopenharmony_ci   * @deprecated since 9
147361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PEDOMETER_DETECTION
147461847f8eSopenharmony_ci   */
147561847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: Callback<PedometerDetectionResponse>,
147661847f8eSopenharmony_ci    options?: Options): void;
147761847f8eSopenharmony_ci
147861847f8eSopenharmony_ci  /**
147961847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
148061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PROXIMITY } type - type Indicate the sensor type to listen for, 
148161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PROXIMITY}.
148261847f8eSopenharmony_ci   * @param { Callback<ProximityResponse> } callback - callback proximity data.
148361847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
148461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
148561847f8eSopenharmony_ci   * @since 8
148661847f8eSopenharmony_ci   * @deprecated since 9
148761847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PROXIMITY
148861847f8eSopenharmony_ci   */
148961847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: Callback<ProximityResponse>,
149061847f8eSopenharmony_ci    options?: Options): void;
149161847f8eSopenharmony_ci
149261847f8eSopenharmony_ci  /**
149361847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
149461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR } type - type Indicate the sensor type to listen for, 
149561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR}.
149661847f8eSopenharmony_ci   * @param { Callback<RotationVectorResponse> } callback - callback rotation vector data.
149761847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
149861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
149961847f8eSopenharmony_ci   * @since 8
150061847f8eSopenharmony_ci   * @deprecated since 9
150161847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ROTATION_VECTOR
150261847f8eSopenharmony_ci   */
150361847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback: Callback<RotationVectorResponse>,
150461847f8eSopenharmony_ci    options?: Options): void;
150561847f8eSopenharmony_ci
150661847f8eSopenharmony_ci  /**
150761847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
150861847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION } type - type Indicate the sensor type to listen for, 
150961847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION}.
151061847f8eSopenharmony_ci   * @param { Callback<SignificantMotionResponse> } callback - callback significant motion data.
151161847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
151261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
151361847f8eSopenharmony_ci   * @since 8
151461847f8eSopenharmony_ci   * @deprecated since 9
151561847f8eSopenharmony_ci   * @useinstead sensor.SensorId#SIGNIFICANT_MOTION
151661847f8eSopenharmony_ci   */
151761847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: Callback<SignificantMotionResponse>,
151861847f8eSopenharmony_ci    options?: Options): void;
151961847f8eSopenharmony_ci
152061847f8eSopenharmony_ci  /**
152161847f8eSopenharmony_ci   * Subscribe to sensor data, If the API is called multiple times, the last call takes effect.
152261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_WEAR_DETECTION } type - type Indicate the sensor type to listen for, 
152361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_WEAR_DETECTION}.
152461847f8eSopenharmony_ci   * @param { Callback<WearDetectionResponse> } callback - callback wear detection data.
152561847f8eSopenharmony_ci   * @param { Options } options - options Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
152661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
152761847f8eSopenharmony_ci   * @since 8
152861847f8eSopenharmony_ci   * @deprecated since 9
152961847f8eSopenharmony_ci   * @useinstead sensor.SensorId#WEAR_DETECTION
153061847f8eSopenharmony_ci   */
153161847f8eSopenharmony_ci  function on(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: Callback<WearDetectionResponse>,
153261847f8eSopenharmony_ci    options?: Options): void;
153361847f8eSopenharmony_ci
153461847f8eSopenharmony_ci  /**
153561847f8eSopenharmony_ci   * Subscribe to sensor data once.
153661847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
153761847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ACCELEROMETER } type - type Indicate the sensor type to listen for, 
153861847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER}.
153961847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
154061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
154161847f8eSopenharmony_ci   * @since 8
154261847f8eSopenharmony_ci   * @deprecated since 9
154361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ACCELEROMETER
154461847f8eSopenharmony_ci   */
154561847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback<AccelerometerResponse>): void;
154661847f8eSopenharmony_ci
154761847f8eSopenharmony_ci  /**
154861847f8eSopenharmony_ci   * Subscribe to sensor data once.
154961847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
155061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED } type - type Indicate the sensor type to listen for, 
155161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED}.
155261847f8eSopenharmony_ci   * @param { Callback<AccelerometerUncalibratedResponse> } callback - callback accelerometer uncalibrated data.
155361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
155461847f8eSopenharmony_ci   * @since 8
155561847f8eSopenharmony_ci   * @deprecated since 9
155661847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ACCELEROMETER_UNCALIBRATED
155761847f8eSopenharmony_ci   */
155861847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, callback: Callback<AccelerometerUncalibratedResponse>): void;
155961847f8eSopenharmony_ci
156061847f8eSopenharmony_ci  /**
156161847f8eSopenharmony_ci   * Subscribe to sensor data once.
156261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT } type - type Indicate the sensor type to listen for, 
156361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT}.
156461847f8eSopenharmony_ci   * @param { Callback<LightResponse> } callback - callback light data.
156561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
156661847f8eSopenharmony_ci   * @since 8
156761847f8eSopenharmony_ci   * @deprecated since 9
156861847f8eSopenharmony_ci   * @useinstead sensor.SensorId#AMBIENT_LIGHT
156961847f8eSopenharmony_ci   */
157061847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: Callback<LightResponse>): void;
157161847f8eSopenharmony_ci
157261847f8eSopenharmony_ci  /**
157361847f8eSopenharmony_ci   * Subscribe to sensor data once.
157461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE } type - type Indicate the sensor type to listen for, 
157561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE}.
157661847f8eSopenharmony_ci   * @param { Callback<AmbientTemperatureResponse> } callback - callback ambient temperature data.
157761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
157861847f8eSopenharmony_ci   * @since 8
157961847f8eSopenharmony_ci   * @deprecated since 9
158061847f8eSopenharmony_ci   * @useinstead sensor.SensorId#AMBIENT_TEMPERATURE
158161847f8eSopenharmony_ci   */
158261847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback: Callback<AmbientTemperatureResponse>): void;
158361847f8eSopenharmony_ci
158461847f8eSopenharmony_ci  /**
158561847f8eSopenharmony_ci   * Subscribe to sensor data once.
158661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_BAROMETER } type - type Indicate the sensor type to listen for, 
158761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_BAROMETER}.
158861847f8eSopenharmony_ci   * @param { Callback<BarometerResponse> } callback - callback barometer data.
158961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
159061847f8eSopenharmony_ci   * @since 8
159161847f8eSopenharmony_ci   * @deprecated since 9
159261847f8eSopenharmony_ci   * @useinstead sensor.SensorId#BAROMETER
159361847f8eSopenharmony_ci   */
159461847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: Callback<BarometerResponse>): void;
159561847f8eSopenharmony_ci
159661847f8eSopenharmony_ci  /**
159761847f8eSopenharmony_ci   * Subscribe to sensor data once.
159861847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GRAVITY } type - type Indicate the sensor type to listen for, 
159961847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GRAVITY}.
160061847f8eSopenharmony_ci   * @param { Callback<GravityResponse> } callback - callback gravity data.
160161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
160261847f8eSopenharmony_ci   * @since 8
160361847f8eSopenharmony_ci   * @deprecated since 9
160461847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GRAVITY
160561847f8eSopenharmony_ci   */
160661847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: Callback<GravityResponse>): void;
160761847f8eSopenharmony_ci
160861847f8eSopenharmony_ci  /**
160961847f8eSopenharmony_ci   * Subscribe to sensor data once.
161061847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
161161847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GYROSCOPE } type - type Indicate the sensor type to listen for, 
161261847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE}.
161361847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
161461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
161561847f8eSopenharmony_ci   * @since 8
161661847f8eSopenharmony_ci   * @deprecated since 9
161761847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GYROSCOPE
161861847f8eSopenharmony_ci   */
161961847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: Callback<GyroscopeResponse>): void;
162061847f8eSopenharmony_ci
162161847f8eSopenharmony_ci  /**
162261847f8eSopenharmony_ci   * Subscribe to sensor data once.
162361847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
162461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED } type - type Indicate the sensor type to listen for, 
162561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED}.
162661847f8eSopenharmony_ci   * @param { Callback<GyroscopeUncalibratedResponse> } callback - callback gyroscope uncalibrated data.
162761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
162861847f8eSopenharmony_ci   * @since 8
162961847f8eSopenharmony_ci   * @deprecated since 9
163061847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GYROSCOPE_UNCALIBRATED
163161847f8eSopenharmony_ci   */
163261847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback: Callback<GyroscopeUncalibratedResponse>): void;
163361847f8eSopenharmony_ci
163461847f8eSopenharmony_ci  /**
163561847f8eSopenharmony_ci   * Subscribe to sensor data once.
163661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HALL } type - type Indicate the sensor type to listen for, 
163761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HALL}.
163861847f8eSopenharmony_ci   * @param { Callback<HallResponse> } callback - callback hall data.
163961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
164061847f8eSopenharmony_ci   * @since 8
164161847f8eSopenharmony_ci   * @deprecated since 9
164261847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HALL
164361847f8eSopenharmony_ci   */
164461847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_HALL, callback: Callback<HallResponse>): void;
164561847f8eSopenharmony_ci
164661847f8eSopenharmony_ci  /**
164761847f8eSopenharmony_ci   * Subscribe to sensor data once.
164861847f8eSopenharmony_ci   * @permission ohos.permission.HEART_RATE
164961847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HEART_RATE } type - type Indicate the sensor type to listen for, 
165061847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HEART_RATE}.
165161847f8eSopenharmony_ci   * @param { Callback<HeartRateResponse> } callback - callback heart rate data.
165261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
165361847f8eSopenharmony_ci   * @since 8
165461847f8eSopenharmony_ci   * @deprecated since 9
165561847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HEART_RATE
165661847f8eSopenharmony_ci   */
165761847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback<HeartRateResponse>): void;
165861847f8eSopenharmony_ci
165961847f8eSopenharmony_ci  /**
166061847f8eSopenharmony_ci   * Subscribe to sensor data once.
166161847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HUMIDITY } type - type Indicate the sensor type to listen for, 
166261847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HUMIDITY}.
166361847f8eSopenharmony_ci   * @param { Callback<HumidityResponse> } callback - callback humidity data.
166461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
166561847f8eSopenharmony_ci   * @since 8
166661847f8eSopenharmony_ci   * @deprecated since 9
166761847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HUMIDITY
166861847f8eSopenharmony_ci   */
166961847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: Callback<HumidityResponse>): void;
167061847f8eSopenharmony_ci
167161847f8eSopenharmony_ci  /**
167261847f8eSopenharmony_ci   * Subscribe to sensor data once.
167361847f8eSopenharmony_ci   * @permission ohos.permission.ACCELERATION
167461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION } type - type Indicate the sensor type to listen for, 
167561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION}.
167661847f8eSopenharmony_ci   * @param { Callback<LinearAccelerometerResponse> } callback - callback linear accelerometer data.
167761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
167861847f8eSopenharmony_ci   * @since 8
167961847f8eSopenharmony_ci   * @deprecated since 9
168061847f8eSopenharmony_ci   * @useinstead sensor.SensorId#LINEAR_ACCELEROMETER
168161847f8eSopenharmony_ci   */
168261847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: Callback<LinearAccelerometerResponse>): void;
168361847f8eSopenharmony_ci
168461847f8eSopenharmony_ci  /**
168561847f8eSopenharmony_ci   * Subscribe to sensor data once.
168661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD } type - type Indicate the sensor type to listen for, 
168761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD}.
168861847f8eSopenharmony_ci   * @param { Callback<MagneticFieldResponse> } callback - callback magnetic field data.
168961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
169061847f8eSopenharmony_ci   * @since 8
169161847f8eSopenharmony_ci   * @deprecated since 9
169261847f8eSopenharmony_ci   * @useinstead sensor.SensorId#MAGNETIC_FIELD
169361847f8eSopenharmony_ci   */
169461847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: Callback<MagneticFieldResponse>): void;
169561847f8eSopenharmony_ci
169661847f8eSopenharmony_ci  /**
169761847f8eSopenharmony_ci   * Subscribe to sensor data once.
169861847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED } type - type Indicate the sensor type to listen for, 
169961847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED}.
170061847f8eSopenharmony_ci   * @param { Callback<MagneticFieldUncalibratedResponse> } callback - callback magnetic field uncalibrated data.
170161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
170261847f8eSopenharmony_ci   * @since 8
170361847f8eSopenharmony_ci   * @deprecated since 9
170461847f8eSopenharmony_ci   * @useinstead sensor.SensorId#MAGNETIC_FIELD_UNCALIBRATED
170561847f8eSopenharmony_ci   */
170661847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback: Callback<MagneticFieldUncalibratedResponse>): void;
170761847f8eSopenharmony_ci
170861847f8eSopenharmony_ci  /**
170961847f8eSopenharmony_ci   * Subscribe to sensor data once.
171061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ORIENTATION } type - type Indicate the sensor type to listen for, 
171161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ORIENTATION}.
171261847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
171361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
171461847f8eSopenharmony_ci   * @since 8
171561847f8eSopenharmony_ci   * @deprecated since 9
171661847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ORIENTATION
171761847f8eSopenharmony_ci   */
171861847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: Callback<OrientationResponse>): void;
171961847f8eSopenharmony_ci
172061847f8eSopenharmony_ci  /**
172161847f8eSopenharmony_ci   * Subscribe to sensor data once.
172261847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
172361847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PEDOMETER } type - type Indicate the sensor type to listen for, 
172461847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PEDOMETER}.
172561847f8eSopenharmony_ci   * @param { Callback<PedometerResponse> } callback - callback pedometer data.
172661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
172761847f8eSopenharmony_ci   * @since 8
172861847f8eSopenharmony_ci   * @deprecated since 9
172961847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PEDOMETER
173061847f8eSopenharmony_ci   */
173161847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: Callback<PedometerResponse>): void;
173261847f8eSopenharmony_ci
173361847f8eSopenharmony_ci  /**
173461847f8eSopenharmony_ci   * Subscribe to sensor data once.
173561847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
173661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION } type - type Indicate the sensor type to listen for, 
173761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION}.
173861847f8eSopenharmony_ci   * @param { Callback<PedometerDetectionResponse> } callback - callback pedometer detection data.
173961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
174061847f8eSopenharmony_ci   * @since 8
174161847f8eSopenharmony_ci   * @deprecated since 9
174261847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PEDOMETER_DETECTION
174361847f8eSopenharmony_ci   */
174461847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: Callback<PedometerDetectionResponse>): void;
174561847f8eSopenharmony_ci
174661847f8eSopenharmony_ci  /**
174761847f8eSopenharmony_ci   * Subscribe to sensor data once.
174861847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PROXIMITY } type - type Indicate the sensor type to listen for, 
174961847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PROXIMITY}.
175061847f8eSopenharmony_ci   * @param { Callback<ProximityResponse> } callback - callback proximity data.
175161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
175261847f8eSopenharmony_ci   * @since 8
175361847f8eSopenharmony_ci   * @deprecated since 9
175461847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PROXIMITY
175561847f8eSopenharmony_ci   */
175661847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: Callback<ProximityResponse>): void;
175761847f8eSopenharmony_ci
175861847f8eSopenharmony_ci  /**
175961847f8eSopenharmony_ci   * Subscribe to sensor data once.
176061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR } type - type Indicate the sensor type to listen for, 
176161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR}.
176261847f8eSopenharmony_ci   * @param { Callback<RotationVectorResponse> } callback - callback rotation vector data.
176361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
176461847f8eSopenharmony_ci   * @since 8
176561847f8eSopenharmony_ci   * @deprecated since 9
176661847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ROTATION_VECTOR
176761847f8eSopenharmony_ci   */
176861847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback: Callback<RotationVectorResponse>): void;
176961847f8eSopenharmony_ci
177061847f8eSopenharmony_ci  /**
177161847f8eSopenharmony_ci   * Subscribe to sensor data once.
177261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION } type - type Indicate the sensor type to listen for, 
177361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION}.
177461847f8eSopenharmony_ci   * @param { Callback<SignificantMotionResponse> } callback - callback significant motion data.
177561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
177661847f8eSopenharmony_ci   * @since 8
177761847f8eSopenharmony_ci   * @deprecated since 9
177861847f8eSopenharmony_ci   * @useinstead sensor.SensorId#SIGNIFICANT_MOTION
177961847f8eSopenharmony_ci   */
178061847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: Callback<SignificantMotionResponse>): void;
178161847f8eSopenharmony_ci
178261847f8eSopenharmony_ci  /**
178361847f8eSopenharmony_ci   * Subscribe to sensor data once.
178461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_WEAR_DETECTION } type - type Indicate the sensor type to listen for, 
178561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_WEAR_DETECTION}.
178661847f8eSopenharmony_ci   * @param { Callback<WearDetectionResponse> } callback - callback wear detection data.
178761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
178861847f8eSopenharmony_ci   * @since 8
178961847f8eSopenharmony_ci   * @deprecated since 9
179061847f8eSopenharmony_ci   * @useinstead sensor.SensorId#WEAR_DETECTION
179161847f8eSopenharmony_ci   */
179261847f8eSopenharmony_ci  function once(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: Callback<WearDetectionResponse>): void;
179361847f8eSopenharmony_ci
179461847f8eSopenharmony_ci  /**
179561847f8eSopenharmony_ci   * Unsubscribe to sensor data.
179661847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
179761847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ACCELEROMETER } type - type Indicate the sensor type to unsubscribe, 
179861847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER}.
179961847f8eSopenharmony_ci   * @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
180061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
180161847f8eSopenharmony_ci   * @since 8
180261847f8eSopenharmony_ci   * @deprecated since 9
180361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ACCELEROMETER
180461847f8eSopenharmony_ci   */
180561847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback?: Callback<AccelerometerResponse>): void;
180661847f8eSopenharmony_ci
180761847f8eSopenharmony_ci  /**
180861847f8eSopenharmony_ci   * Unsubscribe to sensor data.
180961847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
181061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED } type - type Indicate the sensor type to unsubscribe, 
181161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED}.
181261847f8eSopenharmony_ci   * @param { Callback<AccelerometerUncalibratedResponse> } callback - callback accelerometer uncalibrated data.
181361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
181461847f8eSopenharmony_ci   * @since 8
181561847f8eSopenharmony_ci   * @deprecated since 9
181661847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ACCELEROMETER_UNCALIBRATED
181761847f8eSopenharmony_ci   */
181861847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,
181961847f8eSopenharmony_ci    callback?: Callback<AccelerometerUncalibratedResponse>): void;
182061847f8eSopenharmony_ci
182161847f8eSopenharmony_ci  /**
182261847f8eSopenharmony_ci   * Unsubscribe to sensor data.
182361847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT } type - type Indicate the sensor type to unsubscribe, 
182461847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT}.
182561847f8eSopenharmony_ci   * @param { Callback<LightResponse> } callback - callback light data.
182661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
182761847f8eSopenharmony_ci   * @since 8
182861847f8eSopenharmony_ci   * @deprecated since 9
182961847f8eSopenharmony_ci   * @useinstead sensor.SensorId#AMBIENT_LIGHT
183061847f8eSopenharmony_ci   */
183161847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback?: Callback<LightResponse>): void;
183261847f8eSopenharmony_ci
183361847f8eSopenharmony_ci  /**
183461847f8eSopenharmony_ci   * Unsubscribe to sensor data.
183561847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE } type - type Indicate the sensor type to unsubscribe, 
183661847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE}.
183761847f8eSopenharmony_ci   * @param { Callback<AmbientTemperatureResponse> } callback - callback ambient temperature data.
183861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
183961847f8eSopenharmony_ci   * @since 8
184061847f8eSopenharmony_ci   * @deprecated since 9
184161847f8eSopenharmony_ci   * @useinstead sensor.SensorId#AMBIENT_TEMPERATURE
184261847f8eSopenharmony_ci   */
184361847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback?: Callback<AmbientTemperatureResponse>): void;
184461847f8eSopenharmony_ci
184561847f8eSopenharmony_ci  /**
184661847f8eSopenharmony_ci   * Unsubscribe to sensor data.
184761847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_BAROMETER } type - type Indicate the sensor type to unsubscribe, 
184861847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_BAROMETER}.
184961847f8eSopenharmony_ci   * @param { Callback<BarometerResponse> } callback - callback barometer response data.
185061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
185161847f8eSopenharmony_ci   * @since 8
185261847f8eSopenharmony_ci   * @deprecated since 9
185361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#BAROMETER
185461847f8eSopenharmony_ci   */
185561847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback?: Callback<BarometerResponse>): void;
185661847f8eSopenharmony_ci
185761847f8eSopenharmony_ci  /**
185861847f8eSopenharmony_ci   * Unsubscribe to sensor data.
185961847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GRAVITY } type - type Indicate the sensor type to unsubscribe, 
186061847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GRAVITY}.
186161847f8eSopenharmony_ci   * @param { Callback<GravityResponse> } callback - callback gravity data.
186261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
186361847f8eSopenharmony_ci   * @since 8
186461847f8eSopenharmony_ci   * @deprecated since 9
186561847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GRAVITY
186661847f8eSopenharmony_ci   */
186761847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback?: Callback<GravityResponse>): void;
186861847f8eSopenharmony_ci
186961847f8eSopenharmony_ci  /**
187061847f8eSopenharmony_ci   * Unsubscribe to sensor data.
187161847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
187261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GYROSCOPE } type - type Indicate the sensor type to unsubscribe, 
187361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE}.
187461847f8eSopenharmony_ci   * @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
187561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
187661847f8eSopenharmony_ci   * @since 8
187761847f8eSopenharmony_ci   * @deprecated since 9
187861847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GYROSCOPE
187961847f8eSopenharmony_ci   */
188061847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback?: Callback<GyroscopeResponse>): void;
188161847f8eSopenharmony_ci
188261847f8eSopenharmony_ci  /**
188361847f8eSopenharmony_ci   * Unsubscribe to sensor data.
188461847f8eSopenharmony_ci   * @permission ohos.permission.GYROSCOPE
188561847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED } type - type Indicate the sensor type to unsubscribe, 
188661847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED}.
188761847f8eSopenharmony_ci   * @param { Callback<GyroscopeUncalibratedResponse> } callback - callback gyroscope uncalibrated data.
188861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
188961847f8eSopenharmony_ci   * @since 8
189061847f8eSopenharmony_ci   * @deprecated since 9
189161847f8eSopenharmony_ci   * @useinstead sensor.SensorId#GYROSCOPE_UNCALIBRATED
189261847f8eSopenharmony_ci   */
189361847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback?: Callback<GyroscopeUncalibratedResponse>): void;
189461847f8eSopenharmony_ci
189561847f8eSopenharmony_ci  /**
189661847f8eSopenharmony_ci   * Unsubscribe to sensor data.
189761847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HALL } type - type Indicate the sensor type to unsubscribe, 
189861847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HALL}.
189961847f8eSopenharmony_ci   * @param { Callback<HallResponse> } callback - callback hall data.
190061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
190161847f8eSopenharmony_ci   * @since 8
190261847f8eSopenharmony_ci   * @deprecated since 9
190361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HALL
190461847f8eSopenharmony_ci   */
190561847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_HALL, callback?: Callback<HallResponse>): void;
190661847f8eSopenharmony_ci
190761847f8eSopenharmony_ci  /**
190861847f8eSopenharmony_ci   * Unsubscribe to sensor data.
190961847f8eSopenharmony_ci   * @permission ohos.permission.HEALTH_DATA
191061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HEART_RATE } type - type Indicate the sensor type to unsubscribe, 
191161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HEART_RATE}.
191261847f8eSopenharmony_ci   * @param { Callback<HeartRateResponse> } callback - callback heart rate data.
191361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
191461847f8eSopenharmony_ci   * @since 8
191561847f8eSopenharmony_ci   * @deprecated since 9
191661847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HEART_RATE
191761847f8eSopenharmony_ci   */
191861847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback?: Callback<HeartRateResponse>): void;
191961847f8eSopenharmony_ci
192061847f8eSopenharmony_ci  /**
192161847f8eSopenharmony_ci   * Unsubscribe to sensor data.
192261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_HUMIDITY } type - type Indicate the sensor type to unsubscribe, 
192361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_HUMIDITY}.
192461847f8eSopenharmony_ci   * @param { Callback<HumidityResponse> } callback - callback humidity data.
192561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
192661847f8eSopenharmony_ci   * @since 8
192761847f8eSopenharmony_ci   * @deprecated since 9
192861847f8eSopenharmony_ci   * @useinstead sensor.SensorId#HUMIDITY
192961847f8eSopenharmony_ci   */
193061847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback?: Callback<HumidityResponse>): void;
193161847f8eSopenharmony_ci
193261847f8eSopenharmony_ci  /**
193361847f8eSopenharmony_ci   * Unsubscribe to sensor data.
193461847f8eSopenharmony_ci   * @permission ohos.permission.ACCELEROMETER
193561847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION } type - type Indicate the sensor type to unsubscribe, 
193661847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION}.
193761847f8eSopenharmony_ci   * @param { Callback<LinearAccelerometerResponse> } callback - callback linear accelerometer data.
193861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
193961847f8eSopenharmony_ci   * @since 8
194061847f8eSopenharmony_ci   * @deprecated since 9
194161847f8eSopenharmony_ci   * @useinstead sensor.SensorId#LINEAR_ACCELEROMETER
194261847f8eSopenharmony_ci   */
194361847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback?: Callback<LinearAccelerometerResponse>): void;
194461847f8eSopenharmony_ci
194561847f8eSopenharmony_ci  /**
194661847f8eSopenharmony_ci   * Unsubscribe to sensor data.
194761847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD } type - type Indicate the sensor type to unsubscribe, 
194861847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD}.
194961847f8eSopenharmony_ci   * @param { Callback<MagneticFieldResponse> } callback - callback magnetic field data.
195061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
195161847f8eSopenharmony_ci   * @since 8
195261847f8eSopenharmony_ci   * @deprecated since 9
195361847f8eSopenharmony_ci   * @useinstead sensor.SensorId#MAGNETIC_FIELD
195461847f8eSopenharmony_ci   */
195561847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback?: Callback<MagneticFieldResponse>): void;
195661847f8eSopenharmony_ci
195761847f8eSopenharmony_ci  /**
195861847f8eSopenharmony_ci   * Unsubscribe to sensor data.
195961847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED } type - type Indicate the sensor type to unsubscribe, 
196061847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED}.
196161847f8eSopenharmony_ci   * @param { Callback<MagneticFieldUncalibratedResponse> } callback - callback magnetic field uncalibrated data.
196261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
196361847f8eSopenharmony_ci   * @since 8
196461847f8eSopenharmony_ci   * @deprecated since 9
196561847f8eSopenharmony_ci   * @useinstead sensor.SensorId#MAGNETIC_FIELD_UNCALIBRATED
196661847f8eSopenharmony_ci   */
196761847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback?: Callback<MagneticFieldUncalibratedResponse>): void;
196861847f8eSopenharmony_ci
196961847f8eSopenharmony_ci  /**
197061847f8eSopenharmony_ci   * Unsubscribe to sensor data.
197161847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ORIENTATION } type - type Indicate the sensor type to unsubscribe, 
197261847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ORIENTATION}.
197361847f8eSopenharmony_ci   * @param { Callback<OrientationResponse> } callback - callback orientation data.
197461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
197561847f8eSopenharmony_ci   * @since 8
197661847f8eSopenharmony_ci   * @deprecated since 9
197761847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ORIENTATION
197861847f8eSopenharmony_ci   */
197961847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback?: Callback<OrientationResponse>): void;
198061847f8eSopenharmony_ci
198161847f8eSopenharmony_ci  /**
198261847f8eSopenharmony_ci   * Unsubscribe to sensor data.
198361847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
198461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PEDOMETER } type - type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_PEDOMETER}.
198561847f8eSopenharmony_ci   * @param { Callback<PedometerResponse> } callback - callback pedometer data.
198661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
198761847f8eSopenharmony_ci   * @since 8
198861847f8eSopenharmony_ci   * @deprecated since 9
198961847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PEDOMETER
199061847f8eSopenharmony_ci   */
199161847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback?: Callback<PedometerResponse>): void;
199261847f8eSopenharmony_ci
199361847f8eSopenharmony_ci  /**
199461847f8eSopenharmony_ci   * Unsubscribe to sensor data.
199561847f8eSopenharmony_ci   * @permission ohos.permission.ACTIVITY_MOTION
199661847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION } type - type Indicate the sensor type to unsubscribe, 
199761847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION}.
199861847f8eSopenharmony_ci   * @param { Callback<PedometerDetectionResponse> } callback - callback pedometer detection data.
199961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
200061847f8eSopenharmony_ci   * @since 8
200161847f8eSopenharmony_ci   * @deprecated since 9
200261847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PEDOMETER_DETECTION
200361847f8eSopenharmony_ci   */
200461847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback?: Callback<PedometerDetectionResponse>): void;
200561847f8eSopenharmony_ci
200661847f8eSopenharmony_ci  /**
200761847f8eSopenharmony_ci   * Unsubscribe to sensor data.
200861847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_PROXIMITY } type - type Indicate the sensor type to unsubscribe, 
200961847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_PROXIMITY}.
201061847f8eSopenharmony_ci   * @param { Callback<ProximityResponse> } callback - callback proximity data.
201161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
201261847f8eSopenharmony_ci   * @since 8
201361847f8eSopenharmony_ci   * @deprecated since 9
201461847f8eSopenharmony_ci   * @useinstead sensor.SensorId#PROXIMITY
201561847f8eSopenharmony_ci   */
201661847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback?: Callback<ProximityResponse>): void;
201761847f8eSopenharmony_ci
201861847f8eSopenharmony_ci  /**
201961847f8eSopenharmony_ci   * Unsubscribe to sensor data.
202061847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR } type - type Indicate the sensor type to unsubscribe, 
202161847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR}.
202261847f8eSopenharmony_ci   * @param { Callback<RotationVectorResponse> } callback - callback rotation vector data.
202361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
202461847f8eSopenharmony_ci   * @since 8
202561847f8eSopenharmony_ci   * @deprecated since 9
202661847f8eSopenharmony_ci   * @useinstead sensor.SensorId#ROTATION_VECTOR
202761847f8eSopenharmony_ci   */
202861847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback?: Callback<RotationVectorResponse>): void;
202961847f8eSopenharmony_ci
203061847f8eSopenharmony_ci  /**
203161847f8eSopenharmony_ci   * Unsubscribe to sensor data.
203261847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION } type - type Indicate the sensor type to unsubscribe, 
203361847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION}.
203461847f8eSopenharmony_ci   * @param { Callback<SignificantMotionResponse> } callback - callback significant motion data.
203561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
203661847f8eSopenharmony_ci   * @since 8
203761847f8eSopenharmony_ci   * @deprecated since 9
203861847f8eSopenharmony_ci   * @useinstead sensor.SensorId#SIGNIFICANT_MOTION
203961847f8eSopenharmony_ci   */
204061847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback?: Callback<SignificantMotionResponse>): void;
204161847f8eSopenharmony_ci
204261847f8eSopenharmony_ci  /**
204361847f8eSopenharmony_ci   * Unsubscribe to sensor data.
204461847f8eSopenharmony_ci   * @param { SensorType.SENSOR_TYPE_ID_WEAR_DETECTION } type - type Indicate the sensor type to unsubscribe, 
204561847f8eSopenharmony_ci   *        {@code SensorType.SENSOR_TYPE_ID_WEAR_DETECTION}.
204661847f8eSopenharmony_ci   * @param { Callback<WearDetectionResponse> } callback - callback wear detection data.
204761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
204861847f8eSopenharmony_ci   * @since 8
204961847f8eSopenharmony_ci   * @deprecated since 9
205061847f8eSopenharmony_ci   * @useinstead sensor.SensorId#WEAR_DETECTION
205161847f8eSopenharmony_ci   */
205261847f8eSopenharmony_ci  function off(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback?: Callback<WearDetectionResponse>): void;
205361847f8eSopenharmony_ci
205461847f8eSopenharmony_ci  /**
205561847f8eSopenharmony_ci   * Indicates sensor information.
205661847f8eSopenharmony_ci   * @typedef Sensor
205761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
205861847f8eSopenharmony_ci   * @since 9
205961847f8eSopenharmony_ci   */
206061847f8eSopenharmony_ci  interface Sensor {
206161847f8eSopenharmony_ci    /**
206261847f8eSopenharmony_ci     * Sensor name.
206361847f8eSopenharmony_ci     * @type { string }
206461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
206561847f8eSopenharmony_ci     * @since 9
206661847f8eSopenharmony_ci     */
206761847f8eSopenharmony_ci    sensorName:string;
206861847f8eSopenharmony_ci
206961847f8eSopenharmony_ci    /**
207061847f8eSopenharmony_ci     * Sensor vendor.
207161847f8eSopenharmony_ci     * @type { string }
207261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
207361847f8eSopenharmony_ci     * @since 9
207461847f8eSopenharmony_ci     */
207561847f8eSopenharmony_ci    vendorName:string;
207661847f8eSopenharmony_ci
207761847f8eSopenharmony_ci    /**
207861847f8eSopenharmony_ci     * Sensor firmware version.
207961847f8eSopenharmony_ci     * @type { string }
208061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
208161847f8eSopenharmony_ci     * @since 9
208261847f8eSopenharmony_ci     */
208361847f8eSopenharmony_ci    firmwareVersion:string;
208461847f8eSopenharmony_ci
208561847f8eSopenharmony_ci    /**
208661847f8eSopenharmony_ci     * Sensor hardware version.
208761847f8eSopenharmony_ci     * @type { string }
208861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
208961847f8eSopenharmony_ci     * @since 9
209061847f8eSopenharmony_ci     */
209161847f8eSopenharmony_ci    hardwareVersion:string;
209261847f8eSopenharmony_ci
209361847f8eSopenharmony_ci    /**
209461847f8eSopenharmony_ci     * Sensor type ID, {@code SensorType}.
209561847f8eSopenharmony_ci     * @type { number }
209661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
209761847f8eSopenharmony_ci     * @since 9
209861847f8eSopenharmony_ci     */
209961847f8eSopenharmony_ci    sensorId:number;
210061847f8eSopenharmony_ci
210161847f8eSopenharmony_ci    /**
210261847f8eSopenharmony_ci     * Maximum measurement range of the sensor.
210361847f8eSopenharmony_ci     * @type { number }
210461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
210561847f8eSopenharmony_ci     * @since 9
210661847f8eSopenharmony_ci     */
210761847f8eSopenharmony_ci    maxRange:number;
210861847f8eSopenharmony_ci
210961847f8eSopenharmony_ci    /**
211061847f8eSopenharmony_ci     * Minimum sample period allowed, in ns.
211161847f8eSopenharmony_ci     * @type { number }
211261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
211361847f8eSopenharmony_ci     * @since 9
211461847f8eSopenharmony_ci     */
211561847f8eSopenharmony_ci    minSamplePeriod:number;
211661847f8eSopenharmony_ci
211761847f8eSopenharmony_ci    /**
211861847f8eSopenharmony_ci     * Maximum sample period allowed, in ns.
211961847f8eSopenharmony_ci     * @type { number }
212061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
212161847f8eSopenharmony_ci     * @since 9
212261847f8eSopenharmony_ci     */
212361847f8eSopenharmony_ci    maxSamplePeriod:number;
212461847f8eSopenharmony_ci
212561847f8eSopenharmony_ci    /**
212661847f8eSopenharmony_ci     * Sensor accuracy.
212761847f8eSopenharmony_ci     * @type { number }
212861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
212961847f8eSopenharmony_ci     * @since 9
213061847f8eSopenharmony_ci     */
213161847f8eSopenharmony_ci    precision:number;
213261847f8eSopenharmony_ci
213361847f8eSopenharmony_ci    /**
213461847f8eSopenharmony_ci     * Sensor power.
213561847f8eSopenharmony_ci     * @type { number }
213661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
213761847f8eSopenharmony_ci     * @since 9
213861847f8eSopenharmony_ci     */
213961847f8eSopenharmony_ci    power:number;
214061847f8eSopenharmony_ci  }
214161847f8eSopenharmony_ci
214261847f8eSopenharmony_ci  /**
214361847f8eSopenharmony_ci   * Obtains the sensor information of a specified type.
214461847f8eSopenharmony_ci   * @param { SensorId } type - Indicate the sensor type, {@code SensorId}.
214561847f8eSopenharmony_ci   * @param { AsyncCallback<Sensor> } callback - callback sensor info.
214661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
214761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
214861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
214961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
215061847f8eSopenharmony_ci   * @since 9
215161847f8eSopenharmony_ci   */
215261847f8eSopenharmony_ci  /**
215361847f8eSopenharmony_ci   * Obtains the sensor information of a specified type.
215461847f8eSopenharmony_ci   * @param { SensorId } type - Indicate the sensor type, {@code SensorId}.
215561847f8eSopenharmony_ci   * @param { AsyncCallback<Sensor> } callback - callback sensor info.
215661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
215761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
215861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
215961847f8eSopenharmony_ci   * @throws { BusinessError } 14500102 - The sensor is not supported by the device.
216061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
216161847f8eSopenharmony_ci   * @since 12
216261847f8eSopenharmony_ci   */
216361847f8eSopenharmony_ci  function getSingleSensor(type: SensorId, callback: AsyncCallback<Sensor>): void;
216461847f8eSopenharmony_ci
216561847f8eSopenharmony_ci  /**
216661847f8eSopenharmony_ci   * Obtains the sensor information of a specified type.
216761847f8eSopenharmony_ci   * @param { SensorId } type - Indicate the sensor type, {@code SensorId}.
216861847f8eSopenharmony_ci   * @returns { Promise<Sensor> } Promise used to return the result.
216961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
217061847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
217161847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
217261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
217361847f8eSopenharmony_ci   * @since 9
217461847f8eSopenharmony_ci   */
217561847f8eSopenharmony_ci  /**
217661847f8eSopenharmony_ci   * Obtains the sensor information of a specified type.
217761847f8eSopenharmony_ci   * @param { SensorId } type - Indicate the sensor type, {@code SensorId}.
217861847f8eSopenharmony_ci   * @returns { Promise<Sensor> } Promise used to return the result.
217961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
218061847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
218161847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
218261847f8eSopenharmony_ci   * @throws { BusinessError } 14500102 - The sensor is not supported by the device.
218361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
218461847f8eSopenharmony_ci   * @since 12
218561847f8eSopenharmony_ci   */
218661847f8eSopenharmony_ci  function getSingleSensor(type: SensorId): Promise<Sensor>;
218761847f8eSopenharmony_ci
218861847f8eSopenharmony_ci  /**
218961847f8eSopenharmony_ci   * Synchronously obtains the sensor information of a specified type.
219061847f8eSopenharmony_ci   * @param { SensorId } type - Indicate the sensor type, {@code SensorId}.
219161847f8eSopenharmony_ci   * @returns { Sensor } Returns sensor information.
219261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
219361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
219461847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
219561847f8eSopenharmony_ci   * @throws { BusinessError } 14500102 - The sensor is not supported by the device.
219661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
219761847f8eSopenharmony_ci   * @since 12
219861847f8eSopenharmony_ci   */
219961847f8eSopenharmony_ci  function getSingleSensorSync(type: SensorId): Sensor;
220061847f8eSopenharmony_ci
220161847f8eSopenharmony_ci  /**
220261847f8eSopenharmony_ci   * Obtains all sensor information on the device.
220361847f8eSopenharmony_ci   * @param { AsyncCallback<Array<Sensor>> } callback - callback sensor list.
220461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
220561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
220661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
220761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
220861847f8eSopenharmony_ci   * @since 9
220961847f8eSopenharmony_ci   */
221061847f8eSopenharmony_ci  function getSensorList(callback: AsyncCallback<Array<Sensor>>): void;
221161847f8eSopenharmony_ci
221261847f8eSopenharmony_ci  /**
221361847f8eSopenharmony_ci   * Obtains all sensor information on the device.
221461847f8eSopenharmony_ci   * @returns { Promise<Array<Sensor>> } Promise used to return the result.
221561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
221661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
221761847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
221861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
221961847f8eSopenharmony_ci   * @since 9
222061847f8eSopenharmony_ci   */
222161847f8eSopenharmony_ci  function getSensorList(): Promise<Array<Sensor>>;
222261847f8eSopenharmony_ci
222361847f8eSopenharmony_ci  /**
222461847f8eSopenharmony_ci   * Synchronously obtains all sensor information on the device.
222561847f8eSopenharmony_ci   * @returns { Array<Sensor> } Return a list of sensor information.
222661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
222761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
222861847f8eSopenharmony_ci   * @since 12
222961847f8eSopenharmony_ci   */
223061847f8eSopenharmony_ci  function getSensorListSync(): Array<Sensor>;
223161847f8eSopenharmony_ci
223261847f8eSopenharmony_ci  /**
223361847f8eSopenharmony_ci   * Indicates geomagnetic field data.
223461847f8eSopenharmony_ci   * @typedef GeomagneticResponse
223561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
223661847f8eSopenharmony_ci   * @since 8
223761847f8eSopenharmony_ci   */
223861847f8eSopenharmony_ci  interface GeomagneticResponse {
223961847f8eSopenharmony_ci    /**
224061847f8eSopenharmony_ci     * Geomagnetic x-axis component.
224161847f8eSopenharmony_ci     * @type { number }
224261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
224361847f8eSopenharmony_ci     * @since 8
224461847f8eSopenharmony_ci     */
224561847f8eSopenharmony_ci    x: number;
224661847f8eSopenharmony_ci
224761847f8eSopenharmony_ci    /**
224861847f8eSopenharmony_ci     * Geomagnetic y-axis component.
224961847f8eSopenharmony_ci     * @type { number }
225061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
225161847f8eSopenharmony_ci     * @since 8
225261847f8eSopenharmony_ci     */
225361847f8eSopenharmony_ci    y: number;
225461847f8eSopenharmony_ci
225561847f8eSopenharmony_ci    /**
225661847f8eSopenharmony_ci     * Geomagnetic z-axis component.
225761847f8eSopenharmony_ci     * @type { number }
225861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
225961847f8eSopenharmony_ci     * @since 8
226061847f8eSopenharmony_ci     */
226161847f8eSopenharmony_ci    z: number;
226261847f8eSopenharmony_ci
226361847f8eSopenharmony_ci    /**
226461847f8eSopenharmony_ci     * The Angle between the earth's magnetic field lines and the horizontal plane.
226561847f8eSopenharmony_ci     * @type { number }
226661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
226761847f8eSopenharmony_ci     * @since 8
226861847f8eSopenharmony_ci     */
226961847f8eSopenharmony_ci    geomagneticDip: number;
227061847f8eSopenharmony_ci
227161847f8eSopenharmony_ci    /**
227261847f8eSopenharmony_ci     * The Angle of magnetic north and true north on a horizontal plane.
227361847f8eSopenharmony_ci     * @type { number }
227461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
227561847f8eSopenharmony_ci     * @since 8
227661847f8eSopenharmony_ci     */
227761847f8eSopenharmony_ci    deflectionAngle: number;
227861847f8eSopenharmony_ci
227961847f8eSopenharmony_ci    /**
228061847f8eSopenharmony_ci     * The horizontal strength of the geomagnetic field.
228161847f8eSopenharmony_ci     * @type { number }
228261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
228361847f8eSopenharmony_ci     * @since 8
228461847f8eSopenharmony_ci     */
228561847f8eSopenharmony_ci    levelIntensity: number;
228661847f8eSopenharmony_ci
228761847f8eSopenharmony_ci    /**
228861847f8eSopenharmony_ci     * The total strength of the geomagnetic field.
228961847f8eSopenharmony_ci     * @type { number }
229061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
229161847f8eSopenharmony_ci     * @since 8
229261847f8eSopenharmony_ci     */
229361847f8eSopenharmony_ci    totalIntensity: number;
229461847f8eSopenharmony_ci  }
229561847f8eSopenharmony_ci
229661847f8eSopenharmony_ci  /**
229761847f8eSopenharmony_ci   * Indicates geographic location.
229861847f8eSopenharmony_ci   * @typedef LocationOptions
229961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
230061847f8eSopenharmony_ci   * @since 8
230161847f8eSopenharmony_ci   */
230261847f8eSopenharmony_ci  interface LocationOptions {
230361847f8eSopenharmony_ci    /**
230461847f8eSopenharmony_ci     * Specifies the latitude of the point.
230561847f8eSopenharmony_ci     * @type { number }
230661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
230761847f8eSopenharmony_ci     * @since 8
230861847f8eSopenharmony_ci     */
230961847f8eSopenharmony_ci    latitude: number;
231061847f8eSopenharmony_ci
231161847f8eSopenharmony_ci    /**
231261847f8eSopenharmony_ci     * Specifies the longitude of the point.
231361847f8eSopenharmony_ci     * @type { number }
231461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
231561847f8eSopenharmony_ci     * @since 8
231661847f8eSopenharmony_ci     */
231761847f8eSopenharmony_ci    longitude: number;
231861847f8eSopenharmony_ci
231961847f8eSopenharmony_ci    /**
232061847f8eSopenharmony_ci     * Specifies the altitude of the point.
232161847f8eSopenharmony_ci     * @type { number }
232261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
232361847f8eSopenharmony_ci     * @since 8
232461847f8eSopenharmony_ci     */
232561847f8eSopenharmony_ci    altitude: number;
232661847f8eSopenharmony_ci  }
232761847f8eSopenharmony_ci
232861847f8eSopenharmony_ci  /**
232961847f8eSopenharmony_ci   * Implements the calculation of the geomagnetic field at a specific location on Earth.
233061847f8eSopenharmony_ci   * @param { LocationOptions } locationOptions - Indicates geographic location, {@code LocationOptions}.
233161847f8eSopenharmony_ci   * @param { number } timeMillis - Indicates the time at which the magnetic declination is to be obtained, 
233261847f8eSopenharmony_ci   * in milliseconds since the Unix epoch.
233361847f8eSopenharmony_ci   * @param { AsyncCallback<GeomagneticResponse> } callback - callback geomagnetic field.
233461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
233561847f8eSopenharmony_ci   * @since 8
233661847f8eSopenharmony_ci   * @deprecated since 9
233761847f8eSopenharmony_ci   * @useinstead sensor#getGeomagneticInfo
233861847f8eSopenharmony_ci   */
233961847f8eSopenharmony_ci  function getGeomagneticField(locationOptions: LocationOptions, timeMillis: number, callback: AsyncCallback<GeomagneticResponse>): void;
234061847f8eSopenharmony_ci
234161847f8eSopenharmony_ci  /**
234261847f8eSopenharmony_ci   * Implements the calculation of the geomagnetic field at a specific location on Earth.
234361847f8eSopenharmony_ci   * @param { LocationOptions } locationOptions - LocationOptions Indicates geographic location, {@code LocationOptions}.
234461847f8eSopenharmony_ci   * @param { number } timeMillis - timeMillis Indicates the time at which the magnetic declination is to be obtained, 
234561847f8eSopenharmony_ci   * in milliseconds since the Unix epoch.
234661847f8eSopenharmony_ci   * @returns { Promise<GeomagneticResponse> } Returns the geomagnetic field data, {@code GeomagneticResponse}.
234761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
234861847f8eSopenharmony_ci   * @since 8
234961847f8eSopenharmony_ci   * @deprecated since 9
235061847f8eSopenharmony_ci   * @useinstead sensor#getGeomagneticInfo
235161847f8eSopenharmony_ci   */
235261847f8eSopenharmony_ci  function getGeomagneticField(locationOptions: LocationOptions, timeMillis: number): Promise<GeomagneticResponse>;
235361847f8eSopenharmony_ci
235461847f8eSopenharmony_ci  /**
235561847f8eSopenharmony_ci   * Obtains the geomagnetic field at a specific location on the Earth.
235661847f8eSopenharmony_ci   * @param { LocationOptions } locationOptions - LocationOptions Indicates geographic location, {@code LocationOptions}.
235761847f8eSopenharmony_ci   * @param { number } timeMillis - timeMillis Indicates the time at which the magnetic declination is to be obtained, 
235861847f8eSopenharmony_ci   * in milliseconds since the Unix epoch.
235961847f8eSopenharmony_ci   * @param { AsyncCallback<GeomagneticResponse> } callback - callback geomagnetic field.
236061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
236161847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
236261847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
236361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
236461847f8eSopenharmony_ci   * @since 9
236561847f8eSopenharmony_ci   */
236661847f8eSopenharmony_ci  function getGeomagneticInfo(locationOptions: LocationOptions, timeMillis: number, callback: AsyncCallback<GeomagneticResponse>): void;
236761847f8eSopenharmony_ci
236861847f8eSopenharmony_ci  /**
236961847f8eSopenharmony_ci   * Obtains the geomagnetic field at a specific location on the Earth.
237061847f8eSopenharmony_ci   * @param { LocationOptions } locationOptions - LocationOptions Indicates geographic location, {@code LocationOptions}.
237161847f8eSopenharmony_ci   * @param { number } timeMillis - timeMillis Indicates the time at which the magnetic declination is to be obtained, 
237261847f8eSopenharmony_ci   * in milliseconds since the Unix epoch.
237361847f8eSopenharmony_ci   * @returns { Promise<GeomagneticResponse> } Promise used to return the result.
237461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
237561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
237661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
237761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
237861847f8eSopenharmony_ci   * @since 9
237961847f8eSopenharmony_ci   */
238061847f8eSopenharmony_ci  function getGeomagneticInfo(locationOptions: LocationOptions, timeMillis: number): Promise<GeomagneticResponse>;
238161847f8eSopenharmony_ci
238261847f8eSopenharmony_ci  /**
238361847f8eSopenharmony_ci   * Obtains the altitude at which the device is located based on the current atmospheric pressure.
238461847f8eSopenharmony_ci   * @param { number } seaPressure - Indicates the sea level pressure, in hPa.
238561847f8eSopenharmony_ci   * @param { number } currentPressure - Indicates the atmospheric pressure measured by the barometer, in hPa.
238661847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - callback device altitude.
238761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
238861847f8eSopenharmony_ci   * @since 8
238961847f8eSopenharmony_ci   * @deprecated since 9
239061847f8eSopenharmony_ci   * @useinstead sensor#getDeviceAltitude
239161847f8eSopenharmony_ci   */
239261847f8eSopenharmony_ci  function getAltitude(seaPressure: number, currentPressure: number, callback: AsyncCallback<number>): void;
239361847f8eSopenharmony_ci
239461847f8eSopenharmony_ci  /**
239561847f8eSopenharmony_ci   * Obtains the altitude at which the device is located based on the current atmospheric pressure.
239661847f8eSopenharmony_ci   * @param { number } seaPressure - seaPressure Indicates the sea level pressure, in hPa.
239761847f8eSopenharmony_ci   * @param { number } currentPressure - currentPressure Indicates the atmospheric pressure measured by the barometer, in hPa.
239861847f8eSopenharmony_ci   * @returns { Promise<number> } Returns the altitude in meters at which the device is located.
239961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
240061847f8eSopenharmony_ci   * @since 8
240161847f8eSopenharmony_ci   * @deprecated since 9
240261847f8eSopenharmony_ci   * @useinstead sensor#getDeviceAltitude
240361847f8eSopenharmony_ci   */
240461847f8eSopenharmony_ci  function getAltitude(seaPressure: number, currentPressure: number): Promise<number>;
240561847f8eSopenharmony_ci
240661847f8eSopenharmony_ci  /**
240761847f8eSopenharmony_ci   * Obtains the altitude at which the device is located based on the current atmospheric pressure.
240861847f8eSopenharmony_ci   * @param { number } seaPressure - seaPressure Indicates the sea level pressure, in hPa.
240961847f8eSopenharmony_ci   * @param { number } currentPressure - currentPressure Indicates the atmospheric pressure measured by the barometer, in hPa.
241061847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - callback device altitude.
241161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
241261847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
241361847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
241461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
241561847f8eSopenharmony_ci   * @since 9
241661847f8eSopenharmony_ci   */
241761847f8eSopenharmony_ci  function getDeviceAltitude(seaPressure: number, currentPressure: number, callback: AsyncCallback<number>): void;
241861847f8eSopenharmony_ci
241961847f8eSopenharmony_ci  /**
242061847f8eSopenharmony_ci   * Obtains the altitude at which the device is located based on the current atmospheric pressure.
242161847f8eSopenharmony_ci   * @param { number } seaPressure - seaPressure Indicates the sea level pressure, in hPa.
242261847f8eSopenharmony_ci   * @param { number } currentPressure - currentPressure Indicates the atmospheric pressure measured by the barometer, in hPa.
242361847f8eSopenharmony_ci   * @returns { Promise<number> } Promise used to return the result.
242461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
242561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
242661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
242761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
242861847f8eSopenharmony_ci   * @since 9
242961847f8eSopenharmony_ci   */
243061847f8eSopenharmony_ci  function getDeviceAltitude(seaPressure: number, currentPressure: number): Promise<number>;
243161847f8eSopenharmony_ci
243261847f8eSopenharmony_ci  /**
243361847f8eSopenharmony_ci   * Computes the geomagnetic inclination angle in radians from the inclination matrix.
243461847f8eSopenharmony_ci   * @param { Array<number> } inclinationMatrix - Indicates the inclination matrix.
243561847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - callback geomagnetic inclination data.
243661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
243761847f8eSopenharmony_ci   * @since 8
243861847f8eSopenharmony_ci   * @deprecated since 9
243961847f8eSopenharmony_ci   * @useinstead sensor#getInclination
244061847f8eSopenharmony_ci   */
244161847f8eSopenharmony_ci  function getGeomagneticDip(inclinationMatrix: Array<number>, callback: AsyncCallback<number>): void;
244261847f8eSopenharmony_ci
244361847f8eSopenharmony_ci  /**
244461847f8eSopenharmony_ci   * Computes the geomagnetic inclination angle in radians from the inclination matrix.
244561847f8eSopenharmony_ci   * @param { Array<number> } inclinationMatrix - Indicates the inclination matrix.
244661847f8eSopenharmony_ci   * @returns { Promise<number> } Returns the geomagnetic inclination angle in radians.
244761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
244861847f8eSopenharmony_ci   * @since 8
244961847f8eSopenharmony_ci   * @deprecated since 9
245061847f8eSopenharmony_ci   * @useinstead sensor#getInclination
245161847f8eSopenharmony_ci   */
245261847f8eSopenharmony_ci  function getGeomagneticDip(inclinationMatrix: Array<number>): Promise<number>;
245361847f8eSopenharmony_ci
245461847f8eSopenharmony_ci  /**
245561847f8eSopenharmony_ci   * Computes the geomagnetic inclination in radians from the inclination matrix.
245661847f8eSopenharmony_ci   * @param { Array<number> } inclinationMatrix - Indicates the inclination matrix.
245761847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - callback inclination in radians.
245861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
245961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
246061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
246161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
246261847f8eSopenharmony_ci   * @since 9
246361847f8eSopenharmony_ci   */
246461847f8eSopenharmony_ci  function getInclination(inclinationMatrix: Array<number>, callback: AsyncCallback<number>): void;
246561847f8eSopenharmony_ci
246661847f8eSopenharmony_ci  /**
246761847f8eSopenharmony_ci   * Computes the geomagnetic inclination in radians from the inclination matrix.
246861847f8eSopenharmony_ci   * @param { Array<number> } inclinationMatrix - Indicates the inclination matrix.
246961847f8eSopenharmony_ci   * @returns { Promise<number> } Promise used to return the result.
247061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
247161847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
247261847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
247361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
247461847f8eSopenharmony_ci   * @since 9
247561847f8eSopenharmony_ci   */
247661847f8eSopenharmony_ci  function getInclination(inclinationMatrix: Array<number>): Promise<number>;
247761847f8eSopenharmony_ci
247861847f8eSopenharmony_ci  /**
247961847f8eSopenharmony_ci   * Get the angle change between two rotation matrices.
248061847f8eSopenharmony_ci   * @param { Array<number> } currentRotationMatrix - Indicates the current rotation matrix.
248161847f8eSopenharmony_ci   * @param { Array<number> } preRotationMatrix - Indicates the current rotation matrix.
248261847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback angle variation.
248361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
248461847f8eSopenharmony_ci   * @since 8
248561847f8eSopenharmony_ci   * @deprecated since 9
248661847f8eSopenharmony_ci   * @useinstead sensor#getAngleVariation
248761847f8eSopenharmony_ci   */
248861847f8eSopenharmony_ci  function getAngleModify(currentRotationMatrix: Array<number>, preRotationMatrix: Array<number>,
248961847f8eSopenharmony_ci    callback: AsyncCallback<Array<number>>): void;
249061847f8eSopenharmony_ci
249161847f8eSopenharmony_ci  /**
249261847f8eSopenharmony_ci   * Get the angle change between two rotation matrices.
249361847f8eSopenharmony_ci   * @param { Array<number> } currentRotationMatrix - currentRotationMatrix Indicates the current rotation matrix.
249461847f8eSopenharmony_ci   * @param { Array<number> } preRotationMatrix - preRotationMatrix Indicates the current rotation matrix.
249561847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Returns the array of number(z, x and y) in which the angle variety.
249661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
249761847f8eSopenharmony_ci   * @since 8
249861847f8eSopenharmony_ci   * @deprecated since 9
249961847f8eSopenharmony_ci   * @useinstead sensor#getAngleVariation
250061847f8eSopenharmony_ci   */
250161847f8eSopenharmony_ci  function getAngleModify(currentRotationMatrix: Array<number>, preRotationMatrix: Array<number>): Promise<Array<number>>;
250261847f8eSopenharmony_ci
250361847f8eSopenharmony_ci  /**
250461847f8eSopenharmony_ci   * Get the angle variation between two rotation matrices.
250561847f8eSopenharmony_ci   * @param { Array<number> } currentRotationMatrix - currentRotationMatrix Indicates the current rotation matrix.
250661847f8eSopenharmony_ci   * @param { Array<number> } preRotationMatrix - preRotationMatrix Indicates the current rotation matrix.
250761847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback angle variation.
250861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
250961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
251061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
251161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
251261847f8eSopenharmony_ci   * @since 9
251361847f8eSopenharmony_ci   */
251461847f8eSopenharmony_ci  function getAngleVariation(currentRotationMatrix: Array<number>, preRotationMatrix: Array<number>,
251561847f8eSopenharmony_ci    callback: AsyncCallback<Array<number>>): void;
251661847f8eSopenharmony_ci
251761847f8eSopenharmony_ci  /**
251861847f8eSopenharmony_ci   * Get the angle variation between two rotation matrices.
251961847f8eSopenharmony_ci   * @param { Array<number> } currentRotationMatrix -  Indicates the current rotation matrix.
252061847f8eSopenharmony_ci   * @param { Array<number> } preRotationMatrix - preRotationMatrix Indicates the current rotation matrix.
252161847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Promise used to return the result.
252261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
252361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
252461847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
252561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
252661847f8eSopenharmony_ci   * @since 9
252761847f8eSopenharmony_ci   */
252861847f8eSopenharmony_ci  function getAngleVariation(currentRotationMatrix: Array<number>, preRotationMatrix: Array<number>): Promise<Array<number>>;
252961847f8eSopenharmony_ci
253061847f8eSopenharmony_ci  /**
253161847f8eSopenharmony_ci   * Convert rotation vector to rotation matrix.
253261847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - Indicates the rotation vector.
253361847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback rotation matrix.
253461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
253561847f8eSopenharmony_ci   * @since 8
253661847f8eSopenharmony_ci   * @deprecated since 9
253761847f8eSopenharmony_ci   * @useinstead sensor#getRotationMatrix
253861847f8eSopenharmony_ci   */
253961847f8eSopenharmony_ci  function createRotationMatrix(rotationVector: Array<number>, callback: AsyncCallback<Array<number>>): void;
254061847f8eSopenharmony_ci
254161847f8eSopenharmony_ci  /**
254261847f8eSopenharmony_ci   * Convert rotation vector to rotation matrix.
254361847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - rotationVector Indicates the rotation vector.
254461847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Returns the rotation matrix.
254561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
254661847f8eSopenharmony_ci   * @since 8
254761847f8eSopenharmony_ci   * @deprecated since 9
254861847f8eSopenharmony_ci   * @useinstead sensor#getRotationMatrix
254961847f8eSopenharmony_ci   */
255061847f8eSopenharmony_ci  function createRotationMatrix(rotationVector: Array<number>): Promise<Array<number>>;
255161847f8eSopenharmony_ci
255261847f8eSopenharmony_ci  /**
255361847f8eSopenharmony_ci   * Convert rotation vector to rotation matrix.
255461847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - rotationVector Indicates the rotation vector.
255561847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback rotation matrix.
255661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
255761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
255861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
255961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
256061847f8eSopenharmony_ci   * @since 9
256161847f8eSopenharmony_ci   */
256261847f8eSopenharmony_ci  function getRotationMatrix(rotationVector: Array<number>, callback: AsyncCallback<Array<number>>): void;
256361847f8eSopenharmony_ci
256461847f8eSopenharmony_ci  /**
256561847f8eSopenharmony_ci   * Convert rotation vector to rotation matrix.
256661847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - rotationVector Indicates the rotation vector.
256761847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Promise used to return the result.
256861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
256961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
257061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
257161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
257261847f8eSopenharmony_ci   * @since 9
257361847f8eSopenharmony_ci   */
257461847f8eSopenharmony_ci  function getRotationMatrix(rotationVector: Array<number>): Promise<Array<number>>;
257561847f8eSopenharmony_ci
257661847f8eSopenharmony_ci  /**
257761847f8eSopenharmony_ci   * Indicates the axis of the new coordinate system that coincides with the XY axis of the original coordinate system.
257861847f8eSopenharmony_ci   * @typedef CoordinatesOptions
257961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
258061847f8eSopenharmony_ci   * @since 8
258161847f8eSopenharmony_ci   */
258261847f8eSopenharmony_ci  interface CoordinatesOptions {
258361847f8eSopenharmony_ci    /** Indicates the axis of the new coordinate system that coincides with the X axis of the original coordinate system. 
258461847f8eSopenharmony_ci     * @type { number }
258561847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
258661847f8eSopenharmony_ci     * @since 8
258761847f8eSopenharmony_ci     */
258861847f8eSopenharmony_ci    x: number;
258961847f8eSopenharmony_ci
259061847f8eSopenharmony_ci    /** Indicates the axis of the new coordinate system that coincides with the Y axis of the original coordinate system. 
259161847f8eSopenharmony_ci     * @type { number }
259261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
259361847f8eSopenharmony_ci     * @since 8
259461847f8eSopenharmony_ci     */
259561847f8eSopenharmony_ci    y: number;
259661847f8eSopenharmony_ci  }
259761847f8eSopenharmony_ci
259861847f8eSopenharmony_ci  /**
259961847f8eSopenharmony_ci   * Rotate the provided rotation matrix so that it can be represented in a different way Coordinate System.
260061847f8eSopenharmony_ci   * @param { Array<number> } inRotationVector - Indicates the rotation matrix to be transformed.
260161847f8eSopenharmony_ci   * @param { CoordinatesOptions } coordinates - Indicates coordinate system guidance, {@code CoordinatesOptions}.
260261847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback rotation matrix.
260361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
260461847f8eSopenharmony_ci   * @since 8
260561847f8eSopenharmony_ci   * @deprecated since 9
260661847f8eSopenharmony_ci   * @useinstead sensor#transformRotationMatrix
260761847f8eSopenharmony_ci   */
260861847f8eSopenharmony_ci  function transformCoordinateSystem(inRotationVector: Array<number>, coordinates: CoordinatesOptions,
260961847f8eSopenharmony_ci    callback: AsyncCallback<Array<number>>): void;
261061847f8eSopenharmony_ci
261161847f8eSopenharmony_ci  /**
261261847f8eSopenharmony_ci   * Rotate the provided rotation matrix so that it can be represented in a different way Coordinate System.
261361847f8eSopenharmony_ci   * @param { Array<number> } inRotationVector - inRotationVector Indicates the rotation matrix to be transformed.
261461847f8eSopenharmony_ci   * @param { CoordinatesOptions } coordinates - coordinates Indicates coordinate system guidance, {@code CoordinatesOptions}.
261561847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Returns the transformed rotation matrix.
261661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
261761847f8eSopenharmony_ci   * @since 8
261861847f8eSopenharmony_ci   * @deprecated since 9
261961847f8eSopenharmony_ci   * @useinstead sensor#transformRotationMatrix
262061847f8eSopenharmony_ci   */
262161847f8eSopenharmony_ci  function transformCoordinateSystem(inRotationVector: Array<number>, coordinates: CoordinatesOptions): Promise<Array<number>>;
262261847f8eSopenharmony_ci
262361847f8eSopenharmony_ci  /**
262461847f8eSopenharmony_ci   * Rotate the provided rotation matrix so that it can be represented in a different way coordinate System.
262561847f8eSopenharmony_ci   * @param { Array<number> } inRotationVector - inRotationVector Indicates the rotation matrix to be transformed.
262661847f8eSopenharmony_ci   * @param { CoordinatesOptions } coordinates - coordinates Indicates coordinate system guidance, {@code CoordinatesOptions}.
262761847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback rotation matrix.
262861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
262961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
263061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
263161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
263261847f8eSopenharmony_ci   * @since 9
263361847f8eSopenharmony_ci   */
263461847f8eSopenharmony_ci  function transformRotationMatrix(inRotationVector: Array<number>, coordinates: CoordinatesOptions,
263561847f8eSopenharmony_ci    callback: AsyncCallback<Array<number>>): void;
263661847f8eSopenharmony_ci
263761847f8eSopenharmony_ci  /**
263861847f8eSopenharmony_ci   * Rotate the provided rotation matrix so that it can be represented in a different way coordinate System.
263961847f8eSopenharmony_ci   * @param { Array<number> } inRotationVector - inRotationVector Indicates the rotation matrix to be transformed.
264061847f8eSopenharmony_ci   * @param { CoordinatesOptions } coordinates - coordinates Indicates coordinate system guidance, {@code CoordinatesOptions}.
264161847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Promise used to return the result.
264261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
264361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
264461847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
264561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
264661847f8eSopenharmony_ci   * @since 9
264761847f8eSopenharmony_ci   */
264861847f8eSopenharmony_ci  function transformRotationMatrix(inRotationVector: Array<number>, coordinates: CoordinatesOptions): Promise<Array<number>>;
264961847f8eSopenharmony_ci
265061847f8eSopenharmony_ci  /**
265161847f8eSopenharmony_ci   * convert a rotation vector to a normalized quaternion.
265261847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - Indicates the rotation vector.
265361847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback a normalized quaternion.
265461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
265561847f8eSopenharmony_ci   * @since 8
265661847f8eSopenharmony_ci   * @deprecated since 9
265761847f8eSopenharmony_ci   * @useinstead sensor#getQuaternion
265861847f8eSopenharmony_ci   */
265961847f8eSopenharmony_ci  function createQuaternion(rotationVector: Array<number>, callback: AsyncCallback<Array<number>>): void;
266061847f8eSopenharmony_ci
266161847f8eSopenharmony_ci  /**
266261847f8eSopenharmony_ci   * convert a rotation vector to a normalized quaternion.
266361847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - rotationVector Indicates the rotation vector.
266461847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Returns the normalized quaternion.
266561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
266661847f8eSopenharmony_ci   * @since 8
266761847f8eSopenharmony_ci   * @deprecated since 9
266861847f8eSopenharmony_ci   * @useinstead sensor#getQuaternion
266961847f8eSopenharmony_ci   */
267061847f8eSopenharmony_ci  function createQuaternion(rotationVector: Array<number>): Promise<Array<number>>;
267161847f8eSopenharmony_ci
267261847f8eSopenharmony_ci  /**
267361847f8eSopenharmony_ci   * convert a rotation vector to a normalized quaternion.
267461847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - rotationVector Indicates the rotation vector.
267561847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback a normalized quaternion.
267661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
267761847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
267861847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
267961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
268061847f8eSopenharmony_ci   * @since 9
268161847f8eSopenharmony_ci   */
268261847f8eSopenharmony_ci  function getQuaternion(rotationVector: Array<number>, callback: AsyncCallback<Array<number>>): void;
268361847f8eSopenharmony_ci
268461847f8eSopenharmony_ci  /**
268561847f8eSopenharmony_ci   * convert a rotation vector to a normalized quaternion.
268661847f8eSopenharmony_ci   * @param { Array<number> } rotationVector - rotationVector Indicates the rotation vector.
268761847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Promise used to return the result.
268861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
268961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
269061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
269161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
269261847f8eSopenharmony_ci   * @since 9
269361847f8eSopenharmony_ci   */
269461847f8eSopenharmony_ci  function getQuaternion(rotationVector: Array<number>): Promise<Array<number>>;
269561847f8eSopenharmony_ci
269661847f8eSopenharmony_ci  /**
269761847f8eSopenharmony_ci   * Computes the device's orientation based on the rotation matrix.
269861847f8eSopenharmony_ci   * @param { Array<number> } rotationMatrix - Indicates the rotation matrix.
269961847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback the angle of rotation around the z, x, y axis.
270061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
270161847f8eSopenharmony_ci   * @since 8
270261847f8eSopenharmony_ci   * @deprecated since 9
270361847f8eSopenharmony_ci   * @useinstead sensor#getOrientation
270461847f8eSopenharmony_ci   */
270561847f8eSopenharmony_ci  function getDirection(rotationMatrix: Array<number>, callback: AsyncCallback<Array<number>>): void;
270661847f8eSopenharmony_ci
270761847f8eSopenharmony_ci  /**
270861847f8eSopenharmony_ci   * Computes the device's orientation based on the rotation matrix.
270961847f8eSopenharmony_ci   * @param { Array<number> } rotationMatrix - rotationMatrix Indicates the rotation matrix.
271061847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Returns the array is the angle of rotation around the z, x, y axis.
271161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
271261847f8eSopenharmony_ci   * @since 8
271361847f8eSopenharmony_ci   * @deprecated since 9
271461847f8eSopenharmony_ci   * @useinstead sensor#getOrientation
271561847f8eSopenharmony_ci   */
271661847f8eSopenharmony_ci  function getDirection(rotationMatrix: Array<number>): Promise<Array<number>>;
271761847f8eSopenharmony_ci
271861847f8eSopenharmony_ci  /**
271961847f8eSopenharmony_ci   * Computes the device's orientation based on the rotation matrix.
272061847f8eSopenharmony_ci   * @param { Array<number> } rotationMatrix - rotationMatrix Indicates the rotation matrix.
272161847f8eSopenharmony_ci   * @param { AsyncCallback<Array<number>> } callback - callback the angle of rotation around the z, x, y axis.
272261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
272361847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
272461847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
272561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
272661847f8eSopenharmony_ci   * @since 9
272761847f8eSopenharmony_ci   */
272861847f8eSopenharmony_ci  function getOrientation(rotationMatrix: Array<number>, callback: AsyncCallback<Array<number>>): void;
272961847f8eSopenharmony_ci
273061847f8eSopenharmony_ci  /**
273161847f8eSopenharmony_ci   * Computes the device's orientation based on the rotation matrix.
273261847f8eSopenharmony_ci   * @param { Array<number> } rotationMatrix - rotationMatrix Indicates the rotation matrix.
273361847f8eSopenharmony_ci   * @returns { Promise<Array<number>> } Promise used to return the result.
273461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
273561847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
273661847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
273761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
273861847f8eSopenharmony_ci   * @since 9
273961847f8eSopenharmony_ci   */
274061847f8eSopenharmony_ci  function getOrientation(rotationMatrix: Array<number>): Promise<Array<number>>;
274161847f8eSopenharmony_ci
274261847f8eSopenharmony_ci  /**
274361847f8eSopenharmony_ci   * Indicates the response of rotation matrix.
274461847f8eSopenharmony_ci   * @typedef RotationMatrixResponse
274561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
274661847f8eSopenharmony_ci   * @since 8
274761847f8eSopenharmony_ci   */
274861847f8eSopenharmony_ci  interface RotationMatrixResponse {
274961847f8eSopenharmony_ci    /**
275061847f8eSopenharmony_ci     * rotation matrix. 
275161847f8eSopenharmony_ci     * @type { Array<number> }
275261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
275361847f8eSopenharmony_ci     * @since 8
275461847f8eSopenharmony_ci     */
275561847f8eSopenharmony_ci    rotation: Array<number>;
275661847f8eSopenharmony_ci
275761847f8eSopenharmony_ci    /**
275861847f8eSopenharmony_ci     * inclination matrix. 
275961847f8eSopenharmony_ci     * @type { Array<number> }
276061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
276161847f8eSopenharmony_ci     * @since 8
276261847f8eSopenharmony_ci     */
276361847f8eSopenharmony_ci    inclination: Array<number>
276461847f8eSopenharmony_ci  }
276561847f8eSopenharmony_ci
276661847f8eSopenharmony_ci  /**
276761847f8eSopenharmony_ci   * Calculate rotation matrix based on gravity vector and geomagnetic vector.
276861847f8eSopenharmony_ci   * @param { Array<number> } gravity - Indicates the gravity vector.
276961847f8eSopenharmony_ci   * @param { Array<number> } geomagnetic - Indicates the geomagnetic vector.
277061847f8eSopenharmony_ci   * @param { AsyncCallback<RotationMatrixResponse> } callback - callback rotation matrix and inclination matrix.
277161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
277261847f8eSopenharmony_ci   * @since 8
277361847f8eSopenharmony_ci   * @deprecated since 9
277461847f8eSopenharmony_ci   * @useinstead sensor#getRotationMatrix
277561847f8eSopenharmony_ci   */
277661847f8eSopenharmony_ci  function createRotationMatrix(gravity: Array<number>, geomagnetic: Array<number>, callback: AsyncCallback<RotationMatrixResponse>): void;
277761847f8eSopenharmony_ci
277861847f8eSopenharmony_ci  /**
277961847f8eSopenharmony_ci   * Calculate rotation matrix based on gravity vector and geomagnetic vector.
278061847f8eSopenharmony_ci   * @param { Array<number> } gravity - gravity Indicates the gravity vector.
278161847f8eSopenharmony_ci   * @param { Array<number> } geomagnetic - geomagnetic Indicates the geomagnetic vector.
278261847f8eSopenharmony_ci   * @returns { Promise<RotationMatrixResponse> } Returns the rotation matrix, {@code RotationMatrixResponse}.
278361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
278461847f8eSopenharmony_ci   * @since 8
278561847f8eSopenharmony_ci   * @deprecated since 9
278661847f8eSopenharmony_ci   * @useinstead sensor#getRotationMatrix
278761847f8eSopenharmony_ci   */
278861847f8eSopenharmony_ci  function createRotationMatrix(gravity: Array<number>, geomagnetic: Array<number>,): Promise<RotationMatrixResponse>;
278961847f8eSopenharmony_ci
279061847f8eSopenharmony_ci  /**
279161847f8eSopenharmony_ci   * Calculate rotation matrix based on gravity vector and geomagnetic vector.
279261847f8eSopenharmony_ci   * @param { Array<number> } gravity - gravity Indicates the gravity vector.
279361847f8eSopenharmony_ci   * @param { Array<number> } geomagnetic - geomagnetic Indicates the geomagnetic vector.
279461847f8eSopenharmony_ci   * @param { AsyncCallback<RotationMatrixResponse> } callback - callback rotation matrix and inclination matrix.
279561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
279661847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
279761847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
279861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
279961847f8eSopenharmony_ci   * @since 9
280061847f8eSopenharmony_ci   */
280161847f8eSopenharmony_ci  function getRotationMatrix(gravity: Array<number>, geomagnetic: Array<number>, callback: AsyncCallback<RotationMatrixResponse>): void;
280261847f8eSopenharmony_ci
280361847f8eSopenharmony_ci  /**
280461847f8eSopenharmony_ci   * Calculate rotation matrix based on gravity vector and geomagnetic vector.
280561847f8eSopenharmony_ci   * @param { Array<number> } gravity - gravity Indicates the gravity vector.
280661847f8eSopenharmony_ci   * @param { Array<number> } geomagnetic - geomagnetic Indicates the geomagnetic vector.
280761847f8eSopenharmony_ci   * @returns { Promise<RotationMatrixResponse> } Promise used to return the result.
280861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
280961847f8eSopenharmony_ci   * <br> 2. Incorrect parameter types; 3. Parameter verification failed.
281061847f8eSopenharmony_ci   * @throws { BusinessError } 14500101 - Service exception.
281161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
281261847f8eSopenharmony_ci   * @since 9
281361847f8eSopenharmony_ci   */
281461847f8eSopenharmony_ci  function getRotationMatrix(gravity: Array<number>, geomagnetic: Array<number>): Promise<RotationMatrixResponse>;
281561847f8eSopenharmony_ci
281661847f8eSopenharmony_ci  /**
281761847f8eSopenharmony_ci   * Subscribe to the sensor's optional parameters.
281861847f8eSopenharmony_ci   * @typedef Options
281961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
282061847f8eSopenharmony_ci   * @since 8
282161847f8eSopenharmony_ci   */
282261847f8eSopenharmony_ci  /**
282361847f8eSopenharmony_ci   * Subscribe to the sensor's optional parameters.
282461847f8eSopenharmony_ci   * @typedef Options
282561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
282661847f8eSopenharmony_ci   * @atomicservice
282761847f8eSopenharmony_ci   * @since 11
282861847f8eSopenharmony_ci   */
282961847f8eSopenharmony_ci  interface Options {
283061847f8eSopenharmony_ci    /**
283161847f8eSopenharmony_ci     * Sensor event reporting event interval.
283261847f8eSopenharmony_ci     * @type { ?number }
283361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
283461847f8eSopenharmony_ci     * @since 8
283561847f8eSopenharmony_ci     */
283661847f8eSopenharmony_ci    /**
283761847f8eSopenharmony_ci     * Sensor event reporting event interval.
283861847f8eSopenharmony_ci     * @type { ?(number | SensorFrequency) }
283961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
284061847f8eSopenharmony_ci     * @atomicservice
284161847f8eSopenharmony_ci     * @since 11
284261847f8eSopenharmony_ci     */
284361847f8eSopenharmony_ci    interval?: number | SensorFrequency;
284461847f8eSopenharmony_ci  }
284561847f8eSopenharmony_ci
284661847f8eSopenharmony_ci  /**
284761847f8eSopenharmony_ci   * The sensor reporting frequency is divided into three modes.
284861847f8eSopenharmony_ci   * @typedef {'game' | 'ui' | 'normal'}
284961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
285061847f8eSopenharmony_ci   * @atomicservice
285161847f8eSopenharmony_ci   * @since 11
285261847f8eSopenharmony_ci   */
285361847f8eSopenharmony_ci  type SensorFrequency = 'game' | 'ui' | 'normal';
285461847f8eSopenharmony_ci
285561847f8eSopenharmony_ci  /**
285661847f8eSopenharmony_ci   * The type of number.
285761847f8eSopenharmony_ci   * @enum { number }
285861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
285961847f8eSopenharmony_ci   * @since 8
286061847f8eSopenharmony_ci   * @deprecated since 9
286161847f8eSopenharmony_ci   * @useinstead sensor.SensorId
286261847f8eSopenharmony_ci   */
286361847f8eSopenharmony_ci  enum SensorType {
286461847f8eSopenharmony_ci    /**
286561847f8eSopenharmony_ci     * Acceleration sensor.
286661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
286761847f8eSopenharmony_ci     * @since 8
286861847f8eSopenharmony_ci     * @deprecated since 9
286961847f8eSopenharmony_ci     */
287061847f8eSopenharmony_ci    SENSOR_TYPE_ID_ACCELEROMETER = 1,
287161847f8eSopenharmony_ci
287261847f8eSopenharmony_ci    /**
287361847f8eSopenharmony_ci     * Gyroscope sensor.
287461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
287561847f8eSopenharmony_ci     * @since 8
287661847f8eSopenharmony_ci     * @deprecated since 9
287761847f8eSopenharmony_ci     */
287861847f8eSopenharmony_ci    SENSOR_TYPE_ID_GYROSCOPE = 2,
287961847f8eSopenharmony_ci
288061847f8eSopenharmony_ci    /**
288161847f8eSopenharmony_ci     * Ambient light sensor.
288261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
288361847f8eSopenharmony_ci     * @since 8
288461847f8eSopenharmony_ci     * @deprecated since 9
288561847f8eSopenharmony_ci     */
288661847f8eSopenharmony_ci    SENSOR_TYPE_ID_AMBIENT_LIGHT = 5,
288761847f8eSopenharmony_ci
288861847f8eSopenharmony_ci    /**
288961847f8eSopenharmony_ci     * Magnetic field sensor.
289061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
289161847f8eSopenharmony_ci     * @since 8
289261847f8eSopenharmony_ci     * @deprecated since 9
289361847f8eSopenharmony_ci     */
289461847f8eSopenharmony_ci    SENSOR_TYPE_ID_MAGNETIC_FIELD = 6,
289561847f8eSopenharmony_ci
289661847f8eSopenharmony_ci    /**
289761847f8eSopenharmony_ci     * Barometric pressure sensor.
289861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
289961847f8eSopenharmony_ci     * @since 8
290061847f8eSopenharmony_ci     * @deprecated since 9
290161847f8eSopenharmony_ci     */
290261847f8eSopenharmony_ci    SENSOR_TYPE_ID_BAROMETER = 8,
290361847f8eSopenharmony_ci
290461847f8eSopenharmony_ci    /**
290561847f8eSopenharmony_ci     * Hall effect sensor.
290661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
290761847f8eSopenharmony_ci     * @since 8
290861847f8eSopenharmony_ci     * @deprecated since 9
290961847f8eSopenharmony_ci     */
291061847f8eSopenharmony_ci    SENSOR_TYPE_ID_HALL = 10,
291161847f8eSopenharmony_ci
291261847f8eSopenharmony_ci    /**
291361847f8eSopenharmony_ci     * Proximity sensor.
291461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
291561847f8eSopenharmony_ci     * @since 8
291661847f8eSopenharmony_ci     * @deprecated since 9
291761847f8eSopenharmony_ci     */
291861847f8eSopenharmony_ci    SENSOR_TYPE_ID_PROXIMITY = 12,
291961847f8eSopenharmony_ci
292061847f8eSopenharmony_ci    /**
292161847f8eSopenharmony_ci     * Humidity sensor.
292261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
292361847f8eSopenharmony_ci     * @since 8
292461847f8eSopenharmony_ci     * @deprecated since 9
292561847f8eSopenharmony_ci     */
292661847f8eSopenharmony_ci    SENSOR_TYPE_ID_HUMIDITY = 13,
292761847f8eSopenharmony_ci
292861847f8eSopenharmony_ci    /**
292961847f8eSopenharmony_ci     * Orientation sensor.
293061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
293161847f8eSopenharmony_ci     * @since 8
293261847f8eSopenharmony_ci     * @deprecated since 9
293361847f8eSopenharmony_ci     */
293461847f8eSopenharmony_ci    SENSOR_TYPE_ID_ORIENTATION = 256,
293561847f8eSopenharmony_ci
293661847f8eSopenharmony_ci    /**
293761847f8eSopenharmony_ci     * Gravity sensor.
293861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
293961847f8eSopenharmony_ci     * @since 8
294061847f8eSopenharmony_ci     * @deprecated since 9
294161847f8eSopenharmony_ci     */
294261847f8eSopenharmony_ci    SENSOR_TYPE_ID_GRAVITY = 257,
294361847f8eSopenharmony_ci
294461847f8eSopenharmony_ci    /**
294561847f8eSopenharmony_ci     * Linear acceleration sensor.
294661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
294761847f8eSopenharmony_ci     * @since 8
294861847f8eSopenharmony_ci     * @deprecated since 9
294961847f8eSopenharmony_ci     */
295061847f8eSopenharmony_ci    SENSOR_TYPE_ID_LINEAR_ACCELERATION = 258,
295161847f8eSopenharmony_ci
295261847f8eSopenharmony_ci    /**
295361847f8eSopenharmony_ci     * Rotation vector sensor.
295461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
295561847f8eSopenharmony_ci     * @since 8
295661847f8eSopenharmony_ci     * @deprecated since 9
295761847f8eSopenharmony_ci     */
295861847f8eSopenharmony_ci    SENSOR_TYPE_ID_ROTATION_VECTOR = 259,
295961847f8eSopenharmony_ci
296061847f8eSopenharmony_ci    /**
296161847f8eSopenharmony_ci     * Ambient temperature sensor.
296261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
296361847f8eSopenharmony_ci     * @since 8
296461847f8eSopenharmony_ci     * @deprecated since 9
296561847f8eSopenharmony_ci     */
296661847f8eSopenharmony_ci    SENSOR_TYPE_ID_AMBIENT_TEMPERATURE = 260,
296761847f8eSopenharmony_ci
296861847f8eSopenharmony_ci    /**
296961847f8eSopenharmony_ci     * Uncalibrated magnetic field sensor.
297061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
297161847f8eSopenharmony_ci     * @since 8
297261847f8eSopenharmony_ci     * @deprecated since 9
297361847f8eSopenharmony_ci     */
297461847f8eSopenharmony_ci    SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED = 261,
297561847f8eSopenharmony_ci
297661847f8eSopenharmony_ci    /**
297761847f8eSopenharmony_ci     * Uncalibrated gyroscope sensor.
297861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
297961847f8eSopenharmony_ci     * @since 8
298061847f8eSopenharmony_ci     * @deprecated since 9
298161847f8eSopenharmony_ci     */
298261847f8eSopenharmony_ci    SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED = 263,
298361847f8eSopenharmony_ci
298461847f8eSopenharmony_ci    /**
298561847f8eSopenharmony_ci     * Significant motion sensor.
298661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
298761847f8eSopenharmony_ci     * @since 8
298861847f8eSopenharmony_ci     * @deprecated since 9
298961847f8eSopenharmony_ci     */
299061847f8eSopenharmony_ci    SENSOR_TYPE_ID_SIGNIFICANT_MOTION = 264,
299161847f8eSopenharmony_ci
299261847f8eSopenharmony_ci    /**
299361847f8eSopenharmony_ci     * Pedometer detection sensor.
299461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
299561847f8eSopenharmony_ci     * @since 8
299661847f8eSopenharmony_ci     * @deprecated since 9
299761847f8eSopenharmony_ci     */
299861847f8eSopenharmony_ci    SENSOR_TYPE_ID_PEDOMETER_DETECTION = 265,
299961847f8eSopenharmony_ci
300061847f8eSopenharmony_ci    /**
300161847f8eSopenharmony_ci     * Pedometer sensor.
300261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
300361847f8eSopenharmony_ci     * @since 8
300461847f8eSopenharmony_ci     * @deprecated since 9
300561847f8eSopenharmony_ci     */
300661847f8eSopenharmony_ci    SENSOR_TYPE_ID_PEDOMETER = 266,
300761847f8eSopenharmony_ci
300861847f8eSopenharmony_ci    /**
300961847f8eSopenharmony_ci     * Heart rate sensor.
301061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
301161847f8eSopenharmony_ci     * @since 8
301261847f8eSopenharmony_ci     * @deprecated since 9
301361847f8eSopenharmony_ci     */
301461847f8eSopenharmony_ci    SENSOR_TYPE_ID_HEART_RATE = 278,
301561847f8eSopenharmony_ci
301661847f8eSopenharmony_ci    /**
301761847f8eSopenharmony_ci     * Wear detection sensor.
301861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
301961847f8eSopenharmony_ci     * @since 8
302061847f8eSopenharmony_ci     * @deprecated since 9
302161847f8eSopenharmony_ci     */
302261847f8eSopenharmony_ci    SENSOR_TYPE_ID_WEAR_DETECTION = 280,
302361847f8eSopenharmony_ci
302461847f8eSopenharmony_ci    /**
302561847f8eSopenharmony_ci     * Uncalibrated acceleration sensor.
302661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
302761847f8eSopenharmony_ci     * @since 8
302861847f8eSopenharmony_ci     * @deprecated since 9
302961847f8eSopenharmony_ci     */
303061847f8eSopenharmony_ci    SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED = 281
303161847f8eSopenharmony_ci  }
303261847f8eSopenharmony_ci
303361847f8eSopenharmony_ci  /**
303461847f8eSopenharmony_ci   * Enumerates the accuracy levels of data reported by a sensor.
303561847f8eSopenharmony_ci   * @enum { number }
303661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
303761847f8eSopenharmony_ci   * @atomicservice
303861847f8eSopenharmony_ci   * @since 11
303961847f8eSopenharmony_ci   */
304061847f8eSopenharmony_ci  enum SensorAccuracy {
304161847f8eSopenharmony_ci    /**
304261847f8eSopenharmony_ci     * The sensor data is unreliable. It is possible that the sensor does not contact with the device to measure.
304361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
304461847f8eSopenharmony_ci     * @atomicservice
304561847f8eSopenharmony_ci     * @since 11
304661847f8eSopenharmony_ci     */
304761847f8eSopenharmony_ci    ACCURACY_UNRELIABLE = 0,
304861847f8eSopenharmony_ci
304961847f8eSopenharmony_ci    /**
305061847f8eSopenharmony_ci     * The sensor data is at a low accuracy level. The data must be calibrated based on the environment before being used.
305161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
305261847f8eSopenharmony_ci     * @atomicservice
305361847f8eSopenharmony_ci     * @since 11
305461847f8eSopenharmony_ci     */
305561847f8eSopenharmony_ci    ACCURACY_LOW = 1,
305661847f8eSopenharmony_ci
305761847f8eSopenharmony_ci    /**
305861847f8eSopenharmony_ci     * The sensor data is at a medium accuracy level. You are advised to calibrate the data based on the environment before using it.
305961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
306061847f8eSopenharmony_ci     * @atomicservice
306161847f8eSopenharmony_ci     * @since 11
306261847f8eSopenharmony_ci     */
306361847f8eSopenharmony_ci    ACCURACY_MEDIUM = 2,
306461847f8eSopenharmony_ci
306561847f8eSopenharmony_ci    /**
306661847f8eSopenharmony_ci     * The sensor data is at a high accuracy level. The data can be used directly.
306761847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
306861847f8eSopenharmony_ci     * @atomicservice
306961847f8eSopenharmony_ci     * @since 11
307061847f8eSopenharmony_ci     */
307161847f8eSopenharmony_ci    ACCURACY_HIGH = 3
307261847f8eSopenharmony_ci  }
307361847f8eSopenharmony_ci
307461847f8eSopenharmony_ci  /**
307561847f8eSopenharmony_ci   * The basic data structure of the sensor event.
307661847f8eSopenharmony_ci   * @typedef Response
307761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
307861847f8eSopenharmony_ci   * @since 8
307961847f8eSopenharmony_ci   */
308061847f8eSopenharmony_ci  /**
308161847f8eSopenharmony_ci   * The basic data structure of the sensor event.
308261847f8eSopenharmony_ci   * @typedef Response
308361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
308461847f8eSopenharmony_ci   * @atomicservice
308561847f8eSopenharmony_ci   * @since 11
308661847f8eSopenharmony_ci   */
308761847f8eSopenharmony_ci  interface Response {
308861847f8eSopenharmony_ci    /**
308961847f8eSopenharmony_ci     * The timestamp of the reported sensor data.
309061847f8eSopenharmony_ci     * @type { number }
309161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
309261847f8eSopenharmony_ci     * @since 8
309361847f8eSopenharmony_ci     */
309461847f8eSopenharmony_ci    /**
309561847f8eSopenharmony_ci     * The timestamp of the reported sensor data.
309661847f8eSopenharmony_ci     * @type { number }
309761847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
309861847f8eSopenharmony_ci     * @atomicservice
309961847f8eSopenharmony_ci     * @since 11
310061847f8eSopenharmony_ci     */
310161847f8eSopenharmony_ci    timestamp: number;
310261847f8eSopenharmony_ci
310361847f8eSopenharmony_ci    /**
310461847f8eSopenharmony_ci     * The accuracy levels of data reported by a sensor.
310561847f8eSopenharmony_ci     * @type { SensorAccuracy }
310661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
310761847f8eSopenharmony_ci     * @atomicservice
310861847f8eSopenharmony_ci     * @since 11
310961847f8eSopenharmony_ci     */
311061847f8eSopenharmony_ci    accuracy: SensorAccuracy;
311161847f8eSopenharmony_ci  }
311261847f8eSopenharmony_ci
311361847f8eSopenharmony_ci  /**
311461847f8eSopenharmony_ci   * Acceleration sensor event data.
311561847f8eSopenharmony_ci   * @typedef AccelerometerResponse
311661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
311761847f8eSopenharmony_ci   * @since 8
311861847f8eSopenharmony_ci   */
311961847f8eSopenharmony_ci  /**
312061847f8eSopenharmony_ci   * Acceleration sensor event data.
312161847f8eSopenharmony_ci   * @typedef AccelerometerResponse
312261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
312361847f8eSopenharmony_ci   * @atomicservice
312461847f8eSopenharmony_ci   * @since 11
312561847f8eSopenharmony_ci   */
312661847f8eSopenharmony_ci  interface AccelerometerResponse extends Response {
312761847f8eSopenharmony_ci    /**
312861847f8eSopenharmony_ci     * Acceleration x-axis component.
312961847f8eSopenharmony_ci     * @type { number }
313061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
313161847f8eSopenharmony_ci     * @since 8
313261847f8eSopenharmony_ci     */
313361847f8eSopenharmony_ci    /**
313461847f8eSopenharmony_ci     * Acceleration x-axis component.
313561847f8eSopenharmony_ci     * @type { number }
313661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
313761847f8eSopenharmony_ci     * @atomicservice
313861847f8eSopenharmony_ci     * @since 11
313961847f8eSopenharmony_ci     */
314061847f8eSopenharmony_ci    x: number;
314161847f8eSopenharmony_ci
314261847f8eSopenharmony_ci    /**
314361847f8eSopenharmony_ci     * Acceleration y-axis component.
314461847f8eSopenharmony_ci     * @type { number }
314561847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
314661847f8eSopenharmony_ci     * @since 8
314761847f8eSopenharmony_ci     */
314861847f8eSopenharmony_ci    /**
314961847f8eSopenharmony_ci     * Acceleration y-axis component.
315061847f8eSopenharmony_ci     * @type { number }
315161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
315261847f8eSopenharmony_ci     * @atomicservice
315361847f8eSopenharmony_ci     * @since 11
315461847f8eSopenharmony_ci     */
315561847f8eSopenharmony_ci    y: number;
315661847f8eSopenharmony_ci
315761847f8eSopenharmony_ci    /**
315861847f8eSopenharmony_ci     * Acceleration z-axis component
315961847f8eSopenharmony_ci     * @type { number }
316061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
316161847f8eSopenharmony_ci     * @since 8
316261847f8eSopenharmony_ci     */
316361847f8eSopenharmony_ci    /**
316461847f8eSopenharmony_ci     * Acceleration z-axis component
316561847f8eSopenharmony_ci     * @type { number }
316661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
316761847f8eSopenharmony_ci     * @atomicservice
316861847f8eSopenharmony_ci     * @since 11
316961847f8eSopenharmony_ci     */
317061847f8eSopenharmony_ci    z: number;
317161847f8eSopenharmony_ci  }
317261847f8eSopenharmony_ci
317361847f8eSopenharmony_ci  /**
317461847f8eSopenharmony_ci   * Linear acceleration sensor event data.
317561847f8eSopenharmony_ci   * @typedef LinearAccelerometerResponse
317661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
317761847f8eSopenharmony_ci   * @since 8
317861847f8eSopenharmony_ci   */
317961847f8eSopenharmony_ci  interface LinearAccelerometerResponse extends Response {
318061847f8eSopenharmony_ci    /**
318161847f8eSopenharmony_ci     * Linear acceleration x-axis component.
318261847f8eSopenharmony_ci     * @type { number }
318361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
318461847f8eSopenharmony_ci     * @since 8
318561847f8eSopenharmony_ci     */
318661847f8eSopenharmony_ci    x: number;
318761847f8eSopenharmony_ci
318861847f8eSopenharmony_ci    /**
318961847f8eSopenharmony_ci     * Linear acceleration y-axis component.
319061847f8eSopenharmony_ci     * @type { number }
319161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
319261847f8eSopenharmony_ci     * @since 8
319361847f8eSopenharmony_ci     */
319461847f8eSopenharmony_ci    y: number;
319561847f8eSopenharmony_ci
319661847f8eSopenharmony_ci    /**
319761847f8eSopenharmony_ci     * Linear acceleration z-axis component.
319861847f8eSopenharmony_ci     * @type { number }
319961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
320061847f8eSopenharmony_ci     * @since 8
320161847f8eSopenharmony_ci     */
320261847f8eSopenharmony_ci    z: number;
320361847f8eSopenharmony_ci  }
320461847f8eSopenharmony_ci
320561847f8eSopenharmony_ci  /**
320661847f8eSopenharmony_ci   * Acceleration uncalibrated sensor event data.
320761847f8eSopenharmony_ci   * @typedef AccelerometerUncalibratedResponse
320861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
320961847f8eSopenharmony_ci   * @since 8
321061847f8eSopenharmony_ci   */
321161847f8eSopenharmony_ci  interface AccelerometerUncalibratedResponse extends Response {
321261847f8eSopenharmony_ci    /**
321361847f8eSopenharmony_ci     * Acceleration uncalibrated x-axis component.
321461847f8eSopenharmony_ci     * @type { number }
321561847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
321661847f8eSopenharmony_ci     * @since 8
321761847f8eSopenharmony_ci     */
321861847f8eSopenharmony_ci    x: number;
321961847f8eSopenharmony_ci
322061847f8eSopenharmony_ci    /**
322161847f8eSopenharmony_ci     * Acceleration uncalibrated y-axis component.
322261847f8eSopenharmony_ci     * @type { number }
322361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
322461847f8eSopenharmony_ci     * @since 8
322561847f8eSopenharmony_ci     */
322661847f8eSopenharmony_ci    y: number;
322761847f8eSopenharmony_ci
322861847f8eSopenharmony_ci    /**
322961847f8eSopenharmony_ci     * Acceleration uncalibrated z-axis component.
323061847f8eSopenharmony_ci     * @type { number }
323161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
323261847f8eSopenharmony_ci     * @since 8
323361847f8eSopenharmony_ci     */
323461847f8eSopenharmony_ci    z: number;
323561847f8eSopenharmony_ci
323661847f8eSopenharmony_ci    /**
323761847f8eSopenharmony_ci     * Acceleration uncalibrated x-axis offset.
323861847f8eSopenharmony_ci     * 
323961847f8eSopenharmony_ci     * @type { number }
324061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
324161847f8eSopenharmony_ci     * @since 8
324261847f8eSopenharmony_ci     */
324361847f8eSopenharmony_ci    biasX: number;
324461847f8eSopenharmony_ci
324561847f8eSopenharmony_ci    /**
324661847f8eSopenharmony_ci     * Acceleration uncalibrated y-axis offset.
324761847f8eSopenharmony_ci     * 
324861847f8eSopenharmony_ci     * @type { number }
324961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
325061847f8eSopenharmony_ci     * @since 8
325161847f8eSopenharmony_ci     */
325261847f8eSopenharmony_ci    biasY: number;
325361847f8eSopenharmony_ci
325461847f8eSopenharmony_ci    /**
325561847f8eSopenharmony_ci     * Acceleration uncalibrated z-axis offset.
325661847f8eSopenharmony_ci     * 
325761847f8eSopenharmony_ci     * @type { number }
325861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
325961847f8eSopenharmony_ci     * @since 8
326061847f8eSopenharmony_ci     */
326161847f8eSopenharmony_ci    biasZ: number;
326261847f8eSopenharmony_ci  }
326361847f8eSopenharmony_ci
326461847f8eSopenharmony_ci  /**
326561847f8eSopenharmony_ci   * Gravity sensor event data.
326661847f8eSopenharmony_ci   * @typedef GravityResponse
326761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
326861847f8eSopenharmony_ci   * @since 8
326961847f8eSopenharmony_ci   */
327061847f8eSopenharmony_ci  interface GravityResponse extends Response {
327161847f8eSopenharmony_ci    /**
327261847f8eSopenharmony_ci     * Gravity x-axis component.
327361847f8eSopenharmony_ci     * @type { number }
327461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
327561847f8eSopenharmony_ci     * @since 8
327661847f8eSopenharmony_ci     */
327761847f8eSopenharmony_ci    x: number;
327861847f8eSopenharmony_ci
327961847f8eSopenharmony_ci    /**
328061847f8eSopenharmony_ci     * Gravity y-axis component.
328161847f8eSopenharmony_ci     * @type { number }
328261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
328361847f8eSopenharmony_ci     * @since 8
328461847f8eSopenharmony_ci     */
328561847f8eSopenharmony_ci    y: number;
328661847f8eSopenharmony_ci
328761847f8eSopenharmony_ci    /**
328861847f8eSopenharmony_ci     * Gravity z-axis component.
328961847f8eSopenharmony_ci     * @type { number }
329061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
329161847f8eSopenharmony_ci     * @since 8
329261847f8eSopenharmony_ci     */
329361847f8eSopenharmony_ci    z: number;
329461847f8eSopenharmony_ci  }
329561847f8eSopenharmony_ci
329661847f8eSopenharmony_ci  /**
329761847f8eSopenharmony_ci   * Orientation sensor event data.
329861847f8eSopenharmony_ci   * @typedef OrientationResponse
329961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
330061847f8eSopenharmony_ci   * @since 8
330161847f8eSopenharmony_ci   */
330261847f8eSopenharmony_ci  /**
330361847f8eSopenharmony_ci   * Orientation sensor event data.
330461847f8eSopenharmony_ci   * @typedef OrientationResponse
330561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
330661847f8eSopenharmony_ci   * @atomicservice
330761847f8eSopenharmony_ci   * @since 11
330861847f8eSopenharmony_ci   */
330961847f8eSopenharmony_ci  interface OrientationResponse extends Response {
331061847f8eSopenharmony_ci    /**
331161847f8eSopenharmony_ci     * The device rotates at an angle around the Z axis.
331261847f8eSopenharmony_ci     * @type { number }
331361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
331461847f8eSopenharmony_ci     * @since 8
331561847f8eSopenharmony_ci     */
331661847f8eSopenharmony_ci    /**
331761847f8eSopenharmony_ci     * The device rotates at an angle around the Z axis.
331861847f8eSopenharmony_ci     * @type { number }
331961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
332061847f8eSopenharmony_ci     * @atomicservice
332161847f8eSopenharmony_ci     * @since 11
332261847f8eSopenharmony_ci     */
332361847f8eSopenharmony_ci    alpha: number;
332461847f8eSopenharmony_ci
332561847f8eSopenharmony_ci    /**
332661847f8eSopenharmony_ci     * The device rotates at an angle around the X axis.
332761847f8eSopenharmony_ci     * @type { number }
332861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
332961847f8eSopenharmony_ci     * @since 8
333061847f8eSopenharmony_ci     */
333161847f8eSopenharmony_ci    /**
333261847f8eSopenharmony_ci     * The device rotates at an angle around the X axis.
333361847f8eSopenharmony_ci     * @type { number }
333461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
333561847f8eSopenharmony_ci     * @atomicservice
333661847f8eSopenharmony_ci     * @since 11
333761847f8eSopenharmony_ci     */
333861847f8eSopenharmony_ci    beta: number;
333961847f8eSopenharmony_ci
334061847f8eSopenharmony_ci    /**
334161847f8eSopenharmony_ci     * The device rotates at an angle around the Y axis.
334261847f8eSopenharmony_ci     * @type { number }
334361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
334461847f8eSopenharmony_ci     * @since 8
334561847f8eSopenharmony_ci     */
334661847f8eSopenharmony_ci    /**
334761847f8eSopenharmony_ci     * The device rotates at an angle around the Y axis.
334861847f8eSopenharmony_ci     * @type { number }
334961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
335061847f8eSopenharmony_ci     * @atomicservice
335161847f8eSopenharmony_ci     * @since 11
335261847f8eSopenharmony_ci     */
335361847f8eSopenharmony_ci    gamma: number;
335461847f8eSopenharmony_ci  }
335561847f8eSopenharmony_ci
335661847f8eSopenharmony_ci  /**
335761847f8eSopenharmony_ci   * Rotation vector sensor event data.
335861847f8eSopenharmony_ci   * @typedef RotationVectorResponse
335961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
336061847f8eSopenharmony_ci   * @since 8
336161847f8eSopenharmony_ci   */
336261847f8eSopenharmony_ci  interface RotationVectorResponse extends Response {
336361847f8eSopenharmony_ci    /**
336461847f8eSopenharmony_ci     * Rotation vector x-axis component.
336561847f8eSopenharmony_ci     * @type { number }
336661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
336761847f8eSopenharmony_ci     * @since 8
336861847f8eSopenharmony_ci     */
336961847f8eSopenharmony_ci    x: number;
337061847f8eSopenharmony_ci
337161847f8eSopenharmony_ci    /**
337261847f8eSopenharmony_ci     * Rotation vector y-axis component.
337361847f8eSopenharmony_ci     * @type { number }
337461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
337561847f8eSopenharmony_ci     * @since 8
337661847f8eSopenharmony_ci     */
337761847f8eSopenharmony_ci    y: number;
337861847f8eSopenharmony_ci
337961847f8eSopenharmony_ci    /**
338061847f8eSopenharmony_ci     * Rotation vector z-axis component.
338161847f8eSopenharmony_ci     * @type { number }
338261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
338361847f8eSopenharmony_ci     * @since 8
338461847f8eSopenharmony_ci     */
338561847f8eSopenharmony_ci    z: number;
338661847f8eSopenharmony_ci
338761847f8eSopenharmony_ci    /**
338861847f8eSopenharmony_ci     * Scalar quantity.
338961847f8eSopenharmony_ci     * @type { number }
339061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
339161847f8eSopenharmony_ci     * @since 8
339261847f8eSopenharmony_ci     */
339361847f8eSopenharmony_ci    w: number;
339461847f8eSopenharmony_ci  }
339561847f8eSopenharmony_ci
339661847f8eSopenharmony_ci  /**
339761847f8eSopenharmony_ci   * Gyroscope sensor event data.
339861847f8eSopenharmony_ci   * @typedef GyroscopeResponse
339961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
340061847f8eSopenharmony_ci   * @since 8
340161847f8eSopenharmony_ci   */
340261847f8eSopenharmony_ci  /**
340361847f8eSopenharmony_ci   * Gyroscope sensor event data.
340461847f8eSopenharmony_ci   * @typedef GyroscopeResponse
340561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
340661847f8eSopenharmony_ci   * @atomicservice
340761847f8eSopenharmony_ci   * @since 11
340861847f8eSopenharmony_ci   */
340961847f8eSopenharmony_ci  interface GyroscopeResponse extends Response {
341061847f8eSopenharmony_ci    /**
341161847f8eSopenharmony_ci     * Gyroscope x-axis component.
341261847f8eSopenharmony_ci     * @type { number }
341361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
341461847f8eSopenharmony_ci     * @since 8
341561847f8eSopenharmony_ci     */
341661847f8eSopenharmony_ci    /**
341761847f8eSopenharmony_ci     * Gyroscope x-axis component.
341861847f8eSopenharmony_ci     * @type { number }
341961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
342061847f8eSopenharmony_ci     * @atomicservice
342161847f8eSopenharmony_ci     * @since 11
342261847f8eSopenharmony_ci     */
342361847f8eSopenharmony_ci    x: number;
342461847f8eSopenharmony_ci
342561847f8eSopenharmony_ci    /**
342661847f8eSopenharmony_ci     * Gyroscope y-axis component.
342761847f8eSopenharmony_ci     * @type { number }
342861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
342961847f8eSopenharmony_ci     * @since 8
343061847f8eSopenharmony_ci     */
343161847f8eSopenharmony_ci    /**
343261847f8eSopenharmony_ci     * Gyroscope y-axis component.
343361847f8eSopenharmony_ci     * @type { number }
343461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
343561847f8eSopenharmony_ci     * @atomicservice
343661847f8eSopenharmony_ci     * @since 11
343761847f8eSopenharmony_ci     */
343861847f8eSopenharmony_ci    y: number;
343961847f8eSopenharmony_ci
344061847f8eSopenharmony_ci    /**
344161847f8eSopenharmony_ci     * Gyroscope z-axis component.
344261847f8eSopenharmony_ci     * @type { number }
344361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
344461847f8eSopenharmony_ci     * @since 8
344561847f8eSopenharmony_ci     */
344661847f8eSopenharmony_ci    /**
344761847f8eSopenharmony_ci     * Gyroscope z-axis component.
344861847f8eSopenharmony_ci     * @type { number }
344961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
345061847f8eSopenharmony_ci     * @atomicservice
345161847f8eSopenharmony_ci     * @since 11
345261847f8eSopenharmony_ci     */
345361847f8eSopenharmony_ci    z: number;
345461847f8eSopenharmony_ci  }
345561847f8eSopenharmony_ci
345661847f8eSopenharmony_ci  /**
345761847f8eSopenharmony_ci   * Gyroscope uncalibrated sensor event data.
345861847f8eSopenharmony_ci   * @typedef GyroscopeUncalibratedResponse
345961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
346061847f8eSopenharmony_ci   * @since 8
346161847f8eSopenharmony_ci   */
346261847f8eSopenharmony_ci  interface GyroscopeUncalibratedResponse extends Response {
346361847f8eSopenharmony_ci    /**
346461847f8eSopenharmony_ci     * Gyroscope uncalibrated x-axis component.
346561847f8eSopenharmony_ci     * @type { number }
346661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
346761847f8eSopenharmony_ci     * @since 8
346861847f8eSopenharmony_ci     */
346961847f8eSopenharmony_ci    x: number;
347061847f8eSopenharmony_ci
347161847f8eSopenharmony_ci    /**
347261847f8eSopenharmony_ci     * Gyroscope uncalibrated y-axis component.
347361847f8eSopenharmony_ci     * @type { number }
347461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
347561847f8eSopenharmony_ci     * @since 8
347661847f8eSopenharmony_ci     */
347761847f8eSopenharmony_ci    y: number;
347861847f8eSopenharmony_ci
347961847f8eSopenharmony_ci    /**
348061847f8eSopenharmony_ci     * Gyroscope uncalibrated z-axis component.
348161847f8eSopenharmony_ci     * @type { number }
348261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
348361847f8eSopenharmony_ci     * @since 8
348461847f8eSopenharmony_ci     */
348561847f8eSopenharmony_ci    z: number;
348661847f8eSopenharmony_ci
348761847f8eSopenharmony_ci    /**
348861847f8eSopenharmony_ci     * Gyroscope uncalibrated x-axis offset.
348961847f8eSopenharmony_ci     * @type { number }
349061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
349161847f8eSopenharmony_ci     * @since 8
349261847f8eSopenharmony_ci     */
349361847f8eSopenharmony_ci    biasX: number;
349461847f8eSopenharmony_ci
349561847f8eSopenharmony_ci    /**
349661847f8eSopenharmony_ci     * Gyroscope uncalibrated y-axis offset.
349761847f8eSopenharmony_ci     * @type { number }
349861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
349961847f8eSopenharmony_ci     * @since 8
350061847f8eSopenharmony_ci     */
350161847f8eSopenharmony_ci    biasY: number;
350261847f8eSopenharmony_ci
350361847f8eSopenharmony_ci    /**
350461847f8eSopenharmony_ci     * Gyroscope uncalibrated z-axis offset.
350561847f8eSopenharmony_ci     * @type { number }
350661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
350761847f8eSopenharmony_ci     * @since 8
350861847f8eSopenharmony_ci     */
350961847f8eSopenharmony_ci    biasZ: number;
351061847f8eSopenharmony_ci  }
351161847f8eSopenharmony_ci
351261847f8eSopenharmony_ci  /**
351361847f8eSopenharmony_ci   * Significant motion sensor event data.
351461847f8eSopenharmony_ci   * @typedef SignificantMotionResponse
351561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
351661847f8eSopenharmony_ci   * @since 8
351761847f8eSopenharmony_ci   */
351861847f8eSopenharmony_ci  interface SignificantMotionResponse extends Response {
351961847f8eSopenharmony_ci    /**
352061847f8eSopenharmony_ci     * The degree of significant motion.
352161847f8eSopenharmony_ci     * Whether the device has a significant motion.
352261847f8eSopenharmony_ci     * The value 1 means that the device has a significant motion, and 0 means the opposite.
352361847f8eSopenharmony_ci     * @type { number }
352461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
352561847f8eSopenharmony_ci     * @since 8
352661847f8eSopenharmony_ci     */
352761847f8eSopenharmony_ci    scalar: number;
352861847f8eSopenharmony_ci  }
352961847f8eSopenharmony_ci
353061847f8eSopenharmony_ci  /**
353161847f8eSopenharmony_ci   * Proximity sensor event data.
353261847f8eSopenharmony_ci   * @typedef ProximityResponse
353361847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
353461847f8eSopenharmony_ci   * @since 8
353561847f8eSopenharmony_ci   */
353661847f8eSopenharmony_ci  interface ProximityResponse extends Response {
353761847f8eSopenharmony_ci    /**
353861847f8eSopenharmony_ci     * Indicates the degree of proximity, event 0 indicates proximity, and greater than 0 indicates distance.
353961847f8eSopenharmony_ci     * @type { number }
354061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
354161847f8eSopenharmony_ci     * @since 8
354261847f8eSopenharmony_ci     */
354361847f8eSopenharmony_ci    distance: number;
354461847f8eSopenharmony_ci  }
354561847f8eSopenharmony_ci
354661847f8eSopenharmony_ci  /**
354761847f8eSopenharmony_ci   * Light sensor event data.
354861847f8eSopenharmony_ci   * @typedef LightResponse
354961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
355061847f8eSopenharmony_ci   * @since 8
355161847f8eSopenharmony_ci   */
355261847f8eSopenharmony_ci  interface LightResponse extends Response {
355361847f8eSopenharmony_ci    /**
355461847f8eSopenharmony_ci     * Indicates light intensity, in lux.
355561847f8eSopenharmony_ci     * @type { number }
355661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
355761847f8eSopenharmony_ci     * @since 8
355861847f8eSopenharmony_ci     */
355961847f8eSopenharmony_ci    intensity: number;
356061847f8eSopenharmony_ci
356161847f8eSopenharmony_ci    /**
356261847f8eSopenharmony_ci     * Indicates color temperature, in kelvin.
356361847f8eSopenharmony_ci     * @type { ?number }
356461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
356561847f8eSopenharmony_ci     * @since 12
356661847f8eSopenharmony_ci     */
356761847f8eSopenharmony_ci    colorTemperature?: number;
356861847f8eSopenharmony_ci
356961847f8eSopenharmony_ci    /**
357061847f8eSopenharmony_ci     * Indicates infrared luminance, in cd/m2.
357161847f8eSopenharmony_ci     * @type { ?number }
357261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
357361847f8eSopenharmony_ci     * @since 12
357461847f8eSopenharmony_ci     */
357561847f8eSopenharmony_ci    infraredLuminance?: number;
357661847f8eSopenharmony_ci  }
357761847f8eSopenharmony_ci
357861847f8eSopenharmony_ci  /**
357961847f8eSopenharmony_ci   * Hall sensor event data.
358061847f8eSopenharmony_ci   * @typedef HallResponse
358161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
358261847f8eSopenharmony_ci   * @since 8
358361847f8eSopenharmony_ci   */
358461847f8eSopenharmony_ci  interface HallResponse extends Response {
358561847f8eSopenharmony_ci    /**
358661847f8eSopenharmony_ci     * Indicates hall status, 0 indicates open, and greater than 0 indicates suction.
358761847f8eSopenharmony_ci     * @type { number }
358861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
358961847f8eSopenharmony_ci     * @since 8
359061847f8eSopenharmony_ci     */
359161847f8eSopenharmony_ci    status: number;
359261847f8eSopenharmony_ci  }
359361847f8eSopenharmony_ci
359461847f8eSopenharmony_ci  /**
359561847f8eSopenharmony_ci   * Magnetic field sensor event data.
359661847f8eSopenharmony_ci   * @typedef MagneticFieldResponse
359761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
359861847f8eSopenharmony_ci   * @since 8
359961847f8eSopenharmony_ci   */
360061847f8eSopenharmony_ci  interface MagneticFieldResponse extends Response {
360161847f8eSopenharmony_ci    /**
360261847f8eSopenharmony_ci     * Magnetic field x-axis component.
360361847f8eSopenharmony_ci     * @type { number }
360461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
360561847f8eSopenharmony_ci     * @since 8
360661847f8eSopenharmony_ci     */
360761847f8eSopenharmony_ci    x: number;
360861847f8eSopenharmony_ci
360961847f8eSopenharmony_ci    /**
361061847f8eSopenharmony_ci     * Magnetic field y-axis component.
361161847f8eSopenharmony_ci     * @type { number }
361261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
361361847f8eSopenharmony_ci     * @since 8
361461847f8eSopenharmony_ci     */
361561847f8eSopenharmony_ci    y: number;
361661847f8eSopenharmony_ci
361761847f8eSopenharmony_ci    /**
361861847f8eSopenharmony_ci     * Magnetic field z-axis component.
361961847f8eSopenharmony_ci     * @type { number }
362061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
362161847f8eSopenharmony_ci     * @since 8
362261847f8eSopenharmony_ci     */
362361847f8eSopenharmony_ci    z: number;
362461847f8eSopenharmony_ci  }
362561847f8eSopenharmony_ci
362661847f8eSopenharmony_ci  /**
362761847f8eSopenharmony_ci   * Magnetic field uncalibrated sensor event data.
362861847f8eSopenharmony_ci   * @typedef MagneticFieldUncalibratedResponse
362961847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
363061847f8eSopenharmony_ci   * @since 8
363161847f8eSopenharmony_ci   */
363261847f8eSopenharmony_ci  interface MagneticFieldUncalibratedResponse extends Response {
363361847f8eSopenharmony_ci    /**
363461847f8eSopenharmony_ci     * Magnetic field uncalibrated x-axis component.
363561847f8eSopenharmony_ci     * @type { number }
363661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
363761847f8eSopenharmony_ci     * @since 8
363861847f8eSopenharmony_ci     */
363961847f8eSopenharmony_ci    x: number;
364061847f8eSopenharmony_ci
364161847f8eSopenharmony_ci    /**
364261847f8eSopenharmony_ci     * Magnetic field uncalibrated y-axis component.
364361847f8eSopenharmony_ci     * @type { number }
364461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
364561847f8eSopenharmony_ci     * @since 8
364661847f8eSopenharmony_ci     */
364761847f8eSopenharmony_ci    y: number;
364861847f8eSopenharmony_ci
364961847f8eSopenharmony_ci    /**
365061847f8eSopenharmony_ci     * Magnetic field uncalibrated z-axis component.
365161847f8eSopenharmony_ci     * @type { number }
365261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
365361847f8eSopenharmony_ci     * @since 8
365461847f8eSopenharmony_ci     */
365561847f8eSopenharmony_ci    z: number;
365661847f8eSopenharmony_ci
365761847f8eSopenharmony_ci    /**
365861847f8eSopenharmony_ci     * Magnetic field uncalibrated x-axis offset.
365961847f8eSopenharmony_ci     * @type { number }
366061847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
366161847f8eSopenharmony_ci     * @since 8
366261847f8eSopenharmony_ci     */
366361847f8eSopenharmony_ci    biasX: number;
366461847f8eSopenharmony_ci
366561847f8eSopenharmony_ci    /**
366661847f8eSopenharmony_ci     * Magnetic field uncalibrated y-axis offset.
366761847f8eSopenharmony_ci     * @type { number }
366861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
366961847f8eSopenharmony_ci     * @since 8
367061847f8eSopenharmony_ci     */
367161847f8eSopenharmony_ci    biasY: number;
367261847f8eSopenharmony_ci
367361847f8eSopenharmony_ci    /**
367461847f8eSopenharmony_ci     * Magnetic field uncalibrated z-axis offset.
367561847f8eSopenharmony_ci     * @type { number }
367661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
367761847f8eSopenharmony_ci     * @since 8
367861847f8eSopenharmony_ci     */
367961847f8eSopenharmony_ci    biasZ: number;
368061847f8eSopenharmony_ci  }
368161847f8eSopenharmony_ci
368261847f8eSopenharmony_ci  /**
368361847f8eSopenharmony_ci   * Pedometer sensor event data.
368461847f8eSopenharmony_ci   * @typedef PedometerResponse
368561847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
368661847f8eSopenharmony_ci   * @since 8
368761847f8eSopenharmony_ci   */
368861847f8eSopenharmony_ci  interface PedometerResponse extends Response {
368961847f8eSopenharmony_ci    /**
369061847f8eSopenharmony_ci     * Indicates the number of steps.
369161847f8eSopenharmony_ci     * @type { number }
369261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
369361847f8eSopenharmony_ci     * @since 8
369461847f8eSopenharmony_ci     */
369561847f8eSopenharmony_ci    steps: number;
369661847f8eSopenharmony_ci  }
369761847f8eSopenharmony_ci
369861847f8eSopenharmony_ci  /**
369961847f8eSopenharmony_ci   * Humidity sensor event data.
370061847f8eSopenharmony_ci   * @typedef HumidityResponse
370161847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
370261847f8eSopenharmony_ci   * @since 8
370361847f8eSopenharmony_ci   */
370461847f8eSopenharmony_ci  interface HumidityResponse extends Response {
370561847f8eSopenharmony_ci    /**
370661847f8eSopenharmony_ci     * Indicates the number of humidity.
370761847f8eSopenharmony_ci     * @type { number }
370861847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
370961847f8eSopenharmony_ci     * @since 8
371061847f8eSopenharmony_ci     */
371161847f8eSopenharmony_ci    humidity: number;
371261847f8eSopenharmony_ci  }
371361847f8eSopenharmony_ci
371461847f8eSopenharmony_ci  /**
371561847f8eSopenharmony_ci   * Pedometer detection sensor event data.
371661847f8eSopenharmony_ci   * @typedef PedometerDetectionResponse
371761847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
371861847f8eSopenharmony_ci   * @since 8
371961847f8eSopenharmony_ci   */
372061847f8eSopenharmony_ci  interface PedometerDetectionResponse extends Response {
372161847f8eSopenharmony_ci    /**
372261847f8eSopenharmony_ci     * Indicates the pedometer detection status, 1 indicates that a walking action has occurred,
372361847f8eSopenharmony_ci     * and 0 indicates that no movement has occurred.
372461847f8eSopenharmony_ci     * @type { number }
372561847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
372661847f8eSopenharmony_ci     * @since 8
372761847f8eSopenharmony_ci     */
372861847f8eSopenharmony_ci    scalar: number;
372961847f8eSopenharmony_ci  }
373061847f8eSopenharmony_ci
373161847f8eSopenharmony_ci  /**
373261847f8eSopenharmony_ci   * Ambient temperature sensor event data.
373361847f8eSopenharmony_ci   * @typedef  AmbientTemperatureResponse
373461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
373561847f8eSopenharmony_ci   * @since 8
373661847f8eSopenharmony_ci   */
373761847f8eSopenharmony_ci  interface AmbientTemperatureResponse extends Response {
373861847f8eSopenharmony_ci    /**
373961847f8eSopenharmony_ci     * Indicates ambient temperature, in celsius.
374061847f8eSopenharmony_ci     * @type { number }
374161847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
374261847f8eSopenharmony_ci     * @since 8
374361847f8eSopenharmony_ci     */
374461847f8eSopenharmony_ci    temperature: number;
374561847f8eSopenharmony_ci  }
374661847f8eSopenharmony_ci
374761847f8eSopenharmony_ci  /**
374861847f8eSopenharmony_ci   * Barometer sensor event data.
374961847f8eSopenharmony_ci   * @typedef BarometerResponse
375061847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
375161847f8eSopenharmony_ci   * @since 8
375261847f8eSopenharmony_ci   */
375361847f8eSopenharmony_ci  interface BarometerResponse extends Response {
375461847f8eSopenharmony_ci    /**
375561847f8eSopenharmony_ci     * Indicates the number of barometer, in hpa.
375661847f8eSopenharmony_ci     * @type { number }
375761847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
375861847f8eSopenharmony_ci     * @since 8
375961847f8eSopenharmony_ci     */
376061847f8eSopenharmony_ci    pressure: number;
376161847f8eSopenharmony_ci  }
376261847f8eSopenharmony_ci
376361847f8eSopenharmony_ci  /**
376461847f8eSopenharmony_ci   * Heart rate sensor event data.
376561847f8eSopenharmony_ci   * @typedef HeartRateResponse
376661847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
376761847f8eSopenharmony_ci   * @since 8
376861847f8eSopenharmony_ci   */
376961847f8eSopenharmony_ci  interface HeartRateResponse extends Response {
377061847f8eSopenharmony_ci    /**
377161847f8eSopenharmony_ci     * Indicates the number of heart rate.
377261847f8eSopenharmony_ci     * @type { number }
377361847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
377461847f8eSopenharmony_ci     * @since 8
377561847f8eSopenharmony_ci     */
377661847f8eSopenharmony_ci    heartRate: number;
377761847f8eSopenharmony_ci  }
377861847f8eSopenharmony_ci
377961847f8eSopenharmony_ci  /**
378061847f8eSopenharmony_ci   * Wear detection sensor event data.
378161847f8eSopenharmony_ci   * @typedef WearDetectionResponse
378261847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
378361847f8eSopenharmony_ci   * @since 8
378461847f8eSopenharmony_ci   */
378561847f8eSopenharmony_ci  interface WearDetectionResponse extends Response {
378661847f8eSopenharmony_ci    /**
378761847f8eSopenharmony_ci     * Indicates the status of wear detection, 1 for wearing, 0 for wearing not.
378861847f8eSopenharmony_ci     * @type { number }
378961847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
379061847f8eSopenharmony_ci     * @since 8
379161847f8eSopenharmony_ci     */
379261847f8eSopenharmony_ci    value: number;
379361847f8eSopenharmony_ci  }
379461847f8eSopenharmony_ci
379561847f8eSopenharmony_ci  /**
379661847f8eSopenharmony_ci   * Color sensor event data.
379761847f8eSopenharmony_ci   * @typedef ColorResponse
379861847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
379961847f8eSopenharmony_ci   * @systemapi
380061847f8eSopenharmony_ci   * @since 10
380161847f8eSopenharmony_ci   */
380261847f8eSopenharmony_ci  interface ColorResponse extends Response {
380361847f8eSopenharmony_ci    /**
380461847f8eSopenharmony_ci     * Indicates the intensity of light, in lux.
380561847f8eSopenharmony_ci     * @type { number }
380661847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor      
380761847f8eSopenharmony_ci     * @systemapi
380861847f8eSopenharmony_ci     * @since 10
380961847f8eSopenharmony_ci     */
381061847f8eSopenharmony_ci    lightIntensity: number;
381161847f8eSopenharmony_ci    /**
381261847f8eSopenharmony_ci     * Indicates the color temperature, in kelvin.
381361847f8eSopenharmony_ci     * @type { number }
381461847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
381561847f8eSopenharmony_ci     * @systemapi
381661847f8eSopenharmony_ci     * @since 10
381761847f8eSopenharmony_ci     */
381861847f8eSopenharmony_ci    colorTemperature: number;
381961847f8eSopenharmony_ci  }
382061847f8eSopenharmony_ci
382161847f8eSopenharmony_ci  /**
382261847f8eSopenharmony_ci   * Sar sensor event data.
382361847f8eSopenharmony_ci   * @typedef SarResponse
382461847f8eSopenharmony_ci   * @syscap SystemCapability.Sensors.Sensor
382561847f8eSopenharmony_ci   * @systemapi
382661847f8eSopenharmony_ci   * @since 10
382761847f8eSopenharmony_ci   */
382861847f8eSopenharmony_ci  interface SarResponse extends Response {
382961847f8eSopenharmony_ci    /**
383061847f8eSopenharmony_ci     * Indicates the specific absorption rate, in W/kg.
383161847f8eSopenharmony_ci     * @type { number }
383261847f8eSopenharmony_ci     * @syscap SystemCapability.Sensors.Sensor
383361847f8eSopenharmony_ci     * @systemapi
383461847f8eSopenharmony_ci     * @since 10
383561847f8eSopenharmony_ci     */
383661847f8eSopenharmony_ci    absorptionRatio: number;
383761847f8eSopenharmony_ci  }
383861847f8eSopenharmony_ci}
383961847f8eSopenharmony_ci
384061847f8eSopenharmony_ciexport default sensor;