예제 #1
0
 def __init__(self, inst, connector, converter):
     '''
     初始化配置参数实例变量、信号路由、测量配置。
     '''
     self.logger = pylogger.setup_logger(self.__class__.__name__)
     self._inst = inst
     self.set_signal_routing(connector, converter)
     self.band = ''
     self.dl_channel = ''
     self._config_measurement()
예제 #2
0
 def __init__(self, addr):
     '''
     初始化配置参数实例变量、信号路由、测量配置。
     '''
     self.logger = pylogger.setup_logger(self.__class__.__name__)
     self._inst = self.connect(addr)
     self.sampling_period = 15.6E-6
     self.current_range = '3A'
     self.max_voltage = 4.4
     # 设置输出电压上限
     self._set_protection(self.max_voltage)
     # 配置最初的采样周期和量程
     self._config_measurement(self.sampling_period, self.current_range)
예제 #3
0
    def __init__(self, ip):
        '''
        初始化日志、仪器连接、复位
        '''
        self.logger = pylogger.setup_logger(self.__class__.__name__)

        # 与仪器通过VXI协议建立连接
        self._inst = self._connect(ip)
        self.reset()

        # 射频物理链路实例变量
        self.converter = ''
        self.connector = ''
예제 #4
0
    def __init__(self):

        # 创建用例执行文件夹
        case_dir = sys.path[0]
        case_folder_name = case_dir + '.\\' + datetime.now().strftime("%Y%m%d_%H%M%S")
        global_variable.file_folder = case_folder_name
        try:
            os.makedirs(case_folder_name)
        except Exception as e:
            print 'folder:%s existed!' % e

        # 创建数据记录器
        self.data_recorder = record.DataRecorder()
        # 创建日志
        self.logger = pylogger.setup_logger(self.__class__.__name__)
        # 获得仪器控制引用
        self.cmw500, self.dc_source = self.init_instr()
예제 #5
0
 def __init__(self, inst, connector, converter):
     '''
     初始化配置参数实例变量、信号路由、测量配置。
     '''
     self.logger = pylogger.setup_logger(self.__class__.__name__)
     self._inst = inst
     self._max_power = 0
     self.band = ''
     self.ul_channel = ''
     self.dl_channel = ''
     self.band_width = ''
     self.ul_rb_position = ''
     self.ul_rb_num = ''
     # 配置信号路由
     self._set_signal_routing(connector, converter)
     # 测量通道设置
     self._config_measurement()