import logging import time import signal import os log = logging.getLogger('openRoverApp') if __name__=="__main__": # Update pythonpath if running in in-tree development mode basedir = os.path.dirname(__file__) confFile = os.path.join(basedir, "openvisualizer.conf") if os.path.exists(confFile): import pathHelper pathHelper.updatePath() from openvisualizer.moteProbe import moteProbe from openvisualizer.remoteConnectorRover import remoteConnectorRover class OpenRoverApp(object): ''' Provides an application model for OpenVisualizer. Provides common, top-level functionality for several UI clients. ''' def __init__(self): # local variables # in "hardware" mode, motes are connected to the serial port self.moteProbes = []
# Copyright (c) 2010-2013, Regents of the University of California. # All rights reserved. # # Released under the BSD 3-Clause license as published at the link below. # https://openwsn.atlassian.net/wiki/display/OW/License import sys import os if __name__ == "__main__": # Update pythonpath if running in in-tree development mode basedir = os.path.dirname(__file__) confFile = os.path.join(basedir, "openvisualizer.conf") if os.path.exists(confFile): import pathHelper pathHelper.updatePath() import logging log = logging.getLogger('openVisualizerGui') try: from openvisualizer.moteState import moteState except ImportError: # Debug failed lookup on first library import print 'ImportError: cannot find openvisualizer.moteState module' print 'sys.path:\n\t{0}'.format('\n\t'.join(str(p) for p in sys.path)) import openVisualizerApp from openvisualizer.openUI import OpenWindow from openvisualizer.openUI import OpenFrameState from openvisualizer.openUI import OpenFrameButton