package org.glast.base.application.data.trending;
import org.glast.base.application.data.*;
/**
*
* @author The FreeHEP team @ SLAC
*
*/
public interface TrendingDataChannel {
/**
* A TrendingDataChannel is any set of data and metadata that depends either on time directely
* or on some time dependent variable, like release number, version number etc.
*
* The TrendingData provided by the TrendingDataChannel can either be in raw
* or statistical format.
* A raw TrendingDataChannel is a channel that, for any interval on the trending axis,
* can provide all the changes ever recorded in its trending data.
* A statistical TrendingDataChannel is a channel that can only provide
* statistical (accumulated) information of the changes in its trendable
* data.
* A raw TrendingDataChannel must always be able to provide data in statistical
* format. This feature is fundamental for performance reasons when requesting data
* over very long intervals in the trending axis where high levels of details
* are not necessary.
*
* The TrendingData returned by a TrendingDataChannel contains data
* and possibly metadata. The nature of the data and metadata depends on the
* format of the request. Raw TrendingData should contain raw values while
* statistical TrendingData should contain accumulated quantities like mean,
* rms, max value, min value etc.
* The metadata is part of the TrendingData as it could also change over time.
*
* The TrendingDataChannel can have one or more trending axis; the axis could be
* time, like milliseconds, Dates, Strings or any Object that defines some
* ordering for the TrendingData.
*
* To retrieve some TrendingData it is necessary to provide a set of selection
* criteria.
*
**/
public static String VALUE = "value";
public static String ERROR = "error";
public static String ERROR_PLUS = "error_plus";
public static String ERROR_MINUS = "error_minus";
public static String MEAN = "mean";
public static String RMS = "rms";
public static String MAX_VALUE = "max_value";
public static String MIN_VALUE = "min_value";
public static String TIME = "time";
public static String WARNING_LOW = "warning_low";
public static String WARNING_HIGH = "warning_high";
public static String ALARM_LOW = "alarm_low";
public static String ALARM_HIGH = "alarm_high";
/**
* The name of this channel.
*
*/
public String getName();
/**
* Check if a given channel can provide raw TrendingData.
*
**/
public boolean getHasRawTrendingData();
/**
* Get the names of the provided raw data and metadata.
*
*/
public String[] getRawTrendingDataNames();
public String[] getRawTrendingMetaDataNames();
/**
* Get the names of the provided statistical data and metadata.
*
*/
public String[] getStatisticalTrendingDataNames();
public String[] getStatisticalTrendingMetaDataNames();
/**
* Get the names of the time axis for this channel.
*
*/
public String[] getTrendingAxisNames();
/**
*
*/
public TrendingDataResult getTrendingData(TrendingAxisSelection selection);
//Below we can add a selection on the data itself.
//How does this work if the channels decides to ignore the selection type?
// public TrendingDataResult getTrendingData(TrendingAxisSelection selection, TrendingDataSelection dataSelection);
}
|