1 /* 2 * Copyright (c) 2022 Chipsea Technologies (Shenzhen) Corp., 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 #include "medical_sensor_basic_info.h" 17 18 namespace OHOS { 19 namespace Sensors { MedicalSensorBasicInfo()20MedicalSensorBasicInfo::MedicalSensorBasicInfo() 21 : samplingPeriodNs_(0L), maxReportDelayNs_(0L), sensorState_(SENSOR_DISABLED) 22 {} 23 GetSamplingPeriodNs() const24int64_t MedicalSensorBasicInfo::GetSamplingPeriodNs() const 25 { 26 return samplingPeriodNs_; 27 } 28 SetSamplingPeriodNs(int64_t samplingPeriodNs)29void MedicalSensorBasicInfo::SetSamplingPeriodNs(int64_t samplingPeriodNs) 30 { 31 samplingPeriodNs_ = samplingPeriodNs; 32 } 33 GetMaxReportDelayNs() const34int64_t MedicalSensorBasicInfo::GetMaxReportDelayNs() const 35 { 36 return maxReportDelayNs_; 37 } 38 SetMaxReportDelayNs(int64_t maxReportDelayNs)39void MedicalSensorBasicInfo::SetMaxReportDelayNs(int64_t maxReportDelayNs) 40 { 41 maxReportDelayNs_ = maxReportDelayNs; 42 } 43 GetSensorState() const44MedicalSensorState MedicalSensorBasicInfo::GetSensorState() const 45 { 46 return sensorState_; 47 } 48 SetSensorState(MedicalSensorState sensorState)49void MedicalSensorBasicInfo::SetSensorState(MedicalSensorState sensorState) 50 { 51 sensorState_ = sensorState; 52 } 53 } // namespace Sensors 54 } // namespace OHOS 55