public WhckRoaming(RunTimeConfiguration rc,
                           APConfigParameter AP1Config24GHz,
                           APConfigParameter AP1Config5GHz,
                           APConfigParameter AP2Config24GHz,
                           APConfigParameter AP2Config5GHz,
                           ROAM_TEST_OPTIONS RoamTestOptions)
        {
            if (rc == null)
            {
                throw new ArgumentNullException("rc");
            }
            traceProvider = new WlanHckTestLogger("WhckRoaming");

            this.RoamingConfiguration = rc;
            this.m_AP1Config24GHz     = AP1Config24GHz;
            this.m_AP1Config5GHz      = AP1Config5GHz;
            this.m_AP2Config24GHz     = AP2Config24GHz;
            this.m_AP2Config5GHz      = AP2Config5GHz;
            this.m_RoamTestOptions    = RoamTestOptions;

            Api = new Wlan();

            TestInterface = Helpers.GetWlanInterface(Api);
            AC            = Helpers.ConnectToService(RoamingConfiguration.ServiceBackChannelAddress);

            routers            = Helpers.GetRouterCollection(AC);
            AccessPointSetup   = false;
            DeviceSupports5Ghz = rc.DeviceSupports5Ghz;
        }
        public static void Roam(RunTimeConfiguration rc,
                                APConfigParameter AP1Config24GHz,
                                APConfigParameter AP1Config5GHz,
                                APConfigParameter AP2Config24GHz,
                                APConfigParameter AP2Config5GHz,
                                ROAM_TEST_OPTIONS RoamTestOptions)
        {
            WlanHckTestLogger traceProvider = new WlanHckTestLogger("RoamingDriver");

            using (UsingGroup g = new UsingGroup())
            {
                traceProvider.LogComment("Roaming Scenarios Begin");

                try
                {
                    WhckRoaming hckRoaming = new WhckRoaming(rc,
                                                             AP1Config24GHz,
                                                             AP1Config5GHz,
                                                             AP2Config24GHz,
                                                             AP2Config5GHz,
                                                             RoamTestOptions);

                    g.Add(hckRoaming);


                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.SuddenLossOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.SuddenLossOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing sudden loss of Signal");
                        hckRoaming.SuddenLossOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }

                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.SuddenDropOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.SuddenDropOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing sudden drop of Signal");
                        hckRoaming.SuddenDropOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }

                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.GradualDropOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.GradualDropOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing gradual drop of Signal");
                        hckRoaming.GradualDropOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }

                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.GradualLossOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.GradualLossOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing gradual loss of Signal");
                        hckRoaming.GradualLossOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }
                }
                catch (Exception e)
                {
                    traceProvider.LogError("Error - " + e.Message);
                    throw;
                }
            }
        }