1/* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup HdiLpfenceCellbatching 18 * @{ 19 * 20 * @brief Provides APIs for recording base station trajectory data for low-power fence services. 21 * 22 * You can use the APIs to cache and flush the base station data received. 23 * The cell batching feature is used to determine the user's activity area based on the base station trajectory data received by the device, so as to further provide service information. 24 * 25 * @since 4.0 26 * @version 1.0 27 */ 28 29/** 30 * @file CellbatchingTypes.idl 31 * 32 * @brief Defines the data types of the cell batching module. 33 * 34 * @since 4.0 35 * @version 1.0 36 */ 37 38/** 39 * @brief Declares the path of the cell batching interface package. 40 * 41 * @since 4.0 42 */ 43package ohos.hdi.location.lpfence.cellbatching.v1_0; 44 45/** 46 * @brief Enumerates the operations on the cell batching feature. 47 * 48 * @since 4.0 49 */ 50enum CellbatchingSwitch { 51 /** Disable the cell batching feature. */ 52 SWITCH_OFF = 0, 53 /** Enable the cell batching feature. */ 54 SWITCH_ON = 1, 55}; 56 57/** 58 * @brief Defines the struct for setting the cell batching feature. 59 * 60 * @since 4.0 61 */ 62struct CellbatchingRequest { 63 /** Enable or disable the cell batching function. For details, see {@Link CellbatchingSwitch}. */ 64 int status; 65 /** Interval (in seconds) for the modem to receive base station data. The minimum interval is 30 seconds, and the maximum interval is 240 seconds. */ 66 int interval; 67}; 68 69/** 70 * @brief Defines the struct for the base station trajectory data. 71 * 72 * @since 4.0 73 */ 74struct CellTrajectoryData { 75 /** Lower-order 32 bits of the timestamp. */ 76 unsigned int timeStampLow; 77 /** High-order 32 bits of the timestamp. */ 78 unsigned int timeStampHigh; 79 /** Cell ID. */ 80 unsigned long cid; 81 /** Location area code (LAC) of the base station. */ 82 unsigned int lac; 83 /** Received Signal Strength Indication (RSSI). */ 84 unsigned short rssi; 85 /** Mobile country code (MCC). */ 86 unsigned short mcc; 87 /** Mobile network code (MNC). */ 88 unsigned short mnc; 89}; 90/** @} */ 91