----------------------------------------------------------------------------- Get the specified command class object if supported, otherwise NULL -----------------------------------------------------------------------------
| 2105 | // Get the specified command class object if supported, otherwise NULL |
| 2106 | //----------------------------------------------------------------------------- |
| 2107 | CommandClass* 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> |