Lines Matching refs:id
42 int32_t id = mPowerEntityInfos.size(); in addStateResidencyDataProvider() local
50 .id = id++, in addStateResidencyDataProvider()
83 for (const int32_t id : in_powerEntityIds) { in getStateResidency() local
85 if (id < 0 || id >= mPowerEntityInfos.size()) { in getStateResidency()
90 std::string powerEntityName = mPowerEntityInfos[id].name; in getStateResidency()
92 mStateResidencyDataProviders.at(mStateResidencyDataProviderIndex.at(id)) in getStateResidency()
100 .id = id, in getStateResidency()
122 int32_t id = mEnergyConsumers.size(); in addEnergyConsumer() local
124 EnergyConsumer{.id = id, .ordinal = count, .type = info.first, .name = info.second}); in addEnergyConsumer()
146 for (const auto id : in_energyConsumerIds) { in getEnergyConsumed() local
148 if (id < 0 || id >= mEnergyConsumers.size()) { in getEnergyConsumed()
152 auto resopt = mEnergyConsumers[id]->getEnergyConsumed(); in getEnergyConsumed()
155 res.id = id; in getEnergyConsumed()
159 LOG(ERROR) << "Failed to get results for " << mEnergyConsumerInfos[id].name; in getEnergyConsumed()
205 entityNames->emplace(info.id, info.name); in getEntityStateNames()
206 stateNames->emplace(info.id, std::unordered_map<int32_t, std::string>()); in getEntityStateNames()
207 auto &entityStateNames = stateNames->at(info.id); in getEntityStateNames()
209 entityStateNames.emplace(state.id, state.name); in getEntityStateNames()
219 channelNames->emplace(info.id, "[" + info.name + "]:" + info.subsystem); in getChannelNames()
251 prevEnergyDataMap.emplace(data.id, data.energyUWs); in dumpEnergyMeter()
255 auto prevEnergyDataIt = prevEnergyDataMap.find(data.id); in dumpEnergyMeter()
261 oss << ::android::base::StringPrintf(dataFormatDelta, channelNames.at(data.id).c_str(), in dumpEnergyMeter()
272 oss << ::android::base::StringPrintf(dataFormat, channelNames.at(data.id).c_str(), in dumpEnergyMeter()
314 prevResultsMap.emplace(prevResult.id, std::unordered_map<int32_t, StateResidency>()); in dumpStateResidency()
316 prevResultsMap.at(prevResult.id).emplace(stateResidency.id, stateResidency); in dumpStateResidency()
322 const char *entityName = entityNames.at(result.id).c_str(); in dumpStateResidency()
325 auto prevEntityResultIt = prevResultsMap.find(result.id); in dumpStateResidency()
329 const char *stateName = stateNames.at(result.id).at(stateResidency.id).c_str(); in dumpStateResidency()
337 auto prevStateResidencyIt = prevEntityResultIt->second.find(stateResidency.id); in dumpStateResidency()
365 dataFormat, entityNames.at(result.id).c_str(), in dumpStateResidency()
366 stateNames.at(result.id).at(stateResidency.id).c_str(), in dumpStateResidency()
386 mEnergyConsumers[result.id]->getConsumerName().c_str(), in dumpEnergyConsumer()