Пример #1
0
 def configure( self, cfgDict ):
     """
     called with an XmlDom that contains the configuration for self
     """
     if cfgDict.has_key('serialPort'):
         self.serialPort = cfgDict['serialPort']
     _log.debug( "serialPort %s" % self.serialPort )
     BaseHandler.configure( self, cfgDict )
Пример #2
0
    def configure( self, cfgDict ):
        self._portName = cfgDict["serialPort"]
        try:
            # is it a numeric string?
            self._portName = int(self._portName)
        except Exception:
            pass

        BaseHandler.configure( self, cfgDict )
        self._heatmiserDriver = HeatmiserDriver( self._portName )

        # load heatmisers
        if isinstance( cfgDict["heatmiser"], list ):
            for hm in cfgDict["heatmiser"]:
                self.doAddHeatmiser( hm )
        else:
            self.doAddHeatmiser( cfgDict["heatmiser"] )
Пример #3
0
    def configure( self, cfgDict ):
        self._portName = cfgDict["serialPort"]

        BaseHandler.configure( self, cfgDict )
        self._LedLightingDriver = LedLightingDriver( self._portName )