6 Replies Latest reply on Sep 4, 2015 9:38 AM by larsoleruben

    Custom Datareference: AFDataReference method GetValues & GetValue

    larsoleruben

      Hi

      We are writing a custom data-reference which looks at a certain eventframes in a time range and makes a stepped value from the event frame, i.e. when there is an event frame the rendered value is 0 (asset down) and with no event frames the value is 1 (i.e. our asset i doing OK).

      This works fine with "archived values" (using the overwritten RecordedValues) and also with "plot values" ( using the overwritten method PlotValues)

      But the method "SAMPLED" ALWAYS calls the overwritten method GetValue (returning a single AFValue) and not as i would have thought GetValues? This has some performance issues as the GetValue is called for every point in time the sampled value renders, thus making me check for eventframes over and over again. This performs rather badly. I would have wished to be able just to return an array of values, making performance much better?

      It seems that GetValues is never ever called? Is that true and what purpose does it have?