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

Method GetCommandClass

cpp/src/Node.cpp:2107–2131  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get the specified command class object if supported, otherwise NULL -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2105// Get the specified command class object if supported, otherwise NULL
2106//-----------------------------------------------------------------------------
2107CommandClass* Node::GetCommandClass
2108(
2109 uint8 const _commandClassId,
2110 bool advertised
2111)const
2112{
2113 if (!advertised) {
2114 map<uint8,CommandClass*>::const_iterator it = m_commandClassMap.find( _commandClassId );
2115 if( it != m_commandClassMap.end() )
2116 {
2117 return it->second;
2118 }
2119 }
2120 else
2121 {
2122 map<uint8, CommandClass*>::const_iterator it = m_advertisedCommandClassMap.find( _commandClassId );
2123 if (it != m_advertisedCommandClassMap.end() )
2124 {
2125 return it->second;
2126 }
2127 }
2128
2129 // Not found
2130 return NULL;
2131}
2132
2133//-----------------------------------------------------------------------------
2134// <Node::AddCommandClass>

Callers 15

AddAssociationMethod · 0.80
RemoveAssociationMethod · 0.80
OnGroupChangedMethod · 0.80
IsNodeAwakeMethod · 0.80
RefreshValueMethod · 0.80
SendMsgMethod · 0.80
WriteMsgMethod · 0.80
HandleSendDataRequestMethod · 0.80
PollThreadProcMethod · 0.80

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by 1

TestNetworkMethod · 0.64