namespace QC.MultiplexManager;

public static class MultiplexManagerStatic
{
	private static MultiplexManagerImp mm;

	public static bool SwitchPath(InputParameterSource Input_Parameter_Source, string Multiplex_Manager_Config_File, int DUT_Number, string Requested_RF_Ports)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		return mm.SwitchPathImp(Input_Parameter_Source, Multiplex_Manager_Config_File, DUT_Number, Requested_RF_Ports, "");
	}

	public static bool SwitchPath(InputParameterSource Input_Parameter_Source, string Multiplex_Manager_Config_File, int DUT_Number, string Requested_RF_Ports, string Requested_Bands)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		return mm.SwitchPathImp(Input_Parameter_Source, Multiplex_Manager_Config_File, DUT_Number, Requested_RF_Ports, Requested_Bands);
	}

	public static bool SwitchPathByAntennaNumbers(InputParameterSource Input_Parameter_Source, string Multiplex_Manager_Config_File, int DUT_Number, string Requested_Tx_Ant_Numbers, string Requested_Rx_Ant_Numbers, string Technology_Code)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		return mm.SwitchPathAntennaNumbersImp(Input_Parameter_Source, Multiplex_Manager_Config_File, DUT_Number, Requested_Tx_Ant_Numbers, Requested_Rx_Ant_Numbers, Technology_Code);
	}

	public static bool SetPorsPathsGlobalVariable(InputParameterSource Input_Parameter_Source, string Multiplex_Manager_Config_File, int DUT_Number)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		return mm.SetPortsPathsGlobalVariableImp(Input_Parameter_Source, Multiplex_Manager_Config_File, DUT_Number);
	}

	public static void SetMultiPortGlobalVariable(string Multiplex_Manager_Config_File, int DUT_Number)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		mm.SetGlobalVariable(Multiplex_Manager_Config_File, DUT_Number.ToString());
	}

	public static string GetGlobalVariable(string name)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		return mm.GetGlobalVariable(name);
	}

	public static void SetGlobalVariable(string name, string value)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		mm.SetGlobalVariable(name, value);
	}

	public static bool LockResource(InputParameterSource Input_Parameter_Source, string Multiplex_Manager_Config_File, int DUT_Number, int Lock_Acq_Timeout)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		return mm.LockResourceImp(Input_Parameter_Source, Multiplex_Manager_Config_File, DUT_Number, Lock_Acq_Timeout);
	}

	public static bool UnlockResource(InputParameterSource Input_Parameter_Source, string Multiplex_Manager_Config_File, int DUT_Number)
	{
		if (mm == null)
		{
			mm = new MultiplexManagerImp();
		}
		return mm.UnlockResourceImp(Input_Parameter_Source, Multiplex_Manager_Config_File, DUT_Number);
	}
}
