Home
last modified time | relevance | path

Searched refs:sensorTypeId (Results 1 – 25 of 145) sorted by relevance

123456

/ohos5.0/base/msdp/device_status/test/unittest/libs/src/
H A Ddevice_status_datahub_test.cpp56 GTEST_LOG_(INFO) << sensorTypeId; in SensorAccelCallbackData()
69 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
84 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
141 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
158 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
173 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
188 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
206 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
224 int32_t sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; variable
242 int32_t sensorTypeId = SENSOR_TYPE_ID_TEMPERATURE; variable
[all …]
/ohos5.0/base/web/webview/ohos_interface/ohos_glue/ohos_adapter/bridge/webcore/
H A Dark_sensor_adapter_wrapper.cpp28 int32_t ArkSensorAdapterWrapper::IsOhosSensorSupported(int32_t sensorTypeId) in IsOhosSensorSupported() argument
30 return ctocpp_->IsOhosSensorSupported(sensorTypeId); in IsOhosSensorSupported()
33 int32_t ArkSensorAdapterWrapper::GetOhosSensorReportingMode(int32_t sensorTypeId) in GetOhosSensorReportingMode() argument
35 return ctocpp_->GetOhosSensorReportingMode(sensorTypeId); in GetOhosSensorReportingMode()
40 return ctocpp_->GetOhosSensorDefaultSupportedFrequency(sensorTypeId); in GetOhosSensorDefaultSupportedFrequency()
45 return ctocpp_->GetOhosSensorMinSupportedFrequency(sensorTypeId); in GetOhosSensorMinSupportedFrequency()
50 return ctocpp_->GetOhosSensorMaxSupportedFrequency(sensorTypeId); in GetOhosSensorMaxSupportedFrequency()
55 return ctocpp_->SubscribeOhosSensor(sensorTypeId, samplingInterval); in SubscribeOhosSensor()
58 int32_t ArkSensorAdapterWrapper::UnsubscribeOhosSensor(int32_t sensorTypeId) in UnsubscribeOhosSensor() argument
60 return ctocpp_->UnsubscribeOhosSensor(sensorTypeId); in UnsubscribeOhosSensor()
[all …]
H A Dark_sensor_adapter_wrapper.h29 int32_t IsOhosSensorSupported(int32_t sensorTypeId) override;
30 int32_t GetOhosSensorReportingMode(int32_t sensorTypeId) override;
31 double GetOhosSensorDefaultSupportedFrequency(int32_t sensorTypeId) override;
32 double GetOhosSensorMinSupportedFrequency(int32_t sensorTypeId) override;
33 double GetOhosSensorMaxSupportedFrequency(int32_t sensorTypeId) override;
34 int32_t SubscribeOhosSensor(int32_t sensorTypeId, int64_t samplingInterval) override;
35 int32_t RegistOhosSensorCallback(int32_t sensorTypeId,
37 int32_t UnsubscribeOhosSensor(int32_t sensorTypeId) override;
/ohos5.0/base/msdp/device_status/libs/src/datahub/
H A Dsensor_data_callback.cpp89 auto ret = algoMap_.insert(std::pair(sensorTypeId, callback)); in SubscribeSensorEvent()
101 auto callbackIter = algoMap_.find(sensorTypeId); in UnsubscribeSensorEvent()
103 FI_HILOGE("Erase sensorTypeId:%{public}d", sensorTypeId); in UnsubscribeSensorEvent()
114 (iter->second)(sensorTypeId, data); in NotifyCallback()
143 if (sensorTypeId != SENSOR_TYPE_ID_ACCELEROMETER) { in PopData()
155 data.x, data.y, data.z, sensorTypeId); in PopData()
164 SENSOR_DATA_CB.PushData(event->sensorTypeId, event->data); in SensorDataCallbackImpl()
171 int32_t ret = SubscribeSensor(sensorTypeId, &user_); in RegisterCallbackSensor()
181 ret = ActivateSensor(sensorTypeId, &user_); in RegisterCallbackSensor()
194 int32_t ret = DeactivateSensor(sensorTypeId, &user_); in UnregisterCallbackSensor()
[all …]
/ohos5.0/base/sensors/sensor_lite/frameworks/src/
H A Dsensor_agent.c28 int32_t ActivateSensor(int32_t sensorTypeId, SensorUser *user) in ActivateSensor() argument
33 return ActivateSensorByProxy(g_proxy, sensorTypeId, user); in ActivateSensor()
36 int32_t DeactivateSensor(int32_t sensorTypeId, SensorUser *user) in DeactivateSensor() argument
41 return DeactivateSensorByProxy(g_proxy, sensorTypeId, user); in DeactivateSensor()
52 int32_t SubscribeSensor(int32_t sensorTypeId, SensorUser *user) in SubscribeSensor() argument
57 return SubscribeSensorByProxy(g_proxy, sensorTypeId, user); in SubscribeSensor()
60 int32_t UnsubscribeSensor(int32_t sensorTypeId, SensorUser *user) in UnsubscribeSensor() argument
65 return UnsubscribeSensorByProxy(g_proxy, sensorTypeId, user); in UnsubscribeSensor()
68 int32_t SetMode(int32_t sensorTypeId, SensorUser *user, int32_t mode) in SetMode() argument
73 return SetModeByProxy(g_proxy, sensorTypeId, user, mode); in SetMode()
[all …]
/ohos5.0/base/sensors/medical_sensor/interfaces/plugin/src/
H A Dmedical_js.cpp49 int32_t sensorTypeId = event->sensorTypeId; in DataCallbackImpl() local
59 onCallbackInfo->sensorTypeId = sensorTypeId; in DataCallbackImpl()
74 static int32_t UnsubscribeSensor(int32_t sensorTypeId) in UnsubscribeSensor() argument
82 ret = UnsubscribeSensor(sensorTypeId, &user); in UnsubscribeSensor()
99 ret = SetBatch(sensorTypeId, user, interval, 0); in SubscribeSensor()
104 ret = ActivateSensor(sensorTypeId, user); in SubscribeSensor()
126 int32_t sensorTypeId = GetCppInt32(args[0], env); in On() local
152 g_onCallbackInfos.erase(sensorTypeId); in On()
191 int32_t ret = UnsubscribeSensor(sensorTypeId); in Off()
198 delete g_onCallbackInfos[sensorTypeId]; in Off()
[all …]
/ohos5.0/base/web/webview/ohos_adapter/sensor_adapter/src/
H A Dsensor_adapter_impl.cpp30 SensorTypeId SensorTypeToOhosSensorType(int sensorTypeId) in SensorTypeToOhosSensorType() argument
43 auto checkIter = TO_OHOS_SENSOR_TYPE_MAP.find(sensorTypeId); in SensorTypeToOhosSensorType()
50 std::string SensorTypeToSensorUserName(int sensorTypeId) in SensorTypeToSensorUserName() argument
63 auto checkIter = TO_OHOS_SENSOR_USER_NAME_MAP.find(sensorTypeId); in SensorTypeToSensorUserName()
83 int32_t SensorAdapterImpl::IsOhosSensorSupported(int32_t sensorTypeId) in IsOhosSensorSupported() argument
135 sensorTypeId, defaultFrequency); in GetOhosSensorDefaultSupportedFrequency()
164 sensorTypeId, minFrequency); in GetOhosSensorMinSupportedFrequency()
193 sensorTypeId, maxFrequency); in GetOhosSensorMaxSupportedFrequency()
310 auto findIter = sensorCallbackMap.find(event->sensorTypeId); in OhosSensorCallback()
319 switch (event->sensorTypeId) { in OhosSensorCallback()
[all …]
/ohos5.0/base/sensors/sensor/test/fuzztest/interfaces/sensoragent_fuzzer/
H A Dsensoragent_fuzzer.cpp83 bool CheckSensorTypeId(int32_t sensorTypeId) in CheckSensorTypeId() argument
92 if ((sensorInfo + i)->sensorTypeId == sensorTypeId) { in CheckSensorTypeId()
103 int32_t sensorTypeId = 0; in SensorAgentFuzzTest() local
104 GetObject<int32_t>(sensorTypeId, data + startPos, size - startPos); in SensorAgentFuzzTest()
105 bool validSensorId = CheckSensorTypeId(sensorTypeId); in SensorAgentFuzzTest()
107 sensorTypeId = SENSOR_TYPE_ID_ACCELEROMETER; in SensorAgentFuzzTest()
111 SubscribeSensor(sensorTypeId, &user); in SensorAgentFuzzTest()
112 SetBatch(sensorTypeId, &user, g_samplingInterval, g_reportInterval); in SensorAgentFuzzTest()
113 ActivateSensor(sensorTypeId, &user); in SensorAgentFuzzTest()
115 DeactivateSensor(sensorTypeId, &user); in SensorAgentFuzzTest()
[all …]
/ohos5.0/base/sensors/sensor/frameworks/js/napi/src/
H A Dsensor_js.cpp71 int32_t sensorTypeId = event->sensorTypeId; in copySensorData() local
72 callbackInfo->data.sensorData.sensorTypeId = sensorTypeId; in copySensorData()
110 int32_t sensorTypeId = event->sensorTypeId; in EmitSubscribeCallback() local
128 int32_t sensorTypeId = event->sensorTypeId; in EmitOnCallback() local
129 if (!CheckSubscribe(sensorTypeId)) { in EmitOnCallback()
146 int32_t sensorTypeId = event->sensorTypeId; in EmitOnceCallback() local
167 UnsubscribeSensor(sensorTypeId); in EmitOnceCallback()
309 if (!CheckSubscribe(sensorTypeId)) { in Once()
1109 if (sensorInfos[i].sensorTypeId == sensorTypeId) { in GetSingleSensor()
1166 if (sensorInfos[i].sensorTypeId == sensorTypeId) { in GetSingleSensorSync()
[all …]
/ohos5.0/docs/zh-cn/device-dev/subsystems/
H A Dsubsys-sensor-overview.md26 …t&nbsp;sensorTypeId, <br/> &nbsp;SensorUser&nbsp;\*user) | **作用**:订阅传感器数据,系统会将获取到的传感器数据上报给订阅者。<br/…
27 … (int32_t&nbsp;sensorTypeId,&nbsp;SensorUser&nbsp;\*user) | **作用**:去订阅传感器数据,系统将取消传感器数据上报给订阅者。<br/>…
28sensorTypeId,&nbsp;SensorUser <br/> &nbsp;\*user,&nbsp;int64_t&nbsp;samplingInterval,&nbsp;int64_t…
29 …or**(int32_t&nbsp;sensorTypeId, <br/> &nbsp;SensorUser&nbsp;\*user) | **作用**:使能一个传感器订阅用户。<br/>**返回…
30 …er&nbsp;\*user) | **作用**:去使能一个传感器订阅用户<br/>**返回值**:0为成功,其他返回值表示失败。 | **sensorTypeId**:唯一标识一个传感器类型;<…
31 …t&nbsp;sensorTypeId, <br/> &nbsp;SensorUser&nbsp;\*user,&nbsp;int32_t&nbsp;mode) | **作用**:设置传感器的工作…
/ohos5.0/base/web/webview/ohos_interface/include/ohos_adapter/
H A Dsensor_adapter.h52 virtual int32_t IsOhosSensorSupported(int32_t sensorTypeId) = 0;
53 virtual int32_t GetOhosSensorReportingMode(int32_t sensorTypeId) = 0;
54 virtual double GetOhosSensorDefaultSupportedFrequency(int32_t sensorTypeId) = 0;
55 virtual double GetOhosSensorMinSupportedFrequency(int32_t sensorTypeId) = 0;
56 virtual double GetOhosSensorMaxSupportedFrequency(int32_t sensorTypeId) = 0;
57 virtual int32_t SubscribeOhosSensor(int32_t sensorTypeId, int64_t samplingInterval) = 0;
58 virtual int32_t RegistOhosSensorCallback(int32_t sensorTypeId,
60 virtual int32_t UnsubscribeOhosSensor(int32_t sensorTypeId) = 0;
/ohos5.0/foundation/resourceschedule/device_standby/plugins/extend_constraints/src/
H A Dmotion_sensor_monitor.cpp55 if (sensorInfo->sensorTypeId == sensorTypeId) { in CheckSersorUsable()
244 for (const auto &[sensorTypeId, sensorUser] : sensorUserMap_) { in StartSensor()
245 if (SubscribeSensor(sensorTypeId, &sensorUser) != 0) { in StartSensor()
246 STANDBYSERVICE_LOGE("subscribe sensor failed for sensor ID %{public}d", sensorTypeId); in StartSensor()
249 STANDBYSERVICE_LOGD("subscribe sensor succeed for sensor ID %{public}d", sensorTypeId); in StartSensor()
251 SetBatch(sensorTypeId, &sensorUser, SENSOR_SAMPLING_RATE, SENSOR_REPORTING_RATE); in StartSensor()
252 if (ActivateSensor(sensorTypeId, &sensorUser) != 0) { in StartSensor()
253 STANDBYSERVICE_LOGE("activate sensor failed for sensor ID %{public}d", sensorTypeId); in StartSensor()
268 for (const auto &[sensorTypeId, sensorUser] : sensorUserMap_) { in StopSensor()
269 if (DeactivateSensor(sensorTypeId, &sensorUser) != 0) { in StopSensor()
[all …]
/ohos5.0/base/sensors/medical_sensor/interfaces/native/include/
H A Dmedical_native_impl.h70 int32_t SubscribeSensor(int32_t sensorTypeId, const MedicalSensorUser *user);
81 int32_t UnsubscribeSensor(int32_t sensorTypeId, const MedicalSensorUser *user);
94 int32_t SetBatch(int32_t sensorTypeId, const MedicalSensorUser *user, int64_t samplingInterval, int…
106 int32_t ActivateSensor(int32_t sensorTypeId, const MedicalSensorUser *user);
117 int32_t DeactivateSensor(int32_t sensorTypeId, const MedicalSensorUser *user);
129 int32_t SetMode(int32_t sensorTypeId, const MedicalSensorUser *user, int32_t mode);
131 int32_t SetOption(int32_t sensorTypeId, const MedicalSensorUser *user, int32_t option);
/ohos5.0/base/web/webview/ohos_interface/ohos_glue/ohos_adapter/include/
H A Dark_sensor_adapter.h37 virtual int32_t IsOhosSensorSupported(int32_t sensorTypeId) = 0;
43 virtual double GetOhosSensorDefaultSupportedFrequency(int32_t sensorTypeId) = 0;
46 virtual double GetOhosSensorMinSupportedFrequency(int32_t sensorTypeId) = 0;
49 virtual double GetOhosSensorMaxSupportedFrequency(int32_t sensorTypeId) = 0;
52 virtual int32_t SubscribeOhosSensor(int32_t sensorTypeId, int64_t samplingInterval) = 0;
55 virtual int32_t RegistOhosSensorCallback(int32_t sensorTypeId,
59 virtual int32_t UnsubscribeOhosSensor(int32_t sensorTypeId) = 0;
/ohos5.0/base/web/webview/ohos_interface/ohos_glue/ohos_adapter/bridge/webview/
H A Dark_sensor_adapter_impl.h29 int32_t IsOhosSensorSupported(int32_t sensorTypeId) override;
33 double GetOhosSensorDefaultSupportedFrequency(int32_t sensorTypeId) override;
35 double GetOhosSensorMinSupportedFrequency(int32_t sensorTypeId) override;
37 double GetOhosSensorMaxSupportedFrequency(int32_t sensorTypeId) override;
39 int32_t SubscribeOhosSensor(int32_t sensorTypeId, int64_t samplingInterval) override;
41 int32_t RegistOhosSensorCallback(int32_t sensorTypeId,
44 int32_t UnsubscribeOhosSensor(int32_t sensorTypeId) override;
/ohos5.0/base/msdp/device_status/libs/include/datahub/
H A Dsensor_data_callback.h39 bool RegisterCallbackSensor(int32_t sensorTypeId);
40 bool UnregisterCallbackSensor(int32_t sensorTypeId);
43 bool SubscribeSensorEvent(int32_t sensorTypeId, SensorCallback callback);
44 bool UnsubscribeSensorEvent(int32_t sensorTypeId, SensorCallback callback);
45 bool PushData(int32_t sensorTypeId, uint8_t* data);
48 bool PopData(int32_t sensorTypeId, AccelData& data);
51 bool NotifyCallback(int32_t sensorTypeId, AccelData* data);
/ohos5.0/base/sensors/medical_sensor/interfaces/native/test/unittest/
H A Dmedical_native_test.cpp60 event[0].sensorTypeId, event[0].dataLen, *(sensorData)); in AfeDataCallbackImpl()
73 int32_t sensorTypeId = 0; variable
78 int32_t ret = SubscribeSensor(sensorTypeId, &user);
81 ret = SetBatch(sensorTypeId, &user, 100000000, 100000000);
84 ret = ActivateSensor(sensorTypeId, &user);
90 ret = DeactivateSensor(sensorTypeId, &user);
93 ret = UnsubscribeSensor(sensorTypeId, &user);
/ohos5.0/base/web/webview/ohos_adapter/sensor_adapter/include/
H A Dsensor_adapter_impl.h42 int32_t IsOhosSensorSupported(int32_t sensorTypeId) override;
43 int32_t GetOhosSensorReportingMode(int32_t sensorTypeId) override;
44 double GetOhosSensorDefaultSupportedFrequency(int32_t sensorTypeId) override;
45 double GetOhosSensorMinSupportedFrequency(int32_t sensorTypeId) override;
46 double GetOhosSensorMaxSupportedFrequency(int32_t sensorTypeId) override;
47 int32_t SubscribeOhosSensor(int32_t sensorTypeId, int64_t samplingInterval) override;
48 int32_t RegistOhosSensorCallback(int32_t sensorTypeId,
50 int32_t UnsubscribeOhosSensor(int32_t sensorTypeId) override;
/ohos5.0/base/sensors/sensor_lite/interfaces/kits/native/include/
H A Dsensor_agent.h71 int32_t SubscribeSensor(int32_t sensorTypeId, SensorUser *user);
83 int32_t UnsubscribeSensor(int32_t sensorTypeId, SensorUser *user);
97 int32_t SetBatch(int32_t sensorTypeId, SensorUser *user, int64_t samplingInterval, int64_t reportIn…
110 int32_t ActivateSensor(int32_t sensorTypeId, SensorUser *user);
122 int32_t DeactivateSensor(int32_t sensorTypeId, SensorUser *user);
135 int32_t SetMode(int32_t sensorTypeId, SensorUser *user, int32_t mode);
/ohos5.0/base/sensors/sensor/interfaces/inner_api/
H A Dsensor_agent.h70 int32_t SubscribeSensor(int32_t sensorTypeId, const SensorUser *user);
81 int32_t UnsubscribeSensor(int32_t sensorTypeId, const SensorUser *user);
94 int32_t SetBatch(int32_t sensorTypeId, const SensorUser *user, int64_t samplingInterval, int64_t re…
106 int32_t ActivateSensor(int32_t sensorTypeId, const SensorUser *user);
117 int32_t DeactivateSensor(int32_t sensorTypeId, const SensorUser *user);
129 int32_t SetMode(int32_t sensorTypeId, const SensorUser *user, int32_t mode);
/ohos5.0/base/sensors/medical_sensor/services/medical_sensor/src/
H A Dmedical_data_processer.cpp68 uint32_t sensorId = event.sensorTypeId; in SendNoneFifoCacheData()
70 sensorId = event.sensorTypeId; in SendNoneFifoCacheData()
117 uint32_t sensorId = event.sensorTypeId; in SendFifoCacheData()
119 sensorId = event.sensorTypeId; in SendFifoCacheData()
178 uint32_t sensorId = event.sensorTypeId; in ReportData()
180 sensorId = event.sensorTypeId; in ReportData()
201 uint32_t sensorId = event.sensorTypeId; in ReportNotContinuousData()
203 sensorId = event.sensorTypeId; in ReportNotContinuousData()
243 .sensorTypeId = event[i].sensorTypeId, in SendRawData()
276 uint32_t sensorId = event.sensorTypeId; in CacheSensorEvent()
[all …]
/ohos5.0/base/sensors/sensor/services/src/
H A Dsensor_data_processer.cpp61 auto dataCountIt = dataCountMap_.find(data.sensorTypeId); in SendNoneFifoCacheData()
110 auto dataCountIt = dataCountMap_.find(data.sensorTypeId); in SendFifoCacheData()
165 int32_t sensorId = data.sensorTypeId; in ReportData()
189 int32_t sensorId = data.sensorTypeId; in ReportNotContinuousData()
222 int32_t sensorId = events[eventSize - 1].sensorTypeId; in SendRawData()
232 int32_t sensorId = data.sensorTypeId; in CacheSensorEvent()
243 ret, cacheData.sensorTypeId, cacheData.timestamp); in CacheSensorEvent()
248 ret, data.sensorTypeId, data.timestamp); in CacheSensorEvent()
257 ret, data.sensorTypeId, data.timestamp); in CacheSensorEvent()
266 int32_t sensorId = eventsBuf.circularBuf[eventsBuf.readPos].sensorTypeId; in EventFilter()
[all …]
/ohos5.0/base/sensors/sensor/utils/common/src/
H A Dprint_sensor_data.cpp58 …gerIt = std::find(g_triggerSensorType.begin(), g_triggerSensorType.end(), sensorData.sensorTypeId); in ControlSensorHdiPrint()
63 auto it = hdiLoginfo_.find(sensorData.sensorTypeId); in ControlSensorHdiPrint()
84 str += "sensorId: " + std::to_string(sensorData.sensorTypeId) + ", "; in PrintHdiData()
86 int32_t dataDim = GetDataDimension(sensorData.sensorTypeId); in PrintHdiData()
125 … triggerIt = std::find(g_triggerSensorType.begin(), g_triggerSensorType.end(), event.sensorTypeId); in ControlSensorClientPrint()
130 …osIt = std::find(g_continuousSensorType.begin(), g_continuousSensorType.end(), event.sensorTypeId); in ControlSensorClientPrint()
156 str += "sensorId: " + std::to_string(event.sensorTypeId) + ", "; in PrintClientData()
158 int32_t dataDim = GetDataDimension(event.sensorTypeId); in PrintClientData()
216 str += "sensorId: " + std::to_string(data.sensorTypeId) + ", "; in PrintSensorDataLog()
218 int32_t dataDim = GetDataDimension(data.sensorTypeId); in PrintSensorDataLog()
/ohos5.0/base/msdp/device_status/libs/src/algorithm/
H A Dalgo_base.cpp28 void AlgoBase::Unsubscribe(int32_t sensorTypeId) in Unsubscribe() argument
32 SENSOR_DATA_CB.UnsubscribeSensorEvent(sensorTypeId, algoCallback_); in Unsubscribe()
35 bool AlgoBase::SetData(int32_t sensorTypeId, AccelData* sensorData) in SetData() argument
38 if (sensorTypeId != SENSOR_TYPE_ID_ACCELEROMETER) { in SetData()
39 FI_HILOGE("sensorTypeId:%{public}d", sensorTypeId); in SetData()
/ohos5.0/docs/en/device-dev/subsystems/
H A Dsubsys-sensor-overview.md26sensorTypeId, <br> SensorUser \*user) | Subscribes to sensor data. The system will report the o…
27sensorTypeId, SensorUser \*user) | Unsubscribes from sensor data. The system will no longer repo…
28sensorTypeId, SensorUser <br> \*user, int64_t samplingInterval, int64_t reportInterval) | S…
29sensorTypeId, <br> SensorUser \*user) | Enables the specified sensor that has been subscribed t…
30 …ting mode is successfully set; returns a non-zero value otherwise.| **sensorTypeId**: ID of a sens…
31sensorTypeId, <br> SensorUser \*user, int32_t mode) | Sets the data reporting mode for the sp…

123456