Пример #1
0
 def set_data_channel(self, ul_channel):
     """
     Sets the uplink channel to the given value.
     :type ul_channel: integer
     :param ul_channel: the uplink channel value. Possible values (ranges:
         - GSM400 : 259 ... 293 | 306 ... 340
         - GSM850 : 128 ... 251
         - GSM900 : 0 ... 124 | 955 ... 1023
         - GSM1800: 512 ... 885
         - GSM1900: 512 ... 810
     """
     # We check the current status
     (err, state, msg) = W.GetDataCallControlStatus(self.get_root())
     # We check the connection in the same way it is done
     # in CMU dll function SetTchArfcn2G (cel_parameters_2G.cpp)
     connected = state == "ATT" or state == "AIPR" or state == "TEST"
     # If we are not connected
     if not connected:
         # Change the channel to use once it is in test mode
         (err, msg) = WC2G.SetPdtchArfcn(self.get_root(), ul_channel)
     else:
         # Change the channel to use while it is in test mode
         (err, msg) = W.SetDataTrafficChannel(self.get_root(), ul_channel)
     # Check for any error
     self.__error_check(err, msg)
Пример #2
0
 def set_band(self, band):
     """
     Sets the band to use
     :type band: str
     :param band: the band to use. Possible values:
         - "TGSM380" => "UNSUPPORTED"
         - "TGSM410" => "UNSUPPORTED"
         - "GSM450" => "GSM450"
         - "GSM480" => "UNSUPPORTED"
         - "GSM710" => "UNSUPPORTED"
         - "GSM750" => "GSM750"
         - "TGSM810" => "TGSM810"
         - "GSM850" => "GSM850"
         - "PGSM" => "PGSM"
         - "EGSM" => "EGSM"
         - "RGSM" => "RGSM"
         - "TGSM" => "UNSUPPORTED"
         - "DCS" => "DCS"
         - "PCS" => "PCS"
     """
     cmu_band = self.RS_CMU200_BANDS.get(band)
     if (cmu_band is None) or (cmu_band == "UNSUPPORTED"):
         raise TestEquipmentException(
             TestEquipmentException.INVALID_PARAMETER,
             "Band %s is not supported by RS CMU200" % band)
     (err, msg) = W.SetBand(self.get_root(), cmu_band)
     self.__error_check(err, msg)
Пример #3
0
 def set_mobile_dtx(self, state):
     """
     Sets Mobile DTX state
     :type state: str
     :param state: the Mobile DTX state to set (ON/OFF)
     """
     (err, msg) = W.SetMobileDtx(self.get_root(), state)
     self.__error_check(err, msg)
Пример #4
0
 def set_tch_power(self, power):
     """
     Sets traffic channel power.
     :type power: double
     :param double: the traffic channel power to set.
     """
     (err, msg) = W.SetTchPower(self.get_root(), power)
     self.__error_check(err, msg)
Пример #5
0
 def set_tch_arfcn(self, arfcn):
     """
     Sets the traffic channel ARFCN
     :type arfcn: integer
     :param arfcn: the TCH arfcn to set
     """
     (err, msg) = W.SetTchArfcn(self.get_root(), arfcn)
     self.__error_check(err, msg)
Пример #6
0
 def set_ms_tx_level(self, tx_level):
     """
     Sets the mobile station Tx level
     :type tx_level: integer
     :param tx_level: value of the Tx level to set
     """
     (err, msg) = W.SetMSTxLevel(self.get_root(), tx_level)
     self.__error_check(err, msg)
Пример #7
0
 def set_pdtch_arfcn(self, arfcn):
     """
     Sets the packet data traffic channel ARFCN
     :type arfcn: integer
     :param arfcn: the ARFCN of the downlink and uplink PDTCH to set.
     """
     (err, msg) = W.SetPdtchArfcn(self.get_root(), arfcn)
     self.__error_check(err, msg)
Пример #8
0
 def set_bcch_arfcn(self, arfcn):
     """
     Sets broadcast control channel ARFCN
     :type arfcn: integer
     :param arfcn: the ARFCN value to set
     """
     (err, msg) = W.SetBchArfcn(self.get_root(), arfcn)
     self.__error_check(err, msg)
Пример #9
0
 def set_cell_on(self, mimo=None):
     """
     Wraps to 2G SetCellActive function
     :raise TestEquipmentException: call to SetCellActive
     driver function failed
     :rtype: integer
     :return: error code of the driver function
     """
     (err, msg) = W.SetCellActive(self.get_root())
     self.__error_check(err, msg)
Пример #10
0
 def set_cell_off(self):
     """
     Wraps to SetCellOff 2G function
     :raise TestEquipmentException: call to SetCellOff
     driver function failed
     :rtype: integer
     :return: error code of the driver function
     """
     (err, msg) = W.SetCellOff(self.get_root())
     self.__error_check(err, msg)
Пример #11
0
 def set_cell_service(self, service):
     """
     Sets the cell service
     :type service: str
     :return: the cell service already set. Possible values:
         - "GSM"
         - "GPRS"
         - "EGPRS"
     """
     (err, msg) = W.SetServingCell(self.get_root(), service)
     self.__error_check(err, msg)
Пример #12
0
 def set_cell_power(self, power):
     """
     Sets the power level of the Broadcast Channel of the cell in dBm
     :type power: double
     :param power: the cell power to set. Possible values:
         - "GSM"
         - "GPRS"
         - "EGPRS"
     """
     (err, msg) = W.SetCellPower(self.get_root(), power)
     self.__error_check(err, msg)
Пример #13
0
 def get_lac(self):
     """
     Wraps to GetLACode  function
     :raise TestEquipmentException: call to GetLACode
     driver function failed
     :rtype: long
     :return: the LAC
     """
     (err, lac, msg) = W.GetLAC(self.get_root())
     self.__error_check(err, msg)
     return lac
Пример #14
0
 def set_lac(self, lac):
     """
     Wraps to SetLACode function
     :raise TestEquipmentException: call to SetLACode
     driver function failed
     :type lac: long
     :param lac: local area code to set
     :rtype: integer
     :return: error code of the driver function
     """
     (err, msg) = W.SetLAC(self.get_root(), lac)
     self.__error_check(err, msg)