Beispiel #1
0
void MasterTestSet_t :: toXml(TiXmlNode* pParent, bool aCreateNode, bool aIgnoreValid){
	if(!aIgnoreValid && !valid) return;
	TiXmlElement * pEm;
	if(aCreateNode){
		pEm = new TiXmlElement("MasterTestSet");
		pParent->LinkEndChild(pEm);
	}else{
		pEm = pParent->ToElement();
	}
	pEm->SetAttribute("PhysicalLayer", ToString_string(PhysicalLayer));
	pEm->SetAttribute("LogFile", ToString_string(LogFile));
	Log.toXml(pEm, true, aIgnoreValid);
	Master.toXml(pEm, true, aIgnoreValid);
	PhysicalLayerList.toXml(pEm, true, aIgnoreValid);
};
Beispiel #2
0
void SlaveTestSet_t :: toXml(TiXmlNode* pParent, bool aCreateNode, bool aIgnoreValid)
{
	if(!aIgnoreValid && !valid) return;
	TiXmlElement* pEm;
	if(aCreateNode) {
		pEm = new TiXmlElement("SlaveTestSet");
		pParent->LinkEndChild(pEm);
	}
	else {
		pEm = pParent->ToElement();
	}
	pEm->SetAttribute("LogFile", ToString_string(LogFile));
	pEm->SetAttribute("PhysicalLayer", ToString_string(PhysicalLayer));
	pEm->SetAttribute("Remote", ToString_bool(Remote));
	pEm->SetAttribute("RemotePort", ToString_int(RemotePort));
	pEm->SetAttribute("LinkCommandStatus", ToString_bool(LinkCommandStatus));
	pEm->SetAttribute("StartOnline", ToString_bool(StartOnline));
	Log.toXml(pEm, true, aIgnoreValid);
	Slave.toXml(pEm, true, aIgnoreValid);
	DeviceTemplate.toXml(pEm, true, aIgnoreValid);
	PhysicalLayerList.toXml(pEm, true, aIgnoreValid);
};