예제 #1
0
    def set_up(self):
        """
        Initialize the test
        """
        UseCaseBase.set_up(self)

        # Check mandatory parameter
        if self._channel is None or int(self._channel) <= 0:
            msg = "CHANNEL TC parameter is not defined: " + str(self._channel)
            self._logger.error(msg)
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER, msg)

        # Specific case for channel 14 in Japan
        if int(self._channel) == 14 and self._dut_crda == "JP" \
                and self._standard.lower() != "b" \
                and not self._connection_expected:
            # this case is prohibited
            msg = "For Channel 14 in Japan, "
            msg += "TC parameter CONNECTION_EXPECTED should be set to True"
            self._logger.error(msg)
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER, msg)

        # Set AP CRDA
        self._set_ap_generic_crda(self._channel)

        # Call LabWifiBase setup without connection
        LabWifiBase.set_up_without_connect(self)

        self._connection_expected = str_to_bool(str(self._connection_expected))

        # Set DUT regulatory domain
        self._networking_api.set_regulatorydomain(self._dut_crda, self._dut_wlan_iface)
        time.sleep(self._wait_btwn_cmd)

        return Global.SUCCESS, "no_error"
예제 #2
0
    def set_up(self):
        """
        Initialize the test
        """
        LabWifiBase.set_up_without_connect(self)

        if self._direction not in ["DL", "UL"]:
            self._error.Msg = "%s is not a known xfer direction" % self._direction
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                     self._error.Msg)

        return Global.SUCCESS, "No errors"