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

Method GetRoleTypeString

cpp/src/Node.cpp:3842–3854  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get the ZWave+ RoleType as a String -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3840// Get the ZWave+ RoleType as a String
3841//-----------------------------------------------------------------------------
3842string Node::GetRoleTypeString() {
3843 if( !s_deviceClassesLoaded )
3844 {
3845 ReadDeviceClasses();
3846 }
3847 map<uint8,DeviceClass*>::iterator nit = s_roleDeviceClasses.find( m_role );
3848 if (nit != s_roleDeviceClasses.end())
3849 {
3850 DeviceClass* deviceClass = nit->second;
3851 return deviceClass->GetLabel();
3852 }
3853 return "";
3854}
3855//-----------------------------------------------------------------------------
3856// <Node::GetRoleTypeString>
3857// Get the ZWave+ NodeType as a String

Callers 1

GetNodeRoleStringMethod · 0.80

Calls 3

findMethod · 0.80
endMethod · 0.45
GetLabelMethod · 0.45

Tested by

no test coverage detected