Ejemplo n.º 1
0
 /// <summary>
 /// Initialises a data source template
 /// </summary>
 /// <param name="dataSourceName">Name of the data source</param>
 /// <param name="type">Type of the data source. Valid values are: GAUGE</param>
 /// <param name="intervalInSeconds">Interval in seconds between readings</param>
 /// <param name="minThreshold">Minimum value that is acceptable for a reading to be considered valid</param>
 /// <param name="maxThreshold">Maximum value that is acceptable for a reading to be considered valid</param>
 public DataSourceTemplate(string dataSourceName, DataSource.ConversionFunctionType conversionFunction, TimeSpan pollingInterval, double min, double max)
 {
     this.Name = dataSourceName;
     this.ConversionFunction = conversionFunction;
     this.PollingInterval    = pollingInterval;
     this.MinThreshold       = min;
     this.MaxThreshold       = max;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Add a new data source template
 /// </summary>
 /// <param name="dataSourceName">Name of the data source</param>
 /// <param name="type">Type of the data source must be GAUGE</param>
 /// <param name="interval">Interval between readings measured in seconds</param>
 /// <param name="min">Minimum threshold for readings any reading below this threshold will be discarded</param>
 /// <param name="max">Maximum threshold for readings any reading above this threshold will be discarded</param>
 public void AddDataSource(string dataSourceName, DataSource.ConversionFunctionType type, TimeSpan interval, double min, double max)
 {
     AddDataSource(new DataSourceTemplate(dataSourceName, type, interval, min, max));
 }