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

Method WriteXML

cpp/src/command_classes/SensorBinary.cpp:85–105  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Write node configuration data -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

83// Write node configuration data
84//-----------------------------------------------------------------------------
85void SensorBinary::WriteXML
86(
87 TiXmlElement* _ccElement
88)
89{
90 CommandClass::WriteXML( _ccElement );
91
92 char str[8];
93
94 for( map<uint8,uint8>::iterator it = m_sensorsMap.begin(); it != m_sensorsMap.end(); it++ )
95 {
96 TiXmlElement* sensorMapElement = new TiXmlElement( "SensorMap" );
97 _ccElement->LinkEndChild( sensorMapElement );
98
99 snprintf( str, 8, "%d", it->second );
100 sensorMapElement->SetAttribute( "index", str );
101
102 snprintf( str, 8, "%d", it->first );
103 sensorMapElement->SetAttribute( "type", str );
104 }
105}
106//-----------------------------------------------------------------------------
107// <SensorBinary::RequestState>
108// Request current state from the device

Callers

nothing calls this directly

Calls 4

LinkEndChildMethod · 0.80
SetAttributeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected