MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / GetInstanceLabel

Method GetInstanceLabel

cpp/src/Node.cpp:1636–1659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1634}
1635
1636string Node::GetInstanceLabel
1637(
1638 uint8 const _ccid,
1639 uint8 const _instance
1640)
1641{
1642 string label;
1643 /* find the CommandClass */
1644 CommandClass *_cc = GetCommandClass(_ccid);
1645 if ( _cc )
1646 label = _cc->GetInstanceLabel(_instance);
1647 /* if the Label is Empty - Then use the Global Label */
1648 if ( label.empty() ) {
1649 if ( m_globalInstanceLabel.count(_instance) )
1650 label = m_globalInstanceLabel[_instance];
1651 else {
1652 /* construct a Default Label */
1653 std::ostringstream sstream;
1654 sstream << Localization::Get()->GetGlobalLabel("Instance") << " " << (int)_instance << ":";
1655 label = sstream.str();
1656 }
1657 }
1658 return label;
1659}
1660
1661uint8 Node::GetNumInstances
1662(

Callers

nothing calls this directly

Calls 3

GetGlobalLabelMethod · 0.80
GetFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected