示例#1
0
    def tear_down(self):
        """
        End and dispose the test
        """

        # Release the call
        self._vc_3g.voice_call_network_release()

        try:
            # Check call is released (NS)
            self._vc_3g.check_call_idle(self._registration_timeout,
                                        blocking=False)

            # Check call is released (CDK)
            self._voicecall_api.wait_for_state(
                self._uecmd_types.VOICE_CALL_STATE.NOCALL,  # pylint: disable=E1101
                self._call_setup_time)

        except AcsBaseException as acs_exception:
            self._logger.warning("Call release fail:" + str(acs_exception))

        # Call use case base tear_down function
        LabWcdmaSmsCsBase.tear_down(self)

        # Clear just received cell broadcast sms
        self._cb_messaging_api.clear_all_cell_broadcast_sms()

        return Global.SUCCESS, "No errors"
示例#2
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        LabWcdmaSmsCsBase.__init__(self, tc_name, global_config)
        # Set dummy phoneNumber
        self._destination_number = "123456789"

        # Set drx_cycle_length for CN and Utran
        self._drx_cycle_length_cn = "FRAM512"

        self._drx_cycle_length_utran = "FRAM512"

        self._ctch_allocation_period = 20

        # Set cell broadcast message 1 as the sms cb which will be used
        self._cell_broadcast_message = 1
        #
        self._cell_broadcast_message_identifier = int(self._tc_parameters.
                                                      get_param_value("CELL_BROADCAST_MESSAGE_IDENTIFIER"))

        self._repetition_period = int(self._tc_parameters.get_param_value(
                                      "REPETITION_PERIOD"))

        self._update_number = int(self._tc_parameters.get_param_value(
                                  "UPDATE_NUMBER"))

        self._custom_cell_broadcast_text_message = self._sms_text

        self._cb_messaging_api = self._device.get_uecmd("CellBroadcastMessaging")
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LabGsmSmsCsBase init function
        LabWcdmaSmsCsBase.__init__(self, tc_name, global_config)

        # Read SMS Service Center address
        self._sms_service_center_address = global_config.benchConfig.\
            get_parameters("CELLULAR_NETWORK").get_param_value("SMSC", "default")

        # Read DESTINATION_NUMBER from xml UseCase parameter file
        self._destination_number = \
            str(self._tc_parameters.get_param_value("DESTINATION_NUMBER"))
        if self._destination_number.upper() == "[PHONE_NUMBER]":
            self._destination_number = str(self._device.get_phone_number())

        self._sms = SmsMessage(self._sms_text,
                               self._destination_number,
                               "CSD",
                               self._ns_messaging_3g,
                               self._messaging_api,
                               self._data_coding_sheme,
                               self._nb_bits_per_char,
                               self._sms_transfer_timeout,
                               self._content_type,
                               "MO",
                               self._sms_service_center_address)
    def set_up(self):
        """
        Set up the test configuration
        .. warning:: Set the Data coding scheme using DATA_CODING_SCHEME value (CDK)
        """

        # Call the LAB_WCDMA_SMS_CS_BASE Setup function
        LabWcdmaSmsCsBase.set_up(self)

        return Global.SUCCESS, "No errors"
    def set_up(self):
        """
        Set up the test configuration
        """

        # Call the LAB_GSM_SMS_CS_BASE Setup function
        LabWcdmaSmsCsBase.set_up(self)

        self._sms_sent.configure_sms()

        return Global.SUCCESS, "No errors"
示例#6
0
    def tear_down(self):
        """
        End and dispose the test
        """

        # Call use case base tear_down function
        LabWcdmaSmsCsBase.tear_down(self)

        # Clear just received cell broadcast sms
        time.sleep(self._wait_btwn_cmd)
        self._cb_messaging_api.clear_all_cell_broadcast_sms()

        return Global.SUCCESS, "No errors"
示例#7
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        LabWcdmaSmsCsBase.__init__(self, tc_name, global_config)
        # Set dummy phoneNumber
        self._sms_cb_destination_number = "123456789"

        # Set remote party phoneNumber
        self._distant_number = self._tc_parameters.get_param_value(
            "PHONE_NUMBER")

        # Set drx_cycle_length for CN and Utran
        self._drx_cycle_length_cn = "FRAM512"

        self._drx_cycle_length_utran = "FRAM512"

        self._ctch_allocation_period = 20

        # Set cell broadcast message 1 as the sms cb which will be used
        self._cell_broadcast_message = 1
        #
        self._cell_broadcast_message_identifier = int(
            self._tc_parameters.get_param_value(
                "CELL_BROADCAST_MESSAGE_IDENTIFIER"))

        self._repetition_period = int(
            self._tc_parameters.get_param_value("REPETITION_PERIOD"))

        self._update_number = int(
            self._tc_parameters.get_param_value("UPDATE_NUMBER"))

        self._custom_cell_broadcast_text_message = self._sms_text

        self._cb_messaging_api = self._device.get_uecmd(
            "CellBroadcastMessaging")

        self._vc_3g = self._ns_cell_3g.get_voice_call()

        self._voicecall_api = self._device.get_uecmd("VoiceCall")

        # Read callSetupTimeout from Device_Catalog.xml
        self._call_setup_time = \
            int(self._dut_config.get("callSetupTimeout"))

        # Read VC_TYPE from test case xml file
        self._vc_type = str(self._tc_parameters.get_param_value("VC_TYPE"))
 def __init__(self, tc_name, global_config):
     """
     Constructor
     """
     LabWcdmaSmsCsBase.__init__(self, tc_name, global_config)
     # Set an artificial phone number
     self._destination_number = "123456789"
     self._sms_sent = SmsMessage(self._sms_text,
                                 self._destination_number,
                                 "CSD",
                                 self._ns_messaging_3g,
                                 self._messaging_api,
                                 self._data_coding_sheme,
                                 self._nb_bits_per_char,
                                 self._sms_transfer_timeout,
                                 self._content_type,
                                 "MT")
    def run_test(self):
        """
        Execute the test
        """

        # Call the LAB_GSM_SMS_CS_BASE run_test function
        LabWcdmaSmsCsBase.run_test(self)

        # Calculate how many SMS will be sent to equipment
        time.sleep(self._wait_btwn_cmd)

        # Send SMS
        self._sms_sent.send_sms()

        # get sms received and Compare sent and received SMS (Text, Destination number)
        (result_verdict, result_message) = self._sms_sent.get_sms()

        self._logger.info(result_message)

        return result_verdict, result_message
示例#10
0
    def run_test(self):
        """
        Execute the test
        """

        # Call the LAB_WCDMA_SMS_CS_BASE run_test function
        LabWcdmaSmsCsBase.run_test(self)

        # Set the default SMS service center
        time.sleep(self._wait_btwn_cmd)

        self._sms.configure_sms()

        # Send SMS to equipment using SMS parameters :
        # - SMS_TEXT
        # - DESTINATION_NUMBER
        time.sleep(self._wait_btwn_cmd)
        self._sms.send_sms()

        # Check SMS delivery status OK before timeout using
        # SMS_TRANSFER_TIMEOUT value and number of SMS to be received
        return self._sms.get_sms()
示例#11
0
    def run_test(self):
        """
        Execute the test
        """

        LabWcdmaSmsCsBase.run_test(self)

        # Start SMS cell broadcast
        self._ns_messaging_3g.start_cell_broadcast()
        self._logger.info("Start Cell Broadcast")

        received_cb_sms = self._cb_messaging_api.\
            wait_for_incoming_cell_broadcast_sms(self._sms_transfer_timeout)

        self._ns_messaging_3g.stop_cell_broadcast()

        try:
            received_cb_sms_text = received_cb_sms["sms_cb_text"]
            received_cb_sms_category = received_cb_sms["sms_cb_category"]
        except KeyError:
            self._error.Msg = "Received SMS-CB doesn't have all the information" \
                "text, category and serial number :: %s " % str(received_cb_sms)
            raise DeviceException(DeviceException.OPERATION_FAILED,
                                  self._error.Msg)

        if received_cb_sms_text != self._custom_cell_broadcast_text_message or \
                int(received_cb_sms_category) != self._cell_broadcast_message_identifier:
            test_result = Global.FAILURE
            self._error.Msg = "Sent CB SMS isn't the same as received one"\
                "sent cb sms text : %s  Received SMS-CB Text : %s " \
                "sent cb sms category : %d  Received SMS-CB Category: %d" \
                % (self._custom_cell_broadcast_text_message, received_cb_sms_text,
                   self._cell_broadcast_message_identifier, int(received_cb_sms_category))
        else:
            test_result = Global.SUCCESS
            self._error.Msg = "Match between sent and received SMS CB regarding text, category and serial number"

        return test_result, self._error.Msg