Lines Matching refs:propId

97                 int32_t propId = value->getPropId();  in onPropertyEvent()  local
98 mEvents[propId].push_back(std::move(value->clone())); in onPropertyEvent()
109 bool waitForExpectedEvents(int32_t propId, size_t expectedEvents, in waitForExpectedEvents() argument
112 return mEventCond.wait_for(uniqueLock, timeout, [this, propId, expectedEvents] { in waitForExpectedEvents()
114 return mEvents[propId].size() >= expectedEvents; in waitForExpectedEvents()
118 std::vector<std::unique_ptr<IHalPropValue>> getEvents(int32_t propId) { in getEvents() argument
121 if (mEvents.find(propId) == mEvents.end()) { in getEvents()
124 for (const auto& eventPtr : mEvents[propId]) { in getEvents()
130 std::vector<int64_t> getEventTimestamps(int32_t propId) { in getEventTimestamps() argument
133 if (mEvents.find(propId) == mEvents.end()) { in getEventTimestamps()
136 for (const auto& valuePtr : mEvents[propId]) { in getEventTimestamps()
161 void verifyProperty(VehicleProperty propId, VehiclePropertyAccess access,
258 int32_t propId = configs[i]->getPropId(); in TEST_P() local
259 if (!isSystemProp(propId)) { in TEST_P()
263 std::string propName = propIdToString(propId); in TEST_P()
264 auto it = VersionForVehicleProperty.find(static_cast<VehicleProperty>(propId)); in TEST_P()
300 int32_t propId = toInt(VehicleProperty::PERF_VEHICLE_SPEED); in TEST_P() local
301 if (!checkIsSupported(propId)) { in TEST_P()
302 GTEST_SKIP() << "Property: " << propId << " is not supported, skip the test"; in TEST_P()
304 auto result = mVhalClient->getValueSync(*mVhalClient->createHalPropValue(propId)); in TEST_P()
308 propId, result.error().message().c_str()); in TEST_P()
363 int32_t propId = cfg.getPropId(); in TEST_P() local
371 if (isReadWrite && isBooleanGlobalProp(propId) && !hvacProps.count(propId)) { in TEST_P()
372 auto propToGet = mVhalClient->createHalPropValue(propId); in TEST_P()
379 propId); in TEST_P()
385 propId, getValueResult.error().message().c_str()); in TEST_P()
387 << StringPrintf("Result value must not be null for property: %" PRId32, propId); in TEST_P()
392 "Expect exactly 1 int value for boolean property: %" PRId32 ", got %zu", propId, in TEST_P()
396 auto propToSet = mVhalClient->createHalPropValue(propId); in TEST_P()
405 propId); in TEST_P()
411 propId, setValueResult.error().message().c_str()); in TEST_P()
433 propId); in TEST_P()
439 propId, getValueResult.error().message().c_str()); in TEST_P()
441 << StringPrintf("Result value must not be null for property: %" PRId32, propId); in TEST_P()
444 propId); in TEST_P()
453 int32_t propId = toInt(VehicleProperty::PERF_VEHICLE_SPEED); in TEST_P() local
454 if (!checkIsSupported(propId)) { in TEST_P()
455 GTEST_SKIP() << "Property: " << propId << " is not supported, skip the test"; in TEST_P()
458 auto getValueResult = mVhalClient->getValueSync(*mVhalClient->createHalPropValue(propId)); in TEST_P()
460 << StringPrintf("Failed to get value for property: %" PRId32 ", error: %s", propId, in TEST_P()
473 int32_t propId = toInt(VehicleProperty::INVALID); in TEST_P() local
474 auto getValueResult = mVhalClient->getValueSync(*mVhalClient->createHalPropValue(propId)); in TEST_P()
478 auto propToSet = mVhalClient->createHalPropValue(propId); in TEST_P()
488 ASSERT_FALSE(cfg.getPropId() == propId) << "Expect VehicleProperty::INVALID to not be " in TEST_P()
497 int32_t propId = toInt(VehicleProperty::PERF_VEHICLE_SPEED); in TEST_P() local
498 if (!checkIsSupported(propId)) { in TEST_P()
499 GTEST_SKIP() << "Property: " << propId << " is not supported, skip the test"; in TEST_P()
502 auto propConfigsResult = mVhalClient->getPropConfigs({propId}); in TEST_P()
520 auto result = client->subscribe({{.propId = propId, .sampleRate = minSampleRate}}); in TEST_P()
524 propId, result.error().message().c_str()); in TEST_P()
531 ASSERT_TRUE(mCallback->waitForExpectedEvents(propId, std::floor(minSampleRate), in TEST_P()
536 result = client->subscribe({{.propId = propId, .sampleRate = maxSampleRate}}); in TEST_P()
540 propId, result.error().message().c_str()); in TEST_P()
543 ASSERT_TRUE(mCallback->waitForExpectedEvents(propId, std::floor(maxSampleRate), in TEST_P()
549 for (const int64_t& eventTimestamp : mCallback->getEventTimestamps(propId)) { in TEST_P()
556 result = client->unsubscribe({propId}); in TEST_P()
559 propId, result.error().message().c_str()); in TEST_P()
562 ASSERT_FALSE(mCallback->waitForExpectedEvents(propId, 10, std::chrono::seconds(1))) in TEST_P()
580 int32_t propId = toInt(VehicleProperty::PERF_VEHICLE_SPEED); in TEST_P() local
581 if (!checkIsSupported(propId)) { in TEST_P()
582 GTEST_SKIP() << "Property: " << propId << " is not supported, skip the test"; in TEST_P()
588 auto propConfigsResult = mVhalClient->getPropConfigs({propId}); in TEST_P()
609 SubscribeOptionsBuilder builder(propId); in TEST_P()
618 propId, result.error().message().c_str()); in TEST_P()
623 client->unsubscribe({propId}); in TEST_P()
625 auto events = mCallback->getEvents(propId); in TEST_P()
657 SubscribeOptions{.propId = kInvalidProp, .sampleRate = 10.0}}; in TEST_P()
675 int32_t propId = toInt(VehicleProperty::PARKING_BRAKE_ON); in TEST_P() local
676 if (!checkIsSupported(propId)) { in TEST_P()
677 GTEST_SKIP() << "Property: " << propId << " is not supported, skip the test"; in TEST_P()
679 auto prop = mVhalClient->createHalPropValue(propId); in TEST_P()
685 propId, result.error().message().c_str()); in TEST_P()
696 propId, result.error().message().c_str()); in TEST_P()
774 void VtsHalAutomotiveVehicleTargetTest::verifyProperty(VehicleProperty propId, in verifyProperty() argument
779 int expectedPropId = toInt(propId); in verifyProperty()