using System.Xml.Serialization;
using DebugToolInstrumentInterface;

namespace QFDT;

public class BasicEquipConfig
{
	[XmlElement]
	public string driverType;

	[XmlElement]
	public string gpib;

	[XmlElement]
	public string visa32_desc;

	[XmlElement]
	public string TE_type;

	[XmlElement]
	public string Resource;

	[XmlElement]
	public string RelativePath;

	public void SetValue(string driver, string gpibAddress, string visa, string tetype, string path)
	{
		driverType = driver;
		gpib = gpibAddress;
		visa32_desc = visa;
		TE_type = tetype;
		RelativePath = path;
		Resource = getResource();
	}

	public string getResource()
	{
		string text = "";
		return TE_type + "," + ((driverType == TEDriverType.gpib_32.ToString()) ? gpib : visa32_desc);
	}
}
