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

Method ReadXML

cpp/src/command_classes/SensorBinary.cpp:51–80  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Read node configuration data -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

49// Read node configuration data
50//-----------------------------------------------------------------------------
51void SensorBinary::ReadXML
52(
53 TiXmlElement const* _ccElement
54)
55{
56 CommandClass::ReadXML( _ccElement );
57
58 TiXmlElement const* child = _ccElement->FirstChildElement();
59
60 char const* str; int index; int type;
61
62 while( child )
63 {
64 str = child->Value();
65
66 if( str )
67 {
68 if( !strcmp( str, "SensorMap" ) )
69 {
70 if( TIXML_SUCCESS == child->QueryIntAttribute( "index", &index ) &&
71 TIXML_SUCCESS == child->QueryIntAttribute( "type", &type ) )
72 {
73 m_sensorsMap[(uint8)type] = (uint8)index;
74 }
75 }
76 }
77
78 child = child->NextSiblingElement();
79 }
80}
81//-----------------------------------------------------------------------------
82// <SensorBinary::WriteXML>
83// Write node configuration data

Callers

nothing calls this directly

Calls 4

QueryIntAttributeMethod · 0.80
FirstChildElementMethod · 0.45
ValueMethod · 0.45
NextSiblingElementMethod · 0.45

Tested by

no test coverage detected