示例#1
0
文件: stations.py 项目: sp4x/osnf
 def __init__(self, name, description, connector, data={}, monitors=[]):
     Station.__init__(self, name, description, connector, data=data, monitors=monitors)
     self.on = False
示例#2
0
文件: stations.py 项目: sp4x/osnf
 def __init__(self, name, description, connector, data={}, monitors=[]):
     StoppableThread.__init__(self)
     Station.__init__(self, name, description, connector, data=data, monitors=monitors)
     self.pattern = re.compile('\w+:\d+')
     self.mapping = {'TEMP' : 'temperature', 'HUM' : 'humidity', 'LIGHT' : 'brightness', 'TIME' : 'time' }
     self.types = {'TEMP' : float, 'HUM' : float, 'LIGHT' : float, 'TIME' : int }