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 #ifndef SENSOR_CHANNEL_INFO_H 17 #define SENSOR_CHANNEL_INFO_H 18 19 #include <string> 20 #include <vector> 21 22 namespace OHOS { 23 namespace Sensors { 24 class MedicalSensorChannelInfo { 25 public: 26 MedicalSensorChannelInfo(); 27 virtual ~MedicalSensorChannelInfo() = default; 28 int32_t GetUid() const; 29 void SetUid(int32_t uid); 30 std::string GetPackageName() const; 31 void SetPackageName(const std::string &packageName); 32 uint32_t GetSensorId() const; 33 void SetSensorId(uint32_t sensorId); 34 int64_t GetSamplingPeriodNs() const; 35 void SetSamplingPeriodNs(int64_t samplingPeriodNs); 36 int32_t GetFifoCount() const; 37 void SetFifoCount(int32_t fifoCount); 38 std::vector<int32_t> GetCmdType() const; 39 void SetCmdType(const std::vector<int32_t> &cmdType); 40 41 private: 42 int32_t uid_; 43 std::string packageName_; 44 uint32_t sensorId_; 45 int64_t samplingPeriodNs_; 46 uint32_t fifoCount_; 47 std::vector<int32_t> cmdType_; 48 }; 49 } // namespace Sensors 50 } // namespace OHOS 51 #endif // SENSOR_CHANNEL_INFO_H 52