Click or drag to resize
Grid Solutions Framework

EvaluateTComputePhasorValue Class

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.
Inheritance Hierarchy
SystemObject
  GrafanaAdapters.FunctionsGrafanaFunctionBasePhasorValue
    GrafanaAdapters.Functions.BuiltInEvaluatePhasorValue
      GrafanaAdapters.Functions.BuiltInEvaluateTComputePhasorValue

Namespace: GrafanaAdapters.Functions.BuiltIn
Assembly: GrafanaAdapters (in GrafanaAdapters.dll) Version: 2.4.218-beta
Syntax
public class ComputePhasorValue : Evaluate<PhasorValue>
View Source

The EvaluateTComputePhasorValue type exposes the following members.

Constructors
 NameDescription
Public methodEvaluateTComputePhasorValueInitializes a new instance of the EvaluateTComputePhasorValue class
Top
Properties
 NameDescription
Public propertyAliases Gets any defined aliases for the Grafana function.
(Inherited from EvaluateT)
Public propertyAllowedGroupOperations Gets set of group operations that the Grafana function allows.
(Inherited from EvaluateT)
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 EvaluateT)
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 EvaluateT)
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 EvaluateT)
Public propertyPublishedGroupOperations Gets set of group operations that the Grafana function exposes publicly.
(Inherited from EvaluateT)
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 GrafanaFunctionBaseT)
Public propertyReturnType Gets the return type of the Grafana function, i.e., scalar or series.
(Inherited from EvaluateT)
Top
Methods
 NameDescription
Public methodCheckAllowedGroupOperation Checks if function allows requested group operation against AllowedGroupOperations property.
(Inherited from EvaluateT)
Public methodComputeAsync Executes the computation for the Grafana function.
(Inherited from EvaluateT)
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 EvaluateT)
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 EvaluateT)
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 EvaluateT)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
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
Group Operations: Slice

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}

See Also