C# Класс GSF.TimeSeries.MeasurementKey

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Undefined MeasurementKey

Открытые методы

Метод Описание
CreateOrUpdate ( System.Guid signalID, string value ) : MeasurementKey

Constructs a new MeasurementKey given the specified parameters.

CreateOrUpdate ( System.Guid signalID, string source, uint id ) : MeasurementKey

Constructs a new MeasurementKey given the specified parameters.

EstablishDefaultCache ( IDbConnection connection, Type adapterType, string measurementTable = "ActiveMeasurement" ) : void

Establish default MeasurementKey cache.

Source tables are expected to have at least the following fields: ID NVARCHAR Measurement key formatted as: ArchiveSource:PointID SignalID GUID Unique identification for measurement

GetHashCode ( ) : int

Serves as a hash function for the current MeasurementKey.

LookUpBySignalID ( System.Guid signalID ) : MeasurementKey

Looks up the measurement key associated with the given signal ID.

If no measurement key is found with the given signal ID, this method returns Undefined.

LookUpBySource ( string source, uint id ) : MeasurementKey

Looks up the measurement key associated with the given source and ID.

If no measurement key is found with the given source and ID, this method returns Undefined.

LookUpOrCreate ( System.Guid signalID, string value ) : MeasurementKey

Performs a lookup by signal ID and, failing that, attempts to create the key using the given signal ID and the parsed source, and ID.

LookUpOrCreate ( System.Guid signalID, string source, uint id ) : MeasurementKey

Performs a lookup by signal ID and, failing that, attempts to create the key using the given signal ID, source, and ID.

LookUpOrCreate ( string value ) : MeasurementKey

Performs a lookup by source and, failing that, attempts to create the key using a newly generated signal ID and the parsed source and ID.

LookUpOrCreate ( string source, uint id ) : MeasurementKey

Performs a lookup by source and, failing that, attempts to create the key using a newly generated signal ID and the given source and ID.

Parse ( string value ) : MeasurementKey

Converts the string representation of a MeasurementKey into its value equivalent.

SetMeasurementMetadata ( string tagName, double adder, double multiplier, MeasurementValueFilterFunction valueFilter ) : void

Updates the values of the Metadata.

ToString ( ) : string

Returns a string that represents the current MeasurementKey.

TryCreateOrUpdate ( System.Guid signalID, string value, MeasurementKey &key ) : bool

Constructs a new MeasurementKey given the specified parameters.

TryCreateOrUpdate ( System.Guid signalID, string source, uint id, MeasurementKey &key ) : bool

Constructs a new MeasurementKey given the specified parameters.

TryParse ( string value, MeasurementKey &key ) : bool

Attempts to convert the string representation of a MeasurementKey into its value equivalent.

Приватные методы

Метод Описание
CreateUndefinedMeasurementKey ( ) : MeasurementKey

Creates the undefined measurement key. Used to initialize Undefined.

MeasurementKey ( ) : System
MeasurementKey ( System.Guid signalID, uint id, string source ) : System
TrySplit ( string value, string &source, uint &id ) : bool

Attempts to split the given string representation of a measurement key into a source and ID pair.

Описание методов

CreateOrUpdate() публичный статический Метод

Constructs a new MeasurementKey given the specified parameters.
cannot be empty The value is not in the correct format for a value.
public static CreateOrUpdate ( System.Guid signalID, string value ) : MeasurementKey
signalID System.Guid ID of associated signal, if defined.
value string A string representation of the .
Результат MeasurementKey

CreateOrUpdate() публичный статический Метод

Constructs a new MeasurementKey given the specified parameters.
cannot be empty. cannot be null.
public static CreateOrUpdate ( System.Guid signalID, string source, uint id ) : MeasurementKey
signalID System.Guid ID of associated signal, if defined.
source string Source of the measurement that this represents (e.g., name of archive).
id uint Numeric ID of the measurement that this represents.
Результат MeasurementKey

EstablishDefaultCache() публичный статический Метод

Establish default MeasurementKey cache.
Source tables are expected to have at least the following fields: ID NVARCHAR Measurement key formatted as: ArchiveSource:PointID SignalID GUID Unique identification for measurement
public static EstablishDefaultCache ( IDbConnection connection, Type adapterType, string measurementTable = "ActiveMeasurement" ) : void
connection IDbConnection The database connection.
adapterType System.Type The database adapter type.
measurementTable string Measurement table name used to load measurement key cache.
Результат void

GetHashCode() публичный Метод

Serves as a hash function for the current MeasurementKey.
public GetHashCode ( ) : int
Результат int

LookUpBySignalID() публичный статический Метод

Looks up the measurement key associated with the given signal ID.
If no measurement key is found with the given signal ID, this method returns Undefined.
public static LookUpBySignalID ( System.Guid signalID ) : MeasurementKey
signalID System.Guid The signal ID of the measurement key.
Результат MeasurementKey

LookUpBySource() публичный статический Метод

Looks up the measurement key associated with the given source and ID.
If no measurement key is found with the given source and ID, this method returns Undefined.
public static LookUpBySource ( string source, uint id ) : MeasurementKey
source string The source of the signal.
id uint The source-specific unique integer identifier.
Результат MeasurementKey

LookUpOrCreate() публичный статический Метод

Performs a lookup by signal ID and, failing that, attempts to create the key using the given signal ID and the parsed source, and ID.
public static LookUpOrCreate ( System.Guid signalID, string value ) : MeasurementKey
signalID System.Guid The signal ID of the key to be looked up.
value string A string representation of the .
Результат MeasurementKey

LookUpOrCreate() публичный статический Метод

Performs a lookup by signal ID and, failing that, attempts to create the key using the given signal ID, source, and ID.
public static LookUpOrCreate ( System.Guid signalID, string source, uint id ) : MeasurementKey
signalID System.Guid The signal ID of the key to be looked up.
source string The source to use for the key if the lookup fails.
id uint The ID to use for the key if the lookup fails.
Результат MeasurementKey

LookUpOrCreate() публичный статический Метод

Performs a lookup by source and, failing that, attempts to create the key using a newly generated signal ID and the parsed source and ID.
public static LookUpOrCreate ( string value ) : MeasurementKey
value string A string representation of the .
Результат MeasurementKey

LookUpOrCreate() публичный статический Метод

Performs a lookup by source and, failing that, attempts to create the key using a newly generated signal ID and the given source and ID.
public static LookUpOrCreate ( string source, uint id ) : MeasurementKey
source string The source to use for the key if the lookup fails.
id uint The ID to use for the key if the lookup fails.
Результат MeasurementKey

Parse() публичный статический Метод

Converts the string representation of a MeasurementKey into its value equivalent.
The value is not in the correct format for a value.
public static Parse ( string value ) : MeasurementKey
value string A string representing the to convert.
Результат MeasurementKey

SetMeasurementMetadata() публичный Метод

Updates the values of the Metadata.
public SetMeasurementMetadata ( string tagName, double adder, double multiplier, MeasurementValueFilterFunction valueFilter ) : void
tagName string Gets or sets the text based tag name.
adder double Defines an offset to add to the value.
multiplier double Defines a multiplicative offset to apply to the value.
valueFilter MeasurementValueFilterFunction Defines the to use when downsampling this type of value.
Результат void

ToString() публичный Метод

Returns a string that represents the current MeasurementKey.
public ToString ( ) : string
Результат string

TryCreateOrUpdate() публичный статический Метод

Constructs a new MeasurementKey given the specified parameters.
cannot be empty. Measurement key Source cannot be null.
public static TryCreateOrUpdate ( System.Guid signalID, string value, MeasurementKey &key ) : bool
signalID System.Guid ID of associated signal, if defined.
value string A string representation of the .
key MeasurementKey The measurement key that was created or updated or .
Результат bool

TryCreateOrUpdate() публичный статический Метод

Constructs a new MeasurementKey given the specified parameters.
cannot be empty. cannot be null.
public static TryCreateOrUpdate ( System.Guid signalID, string source, uint id, MeasurementKey &key ) : bool
signalID System.Guid ID of associated signal, if defined.
source string Source of the measurement that this represents (e.g., name of archive).
id uint Numeric ID of the measurement that this represents.
key MeasurementKey The measurement key that was created or updated or .
Результат bool

TryParse() публичный статический Метод

Attempts to convert the string representation of a MeasurementKey into its value equivalent.
public static TryParse ( string value, MeasurementKey &key ) : bool
value string A string representing the to convert.
key MeasurementKey Output in which to stored parsed value.
Результат bool

Описание свойств

Undefined публичное статическое свойство

Represents an undefined measurement key.
public static MeasurementKey,GSF.TimeSeries Undefined
Результат MeasurementKey