public WhckAssociation(RunTimeConfiguration RuntimeConfig, APConfigParameter AP1Config24GHz, APConfigParameter AP1Config5GHz, APConfigParameter AP2Config24GHz, APConfigParameter AP2Config5GHz, ASSOC_TEST_OPTIONS AssocTestOptions) { if (RuntimeConfig == null) { throw new ArgumentNullException("RuntimeConfig"); } m_TraceProvider = new WlanHckTestLogger("WhckAssociation"); this.m_AssociationConfiguration = RuntimeConfig; this.m_AP1Config24GHz = AP1Config24GHz; this.m_AP1Config5GHz = AP1Config5GHz; this.m_AP2Config24GHz = AP2Config24GHz; this.m_AP2Config5GHz = AP2Config5GHz; this.m_AssocTestOptions = AssocTestOptions; m_WlanApi = new Wlan(); m_TestInterface = Helpers.GetWlanInterface(m_WlanApi); m_ApConfigClient = Helpers.ConnectToService(m_AssociationConfiguration.ServiceBackChannelAddress); m_Routers = Helpers.GetRouterCollection(m_ApConfigClient); this.m_DeviceSupports5GHz = RuntimeConfig.DeviceSupports5Ghz; m_PowerManager = new PowerManager(); m_bIsAccessPointSetup = false; }
public static void Associate(RunTimeConfiguration rc, APConfigParameter AP1Config24GHz, APConfigParameter AP1Config5GHz, APConfigParameter AP2Config24GHz, APConfigParameter AP2Config5GHz, ASSOC_TEST_OPTIONS AssocTestOptions) { WlanHckTestLogger traceProvider = new WlanHckTestLogger("Associate Driver"); using (UsingGroup g = new UsingGroup()) { try { traceProvider.LogComment("Association Scenarios Begin"); WhckAssociation hckAssociation = new WhckAssociation(rc, AP1Config24GHz, AP1Config5GHz, AP2Config24GHz, AP2Config5GHz, AssocTestOptions); g.Add(hckAssociation); //Basic Association AP1 2.4GHz -> AP2 5 GHz (2.4 GHz if 5 not supported), no sleep hckAssociation.BasicAssociationTest(); //If requested perform advanced association tests if (AssocTestOptions.HasFlag(ASSOC_TEST_OPTIONS.Sleep) || AssocTestOptions.HasFlag(ASSOC_TEST_OPTIONS.Hibernate)) { hckAssociation.AdvancedAssociationTests(); } } catch (Exception e) { traceProvider.LogError("Error - " + e.Message); throw; } finally { traceProvider.Flush(); } } }