This is an old revision of the document!
AddQuery
This is a function of the LagCorrectedQuery class.
Description
This adds an AQL query that should be run when you Execute the finished request.
Parameters
Parameter | Type | Meaning |
---|---|---|
query | string | The AQL query to run |
lag | float | The amount of lag to apply to this query |
Returns
Nothing
Usage
You normally add a single query for each different level of lag in your system.
For example, Machine A is 100m away, so you query all of the points for that machine in a query with lag set to 100.
Machine B is 50m away, so you add a query for that machine with a lag of 50.
Machine C is at the end of the line - you don't add a lag at all.
Since you usually build these queries backwards, there's often either no lag or only a small amount of lag from the equipment at the end of the line.