7 Replies Latest reply on May 11, 2017 4:22 PM by cdray

    AF SDK Summaries question

    MikeSpath

      Hello Fellow SDK developers:

      I have a strange issue with a PIPointList.Summaries() result, the last value's timestamp is wrong.

      I have attached a word doc that shows the debug screen, below is the code:

       

                          var span = AFTimeSpan.Parse(timespan + spanUnit.ToString());

                          var points = PIPoint.FindPIPoints(serv, lstVesselTagNmes);

                          var pointList = new PIPointList(points);

       

       

                          // Results should be sent back for 10000 tags in each page.

                          var config = new PIPagingConfiguration(PIPageType.TagCount, 10000);

                          var listAvgResults = pointList.Summaries(myTimeRange, span, type,

                              AFCalculationBasis.TimeWeighted, AFTimestampCalculation.Auto, config);

                          List<AFValues> afValues = listAvgResults.Select(pointResults => pointResults[type]).ToList();

       

       

                          foreach (var pointValues in afValues)

                          {

      The timespan is set to 1 hr.

      The time range is 9-mar-17 13:26 to 16-mar-17 13:05

      First AFValue = 9-mar-17 13:26

      Last Value = 16-mar-17 11:26

      Where is 12:26???

      It is clearly in the data archive.

      The issue is that it seems to happen randomly.

       

      Any suggestions would help!

      Mike