C# Class GSF.TimeSeries.Adapters.ActionAdapterBase

Represents the base class for action adapters.
This base class acts as a measurement concentrator which time aligns all incoming measurements for proper processing. Derived classes are expected to override ConcentratorBase.PublishFrame to handle time aligned measurements and call OnNewMeasurements for any new measurements that may get created.
Inheritance: ConcentratorBase, IActionAdapter
Afficher le fichier Open project: GridProtectionAlliance/gsf

Private Properties

Свойство Type Description
ExamineQueueState void
GenHashCode void
OnStatusMessage void
ResetStatistics void
SetInitializedState void
SetTemporalConstraint void
Start void
Stop void

Méthodes publiques

Méthode Description
GetHashCode ( ) : int

Serves as a hash function for the current ActionAdapterBase.

GetShortStatus ( int maxLength ) : string

Gets a short one-line status of this ActionAdapterBase.

Initialize ( ) : void

Initializes ActionAdapterBase.

QueueMeasurementsForProcessing ( IEnumerable measurements ) : void

Queues a collection of measurements for processing. Measurements are automatically filtered to the defined IAdapter.InputMeasurementKeys.

Measurements are filtered against the defined InputMeasurementKeys.

Méthodes protégées

Méthode Description
ActionAdapterBase ( ) : System

Creates a new ActionAdapterBase.

Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the ActionAdapterBase object and optionally releases the managed resources.

OnConfigurationChanged ( ) : void

Raises ConfigurationChanged event.

OnInputMeasurementKeysUpdated ( ) : void

Raises InputMeasurementKeysUpdated event.

OnNewMeasurements ( ICollection measurements ) : void

Raises the NewMeasurements event.

OnOutputMeasurementsUpdated ( ) : void

Raises OutputMeasurementsUpdated event.

OnStatusMessage ( MessageLevel level, string status, string eventName = null, MessageFlags flags = MessageFlags.None ) : void

Raises the StatusMessage event and sends this data to the Logger.

should be a constant string value associated with what type of message is being generated. In general, there should only be a few dozen distinct event names per class. Exceeding this threshold will cause the EventName to be replaced with a general warning that a usage issue has occurred.

TryGetMinimumNeededMeasurements ( IFrame frame, IMeasurement &measurements ) : bool

Attempts to retrieve the minimum needed number of measurements from the frame (as specified by MinimumMeasurementsToUse)

Remember this function will *only* return the minimum needed number of measurements, no more. If you want to use all available measurements in your adapter you should just use Frame.Measurements.Values directly.

Note that the measurements array parameter will be created if the reference is null, otherwise if caller creates array it must be sized to MinimumMeasurementsToUse

Private Methods

Méthode Description
ExamineQueueState ( ) : void
GenHashCode ( ) : void
OnStatusMessage ( string status ) : void
ResetStatistics ( ) : void
SetInitializedState ( bool initialized ) : void
SetTemporalConstraint ( string startTime, string stopTime, string constraintParameters ) : void
Start ( ) : void
Stop ( ) : void

Method Details

ActionAdapterBase() protected méthode

Creates a new ActionAdapterBase.
protected ActionAdapterBase ( ) : System
Résultat System

Dispose() protected méthode

Releases the unmanaged resources used by the ActionAdapterBase object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Résultat void

GetHashCode() public méthode

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

GetShortStatus() public méthode

Gets a short one-line status of this ActionAdapterBase.
public GetShortStatus ( int maxLength ) : string
maxLength int Maximum number of available characters for display.
Résultat string

Initialize() public méthode

Initializes ActionAdapterBase.
public Initialize ( ) : void
Résultat void

OnConfigurationChanged() protected méthode

Raises ConfigurationChanged event.
protected OnConfigurationChanged ( ) : void
Résultat void

OnInputMeasurementKeysUpdated() protected méthode

Raises InputMeasurementKeysUpdated event.
protected OnInputMeasurementKeysUpdated ( ) : void
Résultat void

OnNewMeasurements() protected méthode

Raises the NewMeasurements event.
protected OnNewMeasurements ( ICollection measurements ) : void
measurements ICollection
Résultat void

OnOutputMeasurementsUpdated() protected méthode

Raises OutputMeasurementsUpdated event.
protected OnOutputMeasurementsUpdated ( ) : void
Résultat void

OnStatusMessage() protected méthode

Raises the StatusMessage event and sends this data to the Logger.
should be a constant string value associated with what type of message is being generated. In general, there should only be a few dozen distinct event names per class. Exceeding this threshold will cause the EventName to be replaced with a general warning that a usage issue has occurred.
protected OnStatusMessage ( MessageLevel level, string status, string eventName = null, MessageFlags flags = MessageFlags.None ) : void
level MessageLevel The to assign to this message
status string New status message.
eventName string A fixed string to classify this event; defaults to null.
flags MessageFlags to use, if any; defaults to .
Résultat void

QueueMeasurementsForProcessing() public méthode

Queues a collection of measurements for processing. Measurements are automatically filtered to the defined IAdapter.InputMeasurementKeys.
Measurements are filtered against the defined InputMeasurementKeys.
public QueueMeasurementsForProcessing ( IEnumerable measurements ) : void
measurements IEnumerable Collection of measurements to queue for processing.
Résultat void

TryGetMinimumNeededMeasurements() protected méthode

Attempts to retrieve the minimum needed number of measurements from the frame (as specified by MinimumMeasurementsToUse)

Remember this function will *only* return the minimum needed number of measurements, no more. If you want to use all available measurements in your adapter you should just use Frame.Measurements.Values directly.

Note that the measurements array parameter will be created if the reference is null, otherwise if caller creates array it must be sized to MinimumMeasurementsToUse

protected TryGetMinimumNeededMeasurements ( IFrame frame, IMeasurement &measurements ) : bool
frame IFrame Source frame for the measurements
measurements IMeasurement Return array of measurements
Résultat bool