----------------------------------------------------------------------------- Save the static node configuration data -----------------------------------------------------------------------------
| 1301 | // Save the static node configuration data |
| 1302 | //----------------------------------------------------------------------------- |
| 1303 | void Node::WriteXML |
| 1304 | ( |
| 1305 | TiXmlElement* _driverElement |
| 1306 | ) |
| 1307 | { |
| 1308 | char str[32]; |
| 1309 | |
| 1310 | TiXmlElement* nodeElement = new TiXmlElement( "Node" ); |
| 1311 | _driverElement->LinkEndChild( nodeElement ); |
| 1312 | |
| 1313 | snprintf( str, 32, "%d", m_nodeId ); |
| 1314 | nodeElement->SetAttribute( "id", str ); |
| 1315 | |
| 1316 | nodeElement->SetAttribute( "name", m_nodeName.c_str() ); |
| 1317 | nodeElement->SetAttribute( "location", m_location.c_str() ); |
| 1318 | |
| 1319 | snprintf( str, 32, "%d", m_basic ); |
| 1320 | nodeElement->SetAttribute( "basic", str ); |
| 1321 | |
| 1322 | snprintf( str, 32, "%d", m_generic ); |
| 1323 | nodeElement->SetAttribute( "generic", str ); |
| 1324 | |
| 1325 | snprintf( str, 32, "%d", m_specific ); |
| 1326 | nodeElement->SetAttribute( "specific", str ); |
| 1327 | |
| 1328 | if( m_nodePlusInfoReceived ) |
| 1329 | { |
| 1330 | snprintf( str, 32, "%d", m_role ); |
| 1331 | nodeElement->SetAttribute( "roletype", str ); |
| 1332 | |
| 1333 | snprintf( str, 32, "%d", m_deviceType ); |
| 1334 | nodeElement->SetAttribute( "devicetype", str ); |
| 1335 | |
| 1336 | snprintf( str, 32, "%d", m_nodeType ); |
| 1337 | nodeElement->SetAttribute ( "nodetype", str ); |
| 1338 | } |
| 1339 | |
| 1340 | nodeElement->SetAttribute( "type", m_type.c_str() ); |
| 1341 | |
| 1342 | nodeElement->SetAttribute( "listening", m_listening ? "true" : "false" ); |
| 1343 | nodeElement->SetAttribute( "frequentListening", m_frequentListening ? "true" : "false" ); |
| 1344 | nodeElement->SetAttribute( "beaming", m_beaming ? "true" : "false" ); |
| 1345 | nodeElement->SetAttribute( "routing", m_routing ? "true" : "false" ); |
| 1346 | |
| 1347 | snprintf( str, 32, "%d", m_maxBaudRate ); |
| 1348 | nodeElement->SetAttribute( "max_baud_rate", str ); |
| 1349 | |
| 1350 | snprintf( str, 32, "%d", m_version ); |
| 1351 | nodeElement->SetAttribute( "version", str ); |
| 1352 | |
| 1353 | if( m_security ) |
| 1354 | { |
| 1355 | nodeElement->SetAttribute( "security", "true" ); |
| 1356 | } |
| 1357 | |
| 1358 | if( m_secured ) |
| 1359 | { |
| 1360 | nodeElement->SetAttribute( "secured", "true" ); |
no test coverage detected