Esempio n. 1
0
    def __init__(self):
        global _requests

        self.camip = "sonycam.msgroup.ucla.edu"
        self.ourip = socket.gethostbyaddr(socket.gethostname())[-1][0]
        self.port = 9218
        self.camtool = "./camctrl"
        self.pan=0
        self.tilt=0
        self.zoom=0
        self.setCam()
        
        print "Start parsing xml file"
        espmlFile = 'sonyCamSystem.xml'
        espmlDocObject = espml.parse(espmlFile)
        systemElement = espmlDocObject.getSystem()
        systemElement.setId('http://'+str(self.ourip)+':'+self.port)
        espmlDocObject.export(file(espmlFile, 'w'), 0)
        
        System.__init__(self, self.port, "http://128.97.93.5:1718/", "sonyCamSystem.xml")
        print "Registered system"
        

        #the next call is blocking!
        print "starting..."
        self.start()
        
        raw_input("Press a key when done")
Esempio n. 2
0
    def __init__(self):
        global _requests

        self.camip = "sonycam.msgroup.ucla.edu"
        self.ourip = socket.gethostbyaddr(socket.gethostname())[-1][0]
        self.port = 9218
        self.camtool = "./camctrl"
        self.pan = 0
        self.tilt = 0
        self.zoom = 0
        self.setCam()

        print "Start parsing xml file"
        espmlFile = 'sonyCamSystem.xml'
        espmlDocObject = espml.parse(espmlFile)
        systemElement = espmlDocObject.getSystem()
        systemElement.setId('http://' + str(self.ourip) + ':' + self.port)
        espmlDocObject.export(file(espmlFile, 'w'), 0)

        System.__init__(self, self.port, "http://128.97.93.5:1718/",
                        "sonyCamSystem.xml")
        print "Registered system"

        #the next call is blocking!
        print "starting..."
        self.start()

        raw_input("Press a key when done")
Esempio n. 3
0
    def __init__(self):
        global _requests

        System.__init__(self, 8081, "http://128.97.93.154:8080/", "sos_system.xml")
        # start the SOAP server
        
        self.sossrvClient = sossrv_tools.SossrvClient()

        _requests = {'field_getCurrent': {},
                     'field_average': {},
                     'sensor_getCurrentValue': {},
                     'sensor_getAverageValue': {}
                     }

        self.sensorModule = SensorModule()
        self.sossrvClient.register_module(self.sensorModule)
        # connect to the sossrv application
        self.sossrvClient.connect()

        SocketServer.TCPServer.__init__(self, ('128.97.93.154', 8082) , ESPRequestHandler)
        esphttpserver = thread.start_new_thread(self.serve_forever, ())

        #the next call is blocking!
        print "starting..."
        self.start()
        
        raw_input("Press a key when done")
Esempio n. 4
0
    def __init__(self, engine):
        """Constructor"""
        System.__init__(self, engine)
        ogre.FrameListener.__init__(self)
        ogre.WindowEventListener.__init__(self)
        OIS.KeyListener.__init__(self)
        OIS.MouseListener.__init__(self)
        OIS.JoyStickListener.__init__(self)

        self.handlers = [dict() for x in range(InputEvent.NUM)]
        self.mouse_handlers = [dict() for x in range(MouseEvent.NUM)]
        self.joy_handlers = [dict() for x in range(JoyEvent.NUM)]
        self.key_states = {}
        self.keys_down = list()
        self.mouse_buttons_down = {}
        self.mouse_down_pos = {}
        self.mouse_down_over = {}
        self.mouse_down_modifiers = {}
        self.input_locks = {}
        for mb in MouseButton.LIST:
            self.mouse_buttons_down[mb] = False
            self.mouse_down_pos[mb] = None
            self.mouse_down_over[mb] = None
            self.mouse_down_modifiers[mb] = [False for x in range(Modifier.NUM)]
            self.input_locks[mb] = InputLock()
        self.mouse_state = None

        #box selection
        #self.selection_dd_context = self.engine.debugDrawSystem.getContext()
        #self.boxSelection = None
        #self.maintainDDContext = self.engine.debugDrawSystem.getContext()
        self.translation_to_apply = vector3(0,0,0)

        self.translation_to_apply_time_left = 0
Esempio n. 5
0
    def __init__(self):
        global _requests

        System.__init__(self, 8081, "http://128.97.93.154:8080/",
                        "sos_system.xml")
        # start the SOAP server

        self.sossrvClient = sossrv_tools.SossrvClient()

        _requests = {
            'field_getCurrent': {},
            'field_average': {},
            'sensor_getCurrentValue': {},
            'sensor_getAverageValue': {}
        }

        self.sensorModule = SensorModule()
        self.sossrvClient.register_module(self.sensorModule)
        # connect to the sossrv application
        self.sossrvClient.connect()

        SocketServer.TCPServer.__init__(self, ('128.97.93.154', 8082),
                                        ESPRequestHandler)
        esphttpserver = thread.start_new_thread(self.serve_forever, ())

        #the next call is blocking!
        print "starting..."
        self.start()

        raw_input("Press a key when done")
Esempio n. 6
0
    def __init__(self):
        global _requests

        System.__init__(self, 7081, "http://128.97.93.154:8080/", "soundscape_system.xml")

        #the next call is blocking!
        print "starting..."
        self.start()
        
        raw_input("Press a key when done")
Esempio n. 7
0
    def __init__(self):
        global _requests

        System.__init__(self, 7082, "128.97.93.5:1817", "sensorbase_system.xml")

        #the next call is blocking!
        print "starting..."
        self.start()
        
        raw_input("Press a key when done")
Esempio n. 8
0
    def __init__(self):
        global _requests

        System.__init__(self, 7082, "128.97.93.5:1817",
                        "sensorbase_system.xml")

        #the next call is blocking!
        print "starting..."
        self.start()

        raw_input("Press a key when done")
Esempio n. 9
0
    def __init__(self):
        global _requests

        System.__init__(self, 7081, "http://128.97.93.154:8080/",
                        "soundscape_system.xml")

        #the next call is blocking!
        print "starting..."
        self.start()

        raw_input("Press a key when done")
Esempio n. 10
0
    def __init__(self):
        global _requests

        print "Start parsing xml file"
        System.__init__(self, 9181, "http://128.97.93.154:8080/", "beachCamSystem.xml")
        print "Registered system"
        

        #the next call is blocking!
        print "starting..."
        self.start()
        
        raw_input("Press a key when done")
Esempio n. 11
0
    def __init__(self):
        global _requests

        print "Start parsing xml file"
        System.__init__(self, 8081, "http://127.0.0.1:8080/", "iTunesSystem.xml")
        print "Registered system"
        

        #the next call is blocking!
        print "starting..."
        self.start()
        
        raw_input("Press a key when done")
Esempio n. 12
0
    def __init__(self):
        global _requests

        print "Start parsing xml file"
        System.__init__(self, 9181, "http://128.97.93.154:8080/",
                        "beachCamSystem.xml")
        print "Registered system"

        #the next call is blocking!
        print "starting..."
        self.start()

        raw_input("Press a key when done")
 def __init__(self,
              name="Minnesota State Colleges and Universities",
              abbreviation="Minnstate",
              url=None,
              number=None):
     """
        Constructor for MinnStateSystem objects
        :param abbreviation: string, the abbreviation of the MinnState system
        :param name: string, The full name of the MinnState system
        :param url: string, The url of the MinnStateSystem including https.
     """
     System.__init__(self, name, abbreviation, url)
     self.number = number
     self.semesters = {}
Esempio n. 14
0
    def __init__(self):
        global _requests

        print "Start parsing xml file"
        System.__init__(self, 9081, "http://128.97.93.154:8080/", "weatherSystem.xml")
        print "Registered system"
        
        # start the SOAP server
        
        SocketServer.TCPServer.__init__(self, ('128.97.93.154', 9082) , ESPRequestHandler)
        esphttpserver = thread.start_new_thread(self.serve_forever, ())

        #the next call is blocking!
        print "starting..."
        self.start()
        
        raw_input("Press a key when done")
Esempio n. 15
0
    def __init__(self):
        global _requests

        print "Start parsing xml file"
        System.__init__(self, 9081, "http://128.97.93.154:8080/",
                        "weatherSystem.xml")
        print "Registered system"

        # start the SOAP server

        SocketServer.TCPServer.__init__(self, ('128.97.93.154', 9082),
                                        ESPRequestHandler)
        esphttpserver = thread.start_new_thread(self.serve_forever, ())

        #the next call is blocking!
        print "starting..."
        self.start()

        raw_input("Press a key when done")