Exemple #1
0
 def close(self, event):
     log.debug("Closing LTCBackend")
     try:
         self.ignite(False)
     except PhidgetException:
         log.info("Unable to turn off ignite on quit")
     self.relay.close()
     self.core.close()
Exemple #2
0
 def close(self, event):
     log.debug("Closing LTCBackend")
     try:
         self.ignite(False)
     except PhidgetException:
         log.info("Unable to turn off ignite on quit")
     self.relay.close()
     self.core.close()
Exemple #3
0
 def __init__(self, **kwargs):
     log.debug("Acquiring InterfaceKit")
     self.ik = InterfaceKit()
     log.debug("Registering Handlers")
     self.ik.setOnAttachHandler(self._onAttach)
     self.ik.setOnDetachHandler(self._onDetach)
     self.ik.setOnErrorhandler(self._onError)
     self.ik.setOnOutputChangeHandler(self._onOutput)
     self.ik.setOnInputChangeHandler(self._onInput)
     self.ik.setOnSensorChangeHandler(self._onSensor)
Exemple #4
0
 def __init__(self, **kwargs):
     log.debug("Acquiring InterfaceKit")
     self.ik = InterfaceKit()
     log.debug("Registering Handlers")
     self.ik.setOnAttachHandler(self._onAttach)
     self.ik.setOnDetachHandler(self._onDetach)
     self.ik.setOnErrorhandler(self._onError)
     self.ik.setOnOutputChangeHandler(self._onOutput)
     self.ik.setOnInputChangeHandler(self._onInput)
     self.ik.setOnSensorChangeHandler(self._onSensor)
Exemple #5
0
 def add_callback(self, cb, type):
     log.debug("Adding callback to {} sensor".format(self.name))
     self.callback[type].append(cb)
Exemple #6
0
 def _onError(self, event):
     log.debug(event.description)
     log.verbose("{} event received".format(type))
     for cb in self.callback['error']:
         cb(event)
Exemple #7
0
 def remove_callback(self, cb, type):
     log.debug("Removing a {} type callback".format(type))
     self.callback[type].remove(cb)
Exemple #8
0
 def add_callback(self, cb, type):
     log.debug("Adding a {} type callback".format(type))
     self.callback[type].append(cb)
Exemple #9
0
 def close(self):
     log.verbose("Closing InterfaceKit")
     self.ik.closePhidget()
     log.debug("Interfac kit closed")
Exemple #10
0
 def start(self):
     log.verbose("Opening remote IP")
     self.ik.openRemoteIP(self.IP, self.port, self.devserial)
     log.debug("Remote IP opened")
Exemple #11
0
 def add_callback(self, cb, type):
     log.debug("Adding callback to {} sensor".format(self.name))
     self.callback[type].append(cb)
Exemple #12
0
 def _onError(self, event):
     log.debug(event.description)
     log.verbose("{} event received".format(type))
     for cb in self.callback['error']:
         cb(event)
Exemple #13
0
 def remove_callback(self, cb, type):
     log.debug("Removing a {} type callback".format(type))
     self.callback[type].remove(cb)
Exemple #14
0
 def add_callback(self, cb, type):
     log.debug("Adding a {} type callback".format(type))
     self.callback[type].append(cb)
Exemple #15
0
 def close(self):
     log.verbose("Closing InterfaceKit")
     self.ik.closePhidget()
     log.debug("Interfac kit closed")
Exemple #16
0
 def start(self):
     log.verbose("Opening remote IP")
     self.ik.openRemoteIP(self.IP, self.port, self.devserial)
     log.debug("Remote IP opened")