Home
last modified time | relevance | path

Searched refs:sensorId (Results 1 - 25 of 120) sorted by relevance

12345

/base/sensors/medical_sensor/services/medical_sensor/hdi_connection/interface/src/
H A Dsensor_hdi_connection.cpp69 int32_t SensorHdiConnection::EnableSensor(int32_t sensorId) in EnableSensor() argument
71 int32_t ret = iSensorHdiConnection_->EnableSensor(sensorId); in EnableSensor()
73 HiLog::Info(LABEL, "%{public}s enable sensor failed, sensorId: %{public}d", __func__, sensorId); in EnableSensor()
79 int32_t SensorHdiConnection::DisableSensor(int32_t sensorId) in DisableSensor() argument
81 int32_t ret = iSensorHdiConnection_->DisableSensor(sensorId); in DisableSensor()
83 HiLog::Info(LABEL, "%{public}s disable sensor failed, sensorId: %{public}d", __func__, sensorId); in DisableSensor()
89 int32_t SensorHdiConnection::SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) in SetBatch() argument
91 int32_t ret = iSensorHdiConnection_->SetBatch(sensorId, samplingInterva in SetBatch()
99 SetMode(int32_t sensorId, int32_t mode) SetMode() argument
109 SetOption(int32_t sensorId, int32_t option) SetOption() argument
119 RunCommand(int32_t sensorId, int32_t cmd, int32_t params) RunCommand() argument
[all...]
/base/sensors/medical_sensor/services/medical_sensor/src/
H A Dmedical_manager.cpp44 uint32_t MedicalSensorManager::GetSensorFlag(uint32_t sensorId) in GetSensorFlag() argument
47 auto sensor = sensorMap_.find(sensorId); in GetSensorFlag()
54 bool MedicalSensorManager::SetBestSensorParams(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in SetBestSensorParams() argument
56 HiLog::Debug(LABEL, "%{public}s begin, sensorId : %{public}u, samplingPeriodNs : %{public}d", __func__, sensorId, in SetBestSensorParams()
58 if (sensorId == INVALID_SENSOR_ID) { in SetBestSensorParams()
59 HiLog::Error(LABEL, "%{public}s sensorId is invalid", __func__); in SetBestSensorParams()
62 MedicalSensorBasicInfo sensorInfo = clientInfo_.GetBestSensorInfo(sensorId); in SetBestSensorParams()
72 auto ret = sensorHdiConnection_.SetBatch(sensorId, bestSamplingPeriodNs, bestReportDelayNs); in SetBestSensorParams()
81 bool MedicalSensorManager::ResetBestSensorParams(uint32_t sensorId) in ResetBestSensorParams() argument
99 GetSensorInfo(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) GetSensorInfo() argument
133 SaveSubscriber(uint32_t sensorId, uint32_t pid, int64_t samplingPeriodNs, int64_t maxReportDelayNs) SaveSubscriber() argument
156 IsOtherClientUsingSensor(uint32_t sensorId, int32_t clientPid) IsOtherClientUsingSensor() argument
171 AfterDisableSensor(uint32_t sensorId) AfterDisableSensor() argument
[all...]
H A Dmedical_service.cpp137 HiLog::Debug(LABEL, "%{public}s sensorId = %{public}d, name = %{public}s", in InitSensorList()
157 void MedicalSensorService::ReportSensorUsedInfo(uint32_t sensorId, bool enable) in ReportSensorUsedInfo() argument
188 void MedicalSensorService::ReportOnChangeData(uint32_t sensorId) in ReportOnChangeData() argument
191 auto it = sensorMap_.find(sensorId); in ReportOnChangeData()
193 HiLog::Error(LABEL, "%{public}s sensorId is invalid", __func__); in ReportOnChangeData()
201 auto ret = clientInfo_.GetStoreEvent(sensorId, event); in ReportOnChangeData()
218 ErrCode MedicalSensorService::SaveSubscriber(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in SaveSubscriber() argument
220 auto ret = sensorManager_.SaveSubscriber(sensorId, this->GetCallingPid(), samplingPeriodNs, maxReportDelayNs); in SaveSubscriber()
227 if (!sensorManager_.SetBestSensorParams(sensorId, samplingPeriodNs, maxReportDelayNs)) { in SaveSubscriber()
229 clientInfo_.RemoveSubscriber(sensorId, thi in SaveSubscriber()
235 EnableSensor(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) EnableSensor() argument
279 DisableSensor(uint32_t sensorId) DisableSensor() argument
310 SetOption(uint32_t sensorId, uint32_t opt) SetOption() argument
327 GetSensorState(uint32_t sensorId) GetSensorState() argument
337 RunCommand(uint32_t sensorId, uint32_t cmdType, uint32_t params) RunCommand() argument
[all...]
H A Dmedical_service_stub.cpp78 uint32_t sensorId = data.ReadUint32(); in AfeEnableInner() local
80 int32_t ret = permissionUtil.CheckSensorPermission(GetCallingTokenID(), sensorId); in AfeEnableInner()
82 HiLog::Error(LABEL, "%{public}s: sensorId:%{public}u permission failed, result:%{public}d", in AfeEnableInner()
83 __func__, sensorId, ret); in AfeEnableInner()
86 return EnableSensor(sensorId, data.ReadInt64(), data.ReadInt64()); in AfeEnableInner()
92 uint32_t sensorId = data.ReadUint32(); in AfeDisableInner() local
94 int32_t ret = permissionUtil.CheckSensorPermission(GetCallingTokenID(), sensorId); in AfeDisableInner()
96 HiLog::Error(LABEL, "%{public}s: sensorId:%{public}u permission failed, result:%{public}d", in AfeDisableInner()
97 __func__, sensorId, ret); in AfeDisableInner()
100 return DisableSensor(sensorId); in AfeDisableInner()
106 uint32_t sensorId = data.ReadUint32(); AfeSetOptionInner() local
121 uint32_t sensorId = data.ReadUint32(); GetAfeStateInner() local
135 uint32_t sensorId = data.ReadUint32(); RunCommandInner() local
[all...]
H A Dclient_info.cpp42 MedicalSensorState ClientInfo::GetSensorState(uint32_t sensorId) in GetSensorState() argument
44 HiLog::Debug(LABEL, "%{public}s begin, sensorId : %{public}u", __func__, sensorId); in GetSensorState()
45 if (sensorId == INVALID_SENSOR_ID) { in GetSensorState()
46 HiLog::Error(LABEL, "%{public}s sensorId is invalid", __func__); in GetSensorState()
51 auto it = clientMap_.find(sensorId); in GetSensorState()
53 HiLog::Error(LABEL, "%{public}s cannot find sensorId : %{public}u", __func__, sensorId); in GetSensorState()
61 HiLog::Error(LABEL, "%{public}s cannot find sensorinfo, sensorId : %{public}u", __func__, sensorId); in GetSensorState()
65 GetBestSensorInfo(uint32_t sensorId) GetBestSensorInfo() argument
96 OnlyCurPidSensorEnabled(uint32_t sensorId, int32_t pid) OnlyCurPidSensorEnabled() argument
209 GetSensorChannel(uint32_t sensorId) GetSensorChannel() argument
234 UpdateSensorInfo(uint32_t sensorId, int32_t pid, const MedicalSensorBasicInfo &sensorInfo) UpdateSensorInfo() argument
258 RemoveSubscriber(uint32_t sensorId, uint32_t pid) RemoveSubscriber() argument
295 ClearSensorInfo(uint32_t sensorId) ClearSensorInfo() argument
312 ClearCurPidSensorInfo(uint32_t sensorId, int32_t pid) ClearCurPidSensorInfo() argument
369 GetCurPidSensorInfo(uint32_t sensorId, int32_t pid) GetCurPidSensorInfo() argument
398 ComputeBestPeriodCount(uint32_t sensorId, sptr<MedicalSensorBasicDataChannel> &channel) ComputeBestPeriodCount() argument
424 ComputeBestFifoCount(uint32_t sensorId, sptr<MedicalSensorBasicDataChannel> &channel) ComputeBestFifoCount() argument
449 GetStoreEvent(int32_t sensorId, struct SensorEvent &event) GetStoreEvent() argument
632 UpdateCmd(uint32_t sensorId, int32_t uid, int32_t cmdType) UpdateCmd() argument
662 GetCmdList(uint32_t sensorId, int32_t uid) GetCmdList() argument
676 UpdateDataQueue(int32_t sensorId, struct SensorEvent &event) UpdateDataQueue() argument
700 ClearDataQueue(int32_t sensorId) ClearDataQueue() argument
[all...]
/base/sensors/medical_sensor/services/medical_sensor/hdi_connection/adapter/src/
H A Dcompatible_connection.cpp52 const int32_t sensorId = sensorInfos[i].sensorId; in GetSensorList() local
55 sensor.SetSensorId(sensorId); in GetSensorList()
64 int32_t CompatibleConnection::EnableSensor(int32_t sensorId) in EnableSensor() argument
66 int32_t ret = hdiServiceImpl_.EnableSensor(sensorId); in EnableSensor()
68 HiLog::Error(LABEL, "%{public}s enable sensor failed, sensorId: %{public}d", __func__, sensorId); in EnableSensor()
74 int32_t CompatibleConnection::DisableSensor(int32_t sensorId) in DisableSensor() argument
76 int32_t ret = hdiServiceImpl_.DisableSensor(sensorId); in DisableSensor()
78 HiLog::Error(LABEL, "%{public}s disable sensor failed, sensorId in DisableSensor()
84 SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) SetBatch() argument
94 SetMode(int32_t sensorId, int32_t mode) SetMode() argument
104 RunCommand(int32_t sensorId, int32_t cmd, int32_t params) RunCommand() argument
109 SetOption(int32_t sensorId, int32_t option) SetOption() argument
[all...]
/base/sensors/sensor/services/src/
H A Dsensor_power_policy.cpp40 bool SensorPowerPolicy::CheckFreezingSensor(int32_t sensorId) in CheckFreezingSensor() argument
42 return ((sensorId == SENSOR_TYPE_ID_PEDOMETER_DETECTION) || (sensorId == SENSOR_TYPE_ID_PEDOMETER)); in CheckFreezingSensor()
80 for (const auto &sensorId : sensorIdList) { in Suspend()
81 if (CheckFreezingSensor(sensorId)) { in Suspend()
85 auto sensorInfo = clientInfo_.GetCurPidSensorInfo(sensorId, pid); in Suspend()
86 if (sensorManager_.IsOtherClientUsingSensor(sensorId, pid)) { in Suspend()
87 SEN_HILOGD("Other client is using this sensor now, cannot suspend, sensorId:%{public}d", sensorId); in Suspend()
88 sensorInfoMap.insert(std::make_pair(sensorId, sensorInf in Suspend()
116 int32_t sensorId = sensorIt->first; ResumeSensors() local
136 Resume(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) Resume() argument
170 RestoreSensorInfo(int32_t pid, int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) RestoreSensorInfo() argument
[all...]
H A Dsensor_manager.cpp51 bool SensorManager::SetBestSensorParams(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) in SetBestSensorParams() argument
54 if (sensorId == INVALID_SENSOR_ID) { in SetBestSensorParams()
55 SEN_HILOGE("sensorId is invalid"); in SetBestSensorParams()
58 SensorBasicInfo sensorInfo = clientInfo_.GetBestSensorInfo(sensorId); in SetBestSensorParams()
68 auto ret = sensorHdiConnection_.SetBatch(sensorId, bestSamplingPeriodNs, bestReportDelayNs); in SetBestSensorParams()
76 bool SensorManager::ResetBestSensorParams(int32_t sensorId) in ResetBestSensorParams() argument
79 if (sensorId == INVALID_SENSOR_ID) { in ResetBestSensorParams()
80 SEN_HILOGE("sensorId is invalid"); in ResetBestSensorParams()
83 SensorBasicInfo sensorInfo = clientInfo_.GetBestSensorInfo(sensorId); in ResetBestSensorParams()
84 auto ret = sensorHdiConnection_.SetBatch(sensorId, in ResetBestSensorParams()
111 SaveSubscriber(int32_t sensorId, uint32_t pid, int64_t samplingPeriodNs, int64_t maxReportDelayNs) SaveSubscriber() argument
122 GetSensorInfo(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) GetSensorInfo() argument
150 IsOtherClientUsingSensor(int32_t sensorId, int32_t clientPid) IsOtherClientUsingSensor() argument
167 AfterDisableSensor(int32_t sensorId) AfterDisableSensor() argument
[all...]
H A Dsensor_service.cpp185 void SensorService::ReportSensorSysEvent(int32_t sensorId, bool enable, int32_t pid) in ReportSensorSysEvent() argument
197 "LEVEL", logLevel, "UID", uid, "PKG_NAME", packageName, "TYPE", sensorId); in ReportSensorSysEvent()
199 SEN_HILOGI("PackageName:%{public}s open the sensor, sensorId:%{public}d", packageName.c_str(), sensorId); in ReportSensorSysEvent()
203 "LEVEL", logLevel, "UID", uid, "PKG_NAME", packageName, "TYPE", sensorId); in ReportSensorSysEvent()
205 SEN_HILOGI("PackageName:%{public}s close the sensor, sensorId:%{public}d", packageName.c_str(), sensorId); in ReportSensorSysEvent()
209 void SensorService::ReportOnChangeData(int32_t sensorId) in ReportOnChangeData() argument
212 auto it = sensorMap_.find(sensorId); in ReportOnChangeData()
214 SEN_HILOGE("sensorId i in ReportOnChangeData()
236 SaveSubscriber(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) SaveSubscriber() argument
255 CheckSensorId(int32_t sensorId) CheckSensorId() argument
266 CheckParameter(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) CheckParameter() argument
276 EnableSensor(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs) EnableSensor() argument
328 DisableSensor(int32_t sensorId, int32_t pid) DisableSensor() argument
357 DisableSensor(int32_t sensorId) DisableSensor() argument
574 ReportActiveInfo(int32_t sensorId, int32_t pid) ReportActiveInfo() argument
591 RegisterPermCallback(int32_t sensorId) RegisterPermCallback() argument
[all...]
H A Dsensor_dump.cpp205 auto sensorId = sensor.GetSensorId(); in DumpSensorList() local
206 if (sensorMap_.find(sensorId) == sensorMap_.end()) { in DumpSensorList()
210 "sensorId:%8u | sensorType:%s | sensorName:%s | vendorName:%s | maxRange:%f" in DumpSensorList()
212 sensorId, sensorMap_[sensorId].c_str(), sensor.GetSensorName().c_str(), sensor.GetVendorName().c_str(), in DumpSensorList()
226 auto sensorId = channel.GetSensorId(); in DumpSensorChannel() local
227 if (sensorMap_.find(sensorId) == sensorMap_.end()) { in DumpSensorChannel()
231 "uid:%d | packageName:%s | sensorId:%8u | sensorType:%s | samplingPeriodNs:%" PRId64 "" in DumpSensorChannel()
233 channel.GetUid(), channel.GetPackageName().c_str(), sensorId, sensorMap_[sensorId] in DumpSensorChannel()
244 int32_t sensorId = sensor.GetSensorId(); DumpOpeningSensor() local
263 int32_t sensorId = sensorData.first; DumpSensorData() local
294 GetDataDimension(int32_t sensorId) GetDataDimension() argument
329 GetDataBySensorId(int32_t sensorId, SensorData &sensorData) GetDataBySensorId() argument
[all...]
/base/sensors/sensor/services/hdi_connection/interface/src/
H A Dsensor_hdi_connection.cpp118 for (const auto &sensorId : sensors) { in FindAllInSensorSet()
119 if (sensorSet_.find(sensorId) == sensorSet_.end()) { in FindAllInSensorSet()
120 mockSet_.insert(sensorId); in FindAllInSensorSet()
127 bool SensorHdiConnection::FindOneInMockSet(int32_t sensorId) in FindOneInMockSet() argument
130 return mockSet_.find(sensorId) != mockSet_.end(); in FindOneInMockSet()
211 for (const auto &sensorId : mockSet_) { in GetSensorList()
212 switch (sensorId) { in GetSensorList()
233 int32_t SensorHdiConnection::EnableSensor(int32_t sensorId) in EnableSensor() argument
240 if (FindOneInMockSet(sensorId)) { in EnableSensor()
242 ret = iSensorCompatibleHdiConnection_->EnableSensor(sensorId); in EnableSensor()
265 DisableSensor(int32_t sensorId) DisableSensor() argument
297 SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) SetBatch() argument
329 SetMode(int32_t sensorId, int32_t mode) SetMode() argument
[all...]
/base/sensors/sensor_lite/services/src/
H A Dsensor_service_impl.c141 int32_t ActivateSensorImpl(int32_t sensorId, const SensorUser *user) in ActivateSensorImpl() argument
145 if ((sensorId >= SENSOR_TYPE_ID_MAX) || (sensorId < 0)) { in ActivateSensorImpl()
146 HILOG_ERROR(HILOG_MODULE_APP, "[SERVICE:%s]: %s sensorId: %d is invalid", in ActivateSensorImpl()
147 SENSOR_SERVICE, __func__, sensorId); in ActivateSensorImpl()
161 int32_t ret = g_sensorDevice->Enable(sensorId); in ActivateSensorImpl()
171 int32_t DeactivateSensorImpl(int32_t sensorId, const SensorUser *user) in DeactivateSensorImpl() argument
175 if ((sensorId >= SENSOR_TYPE_ID_MAX) || (sensorId < 0)) { in DeactivateSensorImpl()
176 HILOG_ERROR(HILOG_MODULE_APP, "[SERVICE:%s]: %s sensorId in DeactivateSensorImpl()
201 SetBatchImpl(int32_t sensorId, const SensorUser *user, int64_t samplingInterval, int64_t reportInterval) SetBatchImpl() argument
219 SubscribeSensorImpl(int32_t sensorId, const SensorUser *user) SubscribeSensorImpl() argument
249 UnsubscribeSensorImpl(int32_t sensorId, const SensorUser *user) UnsubscribeSensorImpl() argument
279 SetModeImpl(int32_t sensorId, const SensorUser *user, int32_t mode) SetModeImpl() argument
291 SetOptionImpl(int32_t sensorId, const SensorUser *user, int32_t option) SetOptionImpl() argument
[all...]
/base/sensors/sensor_lite/frameworks/src/
H A Dsensor_agent_client.c45 int32_t ActivateSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *sensorUser) in ActivateSensorByProxy() argument
52 return sensor->ActivateSensor(sensorId); in ActivateSensorByProxy()
55 int32_t DeactivateSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *sensorUser) in DeactivateSensorByProxy() argument
62 return sensor->DeactivateSensor(sensorId); in DeactivateSensorByProxy()
65 int32_t SetBatchByProxy(const void *proxy, int32_t sensorId, const SensorUser *user, int64_t samplingInterval, in SetBatchByProxy() argument
73 return sensor->SetBatch(sensorId, user, samplingInterval, reportInterval); in SetBatchByProxy()
76 int32_t SubscribeSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *sensorUser) in SubscribeSensorByProxy() argument
83 return sensor->SubscribeSensor(sensorId, sensorUser); in SubscribeSensorByProxy()
86 int32_t UnsubscribeSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *sensorUser) in UnsubscribeSensorByProxy() argument
93 return sensor->UnsubscribeSensor(sensorId, sensorUse in UnsubscribeSensorByProxy()
96 SetModeByProxy(const void *proxy, int32_t sensorId, const SensorUser *user, int32_t mode) SetModeByProxy() argument
106 SetOptionByProxy(const void *proxy, int32_t sensorId, const SensorUser *user, int32_t option) SetOptionByProxy() argument
[all...]
/base/sensors/sensor/services/include/
H A Dclient_info.h46 bool GetSensorState(int32_t sensorId);
47 SensorBasicInfo GetBestSensorInfo(int32_t sensorId);
48 bool OnlyCurPidSensorEnabled(int32_t sensorId, int32_t pid);
49 std::vector<sptr<SensorBasicDataChannel>> GetSensorChannel(int32_t sensorId);
52 bool UpdateSensorInfo(int32_t sensorId, int32_t pid, const SensorBasicInfo &sensorInfo);
53 void RemoveSubscriber(int32_t sensorId, uint32_t pid);
56 void ClearSensorInfo(int32_t sensorId);
57 void ClearCurPidSensorInfo(int32_t sensorId, int32_t pid);
60 SensorBasicInfo GetCurPidSensorInfo(int32_t sensorId, int32_t pid);
61 uint64_t ComputeBestPeriodCount(int32_t sensorId, spt
[all...]
/base/sensors/medical_sensor/services/medical_sensor/hdi_connection/hardware/src/
H A Dhdi_service_impl.cpp37 .sensorId = 0,
68 int32_t HdiServiceImpl::EnableSensor(uint32_t sensorId) in EnableSensor() argument
75 if (std::count(supportSensors.begin(), supportSensors.end(), sensorId) == 0) { in EnableSensor()
76 HiLog::Error(LABEL, "%{public}s not support enable sensorId: %{public}d", __func__, sensorId); in EnableSensor()
79 if (std::count(g_enableSensos.begin(), g_enableSensos.end(), sensorId) != 0) { in EnableSensor()
80 HiLog::Info(LABEL, "%{public}s sensorId: %{public}d has been enabled", __func__, sensorId); in EnableSensor()
83 g_enableSensos.push_back(sensorId); in EnableSensor()
95 int32_t HdiServiceImpl::DisableSensor(uint32_t sensorId) in DisableSensor() argument
114 SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) SetBatch() argument
126 SetMode(int32_t sensorId, int32_t mode) SetMode() argument
131 RunCommand(uint32_t sensorId, int32_t cmd, int32_t params) RunCommand() argument
136 SetOption(int32_t sensorId, uint32_t option) SetOption() argument
[all...]
/base/sensors/sensor_lite/frameworks/include/
H A Dsensor_agent_proxy.h41 int32_t ActivateSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *user);
42 int32_t DeactivateSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *user);
43 int32_t SetBatchByProxy(const void *proxy, int32_t sensorId, const SensorUser *user, int64_t samplingInterval,
45 int32_t SubscribeSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *user);
46 int32_t UnsubscribeSensorByProxy(const void *proxy, int32_t sensorId, const SensorUser *user);
47 int32_t SetModeByProxy(const void *proxy, int32_t sensorId, const SensorUser *user, int32_t mode);
48 int32_t SetOptionByProxy(const void *proxy, int32_t sensorId, const SensorUser *user, int32_t option);
/base/sensors/sensor/frameworks/native/src/
H A Dsensor_agent_proxy.cpp52 std::set<RecordSensorCallback> SensorAgentProxy::GetSubscribeUserCallback(int32_t sensorId) in GetSubscribeUserCallback() argument
55 auto iter = subscribeMap_.find(sensorId); in GetSubscribeUserCallback()
146 int32_t SensorAgentProxy::ActivateSensor(int32_t sensorId, const SensorUser *user) in ActivateSensor() argument
154 if (!SEN_CLIENT.IsValid(sensorId)) { in ActivateSensor()
155 SEN_HILOGE("sensorId is invalid, %{public}d", sensorId); in ActivateSensor()
159 if (subscribeMap_.find(sensorId) == subscribeMap_.end()) { in ActivateSensor()
160 SEN_HILOGE("Subscribe sensorId first"); in ActivateSensor()
163 auto& subscribeSet = subscribeMap_[sensorId]; in ActivateSensor()
168 int32_t ret = SEN_CLIENT.EnableSensor(sensorId, samplingInterval in ActivateSensor()
182 DeactivateSensor(int32_t sensorId, const SensorUser *user) DeactivateSensor() argument
216 SetBatch(int32_t sensorId, const SensorUser *user, int64_t samplingInterval, int64_t reportInterval) SetBatch() argument
243 SubscribeSensor(int32_t sensorId, const SensorUser *user) SubscribeSensor() argument
268 UnsubscribeSensor(int32_t sensorId, const SensorUser *user) UnsubscribeSensor() argument
304 SetMode(int32_t sensorId, const SensorUser *user, int32_t mode) SetMode() argument
[all...]
/base/sensors/sensor/services/hdi_connection/adapter/src/
H A Dcompatible_connection.cpp55 const int32_t sensorId = sensorInfos[i].sensorId; in GetSensorList() local
58 sensor.SetSensorId(sensorId); in GetSensorList()
59 sensor.SetSensorTypeId(sensorId); in GetSensorList()
74 int32_t CompatibleConnection::EnableSensor(int32_t sensorId) in EnableSensor() argument
76 int32_t ret = hdiServiceImpl_.EnableSensor(sensorId); in EnableSensor()
78 SEN_HILOGE("Enable sensor failed, sensorId:%{public}d", sensorId); in EnableSensor()
84 int32_t CompatibleConnection::DisableSensor(int32_t sensorId) in DisableSensor() argument
86 int32_t ret = hdiServiceImpl_.DisableSensor(sensorId); in DisableSensor()
94 SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) SetBatch() argument
104 SetMode(int32_t sensorId, int32_t mode) SetMode() argument
[all...]
/base/sensors/medical_sensor/services/medical_sensor/include/
H A Dclient_info.h42 MedicalSensorState GetSensorState(uint32_t sensorId);
43 MedicalSensorBasicInfo GetBestSensorInfo(uint32_t sensorId);
44 bool OnlyCurPidSensorEnabled(uint32_t sensorId, int32_t pid);
45 std::vector<sptr<MedicalSensorBasicDataChannel>> GetSensorChannel(uint32_t sensorId);
48 bool UpdateSensorInfo(uint32_t sensorId, int32_t pid, const MedicalSensorBasicInfo &sensorInfo);
49 void RemoveSubscriber(uint32_t sensorId, uint32_t pid);
52 bool ClearSensorInfo(uint32_t sensorId);
53 void ClearCurPidSensorInfo(uint32_t sensorId, int32_t pid);
56 MedicalSensorBasicInfo GetCurPidSensorInfo(uint32_t sensorId, int32_t pid);
57 uint64_t ComputeBestPeriodCount(uint32_t sensorId, spt
[all...]
H A Dmedical_sensor_manager.h33 bool SetBestSensorParams(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
34 bool ResetBestSensorParams(uint32_t sensorId);
35 ErrCode SaveSubscriber(uint32_t sensorId, uint32_t pid, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
37 MedicalSensorBasicInfo GetSensorInfo(uint32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
38 bool IsOtherClientUsingSensor(uint32_t sensorId, int32_t clientPid);
39 ErrCode AfterDisableSensor(uint32_t sensorId);
43 uint32_t GetSensorFlag(uint32_t sensorId);
/base/sensors/medical_sensor/services/medical_sensor/hdi_connection/adapter/include/
H A Dhdi_connection.h35 int32_t EnableSensor(int32_t sensorId) override;
37 int32_t DisableSensor(int32_t sensorId) override;
39 int32_t SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) override;
41 int32_t SetMode(int32_t sensorId, int32_t mode) override;
43 int32_t SetOption(int32_t sensorId, int32_t option) override;
45 int32_t RunCommand(int32_t sensorId, int32_t cmd, int32_t params) override;
64 void updateSensorBasicInfo(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
65 void setSensorBasicInfoState(int32_t sensorId, MedicalSensorState state);
66 void deleteSensorBasicInfoState(int32_t sensorId);
/base/sensors/medical_sensor/frameworks/native/medical_sensor/include/
H A Dmedical_sensor_service_client.h36 int32_t EnableSensor(uint32_t sensorId, int64_t samplingPeroid, int64_t maxReportDelay);
37 int32_t DisableSensor(uint32_t sensorId);
38 int32_t RunCommand(uint32_t sensorId, int32_t cmdType, int32_t parms);
42 int32_t SetOption(uint32_t sensorId, uint32_t opt);
46 void UpdateSensorInfoMap(uint32_t sensorId, int64_t samplingPeroid, int64_t maxReportDelay);
47 void DeleteSensorInfoItem(uint32_t sensorId);
48 bool IsValidSensorId(uint32_t sensorId);
/base/sensors/sensor/services/hdi_connection/adapter/include/
H A Dhdi_connection.h31 int32_t EnableSensor(int32_t sensorId) override;
32 int32_t DisableSensor(int32_t sensorId) override;
33 int32_t SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) override;
34 int32_t SetMode(int32_t sensorId, int32_t mode) override;
49 void UpdateSensorBasicInfo(int32_t sensorId, int64_t samplingPeriodNs, int64_t maxReportDelayNs);
50 void SetSensorBasicInfoState(int32_t sensorId, bool state);
51 void DeleteSensorBasicInfoState(int32_t sensorId);
/base/sensors/sensor_lite/services/include/
H A Dsensor_service.h54 int32_t (*ActivateSensor)(int32_t sensorId, const SensorUser *user);
55 int32_t (*DeactivateSensor)(int32_t sensorId, const SensorUser *user);
56 int32_t (*SetBatch)(int32_t sensorId, const SensorUser *user, int64_t samplingInterval, int64_t reportInterval);
57 int32_t (*SubscribeSensor)(int32_t sensorId, const SensorUser *user);
58 int32_t (*UnsubscribeSensor)(int32_t sensorId, const SensorUser *user);
59 int32_t (*SetMode)(int32_t sensorId, const SensorUser *user, int32_t mode);
60 int32_t (*SetOption)(int32_t sensorId, const SensorUser *user, int32_t option);
/base/sensors/medical_sensor/interfaces/native/src/
H A Dmedical_native_impl.cpp156 (*sensorInfo + index)->sensorId = sensorList_[index].GetSensorId(); in GetAllSensors()
162 int32_t ActivateSensor(int32_t sensorId, const MedicalSensorUser *user) in ActivateSensor() argument
165 if (user == nullptr || sensorId < 0 || user->callback == nullptr) { in ActivateSensor()
166 HiLog::Error(LABEL, "%{public}s user is null or sensorId is invalid", __func__); in ActivateSensor()
174 if ((g_subscribeMap.find(sensorId) == g_subscribeMap.end()) || (g_subscribeMap.at(sensorId) != user)) { in ActivateSensor()
175 HiLog::Error(LABEL, "%{public}s subscribe sensorId first", __func__); in ActivateSensor()
179 int32_t ret = client.EnableSensor(sensorId, g_samplingInterval, g_reportInterval); in ActivateSensor()
184 g_subscribeMap.erase(sensorId); in ActivateSensor()
190 int32_t DeactivateSensor(int32_t sensorId, cons argument
213 SetBatch(int32_t sensorId, const MedicalSensorUser *user, int64_t samplingInterval, int64_t reportInterval) SetBatch() argument
234 SubscribeSensor(int32_t sensorId, const MedicalSensorUser *user) SubscribeSensor() argument
251 UnsubscribeSensor(int32_t sensorId, const MedicalSensorUser *user) UnsubscribeSensor() argument
274 SetMode(int32_t sensorId, const MedicalSensorUser *user, int32_t mode) SetMode() argument
289 SetOption(int32_t sensorId, const MedicalSensorUser *user, int32_t option) SetOption() argument
[all...]

Completed in 10 milliseconds

12345