//****************************************************************************************************** // IActionAdapter.cs - Gbtc // // Copyright © 2010, 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 Eclipse Public License -v 1.0 (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/eclipse-1.0.php // // 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. // //****************************************************************************************************** using System; using System.Collections.Generic; namespace GSF.TimeSeries.Adapters { /// /// Represents thet abstract interface for any action adapter. /// public interface IActionAdapter : IAdapter { /// /// Provides new measurements from action adapter. /// /// /// is a collection of new measurements for host to process. /// event EventHandler>> NewMeasurements; /// /// This event is raised every five seconds allowing consumer to track current number of unpublished seconds of data in the queue. /// /// /// is the total number of unpublished seconds of data. /// event EventHandler> UnpublishedSamples; /// /// This event is raised if there are any measurements being discarded during the sorting process. /// /// /// is the enumeration of values that are being discarded during the sorting process. /// event EventHandler>> DiscardingMeasurements; /// /// Gets or sets flag indicating if action adapter should respect auto-start requests based on input demands. /// /// /// 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 false for an action adapter that calculated measurement, but true for an action adapter used to archive inputs. /// bool RespectInputDemands { get; set; } /// /// Gets or sets flag indicating if action adapter should respect auto-start requests based on output demands. /// /// /// 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 true for an action adapter that calculated measurement, but false for an action adapter used to archive inputs. /// bool RespectOutputDemands { get; set; } /// /// Gets or sets values used to filter input measurement keys. /// /// /// This allows an adapter to associate itself with entire collections of measurements based on the source of the measurement keys. /// Set to null apply no filter. /// string[] InputSourceIDs { get; set; } /// /// Gets or sets values used to filter output measurements. /// /// /// This allows an adapter to associate itself with entire collections of measurements based on the source of the measurement keys. /// Set to null apply no filter. /// string[] OutputSourceIDs { get; set; } /// /// Gets or sets input measurement keys that are requested by other adapters based on what adapter says it can provide. /// MeasurementKey[] RequestedInputMeasurementKeys { get; set; } /// /// Gets or sets output measurement keys that are requested by other adapters based on what adapter says it can provide. /// MeasurementKey[] RequestedOutputMeasurementKeys { get; set; } /// /// Queues measurements for processing. Measurements are automatically filtered to the defined . /// /// Collection of measurements to queue for calculation processing. void QueueMeasurementsForProcessing(IEnumerable measurements); } }