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

Method GetCommandClassId

cpp/src/command_classes/CommandClasses.cpp:330–343  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Convert a command class name (e.g COMMAND_CLASS_BASIC) into its 8-bit ID -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

328// Convert a command class name (e.g COMMAND_CLASS_BASIC) into its 8-bit ID
329//-----------------------------------------------------------------------------
330uint8 CommandClasses::GetCommandClassId
331(
332 string const& _name
333)
334{
335 string upperName = ToUpper( _name );
336 map<string,uint8>::iterator it = m_namesToIDs.find( upperName );
337 if( it != m_namesToIDs.end() )
338 {
339 return it->second;
340 }
341
342 return 0xff;
343}
344
345//-----------------------------------------------------------------------------
346// <CommandClasses::GetAdvertisedCommandClasses>

Callers

nothing calls this directly

Calls 3

ToUpperFunction · 0.85
findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected