Пример #1
0
 def __enter__(self):
     with self.lock:
         self.messageboard.subscribe('Measurement', self,
                                     Status.onMeasurement)
         self.messageboard.subscribe('StatusProcessed', self,
                                     Status.onStatusProcessed)
         self.messageboard.subscribe('Mode', self, Status.onMode)
     return Component.__enter__(self)
Пример #2
0
 def __enter__(self):
     with self.lock:
         self.buttoncontroller = Buttoncontroller(self.messageboard)
         self.buttoncontroller.__enter__()
         self.buttoncontroller.addbuttoncallback(button_left, self.cancel)
         self.buttoncontroller.addbuttoncallback(button_back, self.back)
         self.buttoncontroller.addbuttoncallback(button_front, self.forward)
         self.buttoncontroller.addbuttoncallback(button_right, self.select)
     return Component.__enter__(self)
Пример #3
0
 def __enter__(self):
     with self.lock:
         self.messageboard.subscribe('Measurement', self,
                                     HtmlWriter.onMeasurement)
         self.messageboard.subscribe('HTMLStatus', self,
                                     HtmlWriter.onHTMLStatus)
         self.messageboard.subscribe('FanState', self,
                                     HtmlWriter.onFanState)
         self.messageboard.subscribe('Mode', self, HtmlWriter.onMode)
     return Component.__enter__(self)
Пример #4
0
 def __enter__(self):
     with self.lock:
         self.messageboard.subscribe('Measurement', self,
                                     Display.onMeasurement)
         self.messageboard.subscribe('Time', self, Display.onTime)
         self.messageboard.subscribe('MainScreen', self,
                                     Display.onMainScreen)
         self.messageboard.subscribe('Menu', self, Display.onMenu)
         self.messageboard.subscribe('Info', self, Display.onInfo)
     return Component.__enter__(self)
Пример #5
0
 def __enter__(self):
     with self.lock:
         self.messageboard.subscribe('Measurement', self,
                                     Average.onMeasurement)
         self.messageboard.subscribe('Average', self, Average.onAverage)
     return Component.__enter__(self)
Пример #6
0
 def __enter__(self):
     with self.lock:
         self.messageboard.subscribe('RestartWLAN', self,
                                     RestartWLAN.onResetWLAN)
     return Component.__enter__(self)
Пример #7
0
 def __enter__(self):
     with self.lock:
         self.messageboard.subscribe('Mode', self, Fan.onMode)
         self.messageboard.subscribe('Time', self, Fan.onTime)
     return Component.__enter__(self)