public CacheDataDeviceSensor(DAO.CalculType type, IObservable observable) { Tic_minute = 0; Tic_hour = 0; Tic_day = 0; Tic_week = 0; Type = new Dictionary <string, DAO.CalculType>(); ResultCalculType = new Dictionary <string, Dictionary <string, double> >(); Type.Add(type.Period, type); Cache = new Dictionary <string, Dictionary <string, List <Business.RawData> > >(); observable.RegisterObserver(this); }
public void AddCalculType(DAO.CalculType calcul) { Type.Add(calcul.Period, calcul); }
public static Business.CalculType DAOToBusiness(DAO.CalculType dao) { return(new Business.CalculType(dao.Id, dao.Name, dao.Description, dao.Unit, dao.Period, dao.PeriodSecondCount, dao.SensorType)); }