示例#1
0
def main():
    """main function if this module is called, starts a mqtt listener"""
    parser = base_option_parser()
    opts, _args = parser.parse_args()

    checker = Checker(opts.clientid, opts.host, opts.port)
    print "run 'python mqtt_listener.py", opts.clientid, "' to see the output"
    transport.main_loop(checker, opts.checkinterval)
示例#2
0
def main():
    '''main function if this module is called, starts a mqtt listener'''
    parser = base_option_parser()
    opts, _args = parser.parse_args()

    checker = Checker(opts.clientid, opts.host, opts.port)
    print "run 'python mqtt_listener.py", opts.clientid, "' to see the output"
    transport.main_loop(checker, opts.checkinterval)
示例#3
0
def main():
    '''main function if this module is called, starts a mqtt listener'''
    parser = base_option_parser()
    opts, _args = parser.parse_args()

    login_ep = EndPoint(opts.host, opts.port, opts.loginendpoint)
    data_ep = EndPoint(opts.host, opts.port, opts.endpoint)

    checker = Checker(opts.clientid, opts.username, opts.password, login_ep,
            data_ep, verbose=opts.verbose, blacklist=opts.blacklist.split(","))

    transport.main_loop(checker, opts.checkinterval)