namespace QC.QMSCT;

public class PortDetectionSettings
{
	private const string EMERGENCY_DOWNLOAD_DEFAULT_VALUE = "QDLoader";

	private const string DIAGNOSTIC_DOWNLOAD_DEFAULT_VALUE = "Diagnostic";

	private const string CUSTOMIZED_DOWNLOAD_DEFAULT_VALUE = "";

	private const int PORT_DIAG_CONNECTION_TIMEOUT_DEFAULT_VALUE = 60;

	private const int DEVICEMANAGER_STABILIZATION_TIMEOUT_DEFAULT_VALUE = 5;

	private QMSCTSetupPortDetectionSetting qmsctSetupPortDetectionSetting = new QMSCTSetupPortDetectionSetting();

	public QMSCTSetupPortDetectionSetting QmsctSetupPortDetectionSetting => qmsctSetupPortDetectionSetting;

	public string EDownloadKeyField => "EDownloaderKey";

	public string EDownloadKeyWord => qmsctSetupPortDetectionSetting.DriverString.EDownloaderKey;

	public string DiagnosticKeyField => "DiagnosticKey";

	public string DiagnosticKeyWord => qmsctSetupPortDetectionSetting.DriverString.DiagnosticKey;

	public int DeviceManagerStabilizationTimeout
	{
		get
		{
			return qmsctSetupPortDetectionSetting.DeviceManagerStablizationTimeoutInSec;
		}
		set
		{
			qmsctSetupPortDetectionSetting.DeviceManagerStablizationTimeoutInSec = value;
		}
	}

	public int PortConnectionTimeoutInSec
	{
		get
		{
			return qmsctSetupPortDetectionSetting.PortConnectionTimeoutInSec;
		}
		set
		{
			qmsctSetupPortDetectionSetting.PortConnectionTimeoutInSec = value;
		}
	}

	public PortDetectionSettings()
	{
		qmsctSetupPortDetectionSetting.DeviceManagerStablizationTimeoutInSec = 5;
		qmsctSetupPortDetectionSetting.PortConnectionTimeoutInSec = 60;
		qmsctSetupPortDetectionSetting.DriverString = new QMSCTSetupPortDetectionSettingDriverString();
		qmsctSetupPortDetectionSetting.DriverString.EDownloaderKey = "QDLoader";
		qmsctSetupPortDetectionSetting.DriverString.DiagnosticKey = "Diagnostic";
	}
}
