/base/sensors/sensor_lite/frameworks/src/ |
H A D | sensor_agent_client.c | 23 HILOG_ERROR(HILOG_MODULE_APP, "%s get sensor service failed", __func__);
in GetServiceProxy() 26 SensorFeatureApi *sensor = NULL;
in GetServiceProxy() local 27 int32_t result = iUnknown->QueryInterface(iUnknown, DEFAULT_VERSION, (void **)&sensor);
in GetServiceProxy() 28 if ((result != 0) || (sensor == NULL)) {
in GetServiceProxy() 32 return sensor;
in GetServiceProxy() 41 SensorFeatureApi *sensor = (SensorFeatureApi *)proxy;
in GetAllSensorsByProxy() local 42 return sensor->GetAllSensors(sensorInfo, count);
in GetAllSensorsByProxy() 51 SensorFeatureApi *sensor = (SensorFeatureApi *)proxy;
in ActivateSensorByProxy() local 52 return sensor->ActivateSensor(sensorId);
in ActivateSensorByProxy() 61 SensorFeatureApi *sensor in DeactivateSensorByProxy() local 72 SensorFeatureApi *sensor = (SensorFeatureApi *)proxy; SetBatchByProxy() local 82 SensorFeatureApi *sensor = (SensorFeatureApi *)proxy; SubscribeSensorByProxy() local 92 SensorFeatureApi *sensor = (SensorFeatureApi *)proxy; UnsubscribeSensorByProxy() local 102 SensorFeatureApi *sensor = (SensorFeatureApi *)proxy; SetModeByProxy() local 112 SensorFeatureApi *sensor = (SensorFeatureApi *)proxy; SetOptionByProxy() local [all...] |
/base/sensors/sensor/services/hdi_connection/adapter/src/ |
H A D | compatible_connection.cpp | 42 SEN_HILOGE("Get sensor list failed");
in GetSensorList() 57 Sensor sensor;
in GetSensorList() local 58 sensor.SetSensorId(sensorId);
in GetSensorList() 59 sensor.SetSensorTypeId(sensorId);
in GetSensorList() 60 sensor.SetFirmwareVersion(firmwareVersion);
in GetSensorList() 61 sensor.SetHardwareVersion(hardwareVersion);
in GetSensorList() 62 sensor.SetMaxRange(maxRange);
in GetSensorList() 63 sensor.SetSensorName(sensorName);
in GetSensorList() 64 sensor.SetVendorName(vendorName);
in GetSensorList() 65 sensor in GetSensorList() [all...] |
H A D | hdi_connection.cpp | 89 SEN_HILOGE("Get sensor list failed");
in GetSensorList() 98 Sensor sensor;
in GetSensorList() local 99 sensor.SetSensorId(sensorInfos[i].sensorId);
in GetSensorList() 100 sensor.SetSensorTypeId(sensorInfos[i].sensorId);
in GetSensorList() 101 sensor.SetFirmwareVersion(sensorInfos[i].firmwareVersion);
in GetSensorList() 102 sensor.SetHardwareVersion(sensorInfos[i].hardwareVersion);
in GetSensorList() 103 sensor.SetMaxRange(sensorInfos[i].maxRange);
in GetSensorList() 104 sensor.SetSensorName(sensorInfos[i].sensorName);
in GetSensorList() 105 sensor.SetVendorName(sensorInfos[i].vendorName);
in GetSensorList() 106 sensor in GetSensorList() [all...] |
/base/powermgr/thermal_manager/test/common/src/ |
H A D | thermal_test.cpp | 74 std::map<std::string, int32_t> sensor; in InitNode() local 75 sensor["battery"] = 0; in InitNode() 76 sensor["charger"] = 0; in InitNode() 77 sensor["pa"] = 0; in InitNode() 78 sensor["ap"] = 0; in InitNode() 79 sensor["ambient"] = 0; in InitNode() 80 sensor["cpu"] = 0; in InitNode() 81 sensor["soc"] = 0; in InitNode() 82 sensor["shell"] = 0; in InitNode() 83 for (auto iter : sensor) { in InitNode() [all...] |
/base/sensors/sensor/frameworks/native/src/ |
H A D | native_sensor.cpp | 101 int32_t OH_SensorInfo_GetName(Sensor_Info* sensor, char *sensorName, uint32_t *length) in OH_SensorInfo_GetName() argument 103 if (sensor == nullptr || sensorName == nullptr || length == nullptr) { in OH_SensorInfo_GetName() 107 uint32_t nameLen = strlen(sensor->sensorName); in OH_SensorInfo_GetName() 112 errno_t result = strcpy_s(sensorName, *length, sensor->sensorName); in OH_SensorInfo_GetName() 120 int32_t OH_SensorInfo_GetVendorName(Sensor_Info* sensor, char *vendorName, uint32_t *length) in OH_SensorInfo_GetVendorName() argument 122 if (sensor == nullptr || vendorName == nullptr || length == nullptr) { in OH_SensorInfo_GetVendorName() 126 uint32_t nameLen = strlen(sensor->vendorName); in OH_SensorInfo_GetVendorName() 131 errno_t result = strcpy_s(vendorName, *length, sensor->vendorName); in OH_SensorInfo_GetVendorName() 139 int32_t OH_SensorInfo_GetType(Sensor_Info* sensor, Sensor_Type *sensorType) in OH_SensorInfo_GetType() argument 141 if (sensor in OH_SensorInfo_GetType() 149 OH_SensorInfo_GetResolution(Sensor_Info* sensor, float *resolution) OH_SensorInfo_GetResolution() argument 159 OH_SensorInfo_GetMinSamplingInterval(Sensor_Info* sensor, int64_t *minSamplePeriod) OH_SensorInfo_GetMinSamplingInterval() argument 169 OH_SensorInfo_GetMaxSamplingInterval(Sensor_Info* sensor, int64_t *maxSamplePeriod) OH_SensorInfo_GetMaxSamplingInterval() argument [all...] |
H A D | sensor_service_client.cpp | 123 for (auto &sensor : sensorList_) { in IsValid() 124 if (sensor.GetSensorId() == sensorId) { in IsValid() 396 SEN_HILOGE("Register sensor active info callback failed, ret:%{public}d", ret); in Register()
|
H A D | sensor_service_proxy.cpp | 122 Sensor sensor; in GetSensorList() local 124 auto tmpSensor = sensor.Unmarshalling(reply); in GetSensorList()
|
/base/sensors/sensor/interfaces/kits/c/ |
H A D | oh_sensor_type.h | 20 * @brief Provides APIs to define common sensor attributes. 28 * @brief Declares the common sensor attributes. 44 * @brief Enumerates the sensor types. 50 * Acceleration sensor. 55 * Gyroscope sensor. 60 * Ambient light sensor. 65 * Magnetic field sensor. 70 * Barometer sensor. 75 * Hall effect sensor. 80 * Proximity sensor [all...] |
/base/sensors/medical_sensor/services/medical_sensor/hdi_connection/adapter/src/ |
H A D | compatible_connection.cpp | 46 HiLog::Error(LABEL, "%{public}s get sensor list failed", __func__);
in GetSensorList() 54 MedicalSensor sensor;
in GetSensorList() local 55 sensor.SetSensorId(sensorId);
in GetSensorList() 56 sensor.SetMaxRange(maxRange);
in GetSensorList() 57 sensor.SetName(sensorName.c_str());
in GetSensorList() 58 sensor.SetVendor(vendorName.c_str());
in GetSensorList() 59 sensorList.push_back(sensor);
in GetSensorList() 68 HiLog::Error(LABEL, "%{public}s enable sensor failed, sensorId: %{public}d", __func__, sensorId);
in EnableSensor() 78 HiLog::Error(LABEL, "%{public}s disable sensor failed, sensorId: %{public}d", __func__, sensorId);
in DisableSensor()
|
H A D | hdi_connection.cpp | 82 HiLog::Error(LABEL, "%{public}s get sensor list failed", __func__);
in GetSensorList() 90 MedicalSensor sensor;
in GetSensorList() local 91 sensor.SetSensorId(sensorId);
in GetSensorList() 92 sensor.SetMaxRange(maxRange);
in GetSensorList() 93 sensor.SetName(sensorName.c_str());
in GetSensorList() 94 sensor.SetVendor(vendorName.c_str());
in GetSensorList() 95 sensorList.push_back(sensor);
in GetSensorList() 314 HiLog::Error(LABEL, "%{public}s get sensor list fail", __func__);
in reconnect() 323 HiLog::Error(LABEL, "%{public}s sensorTypeId: %{public}d set batch fail or not need enable sensor",
in reconnect() 329 HiLog::Error(LABEL, "%{public}s enable sensor fai in reconnect() [all...] |
/base/sensors/medical_sensor/services/medical_sensor/src/ |
H A D | medical_dump.cpp | 60 dprintf(fd, " -l: dump the sensor list\n"); in DumpHelp() 61 dprintf(fd, " -c: dump the sensor data channel info\n"); in DumpHelp() 63 dprintf(fd, " -d: dump the last 10 packages sensor data\n"); in DumpHelp() 74 dprintf(fd, "Total sensor:%d, MedicalSensor list:\n", int32_t { sensors.size() }); in DumpSensorList() 75 for (const auto &sensor : sensors) { in DumpSensorList() 76 auto sensorId = sensor.GetSensorId(); in DumpSensorList() 80 sensorId, sensorMap_[sensorId].c_str(), sensor.GetName().c_str(), sensor.GetVendor().c_str(), in DumpSensorList() 81 sensor.GetMaxRange(), sensor in DumpSensorList() [all...] |
H A D | medical_manager.cpp | 47 auto sensor = sensorMap_.find(sensorId); in GetSensorFlag() local 48 if (sensor != sensorMap_.end()) { in GetSensorFlag() 49 flag = sensor->second.GetFlags(); in GetSensorFlag() 66 HiLog::Debug(LABEL, "%{public}s no need to reset sensor params", __func__); in SetBestSensorParams() 160 HiLog::Warn(LABEL, "%{public}s Only current client using this sensor", __func__); in IsOtherClientUsingSensor() 167 HiLog::Debug(LABEL, "%{public}s other client is using this sensor", __func__); in IsOtherClientUsingSensor()
|
H A D | medical_data_processer.cpp | 206 auto sensor = sensorMap_.find(sensorId); in ReportNotContinuousData() local 207 sensor->second.SetFlags(event.mode); in ReportNotContinuousData() 208 if (sensor == sensorMap_.end()) { in ReportNotContinuousData() 212 if (((SENSOR_ON_CHANGE & sensor->second.GetFlags()) == SENSOR_ON_CHANGE) || in ReportNotContinuousData() 213 ((SENSOR_ONE_SHOT & sensor->second.GetFlags()) == SENSOR_ONE_SHOT)) { in ReportNotContinuousData()
|
/base/sensors/sensor/services/src/ |
H A D | sensor_dump.cpp | 192 dprintf(fd, " -l, --list: dump the sensor list\n"); in DumpHelp() 193 dprintf(fd, " -c, --channel: dump the sensor data channel info\n"); in DumpHelp() 196 dprintf(fd, " -d, --data: dump the last 10 packages sensor data\n"); in DumpHelp() 203 dprintf(fd, "Total sensor:%d, Sensor list:\n", int32_t { sensors.size() }); in DumpSensorList() 204 for (const auto &sensor : sensors) { in DumpSensorList() 205 auto sensorId = sensor.GetSensorId(); in DumpSensorList() 212 sensorId, sensorMap_[sensorId].c_str(), sensor.GetSensorName().c_str(), sensor.GetVendorName().c_str(), in DumpSensorList() 213 sensor.GetMaxRange(), sensor in DumpSensorList() [all...] |
H A D | sensor_data_processer.cpp | 188 auto sensor = sensorMap_.find(sensorId); in ReportNotContinuousData() local 189 if (sensor == sensorMap_.end()) { in ReportNotContinuousData() 193 sensor->second.SetFlags(data.mode); in ReportNotContinuousData() 194 if (((SENSOR_ON_CHANGE & sensor->second.GetFlags()) == SENSOR_ON_CHANGE) || in ReportNotContinuousData() 195 ((SENSOR_ONE_SHOT & sensor->second.GetFlags()) == SENSOR_ONE_SHOT)) { in ReportNotContinuousData()
|
/base/sensors/medical_sensor/utils/src/ |
H A D | medical.cpp | 204 auto sensor = std::make_unique<MedicalSensor>(); in Unmarshalling() local 205 if (sensor == nullptr) { in Unmarshalling() 206 HiLog::Error(LABEL, "%{public}s sensor cannot be null", __func__); in Unmarshalling() 210 if (!sensor->ReadFromParcel(parcel)) { in Unmarshalling() 214 return sensor; in Unmarshalling()
|
/base/sensors/sensor/utils/common/src/ |
H A D | sensor.cpp | 16 #include "sensor.h" 232 auto sensor = std::make_unique<Sensor>(); in Unmarshalling() local 233 if (!sensor->ReadFromParcel(parcel)) { in Unmarshalling() 237 return sensor; in Unmarshalling()
|
/base/sensors/medical_sensor/frameworks/native/medical_sensor/src/ |
H A D | medical_service_client.cpp | 88 for (auto &sensor : afeList_) { in IsValidSensorId() 89 HiLog::Debug(LABEL, "%{public}s sensor.GetSensorId() = %{public}u", __func__, sensor.GetSensorId()); in IsValidSensorId() 90 if (sensor.GetSensorId() == sensorId) { in IsValidSensorId()
|
H A D | medical_service_proxy.cpp | 198 MedicalSensor sensor; in GetSensorList() local 200 auto tmpSensor = sensor.Unmarshalling(reply); in GetSensorList()
|
/base/powermgr/thermal_manager/test/systemtest/src/ |
H A D | thermal_mgr_system_test.cpp | 101 std::map<std::string, int32_t> sensor; in InitNode() local 102 sensor["battery"] = 0; in InitNode() 103 sensor["charger"] = 0; in InitNode() 104 sensor["pa"] = 0; in InitNode() 105 sensor["ap"] = 0; in InitNode() 106 sensor["ambient"] = 0; in InitNode() 107 sensor["cpu"] = 0; in InitNode() 108 sensor["soc"] = 0; in InitNode() 109 sensor["shell"] = 0; in InitNode() 110 for (auto iter : sensor) { in InitNode() [all...] |
/base/powermgr/thermal_manager/test/unittest/include/ |
H A D | thermal_config_file_parser.h | 45 std::vector<LevelItem> GetLevelItems(const std::string& name, const std::string& sensor);
|
/base/sensors/sensor/services/hdi_connection/interface/src/ |
H A D | sensor_hdi_connection.cpp | 91 SEN_HILOGE("Get sensor list failed"); in ConnectHdiService() 94 for (const auto &sensor : sensorList_) { in ConnectHdiService() 95 sensorSet_.insert(sensor.GetSensorId()); in ConnectHdiService() 247 SEN_HILOGE("Enable sensor failed in compatible, sensorId:%{public}d", sensorId); in EnableSensor() 259 SEN_HILOGI("Enable sensor failed, sensorId:%{public}d", sensorId); in EnableSensor() 279 SEN_HILOGE("Disable sensor failed in compatible, sensorId:%{public}d", sensorId); in DisableSensor() 291 SEN_HILOGI("Disable sensor failed, sensorId:%{public}d", sensorId); in DisableSensor()
|
/base/powermgr/thermal_manager/test/unittest/src/ |
H A D | thermal_config_file_parser.cpp | 79 std::vector<LevelItem> ThermalConfigFileParser::GetLevelItems(const std::string& name, const std::string& sensor) in GetLevelItems() argument 83 auto levelInfo = sensorInfo->second.find(sensor); in GetLevelItems() 359 xmlChar* xmlSensor = xmlGetProp(cur, BAD_CAST"sensor"); in ParseSensorInfo() 415 THERMAL_HILOGI(LABEL_TEST, "The auxiliary sensor does not match the threshold range"); in ParseAuxSensorSubnodeInfoTrigerRange() 447 THERMAL_HILOGI(LABEL_TEST, "The sensor does not match the threshold range"); in ParseSensorSubnodeInfo()
|