/base/sensors/sensor/utils/common/src/ |
H A D | active_info.cpp | 27 ActiveInfo::ActiveInfo(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in ActiveInfo() argument 28 :pid_(pid), sensorId_(sensorId), samplingPeriodNs_(samplingPeriodNs), maxReportDelayNs_(maxReportDelayNs) in ActiveInfo() 66 void ActiveInfo::SetMaxReportDelayNs(int64_t maxReportDelayNs) in SetMaxReportDelayNs() argument 68 maxReportDelayNs_ = maxReportDelayNs; in SetMaxReportDelayNs() 86 SEN_HILOGE("Write maxReportDelayNs failed"); in Marshalling() 97 int64_t maxReportDelayNs = -1; in Unmarshalling() local 99 parcel.ReadInt64(samplingPeriodNs) && parcel.ReadInt64(maxReportDelayNs))) { in Unmarshalling() 107 activeInfo->SetMaxReportDelayNs(maxReportDelayNs); in Unmarshalling()
|
H A D | sensor_basic_info.cpp | 38 void SensorBasicInfo::SetMaxReportDelayNs(int64_t maxReportDelayNs) in SetMaxReportDelayNs() argument 40 maxReportDelayNs_ = maxReportDelayNs; in SetMaxReportDelayNs()
|
/base/sensors/medical_sensor/services/medical_sensor/test/unittest/phone/ |
H A D | medical_proxy_test.cpp | 121 int64_t maxReportDelayNs = 0L; in HWTEST_F() local 122 auto ret = afeProxy_->EnableSensor(afeId_, samplingPeriodNs, maxReportDelayNs); in HWTEST_F() 127 maxReportDelayNs = 0L; in HWTEST_F() 128 ret = afeProxy_->EnableSensor(afeId_, samplingPeriodNs, maxReportDelayNs); in HWTEST_F() 132 maxReportDelayNs = 0L; in HWTEST_F() 133 ret = afeProxy_->EnableSensor(afeId_, samplingPeriodNs, maxReportDelayNs); in HWTEST_F() 136 maxReportDelayNs = 0L; in HWTEST_F() 137 ret = afeProxy_->EnableSensor(afeId_, samplingPeriodNs, maxReportDelayNs); in HWTEST_F() 141 maxReportDelayNs = 0L; in HWTEST_F() 142 ret = afeProxy_->EnableSensor(afeId_, samplingPeriodNs, maxReportDelayNs); in HWTEST_F() 156 const int64_t maxReportDelayNs = 0; HWTEST_F() local 172 const int64_t maxReportDelayNs = 0; HWTEST_F() local [all...] |
/base/sensors/medical_sensor/services/medical_sensor/src/ |
H A D | medical_manager.cpp | 54 bool MedicalSensorManager::SetBestSensorParams(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in SetBestSensorParams() argument 65 if ((samplingPeriodNs > bestSamplingPeriodNs) && (maxReportDelayNs > bestReportDelayNs)) { in SetBestSensorParams() 70 bestReportDelayNs = (maxReportDelayNs < bestReportDelayNs) ? maxReportDelayNs : bestReportDelayNs; in SetBestSensorParams() 100 int64_t samplingPeriodNs, int64_t maxReportDelayNs) in GetSensorInfo() 108 sensorInfo.SetMaxReportDelayNs(maxReportDelayNs); in GetSensorInfo() 125 int64_t curReportDelayNs = (maxReportDelayNs > supportDelay) ? supportDelay : maxReportDelayNs; in GetSensorInfo() 134 int64_t maxReportDelayNs) in SaveSubscriber() 136 MedicalSensorBasicInfo sensorInfo = GetSensorInfo(sensorId, samplingPeriodNs, maxReportDelayNs); in SaveSubscriber() 99 GetSensorInfo(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) GetSensorInfo() argument 133 SaveSubscriber(uint32_t sensorId, uint32_t pid, int64_t samplingPeriodNs, int64_t maxReportDelayNs) SaveSubscriber() argument [all...] |
H A D | medical_service.cpp | 218 ErrCode MedicalSensorService::SaveSubscriber(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in SaveSubscriber() argument 220 auto ret = sensorManager_.SaveSubscriber(sensorId, this->GetCallingPid(), samplingPeriodNs, maxReportDelayNs); in SaveSubscriber() 227 if (!sensorManager_.SetBestSensorParams(sensorId, samplingPeriodNs, maxReportDelayNs)) { in SaveSubscriber() 235 ErrCode MedicalSensorService::EnableSensor(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in EnableSensor() argument 240 ((samplingPeriodNs != 0L) && ((maxReportDelayNs / samplingPeriodNs) > MAX_EVENT_COUNT))) { in EnableSensor() 241 HiLog::Error(LABEL, "%{public}s sensorId is 0 or maxReportDelayNs exceeded the maximum value", __func__); in EnableSensor() 248 auto ret = SaveSubscriber(sensorId, samplingPeriodNs, maxReportDelayNs); in EnableSensor() 262 auto ret = SaveSubscriber(sensorId, samplingPeriodNs, maxReportDelayNs); in EnableSensor()
|
/base/sensors/sensor/services/src/ |
H A D | sensor_manager.cpp | 51 bool SensorManager::SetBestSensorParams(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in SetBestSensorParams() argument 61 if ((samplingPeriodNs > bestSamplingPeriodNs) && (maxReportDelayNs > bestReportDelayNs)) { in SetBestSensorParams() 66 bestReportDelayNs = (maxReportDelayNs < bestReportDelayNs) ? maxReportDelayNs : bestReportDelayNs; in SetBestSensorParams() 112 int64_t maxReportDelayNs) in SaveSubscriber() 114 SensorBasicInfo sensorInfo = GetSensorInfo(sensorId, samplingPeriodNs, maxReportDelayNs); in SaveSubscriber() 122 SensorBasicInfo SensorManager::GetSensorInfo(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in GetSensorInfo() argument 130 sensorInfo.SetMaxReportDelayNs(maxReportDelayNs); in GetSensorInfo() 143 int64_t curReportDelayNs = (maxReportDelayNs > supportDelay) ? supportDelay : maxReportDelayNs; in GetSensorInfo() 111 SaveSubscriber(int32_t sensorId, uint32_t pid, int64_t samplingPeriodNs, int64_t maxReportDelayNs) SaveSubscriber() argument [all...] |
H A D | sensor_power_policy.cpp | 118 int64_t maxReportDelayNs = sensorIt->second.GetMaxReportDelayNs(); in ResumeSensors() local 119 if (!Resume(pid, sensorId, samplingPeriodNs, maxReportDelayNs)) { in ResumeSensors() 137 int64_t maxReportDelayNs) in Resume() 141 ((samplingPeriodNs != 0L) && (maxReportDelayNs / samplingPeriodNs > MAX_EVENT_COUNT))) { in Resume() 142 SEN_HILOGE("sensorId is invalid or maxReportDelayNs exceed the maximum value"); in Resume() 147 auto ret = RestoreSensorInfo(pid, sensorId, samplingPeriodNs, maxReportDelayNs); in Resume() 154 auto ret = RestoreSensorInfo(pid, sensorId, samplingPeriodNs, maxReportDelayNs); in Resume() 171 int64_t maxReportDelayNs) in RestoreSensorInfo() 174 if (!sensorManager_.SaveSubscriber(sensorId, pid, samplingPeriodNs, maxReportDelayNs)) { in RestoreSensorInfo() 180 if (!sensorManager_.SetBestSensorParams(sensorId, samplingPeriodNs, maxReportDelayNs)) { in RestoreSensorInfo() 136 Resume(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) Resume() argument 170 RestoreSensorInfo(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) RestoreSensorInfo() argument [all...] |
H A D | sensor_service.cpp | 236 ErrCode SensorService::SaveSubscriber(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in SaveSubscriber() argument 238 if (!sensorManager_.SaveSubscriber(sensorId, GetCallingPid(), samplingPeriodNs, maxReportDelayNs)) { in SaveSubscriber() 266 bool SensorService::CheckParameter(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in CheckParameter() argument 269 ((samplingPeriodNs != 0L) && ((maxReportDelayNs / samplingPeriodNs) > MAX_EVENT_COUNT))) { in CheckParameter() 270 SEN_HILOGE("sensorId is invalid or maxReportDelayNs exceeded the maximum value"); in CheckParameter() 276 ErrCode SensorService::EnableSensor(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in EnableSensor() argument 279 if (!CheckParameter(sensorId, samplingPeriodNs, maxReportDelayNs)) { in EnableSensor() 280 SEN_HILOGE("sensorId, samplingPeriodNs or maxReportDelayNs is invalid"); in EnableSensor() 287 auto ret = SaveSubscriber(sensorId, samplingPeriodNs, maxReportDelayNs); in EnableSensor() 303 auto ret = SaveSubscriber(sensorId, samplingPeriodNs, maxReportDelayNs); in EnableSensor() [all...] |
/base/sensors/medical_sensor/services/medical_sensor/test/unittest/common/ |
H A D | client_info_test.cpp | 65 int64_t maxReportDelayNs = 0; in HWTEST_F() local 68 sensorInfo.SetMaxReportDelayNs(maxReportDelayNs); in HWTEST_F() 85 int64_t maxReportDelayNs = 0; in HWTEST_F() local 88 sensorInfo.SetMaxReportDelayNs(maxReportDelayNs); in HWTEST_F() 105 int64_t maxReportDelayNs = 0; in HWTEST_F() local 108 sensorInfo.SetMaxReportDelayNs(maxReportDelayNs); in HWTEST_F() 125 int64_t maxReportDelayNs = 0; in HWTEST_F() local 128 sensorInfo.SetMaxReportDelayNs(maxReportDelayNs); in HWTEST_F() 145 int64_t maxReportDelayNs = 0; in HWTEST_F() local 148 sensorInfo.SetMaxReportDelayNs(maxReportDelayNs); in HWTEST_F() 165 int64_t maxReportDelayNs = 0; HWTEST_F() local [all...] |
/base/sensors/medical_sensor/utils/src/ |
H A D | medical_basic_info.cpp | 39 void MedicalSensorBasicInfo::SetMaxReportDelayNs(int64_t maxReportDelayNs) in SetMaxReportDelayNs() argument 41 maxReportDelayNs_ = maxReportDelayNs; in SetMaxReportDelayNs()
|
/base/sensors/medical_sensor/services/medical_sensor/include/ |
H A D | medical_sensor_manager.h | 33 bool SetBestSensorParams(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs); 35 ErrCode SaveSubscriber(uint32_t sensorId, uint32_t pid, int64_t samplingPeriodNs, int64_t maxReportDelayNs); 37 MedicalSensorBasicInfo GetSensorInfo(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
|
H A D | medical_sensor_service.h | 54 ErrCode EnableSensor(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) override; 97 ErrCode SaveSubscriber(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
|
/base/sensors/sensor/services/include/ |
H A D | sensor_manager.h | 40 bool SetBestSensorParams(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs); 46 bool SaveSubscriber(int32_t sensorId, uint32_t pid, int64_t samplingPeriodNs, int64_t maxReportDelayNs); 47 SensorBasicInfo GetSensorInfo(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
|
H A D | sensor_power_policy.h | 48 bool Resume(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs); 49 ErrCode RestoreSensorInfo(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
|
H A D | sensor_service.h | 54 ErrCode EnableSensor(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) override; 73 bool CheckParameter(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs); 116 ErrCode SaveSubscriber(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
|
H A D | sensor_service_proxy.h | 32 ErrCode EnableSensor(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) override;
|
/base/sensors/sensor/utils/common/include/ |
H A D | active_info.h | 26 ActiveInfo(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs); 35 void SetMaxReportDelayNs(int64_t maxReportDelayNs);
|
H A D | sensor_basic_info.h | 30 void SetMaxReportDelayNs(int64_t maxReportDelayNs);
|
/base/sensors/medical_sensor/utils/include/ |
H A D | medical_sensor_basic_info.h | 36 void SetMaxReportDelayNs(int64_t maxReportDelayNs);
|
/base/sensors/medical_sensor/frameworks/native/medical_sensor/include/ |
H A D | i_medical_sensor_service.h | 38 int64_t maxReportDelayNs) = 0;
|
H A D | medical_sensor_service_proxy.h | 31 ErrCode EnableSensor(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) override;
|
/base/sensors/sensor/frameworks/native/include/ |
H A D | i_sensor_service.h | 38 int64_t maxReportDelayNs) = 0;
|
H A D | sensor_service_proxy.h | 32 ErrCode EnableSensor(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) override;
|
/base/sensors/sensor/services/hdi_connection/adapter/include/ |
H A D | hdi_connection.h | 49 void UpdateSensorBasicInfo(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
|
/base/sensors/medical_sensor/services/medical_sensor/hdi_connection/adapter/include/ |
H A D | hdi_connection.h | 64 void updateSensorBasicInfo(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
|