C# Class GSF.TimeSeries.IMeasurementExtensions

Defines static extension functions for IMeasurement implementations.
These helper functions map to the previously defined corresponding properties to help with the transition of MeasurementStateFlags.
Show file Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
GetSignalType ( this measurement, DataSet dataSource ) : int

Gets a unique (run-time only) signal type ID for the given measurement useful for sorting.

IsCalculated ( this measurement ) : bool

Returns true if MeasurementStateFlags.CalculatedValue is set.

IsDiscarded ( this measurement ) : bool

Returns true if MeasurementStateFlags.DiscardedValue is set.

MeasurementKeys ( this measurements ) : GSF.TimeSeries.MeasurementKey[]

Returns the MeasurementKey values of a IMeasurement enumeration.

RuntimeSignalID ( this measurement ) : System.Guid

Returns the measurement ID if defined, otherwise the run-time signal ID associated with the measurement key.

SetAdder ( this measurement, double adder ) : void

Sets the adder (i.e., "b" of y = mx + b) for a IMeasurement.

SetKey ( this measurement, MeasurementKey key ) : void

Sets the associated MeasurementKey for a IMeasurement.

SetMultiplier ( this measurement, double multiplier ) : void

Sets the multiplier (i.e., "m" of y = mx + b) for a IMeasurement.

SetTagName ( this measurement, string tagName ) : void

Sets the tag name for a IMeasurement.

TimestampQualityIsGood ( this measurement ) : bool

Returns true if MeasurementStateFlags.BadTime is not set.

ValueQualityIsGood ( this measurement ) : bool

Returns true if MeasurementStateFlags.BadData is not set.

Private Methods

Method Description
LookupSignalType ( System.Guid signalID, DataSet dataSource ) : string

Method Details

GetSignalType() public static method

Gets a unique (run-time only) signal type ID for the given measurement useful for sorting.
public static GetSignalType ( this measurement, DataSet dataSource ) : int
measurement this to obtain signal type for.
dataSource System.Data.DataSet that contains measurement metadata.
return int

IsCalculated() public static method

Returns true if MeasurementStateFlags.CalculatedValue is set.
public static IsCalculated ( this measurement ) : bool
measurement this instance to test.
return bool

IsDiscarded() public static method

Returns true if MeasurementStateFlags.DiscardedValue is set.
public static IsDiscarded ( this measurement ) : bool
measurement this instance to test.
return bool

MeasurementKeys() public static method

Returns the MeasurementKey values of a IMeasurement enumeration.
public static MeasurementKeys ( this measurements ) : GSF.TimeSeries.MeasurementKey[]
measurements this enumeration to convert.
return GSF.TimeSeries.MeasurementKey[]

RuntimeSignalID() public static method

Returns the measurement ID if defined, otherwise the run-time signal ID associated with the measurement key.
public static RuntimeSignalID ( this measurement ) : System.Guid
measurement this instance to test.
return System.Guid

SetAdder() public static method

Sets the adder (i.e., "b" of y = mx + b) for a IMeasurement.
public static SetAdder ( this measurement, double adder ) : void
measurement this to create new for.
adder double New adder value to assign to measurement's metadata.
return void

SetKey() public static method

Sets the associated MeasurementKey for a IMeasurement.
public static SetKey ( this measurement, MeasurementKey key ) : void
measurement this to create new for.
key MeasurementKey New measurement key value to assign to measurement's metadata.
return void

SetMultiplier() public static method

Sets the multiplier (i.e., "m" of y = mx + b) for a IMeasurement.
public static SetMultiplier ( this measurement, double multiplier ) : void
measurement this to create new for.
multiplier double New multiplier value to assign to measurement's metadata.
return void

SetTagName() public static method

Sets the tag name for a IMeasurement.
public static SetTagName ( this measurement, string tagName ) : void
measurement this to create new for.
tagName string New tag name value to assign to measurement's metadata.
return void

TimestampQualityIsGood() public static method

Returns true if MeasurementStateFlags.BadTime is not set.
public static TimestampQualityIsGood ( this measurement ) : bool
measurement this instance to test.
return bool

ValueQualityIsGood() public static method

Returns true if MeasurementStateFlags.BadData is not set.
public static ValueQualityIsGood ( this measurement ) : bool
measurement this instance to test.
return bool