示例#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
示例#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
示例#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
示例#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
示例#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)
示例#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)
示例#7
0
 def _onError(self, event):
     log.debug(event.description)
     log.verbose("{} event received".format(type))
     for cb in self.callback['error']:
         cb(event)
示例#8
0
 def close(self):
     log.verbose("Closing InterfaceKit")
     self.ik.closePhidget()
     log.debug("Interfac kit closed")
示例#9
0
 def start(self):
     log.verbose("Opening remote IP")
     self.ik.openRemoteIP(self.IP, self.port, self.devserial)
     log.debug("Remote IP opened")
示例#10
0
 def _onError(self, event):
     log.debug(event.description)
     log.verbose("{} event received".format(type))
     for cb in self.callback['error']:
         cb(event)
示例#11
0
 def close(self):
     log.verbose("Closing InterfaceKit")
     self.ik.closePhidget()
     log.debug("Interfac kit closed")
示例#12
0
 def start(self):
     log.verbose("Opening remote IP")
     self.ik.openRemoteIP(self.IP, self.port, self.devserial)
     log.debug("Remote IP opened")