Home
last modified time | relevance | path

Searched refs:sensorHandle (Results 1 – 24 of 24) sorted by relevance

/hardware/interfaces/sensors/2.0/multihal/tests/fake_subhal/
DSensor.cpp35 Sensor::Sensor(int32_t sensorHandle, ISensorsEventCallback* callback) in Sensor() argument
41 mSensorInfo.sensorHandle = sensorHandle; in Sensor()
98 ev.sensorHandle = mSensorInfo.sensorHandle; in flush()
144 event.sensorHandle = mSensorInfo.sensorHandle; in readEvents()
182 OnChangeSensor::OnChangeSensor(int32_t sensorHandle, ISensorsEventCallback* callback) in OnChangeSensor() argument
183 : Sensor(sensorHandle, callback), mPreviousEventSet(false) { in OnChangeSensor()
209 ContinuousSensor::ContinuousSensor(int32_t sensorHandle, ISensorsEventCallback* callback) in ContinuousSensor() argument
210 : Sensor(sensorHandle, callback) { in ContinuousSensor()
214 AccelSensor::AccelSensor(int32_t sensorHandle, ISensorsEventCallback* callback) in AccelSensor() argument
215 : ContinuousSensor(sensorHandle, callback) { in AccelSensor()
[all …]
DSensor.h48 Sensor(int32_t sensorHandle, ISensorsEventCallback* callback);
84 OnChangeSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
98 ContinuousSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
103 AccelSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
111 GyroSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
119 DeviceTempSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
124 PressureSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
129 MagnetometerSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
134 AmbientTempSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
139 LightSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
[all …]
DSensorsSubHal.h55 Return<Result> activate(int32_t sensorHandle, bool enabled) override;
57 Return<Result> batch(int32_t sensorHandle, int64_t samplingPeriodNs,
60 Return<Result> flush(int32_t sensorHandle) override;
69 Return<void> configDirectReport(int32_t sensorHandle, int32_t channelHandle, RateLevel rate,
93 mSensors[sensor->getSensorInfo().sensorHandle] = sensor; in AddSensor()
DSensorsSubHal.cpp75 Return<Result> SensorsSubHal::activate(int32_t sensorHandle, bool enabled) { in activate() argument
76 auto sensor = mSensors.find(sensorHandle); in activate()
84 Return<Result> SensorsSubHal::batch(int32_t sensorHandle, int64_t samplingPeriodNs, in batch() argument
86 auto sensor = mSensors.find(sensorHandle); in batch()
94 Return<Result> SensorsSubHal::flush(int32_t sensorHandle) { in flush() argument
95 auto sensor = mSensors.find(sensorHandle); in flush()
103 auto sensor = mSensors.find(event.sensorHandle); in injectSensorData()
/hardware/interfaces/sensors/2.0/multihal/
DHalProxy.cpp57 int32_t setSubHalIndex(int32_t sensorHandle, size_t subHalIndex) { in setSubHalIndex() argument
58 return sensorHandle | (static_cast<int32_t>(subHalIndex) << kBitsAfterSubHalIndex); in setSubHalIndex()
68 size_t extractSubHalIndex(int32_t sensorHandle) { in extractSubHalIndex() argument
69 return static_cast<size_t>(sensorHandle >> kBitsAfterSubHalIndex); in extractSubHalIndex()
130 Return<Result> HalProxy::activate(int32_t sensorHandle, bool enabled) { in activate() argument
131 if (!isSubHalIndexValid(sensorHandle)) { in activate()
134 return getSubHalForSensorHandle(sensorHandle) in activate()
135 ->activate(clearSubHalIndex(sensorHandle), enabled); in activate()
206 Return<Result> HalProxy::batch(int32_t sensorHandle, int64_t samplingPeriodNs, in batch() argument
208 if (!isSubHalIndexValid(sensorHandle)) { in batch()
[all …]
/hardware/interfaces/sensors/2.0/default/
DSensor.cpp89 ev.sensorHandle = mSensorInfo.sensorHandle; in flush()
135 event.sensorHandle = mSensorInfo.sensorHandle; in readEvents()
198 AccelSensor::AccelSensor(int32_t sensorHandle, ISensorsEventCallback* callback) : Sensor(callback) { in AccelSensor() argument
199 mSensorInfo.sensorHandle = sensorHandle; in AccelSensor()
216 PressureSensor::PressureSensor(int32_t sensorHandle, ISensorsEventCallback* callback) in PressureSensor() argument
218 mSensorInfo.sensorHandle = sensorHandle; in PressureSensor()
235 MagnetometerSensor::MagnetometerSensor(int32_t sensorHandle, ISensorsEventCallback* callback) in MagnetometerSensor() argument
237 mSensorInfo.sensorHandle = sensorHandle; in MagnetometerSensor()
254 LightSensor::LightSensor(int32_t sensorHandle, ISensorsEventCallback* callback) in LightSensor() argument
256 mSensorInfo.sensorHandle = sensorHandle; in LightSensor()
[all …]
DSensor.h98 AccelSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
103 GyroSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
108 AmbientTempSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
113 DeviceTempSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
118 PressureSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
123 MagnetometerSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
128 LightSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
133 ProximitySensor(int32_t sensorHandle, ISensorsEventCallback* callback);
138 RelativeHumiditySensor(int32_t sensorHandle, ISensorsEventCallback* callback);
DSensors.cpp82 Return<Result> Sensors::activate(int32_t sensorHandle, bool enabled) { in activate() argument
83 auto sensor = mSensors.find(sensorHandle); in activate()
140 Return<Result> Sensors::batch(int32_t sensorHandle, int64_t samplingPeriodNs, in batch() argument
142 auto sensor = mSensors.find(sensorHandle); in batch()
150 Return<Result> Sensors::flush(int32_t sensorHandle) { in flush() argument
151 auto sensor = mSensors.find(sensorHandle); in flush()
159 auto sensor = mSensors.find(event.sensorHandle); in injectSensorData()
DSensors.h64 Return<Result> activate(int32_t sensorHandle, bool enabled) override;
71 Return<Result> batch(int32_t sensorHandle, int64_t samplingPeriodNs,
74 Return<Result> flush(int32_t sensorHandle) override;
83 Return<void> configDirectReport(int32_t sensorHandle, int32_t channelHandle, RateLevel rate,
96 mSensors[sensor->getSensorInfo().sensorHandle] = sensor; in AddSensor()
/hardware/interfaces/sensors/2.0/vts/functional/
DVtsHalSensorsV2_0TargetTest.cpp61 mFlushMap[event.sensorHandle]++; in onEvent()
65 mEventMap[event.sensorHandle].push_back(event); in onEvent()
70 int32_t getFlushCount(int32_t sensorHandle) { in getFlushCount() argument
72 return mFlushMap[sensorHandle]; in getFlushCount()
82 const std::vector<Event> getEvents(int32_t sensorHandle) { in getEvents() argument
84 return mEventMap[sensorHandle]; in getEvents()
95 if (getFlushCount(sensor.sensorHandle) < numCallsToFlush) { in flushesReceived()
104 if (getEvents(sensor.sensorHandle).size() == 0) { in eventsReceived()
141 Return<Result> activate(int32_t sensorHandle, bool enabled) override;
143 Return<Result> batch(int32_t sensorHandle, int64_t samplingPeriodNs, in batch() argument
[all …]
DSensorsHidlEnvironmentV2_0.cpp96 if (!mSensors->activate(i.sensorHandle, false).isOk()) { in resetHal()
/hardware/interfaces/sensors/2.0/multihal/include/
DHalProxy.h72 Return<Result> activate(int32_t sensorHandle, bool enabled) override;
79 Return<Result> batch(int32_t sensorHandle, int64_t samplingPeriodNs,
82 Return<Result> flush(int32_t sensorHandle) override;
91 Return<void> configDirectReport(int32_t sensorHandle, int32_t channelHandle, RateLevel rate,
127 const SensorInfo& getSensorInfo(int32_t sensorHandle) { return mSensors[sensorHandle]; } in getSensorInfo() argument
341 ISensorsSubHal* getSubHalForSensorHandle(int32_t sensorHandle);
350 bool isSubHalIndexValid(int32_t sensorHandle);
369 static int32_t clearSubHalIndex(int32_t sensorHandle);
376 static bool subHalIndexIsClear(int32_t sensorHandle);
/hardware/interfaces/sensors/1.0/vts/functional/
DVtsHalSensorsV1_0TargetTest.cpp56 Return<Result> activate(int32_t sensorHandle, bool enabled) override;
58 Return<Result> batch(int32_t sensorHandle, int64_t samplingPeriodNs, in batch() argument
60 return S()->batch(sensorHandle, samplingPeriodNs, maxReportLatencyNs); in batch()
63 Return<Result> flush(int32_t sensorHandle) override { return S()->flush(sensorHandle); } in flush() argument
76 Return<void> configDirectReport(int32_t sensorHandle, int32_t channelHandle, RateLevel rate, in configDirectReport() argument
78 return S()->configDirectReport(sensorHandle, channelHandle, rate, _hidl_cb); in configDirectReport()
90 Return<Result> SensorsHidlTest::activate(int32_t sensorHandle, bool enabled) { in activate() argument
96 mSensorHandles.insert(sensorHandle); in activate()
98 return S()->activate(sensorHandle, enabled); in activate()
158 << s.sensorHandle << std::dec << " type=" << static_cast<int>(s.type) in TEST_P()
[all …]
DSensorsHidlEnvironmentV1_0.cpp68 if (!sensors->activate(i.sensorHandle, false).isOk()) { in resetHal()
/hardware/interfaces/sensors/2.0/multihal/tests/
DHalProxy_test.cpp572 for (int32_t sensorHandle = 1; sensorHandle < 10; sensorHandle++) { in TEST() local
573 nonDynamicSensorHandles.push_back(sensorHandle); in TEST()
612 auto sensorHandleSeen = sensorsSeen[i].sensorHandle; in TEST()
633 for (int32_t sensorHandle = 1; sensorHandle < 10; sensorHandle++) { in TEST() local
634 nonDynamicSensorHandles.push_back(sensorHandle); in TEST()
691 event.sensorHandle = 0x00000001 | (kNumSubHalsInt32 << 24); in TEST()
711 eventIn.sensorHandle = sensorHandleToPost; in TEST()
718 EXPECT_EQ(eventOut.sensorHandle, (subhal1Index << 24) | sensorHandleToPost); in TEST()
724 EXPECT_EQ(eventOut.sensorHandle, (subhal2Index << 24) | sensorHandleToPost); in TEST()
776 EXPECT_EQ(proxySensor.sensorHandle & 0x00FFFFFF, subHalSensor.sensorHandle); in testSensorsListFromProxyAndSubHal()
[all …]
/hardware/interfaces/sensors/1.0/
DISensors.hal48 * @param sensorHandle is the handle of the sensor to change.
51 * @return result OK on success, BAD_VALUE if sensorHandle is invalid.
53 activate(int32_t sensorHandle, bool enabled) generates (Result result);
90 * @param sensorHandle handle of sensor to be changed.
96 batch(int32_t sensorHandle,
112 * @param sensorHandle handle of sensor to be flushed.
113 * @return result OK on success and BAD_VALUE if sensorHandle is invalid.
115 flush(int32_t sensorHandle) generates (Result result);
179 * @param sensorHandle handle of sensor to be configured. When combined
180 * with STOP rate, sensorHandle can be -1 to denote all active
[all …]
Dtypes.hal817 int32_t sensorHandle;
973 int32_t sensorHandle;
1248 int32_t sensorHandle;
/hardware/interfaces/sensors/common/vts/utils/include/sensors-vts-utils/
DSensorsHidlTestBase.h72 virtual Return<Result> activate(int32_t sensorHandle, bool enabled) = 0;
74 virtual Return<Result> batch(int32_t sensorHandle, int64_t samplingPeriodNs,
77 virtual Return<Result> flush(int32_t sensorHandle) = 0;
82 virtual Return<void> configDirectReport(int32_t sensorHandle, int32_t channelHandle,
/hardware/interfaces/sensors/common/vts/utils/
DSensorsHidlTestBase.cpp292 configDirectReport(sensor.sensorHandle, channelHandle, rate, in testDirectReportOperation()
328 EXPECT_EQ(eventToken, e.sensorHandle) in testDirectReportOperation()
354 configDirectReport(sensor.sensorHandle, channelHandle, RateLevel::STOP, in testDirectReportOperation()
383 int32_t handle = sensor.sensorHandle; in testStreamingOperation()
400 EXPECT_EQ(e.sensorHandle, handle) in testStreamingOperation()
436 int32_t handle = sensor.sensorHandle; in testSamplingRateHotSwitchOperation()
478 ASSERT_EQ(e.sensorHandle, handle); in testSamplingRateHotSwitchOperation()
494 ASSERT_EQ(e.sensorHandle, handle); in testSamplingRateHotSwitchOperation()
532 int32_t handle = sensor.sensorHandle; in testBatchingOperation()
577 if (e.sensorType == type && e.sensorHandle == handle) { in testBatchingOperation()
DSensorsTestSharedMemory.cpp81 .sensorHandle = token, in parseEvents()
/hardware/interfaces/sensors/1.0/default/
Dconvert.cpp31 dst->sensorHandle = src.handle; in convertFromSensor()
51 dst->handle = src.sensorHandle; in convertToSensor()
72 .sensorHandle = src.sensor, in convertFromSensorEvent()
82 dst->sensorHandle = src.meta_data.sensor; in convertFromSensorEvent()
171 dst->u.dynamic.sensorHandle = src.dynamic_sensor_meta.handle; in convertFromSensorEvent()
203 .sensor = src.sensorHandle, in convertToSensorEvent()
213 dst->meta_data.sensor = src.sensorHandle; in convertToSensorEvent()
305 dst->dynamic_sensor_meta.handle = src.u.dynamic.sensorHandle; in convertToSensorEvent()
DSensors.h62 int32_t sensorHandle, int32_t channelHandle, RateLevel rate,
DSensors.cpp303 int32_t sensorHandle, int32_t channelHandle, RateLevel rate, in configDirectReport() argument
321 sensorHandle, channelHandle, &cfg); in configDirectReport()
/hardware/interfaces/sensors/2.0/
DISensors.hal63 * @param sensorHandle is the handle of the sensor to change.
65 * @return result OK on success, BAD_VALUE if sensorHandle is invalid.
67 activate(int32_t sensorHandle, bool enabled) generates (Result result);
166 * @param sensorHandle handle of sensor to be changed.
172 batch(int32_t sensorHandle,
190 * @param sensorHandle handle of sensor to be flushed.
191 * @return result OK on success and BAD_VALUE if sensorHandle is invalid.
193 flush(int32_t sensorHandle) generates (Result result);
257 * @param sensorHandle handle of sensor to be configured. When combined
258 * with STOP rate, sensorHandle can be -1 to denote all active sensors
[all …]