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

Method ReadXML

cpp/src/command_classes/MultiChannelAssociation.cpp:70–107  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Read the saved association data -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

68// Read the saved association data
69//-----------------------------------------------------------------------------
70void MultiChannelAssociation::ReadXML
71(
72 TiXmlElement const* _ccElement
73)
74{
75 CommandClass::ReadXML( _ccElement );
76
77 TiXmlElement const* associationsElement = _ccElement->FirstChildElement();
78 while( associationsElement )
79 {
80 char const* str = associationsElement->Value();
81 if( str && !strcmp( str, "Associations" ) )
82 {
83 int intVal;
84 if( TIXML_SUCCESS == associationsElement->QueryIntAttribute( "num_groups", &intVal ) )
85 {
86 m_numGroups = (uint8)intVal;
87 }
88
89 TiXmlElement const* groupElement = associationsElement->FirstChildElement();
90 while( groupElement )
91 {
92 if( Node* node = GetNodeUnsafe() )
93 {
94 Group* group = new Group( GetHomeId(), GetNodeId(), groupElement );
95 node->AddGroup( group );
96 }
97
98 groupElement = groupElement->NextSiblingElement();
99 }
100
101 break;
102 }
103
104 associationsElement = associationsElement->NextSiblingElement();
105 }
106
107}
108
109//-----------------------------------------------------------------------------
110// <MultiChannelAssociation::WriteXML>

Callers

nothing calls this directly

Calls 7

QueryIntAttributeMethod · 0.80
AddGroupMethod · 0.80
GetHomeIdFunction · 0.70
GetNodeIdFunction · 0.70
FirstChildElementMethod · 0.45
ValueMethod · 0.45
NextSiblingElementMethod · 0.45

Tested by

no test coverage detected