138 lines · 6.1 KB · C#
RawDownload
//******************************************************************************************************//  IActionAdapter.cs - Gbtc////  Copyright © 2012, Grid Protection Alliance.  All Rights Reserved.////  Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See//  the NOTICE file distributed with this work for additional information regarding copyright ownership.//  The GPA licenses this file to you under the MIT License (MIT), the "License"; you may//  not use this file except in compliance with the License. You may obtain a copy of the License at:////      http://www.opensource.org/licenses/MIT////  Unless agreed to in writing, the subject software distributed under the License is distributed on an//  "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the//  License for the specific language governing permissions and limitations.////  Code Modification History://  ----------------------------------------------------------------------------------------------------//  09/02/2010 - J. Ritchie Carroll//       Generated original version of source code.//  12/20/2012 - Starlynn Danyelle Gilliam//       Modified Header.////****************************************************************************************************** using System;using System.Collections.Generic; namespace GSF.TimeSeries.Adapters{    /// <summary>    /// Represents the abstract interface for any action adapter.    /// </summary>    public interface IActionAdapter : IAdapter    {        /// <summary>        /// Provides new measurements from action adapter.        /// </summary>        /// <remarks>        /// <see cref="EventArgs{T}.Argument"/> is a collection of new measurements for host to process.        /// </remarks>        event EventHandler<EventArgs<ICollection<IMeasurement>>> NewMeasurements;         /// <summary>        /// This event is raised every five seconds allowing consumer to track current number of unpublished seconds of data in the queue.        /// </summary>        /// <remarks>        /// <see cref="EventArgs{T}.Argument"/> is the total number of unpublished seconds of data.        /// </remarks>        event EventHandler<EventArgs<int>> UnpublishedSamples;         /// <summary>        /// This event is raised if there are any measurements being discarded during the sorting process.        /// </summary>        /// <remarks>        /// <see cref="EventArgs{T}.Argument"/> is the enumeration of <see cref="IMeasurement"/> values that are being discarded during the sorting process.        /// </remarks>        event EventHandler<EventArgs<IEnumerable<IMeasurement>>> DiscardingMeasurements;         /// <summary>        /// Gets or sets flag indicating if action adapter should respect auto-start requests based on input demands.        /// </summary>        /// <remarks>        /// Action adapters are in the curious position of being able to both consume and produce points, as such the user needs to be able to control how their        /// adapter will behave concerning routing demands when the adapter is setup to connect on demand. In the case of respecting auto-start input demands,        /// as an example, this would be <c>false</c> for an action adapter that calculated measurement, but <c>true</c> for an action adapter used to archive inputs.        /// </remarks>        bool RespectInputDemands        {            get;            set;        }         /// <summary>        /// Gets or sets flag indicating if action adapter should respect auto-start requests based on output demands.        /// </summary>        /// <remarks>        /// Action adapters are in the curious position of being able to both consume and produce points, as such the user needs to be able to control how their        /// adapter will behave concerning routing demands when the adapter is setup to connect on demand. In the case of respecting auto-start output demands,        /// as an example, this would be <c>true</c> for an action adapter that calculated measurement, but <c>false</c> for an action adapter used to archive inputs.        /// </remarks>        bool RespectOutputDemands        {            get;            set;        }         /// <summary>        /// Gets or sets <see cref="MeasurementKey.Source"/> values used to filter input measurement keys.        /// </summary>        /// <remarks>        /// This allows an adapter to associate itself with entire collections of measurements based on the source of the measurement keys.        /// Set to <c>null</c> to apply no filter.        /// </remarks>        string[] InputSourceIDs        {            get;            set;        }         /// <summary>        /// Gets or sets <see cref="MeasurementKey.Source"/> values used to filter output measurements.        /// </summary>        /// <remarks>        /// This allows an adapter to associate itself with entire collections of measurements based on the source of the measurement keys.        /// Set to <c>null</c> to apply no filter.        /// </remarks>        string[] OutputSourceIDs        {            get;            set;        }         /// <summary>        /// Gets or sets input measurement keys that are requested by other adapters based on what adapter says it can provide.        /// </summary>        MeasurementKey[] RequestedInputMeasurementKeys        {            get;            set;        }         /// <summary>        /// Gets or sets output measurement keys that are requested by other adapters based on what adapter says it can provide.        /// </summary>        MeasurementKey[] RequestedOutputMeasurementKeys        {            get;            set;        }         /// <summary>        /// Queues measurements for processing.  Measurements are automatically filtered to the defined <see cref="IAdapter.InputMeasurementKeys"/>.        /// </summary>        /// <param name="measurements">Collection of measurements to queue for calculation processing.</param>        void QueueMeasurementsForProcessing(IEnumerable<IMeasurement> measurements);    }}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t