1f857971dSopenharmony_ci/* 2f857971dSopenharmony_ci * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3f857971dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4f857971dSopenharmony_ci * you may not use this file except in compliance with the License. 5f857971dSopenharmony_ci * You may obtain a copy of the License at 6f857971dSopenharmony_ci * 7f857971dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8f857971dSopenharmony_ci * 9f857971dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10f857971dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11f857971dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12f857971dSopenharmony_ci * See the License for the specific language governing permissions and 13f857971dSopenharmony_ci * limitations under the License. 14f857971dSopenharmony_ci */ 15f857971dSopenharmony_ci 16f857971dSopenharmony_ci#ifndef DEVICESTATUS_DATA_DEFINE_H 17f857971dSopenharmony_ci#define DEVICESTATUS_DATA_DEFINE_H 18f857971dSopenharmony_ci 19f857971dSopenharmony_ci#include <functional> 20f857971dSopenharmony_ci 21f857971dSopenharmony_ci#ifdef DEVICE_STATUS_SENSOR_ENABLE 22f857971dSopenharmony_ci#include "sensor_agent.h" 23f857971dSopenharmony_ci#endif // DEVICE_STATUS_SENSOR_ENABLE 24f857971dSopenharmony_ci#include "stationary_data.h" 25f857971dSopenharmony_ci 26f857971dSopenharmony_cinamespace OHOS { 27f857971dSopenharmony_cinamespace Msdp { 28f857971dSopenharmony_cinamespace DeviceStatus { 29f857971dSopenharmony_ciconstexpr double PI { 3.141592653589793 }; 30f857971dSopenharmony_ciconstexpr int32_t RESULTANT_ACC_LOW_THRHD { 7 }; 31f857971dSopenharmony_ciconstexpr int32_t RESULTANT_ACC_UP_THRHD { 11 }; 32f857971dSopenharmony_ciconstexpr double ACC_VALID_THRHD { 160.0 }; 33f857971dSopenharmony_ciconstexpr double ANGLE_180_DEGREE { 180.0 }; 34f857971dSopenharmony_ciconstexpr double ANGLE_HOR_UP_THRHD { 180.1 }; 35f857971dSopenharmony_ciconstexpr double ANGLE_HOR_LOW_THRHD { 160.0 }; 36f857971dSopenharmony_ciconstexpr double ANGLE_HOR_FLIPPED_THRHD { 5.0 }; 37f857971dSopenharmony_ciconstexpr double ANGLE_VER_UP_THRHD { 110.0 }; 38f857971dSopenharmony_ciconstexpr double ANGLE_VER_LOW_THRHD { 80.0 }; 39f857971dSopenharmony_ciconstexpr double ANGLE_VER_FLIPPED_THRHD { 5.0 }; 40f857971dSopenharmony_ci 41f857971dSopenharmony_ciconstexpr int32_t VALID_TIME_THRESHOLD { 500 }; 42f857971dSopenharmony_ciconstexpr int32_t ACC_SAMPLE_PERIOD { 100 }; 43f857971dSopenharmony_ciconstexpr int32_t COUNTER_THRESHOLD = VALID_TIME_THRESHOLD / ACC_SAMPLE_PERIOD; 44f857971dSopenharmony_ci 45f857971dSopenharmony_ci#ifdef DEVICE_STATUS_SENSOR_ENABLE 46f857971dSopenharmony_ciusing SensorCallback = std::function<void(int32_t, AccelData*)>; 47f857971dSopenharmony_ci#endif // DEVICE_STATUS_SENSOR_ENABLE 48f857971dSopenharmony_ci} // namespace DeviceStatus 49f857971dSopenharmony_ci} // namespace Msdp 50f857971dSopenharmony_ci} // namespace OHOS 51f857971dSopenharmony_ci#endif // DEVICESTATUS_DATA_DEFINE_H 52