Package elisa :: Package plugins :: Package bad :: Package weather :: Module weather_model
[hide private]
[frames] | no frames]

Source Code for Module elisa.plugins.bad.weather.weather_model

 1  # -*- coding: utf-8 -*- 
 2  # Elisa - Home multimedia server 
 3  # Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com). 
 4  # All rights reserved. 
 5  # 
 6  # This file is available under one of two license agreements. 
 7  # 
 8  # This file is licensed under the GPL version 3. 
 9  # See "LICENSE.GPL" in the root of this distribution including a special 
10  # exception to use Elisa with Fluendo's plugins. 
11  # 
12  # The GPL part of Elisa is also available under a commercial licensing 
13  # agreement from Fluendo. 
14  # See "LICENSE.Elisa" in the root directory of this distribution package 
15  # for details on that license. 
16   
17   
18  __maintainer__ = 'Benjamin Kampmann <benjamin@fluendo.com>' 
19   
20   
21  from elisa.base_components.model import Model 
22   
23 -class WeatherModel(Model):
24 """ 25 Modelize the weather. 26 27 @ivar location: the location, the data where taken at 28 @type location: string 29 30 @ivar temp: temperature in celsius 31 @type temp: float 32 33 @ivar wind_speed: speed of the wind in kilometers per hour (km/h) 34 @type wind_speed: integer 35 36 @ivar wind_dir: direction of the wind in degrees (°) 37 @type wind_dir: integer 38 39 @ivar press: pressure in hectopasca (hPa) 40 @type press: float 41 42 @ivar dew: the dew point in celsius 43 @type dew: float 44 45 @ivar relHumidity: the relative Humidity in percent 46 @type relHumidity: float 47 48 @ivar icon: what icon to use 49 @type icon: string 50 """ 51 location = '' 52 temp = 0 53 relHumidity = 0 54 wind_speed = 0 55 wind_dir = 0 56 press = 0 57 dew = 0 58 sky = '' 59 icon = '' 60 view = 0 61
62 - def __repr__(self):
63 return "<WeatherModel instance %r for has got this data:\n\t Location: %s\n\t Temp: %s\n\t Humidity: %s\n\t Wind speed: %s\n\t Wind direction: %s\n\t Pressure: %s\n\t Dew point: %s\n\t Sky conditions: %s\n\t the Icon: %s\n\t\t\t\t\t\t\t>" % (id(self),self.location,self.temp, self.relHumidity,self.wind_speed,self.wind_dir,self.press,self.dew,self.sky,self.icon)
64