DataPointRequest

public struct DataPointRequest

A Time Series request to retrieve a datapoint or datapoints.

The DataPointRequest allows you to setup a request that can be used to fetch the datapoints for a set of tags and tag attributes.

Basic Usage:

   let dataPointRequest = DataPointRequest(["sensorTag1"])

In this example a request would be created that when fetched would return all data points for sensorTag1

  • The tag and attribute queries for the request

    Declaration

    Swift

    public let tagQuerys: [TagQuery]
  • The time range to data points need to fall into

    Declaration

    Swift

    public let timeRange: TimeRange?
  • Constructs a DataPointRequest using an array of TagQuerys

    Declaration

    Swift

    public init(tagQuerys: [TagQuery], timeRange: TimeRange? = nil)

    Parameters

    tagQuerys

    An array of tags and the query attributes

    timeRange

    Limit the data points to those that fall within the time range

  • Constructs a DataPointRequest using an array of Strings

    Declaration

    Swift

    public init(tagNames: [String], timeRange: TimeRange? = nil)

    Parameters

    tagNames

    An array of tag names

    timeRange

    Limit the data points to those that fall within the time range