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

Method GetAssociations

cpp/src/Group.cpp:428–452  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get a list of associations for this group -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

426// Get a list of associations for this group
427//-----------------------------------------------------------------------------
428uint32 Group::GetAssociations
429(
430 uint8** o_associations
431)
432{
433 size_t numNodes = m_associations.size();
434 if( !numNodes )
435 {
436 *o_associations = NULL;
437 return 0;
438 }
439
440 uint8* associations = new uint8[numNodes]; // room for all associations, we only need room for the associations without instance
441 uint32 i = 0;
442 for( map<InstanceAssociation,AssociationCommandVec,classcomp>::iterator it = m_associations.begin(); it != m_associations.end(); ++it )
443 {
444 if ( it->first.m_instance == 0x00)
445 {
446 associations[i++] = it->first.m_nodeId;
447 }
448 }
449
450 *o_associations = associations;
451 return (uint32) i;
452}
453
454//-----------------------------------------------------------------------------
455// <Group::GetAssociations>

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected