This is an old revision of the document!


Amount

This is a function of the LagCorrection class.

Description

This function is used to calculate a lagged time based on a counter.

For example, you can use it if you have a sensor that counts the number of products that have gone past a particular point, to go from any given time to a time x number of products ago.

Parameters

ParameterTypeMeaning
timeslist of datetimesThe UTC dates and times for each sample

Returns

A list of samples - one for each requested time-frame.

Example

    srv = ardiapi.Server("demo.optrix.com.au/s/ex")
    smp = samplestream.samplestream(srv,"'Wind Turbine #1' ASSET 'Power' PROPERTY",30,30,15)
 
    datesneeded = [ datetime.datetime.now() - datetime.timedelta(seconds=200) ]
    samples = smp.GatherSamples(datesneeded)