C# Class GSF.TimeSeries.MeasurementKey

Afficher le fichier Open project: GridProtectionAlliance/gsf Class Usage Examples

Méthodes publiques

Свойство Type Description
Undefined MeasurementKey

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

CreateOrUpdate() public static méthode

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 .
Résultat MeasurementKey

CreateOrUpdate() public static méthode

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.
Résultat MeasurementKey

EstablishDefaultCache() public static méthode

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.
Résultat void

GetHashCode() public méthode

Serves as a hash function for the current MeasurementKey.
public GetHashCode ( ) : int
Résultat int

LookUpBySignalID() public static méthode

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.
Résultat MeasurementKey

LookUpBySource() public static méthode

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.
Résultat MeasurementKey

LookUpOrCreate() public static méthode

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 .
Résultat MeasurementKey

LookUpOrCreate() public static méthode

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.
Résultat MeasurementKey

LookUpOrCreate() public static méthode

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 .
Résultat MeasurementKey

LookUpOrCreate() public static méthode

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.
Résultat MeasurementKey

Parse() public static méthode

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.
Résultat MeasurementKey

SetMeasurementMetadata() public méthode

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.
Résultat void

ToString() public méthode

Returns a string that represents the current MeasurementKey.
public ToString ( ) : string
Résultat string

TryCreateOrUpdate() public static méthode

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 .
Résultat bool

TryCreateOrUpdate() public static méthode

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 .
Résultat bool

TryParse() public static méthode

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.
Résultat bool

Property Details

Undefined public_oe static_oe property

Represents an undefined measurement key.
public static MeasurementKey,GSF.TimeSeries Undefined
Résultat MeasurementKey