#!/usr/bin/python

# Freq net prgm from Gqrx to Avcomm_Microwave_5.4
# 22_Sept19 by G3WJG calling on GQRX_Freq_class by G8FKH

import sys
import time
import xmlrpclib
def main_loop():
    while 1:
# do your stuff...

	xmlrpc_client_0 = xmlrpclib.Server('http://localhost:8080')
	from gqrx_freq_class import GQRX_Freq
	gqrx = GQRX_Freq("127.0.0.1", 7356)
	rx_freq_str = gqrx.getFreqStr()
	rx_freq = int(rx_freq_str)
	xmlrpc_client_0.set_selected_freq(rx_freq)

	time.sleep(0.2)
if __name__ == '__main__':
    try:
        main_loop()
    except KeyboardInterrupt:
        print >> sys.stderr, '\nExiting by user request.\n'
        sys.exit(0)
