/ohos5.0/base/sensors/sensor/frameworks/native/src/ |
H A D | native_sensor.cpp | 141 if (sensor == nullptr || sensorType == nullptr) { in OH_SensorInfo_GetType() 145 *sensorType = static_cast<Sensor_Type>(sensor->sensorTypeId); in OH_SensorInfo_GetType() 187 int32_t sensorType = id->sensorType; in OH_Sensor_Subscribe() local 188 int32_t ret = SubscribeSensor(sensorType, sensorUser); in OH_Sensor_Subscribe() 210 int32_t sensorType = id->sensorType; in OH_Sensor_Unsubscribe() local 211 int32_t ret = DeactivateSensor(sensorType, sensorUser); in OH_Sensor_Unsubscribe() 221 if (sensorEvent == nullptr || sensorType == nullptr) { in OH_SensorEvent_GetType() 225 *sensorType = static_cast<Sensor_Type>(sensorEvent->sensorTypeId); in OH_SensorEvent_GetType() 262 if (id == nullptr || sensorType == nullptr) { in OH_SensorSubscriptionId_GetType() 266 *sensorType = static_cast<Sensor_Type>(id->sensorType); in OH_SensorSubscriptionId_GetType() [all …]
|
/ohos5.0/base/msdp/device_status/libs/src/ |
H A D | devicestatus_algorithm_manager.cpp | 40 int32_t sensorType = GetSensorTypeId(type); in StartSensor() local 41 if (sensorType == RET_ERR) { in StartSensor() 45 if (!CheckSensorTypeId(sensorType)) { in StartSensor() 51 if (!SENSOR_DATA_CB.RegisterCallbackSensor(sensorType)) { in StartSensor() 239 int32_t sensorType = GetSensorTypeId(type); in UnregisterSensor() local 240 if (sensorType == RET_ERR) { in UnregisterSensor() 244 if (!SENSOR_DATA_CB.UnregisterCallbackSensor(sensorType)) { in UnregisterSensor()
|
/ohos5.0/base/powermgr/thermal_manager/services/native/src/thermal_observer/ |
H A D | thermal_observer.cpp | 53 std::vector<std::string> sensorType(TYPE_MAX_SIZE); in InitSensorTypeMap() local 68 sensorType[i] = typeList[i]; in InitSensorTypeMap() 72 typeMap_.insert(std::make_pair(SensorType::SOC, sensorType[ARG_0])); in InitSensorTypeMap() 73 typeMap_.insert(std::make_pair(SensorType::BATTERY, sensorType[ARG_1])); in InitSensorTypeMap() 74 typeMap_.insert(std::make_pair(SensorType::SHELL, sensorType[ARG_2])); in InitSensorTypeMap() 75 typeMap_.insert(std::make_pair(SensorType::SENSOR1, sensorType[ARG_3])); in InitSensorTypeMap() 76 typeMap_.insert(std::make_pair(SensorType::SENSOR2, sensorType[ARG_4])); in InitSensorTypeMap() 77 typeMap_.insert(std::make_pair(SensorType::SENSOR3, sensorType[ARG_5])); in InitSensorTypeMap() 78 typeMap_.insert(std::make_pair(SensorType::SENSOR4, sensorType[ARG_6])); in InitSensorTypeMap() 79 typeMap_.insert(std::make_pair(SensorType::SENSOR5, sensorType[ARG_7])); in InitSensorTypeMap() [all …]
|
/ohos5.0/drivers/peripheral/thermal/interfaces/hdi_service/include/ |
H A D | sensor_info_config.h | 31 bool operator == (const std::string &sensorType) 33 return (this->type == sensorType); 40 bool operator == (const std::string &sensorType) 42 return (this->type == sensorType);
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-sensor-service-kit/ |
H A D | _sensor.md | 59 …ettype)([Sensor_Info](#sensor_info)* sensor, [Sensor_Type](#sensor_type) *sensorType) | 获取传感器类型。 | 63 …([Sensor_Event](#sensor_event)* sensorEvent, [Sensor_Type](#sensor_type) *sensorType) | 获取传感器类型。 | 69 …SubscriptionId](#sensor_subscriptionid) *id, [Sensor_Type](#sensor_type) *sensorType) | 获取传感器类型。 | 604 int32_t OH_SensorEvent_GetType(Sensor_Event* sensorEvent, Sensor_Type *sensorType) 617 | sensorType | 指向传感器类型的指针。 | 720 int32_t OH_SensorInfo_GetType(Sensor_Info* sensor, Sensor_Type *sensorType) 733 | sensorType | 指向传感器类型的指针。 | 859 int32_t OH_SensorSubscriptionId_GetType(Sensor_SubscriptionId* id, Sensor_Type *sensorType) 872 | sensorType | 指向传感器类型的指针。 | 882 int32_t OH_SensorSubscriptionId_SetType(Sensor_SubscriptionId* id, const Sensor_Type sensorType) [all …]
|
H A D | oh_sensor_type_8h.md | 56 ….md#sensor_event) *sensorEvent, [Sensor_Type](_sensor.md#sensor_type) *sensorType) | 获取传感器类型。 … 62 ….md#sensor_subscriptionid) *id, [Sensor_Type](_sensor.md#sensor_type) *sensorType) | 获取传感器类型。 … 63 …d#sensor_subscriptionid) *id, const [Sensor_Type](_sensor.md#sensor_type) sensorType) | 设置传感器类型。 |
|
/ohos5.0/base/sensors/sensor/interfaces/kits/c/ |
H A D | oh_sensor_type.h | 250 int32_t OH_SensorInfo_GetType(Sensor_Info* sensor, Sensor_Type *sensorType); 300 int32_t OH_SensorEvent_GetType(Sensor_Event* sensorEvent, Sensor_Type *sensorType); 400 int32_t OH_SensorSubscriptionId_GetType(Sensor_SubscriptionId* id, Sensor_Type *sensorType); 411 int32_t OH_SensorSubscriptionId_SetType(Sensor_SubscriptionId* id, const Sensor_Type sensorType);
|
/ohos5.0/docs/zh-cn/application-dev/device/sensor/ |
H A D | sensor-guidelines-capi.md | 21 | OH_SensorInfo_GetType(Sensor_Info* sensor, Sensor_Type *sensorType) | 获取传感器类型。 … 25 | OH_SensorEvent_GetType(Sensor_Event* sensorEvent, Sensor_Type *sensorType) | 获取传感器类型。 … 31 | OH_SensorSubscriptionId_SetType(Sensor_SubscriptionId* id, const Sensor_Type sensorType) | 设置传感器类… 102 Sensor_Type sensorType; 103 ret = OH_SensorEvent_GetType(event, &sensorType); // 获取传感器类型。 118 …OG_APP, LOG_INFO, GLOBAL_RESMGR, TAG, "sensorType:%{public}d, dataLen:%{public}d, accuracy:%{publi… 156 Sensor_Type sensorType; 157 ret = OH_SensorInfo_GetType(sensors[i], &sensorType); // 获取传感器类型。
|
/ohos5.0/base/sensors/sensor/test/unittest/interfaces/kits/ |
H A D | sensor_native_test.cpp | 66 Sensor_Type sensorType; in SetUpTestCase() local 67 ret = OH_SensorInfo_GetType(sensors[i], &sensorType); in SetUpTestCase() 69 if (sensorType == SENSOR_TYPE_AMBIENT_LIGHT) { in SetUpTestCase() 98 Sensor_Type sensorType; in SensorDataCallbackImpl() local 99 ret = OH_SensorEvent_GetType(event, &sensorType); in SensorDataCallbackImpl() 123 Sensor_Type *sensorType = nullptr; in SensorDataCallbackImpl1() local 124 ret = OH_SensorEvent_GetType(event, sensorType); in SensorDataCallbackImpl1() 154 Sensor_Type sensorType; variable 155 ret = OH_SensorInfo_GetType(sensors[i], &sensorType); 329 Sensor_Type *sensorType = nullptr; variable [all …]
|
/ohos5.0/base/powermgr/thermal_manager/services/native/src/thermal_policy/ |
H A D | thermal_srv_config_parser.cpp | 272 std::string sensorType = auxsensors[i]; in ParseAuxSensorInfo() local 273 if (sensorType.empty()) { in ParseAuxSensorInfo() 277 THERMAL_HILOGD(COMP_SVC, "parse aux sensor [%{public}s] item:", sensorType.c_str()); in ParseAuxSensorInfo() 279 … THERMAL_HILOGE(COMP_SVC, "parse aux sensor [%{public}s] sub node failed", sensorType.c_str()); in ParseAuxSensorInfo() 283 … THERMAL_HILOGE(COMP_SVC, "aux sensor [%{public}s] level info is empty", sensorType.c_str()); in ParseAuxSensorInfo() 286 auxSensorLevelInfo.emplace(sensorType, auxLevelItems); in ParseAuxSensorInfo() 373 std::string sensorType = sensors.at(i); in ParseSensorInfo() local 376 … THERMAL_HILOGE(COMP_SVC, "parse sensor [%{public}s] level failed", sensorType.c_str()); in ParseSensorInfo() 380 … THERMAL_HILOGE(COMP_SVC, "sensor [%{public}s] level info is empty", sensorType.c_str()); in ParseSensorInfo() 383 sensorLevelInfo.emplace(std::pair(sensorType, levelItems)); in ParseSensorInfo()
|
/ohos5.0/docs/en/application-dev/device/sensor/ |
H A D | sensor-guidelines-capi.md | 21 | OH_SensorInfo_GetType(Sensor_Info* sensor, Sensor_Type *sensorType) | Obtains the sensor type. … 25 | OH_SensorEvent_GetType(Sensor_Event* sensorEvent, Sensor_Type *sensorType) | Obtains the sensor t… 31 | OH_SensorSubscriptionId_SetType(Sensor_SubscriptionId* id, const Sensor_Type sensorType) | Sets t… 102 Sensor_Type sensorType; 103 ret = OH_SensorEvent_GetType(event, &sensorType); // Obtain the sensor type. 118 …OG_APP, LOG_INFO, GLOBAL_RESMGR, TAG, "sensorType:%{public}d, dataLen:%{public}d, accuracy:%{publi… 156 Sensor_Type sensorType; 157 ret = OH_SensorInfo_GetType(sensors[i], &sensorType); // Obtain the sensor type.
|
/ohos5.0/foundation/resourceschedule/device_standby/plugins/extend_constraints/src/ |
H A D | motion_sensor_monitor.cpp | 155 for (const auto sensorType : SENSOR_TYPE_CONFIG) { in InitSensorUserMap() local 156 if (CheckSersorUsable(sensorInfo, count, sensorType)) { in InitSensorUserMap() 157 sensorUserMap_.emplace(sensorType, SensorUser {}); in InitSensorUserMap()
|
/ohos5.0/base/powermgr/thermal_manager/test/unittest/src/ |
H A D | thermal_config_file_parser.cpp | 339 std::string sensorType = auxSensorList[i]; in ParseAuxSensorInfo() local 343 THERMAL_HILOGD(LABEL_TEST, "aux_sensor item: %{public}s", sensorType.c_str()); in ParseAuxSensorInfo() 344 … auxSensorLevelInfo.emplace(sensorType, ParseAuxSensorSubnodeInfo(cur, auxSensorList, i)); in ParseAuxSensorInfo() 361 std::string sensorType = sensors.at(i); in ParseSensorInfo() local 364 sensorLevelInfo.emplace(std::pair(sensorType, vItem)); in ParseSensorInfo()
|
H A D | thermal_mock_proxy_remote_test.cpp | 64 SensorType sensorType = SensorType::SOC; variable 65 EXPECT_TRUE(thermalMgrClient.GetThermalSensorTemp(sensorType) == 0);
|
H A D | thermal_mock_proxy_writeremoteobject_test.cpp | 62 SensorType sensorType = SensorType::SOC; variable 63 EXPECT_TRUE(thermalMgrClient.GetThermalSensorTemp(sensorType) == 0);
|
/ohos5.0/docs/en/application-dev/reference/apis-sensor-service-kit/ |
H A D | _sensor.md | 59 …ype)([Sensor_Info](#sensor_info)* sensor, [Sensor_Type](#sensor_type) *sensorType) | Obtains the s… 63 …ensor_Event](#sensor_event)* sensorEvent, [Sensor_Type](#sensor_type) *sensorType) | Obtains the s… 69 …scriptionId](#sensor_subscriptionid) *id, [Sensor_Type](#sensor_type) *sensorType) | Obtains the s… 604 int32_t OH_SensorEvent_GetType(Sensor_Event* sensorEvent, Sensor_Type *sensorType) 617 | sensorType | Pointer to the sensor type. | 720 int32_t OH_SensorInfo_GetType(Sensor_Info* sensor, Sensor_Type *sensorType) 733 | sensorType | Pointer to the sensor type. | 859 int32_t OH_SensorSubscriptionId_GetType(Sensor_SubscriptionId* id, Sensor_Type *sensorType) 872 | sensorType | Pointer to the sensor type. | 882 int32_t OH_SensorSubscriptionId_SetType(Sensor_SubscriptionId* id, const Sensor_Type sensorType) [all …]
|
H A D | oh_sensor_type_8h.md | 56 ….md#sensor_event) *sensorEvent, [Sensor_Type](_sensor.md#sensor_type) *sensorType) | Obtains the s… 62 ….md#sensor_subscriptionid) *id, [Sensor_Type](_sensor.md#sensor_type) *sensorType) | Obtains the s… 63 …ensor_subscriptionid) *id, const [Sensor_Type](_sensor.md#sensor_type) sensorType) | Sets the sens…
|
/ohos5.0/base/sensors/sensor/frameworks/native/include/ |
H A D | native_sensor_impl.h | 42 int32_t sensorType = -1; member
|
/ohos5.0/base/sensors/medical_sensor/utils/include/ |
H A D | medical_catalog.h | 86 uint8_t sensorType; member
|
/ohos5.0/drivers/peripheral/sensor/hdi_impl/ |
H A D | sensor_impl.cpp | 39 int32_t ReportSensorEventsData(int32_t sensorType, const struct SensorEvents *event) in ReportSensorEventsData() argument 42 auto groupCallBackIter = g_groupIdCallBackMap.find(sensorType); in ReportSensorEventsData() 62 for (auto callBack : g_groupIdCallBackMap[sensorType]) { in ReportSensorEventsData()
|
/ohos5.0/drivers/peripheral/sensor/hdi_service/ |
H A D | sensor_if_service.cpp | 619 void SensorIfService::RemoveDeathNotice(int32_t sensorType) in RemoveDeathNotice() argument 621 SENSOR_TRACE_PID_MSG("sensorType " + std::to_string(sensorType)); in RemoveDeathNotice() 623 …HDF_LOGI("%{public}s: service %{public}d, sensorType %{public}d", __func__, serviceId, sensorType); in RemoveDeathNotice() 624 auto iter = callbackMap.find(sensorType); in RemoveDeathNotice() 628 for (auto callback : callbackMap[sensorType]) { in RemoveDeathNotice()
|
H A D | sensor_if_service.h | 58 void RemoveDeathNotice(int32_t sensorType);
|