GrafanaAdapters
Represents a cache of all defined data source value types and their default instances.
Gets default instance list of all the defined data source value type implementations.
Gets cache of defined data source value types loaded from local assemblies.
Gets a default instance of the specified data source value type (by index).
Index of target to lookup.
Default instance of the specified data source value type, found by index.
Invalid data type index provided.
Use this method to provide a cleaner, more specific, error message to the user when a
data source value type is specified that is not found.
Gets type index for the specified data source value type; or, -1 if not found
Type name of target to lookup.
Index of specified data source value type; or, -1 if not found.
Represents a default target for a standard time-series value.
This is the standard data source value structure for common time-series
values used by Grafana.
Data point index for value.
Data point index for time.
Gets the type index for .
Defines the primary metadata table name for a .
Query target, e.g., a point-tag.
Queried measurement value.
Timestamp, in Unix epoch milliseconds, of queried value.
Flags for queried value.
Represents a default target for a phasor value.
Target the magnitude components of the phasor value.
Target the angle components of the phasor value.
Represents an individual time-series phasor value from a data source.
Defines the primary metadata table name for a .
Query target, i.e., a point-tag representing the phasor.
This commonly represents the overlapping point-tag name from the magnitude and angle measurements.
Query magnitude target, i.e., point-tag for the magnitude measurement.
Query angle target, e.g., point-tag for the angle measurement.
Queried magnitude value.
Queried angle value.
Timestamp, in Unix epoch milliseconds, of queried value.
Flags for queried value.
Gets or sets the primary target for the phasor value.
This property is used to determine which value field of the phasor value to use when using the data
source as an . This is useful in default function computations that
do not need to operate on both the magnitude and angle values of the phasor value struct. For example,
see and functions that only operate on magnitudes.
Primary target value defaults to but can be overridden to
if the function only needs to operate on the angle values.
See for example of using only angle values.
Gets the type index for .
Update phasor value primary target to operate on angle values.
Source phasor value.
Phasor value updated to operate on angle values.
Defines an interface for a data source value type.
Implementations of this interface must be structs.
Gets the query target, e.g., a point-tag.
If data source value type has multiple targets, this should be the primary target.
Gets the value of data source value type.
If data source has more than one value, this should be the primary value.
Gets timestamp, in Unix epoch milliseconds, of data source value type.
Gets measurement state and quality flags of data source value type.
Gets time-series array values of the data source value type, e.g., [Value, Time].
To ensure data will work with Grafana data source, all values should
precede single time value. Time is always the last value in the array.
Time value should be in Unix epoch milliseconds.
Gets the format definition of a time-series array value, e.g., ["Value", "Time"].
These string values are used to define field value names that are used in
a result.
Gets the index of the value within the array.
If data source value type has multiple targets, this should be the value index of the primary target.
Gets the desired load order for the data source value type.
This value is used to determine the order in which data source value types are
presented to the user in the Grafana data source configuration UI. If multiple
data source value types have the same load order, they will use a secondary
sort order, i.e., alphabetically by type name. Ideally, these values should be
as unique as possible to avoid any secondary sorting.
Gets the name of the primary metadata table for the data source.
Gets the names of the required metadata fields for the data source.
This defines a list of the required metadata fields for a table in the data source. If any of
these are missing, the data source table will not be available for use. This list should at
least include key field names for the that may be needed by
the or
functions. For example, in order to use a table named 'ActiveMeasurements', the required
metadata field names might be: 'ID', 'SignalID', and 'PointTag'.
Note that system generally assumes that the fields 'PointTag', a unique string-based alphanumeric
identifier for a measurement, 'ID', a unique string-based measurement key formatted identifier
(e.g., PPA:101), and 'SignalID', a unique Guid-based identifier, all exist in the metadata table.
However, these fields do not have to be included as required metadata field names. The 'PointTag'
field is used to lookup records in the metadata. The 'ID' and 'SignalID' fields are used by
'AdapterBase.ParseFilterExpression' for direct parsing of measurement key and signal ID when
expression is not a filter expression. Direct parsing always uses the primary metadata table
name for lookups, see property.
Gets function that augments metadata for the data source, or null
if metadata augmentation is not needed.
Returned function augments metadata for the target data source value type. Metadata is a shared
resource and may be long-lived, as such method should only add to existing metadata for needs of
the data source value type and only perform needed augmentation once per provided instance of
metadata. For example, if a new table is added to the metadata for the data source value type,
first step should be to check if table already exists.
Looks up metadata record for the specified target.
Metadata data set.
Table name to search.
Target to lookup.
Filtered metadata row for the specified target.
Implementations should cache metadata lookups for performance.
Gets the set of measurement key and point tag identifiers associated with a target.
Source metadata record.
set of measurement key and point tag identifiers associated with a target.
A single target will be associated with a measurement key and point tag for each value
in the data source value type. The target will be a common name for the group of values in
the data source value type structure.
Gets the metadata record for the specified measurement key.
Source measurement key.
Source metadata.
The metadata record for the specified measurement key.
Gets the data source value type index.
Defines an interface for a typed data source value.
Target type.
Assign queried data source value to time-value map.
Queried data source value type.
Time-value map for specified .
Source metadata.
Provided time-value map is specific to the queried data source value type, by target, and is keyed by Unix
epoch milliseconds timestamp. This function is used to assign the queried data source value type to the
time-value map. If the data source value type has multiple fields, this function will be called once
per each field in the data source value type for a given timestamp.
Executes provided function for data source fields, applying the results
to a copy of the data source value type and returns the new result.
Function to compute.
Computed result.
This function is used to compute a new data source value type, applying the
specified function operation to all value fields in the data source.
Returns a series of values that represent each of the values in the source series clamped to the inclusive range of min and max.
min is lower bound of the result and max is the upper bound of the result.
Signature: Clap(min, max, expression)
Returns: Series of values.
Example: Clamp(49.95, 50.05, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Clamp, Limit
Execution: Deferred enumeration.
Returns a phasor referenced to the first series of a slice of values.
The sliceTolerance parameter is a floating-point value that must be greater than or equal to 0.001 that represents the
desired time tolerance, in seconds, for the time slice.
Signature: Reference(sliceTolerance, expression)
Returns: Single value.
Example: Reference(ReferencePhasor; FILTER PhasorValues WHERE SignalType='IPHM')
Variants: Reference, Ref
Execution: Immediate enumeration.
Returns a single value selected using the first series of a slice of values as the zero-based index from the remaining series.
The sliceTolerance parameter is a floating-point value that must be greater than or equal to 0.001 that represents the
desired time tolerance, in seconds, for the time slice.
Signature: Switch(sliceTolerance, expression)
Returns: Single value.
Example: Switch(IndexSeriesTag; FILTER ActiveMeasurements WHERE SignalType='IPHM')
Variants: Switch, Select
Execution: Immediate enumeration.
Returns a series of values that represent the square root each of the values in the source series.
Signature: Sqrt(expression)
Returns: Series of values.
Example: Sqrt(FILTER ActiveMeasurements WHERE SignalType='IPHM')
Variants: Sqrt
Execution: Deferred enumeration.
Returns a series of values that represent each of the values in the source series raised to the power of N.
N is a floating point value representing an exponent used to raise each value of the source series to the specified power.
N can either be constant value or a named target available from the expression.
Signature: Pow(N, expression)
Returns: Series of values.
Example: Pow(2, FILTER ActiveMeasurements WHERE SignalType='CALC')
Variants: Pow
Execution: Deferred enumeration.
Returns a series of values that represent the rolling average of the values in the source series. The windowSize parameter, optional,
is a positive integer value representing a total number of data points to use for each of the values in the rolling average results. If no
windowSize is provided, the default value is the square root of the total input values in the series. The windowSize can either
be constant value or a named target available from the expression. Function operates by producing a mean over each data window.
Signature: RollingAverage([windowSize = sqrt(len)], expression)
Returns: Series of values.
Example: RollingAvg(150, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: RollingAverage, RollingAvg, RollingMean
Execution: Immediate in-memory array load.
Returns a single value that represents the evaluation of an expression over a slice of the values in the source series.
The sliceTolerance parameter is a floating-point value that must be greater than or equal to 0.001 that represents
the desired time tolerance, in seconds, for the time slice. The evalExpression parameter must always be expressed
in braces, e.g., { expression }; expression is strongly typed, but not case-sensitive; expression is expected to
return a value that can be evaluated as a floating-point number. Aliases of target tag names are used as variable names
in the evalExpression when defined. If no alias is defined, all non-valid characters will be removed from target
tag name, for example, variable name for tag PMU.032-PZR_CI:ANG would be PMU032PZR_CIANG. All targets are
also available as index suffixed variables named _v, for example, first and second target values are available as
_v0 and _v1. The Evaluate function is always evaluated as a slice, any specified group operation
prefix will be ignored. Default system types available to expressions are System.Math and System.DateTime.
See details on
valid expressions. Use the Imports command to define more types for evalExpression.
Signature: Evaluate(sliceTolerance, evalExpression, filterExpression)
Returns: Single value per slice
Example 1: Evaluate(0.0333, { R* Sin(T* PI / 180)}, T=GPA_SHELBY-PA1:VH; R=GPA_SHELBY-PM1:V)
Example 2: Eval(0.0333, { (GPA_SHELBYPA2VH - GPA_SHELBYPA1VH) % 360 - 180}, GPA_SHELBY-PA1:VH; GPA_SHELBY-PA2:VH)
Example 3: eval(0.5, { (if (_v0 > 62, _v2, if (_v0 < 57, _v2, _v0)) + if (_v1 > 62, _v2, if (_v1 < 57, _v2, _v1))) / 2 }, FILTER TOP 3 ActiveMeasurements WHERE SignalType = 'FREQ')
Example 4: evaluate(0.0333, { if (abs(b - a) > 180, if (sign(b - a) < 0, b - a + 360, b - a - 360), b - a)}, a=PMU.009-PZR.AV:ANG; b=PMU.008-PZR.AV:ANG)
Variants: Evaluate, Eval
Execution: Deferred enumeration
The following special command-level parameter is available to the Evaluate function: Imports={expr}
This command adds custom .NET type imports that can be used with the Evaluate function. exprdefines a
key-value pair definition of assembly name, i.e., AssemblyName = DLL filename without suffix, and type name, i.e.,
TypeName = fully qualified case-sensitive type name, to be imported. Key-value pairs are separated with commas and
multiple imports are by separated semicolons. expr must be surrounded by braces. Example:
; imports={AssemblyName=mscorlib, TypeName=System.TimeSpan; AssemblyName=MyCode, TypeName=MyCode.MyClass}
Returns a series of values that represent the absolute value each of the values in the source series.
Signature: AbsoluteValue(expression)
Returns: Series of values.
Example: AbsoluteValue(FILTER ActiveMeasurements WHERE SignalType='CALC')
Variants: AbsoluteValue, Abs
Execution: Deferred enumeration.
Returns a single value that represents the mean of the values in the source series.
Signature: Average(expression)
Returns: Single value.
Example: Average(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Average, Avg, Mean
Execution: Immediate enumeration.
Returns a series of N, or N% of total, values that are the smallest in the source series.
N is either a positive integer value, representing a total, that is greater than zero - or - a floating point value,
suffixed with '%' representing a percentage, that must range from greater than 0 to less than or equal to 100.
Third parameter, optional, is a boolean flag representing if time in dataset should be normalized - defaults to true.
N can either be constant value or a named target available from the expression. Any target values that fall between 0
and 1 will be treated as a percentage.
Signature: Bottom(N|N%, [normalizeTime = true], expression)
Returns: Series of values.
Example: Bottom(100, false, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Bottom, Bot, Smallest
Execution: Immediate in-memory array load.
Returns a series of values that represent the smallest integral value that is greater than or equal to each of the values in the source series.
Signature: Ceiling(expression)
Returns: Series of values.
Example: Ceiling(FILTER ActiveMeasurements WHERE SignalType='IPHM')
Variants: Ceiling, Ceil
Execution: Deferred enumeration.
Returns a single value that is the count of the values in the source series.
Signature: Count(expression)
Returns: Single value.
Example: Count(PPA:1; PPA:2; PPA:3)
Variants: Count
Execution: Immediate enumeration.
Returns a series of values that represent the rate of change, per time units, for the difference between consecutive values in the source series.
The units parameter, optional, specifies the type of time units and must be one of the following: Seconds, Nanoseconds, Microseconds,
Milliseconds, Minutes, Hours, Days, Weeks, Ke (i.e., traditional Chinese unit of decimal time), Ticks (i.e., 100-nanosecond intervals),
PlanckTime or AtomicUnitsOfTime - defaults to Seconds.
Signature: Derivative([units = Seconds], expression)
Returns: Series of values.
Example: Derivative(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Derivative, Der
Execution: Deferred enumeration.
Returns a series of values that represent the difference between consecutive values in the source series.
Signature: Difference(expression)
Returns: Series of values.
Example: Difference(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Difference, Diff
Execution: Deferred enumeration.
Computes the difference between the current value and the last value.
Source value.
Last result.
Calculated difference.
Returns a series of values that represent the unique set of values in the source series.
Signature: Distinct(expression)
Returns: Series of values.
Example: Distinct(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Distinct, Unique
Execution: Deferred enumeration.
Returns a series of values that represent a filtered set of the values in the source series where each value falls outside the specified low and high.
The low and high parameter values are floating-point numbers that represent the range of values excluded in the return series. Third parameter,
optional, is a boolean flag that determines if range values are inclusive, i.e., excluded values are <= low or >= high - defaults to false, which means
values are exclusive, i.e., excluded values are < low or > high. Function allows a fourth optional parameter that is a boolean flag - when four parameters
are provided, third parameter determines if low value is inclusive and forth parameter determines if high value is inclusive. The low and high
parameter values can either be constant values or named targets available from the expression.
Signature: ExcludeRange(low, high, [inclusive = false], expression) -or- ExcludeRange(low, high, [lowInclusive = false], [highInclusive = false], expression)
Returns: Series of values.
Example: ExcludeRange(-180.0, 180.0, true, false, FILTER ActiveMeasurements WHERE SignalType LIKE '%PHA')
Variants: ExcludeRange, Exclude
Execution: Deferred enumeration.
Returns a series of values that represent a filtered set of the values in the source series where each value is a real number, i.e., value is not NaN.
Parameter alsoFilterInfinity, optional, is a boolean flag that determines if infinite values should also be excluded - defaults to true.
Signature: FilterNaN([alsoFilterInfinity = true], expression)
Returns: Series of values.
Example: FilterNaN(FILTER ActiveMeasurements WHERE SignalType='VPHM')
Variants: FilterNaN
Execution: Deferred enumeration.
Returns a series of N, or N% of total, values from the start of the source series.
N is either a positive integer value, representing a total, that is greater than zero - or - a floating point value,
suffixed with '%' representing a percentage, that must range from greater than 0 to less than or equal to 100 - defaults to 1.
N can either be constant value or a named target available from the expression. Any target values that fall between 0
and 1 will be treated as a percentage.
Signature: First([N|N% = 1], expression)
Returns: Series of values.
Example: First(5%, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: First
Execution: Immediate in-memory array load, when N is defined; otherwise, immediate enumeration of one, i.e., first value.
Returns a series of values that represent the smallest integral value that is less than or equal to each of the values in the source series.
Signature: Floor(expression)
Returns: Series of values.
Example: Floor(FILTER ActiveMeasurements WHERE SignalType='IPHM')
Variants: Floor
Execution: Deferred enumeration.
Returns a series of values that represent a filtered set of the values in the source series where each value falls between the specified low and high.
The low and high parameter values are floating-point numbers that represent the range of values allowed in the return series. Third parameter,
optional, is a boolean flag that determines if range values are inclusive, i.e., allowed values are >= low and <= high - defaults to false, which means
values are exclusive, i.e., allowed values are > low and < high. Function allows a fourth optional parameter that is a boolean flag - when four parameters
are provided, third parameter determines if low value is inclusive and forth parameter determines if high value is inclusive. The low and high
parameter values can either be constant values or named targets available from the expression.
Signature: IncludeRange(low, high, [inclusive = false], expression) -or- IncludeRange(low, high, [lowInclusive = false], [highInclusive = false], expression)
Returns: Series of values.
Example: IncludeRange(59.90, 60.10, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: IncludeRange, Include
Execution: Deferred enumeration.
Returns a series of values that represent a decimated set of the values in the source series based on the specified interval N, in time units.
N is a floating-point value that must be greater than or equal to zero that represents the desired time interval, in time units, for the returned
data. The unitsparameter, optional, specifies the type of time units and must be one of the following: Seconds, Nanoseconds, Microseconds,
Milliseconds, Minutes, Hours, Days, Weeks, Ke (i.e., traditional Chinese unit of decimal time), Ticks (i.e., 100-nanosecond intervals), PlanckTime or
AtomicUnitsOfTime - defaults to Seconds. N can either be constant value or a named target available from the expression.
Signature: Interval(N, [units = Seconds], expression)
Returns: Series of values.
Example: Sum(Interval(5, FILTER ActiveMeasurements WHERE SignalType LIKE '%PHM'))
Variants: Interval
Execution: Deferred enumeration.
Renames a series with the specified label value. If multiple series are targeted, labels will be indexed starting at one, e.g., if there are three series
in the target expression with a label value of "Max", series would be labeled as "Max 1", "Max 2" and "Max 3". Group operations on this function will be ignored.
Label valueparameter can be optionally quoted with single or double quotes.
The label parameter also supports substitutions when root target metadata can be resolved. For series values that directly map to a point tag, metadata value
substitutions for the tag can be used in the label value - for example: {Alias}, {ID}, {SignalID}, {PointTag}, {AlternateTag},
{SignalReference}, {Device}, {FramesPerSecond}, {Protocol}, {ProtocolType}, {SignalType}, {EngineeringUnits},
{PhasorType}, {PhasorLabel}, {BaseKV}, {Company}, {Longitude}, {Latitude}, {Description}, etc. Each of these
fields come from the "ActiveMeasurements" metadata source, as defined in the "ConfigurationEntity" table. Where applicable, substitutions can be used along with
fixed label text in any combination, e.g.: 'Series {ID} [{PointTag}]'.
Other metadata sources that target time-series measurements can also be used for substitutions so long the source is defined in the "ConfigurationEntity" table
and the metadata columns include a "PointTag" field that can be matched to the target Grafana series name. To use any field from another defined metadata source,
use the following substitution parameter format: {TableName.FieldName}.
Signature: Label(value, expression)
Returns: Series of values.
Example 1: Label('AvgFreq', SetAvg(FILTER TOP 20 ActiveMeasurements WHERE SignalType='FREQ'))
Example 2: Label("{Alias} {EngineeringUnits}", Shelby=GPA_SHELBY:FREQ)
Example 3: Label({AlternateTag}, FILTER TOP 10 ActiveMeasurements WHERE SignalType LIKE '%PH%')
Example 4: Label('Shelby {ScadaTags.CircuitName} MW', FILTER ScadaTags WHERE SignalType='MW' AND Substation='SHELBY')
Variants: Label, Name
Execution: Deferred enumeration.
Returns a series of N, or N% of total, values from the end of the source series.
N, optional, is either a positive integer value, representing a total, that is greater than zero - or - a floating point value,
suffixed with '%' representing a percentage, that must range from greater than 0 to less than or equal to 100 - defaults to 1.
N can either be constant value or a named target available from the expression. Any target values that fall between 0
and 1 will be treated as a percentage.
Signature: Last([N|N% = 1], expression)
Returns: Series of values.
Example: Last(150, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Last
Execution: Immediate in-memory array load.
Returns a single value that is the maximum of the values in the source series.
Signature: Maximum(expression)
Returns: Single value.
Example: Maximum(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Maximum, Max
Execution: Immediate enumeration.
Returns a single value that represents the median of the values in the source series.
Signature: Median(expression)
Returns: Single value.
Example: Median(FILTER ActiveMeasurements WHERE SignalType='ALOG')
Variants: Median, Med, Mid
Execution: Immediate in-memory array load.
Returns a single value that is the minimum of the values in the source series.
Signature: Minimum(expression)
Returns: Single value.
Example: Minimum(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Minimum, Min
Execution: Immediate enumeration.
Returns a single value that represents the mode of the values in the source series. The numberOfBins
parameter is used to define how many bins to use when computing the mode for float-point values. A value of
zero means use a majority-value algorithm which treats all inputs as integer-based values. When using a value
of zero for the number of bins, user should consider using an integer function like ,
with zero digits, , or as an input
to this function to ensure the conversion of values to integer-based values is handled as expected.
Signature: Mode([numberOfBins = 0], expression)
Returns: Single value.
Example 1: Mode(FILTER TOP 50 ActiveMeasurements WHERE SignalType='DIGI')
Example 2: Mode(20, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Example 3: Mode(Round(FILTER ActiveMeasurements WHERE SignalType='FREQ'))
Example 4: Scale(100, true, Mode(0, Floor(Scale(100, FILTER TOP 20 ActiveMeasurements WHERE SignalType='FREQ'))))
Variants: Mode
Execution: Immediate in-memory array load.
Returns a series of values that represent each of the values in the source series modulo by N.
N is a floating point value representing a divisive factor to be applied to each value the source series.
N can either be constant value or a named target available from the expression.
Signature: Modulo(N, expression)
Returns: Series of values.
Example: Mod(2, FILTER ActiveMeasurements WHERE SignalType='CALC')
Variants: Modulo, Modulus, Mod
Execution: Deferred enumeration.
Returns a series of values that represent the moving average of the values in the source series. The windowSize parameter,
optional, is a positive integer value representing a total number of windows to use for the moving average. If no windowSize
is provided, the default value is the square root of the total input values in the series. The windowSize can either be a
constant value or a named target available from the expression. Function operates using a simple moving average (SMA) algorithm.
Signature: MovingAverage([windowSize = sqrt(len)], expression)
Returns: Series of values.
Example: MovingAvg(150, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: MovingAverage, MovingAvg, MovingMean, SimpleMovingAverage, SMA
Execution: Immediate in-memory array load.
Returns a series of values that represent each of the values in the source series scaled by N.
N is a floating point value representing a scaling factor (multiplier or reciprocal) to be applied to each value the source series.
N can either be constant value or a named target available from the expression. The asReciprocal is a boolean parameter that,
when true, requests that N be treated as a reciprocal, i.e., 1 / N, thus resulting in a division operation instead of
multiplication - defaults to false.
Signature: Scale(N, [asReciprocal = false], expression)
Returns: Series of values.
Example 1: Scale(1.5, FILTER ActiveMeasurements WHERE SignalType='CALC')
Example 2: Scale(0.5, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Example 3: Scale(60, true, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Scale
Execution: Deferred enumeration.
Returns a single value that represents the Nth order percentile for the sorted values in the source series.
N is a floating point value, representing a percentage, that must range from 0 to 100.
Signature: Percentile(N[%], expression)
Returns: Single value.
Example: Percentile(10%, FILTER ActiveMeasurements WHERE SignalType='VPHM')
Variants: Percentile, Pctl
Execution: Immediate in-memory array load.
Returns a series of N, or N% of total, values that are a random sample of the values in the source series.
N is either a positive integer value, representing a total, that is greater than zero - or - a floating point value,
suffixed with '%' representing a percentage, that must range from greater than 0 to less than or equal to 100.
Third parameter, optional, is a boolean flag representing if time in dataset should be normalized - defaults to true.
N can either be constant value or a named target available from the expression. Any target values that fall between 0
and 1 will be treated as a percentage.
Signature: Random(N|N%, [normalizeTime = true], expression)
Returns: Series of values.
Example: Random(25%, FILTER ActiveMeasurements WHERE SignalType='VPHM')
Variants: Random, Rand, Sample
Execution: Immediate in-memory array load.
Transposes order of values in array.
Source value.
Array of values.
Index of current value.
The transposed value.
Returns a single value that represents the range, i.e., maximum - minimum, of the values in the source series.
Signature: Range(expression)
Returns: Single value.
Example: Range(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Range
Execution: Immediate enumeration.
Returns a series of values that represent the rounded value, with specified fractional digits, of each of the values in the source series.
Parameter digits, optional, is a positive integer value representing the number of decimal places in the return value - defaults to 0.
Signature: Round([digits = 0], expression)
Returns: Series of values.
Example: Round(3, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Round
Execution: Deferred enumeration.
Returns a single value that represents the standard deviation of the values in the source series. Parameter useSampleCalc,
optional, is a boolean flag representing if the sample based calculation should be used - defaults to false, which means the
population based calculation should be used.
Signature: StandardDeviation([useSampleCalc = false], expression)
Returns: Single value.
Example: StandardDeviation(FILTER ActiveMeasurements WHERE SignalType='VPHM')
Variants: StandardDeviation, StdDev
Execution: Immediate in-memory array load.
Returns a series of values that represent each of the values in the source series shifted by N.
N is a floating point value representing an additive (positive or negative) offset to be applied to each value the source series.
N can either be constant value or a named target available from the expression.
Signature: Shift(N, expression)
Returns: Series of values.
Example 1: Shift(2.2, FILTER ActiveMeasurements WHERE SignalType='CALC')
Example 2: Shift(-60, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Shift
Execution: Deferred enumeration.
Returns a series of values that represent the time difference, in time units, between consecutive values in the source series.
The units parameter, optional, specifies the type of time units and must be one of the following: Seconds, Nanoseconds,
Microseconds, Milliseconds, Minutes, Hours, Days, Weeks, Ke (i.e., traditional Chinese unit of decimal time), Ticks (i.e.,
100-nanosecond intervals), PlanckTime or AtomicUnitsOfTime - defaults to Seconds.
Signature: TimeDifference([units = Seconds], expression)
Returns: Series of values.
Example: TimeDifference(FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: TimeDifference, TimeDiff, Elapsed
Execution: Deferred enumeration.
Returns a single value that represents the time-based integration, i.e., the sum of V(n) * (T(n) - T(n-1)) where time difference is
calculated in the specified time units of the values in the source series. The unitsparameter, optional, specifies the type of time
units and must be one of the following: Seconds, Nanoseconds, Microseconds, Milliseconds, Minutes, Hours, Days, Weeks, Ke (i.e., traditional
Chinese unit of decimal time), Ticks (i.e., 100-nanosecond intervals), PlanckTime or AtomicUnitsOfTime - defaults to Hours.
Signature: TimeIntegration([units = Hours], expression)
Returns: Single value.
Example: TimeIntegration(FILTER ActiveMeasurements WHERE SignalType='CALC' AND PointTag LIKE '%-MW:%')
Variants: TimeIntegration, TimeInt
Execution: Immediate enumeration.
Returns a series of N, or N% of total, values that are the largest in the source series.
N is either a positive integer value, representing a total, that is greater than zero - or - a floating point value,
suffixed with '%' representing a percentage, that must range from greater than 0 to less than or equal to 100.
Third parameter, optional, is a boolean flag representing if time in dataset should be normalized - defaults to true.
N can either be constant value or a named target available from the expression. Any target values that fall between 0
and 1 will be treated as a percentage.
Signature: Top(N|N%, [normalizeTime = true], expression)
Returns: Series of values.
Example: Top(50%, FILTER ActiveMeasurements WHERE SignalType='FREQ')
Variants: Top, Largest
Execution: Immediate in-memory array load.
Returns a single value that represents the sum of the values in the source series.
Signature: Total(expression)
Returns: Single value.
Example: Total(FILTER ActiveMeasurements WHERE SignalType='IPHM')
Variants: Total, Add, Sum
Execution: Immediate enumeration.
Returns a series of values that represent the integral part of each of the values in the source series.
Signature: Truncate(expression)
Returns: Series of values.
Example: Truncate(FILTER ActiveMeasurements WHERE SignalType='IPHM')
Variants: Truncate, Trunc
Execution: Deferred enumeration.
Returns a series of values that represent an adjusted set of angles that are unwrapped, per specified angle units, so that a comparable mathematical
operation can be executed. For example, for angles that wrap between -180 and +180 degrees, this algorithm unwraps the values to make the values
mathematically comparable. The unitsparameter, optional, specifies the type of angle units and must be one of the following: Degrees, Radians,
Grads, ArcMinutes, ArcSeconds or AngularMil - defaults to Degrees.
Signature: UnwrapAngle([units = Degrees], expression)
Returns: Series of values.
Example: UnwrapAngle(FSX_PMU2-PA1:VH; REA_PMU3-PA2:VH)
Variants: UnwrapAngle, Unwrap
Execution: Immediate in-memory array load.
Returns a series of values that represent an adjusted set of angles that are wrapped, per specified angle units, so that angle values are consistently
between -180 and +180 degrees. The unitsparameter, optional, specifies the type of angle units and must be one of the following: Degrees, Radians,
Grads, ArcMinutes, ArcSeconds or AngularMil - defaults to Degrees.
Signature: WrapAngle([units = Degrees], expression)
Returns: Series of values.
Example: WrapAngle(Radians, FILTER TOP 5 ActiveMeasurements WHERE SignalType LIKE '%PHA')
Variants: WrapAngle, Wrap
Execution: Deferred enumeration.
Parses function parameters from a given expression as an array of strings.
Target function.
Query parameters.
Expression to parse.
Group operation.
A tuple of parsed parameters and any remaining query expression.
Remaining query expression is typically the filter expression.
Expected parameters did not match those received.
Generates a typed list of value mutable parameters from parsed parameters.
The type of the data source value.
Target function.
Parsed parameters.
Data source values.
Root target.
Metadata.
Cancellation token.
List of value mutable parameters from parsed parameters.
In case user has requested metadata as a parameter, pass in the root target
which has a higher chance of being resolved for associated metadata.
Converts parsed value to the mutable parameter type for a given data source value type.
The type of the data source value.
Mutable parameter to hold the converted data.
Parsed value to convert.
Associated target.
Data source values.
Source metadata.
Cancellation token.
This function is used to convert the parsed value to the parameter type.
If the type of value provided and expected match, then it directly converts.
If the types do not match, then it first searches through the provided metadata.
If nothing is found, it looks through ActiveMeasurements for it.
Finally, if none of the above work it throws an error.
Represents a collection of mutable parameters.
New instances of this class should be created by using the method.
This collection holds a distinct set of parameters generated for each function call, ensuring thread-safe operation
when multiple threads execute the same function simultaneously. The class outlines
all possible parameters for a function, both required and optional, effectively determining its signature. Parameters
in this collection represent the values extracted from the user-provided function expression and, when presented to a
function, have already been validated and parsed by type. Additionally, the class provides access to the data source
values expression; function implementations can call to get
current data source values. The parameters in this collection are mutable, implying ownership by the function, and
can be safely modified as needed. To identify which optional parameters have been parsed and are available, refer to
the property.
Gets or sets the number of parameters that have been parsed.
The number of parameters in defined in the collection will always match the number of
parameters defined in the function definition, optional or not, see . This
property is used to determine the count of required and optional parameters that were actually parsed from the
user provided function expression. Note that the count does not include the data source values expression,
which is always available as the last parameter. With this count, the function can determine which optional
parameters were parsed and are thus available for use.
Gets or sets the parameter with the specified .
The name of the parameter to get.
The parameter with the specified .
Parameter name lookup dictionary is lazy initialized. Using index-based lookups is more efficient.
Parameter name not found.
Gets value of parameter at specified index, if the index is valid.
Index of parameter to get.
The value of parameter at specified index if the index is valid;
otherwise, null.
This function will not throw an exception if the index is invalid.
Gets typed value of parameter at specified index, if the index is valid and the
value can be cast as type.
The type of the parameter.
Index of parameter to get.
The typed value of parameter at specified index if the index is valid and the
value can be cast to type; otherwise, default value.
This function will not throw an exception if the index is invalid.
Gets value of parameter with specified name, if name is found.
Name of parameter to get.
The value of parameter with the specified name if the parameter name can be found;
otherwise, null.
Parameter name lookup dictionary is lazy initialized. Using index-based lookups is more efficient.
This function will not throw an exception if the name is not found.
Gets typed value of parameter with specified name, if name is found and the
value can be cast as type.
The type of the parameter.
Name of parameter to get.
The typed value of parameter with the specified name if the parameter name can be found
and the value can be cast to specified type; otherwise, default value.
Parameter name lookup dictionary is lazy initialized. Using index-based lookups is more efficient.
This function will not throw an exception if the name is not found.
Represents a read-only parameter definition for a Grafana function.
The type of the parameter.
Represents the base functionality for any Grafana function.
Gets data source values enumeration found in the provided parameters.
Input parameters.
Data source values from provided parameters.
Last parameter is not a data source value of type .
Executes specified function against data source values enumeration using provided parameters.
Function to execute.
Input parameters.
Deferred enumeration of computed values.
This method uses the method to execute the specified
function against each data source value in the provided enumeration operating on all the values in the
target data source value type. For example, if the target data source value type is a phasor, this method
will execute the function against both the magnitude and angle of each phasor value.
Represents a parameter for Grafana functions.
Gets the name of the parameter.
Gets the description of the parameter.
Gets the type of the parameter.
Gets flag that indicates if parameter is a definition.
Definition parameters are used to define function parameters,
not hold values for function evaluation.
Gets flag that indicates if the parameter is required.
Required parameters (i.e., Required = true) must precede
optional parameters (i.e., Required = false) in the
parameter list.
Note that the data source values parameter, i.e., the 'expression', is technically
a required parameter but always exists as the last parameter after any defined
optional or internal parameters. This parameter is automatically added to the
parameter list by the class.
Gets flag that indicates if parameter is internal.
Internal parameters are not exposed to the user and should
always be defined at the end of the parameter list.
Gets default value of the parameter.
Gets a custom parsing function that converts string into target type.
When defined, this function is used to override default parsing behavior.
Creates a new mutable parameter from its definition.
New mutable parameter.
Represents a typed parameter with a default value.
The type of the parameter.
Gets default typed value of the parameter.
Gets a custom parsing function that converts string into target type.
When defined, this function is used to override default parsing behavior.
Creates a new typed mutable parameter from its definition.
New typed mutable parameter.
Represents a parameter with a mutable value.
Gets or sets the actual value of the parameter.
Represents a typed parameter with a mutable value.
The type of the parameter.
Gets or sets the actual typed value of the parameter.
Represents a readonly collection of definitions.
Creates a new instance.
Creates a new instance.
Parameters to include in the definitions.
Parameter is not a definition type -- 'IsDefinition' property must be true -or-
Parameter has no defined name -- 'Name' property cannot be null, empty or whitespace -or-
Parameter name is not unique -- parameter with the same name is already defined.
Gets the parameter at the specified index.
The zero-based index of the parameter to get.
The parameter at the specified index.
Gets the parameter with the specified .
The name of the parameter to get.
The parameter with the specified .
Searches for the parameter with the specified and returns its zero-based index.
The name of the parameter to locate in the .
The zero-based index of the parameter with the specified , if found; otherwise, -1.
Determines whether the contains a parameter with the specified .
The name of the parameter to locate in the .
true if the contains a parameter with the specified name; otherwise, false.
Copies the entire to a compatible one-dimensional array, starting at the specified index of the target array.
The one-dimensional that is the destination of the elements copied from . Array must have zero-based indexing.
The zero-based index in at which copying begins.
Implicitly converts a to a .
List of parameters to convert.
New instance built from specified .
Parameter is not a definition type -- 'IsDefinition' property must be true -or-
Parameter has no defined name -- 'Name' property cannot be null, empty or whitespace -or-
Parameter name is not unique -- parameter with the same name is already defined.
Creates a set of mutable parameters from the parameter definitions.
New set of mutable parameters based on the parameter definitions.
Represents a mutable parameter of a Grafana function.
The type of the parameter.
Represents a parsed Grafana function.
Data source value type.
Parsed Grafana function.
Defined group operation for parsed function.
Parsed function expression, e.g., parameters.
Defines the match from the RegEx for the function.
Represents the parameters of a Grafana query.
Gets or sets a reference to the original target that was the source of these results.
Gets or sets start time of the query.
Gets or sets stop time of the query.
Gets or sets the interval of the query.
Gets or sets a flag that indicates whether to include the peaks of the query.
Gets or sets a flag that indicates whether to include empty series in the query.
Gets or sets any defined eval imports defined in the query.
Gets or sets any defined radial distribution request parameters defined in the query.
Gets or sets metadata selections for the query.
Flags that indicate the group operations that a Grafana function can perform.
The function has not defined any group operations.
The function can perform standard, non-grouped, per-trend operations.
The function can perform slice-based group operations.
The function can perform set-based group operations.
Represents the return type of Grafana function.
The function returns a single value.
The function returns a series of values.
Represents a Grafana function category.
The function is a built-in function.
The function is a custom function.
Defines a common interface for Grafana functions.
Gets the name of the Grafana function.
Gets the description of the Grafana function.
Gets any defined aliases for the Grafana function.
Gets the return type of the Grafana function, i.e., scalar or series.
Gets or sets a flag indicating whether the function behaves equivalently when processed as a series or as a
slice. Value defaults to true for functions that return a series of values, i.e., the return type is
, and the includes the flag for
operations; otherwise, value defaults to false when the return
type is a scalar value, i.e., , or the
does not include the flag for operations.
When set to true, property indicates that the function, when dealing with time series data, produces
the same result matrix whether processed horizontally (series-by-series) or vertically (slice-by-slice).
This is typically applicable to functions that return a series of values and are designed to operate across
time-aligned data series.
Setting this property to true enables certain optimizations. For instance, the system can bypass
slice-mode processing and use standard series processing instead, as both approaches yield equivalent results.
This can lead to performance improvements, especially in data-intensive scenarios.
It is important for users defining custom functions to accurately set this property. If the function's output
does not depend on the specific mode of time series processing (series vs. slice), set this property to
true. Conversely, if the function yields different results when processed by slice-by-slice as compared
to when processed series-by-series, or it is a scalar function, this property should be set to false.
Incorrectly setting this property may lead to unexpected behavior or suboptimal performance, as the system
relies on this flag to determine the most efficient processing approach.
Internally this function descriptor provides a hint to the Grafana data source adapter on how to handle series
results for a function. For functions that return a scalar value this property is ignored, but is automatically
set to false to preserve meaning. For slice operations on functions that return a series of values and
produce the same result matrix whether processed horizontally or vertically, the slice operation is equivalent
to its non-slice operation using the function over the same expression, for example,
the following queries are equivalent:
-
SliceShift(0.02, 1, FILTER TOP 10 ActiveMeasurements WHERE SignalType='FREQ') -- and --
Shift(1, Interval(0.02, FILTER TOP 10 ActiveMeasurements WHERE SignalType='FREQ'))
-
SliceRound(0.0333, 3, ACME-STAR:FREQ; ACME-PLUS:FREQ) -- and --
Round(3, Interval(0.0333, ACME-STAR:FREQ; ACME-PLUS:FREQ))
As a result, slice operations that return a series of values and produce the same result matrix whether processed
horizontally or vertically, i.e., is slice-series equivalent, are automatically are replaced with the equivalent
non-slice operation and an function as an operational optimization.
Gets flag that determines if function result is target series for set-based group operations.
For set-based group operations, there can also be data in which target series is selected,
e.g., with or functions.
Gets the category of the Grafana function, i.e., built-in or custom.
This property is automatically assigned by the system.
Gets set of group operations that the Grafana function allows.
Operations that are not allowed should be taken to mean that the use of the group operation for a function is an
error. Implementors should carefully consider which group operations that a function exposes as not allowed since
when a user selects a group operation that is not allowed, this results in an exception. Groups operations can
be hidden from the user by overriding the . Additionally, a group operation
that is not supported can be ignored, instead of throwing an exception, by forcing supported operations. This is
handled by overriding the method. See function
for an example of this.
Gets set of group operations that the Grafana function exposes publicly.
Normally, the published group operations should be a subset of the allowed group operations.
Checks if function allows requested group operation against property.
Requested operation.
Supported operation.
Function does not support the requested operation.
Gets the list of defined parameter definitions for the Grafana function.
These parameters are used to define the function signature and are normally constructed from
read-only instances.
Parameter definitions are used to define function parameters, not hold values for function evaluation.
Mutable function parameters, safe for evaluation, are defined by collection.
Gets the number of required parameters, not including data source values expression, of the Grafana function.
Gets the number of optional parameters of the Grafana function.
Gets the number of internal parameters of the Grafana function.
Executes custom parameter parsing for the Grafana function.
Query parameters.
Expression to parse.
A tuple of parsed parameters and any remaining query expression (typically the filter expression)
after parsing parameters. Tuple of (null, null) should be returned to use standard parsing.
This method is used to support custom parameter parsing for functions that may have special parameter
parsing requirements. By default, this method will return a tuple of (null, null) meaning that
standard parameter parsing will be used.
Gets a formatted target name for the Grafana function.
Group operation from the format target name.
Target name to format.
Parsed parameters.
Target name format for the Grafana function, typically in the form of: Name(Parameters,TargetName).
Gets the data source value type index associated with the Grafana function.
Defines a common interface for Grafana functions for a specific data source value type.
Executes the computation for the Grafana function.
Input parameters for the computation.
Cancellation token.
A sequence of computed data source parameters.
Executes a custom slice computation for the Grafana function.
Input parameters for the computation.
Cancellation token.
A sequence of computed data source parameters.
This method is used to support custom slice computations for functions that
need special handling for slice operations. By default, this method will call
to perform the computation.
Executes a custom set computation for the Grafana function.
Input parameters for the computation.
Cancellation token.
A sequence of computed data source parameters.
This method is used to support custom set computations for functions that
need special handling for set operations. By default, this method will call
to perform the computation.
Represents a time unit that can be targeted in OpenHistorian Grafana functions.
This class is designed to handle various forms of time units and provides
a way to parse time units from strings.
Gets or sets the base time unit.
Gets or sets the factor by which to scale the base time unit.
Tries to parse a string representation of a time unit to a .
The string representation of the time unit to parse.
Tuple containing the and a flag indicating if the parse was successful.
If this method succeeds, return value contains the equivalent
of the time unit contained in ; otherwise, null if the
conversion failed. The conversion fails if the is null or is not
in the correct format.
Scales the specified time, in the specified units, to a time in seconds.
The double value to convert.
The target time unit, which includes scaling factor, for the conversion.
A time, in seconds, that represents the converted value.
Scales a time, in seconds, to the specified units.
The time, in seconds, to convert.
The target time units, which includes scaling factor, for the conversion.
A double value that represents the converted and scaled time, in the specified units.
Represents an adapter that holds the Grafana data source's metadata
and is used to augment data source on demand.
Gets the Grafana data source metadata, augmented as needed for the target data
source value type .
Data source value type for metadata augmentation.
Grafana data source metadata, augmented as needed for the target data source
value type .
Gets the Grafana data source metadata, augmented as needed for the target data
source value type instance .
Instance of data source value type to use for metadata augmentation.
Grafana data source metadata, augmented as needed for the target data source
Implicitly converts a to a .
Source to convert.
Splits any defined alias from a point tag expression.
Source point tag expression that can contain an alias.
Alias, if defined.
Point tag name without any alias.
Looks up point tag from measurement value.
to lookup.
Source metadata.
Table to search.
Point tag field name.
Measurement key-based ID field name.
Point tag name from source metadata.
This function uses the function which uses a linear
search algorithm that can be slow for large data sets, it is recommended that any results
for calls to this function be cached to improve performance.
Looks up metadata record from point tag.
Point tag to lookup.
Source metadata.
Table to search.
Point tag field name.
Metadata record from source metadata for provided point tag.
Use "table.pointTag" format to specify which table to pull point tag from.
This function uses the function which uses a linear
search algorithm that can be slow for large data sets, it is recommended that any results
for calls to this function be cached to improve performance.
Looks up metadata record from measurement key.
Measurement key, as string, to lookup.
Source metadata.
Table to search.
Measurement key-based ID field name.
Metadata record from source metadata for provided measurement key.
Gets metadata record from source metadata.
Source metadata.
Table to search.
Expression to filter metadata.
Metadata record from source metadata, if expression is found; otherwise null.
Gets measurement key from signal ID.
Signal ID to lookup.
Measurement key associated with specified signal ID, if found; otherwise .
Gets signal ID from metadata record.
Source metadata record.
Signal ID field name.
Signal ID from metadata record.
Gets measurement key from metadata record.
Source metadata record.
ID field name.
Signal ID field name.
Mapped measurement key from metadata record.
Parses target as table and field name.
Target to parse.
Target parsed as table and field name.
Determines if metadata table is valid for the specified data source value type instance.
Data source value type instance.
Source metadata.
Target table name.
true if metadata table is valid for the specified data source value type instance; otherwise, false.
Gets metadata map for the specified target and selections.
Source metadata.
Root target to use for metadata lookup.
Query parameters.
Mapped metadata for the specified target and selections.
Gets first target from a target expression.
Source target expression.
Fist target from target expression.
Looks up metadata record for the specified target.
Metadata data set.
Table name to search.
Target to lookup.
Filtered metadata row for the specified target.
Implementations should cache metadata lookups for performance.
Gets metadata map for the specified target and selections.
Source metadata.
Root target to use for metadata lookup.
Metadata selections.
Mapped metadata for the specified target and selections.
Parses a user provided target expression which could contain point tags, measurement keys, Guid-based signal IDs,
or filter expressions, then returning the set of measurement key and point tag identifiers associated with the
target along with any defined alias for the target.
Target expression to parse.
Source metadata.
Tuple representing set of target and associated IDs, as parsed from expression, and any defined alias.
Represents a base implementation for Grafana data sources.
Gets the data source value types, i.e., any type that has implemented ,
that have been loaded into the application domain.
Gets the table names that, at a minimum, contain all the fields that the value type has defined as required,
see when
is a valid index in the data source value cache. When is -1, all
table names are returned.
Search request.
Cancellation token.
Gets the field names for a given table when is a valid index in the data
source value cache and selected table name contains all the fields that the value type has defined as required, see
. When is -1,
fields for any valid metadata table name are returned.
Search request.
Cancellation token.
Gets the functions that are available for a given data source value type.
Search request.
Cancellation token.
Search data source meta-data for a target.
Search request.
Cancellation token.
Queries data source for annotations in a time-range (e.g., Alarms).
Annotation request.
Cancellation token.
Queried annotations from data source.
Queries current alarm device state.
Cancellation token.
Queried device alarm states.
Queries All Available Device Alarm states.
Cancellation token.
Queried device alarm states.
Queries All Available Device Groups.
Cancellation token.
List of Device Groups.
Gets or sets instance name for this implementation.
Gets or sets used to hold based metadata
source available to this implementation.
Class is used to augment meta-data for the target data source, on demand, so that the augmentation
process only occurs when a data source type is first used.
Note that the is implicitly convertible from a
so that derived classes can assign a source directly as needed.
Gets or sets maximum number of search targets to return during a search query.
Gets or sets maximum number of annotations to return during an annotations query.
Starts a query that will read data source values, given a set of point IDs and targets, over a time range.
Query parameters.
Set of IDs with associated targets to query.
Cancellation token.
Queried data source data in terms of value and time.
Queries data source returning data as Grafana time-series data set.
Query request.
Cancellation token.
Reloads data source value types cache.
This function is used to support dynamic data source value type loading.
Function would only need to be called when a new data source value is added
to Grafana at run-time and user wanted to use new installed data source
value type without restarting host.
Suggest making this option available via web-based endpoint for administrators.
Reloads Grafana functions cache.
This function is used to support dynamic loading for Grafana functions.
Function would only need to be called when a new function is added to Grafana at
run-time and user wanted to use new installed function without restarting host.
Suggest making this option available via web-based endpoint for administrators.
Defines a Grafana ad-hoc filter request.
Gets or sets request key.
Gets or sets request operator.
Gets or sets request value.
Represents an individual time-series value as queried from a data source.
Point-tag and target ID for the query.
pointTag is a specific name for a data point to be queried
from the data source. target is a more general name that
can represent multiple point-tags, e.g., a tuple of point-tags.
Queried data source value.
Timestamp, in Unix epoch milliseconds, of queried value.
Flags for queried value.
Defines a class that represents an enumeration of T for a given target.
This is a group construct keyed on for data source value enumerations.
Gets or sets target, e.g., a point-tag, representative of all values.
Gets or sets the root target expression, without any referenced series functions.
Gets a reference to the original target that was the source of these results.
Gets or sets data source values enumerable.
Gets flag that determines if empty series are produced.
Gets a query name identifier, assigned by Grafana, used to identify a specific query.
Gets user selected metadata associated with the query.
Gets or sets an error message that indicates a syntax error in the query request.
Creates a new from this instance.
Creates a new for an exception.
Source query parameters.
Exception message.
New for an exception.
Defines a set of Grafana metadata selections.
Gets ot sets source metadata table name.
Gets or sets source metadata field names.
Defines a Grafana search request.
Gets or sets target data source value type index.
Gets or sets target search expression.
Defines a Grafana query request.
Gets or sets target data source value type index.
Gets or sets request range.
Gets or sets request interval.
Gets or sets maximum data points to return.
Gets or sets request targets.
Gets or sets ad-hoc filters to apply.
Gets or sets excluded data flags.
Gets or sets flag that determines if normal flags should be excluded.
Defines a Grafana query range.
Gets or sets from time for range.
Gets or sets to time for range.
Defines a Grafana query request target.
Gets or sets reference ID.
Gets or sets target point/tag name.
Gets or sets metadata selections.
Defines a Grafana time-series values.
This structure is serialized and returned to Grafana via JSON.
Gets or sets a Grafana time-series value point source.
Gets or sets a Grafana time-series underlying point tag.
Gets or sets a Grafana time-series refId to reference a specific query.
Gets or sets metadata attached to the .
Gets or sets a flag that determines if empty series are produced -- non-serialized.
Gets or sets a an error message that indicates a syntax error in the query request.
Gets or sets a Grafana time-series value data.
To ensure data will work with Grafana data source, all values should
precede single time value. Time is always the last value in the array.
Time value should be in Unix epoch milliseconds.
JSON example:
"datapoints":[
[622,1450754160000],
[365,1450754220000]
]
Defines a Grafana annotation request.
Gets or sets annotation request details.
Gets or sets request range.
Defines a Grafana annotation response.
Gets or sets annotation title.
Gets or sets annotation time.
Gets or sets annotation end time.
Gets or sets annotation text.
Gets or sets annotation tags.
Defines a data source value type.
Gets or sets the name of the data source value type.
Gets or sets index of the data source value type in loaded value-types array.
Gets or sets the time-series definition for the data source value type.
Gets or sets the default meta-data table name for the data source value type.
Defines a field description for a data source value type metadata table.
Gets or sets the name of the field.
Gets or sets the data type of the field.
Gets or sets flag indicating if field is required.
Represents a connected device in an alarm state.
Gets or sets unique ID.
Gets or sets device ID of the Alarmed Device.
Gets or sets ID of the .
Gets or sets time of the last update.
Gets or sets string to display on the Grafana Alarm Dashboard.
Represents the alarm state of a connected device.
Gets or sets unique ID.
Gets or sets description of the .
Gets or sets recommended action for the user if a is in this .
Gets or sets color associated with the .
Represents a group of devices modeled as a separate virtual device with connection string.
Gets or sets unique ID.
Gets or sets name of the device.
Gets or sets list of attached device IDs.
Represents a Grafana alarm panel block.
Gets or sets unique ID.
Gets or sets name of the device.
Gets or sets description of the device state.
Gets or sets color of the device state.
Gets or sets additional data to be displayed.
Gets or sets device ID of the alarmed device.
Defines a Grafana function parameter.
Gets or sets the name of the parameter.
Gets or sets the description of the parameter.
Gets or sets the data type of the parameter.
Gets or sets flag indicating if parameter is required.
Gets or sets the string-based representation of the default value.
Defines a Grafana function.
Gets or sets the name of the function.
Gets or sets the description of the function.
Gets or sets other names for the function.
Gets or sets the return type of the function, either "Scalar" or "Series".
Gets or sets the category of the function, either "BuiltIn" or "Custom".
Gets or sets allowed group operations for the function.
Gets or sets published group operations for the function.
Gets or sets the parameter descriptions for the function.
Grafana extensions class.
Gets table name for specified annotation .
Annotation type.
Table name for specified annotation .
Gets the target field name for Guid based point IDs for table used with specified annotation .
Annotation type.
Target field name for Guid based point IDs for specified annotation .
Determines if the data point is applicable for specified annotation .
Annotation type.
Time series values data point.
true if the data point is applicable for specified annotation ; otherwise, false.
Populates an annotation response title, text and tags for specified annotation .
Annotation type.
Annotation response.
Target of annotation response.
Associated metadata definition for response.
Time series values data point for response.
Metadata of source definitions.
Populates an annotation response title, text and tags for specified annotation .
Extracts a Grafana from an .
Annotation request.
List of desired targets.
Maximum points to return.
Grafana query request object from an annotation .
Parses query expression from annotation for annotation type.
Grafana annotation.
Determines if query is using a filter expression.
Parsed annotation type for query expression from .
Parses source definitions for an annotation query.
Grafana annotation request.
Annotation type.
Metadata of source definitions.
Determines if query is using a filter expression.
Parsed source definitions from .
Supported annotation types for GSF Time-series Framework.
Raised alarm annotation.
Cleared alarm annotation.
Manual event annotation.
All alarm annotation.
Undefined annotation.
Represents an adapter that will monitor and report device alarm states.
Defines the default value for the .
Defines the default value for the .
Defines the default value for the .
Defines the default value for the .
Creates a new .
Gets or sets monitoring rate, in milliseconds, for devices.
Gets or sets the time, in minutes, for which to change the device state to alarm when no data is received.
Gets or sets the flag that determines if alarm states should only target parent devices, i.e., PDCs and direct connect PMUs, or all devices.
Gets or sets delay time, in minutes, before transitioning the Acknowledged state back to Good.
Gets or sets the delay time, in minutes, before reporting the external database state.
Gets or sets the minimum state for application of . Defaults to setting Good and Alarm states immediately and applying delay to all other states.
Gets or sets the flag that determines if an external database connection should be enabled for synchronization of alarm states.
Gets or sets the external database connection string used for synchronization of alarm states. Leave blank to use local configuration database defined in "systemSettings".
Gets or sets the external database provider string used for synchronization of alarm states.
Gets or sets the external database command used for synchronization of alarm states.
Gets or sets the external database command parameters with value substitutions used for synchronization of alarm states.
Examples for composite state reporting:
'openPDC Overall Device Status = {AlarmState}[?{AlarmState}!=Good[ -- for \[{Device.Acronym}\]]]'
'Good = {GoodStateCount} / Alarmed = {AlarmStateCount} / Unavailable = {NotAvailableStateCount} / Bad Data = {BadDataStateCount} / Bad Time = {BadTimeStateCount} / Out of Service = {OutOfServiceStateCount}[?{AlarmState}!=Good[ -- \<a href=\"http://localhost:8280/DeviceStatus.cshtml?DeviceID={Device.ID}\"\>\[{Device.Acronym}\] Device Status\</a\>]]'
Gets or sets the external database mapped alarm states defining the {MappedAlarmState} command parameter substitution parameter used for synchronization of alarm states.
Gets or sets the flag that determines if external database should report a single composite state or a state for each device.
Gets or sets primary keys of input measurements the adapter expects, if any.
Gets or sets output measurements that the adapter will produce, if any.
Gets the flag indicating if this adapter supports temporal processing.
Returns the detailed status of the data input source.
Releases the unmanaged resources used by the object and optionally releases the managed resources.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Initializes .
Queues monitoring operation to update alarm state for immediate execution.
Updates alarm states from database.
Gets a short one-line status of this adapter.
Maximum number of available characters for display.
A short one-line summary of the current status of this adapter.
Get short elapsed time string for specified .
representing time span.
Short elapsed time string.
Exposes a method to reinitialize sliding memory caches used by Grafana data sources.
Resets all sliding memory caches used by Grafana data sources.
This should be called any time data source metadata is updated.
Gets or adds a value, based on result of , to the target cache.
Target to use as cache key -- this should be unique per .
Function to generate value to add to cache -- only called if value is not already cached.
Value from cache if already cached; otherwise, new value generated by .
Removes a value from the target cache.
Specific target to remove from cache.
Resets the target cache.
Reads series of instances for the same time interval.
Gets a flag that determines if data read has been completed.
Gets time tolerance for data slices in Unix epoch milliseconds.
Reads next time slice from the series set.
Next time slice.
Creates a new .
Set of series to scan.
Time tolerance for data slices in Unix epoch milliseconds.
Cancellation token.