Click or drag to resize
Grid Solutions Framework

ModeTComputeMeasurementValue Class

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 RoundT, with zero digits, CeilingT, FloorT or TruncateT as an input to this function to ensure the conversion of values to integer-based values is handled as expected.
Inheritance Hierarchy
SystemObject
  GrafanaAdapters.FunctionsGrafanaFunctionBaseMeasurementValue
    GrafanaAdapters.Functions.BuiltInModeMeasurementValue
      GrafanaAdapters.Functions.BuiltInModeTComputeMeasurementValue

Namespace: GrafanaAdapters.Functions.BuiltIn
Assembly: GrafanaAdapters (in GrafanaAdapters.dll) Version: 2.4.207-beta
Syntax
public class ComputeMeasurementValue : Mode<MeasurementValue>
View Source

The ModeTComputeMeasurementValue type exposes the following members.

Constructors
 NameDescription
Public methodModeTComputeMeasurementValueInitializes a new instance of the ModeTComputeMeasurementValue class
Top
Properties
 NameDescription
Public propertyAliases Gets any defined aliases for the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public propertyAllowedGroupOperations Gets set of group operations that the Grafana function allows.
(Inherited from GrafanaFunctionBaseT)
Public propertyCategory Gets the category of the Grafana function, i.e., built-in or custom.
(Inherited from GrafanaFunctionBaseT)
Public propertyDataTypeIndex Gets the data source value type index associated with the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public propertyDescription Gets the description of the Grafana function.
(Inherited from ModeT)
Public propertyInternalParameterCount Gets the number of internal parameters of the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public propertyIsSliceSeriesEquivalent 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 Series, and the AllowedGroupOperations includes the flag for Slice operations; otherwise, value defaults to false when the return type is a scalar value, i.e., Scalar, or the AllowedGroupOperations does not include the flag for Slice operations.
(Inherited from GrafanaFunctionBaseT)
Public propertyName Gets the name of the Grafana function.
(Inherited from ModeT)
Public propertyOptionalParameterCount Gets the number of optional parameters of the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public propertyParameterDefinitions Gets the list of defined parameter definitions for the Grafana function.
(Inherited from ModeT)
Public propertyPublishedGroupOperations Gets set of group operations that the Grafana function exposes publicly.
(Inherited from GrafanaFunctionBaseT)
Public propertyRequiredParameterCount Gets the number of required parameters, not including data source values expression, of the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public propertyResultIsSetTargetSeries Gets flag that determines if function result is target series for set-based group operations.
(Inherited from ModeT)
Public propertyReturnType Gets the return type of the Grafana function, i.e., scalar or series.
(Inherited from ModeT)
Top
Methods
 NameDescription
Public methodCheckAllowedGroupOperation Checks if function allows requested group operation against AllowedGroupOperations property.
(Inherited from GrafanaFunctionBaseT)
Public methodComputeAsync Executes the computation for the Grafana function.
(Inherited from ModeT)
Public methodComputeSetAsync Executes a custom set computation for the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public methodComputeSliceAsync Executes a custom slice computation for the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodExecuteFunction Executes specified function against data source values enumeration using provided parameters.
(Inherited from GrafanaFunctionBaseT)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFormatTargetName Gets a formatted target name for the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Protected methodGetDataSourceValues Gets data source values enumeration found in the provided parameters.
(Inherited from GrafanaFunctionBaseT)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodParseParameters Executes custom parameter parsing for the Grafana function.
(Inherited from GrafanaFunctionBaseT)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
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.
See Also