Example #1
0
def loadFilters():
	"""
	load all filters from the config.ini into globals.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 globals.config.items("Filters"):
			logging.debug(" - %s = %s", key, val)
			filter = val.split(";")

			# resolve the * for freqToHz()
			if not filter[3] == "*":
				filter[3] = converter.freqToHz(filter[3])

			# insert splitet data into globals.filterList
			globals.filterList.append({"name": key, "typ": filter[0], "dataField": filter[1], "plugin": filter[2], "freq": filter[3], "regex": filter[4]})
	except:
		logging.error("cannot read config file")
		logging.debug("cannot read config file", exc_info=True)
		return
Example #2
0
def loadFilters():
    """
	load all filters from the config.ini into globals.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 globals.config.items("Filters"):
            logging.debug(" - %s = %s", key, val)
            filter = val.split(";")

            # resolve the * for freqToHz()
            if not filter[3] == "*":
                filter[3] = converter.freqToHz(filter[3])

                # insert splitet data into globals.filterList
            globals.filterList.append(
                {
                    "name": key,
                    "typ": filter[0],
                    "dataField": filter[1],
                    "plugin": filter[2],
                    "freq": filter[3],
                    "regex": filter[4],
                }
            )
    except:
        logging.error("cannot read config file")
        logging.debug("cannot read config file", exc_info=True)
        return
Example #3
0
		# It's an error, but we could work without that stuff...
		logging.error("cannot clear Logfiles")
		logging.debug("cannot clear Logfiles", exc_info=True)
		pass

	#
	# For debug display/log args
	#
	try:
		logging.debug("SW Version:	%s",globals.getVers("vers"))
		logging.debug("Build Date:	%s",globals.getVers("date"))
		logging.debug("BOSWatch given arguments")
		if args.test:
			logging.debug(" - Test-Mode!")

		logging.debug(" - Frequency: %s", converter.freqToHz(args.freq))
		logging.debug(" - Device: %s", args.device)
		logging.debug(" - PPM Error: %s", args.error)
		logging.debug(" - Squelch: %s", args.squelch)

		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")
		if "POC1200" in args.demod: