• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 #ifndef OHOS_THERMAL_CONSTANTS_H
17 #define OHOS_THERMAL_CONSTANTS_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace PowerMgr {
23     // action name
24     constexpr const char* CPU_BIG_ACTION_NAME = "cpu_big";
25     constexpr const char* CPU_MED_ACTION_NAME = "cpu_med";
26     constexpr const char* CPU_LIT_ACTION_NAME = "cpu_lit";
27     constexpr const char* GPU_ACTION_NAME = "gpu";
28     constexpr const char* LCD_ACTION_NAME = "lcd";
29     constexpr const char* VOLUME_ACTION_NAME = "volume";
30     constexpr const char* SHUTDOWN_ACTION_NAME = "shut_down";
31     constexpr const char* PROCESS_ACTION_NAME = "process_ctrl";
32     constexpr const char* THERMAL_LEVEL_NAME = "thermallevel";
33     constexpr const char* POPUP_ACTION_NAME = "popup";
34     constexpr const char* CURRENT_SC_ACTION_NAME = "current_sc";
35     constexpr const char* CURRENT_BUCK_ACTION_NAME = "current_buck";
36     constexpr const char* VOLATAGE_SC_ACTION_NAME = "voltage_sc";
37     constexpr const char* VOLATAGE_BUCK_ACTION_NAME = "voltage_buck";
38     // state name
39     constexpr const char* STATE_CHARGER = "charge";
40     constexpr const char* STATE_SCREEN = "screen";
41     constexpr const char* STATE_SCNEN = "scene";
42 
43     // scene name
44     constexpr const char* SCENE_CAMERA = "cam";
45     constexpr const char* SCENE_CALL = "call";
46     constexpr const char* SCENE_GAME = "game";
47     const int MIN = 0;
48     const int MAX = 3;
49     const int INTERVAL = 5000;
50     constexpr const char* SC_PROTOCOL = "sc";
51     constexpr const char* BUCK_PROTOCOL = "buck";
52     constexpr int TIME_TO_SLEEP = 1000;
53     constexpr int32_t INVAILD_TEMP = -1000;
54     constexpr float INVALID_ACTION_VALUE = -3.1415926;
55 
56     // sensor type
57     constexpr const char* BATTERY = "battery";
58     constexpr const char* SHELL = "shell";
59     constexpr const char* CPU = "cpu";
60     constexpr const char* SOC = "soc";
61     constexpr const char* AP = "ap";
62     constexpr const char* PA = "pa";
63     constexpr const char* CHARGER = "charger";
64     constexpr const char* AMBIENT = "ambient";
65 
66     constexpr int APP_FIRST_UID = 15000;
67 
68     // observer
69     const int32_t INVALID_TEMP = -1000000;
70     const int32_t TYPE_MAX_SIZE = 10;
71 
72     // fallback value
73     constexpr const char* FALLBACK_ACTION_VALUE = "0";
74     const uint32_t ARG_0 = 0;
75     const uint32_t ARG_1 = 1;
76     const uint32_t ARG_2 = 2;
77     const uint32_t ARG_3 = 3;
78     const uint32_t ARG_4 = 4;
79     const uint32_t ARG_5 = 5;
80     const uint32_t ARG_6 = 6;
81     const uint32_t ARG_7 = 7;
82     const uint32_t ARG_8 = 8;
83     const uint32_t ARG_9 = 9;
84 } // namespace PowerMgr
85 } // namespace OHOS
86 #endif // OHOS_THERMAL_CONSTANTS_H
87