Beispiel #1
0
 def _onSensor(self, event):
     log.verbose("Sensor event received")
     for cb in self.callback['sensor']:
         cb(event)
     try:
         for cb in self.sensor[event.index].callback['value']:
             cb(event)
     except KeyError:
         pass
Beispiel #2
0
 def _onSensor(self, event):
     log.verbose("Sensor event received")
     for cb in self.callback['sensor']:
         cb(event)
     try:
         for cb in self.sensor[event.index].callback['value']:
             cb(event)
     except KeyError:
         pass
Beispiel #3
0
 def _onInput(self, event):
     log.verbose("Input event received")
     for cb in self.callback['input']:
         cb(event)
     try:
         for cb in self.input[event.index].callback['value']:
             cb(event)
     except KeyError:
         pass
Beispiel #4
0
 def _onInput(self, event):
     log.verbose("Input event received")
     for cb in self.callback['input']:
         cb(event)
     try:
         for cb in self.input[event.index].callback['value']:
             cb(event)
     except KeyError:
         pass
Beispiel #5
0
 def _genericCB(self, event, type):
     log.verbose("{} event received".format(type))
     for cb in self.callback[type]:
         cb(event)
     for dev in self.input.itervalues():
         for cb in dev.callback[type]:
             cb(event)
     for dev in self.output.itervalues():
         for cb in dev.callback[type]:
             cb(event)
     for dev in self.sensor.itervalues():
         for cb in dev.callback[type]:
             cb(event)
Beispiel #6
0
 def _genericCB(self, event, type):
     log.verbose("{} event received".format(type))
     for cb in self.callback[type]:
         cb(event)
     for dev in self.input.itervalues():
         for cb in dev.callback[type]:
             cb(event)
     for dev in self.output.itervalues():
         for cb in dev.callback[type]:
             cb(event)
     for dev in self.sensor.itervalues():
         for cb in dev.callback[type]:
             cb(event)
Beispiel #7
0
 def _onError(self, event):
     log.debug(event.description)
     log.verbose("{} event received".format(type))
     for cb in self.callback['error']:
         cb(event)
Beispiel #8
0
 def close(self):
     log.verbose("Closing InterfaceKit")
     self.ik.closePhidget()
     log.debug("Interfac kit closed")
Beispiel #9
0
 def start(self):
     log.verbose("Opening remote IP")
     self.ik.openRemoteIP(self.IP, self.port, self.devserial)
     log.debug("Remote IP opened")
Beispiel #10
0
 def _onError(self, event):
     log.debug(event.description)
     log.verbose("{} event received".format(type))
     for cb in self.callback['error']:
         cb(event)
Beispiel #11
0
 def close(self):
     log.verbose("Closing InterfaceKit")
     self.ik.closePhidget()
     log.debug("Interfac kit closed")
Beispiel #12
0
 def start(self):
     log.verbose("Opening remote IP")
     self.ik.openRemoteIP(self.IP, self.port, self.devserial)
     log.debug("Remote IP opened")