Home
last modified time | relevance | path

Searched refs:sensors (Results 1 - 21 of 21) sorted by relevance

/base/sensors/sensor/frameworks/native/src/
H A Dnative_sensor.cpp31 Sensor_Result OH_Sensor_GetInfos(Sensor_Info **sensors, uint32_t *count) in OH_Sensor_GetInfos() argument
44 if (sensors == nullptr) { in OH_Sensor_GetInfos()
54 if (sensors[i] == nullptr) { in OH_Sensor_GetInfos()
58 errno_t result = strcpy_s(sensors[i]->sensorName, NAME_MAX_LEN, sensorInfo[i].sensorName); in OH_Sensor_GetInfos()
60 result = strcpy_s(sensors[i]->vendorName, NAME_MAX_LEN, sensorInfo[i].vendorName); in OH_Sensor_GetInfos()
62 result = strcpy_s(sensors[i]->firmwareVersion, VERSION_MAX_LEN, sensorInfo[i].firmwareVersion); in OH_Sensor_GetInfos()
64 result = strcpy_s(sensors[i]->hardwareVersion, VERSION_MAX_LEN, sensorInfo[i].hardwareVersion); in OH_Sensor_GetInfos()
66 sensors[i]->sensorTypeId = sensorInfo[i].sensorTypeId; in OH_Sensor_GetInfos()
67 sensors[i]->sensorId = sensorInfo[i].sensorId; in OH_Sensor_GetInfos()
68 sensors[ in OH_Sensor_GetInfos()
79 auto sensors = new Sensor_Info *[count]; OH_Sensor_CreateInfos() local
86 OH_Sensor_DestroyInfos(Sensor_Info **sensors, uint32_t count) OH_Sensor_DestroyInfos() argument
[all...]
H A Dsensor_service_proxy.cpp93 std::vector<Sensor> sensors; in GetSensorList() local
96 return sensors; in GetSensorList()
101 return sensors; in GetSensorList()
111 return sensors; in GetSensorList()
116 return sensors; in GetSensorList()
126 sensors.push_back(*tmpSensor); in GetSensorList()
128 return sensors; in GetSensorList()
/base/sensors/sensor/test/unittest/interfaces/kits/
H A Dsensor_native_test.cpp61 Sensor_Info **sensors = OH_Sensor_CreateInfos(count); in SetUpTestCase() local
62 ASSERT_NE(sensors, nullptr); in SetUpTestCase()
63 ret = OH_Sensor_GetInfos(sensors, &count); in SetUpTestCase()
67 ret = OH_SensorInfo_GetType(sensors[i], &sensorType); in SetUpTestCase()
78 ret = OH_Sensor_DestroyInfos(sensors, count); in SetUpTestCase()
141 Sensor_Info **sensors = OH_Sensor_CreateInfos(count); in HWTEST_F() local
142 ASSERT_NE(sensors, nullptr); in HWTEST_F()
143 ret = OH_Sensor_GetInfos(sensors, &count); in HWTEST_F()
148 ret = OH_SensorInfo_GetName(sensors[i], sensorName, &length); in HWTEST_F()
152 ret = OH_SensorInfo_GetVendorName(sensors[ in HWTEST_F()
191 auto sensors = new Sensor_Info *[count]; HWTEST_F() local
211 Sensor_Info **sensors = OH_Sensor_CreateInfos(count); HWTEST_F() local
246 Sensor_Info **sensors = OH_Sensor_CreateInfos(count); HWTEST_F() local
270 Sensor_Info **sensors = OH_Sensor_CreateInfos(count); HWTEST_F() local
305 Sensor_Info **sensors = OH_Sensor_CreateInfos(count); HWTEST_F() local
327 auto sensors = new Sensor_Info *[count]; HWTEST_F() local
[all...]
/base/sensors/medical_sensor/services/medical_sensor/include/
H A Dmedical_sensor_dump.h36 bool DumpSensorList(int32_t fd, const std::vector<MedicalSensor> &sensors, const std::vector<std::u16string> &args);
38 bool DumpOpeningSensor(int32_t fd, const std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo,
42 std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo);
/base/sensors/sensor/services/include/
H A Dsensor_dump.h35 void ParseCommand(int32_t fd, const std::vector<std::string> &args, const std::vector<Sensor> &sensors,
38 bool DumpSensorList(int32_t fd, const std::vector<Sensor> &sensors);
40 bool DumpOpeningSensor(int32_t fd, const std::vector<Sensor> &sensors, ClientInfo &clientInfo);
/base/powermgr/thermal_manager/services/native/include/thermal_policy/
H A Dthermal_srv_config_parser.h54 std::vector<std::string>& sensors, const uint32_t sensorIdx, SensorClusterPtr& sc);
56 std::vector<std::string>& sensors, const uint32_t sensorIdx);
61 std::vector<std::string> &sensors, FanFaultInfoMap &fanFaultInfoMap);
/base/sensors/sensor/frameworks/cj/src/
H A Dcj_sensor_ffi.cpp109 int32_t FfiSensorGetAllSensors(CSensorArray *sensors) in FfiSensorGetAllSensors() argument
111 if (sensors == nullptr) { in FfiSensorGetAllSensors()
112 SEN_HILOGE("Invalid parameter, sensors is nullptr!"); in FfiSensorGetAllSensors()
116 return CJ_SENSOR_IMPL->GetAllSensorList(*sensors); in FfiSensorGetAllSensors()
/base/sensors/medical_sensor/services/medical_sensor/src/
H A Dmedical_dump.cpp62 dprintf(fd, " -o: dump the opening sensors\n"); in DumpHelp()
67 const std::vector<MedicalSensor> &sensors, const std::vector<std::u16string> &args) in DumpSensorList()
74 dprintf(fd, "Total sensor:%d, MedicalSensor list:\n", int32_t { sensors.size() }); in DumpSensorList()
75 for (const auto &sensor : sensors) { in DumpSensorList()
113 bool MedicalSensorDump::DumpOpeningSensor(int32_t fd, const std::vector<MedicalSensor> &sensors, in DumpOpeningSensor() argument
121 dprintf(fd, "Opening sensors:\n"); in DumpOpeningSensor()
122 for (const auto &sensor : sensors) { in DumpOpeningSensor()
196 std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo) in Dump()
207 bool listRet = DumpSensorList(fd, sensors, args); in Dump()
209 bool openRet = DumpOpeningSensor(fd, sensors, clientInf in Dump()
66 DumpSensorList(int32_t fd, const std::vector<MedicalSensor> &sensors, const std::vector<std::u16string> &args) DumpSensorList() argument
195 Dump(int32_t fd, const std::vector<std::u16string> &args, std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo) Dump() argument
[all...]
H A Dmedical_service_stub.cpp149 std::vector<MedicalSensor> sensors(GetSensorList()); in GetAllSensorsInner()
150 int32_t sensorCount = int32_t { sensors.size() }; in GetAllSensorsInner()
154 bool flag = sensors[i].Marshalling(reply); in GetAllSensorsInner()
H A Dclient_info.cpp475 std::vector<MedicalSensor> sensors; in StoreEvent() local
476 int32_t ret = sensorHdiConnection->GetSensorList(sensors); in StoreEvent()
486 for (size_t i = 0; i < sensors.size(); i++) { in StoreEvent()
487 if ((int32_t)(sensors[i].GetSensorId()) == storedEvent.sensorTypeId) { in StoreEvent()
488 HiLog::Debug(LABEL, "%{public}s sensorFlags : %{public}u", __func__, sensors[i].GetFlags()); in StoreEvent()
/base/powermgr/thermal_manager/services/native/src/thermal_policy/
H A Dthermal_srv_config_parser.cpp364 std::vector<std::string> sensors; in ParseSensorInfo() local
367 StringOperation::SplitString(reinterpret_cast<char*>(xmlSensor), sensors, ","); in ParseSensorInfo() local
368 if (sensors.empty()) { in ParseSensorInfo()
372 for (uint32_t i = 0; i < sensors.size(); i++) { in ParseSensorInfo()
373 std::string sensorType = sensors.at(i); in ParseSensorInfo()
375 if (!ParseSensorLevelInfo(cur, levelItems, sensors, i, sc)) { in ParseSensorInfo()
395 std::vector<std::string>& sensors, const uint32_t sensorIdx, SensorClusterPtr& sc) in ParseSensorLevelInfo()
402 if (!ParseLevelThreshold(subNode, levelItem, sensors, sensorIdx)) { in ParseSensorLevelInfo()
412 if (sensors.size() != rates.size()) { in ParseSensorLevelInfo()
414 sensors in ParseSensorLevelInfo()
394 ParseSensorLevelInfo(const xmlNodePtr& cur, std::vector<LevelItem>& levelItems, std::vector<std::string>& sensors, const uint32_t sensorIdx, SensorClusterPtr& sc) ParseSensorLevelInfo() argument
426 ParseLevelThreshold(const xmlNodePtr& subNode, LevelItem& levelItem, std::vector<std::string>& sensors, const uint32_t sensorIdx) ParseLevelThreshold() argument
710 std::vector<std::string> sensors; ParseFanNode() local
726 ParseFanFaultInfo(const xmlNodePtr& node, std::vector<std::string> &sensors, FanFaultInfoMap &fanFaultInfoMap) ParseFanFaultInfo() argument
[all...]
/base/sensors/sensor/services/src/
H A Dsensor_dump.cpp139 void SensorDump::ParseCommand(int32_t fd, const std::vector<std::string> &args, const std::vector<Sensor> &sensors, in ParseCommand() argument
177 sensors_ = sensors; in ParseCommand()
194 dprintf(fd, " -o, --open: dump the opening sensors\n"); in DumpHelp()
200 bool SensorDump::DumpSensorList(int32_t fd, const std::vector<Sensor> &sensors) in DumpSensorList() argument
203 dprintf(fd, "Total sensor:%d, Sensor list:\n", int32_t { sensors.size() }); in DumpSensorList()
204 for (const auto &sensor : sensors) { in DumpSensorList()
239 bool SensorDump::DumpOpeningSensor(int32_t fd, const std::vector<Sensor> &sensors, ClientInfo &clientInfo) in DumpOpeningSensor() argument
242 dprintf(fd, "Opening sensors:\n"); in DumpOpeningSensor()
243 for (const auto &sensor : sensors) { in DumpOpeningSensor()
H A Dsensor_service_stub.cpp180 std::vector<Sensor> sensors = GetSensorList(); in GetAllSensorsInner() local
181 uint32_t sensorCount = static_cast<uint32_t>(sensors.size()); in GetAllSensorsInner()
188 if (!sensors[i].Marshalling(reply)) { in GetAllSensorsInner()
H A Dclient_info.cpp463 std::vector<Sensor> sensors; in StoreEvent() local
470 int32_t ret = sensorHdiConnection->GetSensorList(sensors); in StoreEvent()
481 for (size_t i = 0; i < sensors.size(); i++) { in StoreEvent()
482 if (sensors[i].GetSensorId() == storedEvent.sensorTypeId) { in StoreEvent()
/base/sensors/medical_sensor/frameworks/native/medical_sensor/src/
H A Dmedical_service_proxy.cpp181 std::vector<MedicalSensor> sensors; in GetSensorList() local
184 return sensors; in GetSensorList()
190 return sensors; in GetSensorList()
204 sensors.push_back(*tmpSensor); in GetSensorList()
206 return sensors; in GetSensorList()
/base/powermgr/thermal_manager/test/unittest/src/
H A Dthermal_config_file_parser.cpp358 std::vector<std::string> sensors; in ParseSensorInfo() local
361 StringOperation::SplitString(reinterpret_cast<char*>(xmlSensor), sensors, ","); in ParseSensorInfo() local
362 for (uint32_t i = 0; i < sensors.size(); i++) { in ParseSensorInfo()
363 std::string sensorType = sensors.at(i); in ParseSensorInfo()
365 ParseSensorSubnodeInfo(cur, vItem, sensors, i, sc); in ParseSensorInfo()
427 std::vector<std::string>& sensors, const uint32_t i, std::shared_ptr<ThermalConfigSensorCluster>& sc) in ParseSensorSubnodeInfo()
446 if (sensors.size() > thresholds.size() || sensors.size() > thresholdClrs.size()) { in ParseSensorSubnodeInfo()
463 if (sensors.size() > rates.size()) { in ParseSensorSubnodeInfo()
426 ParseSensorSubnodeInfo(const xmlNode* cur, std::vector<LevelItem>& vItem, std::vector<std::string>& sensors, const uint32_t i, std::shared_ptr<ThermalConfigSensorCluster>& sc) ParseSensorSubnodeInfo() argument
/base/sensors/sensor/frameworks/cj/include/
H A Dcj_sensor_ffi.h97 SENSOR_FFI_EXPORT int32_t FfiSensorGetAllSensors(CSensorArray *sensors);
/base/sensors/sensor/services/hdi_connection/interface/include/
H A Dsensor_hdi_connection.h50 bool FindAllInSensorSet(const std::unordered_set<int32_t> &sensors);
/base/powermgr/thermal_manager/test/unittest/include/
H A Dthermal_config_file_parser.h65 void ParseSensorSubnodeInfo(const xmlNode* cur, std::vector<LevelItem>& vItem, std::vector<std::string>& sensors,
/base/sensors/sensor/interfaces/kits/c/
H A Doh_sensor_type.h205 * @param sensors - Double pointer to the array of {@link Sensor_Info} instances.
211 int32_t OH_Sensor_DestroyInfos(Sensor_Info **sensors, uint32_t count);
/base/sensors/sensor/services/hdi_connection/interface/src/
H A Dsensor_hdi_connection.cpp70 SEN_HILOGD("SensorList not contain all mock sensors, connect mock sensors compatible connection"); in ConnectHdi()
73 SEN_HILOGE("Connect mock sensors compatible connection failed, ret:%{public}d", ret); in ConnectHdi()
114 bool SensorHdiConnection::FindAllInSensorSet(const std::unordered_set<int32_t> &sensors) in FindAllInSensorSet() argument
118 for (const auto &sensorId : sensors) { in FindAllInSensorSet()

Completed in 15 milliseconds