Lines Matching refs:sensor_info

108     const auto &sensor_info = sensor_info_map_.at(sensor_name.data());  in dumpTraces()  local
109 if (!sensor_info.virtual_sensor_info) { in dumpTraces()
113 if (sensor_info.virtual_sensor_info->vt_estimator) { in dumpTraces()
114 sensor_info.virtual_sensor_info->vt_estimator->DumpTraces(); in dumpTraces()
118 for (const auto &linked_sensor : sensor_info.virtual_sensor_info->linked_sensors) { in dumpTraces()
380 for (auto &[sensor_name, sensor_info] : sensor_info_map_) { in checkUpdateSensorForEmul()
381 if (sensor_info.virtual_sensor_info == nullptr || !sensor_info.is_watch) { in checkUpdateSensorForEmul()
385 const auto &linked_sensors = sensor_info.virtual_sensor_info->linked_sensors; in checkUpdateSensorForEmul()
436 const auto &sensor_info = sensor_info_map_.at(target_sensor.data()); in emulSeverity() local
444 const auto temp = sensor_info.hot_thresholds[severity] / sensor_info.multiplier; in emulSeverity()
523 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in readTemperature() local
524 out->type = sensor_info.type; in readTemperature()
526 out->value = temp * sensor_info.multiplier; in readTemperature()
531 if (sensor_info.is_watch) { in readTemperature()
539 status = getSeverityFromThresholds(sensor_info.hot_thresholds, sensor_info.cold_thresholds, in readTemperature()
540 sensor_info.hot_hysteresis, sensor_info.cold_hysteresis, in readTemperature()
559 if (sensor_info.is_watch) { in readTemperature()
583 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in readTemperatureThreshold() local
585 out->type = sensor_info.type; in readTemperatureThreshold()
588 std::vector(sensor_info.hot_thresholds.begin(), sensor_info.hot_thresholds.end()); in readTemperatureThreshold()
590 std::vector(sensor_info.cold_thresholds.begin(), sensor_info.cold_thresholds.end()); in readTemperatureThreshold()
818 void ThermalHelperImpl::setMinTimeout(SensorInfo *sensor_info) { in setMinTimeout() argument
819 sensor_info->polling_delay = kMinPollIntervalMs; in setMinTimeout()
820 sensor_info->passive_delay = kMinPollIntervalMs; in setMinTimeout()
826 for (auto &sensor_info : sensor_info_map_) { in initializeTrip() local
827 if (!sensor_info.second.is_watch || (sensor_info.second.virtual_sensor_info != nullptr)) { in initializeTrip()
832 std::string_view sensor_name = sensor_info.first; in initializeTrip()
856 if (!std::isnan(sensor_info.second.hot_thresholds[i]) && in initializeTrip()
857 !std::isnan(sensor_info.second.hot_hysteresis[i])) { in initializeTrip()
860 sensor_info.second.hot_thresholds[i] / sensor_info.second.multiplier)); in initializeTrip()
870 threshold = std::to_string(std::lround(sensor_info.second.hot_hysteresis[i] / in initializeTrip()
871 sensor_info.second.multiplier)); in initializeTrip()
887 monitored_sensors->insert(sensor_info.first); in initializeTrip()
891 LOG(INFO) << "config Sensor: " << sensor_info.first in initializeTrip()
893 setMinTimeout(&sensor_info.second); in initializeTrip()
1010 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in runVirtualTempEstimator() local
1011 if (sensor_info.virtual_sensor_info == nullptr || in runVirtualTempEstimator()
1012 sensor_info.virtual_sensor_info->vt_estimator == nullptr) { in runVirtualTempEstimator()
1022 model_inputs.reserve(sensor_info.virtual_sensor_info->linked_sensors.size()); in runVirtualTempEstimator()
1024 for (size_t i = 0; i < sensor_info.virtual_sensor_info->linked_sensors.size(); i++) { in runVirtualTempEstimator()
1025 std::string linked_sensor = sensor_info.virtual_sensor_info->linked_sensors[i]; in runVirtualTempEstimator()
1037 sensor_info.virtual_sensor_info->vt_estimator->Estimate(model_inputs, &model_outputs); in runVirtualTempEstimator()
1044 std::string_view backup_sensor = sensor_info.virtual_sensor_info->backup_sensor; in runVirtualTempEstimator()
1077 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in dumpVtEstimatorStatus() local
1078 if (sensor_info.virtual_sensor_info == nullptr || in dumpVtEstimatorStatus()
1079 sensor_info.virtual_sensor_info->vt_estimator == nullptr) { in dumpVtEstimatorStatus()
1083 sensor_info.virtual_sensor_info->vt_estimator->DumpStatus(sensor_name, dump_buf); in dumpVtEstimatorStatus()
1092 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in getPredictionMaxWindowMs() local
1093 if (sensor_info.predictor_info == nullptr) { in getPredictionMaxWindowMs()
1098 std::string_view predict_sensor_name = sensor_info.predictor_info->sensor; in getPredictionMaxWindowMs()
1120 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in readPredictionAfterTimeMs() local
1121 if (sensor_info.predictor_info == nullptr) { in readPredictionAfterTimeMs()
1126 std::string_view predict_sensor_name = sensor_info.predictor_info->sensor; in readPredictionAfterTimeMs()
1163 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in readTemperaturePredictions() local
1164 if (sensor_info.predictor_info == nullptr) { in readTemperaturePredictions()
1169 std::string predict_sensor_name = sensor_info.predictor_info->sensor; in readTemperaturePredictions()
1197 const auto &sensor_info = sensor_info_map_.at(sensor_name.data()); in readThermalSensor() local
1215 (since_last_update < sensor_info.time_resolution) && in readThermalSensor()
1224 if (sensor_info.virtual_sensor_info == nullptr) { in readThermalSensor()
1232 const auto &linked_sensors_size = sensor_info.virtual_sensor_info->linked_sensors.size(); in readThermalSensor()
1237 if (!readDataByType(sensor_info.virtual_sensor_info->linked_sensors[i], in readThermalSensor()
1239 sensor_info.virtual_sensor_info->linked_sensors_type[i], in readThermalSensor()
1242 << sensor_info.virtual_sensor_info->linked_sensors[i]; in readThermalSensor()
1251 if ((sensor_info.virtual_sensor_info->formula == FormulaOption::USE_ML_MODEL) || in readThermalSensor()
1252 (sensor_info.virtual_sensor_info->formula == FormulaOption::USE_LINEAR_MODEL)) { in readThermalSensor()
1264 if (!readDataByType(sensor_info.virtual_sensor_info->coefficients[i], &coefficient, in readThermalSensor()
1265 sensor_info.virtual_sensor_info->coefficients_type[i], in readThermalSensor()
1268 << sensor_info.virtual_sensor_info->coefficients[i]; in readThermalSensor()
1275 switch (sensor_info.virtual_sensor_info->formula) { in readThermalSensor()
1301 *temp = (temp_val + sensor_info.virtual_sensor_info->offset); in readThermalSensor()
1305 if (!isnan(sensor_info.step_ratio) && !isnan(sensor_status.thermal_cached.temp) && in readThermalSensor()
1306 since_last_update < sensor_info.passive_delay * kTranTimeoutParam) { in readThermalSensor()
1307 *temp = (sensor_info.step_ratio * *temp + in readThermalSensor()
1308 (1 - sensor_info.step_ratio) * sensor_status.thermal_cached.temp); in readThermalSensor()
1319 auto real_temp = (*temp) * sensor_info.multiplier; in readThermalSensor()
1341 const SensorInfo &sensor_info = sensor_info_map_.at(name_status_pair.first); in thermalWatcherCallbackFunc() local
1345 if (!sensor_info.is_watch) { in thermalWatcherCallbackFunc()
1355 ? sensor_info.passive_delay in thermalWatcherCallbackFunc()
1356 : sensor_info.polling_delay; in thermalWatcherCallbackFunc()
1358 if (sensor_info.virtual_sensor_info != nullptr && in thermalWatcherCallbackFunc()
1359 !sensor_info.virtual_sensor_info->trigger_sensors.empty()) { in thermalWatcherCallbackFunc()
1360 for (size_t i = 0; i < sensor_info.virtual_sensor_info->trigger_sensors.size(); i++) { in thermalWatcherCallbackFunc()
1362 sensor_status_map_.at(sensor_info.virtual_sensor_info->trigger_sensors[i]); in thermalWatcherCallbackFunc()
1364 sleep_ms = sensor_info.passive_delay; in thermalWatcherCallbackFunc()
1376 if (sensor_info.virtual_sensor_info != nullptr) { in thermalWatcherCallbackFunc()
1377 for (size_t i = 0; i < sensor_info.virtual_sensor_info->trigger_sensors.size(); in thermalWatcherCallbackFunc()
1380 sensor_info.virtual_sensor_info->trigger_sensors[i]) != in thermalWatcherCallbackFunc()
1442 ? sensor_info.passive_delay in thermalWatcherCallbackFunc()
1443 : sensor_info.polling_delay; in thermalWatcherCallbackFunc()
1457 if (sensor_info.predictor_info != nullptr && in thermalWatcherCallbackFunc()
1458 sensor_info.predictor_info->support_pid_compensation) { in thermalWatcherCallbackFunc()
1467 temp, sensor_info, sensor_status.severity, time_elapsed_ms, in thermalWatcherCallbackFunc()
1473 name_status_pair.first, sensor_info, sensor_status.severity, in thermalWatcherCallbackFunc()