def loadFilters(): """ load all filters from the config.ini into filterList @requires: Configuration has to be set in the config.ini @return: nothing """ try: logging.debug("loading filters") # For each entry in config.ini [Filters] section for key, val in globalVars.config.items("Filters"): logging.debug(" - %s = %s", key, val) filterData = val.split(";") # resolve the * for freqToHz() if not filterData[3] == "*": filterData[3] = freqConverter.freqToHz(filterData[3]) # insert splitet data into filterList filterList.append({ "name": key, "typ": filterData[0], "dataField": filterData[1], "plugin": filterData[2], "freq": filterData[3], "regex": filterData[4] }) except: logging.error("cannot read config file") logging.debug("cannot read config file", exc_info=True) return
def loadFilters(): """ load all filters from the config.ini into filterList @requires: Configuration has to be set in the config.ini @return: nothing """ global filterList try: logging.debug("loading filters") # For each entry in config.ini [Filters] section for key,val in globalVars.config.items("Filters"): logging.debug(" - %s = %s", key, val) filterData = val.split(";") # resolve the * for freqToHz() if not filterData[3] == "*": filterData[3] = freqConverter.freqToHz(filterData[3]) # insert splitet data into filterList filterList.append({"name": key, "typ": filterData[0], "dataField": filterData[1], "plugin": filterData[2], "freq": filterData[3], "regex": filterData[4]}) except: logging.error("cannot read config file") logging.debug("cannot read config file", exc_info=True) return
except: # It's an error, but we could work without that stuff... logging.error("cannot clear Logfiles") logging.debug("cannot clear Logfiles", exc_info=True) # # For debug display/log args # try: logging.debug("SW Version: %s",globalVars.versionNr) logging.debug("Build Date: %s",globalVars.buildDate) logging.debug("BOSWatch given arguments") if args.test: logging.debug(" - Test-Mode!") logging.debug(" - Frequency: %s", freqConverter.freqToHz(args.freq)) logging.debug(" - Device: %s", args.device) logging.debug(" - PPM Error: %s", args.error) logging.debug(" - Squelch: %s", args.squelch) logging.debug(" - Gain: %s", args.gain) demodulation = "" if "FMS" in args.demod: demodulation += "-a FMSFSK " logging.debug(" - Demod: FMS") if "ZVEI" in args.demod: demodulation += "-a ZVEI2 " logging.debug(" - Demod: ZVEI") if "POC512" in args.demod: demodulation += "-a POCSAG512 " logging.debug(" - Demod: POC512")
except: # It's an error, but we could work without that stuff... logging.error("cannot clear Logfiles") logging.debug("cannot clear Logfiles", exc_info=True) # # For debug display/log args # try: logging.debug("SW Version: %s", globalVars.versionNr) logging.debug("Build Date: %s", globalVars.buildDate) logging.debug("BOSWatch given arguments") if args.test: logging.debug(" - Test-Mode!") logging.debug(" - Frequency: %s", freqConverter.freqToHz(args.freq)) logging.debug(" - Device: %s", args.device) logging.debug(" - PPM Error: %s", args.error) logging.debug(" - Squelch: %s", args.squelch) logging.debug(" - Gain: %s", args.gain) demodulation = "" if "FMS" in args.demod: demodulation += "-a FMSFSK " logging.debug(" - Demod: FMS") if "ZVEI" in args.demod: demodulation += "-a ZVEI1 " logging.debug(" - Demod: ZVEI") if "POC512" in args.demod: demodulation += "-a POCSAG512 " logging.debug(" - Demod: POC512")
logging.error("cannot clear Logfiles") logging.debug("cannot clear Logfiles", exc_info=True) # # For debug display/log args # try: logging.debug("SW Version: %s",globalVars.versionNr) logging.debug("Branch: %s",globalVars.branch) logging.debug("Build Date: %s",globalVars.buildDate) logging.debug("Python Vers: %s",sys.version) logging.debug("BOSWatch given arguments") if args.test: logging.debug(" - Test-Mode!") logging.debug(" - Frequency: %s", freqConverter.freqToHz(args.freq)) logging.debug(" - Device: %s", args.device) logging.debug(" - PPM Error: %s", args.error) logging.debug(" - Squelch: %s", args.squelch) logging.debug(" - Gain: %s", args.gain) demodulation = "" if "FMS" in args.demod: demodulation += "-a FMSFSK " logging.debug(" - Demod: FMS") if "ZVEI" in args.demod: demodulation += "-a ZVEI1 " logging.debug(" - Demod: ZVEI") if "POC512" in args.demod: demodulation += "-a POCSAG512 " logging.debug(" - Demod: POC512")