def run(self): if _debug: ConsoleCmd._debug("run") # run the command loop #self.cmdloop() #self.do_read("10.0.0.228 analogInput 196608 presentValue") time.sleep(0.1) while True: self.do_read("10.0.0.228 analogInput 196608 presentValue") self.do_read("10.0.0.228 analogInput 196608 presentValue") time.sleep(5) if _debug: ConsoleCmd._debug(" - done cmdloop") # tell the main thread for this device to stop, this thread will exit bacpypes.core.stop()
def __init__(self): if _debug: Shell._debug("__init__") global args prompt = args.prompt if args.args: command_input = StringIO(' '.join(args.args)) # turn off raw input self.use_rawinput = False # continue with initialization ConsoleCmd.__init__(self, stdin=command_input, prompt='') # turn off interactive (bug in ConsoleCmd) self.interactive = False else: ConsoleCmd.__init__(self, prompt=args.prompt)
def __init__(self): Client.__init__(self) Server.__init__(self) ConsoleCmd.__init__(self)
def __init__(self): if _debug: ConsoleClient._debug("__init__") ConsoleCmd.__init__(self) # no current request self.req = None
import logging from bacpypes.debugging import Logging, ModuleLogger from bacpypes.consolecmd import ConsoleCmd from bacpypes.core import run # some debugging _debug = 0 _log = ModuleLogger(globals()) # # __main__ # try: _log.debug("initialization") # console ConsoleCmd() _log.debug("running") # run until stopped run() except Exception, e: _log.exception("an error has occurred: %s", e) finally: _log.debug("finally")
def __init__(self, controller): if _debug: ConsoleClient._debug("__init__ %r", controller) ConsoleCmd.__init__(self) # save the controller self.controller = controller