TimeSeriesManager
public class TimeSeriesManager
                TimeSeriesManager provides an API that allows you to retreive tags and datapoints from a Time Series instance running in PredixCluod.
The TimeSeriesManager is intended to work with the Predix Cloud Time Series service, for more information please see the Time Series service documentation.
Example usage:
   // First, create a TimeSeriesManagerConfiguration and populate the configuration with your Time Series service information.
   let config = TimeSeriesManagerConfiguration(predixZoneId: "<your ZoneID used for the Time Series Service>")
   // Next, create a TimeSeriesManager with the TimeSeriesManagerConfiguration
   let manager = TimeSeriesManager(configuration: config)
   // Then call the API. The completionHandler will be called when the process finishes.
   self.getManager().getTags(completionHandler:{(tags,  error) in
   ...
}
          - 
                  
                  
The configuration tells the TimeSeriesManager how to connect to the Time Series Service running in Predix Cloud
Declaration
Swift
public internal(set) var configuration: TimeSeriesManagerConfiguration - 
                  
                  
Initializes the TimeSeriesManager with a the time series configuration for the Time Series Service
Declaration
Swift
required public init(configuration: TimeSeriesManagerConfiguration)Parameters
configurationA TimeSeriesManagerConfiguration for this manager
 - 
                  
                  
Fetches all of the available Time Series Tags for the configured Time Series instance
Declaration
Swift
public func fetchTagNames(completionHandler: @escaping ( _ tags: [String], _ error: Error?) -> Void)Parameters
completionHandlerclosure to call when the fetch has completed
tagsAn array of tags. If an error occurs an empty array will be returned
errorIn the event of an error the error parameter will contain information about why the fetch failed
 - 
                  
                  
Fetches datapoints for a given DataPointRequest
Declaration
Swift
public func fetchDataPoints(request: DataPointRequest, completionHandler: @escaping ( _ timeSeriesResponse: DataPointResponse?, _ error: Error?) -> Void)Parameters
requestA DataPointRequest that instructs fetch about the type of Time Series data to retrieve
completionHandlerclosure to call when the fetch has completed
timeSeriesResponseThe reponse for the given DataPointRequest. The DataPointResponse will be nil if an error occurs
errorIn the event of an error the error parameter will contain information about why the fetch failed
 - 
                  
                  
Fetches the latest datapoints for a given DataPointRequest
Declaration
Swift
public func fetchLatestDataPoints(request: LatestDataPointRequest, completionHandler: @escaping ( _ timeSeriesResponse: DataPointResponse?, _ error: Error?) -> Void)Parameters
requestA LatestDataPointRequest that instructs fetch about the type of Time Series data to retrieve
completionHandlerclosure to call when the fetch has completed
timeSeriesResponseThe reponse for the given LatestDataPointRequest. The DataPointResponse will be nil if an error occurs
errorIn the event of an error the error parameter will contain information about why the fetch failed
 
            View on GitHub
          
      TimeSeriesManager Class Reference