public void RecordedValues(WAFTime start, WAFTime end, WAFBoundryType boundryType, string filterExp, bool includeFiltVals, int maxCount, ref WAFValue[] output) { List<WAFValue> retVals = null; try { AFTimeRange range = new AFTimeRange(start.ToString(), end.ToString()); AFBoundaryType opt = (AFBoundaryType)Enum.ToObject(typeof(AFBoundaryType), (byte)boundryType); AFValues vals = m_Pipt.RecordedValues(range, AFBoundaryType.Interpolated, filterExp, includeFiltVals, maxCount); retVals = vals.ConvertAll(new Converter<AFValue, WAFValue>(WAFValue.AFValueToWAFValue)); } catch (Exception ex) { System.Console.WriteLine(ex.Message); } output = retVals.ToArray(); return; }
public void InterpolatedValues(WAFTime start, WAFTime end, string interval, string filterExp, bool includeFiltVals, ref WAFValue[] values) { List<WAFValue> retVals = null; try { AFTimeRange range = new AFTimeRange(start.ToString(), end.ToString()); AFTimeSpan span = new AFTimeSpan(); if (!AFTimeSpan.TryParse(interval, out span)) { span = AFTimeSpan.Parse("1h"); } AFValues vals = m_Pipt.InterpolatedValues(range, span, filterExp, includeFiltVals); retVals = vals.ConvertAll(new Converter<AFValue, WAFValue>(WAFValue.AFValueToWAFValue)); } catch (Exception ex) { System.Console.WriteLine(ex.Message); } values = retVals.ToArray(); return; }