C# Класс 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.
Наследование: ConcentratorBase, IActionAdapter
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
ExamineQueueState void
GenHashCode void
OnStatusMessage void
ResetStatistics void
SetInitializedState void
SetTemporalConstraint void
Start void
Stop void

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

Метод Описание
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.

Защищенные методы

Метод Описание
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

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

Метод Описание
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

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

ActionAdapterBase() защищенный Метод

Creates a new ActionAdapterBase.
protected ActionAdapterBase ( ) : System
Результат System

Dispose() защищенный Метод

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.
Результат void

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

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

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

Gets a short one-line status of this ActionAdapterBase.
public GetShortStatus ( int maxLength ) : string
maxLength int Maximum number of available characters for display.
Результат string

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

Initializes ActionAdapterBase.
public Initialize ( ) : void
Результат void

OnConfigurationChanged() защищенный Метод

Raises ConfigurationChanged event.
protected OnConfigurationChanged ( ) : void
Результат void

OnInputMeasurementKeysUpdated() защищенный Метод

Raises InputMeasurementKeysUpdated event.
protected OnInputMeasurementKeysUpdated ( ) : void
Результат void

OnNewMeasurements() защищенный Метод

Raises the NewMeasurements event.
protected OnNewMeasurements ( ICollection measurements ) : void
measurements ICollection
Результат void

OnOutputMeasurementsUpdated() защищенный Метод

Raises OutputMeasurementsUpdated event.
protected OnOutputMeasurementsUpdated ( ) : void
Результат void

OnStatusMessage() защищенный Метод

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 .
Результат void

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

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.
Результат void

TryGetMinimumNeededMeasurements() защищенный Метод

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
Результат bool