MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / getMeter

Method getMeter

src/model/ElectricLoadCenterTransformer.cpp:394–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 }
393
394 boost::optional<std::string> ElectricLoadCenterTransformer_Impl::getMeter(unsigned index) const {
395 //return meter at index
396 boost::optional<std::string> result;
397 auto groups = extensibleGroups();
398 unsigned sizeOfGroup = numExtensibleGroups();
399
400 if ((index < sizeOfGroup) && (!groups[index].empty())) {
401 auto group = groups[index].cast<WorkspaceExtensibleGroup>();
402 boost::optional<std::string> wo = group.getString(OS_ElectricLoadCenter_TransformerExtensibleFields::MeterName);
403 if (wo) {
404 result = wo.get();
405 }
406 }
407 return result;
408 }
409
410 std::vector<std::string> ElectricLoadCenterTransformer_Impl::meters() const {
411 // loop through extensible groups and return vector of meters

Callers 1

TEST_FFunction · 0.80

Calls 3

emptyMethod · 0.45
getStringMethod · 0.45
getMethod · 0.45

Tested by 1

TEST_FFunction · 0.64