• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 #include "sensor_info_config.h"
16 
17 #define HDF_LOG_TAG SensorInfoConfig
18 
19 namespace OHOS {
20 namespace HDI {
21 namespace Thermal {
22 namespace V1_1 {
SetXMLThermalZoneInfo(std::vector<XMLThermalZoneInfo> & vXmlTz)23 void SensorInfoConfig::SetXMLThermalZoneInfo(std::vector<XMLThermalZoneInfo> &vXmlTz)
24 {
25     xmlTzInfoList_ = vXmlTz;
26 }
27 
SetXMLThermalNodeInfo(std::vector<XMLThermalNodeInfo> & vXmlTn)28 void SensorInfoConfig::SetXMLThermalNodeInfo(std::vector<XMLThermalNodeInfo> &vXmlTn)
29 {
30     xmlTnInfoList_ = vXmlTn;
31 }
32 
GetXMLThermalZoneInfo()33 std::vector<XMLThermalZoneInfo> SensorInfoConfig::GetXMLThermalZoneInfo()
34 {
35     return xmlTzInfoList_;
36 }
37 
GetXMLThermalNodeInfo()38 std::vector<XMLThermalNodeInfo> SensorInfoConfig::GetXMLThermalNodeInfo()
39 {
40     return xmlTnInfoList_;
41 }
42 
SetGroupName(const std::string & groupName)43 void SensorInfoConfig::SetGroupName(const std::string &groupName)
44 {
45     groupName_ = groupName;
46 }
47 
SetGroupInterval(int32_t interval)48 void SensorInfoConfig::SetGroupInterval(int32_t interval)
49 {
50     interval_ = interval;
51 }
52 
GetInterval()53 int32_t SensorInfoConfig::GetInterval()
54 {
55     return interval_;
56 }
57 
GetGroupName()58 std::string SensorInfoConfig::GetGroupName()
59 {
60     return groupName_;
61 }
62 } // V1_1
63 } // Thermal
64 } // HDI
65 } // OHOS