def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        # Call LabAudioQualityBase Init function
        LabAudioQualityBase.__init__(self, tc_name, global_config)

        # Instantiate generic UECmd for voiceCall Ucs
        self._voice_call_api = self._device.get_uecmd("VoiceCall")
        self._phonesystem_api = self._device.get_uecmd("PhoneSystem")
        self._networking_api = self._device.get_uecmd("Networking")

        self._voice_call_api2 = None

        # Read Audio Analyzer parameters from bench config xml file (str)
        # self._audio_analyzer_node = global_config.benchConfig.\
        #    get_parameters("AudioAnalyzer")

        if self._audio_analyzer_node.get_param_value("Model") in "APx585":
            self._test_type = "audioactivity"

        # Instantiate the instances for phone caller, receiver and releaser
        self._phone_calling = None
        self._phone_receiving = None
        self._phone_releasing = None
        # Initialization of phone_number to call
        self._calling_phone_number = None
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        # Call LabAudioQualityBase Init function
        LabAudioQualityBase.__init__(self, tc_name, global_config)

        # Read wifi parameters from bench config xml file (int)
        self._wifirouter = global_config.benchConfig. \
            get_parameters("WIFI_ACCESS_POINT")
        self._wifi_security = self._wifirouter.get_param_value("WIFI_SECURITY")
        self._wifi_passphrase = self._wifirouter.get_param_value("passphrase")
        self._ssid = self._wifirouter.get_param_value("SSID")

        # Read dut sip address from test case xml file (str)
        self._dut_sip_address = \
            str(self._tc_parameters.get_param_value("DUT_SIP_ADDRESS"))

        # Read ref phone sip address from test case xml file (str)
        self._peer_sip_address = \
            str(self._tc_parameters.get_param_value("PEER_SIP_ADDRESS"))

        # Read hold or mute parameter (str)
        self._hold_mute = \
            str(self._tc_parameters.get_param_value("HOLD_MUTE"))

        self._dut_sip_passphrase = None
        self._peer_sip_passphrase = None
        # Instantiate generic UECmd for voiceCall Ucs
        self._networking_api = self._device.get_uecmd("Networking")
        self._sip_call_api = self._device.get_uecmd("SipCall")

        # Instantiate the instances of member class variables
        self._sip_call_api2 = None
        self._networking_api2 = None
        self._phone_calling = None
        self._phone_receiving = None
        self._phone_releasing = None
        # Initialization of phone_number to call
        self._calling_phone_number = None
Example #3
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        # Call LabAudioQualityBase Init function
        LabAudioQualityBase.__init__(self, tc_name, global_config)

        # Instantiate generic UECmd for voiceCall Ucs
        self._voice_call_api = self._device.get_uecmd("VoiceCall")
        self._phonesystem_api = self._device.get_uecmd("PhoneSystem")
        self._networking_api = self._device.get_uecmd("Networking")

        self._voice_call_api2 = None

        # Instantiate the instances for phone caller, receiver and releaser
        self._phone_calling = None
        self._phone_receiving = None
        self._phone_releasing = None
        # Initialization of phone_number to call
        self._calling_phone_number = None
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        # Call LabAudioQualityBase Init function
        LabAudioQualityBase.__init__(self, tc_name, global_config)

        # Instantiate generic UECmd for voiceCall Ucs
        self._phonesystem_api = self._device.get_uecmd("PhoneSystem")
        self._keyevent_api = self._device.get_uecmd("KeyEvent")
        self._networking_api = self._device.get_uecmd("Networking")

        self._voice_call_api2 = None

        # Read wifi parameters from bench config xml file (int)
        self._wifirouter = global_config.benchConfig.\
            get_parameters("WIFI_ACCESS_POINT")
        self._ssid = self._wifirouter.get_param_value("SSID")

        # Read dut sip address from test case xml file (string)
        self._dut_sip_address = \
            str(self._tc_parameters.get_param_value("DUT_SIP_ADDRESS"))

        # Read ref phone sip address from test case xml file (string)
        self._peer_sip_address = \
            str(self._tc_parameters.get_param_value("PEER_SIP_ADDRESS"))
        # Instantiate generic UECmd for voiceCall Ucs
        self._networking_api = self._device.get_uecmd("Networking")
        self._sip_call_api = self._device.get_uecmd("SipCall")

        # Instantiate the instances of member class variables
        self._sip_call_api2 = None
        self._networking_api2 = None
        self._phone_calling = None
        self._phone_receiving = None
        self._phone_releasing = None
        self._calling_phone_number = None
        self._delta_volume = 0
Example #5
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        # Call LabAudioQualityBase Init function
        LabAudioQualityBase.__init__(self, tc_name, global_config)

        # Read wifi parameters from bench config xml file (int)
        self._wifirouter = global_config.benchConfig. \
            get_parameters("WIFI_ACCESS_POINT")
        self._wifi_security = self._wifirouter.get_param_value("WIFI_SECURITY")
        self._wifi_passphrase = self._wifirouter.get_param_value("passphrase")
        self._ssid = self._wifirouter.get_param_value("SSID")

        # Read dut sip address from test case xml file (string)
        self._dut_sip_address = \
            str(self._tc_parameters.get_param_value("DUT_SIP_ADDRESS"))

        # Read ref phone sip address from test case xml file (string)
        self._peer_sip_address = \
            str(self._tc_parameters.get_param_value("PEER_SIP_ADDRESS"))

        self._dut_sip_passphrase = self._tc_parameters.get_param_value("DUT_SIP_PASSPHRASE")
        self._peer_sip_passphrase = self._tc_parameters.get_param_value("PEER_SIP_PASSPHRASE")

        # Check if a dedicated VoIP server will be used
        if global_config.benchConfig.has_parameter("VOIP_SERVER"):
            self._voip_server_node = global_config.benchConfig.get_parameters("VOIP_SERVER")
            self._voip_server_computer = self._em.get_computer("VOIP_SERVER")
            self._voip_server_computer.init()
            self._voip_server = VoIPServerCallUtilities(self._voip_server_computer,
                                                        self._voip_server_node,
                                                        self._logger)
            self._degraded_audio_file = self._voip_server_node.get_param_value("DegradedAudioFile")
            self._voip_server_deg_file = self._voip_server_node.get_param_value(
                    "ServerRecordDir") + self._degraded_audio_file

            self._local_deg_file = self._voip_server_node.get_param_value("LocalRecordDir") + self._degraded_audio_file
            self._peer_sip_address = VoIPServerCallUtilities.sip_profiles[self._peer_sip_address.split('@')[0]] + \
                                     '@' + self._peer_sip_address.split('@')[-1]

        else:
            self._voip_server_node = None

        # Read ConfPath from AUDIO_ANALYZER BenchConfig.xml
        self._aa_conf_path = os.path.join(str(self._audio_analyzer_node.get_param_value("ConfPath")))

        # Read DestPath from AUDIO_ANALYZER BenchConfig.xml
        self._aa_dest_path = os.path.join(str(self._audio_analyzer_node.get_param_value("DestPath")))

        # Construct trace file path on audio analyzer
        self._aa_trace_file_path = os.path.join(self._aa_dest_path,
                                                "sip_sweep_trace.trc")

        self._keep_record = str_to_bool(self._tc_parameters.get_param_value("KEEP_RECORD"))

        # Number of iteration for the current test
        self._tc_iteration_count = self._tc_parameters.get_b2b_iteration()

        # Instantiate generic UECmd for voiceCall Ucs
        self._networking_api = self._device.get_uecmd("Networking")
        self._sip_call_api = self._device.get_uecmd("SipCall")

        # Instantiate the instances of member class variables
        self._sip_call_api2 = None
        self._networking_api2 = None
        self._phone_calling = None
        self._phone_receiving = None
        self._phone_releasing = None
        self._calling_phone_number = None

        # Read AUDIO_FILE from test case xml file
        self._ref_file = str(self._tc_parameters.get_param_value("AUDIO_FILE"))

        # Construct reference audio file path on bench computer
        self._host_ref_file_path = os.path.join(self._aa_conf_path,
                                                self._ref_file)

        self._host_deg_file_path = os.path.join(self._aa_conf_path,
                                                self._name.split('\\')[-1].split('-')[0] + "-" +
                                                str(self._tc_parameters.get_ucase_name()) + "_")

        # Construct degraded audio file path on UPV
        self._aa_deg_file_path = os.path.join(self._aa_dest_path,
                                              "voice_degraded_upv.wav")

        self._wait_between_measure = int(self._tc_parameters.get_param_value("WAIT_BETWEEN_MEASURE"))

        self._offline_measurement = False

        # Get the instance of the second IO_CARD
        if self._phone2:
            if DeviceManager().get_device_config("PHONE2").get("IoCard", ""):
                self._io_card_2 = self._em.get_io_card(DeviceManager().get_device_config("PHONE2").get("IoCard", ""))
            else:
                self._io_card_2 = None
        else:
            self._offline_measurement = True
            self._io_card_2 = None

        self._polqa_result_dl = None
        self._polqa_result_ul = None

        self._elapsed_time = 0

        # Read POLQA Targets from Audio_Quality_Targets.xml
        self._polqa_target = ConfigsParser("Audio_Quality_Targets").parse_audio_quality_target("Polqa",
                                                                                               "VOIP",
                                                                                               "VoIP")

        # Number of retry permitted for a single measurement on the audio analyzer
        self._audio_analyzer_meas_retry = 5

        self._audioalgocontroller_api = self._device.get_uecmd("AudioAlgoController")

        self._result_verdict = Global.SUCCESS