Exemple #1
0
 def testCreate(self):
     conf = config.GetDefaultConfig()
     section = fcd_receiver.FCDReceiver.__name__
     conf.add_section(section)
     conf.set(section, 'recording_dir', tempfile.mkdtemp())
     conf.set(section, 'alsa_device', 'hw:1')
     conf.set(section, 'frequency_correction', '-12')
     return fcd_receiver.FCDReceiver(conf)
Exemple #2
0
 def Create(self):
     conf = config.GetDefaultConfig()
     section = usrp_receiver.USRPReceiver.__name__
     conf.add_section(section)
     conf.set(section, 'recording_dir', tempfile.mkdtemp())
     conf.set(section, 'device_address', 'test')
     conf.set(section, 'sample_rate_hz', '32000')
     return usrp_receiver.USRPReceiver(conf)
 def Create(self):
     conf = config.GetDefaultConfig()
     section = rtlsdr_receiver.RTLSDRReceiver.__name__
     conf.add_section(section)
     conf.set(section, 'recording_dir', tempfile.mkdtemp())
     conf.set(section, 'device_index', '0')
     conf.set(section, 'tuner_gain_db', '0.1')
     conf.set(section, 'sample_rate_hz', '96000')
     return rtlsdr_receiver.RTLSDRReceiver(conf)
Exemple #4
0
def GetConfigForTesting():
    conf = config.GetDefaultConfig()

    section = client.Client.__name__
    conf.add_section(section)
    conf.set(section, 'id', 'test_station_id')
    conf.set(section, 'secret', 'test_station_secret')
    conf.set(section, 'ca_certificate', '../etc/ca_cert.pem')

    return conf
    def testCreate(self):
        conf = config.GetDefaultConfig()
        section = fcd_receiver.FCDReceiver.__name__
        conf.add_section(section)
        conf.set(section, 'recording_dir', tempfile.mkdtemp())
        conf.set(section, 'alsa_device', 'hw:1')

        r = TestFCDReceiver(conf)
        self.assertEquals(r._sample_rate, 192000)
        self.assertEquals(r.GetHardwareTunerHz(), 144000000)
    def create(self):
        conf = config.GetDefaultConfig()
        section = diseqc_motor.DiSEqCMotor.__name__
        conf.add_section(section)
        conf.set(section, 'serial_device', '/dev/null')
        conf.set(section, 'calibrated_rate', '10.0')
        conf.set(section, 'reference_zero', '0.0')
        conf.set(section, 'min_limit', '-45.0')
        conf.set(section, 'max_limit', '45.0')

        c = DummyDiSEqCController()
        m = diseqc_motor.DiSEqCMotor(conf, controller=c)
        m._internal_motor.reset_time = 0.1
        return m, c
    def create(self):
        conf = config.GetDefaultConfig()
        section = hamlib_motor.HamlibMotor.__name__
        conf.add_section(section)
        conf.set(section, 'model', '1')
        conf.set(section, 'device', '/dev/null')
        conf.set(section, 'hamlib_param_min_az', '10.0')
        conf.set(section, 'hamlib_param_max_az', '80.0')

        commands = []
        def check_output(args):
            commands.append(args)
            return '124.0\n64.0\n'

        m = hamlib_motor.HamlibMotor(conf)
        m.rotator._check_output = check_output
        return m, commands
Exemple #8
0
 def Create(self):
     conf = config.GetDefaultConfig()
     return dummy_receiver.DummyReceiver(conf)
Exemple #9
0
 def testGetStateDict(self):
     m = dummy_motor.DummyMotor(config.GetDefaultConfig())
     self.assertTrue(isinstance(m.GetStateDict(), dict))
Exemple #10
0
 def testStop(self):
     m = dummy_motor.DummyMotor(config.GetDefaultConfig())
     self.assertEquals(True, m.Stop())
Exemple #11
0
 def testStart(self):
     m = dummy_motor.DummyMotor(config.GetDefaultConfig())
     program = [[0.0, 10.0, 20.0], [1.0, 20.0, 30.0]]
     self.assertEquals(True, m.Start(program))