public bool ParsingValues(int index, OpReportGeneratorTagNames TagNames, IEnumerable <DataPoint> datalist) { //if ((datalist.Count() == 0) || (TagNames == null)) return false; this.Params.Uab.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Uab, datalist)); this.Params.Ubc.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ubc, datalist)); this.Params.Uca.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Uca, datalist)); //this.Params.Ua.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ua, datalist)); //this.Params.Ub.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ub, datalist)); //this.Params.Uc.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Uc, datalist)); this.Params.Ia.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ia, datalist)); this.Params.Ib.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ib, datalist)); this.Params.Ic.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ic, datalist)); this.Params.P.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.P, datalist)); this.Params.Q.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Q, datalist)); this.Params.F.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.F, datalist)); this.Rotor.U.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.URotor, datalist)); this.Rotor.I.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.IRotor, datalist)); this.Rotor.Velocity.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.VRotor, datalist)); return(true); }
public IEnumerable <OpReportFeeder> Feeder(string FactoryName, int day, int month, int year) { List <OpReportFeeder> result = new List <OpReportFeeder>(); List <OpReportFeederTagNames> TagNames = OpReportUtils.GetFeederTagNames(FactoryName); List <string> TagNameQuery = new List <string>(); DateTime start = new DateTime(year, month, day); DateTime end = start.AddDays(1); foreach (OpReportFeederTagNames tag in TagNames) { OpReportFeeder feeder = new OpReportFeeder(tag.Name); result.Add(feeder); TagNameQuery.AddRange(tag.ToStringArray()); } while (start < end) { DateTime end2 = start.AddMinutes(60); List <DataPoint> data = ScadaHisDao.AnalogSummaryHistory(start, end2, TagNameQuery.ToArray(), ScadaHisDao.SummaryType.Average).ToList(); for (int i = 0; i < result.Count; i++) { result.ElementAt(i).ParsingValues(start.Hour, TagNames.ElementAt(i), data); } start = end2; } return(result); }
public IEnumerable <DataPoint> TrendP(string FactoryName, DateTime start, DateTime end) { try { List <string> taglist = OpReportUtils.GetPList(FactoryName); List <DataPoint> result = new List <DataPoint>(); if (taglist.Count > 0) { result = ScadaHisDao.AnalogSummaryHistoryCyclic(start, end, 30, taglist.ToArray(), ScadaHisDao.SummaryType.Average); } return(result); } catch { return(new List <DataPoint>()); } }
public bool ParsingValues(int index, OpReportFeederTagNames TagNames, IEnumerable <DataPoint> datalist) { //if ((datalist.Count() == 0) || (TagNames == null)) return false; this.Uab.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Uab, datalist)); this.Ubc.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ubc, datalist)); this.Uca.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Uca, datalist)); this.Ia.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ia, datalist)); this.Ib.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ib, datalist)); this.Ic.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ic, datalist)); this.P.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.P, datalist)); this.Q.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Q, datalist)); this.F.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.F, datalist)); return(true); }
public IEnumerable <string> GeneratorCount(string FactoryName) { try { List <OpReportGeneratorTagNames> genList = OpReportUtils.GetGeneratorTagNames(FactoryName); List <string> result = new List <string>(); if (genList.Count > 0) { foreach (OpReportGeneratorTagNames item in genList) { result.Add(item.Name); } } return(result); } catch { return(null); } }
public bool ParsingValues(int index, OpReportTransformerTagNames TagNames, IEnumerable <DataPoint> datalist) { if ((datalist.Count() == 0) || (TagNames == null)) { return(false); } this.Ua.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ua, datalist)); this.Ub.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ub, datalist)); this.Uc.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Uc, datalist)); this.Ia.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ia, datalist)); this.Ib.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ib, datalist)); this.Ic.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.Ic, datalist)); this.OilTemp.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.OilTemp, datalist)); this.WindTemp.SetValues(index, OpReportUtils.GetHourlyValues(TagNames.WindTemp, datalist)); return(true); }